Attempt to address Bug #176201 - don't advertise what the AP announced
to us. Instead, advertise what we can do based on what the AP says and what we're capped at by the VAP settings. For non-STA modes we still advertise what our VAP settings are. It may be that I've over-complicated this and instead of capping things we can just always announce what we're capable of. But this should at least stop the blatantly wrong handling of A-MPDU parameters. (I'll happily simplify things if someone can dig up a replacement, better compliant behaviour.) PR: kern/176201
This commit is contained in:
parent
45bf6d59de
commit
3265af355a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=282704
@ -2662,10 +2662,24 @@ 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) */
|
||||
|
||||
/* Start by using the advertised settings */
|
||||
rxmax = MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU);
|
||||
density = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY);
|
||||
|
||||
/* Cap at VAP rxmax */
|
||||
if (rxmax > vap->iv_ampdu_rxmax)
|
||||
rxmax = vap->iv_ampdu_rxmax;
|
||||
|
||||
/*
|
||||
* If the VAP ampdu density value greater, use that.
|
||||
*
|
||||
* (Larger density value == larger minimum gap between A-MPDU
|
||||
* subframes.)
|
||||
*/
|
||||
if (vap->iv_ampdu_density > density)
|
||||
density = vap->iv_ampdu_density;
|
||||
|
||||
/*
|
||||
* NB: Hardware might support HT40 on some but not all
|
||||
* channels. We can't determine this earlier because only
|
||||
@ -2682,9 +2696,12 @@ ieee80211_add_htcap_body(uint8_t *frm, struct ieee80211_node *ni)
|
||||
caps |= IEEE80211_HTCAP_CHWIDTH40;
|
||||
else
|
||||
caps &= ~IEEE80211_HTCAP_CHWIDTH40;
|
||||
|
||||
/* XXX TODO should it start by using advertised settings? */
|
||||
rxmax = vap->iv_ampdu_rxmax;
|
||||
density = vap->iv_ampdu_density;
|
||||
}
|
||||
|
||||
/* adjust short GI based on channel and config */
|
||||
if ((vap->iv_flags_ht & IEEE80211_FHT_SHORTGI20) == 0)
|
||||
caps &= ~IEEE80211_HTCAP_SHORTGI20;
|
||||
|
Loading…
Reference in New Issue
Block a user