From ec42511509928b05675d59c142922baab128f53c Mon Sep 17 00:00:00 2001 From: Sam Leffler Date: Fri, 10 Jun 2005 01:35:21 +0000 Subject: [PATCH] mark state for protection only when operating in 11g --- sys/net80211/ieee80211_input.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_input.c b/sys/net80211/ieee80211_input.c index 32f874fd128b..e7574eda58c3 100644 --- a/sys/net80211/ieee80211_input.c +++ b/sys/net80211/ieee80211_input.c @@ -1850,7 +1850,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, "[%s] erp change: was 0x%x, now 0x%x\n", ether_sprintf(wh->i_addr2), ni->ni_erp, erp); - if (erp & IEEE80211_ERP_USE_PROTECTION) + if (ic->ic_curmode == IEEE80211_MODE_11G && + (ni->ni_erp & IEEE80211_ERP_USE_PROTECTION)) ic->ic_flags |= IEEE80211_F_USEPROT; else ic->ic_flags &= ~IEEE80211_F_USEPROT; @@ -2420,7 +2421,8 @@ ieee80211_recv_mgmt(struct ieee80211com *ic, struct mbuf *m0, * NB: ni_erp should zero for non-11g operation. * XXX check ic_curmode anyway? */ - if (ni->ni_erp & IEEE80211_ERP_USE_PROTECTION) + if (ic->ic_curmode == IEEE80211_MODE_11G && + (ni->ni_erp & IEEE80211_ERP_USE_PROTECTION)) ic->ic_flags |= IEEE80211_F_USEPROT; else ic->ic_flags &= ~IEEE80211_F_USEPROT;