mac80211: allow drivers to set default uAPSD parameters
authorAlexander Bondar <alexander.bondar@intel.com>
Tue, 22 Jan 2013 14:52:23 +0000 (16:52 +0200)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 25 Mar 2013 13:43:05 +0000 (14:43 +0100)
mac80211 currently sets uAPSD parameters to have VO AC trigger-
and delivery-enabled, with maximum service period length.

Allow drivers to change these default settings since different
uAPSD client implementations may handle errors differently and
be able to recover from some errors.

Note: some APs may not function correctly if one or all ACs are
trigger- and delivery-enabled, see
http://thread.gmane.org/gmane.linux.kernel.wireless.general/93577.
We retested with this AP and later firmware doesn't have this
bug any more.

Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
include/net/mac80211.h
net/mac80211/main.c
net/mac80211/mlme.c

index 9b536172e27ece0ea353c89bcb3d320af6bdb017..23a275a9a3b26e55a2bc0d5272357251a856695e 100644 (file)
@@ -1534,6 +1534,17 @@ enum ieee80211_hw_flags {
  * @netdev_features: netdev features to be set in each netdev created
  *     from this HW. Note only HW checksum features are currently
  *     compatible with mac80211. Other feature bits will be rejected.
+ *
+ * @uapsd_queues: This bitmap is included in (re)association frame to indicate
+ *     for each access category if it is uAPSD trigger-enabled and delivery-
+ *     enabled. Use IEEE80211_WMM_IE_STA_QOSINFO_AC_* to set this bitmap.
+ *     Each bit corresponds to different AC. Value '1' in specific bit means
+ *     that corresponding AC is both trigger- and delivery-enabled. '0' means
+ *     neither enabled.
+ *
+ * @uapsd_max_sp_len: maximum number of total buffered frames the WMM AP may
+ *     deliver to a WMM STA during any Service Period triggered by the WMM STA.
+ *     Use IEEE80211_WMM_IE_STA_QOSINFO_SP_* for correct values.
  */
 struct ieee80211_hw {
        struct ieee80211_conf conf;
@@ -1559,6 +1570,8 @@ struct ieee80211_hw {
        u8 radiotap_mcs_details;
        u16 radiotap_vht_details;
        netdev_features_t netdev_features;
+       u8 uapsd_queues;
+       u8 uapsd_max_sp_len;
 };
 
 /**
index c6f81ecc36a15bd0375aaeaef0ac5f85e4afc575..b0d286821864bd0bfe777336fe2b2002f3f90a10 100644 (file)
@@ -587,6 +587,8 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
                                         IEEE80211_RADIOTAP_MCS_HAVE_BW;
        local->hw.radiotap_vht_details = IEEE80211_RADIOTAP_VHT_KNOWN_GI |
                                         IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH;
+       local->hw.uapsd_queues = IEEE80211_DEFAULT_UAPSD_QUEUES;
+       local->hw.uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;
        local->user_power_level = IEEE80211_UNSET_POWER_LEVEL;
        wiphy->ht_capa_mod_mask = &mac80211_ht_capa_mod_mask;
        wiphy->vht_capa_mod_mask = &mac80211_vht_capa_mod_mask;
index 8b3e852d6032200d6d4b8674466069547f482bcc..9958cb7df8f16ae2b148cdaeb6915d08b3af504e 100644 (file)
@@ -3525,8 +3525,8 @@ void ieee80211_sta_setup_sdata(struct ieee80211_sub_if_data *sdata)
 
        ifmgd->flags = 0;
        ifmgd->powersave = sdata->wdev.ps;
-       ifmgd->uapsd_queues = IEEE80211_DEFAULT_UAPSD_QUEUES;
-       ifmgd->uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;
+       ifmgd->uapsd_queues = sdata->local->hw.uapsd_queues;
+       ifmgd->uapsd_max_sp_len = sdata->local->hw.uapsd_max_sp_len;
        ifmgd->p2p_noa_index = -1;
 
        mutex_init(&ifmgd->mtx);
This page took 0.03448 seconds and 5 git commands to generate.