diff options
author | sam <sam@FreeBSD.org> | 2007-11-23 06:14:32 +0000 |
---|---|---|
committer | sam <sam@FreeBSD.org> | 2007-11-23 06:14:32 +0000 |
commit | 47d976145ca8f4c519c892a1563915ad303461ca (patch) | |
tree | 2eeb3f7b65a069881d686cdaf751f0085df93286 /sys | |
parent | f8024545e2e30ea93e993f9f8e7acf2f7de8e481 (diff) | |
download | FreeBSD-src-47d976145ca8f4c519c892a1563915ad303461ca.zip FreeBSD-src-47d976145ca8f4c519c892a1563915ad303461ca.tar.gz |
correct sta mode setup: adopt ap's ampdu density and max ampdu size
instead of using local settings
MFC after: 3 days
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net80211/ieee80211_ht.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/net80211/ieee80211_ht.c b/sys/net80211/ieee80211_ht.c index 1cca85c1..aa855a4 100644 --- a/sys/net80211/ieee80211_ht.c +++ b/sys/net80211/ieee80211_ht.c @@ -1795,6 +1795,7 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee80211_node *ni) } while (0) struct ieee80211com *ic = ni->ni_ic; uint16_t caps; + int rxmax, density; /* HT capabilities */ caps = ic->ic_htcaps & 0xffff; @@ -1812,12 +1813,17 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee80211_node *ni) caps |= IEEE80211_HTCAP_CHWIDTH40; else caps &= ~IEEE80211_HTCAP_CHWIDTH40; + /* use advertised setting (XXX locally constraint) */ + rxmax = MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU); + density = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); } else { /* override 20/40 use based on current channel */ if (IEEE80211_IS_CHAN_HT40(ic->ic_bsschan)) caps |= IEEE80211_HTCAP_CHWIDTH40; else caps &= ~IEEE80211_HTCAP_CHWIDTH40; + rxmax = ic->ic_ampdu_rxmax; + density = ic->ic_ampdu_density; } /* adjust short GI based on channel and config */ if ((ic->ic_flags_ext & IEEE80211_FEXT_SHORTGI20) == 0) @@ -1828,8 +1834,8 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee80211_node *ni) ADDSHORT(frm, caps); /* HT parameters */ - *frm = SM(ic->ic_ampdu_rxmax, IEEE80211_HTCAP_MAXRXAMPDU) - | SM(ic->ic_ampdu_density, IEEE80211_HTCAP_MPDUDENSITY) + *frm = SM(rxmax, IEEE80211_HTCAP_MAXRXAMPDU) + | SM(density, IEEE80211_HTCAP_MPDUDENSITY) ; frm++; |