mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-10-14 07:15:58 +08:00
Update to FreeBSD head 2017-04-04
Git mirror commit 642b174daddbd0efd9bb5f242c43f4ab4db6869f.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
|
@@ -16,7 +16,7 @@
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
|
@@ -16,7 +16,7 @@
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
|
@@ -221,7 +221,7 @@ bridge_interfaces(int s, const char *prefix)
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
free(pad);
|
||||
free(inbuf);
|
||||
}
|
||||
|
||||
|
@@ -16,7 +16,7 @@
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
|
@@ -16,7 +16,7 @@
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
@@ -1221,7 +1221,7 @@ unsetifdescr(const char *val, int value, int s, const struct afswtch *afp)
|
||||
"\020\1RXCSUM\2TXCSUM\3NETCONS\4VLAN_MTU\5VLAN_HWTAGGING\6JUMBO_MTU\7POLLING" \
|
||||
"\10VLAN_HWCSUM\11TSO4\12TSO6\13LRO\14WOL_UCAST\15WOL_MCAST\16WOL_MAGIC" \
|
||||
"\17TOE4\20TOE6\21VLAN_HWFILTER\23VLAN_HWTSO\24LINKSTATE\25NETMAP" \
|
||||
"\26RXCSUM_IPV6\27TXCSUM_IPV6"
|
||||
"\26RXCSUM_IPV6\27TXCSUM_IPV6\31TXRTLMT"
|
||||
|
||||
/*
|
||||
* Print the status of the interface. If an address family was
|
||||
@@ -1535,6 +1535,8 @@ static struct cmd basic_cmds[] = {
|
||||
DEF_CMD("-wol_mcast", -IFCAP_WOL_MCAST, setifcap),
|
||||
DEF_CMD("wol_magic", IFCAP_WOL_MAGIC, setifcap),
|
||||
DEF_CMD("-wol_magic", -IFCAP_WOL_MAGIC, setifcap),
|
||||
DEF_CMD("txrtlmt", IFCAP_TXRTLMT, setifcap),
|
||||
DEF_CMD("-txrtlmt", -IFCAP_TXRTLMT, setifcap),
|
||||
DEF_CMD("normal", -IFF_LINK0, setifflags),
|
||||
DEF_CMD("compress", IFF_LINK0, setifflags),
|
||||
DEF_CMD("noicmp", IFF_LINK1, setifflags),
|
||||
|
@@ -1155,6 +1155,7 @@ set80211chanlist(const char *val, int d, int s, const struct afswtch *rafp)
|
||||
cp = tp;
|
||||
}
|
||||
set80211(s, IEEE80211_IOC_CHANLIST, 0, sizeof(chanlist), &chanlist);
|
||||
free(temp);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1769,6 +1770,7 @@ set80211shortgi(const char *val, int d, int s, const struct afswtch *rafp)
|
||||
0, NULL);
|
||||
}
|
||||
|
||||
/* XXX 11ac density/size is different */
|
||||
static void
|
||||
set80211ampdu(const char *val, int d, int s, const struct afswtch *rafp)
|
||||
{
|
||||
@@ -1799,6 +1801,21 @@ set80211stbc(const char *val, int d, int s, const struct afswtch *rafp)
|
||||
set80211(s, IEEE80211_IOC_STBC, stbc, 0, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
set80211ldpc(const char *val, int d, int s, const struct afswtch *rafp)
|
||||
{
|
||||
int ldpc;
|
||||
|
||||
if (get80211val(s, IEEE80211_IOC_LDPC, &ldpc) < 0)
|
||||
errx(-1, "cannot set LDPC setting");
|
||||
if (d < 0) {
|
||||
d = -d;
|
||||
ldpc &= ~d;
|
||||
} else
|
||||
ldpc |= d;
|
||||
set80211(s, IEEE80211_IOC_LDPC, ldpc, 0, NULL);
|
||||
}
|
||||
|
||||
static
|
||||
DECL_CMD_FUNC(set80211ampdulimit, val, d)
|
||||
{
|
||||
@@ -1827,6 +1844,7 @@ DECL_CMD_FUNC(set80211ampdulimit, val, d)
|
||||
set80211(s, IEEE80211_IOC_AMPDU_LIMIT, v, 0, NULL);
|
||||
}
|
||||
|
||||
/* XXX 11ac density/size is different */
|
||||
static
|
||||
DECL_CMD_FUNC(set80211ampdudensity, val, d)
|
||||
{
|
||||
@@ -3156,6 +3174,14 @@ printwpsie(const char *tag, const u_int8_t *ie, size_t ielen, int maxlen)
|
||||
uint16_t tlv_type = BE_READ_2(ie);
|
||||
uint16_t tlv_len = BE_READ_2(ie + 2);
|
||||
|
||||
/* some devices broadcast invalid WPS frames */
|
||||
if (tlv_len > len) {
|
||||
printf("bad frame length tlv_type=0x%02x "
|
||||
"tlv_len=%d len=%d", tlv_type, tlv_len,
|
||||
len);
|
||||
break;
|
||||
}
|
||||
|
||||
ie += 4, len -= 4;
|
||||
|
||||
switch (tlv_type) {
|
||||
@@ -3446,13 +3472,30 @@ printies(const u_int8_t *vp, int ielen, int maxcols)
|
||||
static void
|
||||
printmimo(const struct ieee80211_mimo_info *mi)
|
||||
{
|
||||
/* NB: don't muddy display unless there's something to show */
|
||||
if (mi->rssi[0] != 0 || mi->rssi[1] != 0 || mi->rssi[2] != 0) {
|
||||
/* XXX ignore EVM for now */
|
||||
printf(" (rssi %.1f:%.1f:%.1f nf %d:%d:%d)",
|
||||
mi->rssi[0] / 2.0, mi->rssi[1] / 2.0, mi->rssi[2] / 2.0,
|
||||
mi->noise[0], mi->noise[1], mi->noise[2]);
|
||||
int i;
|
||||
int r = 0;
|
||||
|
||||
for (i = 0; i < IEEE80211_MAX_CHAINS; i++) {
|
||||
if (mi->ch[i].rssi != 0) {
|
||||
r = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* NB: don't muddy display unless there's something to show */
|
||||
if (r == 0)
|
||||
return;
|
||||
|
||||
/* XXX TODO: ignore EVM; secondary channels for now */
|
||||
printf(" (rssi %.1f:%.1f:%.1f:%.1f nf %d:%d:%d:%d)",
|
||||
mi->ch[0].rssi[0] / 2.0,
|
||||
mi->ch[1].rssi[0] / 2.0,
|
||||
mi->ch[2].rssi[0] / 2.0,
|
||||
mi->ch[3].rssi[0] / 2.0,
|
||||
mi->ch[0].noise[0],
|
||||
mi->ch[1].noise[0],
|
||||
mi->ch[2].noise[0],
|
||||
mi->ch[3].noise[0]);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -4932,6 +4975,7 @@ end:
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* XXX 11ac density/size is different */
|
||||
if (get80211val(s, IEEE80211_IOC_AMPDU_LIMIT, &val) != -1) {
|
||||
switch (val) {
|
||||
case IEEE80211_HTCAP_MAXRXAMPDU_8K:
|
||||
@@ -4948,6 +4992,7 @@ end:
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* XXX 11ac density/size is different */
|
||||
if (get80211val(s, IEEE80211_IOC_AMPDU_DENSITY, &val) != -1) {
|
||||
switch (val) {
|
||||
case IEEE80211_HTCAP_MPDUDENSITY_NA:
|
||||
@@ -5029,6 +5074,8 @@ end:
|
||||
else if (verbose)
|
||||
LINE_CHECK("-rifs");
|
||||
}
|
||||
|
||||
/* XXX VHT STBC? */
|
||||
if (get80211val(s, IEEE80211_IOC_STBC, &val) != -1) {
|
||||
switch (val) {
|
||||
case 0:
|
||||
@@ -5046,6 +5093,23 @@ end:
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (get80211val(s, IEEE80211_IOC_LDPC, &val) != -1) {
|
||||
switch (val) {
|
||||
case 0:
|
||||
LINE_CHECK("-ldpc");
|
||||
break;
|
||||
case 1:
|
||||
LINE_CHECK("ldpctx -ldpcrx");
|
||||
break;
|
||||
case 2:
|
||||
LINE_CHECK("-ldpctx ldpcrx");
|
||||
break;
|
||||
case 3:
|
||||
if (verbose)
|
||||
LINE_CHECK("ldpc");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (IEEE80211_IS_CHAN_VHT(c) || verbose) {
|
||||
@@ -5578,12 +5642,12 @@ static struct cmd ieee80211_cmds[] = {
|
||||
DEF_CMD_ARG("bgscanidle", set80211bgscanidle),
|
||||
DEF_CMD_ARG("bgscanintvl", set80211bgscanintvl),
|
||||
DEF_CMD_ARG("scanvalid", set80211scanvalid),
|
||||
DEF_CMD("quiet", 1, set80211quiet),
|
||||
DEF_CMD("-quiet", 0, set80211quiet),
|
||||
DEF_CMD_ARG("quiet_count", set80211quietcount),
|
||||
DEF_CMD_ARG("quiet_period", set80211quietperiod),
|
||||
DEF_CMD_ARG("quiet_dur", set80211quietduration),
|
||||
DEF_CMD_ARG("quiet_offset", set80211quietoffset),
|
||||
DEF_CMD("quiet", 1, set80211quiet),
|
||||
DEF_CMD("-quiet", 0, set80211quiet),
|
||||
DEF_CMD_ARG("quiet_count", set80211quietcount),
|
||||
DEF_CMD_ARG("quiet_period", set80211quietperiod),
|
||||
DEF_CMD_ARG("quiet_duration", set80211quietduration),
|
||||
DEF_CMD_ARG("quiet_offset", set80211quietoffset),
|
||||
DEF_CMD_ARG("roam:rssi", set80211roamrssi),
|
||||
DEF_CMD_ARG("roam:rate", set80211roamrate),
|
||||
DEF_CMD_ARG("mcastrate", set80211mcastrate),
|
||||
@@ -5618,7 +5682,13 @@ static struct cmd ieee80211_cmds[] = {
|
||||
DEF_CMD("stbctx", 1, set80211stbc),
|
||||
DEF_CMD("-stbctx", -1, set80211stbc),
|
||||
DEF_CMD("stbc", 3, set80211stbc), /* NB: tx+rx */
|
||||
DEF_CMD("-ampdu", -3, set80211stbc),
|
||||
DEF_CMD("-stbc", -3, set80211stbc),
|
||||
DEF_CMD("ldpcrx", 2, set80211ldpc),
|
||||
DEF_CMD("-ldpcrx", -2, set80211ldpc),
|
||||
DEF_CMD("ldpctx", 1, set80211ldpc),
|
||||
DEF_CMD("-ldpctx", -1, set80211ldpc),
|
||||
DEF_CMD("ldpc", 3, set80211ldpc), /* NB: tx+rx */
|
||||
DEF_CMD("-ldpc", -3, set80211ldpc),
|
||||
DEF_CMD("puren", 1, set80211puren),
|
||||
DEF_CMD("-puren", 0, set80211puren),
|
||||
DEF_CMD("doth", 1, set80211doth),
|
||||
|
Reference in New Issue
Block a user