Author: bschmidt Date: Sat Jun 4 15:05:32 2011 New Revision: 222683 URL: http://svn.freebsd.org/changeset/base/222683
Log: Certain adapters have HT40 support on some but not all channels. The Intel 4965 devices for example have HT40 on 2GHz completely disabled but it is still supported for 5GHz. To handle that in sta mode we need to check if we can "upgrade" to a HT40 channel after the association, if that is not possible but we are still announcing support to the remote side we are left with a very flabby connection. Reviewed by: adrian Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Sat Jun 4 14:28:09 2011 (r222682) +++ head/sys/net80211/ieee80211_ht.c Sat Jun 4 15:05:32 2011 (r222683) @@ -2520,6 +2520,7 @@ ieee80211_add_htcap_body(uint8_t *frm, s frm[1] = (v) >> 8; \ frm += 2; \ } while (0) + struct ieee80211com *ic = ni->ni_ic; struct ieee80211vap *vap = ni->ni_vap; uint16_t caps, extcaps; int rxmax, density; @@ -2543,6 +2544,17 @@ ieee80211_add_htcap_body(uint8_t *frm, s /* use advertised setting (XXX locally constraint) */ rxmax = MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU); density = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); + + /* + * NB: Hardware might support HT40 on some but not all + * channels. We can't determine this earlier because only + * after association the channel is upgraded to HT based + * on the negotiated capabilities. + */ + if (ni->ni_chan != IEEE80211_CHAN_ANYC && + findhtchan(ic, ni->ni_chan, IEEE80211_CHAN_HT40U) == NULL && + findhtchan(ic, ni->ni_chan, IEEE80211_CHAN_HT40D) == NULL) + caps &= ~IEEE80211_HTCAP_CHWIDTH40; } else { /* override 20/40 use based on current channel */ if (IEEE80211_IS_CHAN_HT40(ni->ni_chan)) _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"