Commit 0eeb2b67 authored by Sara Sharon's avatar Sara Sharon Committed by Johannes Berg

mac80211: add an option for station management TXQ

We have a TXQ abstraction for non-data packets that need
powersave buffering. Since the AP cannot sleep, in case
of station we can use this TXQ for all management frames,
regardless if they are bufferable. Add HW flag to allow
that.
Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
Signed-off-by: default avatarLuca Coelho <luciano.coelho@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent add7453a
...@@ -2152,6 +2152,10 @@ struct ieee80211_txq { ...@@ -2152,6 +2152,10 @@ struct ieee80211_txq {
* but if the rate control is built-in then it must be set by the driver. * but if the rate control is built-in then it must be set by the driver.
* See also the documentation for that flag. * See also the documentation for that flag.
* *
* @IEEE80211_HW_STA_MMPDU_TXQ: use the extra non-TID per-station TXQ for all
* MMPDUs on station interfaces. This of course requires the driver to use
* TXQs to start with.
*
* @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays * @NUM_IEEE80211_HW_FLAGS: number of hardware flags, used for sizing arrays
*/ */
enum ieee80211_hw_flags { enum ieee80211_hw_flags {
...@@ -2199,6 +2203,7 @@ enum ieee80211_hw_flags { ...@@ -2199,6 +2203,7 @@ enum ieee80211_hw_flags {
IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP, IEEE80211_HW_DOESNT_SUPPORT_QOS_NDP,
IEEE80211_HW_BUFF_MMPDU_TXQ, IEEE80211_HW_BUFF_MMPDU_TXQ,
IEEE80211_HW_SUPPORTS_VHT_EXT_NSS_BW, IEEE80211_HW_SUPPORTS_VHT_EXT_NSS_BW,
IEEE80211_HW_STA_MMPDU_TXQ,
/* keep last, obviously */ /* keep last, obviously */
NUM_IEEE80211_HW_FLAGS NUM_IEEE80211_HW_FLAGS
......
...@@ -217,6 +217,7 @@ static const char *hw_flag_names[] = { ...@@ -217,6 +217,7 @@ static const char *hw_flag_names[] = {
FLAG(DOESNT_SUPPORT_QOS_NDP), FLAG(DOESNT_SUPPORT_QOS_NDP),
FLAG(BUFF_MMPDU_TXQ), FLAG(BUFF_MMPDU_TXQ),
FLAG(SUPPORTS_VHT_EXT_NSS_BW), FLAG(SUPPORTS_VHT_EXT_NSS_BW),
FLAG(STA_MMPDU_TXQ),
#undef FLAG #undef FLAG
}; };
......
...@@ -1251,7 +1251,8 @@ static struct txq_info *ieee80211_get_txq(struct ieee80211_local *local, ...@@ -1251,7 +1251,8 @@ static struct txq_info *ieee80211_get_txq(struct ieee80211_local *local,
if (unlikely(!ieee80211_is_data_present(hdr->frame_control))) { if (unlikely(!ieee80211_is_data_present(hdr->frame_control))) {
if ((!ieee80211_is_mgmt(hdr->frame_control) || if ((!ieee80211_is_mgmt(hdr->frame_control) ||
ieee80211_is_bufferable_mmpdu(hdr->frame_control)) && ieee80211_is_bufferable_mmpdu(hdr->frame_control) ||
vif->type == NL80211_IFTYPE_STATION) &&
sta && sta->uploaded) { sta && sta->uploaded) {
/* /*
* This will be NULL if the driver didn't set the * This will be NULL if the driver didn't set the
...@@ -1456,9 +1457,16 @@ void ieee80211_txq_init(struct ieee80211_sub_if_data *sdata, ...@@ -1456,9 +1457,16 @@ void ieee80211_txq_init(struct ieee80211_sub_if_data *sdata,
} }
if (tid == IEEE80211_NUM_TIDS) { if (tid == IEEE80211_NUM_TIDS) {
/* Drivers need to opt in to the bufferable MMPDU TXQ */ if (sdata->vif.type == NL80211_IFTYPE_STATION) {
if (!ieee80211_hw_check(&sdata->local->hw, BUFF_MMPDU_TXQ)) /* Drivers need to opt in to the management MPDU TXQ */
if (!ieee80211_hw_check(&sdata->local->hw,
STA_MMPDU_TXQ))
return;
} else if (!ieee80211_hw_check(&sdata->local->hw,
BUFF_MMPDU_TXQ)) {
/* Drivers need to opt in to the bufferable MMPDU TXQ */
return; return;
}
txqi->txq.ac = IEEE80211_AC_VO; txqi->txq.ac = IEEE80211_AC_VO;
} else { } else {
txqi->txq.ac = ieee80211_ac_from_tid(tid); txqi->txq.ac = ieee80211_ac_from_tid(tid);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment