Linux wireless drivers development
 help / color / mirror / Atom feed
From: "Luis R. Rodriguez" <lrodriguez@atheros.com>
To: linux-wireless@vger.kernel.org
Cc: ath9k-devel@lists.ath9k.org,
	"Luis R. Rodriguez" <lrodriguez@atheros.com>,
	"Jouni.Malinen" <Jouni.Malinen@atheros.com>
Subject: [RFT 6/9] ath9k: use correct hw for tx aggregation TX completion
Date: Mon,  2 Nov 2009 22:07:58 -0500	[thread overview]
Message-ID: <1257217681-27180-7-git-send-email-lrodriguez@atheros.com> (raw)
In-Reply-To: <1257217681-27180-1-git-send-email-lrodriguez@atheros.com>

When ath9k virtual wiphys are used the sc->hw will not always represent
the active hw, instead we need to get it from the skb->cb private
driver area. This ensures the right hw is used to find a sta for
the TX'd skb.

Cc: Jouni.Malinen <Jouni.Malinen@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
---
 drivers/net/wireless/ath/ath9k/xmit.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 2a4efcb..5d0851b 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -267,7 +267,10 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
 	struct ath_node *an = NULL;
 	struct sk_buff *skb;
 	struct ieee80211_sta *sta;
+	struct ieee80211_hw *hw;
 	struct ieee80211_hdr *hdr;
+	struct ieee80211_tx_info *tx_info;
+	struct ath_tx_info_priv *tx_info_priv;
 	struct ath_atx_tid *tid = NULL;
 	struct ath_buf *bf_next, *bf_last = bf->bf_lastbf;
 	struct ath_desc *ds = bf_last->bf_desc;
@@ -280,9 +283,13 @@ static void ath_tx_complete_aggr(struct ath_softc *sc, struct ath_txq *txq,
 	skb = bf->bf_mpdu;
 	hdr = (struct ieee80211_hdr *)skb->data;
 
+	tx_info = IEEE80211_SKB_CB(skb);
+	tx_info_priv = (struct ath_tx_info_priv *) tx_info->rate_driver_data[0];
+	hw = tx_info_priv->aphy->hw;
+
 	rcu_read_lock();
 
-	sta = ieee80211_find_sta(sc->hw, hdr->addr1);
+	sta = ieee80211_find_sta(hw, hdr->addr1);
 	if (!sta) {
 		rcu_read_unlock();
 		return;
-- 
1.6.5.2.143.g8cc62


  parent reply	other threads:[~2009-11-03  3:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-03  3:07 [RFT 0/9] ath9k: few updates for virtual wiphy Luis R. Rodriguez
2009-11-03  3:07 ` [RFT 1/9] ath9k: fix listening to idle requests Luis R. Rodriguez
2009-11-03  3:07 ` [RFT 2/9] ath9k: update hw configuration for virtual wiphys Luis R. Rodriguez
2009-11-03  3:07 ` [RFT 3/9] ath9k: simpify RX by calling ath_get_virt_hw() once Luis R. Rodriguez
2009-11-03  3:07 ` [RFT 4/9] ath9k: use the passed ieee80211_hw on ath_rx_prepare() Luis R. Rodriguez
2009-11-03  3:07 ` [RFT 5/9] ath9k: pass the ieee80211_hw on radio enable/disable Luis R. Rodriguez
2009-11-03  3:07 ` Luis R. Rodriguez [this message]
2009-11-03  3:07 ` [RFT 7/9] ath9k: use the right hw on ath_tx_setup_buffer() for HT Luis R. Rodriguez
2009-11-03  3:08 ` [RFT 8/9] ath9k: handle low buffer space for virtual wiphys Luis R. Rodriguez
2009-11-03  3:08 ` [RFT 9/9] ath9k: do not pass the entire descriptor to ath_rx_prepare() Luis R. Rodriguez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1257217681-27180-7-git-send-email-lrodriguez@atheros.com \
    --to=lrodriguez@atheros.com \
    --cc=Jouni.Malinen@atheros.com \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox