svn commit: r282704 - head/sys/net80211
Adrian Chadd
adrian at FreeBSD.org
Sun May 10 06:57:54 UTC 2015
Author: adrian
Date: Sun May 10 06:57:53 2015
New Revision: 282704
URL: https://svnweb.freebsd.org/changeset/base/282704
Log:
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
Modified:
head/sys/net80211/ieee80211_ht.c
Modified: head/sys/net80211/ieee80211_ht.c
==============================================================================
--- head/sys/net80211/ieee80211_ht.c Sun May 10 04:33:01 2015 (r282703)
+++ head/sys/net80211/ieee80211_ht.c Sun May 10 06:57:53 2015 (r282704)
@@ -2662,10 +2662,24 @@ ieee80211_add_htcap_body(uint8_t *frm, s
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, s
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;
More information about the svn-src-head
mailing list