Linux wireless drivers development
 help / color / mirror / Atom feed
* [RFC 0/4] ath9k patches
@ 2014-09-24  4:37 Sujith Manoharan
  2014-09-24  4:37 ` [RFC 1/4] ath9k: Fix queue management Sujith Manoharan
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sujith Manoharan @ 2014-09-24  4:37 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

MCC fixes. Please review !

Sujith Manoharan (4):
  ath9k: Fix queue management
  ath9k: Use normal queues for offchannel frames
  ath9k: Fix force_channel usage for offchannel frames
  ath9k: Fix offchannel queuing

 drivers/net/wireless/ath/ath9k/xmit.c | 20 ++++++--------------
 1 file changed, 6 insertions(+), 14 deletions(-)

-- 
2.1.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [RFC 1/4] ath9k: Fix queue management
  2014-09-24  4:37 [RFC 0/4] ath9k patches Sujith Manoharan
@ 2014-09-24  4:37 ` Sujith Manoharan
  2014-09-24  4:37 ` [RFC 2/4] ath9k: Use normal queues for offchannel frames Sujith Manoharan
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Sujith Manoharan @ 2014-09-24  4:37 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Since we use IEEE80211_HW_QUEUE_CONTROL now, the
CAB/Offchannel queues are registered as the last
two queues. There is no need to check and reassign
the queues in the TX start()/done() routines.

CAB frames will not reach the tx() callback since
we set IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING and
pull the buffered frames during beacon transmission.
We also don't have a special HW queue for handling
off-channel frames.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/xmit.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 93ad31b..2c8327f 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -158,7 +158,6 @@ static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
 {
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ath_frame_info *fi = get_frame_info(skb);
-	int hw_queue;
 	int q = fi->txq;
 
 	if (q < 0)
@@ -168,10 +167,9 @@ static void ath_txq_skb_done(struct ath_softc *sc, struct ath_txq *txq,
 	if (WARN_ON(--txq->pending_frames < 0))
 		txq->pending_frames = 0;
 
-	hw_queue = (info->hw_queue >= sc->hw->queues - 2) ? q : info->hw_queue;
 	if (txq->stopped &&
 	    txq->pending_frames < sc->tx.txq_max_pending[q]) {
-		ieee80211_wake_queue(sc->hw, hw_queue);
+		ieee80211_wake_queue(sc->hw, info->hw_queue);
 		txq->stopped = false;
 	}
 }
@@ -2208,8 +2206,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	struct ath_atx_tid *tid = NULL;
 	struct ath_buf *bf;
 	bool queue;
-	int q, hw_queue;
-	int ret;
+	int q, ret;
 
 	if (vif)
 		avp = (void *)vif->drv_priv;
@@ -2228,14 +2225,13 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	 */
 
 	q = skb_get_queue_mapping(skb);
-	hw_queue = (info->hw_queue >= sc->hw->queues - 2) ? q : info->hw_queue;
 
 	ath_txq_lock(sc, txq);
 	if (txq == sc->tx.txq_map[q]) {
 		fi->txq = q;
 		if (++txq->pending_frames > sc->tx.txq_max_pending[q] &&
 		    !txq->stopped) {
-			ieee80211_stop_queue(sc->hw, hw_queue);
+			ieee80211_stop_queue(sc->hw, info->hw_queue);
 			txq->stopped = true;
 		}
 	}
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RFC 2/4] ath9k: Use normal queues for offchannel frames
  2014-09-24  4:37 [RFC 0/4] ath9k patches Sujith Manoharan
  2014-09-24  4:37 ` [RFC 1/4] ath9k: Fix queue management Sujith Manoharan
@ 2014-09-24  4:37 ` Sujith Manoharan
  2014-09-24  4:37 ` [RFC 3/4] ath9k: Fix force_channel usage " Sujith Manoharan
  2014-09-24  4:37 ` [RFC 4/4] ath9k: Fix offchannel queuing Sujith Manoharan
  3 siblings, 0 replies; 6+ messages in thread
From: Sujith Manoharan @ 2014-09-24  4:37 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

There is no reason why frames marked with
IEEE80211_TX_CTL_TX_OFFCHAN have to be sent using
the UAPSD queue. Since mac80211 makes sure that
RoC is done before pushing an offchannel frame
to the driver, we can use the normal TX queues
for transmission.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/xmit.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 2c8327f..00931b6 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2253,8 +2253,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	if (txctl->an && queue)
 		tid = ath_get_skb_tid(sc, txctl->an, skb);
 
-	if (info->flags & (IEEE80211_TX_CTL_PS_RESPONSE |
-			   IEEE80211_TX_CTL_TX_OFFCHAN)) {
+	if (info->flags & IEEE80211_TX_CTL_PS_RESPONSE) {
 		ath_txq_unlock(sc, txq);
 		txq = sc->tx.uapsdq;
 		ath_txq_lock(sc, txq);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RFC 3/4] ath9k: Fix force_channel usage for offchannel frames
  2014-09-24  4:37 [RFC 0/4] ath9k patches Sujith Manoharan
  2014-09-24  4:37 ` [RFC 1/4] ath9k: Fix queue management Sujith Manoharan
  2014-09-24  4:37 ` [RFC 2/4] ath9k: Use normal queues for offchannel frames Sujith Manoharan
@ 2014-09-24  4:37 ` Sujith Manoharan
  2014-09-24  5:49   ` Sujith Manoharan
  2014-09-24  4:37 ` [RFC 4/4] ath9k: Fix offchannel queuing Sujith Manoharan
  3 siblings, 1 reply; 6+ messages in thread
From: Sujith Manoharan @ 2014-09-24  4:37 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Since RoC is done before frames marked with
IEEE80211_TX_CTL_TX_OFFCHAN are received by the driver,
setting force_channel is useless. We will be in
the required offchannel, so incoming frames can
be transmitted immediately.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/xmit.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 00931b6..4d00f59 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2211,9 +2211,6 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	if (vif)
 		avp = (void *)vif->drv_priv;
 
-	if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN)
-		txctl->force_channel = true;
-
 	ret = ath_tx_prepare(hw, skb, txctl);
 	if (ret)
 	    return ret;
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [RFC 4/4] ath9k: Fix offchannel queuing
  2014-09-24  4:37 [RFC 0/4] ath9k patches Sujith Manoharan
                   ` (2 preceding siblings ...)
  2014-09-24  4:37 ` [RFC 3/4] ath9k: Fix force_channel usage " Sujith Manoharan
@ 2014-09-24  4:37 ` Sujith Manoharan
  3 siblings, 0 replies; 6+ messages in thread
From: Sujith Manoharan @ 2014-09-24  4:37 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Clearing IEEE80211_TX_CTL_PS_RESPONSE in a frame
that is not in the current context doesn't seem right.
Instead make sure that we don't add such frames
to the UAPSD queue by using a local variable.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/xmit.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 4d00f59..3e3a41c 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2205,7 +2205,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	struct ath_txq *txq = txctl->txq;
 	struct ath_atx_tid *tid = NULL;
 	struct ath_buf *bf;
-	bool queue;
+	bool queue, skip_uapsd;
 	int q, ret;
 
 	if (vif)
@@ -2243,14 +2243,14 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	     sc->cur_chan->stopped) && !txctl->force_channel) {
 		if (!txctl->an)
 			txctl->an = &avp->mcast_node;
-		info->flags &= ~IEEE80211_TX_CTL_PS_RESPONSE;
 		queue = true;
+		skip_uapsd = true;
 	}
 
 	if (txctl->an && queue)
 		tid = ath_get_skb_tid(sc, txctl->an, skb);
 
-	if (info->flags & IEEE80211_TX_CTL_PS_RESPONSE) {
+	if (!skip_uapsd && (info->flags & IEEE80211_TX_CTL_PS_RESPONSE)) {
 		ath_txq_unlock(sc, txq);
 		txq = sc->tx.uapsdq;
 		ath_txq_lock(sc, txq);
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [RFC 3/4] ath9k: Fix force_channel usage for offchannel frames
  2014-09-24  4:37 ` [RFC 3/4] ath9k: Fix force_channel usage " Sujith Manoharan
@ 2014-09-24  5:49   ` Sujith Manoharan
  0 siblings, 0 replies; 6+ messages in thread
From: Sujith Manoharan @ 2014-09-24  5:49 UTC (permalink / raw)
  To: linux-wireless; +Cc: ath9k-devel

Sujith Manoharan wrote:
> From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
> 
> Since RoC is done before frames marked with
> IEEE80211_TX_CTL_TX_OFFCHAN are received by the driver,
> setting force_channel is useless. We will be in
> the required offchannel, so incoming frames can
> be transmitted immediately.
> 
> Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
> ---
>  drivers/net/wireless/ath/ath9k/xmit.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
> index 00931b6..4d00f59 100644
> --- a/drivers/net/wireless/ath/ath9k/xmit.c
> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
> @@ -2211,9 +2211,6 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
>  	if (vif)
>  		avp = (void *)vif->drv_priv;
>  
> -	if (info->flags & IEEE80211_TX_CTL_TX_OFFCHAN)
> -		txctl->force_channel = true;
> -
>  	ret = ath_tx_prepare(hw, skb, txctl);
>  	if (ret)
>  	    return ret;

This breaks things, so this patch can be dropped.

Sujith

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-09-24  5:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-24  4:37 [RFC 0/4] ath9k patches Sujith Manoharan
2014-09-24  4:37 ` [RFC 1/4] ath9k: Fix queue management Sujith Manoharan
2014-09-24  4:37 ` [RFC 2/4] ath9k: Use normal queues for offchannel frames Sujith Manoharan
2014-09-24  4:37 ` [RFC 3/4] ath9k: Fix force_channel usage " Sujith Manoharan
2014-09-24  5:49   ` Sujith Manoharan
2014-09-24  4:37 ` [RFC 4/4] ath9k: Fix offchannel queuing Sujith Manoharan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox