summaryrefslogtreecommitdiff
path: root/sys/net80211/ieee80211_node.c
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2018-08-07 18:13:15 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2018-08-07 18:13:15 +0000
commit15faf54e3e63ac84a049d87e50b86a84b63d9f72 (patch)
treef6de3451e0bafa5673b2f7593c573a60ec2e5754 /sys/net80211/ieee80211_node.c
parent838305871f6af3a1ee5cc4c11a39c09a95aee9a7 (diff)
Ignore basic MCS set information found in association responses.
Some APs (Aruba 105) send a bogus basic MCS set in assoc responses which prevents us from enabling 11n support with those APs, while these APs still behave as if were were an 11n client which renders the association unusable. The basic MSC set is already provided in beacons anyway, and the 802.11 2012 standard says the basic MSC set is reserved in frames other than beacons (see Table 8-130). ok mpi@
Diffstat (limited to 'sys/net80211/ieee80211_node.c')
-rw-r--r--sys/net80211/ieee80211_node.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/net80211/ieee80211_node.c b/sys/net80211/ieee80211_node.c
index 3a821b235a2..d3164e8305c 100644
--- a/sys/net80211/ieee80211_node.c
+++ b/sys/net80211/ieee80211_node.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_node.c,v 1.138 2018/08/06 11:28:01 stsp Exp $ */
+/* $OpenBSD: ieee80211_node.c,v 1.139 2018/08/07 18:13:14 stsp Exp $ */
/* $NetBSD: ieee80211_node.c,v 1.14 2004/05/09 09:18:47 dyoung Exp $ */
/*-
@@ -1929,7 +1929,7 @@ ieee80211_clear_htcaps(struct ieee80211_node *ni)
*/
int
ieee80211_setup_htop(struct ieee80211_node *ni, const uint8_t *data,
- uint8_t len)
+ uint8_t len, int isprobe)
{
if (len != 22)
return 0;
@@ -1940,7 +1940,8 @@ ieee80211_setup_htop(struct ieee80211_node *ni, const uint8_t *data,
ni->ni_htop1 = (data[2] | (data[3] << 8));
ni->ni_htop2 = (data[3] | (data[4] << 8));
- memcpy(ni->ni_basic_mcs, &data[6], sizeof(ni->ni_basic_mcs));
+ if (isprobe)
+ memcpy(ni->ni_basic_mcs, &data[6], sizeof(ni->ni_basic_mcs));
return 1;
}