Discussion:
honour ERP protection in 11n mode
Stefan Sperling
2016-01-25 13:50:29 UTC
Permalink
ERP (Extended Rate PHY) protection must be honoured in 11n mode
on 2 GHz channels.

From an 11b client's point of view, 11n behaves like 11g in terms
of frame protection, and we must enable ERP protection in 11n mode
if requested by the AP.
The drivers already enable ERP protection if IEEE80211_F_USEPROT is set,
even in 11n mode. But the stack doesn't yet set this flag in 11n mode.

Note that ERP protection is called "TGG protection" in iwn/iwm driver
code. TGG expands to "Task Group G" after the IEEE task group which
worked on 802.11g.

Index: ieee80211_input.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_input.c,v
retrieving revision 1.152
diff -u -p -r1.152 ieee80211_input.c
--- ieee80211_input.c 25 Jan 2016 11:27:11 -0000 1.152
+++ ieee80211_input.c 25 Jan 2016 13:32:29 -0000
@@ -2299,7 +2299,9 @@ ieee80211_recv_assoc_resp(struct ieee802
/*
* Honor ERP protection.
*/
- 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))) &&
(ni->ni_erp & IEEE80211_ERP_USE_PROTECTION))
ic->ic_flags |= IEEE80211_F_USEPROT;
else
Index: ieee80211_node.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_node.c,v
retrieving revision 1.97
diff -u -p -r1.97 ieee80211_node.c
--- ieee80211_node.c 7 Jan 2016 23:22:31 -0000 1.97
+++ ieee80211_node.c 25 Jan 2016 13:32:29 -0000
@@ -1515,7 +1515,9 @@ ieee80211_node_join(struct ieee80211com
ni->ni_associd = aid | 0xc000;
IEEE80211_AID_SET(ni->ni_associd, ic->ic_aid_bitmap);
newassoc = 1;
- if (ic->ic_curmode == IEEE80211_MODE_11G)
+ if (ic->ic_curmode == IEEE80211_MODE_11G ||
+ (ic->ic_curmode == IEEE80211_MODE_11N &&
+ IEEE80211_IS_CHAN_2GHZ(ic->ic_bss->ni_chan)))
ieee80211_node_join_11g(ic, ni);
} else
newassoc = 0;
@@ -1682,7 +1684,9 @@ ieee80211_node_leave(struct ieee80211com
if (ic->ic_flags & IEEE80211_F_RSNON)
ieee80211_node_leave_rsn(ic, ni);

- if (ic->ic_curmode == IEEE80211_MODE_11G)
+ if (ic->ic_curmode == IEEE80211_MODE_11G ||
+ (ic->ic_curmode == IEEE80211_MODE_11N &&
+ IEEE80211_IS_CHAN_2GHZ(ic->ic_bss->ni_chan)))
ieee80211_node_leave_11g(ic, ni);

if (ni->ni_flags & IEEE80211_NODE_HT)

Loading...