An 11n athn hostap will currently apply HT protection (RTS) even when
sending frames to a non-11n client which does not need such protection.
This is causing unnecessary overhead.

It happens because the wrong flag is checked by the driver:
IEEE80211_F_HTON tells us if 11n is supported by the driver and enabled.
IEEE80211_NODE_HT tells us if 11n is being used with a particular peer.

RTS will still be used for frames larger than the RTS threshold, which
is another, and separate, indicator for enabling RTS.

Index: ar5008.c
===================================================================
RCS file: /cvs/src/sys/dev/ic/ar5008.c,v
retrieving revision 1.40
diff -u -p -r1.40 ar5008.c
--- ar5008.c    30 Jan 2017 09:42:14 -0000      1.40
+++ ar5008.c    30 Jan 2017 10:22:27 -0000
@@ -1511,7 +1511,7 @@ ar5008_tx(struct athn_softc *sc, struct 
                        ds->ds_ctl0 |= AR_TXC0_RTS_ENABLE;
                } else if (((ic->ic_flags & IEEE80211_F_USEPROT) &&
                    athn_rates[ridx[0]].phy == IEEE80211_T_OFDM) ||
-                   ((ic->ic_flags & IEEE80211_F_HTON) &&
+                   ((ni->ni_flags & IEEE80211_NODE_HT) &&
                    htprot != IEEE80211_HTPROT_NONE)) {
                        if (ic->ic_protmode == IEEE80211_PROT_RTSCTS)
                                ds->ds_ctl0 |= AR_TXC0_RTS_ENABLE;

Reply via email to