Commit 6b127c71 authored by Sujith Manoharan's avatar Sujith Manoharan Committed by Johannes Berg

mac80211: Move IEEE80211_TX_CTL_PS_RESPONSE

Move IEEE80211_TX_CTL_PS_RESPONSE to info->control.flags since
this is used only in the TX path (by ath9k). This frees up
a bit which can be used for other purposes.
Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent ba1debdf
...@@ -2259,7 +2259,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -2259,7 +2259,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
struct ath_txq *txq = txctl->txq; struct ath_txq *txq = txctl->txq;
struct ath_atx_tid *tid = NULL; struct ath_atx_tid *tid = NULL;
struct ath_buf *bf; struct ath_buf *bf;
bool queue, skip_uapsd = false; bool queue, skip_uapsd = false, ps_resp;
int q, ret; int q, ret;
if (vif) if (vif)
...@@ -2268,6 +2268,8 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -2268,6 +2268,8 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN)
txctl->force_channel = true; txctl->force_channel = true;
ps_resp = !!(info->control.flags & IEEE80211_TX_CTRL_PS_RESPONSE);
ret = ath_tx_prepare(hw, skb, txctl); ret = ath_tx_prepare(hw, skb, txctl);
if (ret) if (ret)
return ret; return ret;
...@@ -2310,7 +2312,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, ...@@ -2310,7 +2312,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
if (txctl->an && queue) if (txctl->an && queue)
tid = ath_get_skb_tid(sc, txctl->an, skb); tid = ath_get_skb_tid(sc, txctl->an, skb);
if (!skip_uapsd && (info->flags & IEEE80211_TX_CTL_PS_RESPONSE)) { if (!skip_uapsd && ps_resp) {
ath_txq_unlock(sc, txq); ath_txq_unlock(sc, txq);
txq = sc->tx.uapsdq; txq = sc->tx.uapsdq;
ath_txq_lock(sc, txq); ath_txq_lock(sc, txq);
......
...@@ -505,8 +505,6 @@ struct ieee80211_bss_conf { ...@@ -505,8 +505,6 @@ struct ieee80211_bss_conf {
* @IEEE80211_TX_CTL_DONTFRAG: Don't fragment this packet even if it * @IEEE80211_TX_CTL_DONTFRAG: Don't fragment this packet even if it
* would be fragmented by size (this is optional, only used for * would be fragmented by size (this is optional, only used for
* monitor injection). * monitor injection).
* @IEEE80211_TX_CTL_PS_RESPONSE: This frame is a response to a poll
* frame (PS-Poll or uAPSD).
* *
* Note: If you have to add new flags to the enumeration, then don't * Note: If you have to add new flags to the enumeration, then don't
* forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
...@@ -542,7 +540,6 @@ enum mac80211_tx_info_flags { ...@@ -542,7 +540,6 @@ enum mac80211_tx_info_flags {
IEEE80211_TX_STATUS_EOSP = BIT(28), IEEE80211_TX_STATUS_EOSP = BIT(28),
IEEE80211_TX_CTL_USE_MINRATE = BIT(29), IEEE80211_TX_CTL_USE_MINRATE = BIT(29),
IEEE80211_TX_CTL_DONTFRAG = BIT(30), IEEE80211_TX_CTL_DONTFRAG = BIT(30),
IEEE80211_TX_CTL_PS_RESPONSE = BIT(31),
}; };
#define IEEE80211_TX_CTL_STBC_SHIFT 23 #define IEEE80211_TX_CTL_STBC_SHIFT 23
...@@ -552,11 +549,14 @@ enum mac80211_tx_info_flags { ...@@ -552,11 +549,14 @@ enum mac80211_tx_info_flags {
* *
* @IEEE80211_TX_CTRL_PORT_CTRL_PROTO: this frame is a port control * @IEEE80211_TX_CTRL_PORT_CTRL_PROTO: this frame is a port control
* protocol frame (e.g. EAP) * protocol frame (e.g. EAP)
* @IEEE80211_TX_CTRL_PS_RESPONSE: This frame is a response to a poll
* frame (PS-Poll or uAPSD).
* *
* These flags are used in tx_info->control.flags. * These flags are used in tx_info->control.flags.
*/ */
enum mac80211_tx_control_flags { enum mac80211_tx_control_flags {
IEEE80211_TX_CTRL_PORT_CTRL_PROTO = BIT(0), IEEE80211_TX_CTRL_PORT_CTRL_PROTO = BIT(0),
IEEE80211_TX_CTRL_PS_RESPONSE = BIT(1),
}; };
/* /*
......
...@@ -1243,10 +1243,11 @@ static void ieee80211_send_null_response(struct ieee80211_sub_if_data *sdata, ...@@ -1243,10 +1243,11 @@ static void ieee80211_send_null_response(struct ieee80211_sub_if_data *sdata,
* ends the poll/service period. * ends the poll/service period.
*/ */
info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER | info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER |
IEEE80211_TX_CTL_PS_RESPONSE |
IEEE80211_TX_STATUS_EOSP | IEEE80211_TX_STATUS_EOSP |
IEEE80211_TX_CTL_REQ_TX_STATUS; IEEE80211_TX_CTL_REQ_TX_STATUS;
info->control.flags |= IEEE80211_TX_CTRL_PS_RESPONSE;
if (call_driver) if (call_driver)
drv_allow_buffered_frames(local, sta, BIT(tid), 1, drv_allow_buffered_frames(local, sta, BIT(tid), 1,
reason, false); reason, false);
...@@ -1395,8 +1396,8 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta, ...@@ -1395,8 +1396,8 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta,
* STA may still remain is PS mode after this frame * STA may still remain is PS mode after this frame
* exchange. * exchange.
*/ */
info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER | info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
IEEE80211_TX_CTL_PS_RESPONSE; info->control.flags |= IEEE80211_TX_CTRL_PS_RESPONSE;
/* /*
* Use MoreData flag to indicate whether there are * Use MoreData flag to indicate whether there are
......
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