aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2014-12-10 10:56:10 -0500
committerJohannes Berg <johannes.berg@intel.com>2014-12-12 07:48:26 -0500
commit6b127c71fbdd3daacfd8b9f80b8e6ebfb70a889e (patch)
tree6773467e453784fc5d1c1b5b21ab656368b910c7
parentba1debdfed974f25aa598c283567878657b292ee (diff)
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: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c6
-rw-r--r--include/net/mac80211.h6
-rw-r--r--net/mac80211/sta_info.c7
3 files changed, 11 insertions, 8 deletions
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index e9bd02c2e844..4caee66e5f79 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2259,7 +2259,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
2259 struct ath_txq *txq = txctl->txq; 2259 struct ath_txq *txq = txctl->txq;
2260 struct ath_atx_tid *tid = NULL; 2260 struct ath_atx_tid *tid = NULL;
2261 struct ath_buf *bf; 2261 struct ath_buf *bf;
2262 bool queue, skip_uapsd = false; 2262 bool queue, skip_uapsd = false, ps_resp;
2263 int q, ret; 2263 int q, ret;
2264 2264
2265 if (vif) 2265 if (vif)
@@ -2268,6 +2268,8 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
2268 if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN) 2268 if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN)
2269 txctl->force_channel = true; 2269 txctl->force_channel = true;
2270 2270
2271 ps_resp = !!(info->control.flags & IEEE80211_TX_CTRL_PS_RESPONSE);
2272
2271 ret = ath_tx_prepare(hw, skb, txctl); 2273 ret = ath_tx_prepare(hw, skb, txctl);
2272 if (ret) 2274 if (ret)
2273 return ret; 2275 return ret;
@@ -2310,7 +2312,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
2310 if (txctl->an && queue) 2312 if (txctl->an && queue)
2311 tid = ath_get_skb_tid(sc, txctl->an, skb); 2313 tid = ath_get_skb_tid(sc, txctl->an, skb);
2312 2314
2313 if (!skip_uapsd && (info->flags & IEEE80211_TX_CTL_PS_RESPONSE)) { 2315 if (!skip_uapsd && ps_resp) {
2314 ath_txq_unlock(sc, txq); 2316 ath_txq_unlock(sc, txq);
2315 txq = sc->tx.uapsdq; 2317 txq = sc->tx.uapsdq;
2316 ath_txq_lock(sc, txq); 2318 ath_txq_lock(sc, txq);
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 58d719ddaa60..b36e60d4c518 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -505,8 +505,6 @@ struct ieee80211_bss_conf {
505 * @IEEE80211_TX_CTL_DONTFRAG: Don't fragment this packet even if it 505 * @IEEE80211_TX_CTL_DONTFRAG: Don't fragment this packet even if it
506 * would be fragmented by size (this is optional, only used for 506 * would be fragmented by size (this is optional, only used for
507 * monitor injection). 507 * monitor injection).
508 * @IEEE80211_TX_CTL_PS_RESPONSE: This frame is a response to a poll
509 * frame (PS-Poll or uAPSD).
510 * 508 *
511 * Note: If you have to add new flags to the enumeration, then don't 509 * Note: If you have to add new flags to the enumeration, then don't
512 * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary. 510 * forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
@@ -542,7 +540,6 @@ enum mac80211_tx_info_flags {
542 IEEE80211_TX_STATUS_EOSP = BIT(28), 540 IEEE80211_TX_STATUS_EOSP = BIT(28),
543 IEEE80211_TX_CTL_USE_MINRATE = BIT(29), 541 IEEE80211_TX_CTL_USE_MINRATE = BIT(29),
544 IEEE80211_TX_CTL_DONTFRAG = BIT(30), 542 IEEE80211_TX_CTL_DONTFRAG = BIT(30),
545 IEEE80211_TX_CTL_PS_RESPONSE = BIT(31),
546}; 543};
547 544
548#define IEEE80211_TX_CTL_STBC_SHIFT 23 545#define IEEE80211_TX_CTL_STBC_SHIFT 23
@@ -552,11 +549,14 @@ enum mac80211_tx_info_flags {
552 * 549 *
553 * @IEEE80211_TX_CTRL_PORT_CTRL_PROTO: this frame is a port control 550 * @IEEE80211_TX_CTRL_PORT_CTRL_PROTO: this frame is a port control
554 * protocol frame (e.g. EAP) 551 * protocol frame (e.g. EAP)
552 * @IEEE80211_TX_CTRL_PS_RESPONSE: This frame is a response to a poll
553 * frame (PS-Poll or uAPSD).
555 * 554 *
556 * These flags are used in tx_info->control.flags. 555 * These flags are used in tx_info->control.flags.
557 */ 556 */
558enum mac80211_tx_control_flags { 557enum mac80211_tx_control_flags {
559 IEEE80211_TX_CTRL_PORT_CTRL_PROTO = BIT(0), 558 IEEE80211_TX_CTRL_PORT_CTRL_PROTO = BIT(0),
559 IEEE80211_TX_CTRL_PS_RESPONSE = BIT(1),
560}; 560};
561 561
562/* 562/*
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index a42f5b2b024d..db8b07ac6b10 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1243,10 +1243,11 @@ static void ieee80211_send_null_response(struct ieee80211_sub_if_data *sdata,
1243 * ends the poll/service period. 1243 * ends the poll/service period.
1244 */ 1244 */
1245 info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER | 1245 info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER |
1246 IEEE80211_TX_CTL_PS_RESPONSE |
1247 IEEE80211_TX_STATUS_EOSP | 1246 IEEE80211_TX_STATUS_EOSP |
1248 IEEE80211_TX_CTL_REQ_TX_STATUS; 1247 IEEE80211_TX_CTL_REQ_TX_STATUS;
1249 1248
1249 info->control.flags |= IEEE80211_TX_CTRL_PS_RESPONSE;
1250
1250 if (call_driver) 1251 if (call_driver)
1251 drv_allow_buffered_frames(local, sta, BIT(tid), 1, 1252 drv_allow_buffered_frames(local, sta, BIT(tid), 1,
1252 reason, false); 1253 reason, false);
@@ -1395,8 +1396,8 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta,
1395 * STA may still remain is PS mode after this frame 1396 * STA may still remain is PS mode after this frame
1396 * exchange. 1397 * exchange.
1397 */ 1398 */
1398 info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER | 1399 info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
1399 IEEE80211_TX_CTL_PS_RESPONSE; 1400 info->control.flags |= IEEE80211_TX_CTRL_PS_RESPONSE;
1400 1401
1401 /* 1402 /*
1402 * Use MoreData flag to indicate whether there are 1403 * Use MoreData flag to indicate whether there are