summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorStefan Sperling <stsp@cvs.openbsd.org>2019-03-01 08:09:01 +0000
committerStefan Sperling <stsp@cvs.openbsd.org>2019-03-01 08:09:01 +0000
commitaa21243eb375f73fd9bb774b507b89fe1991c1c9 (patch)
treeed6e3e0afbc06e302f9ec85ad76ca279ffa799e6 /sys
parent768d7a3e045260cde7d532e5d712c26f3bfc4210 (diff)
Pick up the AP's 11g ERP protection setting properly in 11n client mode.
ok phessler@
Diffstat (limited to 'sys')
-rw-r--r--sys/net80211/ieee80211_input.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c
index d04fadc0187..24fd9c06896 100644
--- a/sys/net80211/ieee80211_input.c
+++ b/sys/net80211/ieee80211_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ieee80211_input.c,v 1.203 2019/01/15 10:01:46 stsp Exp $ */
+/* $OpenBSD: ieee80211_input.c,v 1.204 2019/03/01 08:09:00 stsp Exp $ */
/*-
* Copyright (c) 2001 Atsushi Onoe
@@ -1565,7 +1565,9 @@ ieee80211_recv_probe_resp(struct ieee80211com *ic, struct mbuf *m,
DPRINTF(("[%s] erp change: was 0x%x, now 0x%x\n",
ether_sprintf((u_int8_t *)wh->i_addr2),
ni->ni_erp, erp));
- if (ic->ic_curmode == IEEE80211_MODE_11G &&
+ if ((ic->ic_curmode == IEEE80211_MODE_11G ||
+ (ic->ic_curmode == IEEE80211_MODE_11N &&
+ IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))) &&
(erp & IEEE80211_ERP_USE_PROTECTION))
ic->ic_flags |= IEEE80211_F_USEPROT;
else