EDCA ("Enhanced distributed channel access") was first introduced
in 802.11e and is also part of 802.11n.

Essentially, these parameters define how frame transmissions are timed.
They are not necessary to operate in pure 11a/b/g networks, but 11n clients
will typically pass these parameters to firmware.
Parameter values can, within certain boundaries, be configured by the AP.
Thus 11n APs always pass these parameters to clients during association.

Two tables we have in ieee80211_output.c define the set of default
values for all of 11a/b/g/n. There is one parameter set for clients,
and one set for APs. The AP set was already enabled for 11n hostap.

At the moment, some of our drivers use hardcoded values (e.g. rtwn(4)).
This diff enables the client EDCA parameter set, which will allow
getting rid of the hardcoded values in driver code.

ok?

Index: ieee80211_output.c
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_output.c,v
retrieving revision 1.114
diff -u -p -r1.114 ieee80211_output.c
--- ieee80211_output.c  9 Jan 2017 16:24:20 -0000       1.114
+++ ieee80211_output.c  30 Jan 2017 17:12:41 -0000
@@ -275,8 +275,7 @@ ieee80211_mgmt_output(struct ifnet *ifp,
  * 11G         15*     1023    (*) aCWmin(1)
  * 11N         15      1023
  */
-#if 0
-static const struct ieee80211_edca_ac_params
+const struct ieee80211_edca_ac_params
     ieee80211_edca_table[IEEE80211_MODE_MAX][EDCA_NUM_AC] = {
        [IEEE80211_MODE_11B] = {
                [EDCA_AC_BK] = { 5, 10, 7,   0 },
@@ -303,7 +302,6 @@ static const struct ieee80211_edca_ac_pa
                [EDCA_AC_VO] = { 2,  3, 2,  47 }
        },
 };
-#endif
 
 #ifndef IEEE80211_STA_ONLY
 const struct ieee80211_edca_ac_params
Index: ieee80211_var.h
===================================================================
RCS file: /cvs/src/sys/net80211/ieee80211_var.h,v
retrieving revision 1.75
diff -u -p -r1.75 ieee80211_var.h
--- ieee80211_var.h     9 Jan 2017 16:24:20 -0000       1.75
+++ ieee80211_var.h     30 Jan 2017 17:12:41 -0000
@@ -161,6 +161,8 @@ struct ieee80211_edca_ac_params {
 };
 
 extern const struct ieee80211_edca_ac_params
+           ieee80211_edca_table[IEEE80211_MODE_MAX][EDCA_NUM_AC];
+extern const struct ieee80211_edca_ac_params
            ieee80211_qap_edca_table[IEEE80211_MODE_MAX][EDCA_NUM_AC];
 
 #define IEEE80211_DEFRAG_SIZE  3       /* must be >= 3 according to spec */

Reply via email to