aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorSujith Manoharan <Sujith.Manoharan@atheros.com>2011-02-20 21:19:00 -0500
committerJohn W. Linville <linville@tuxdriver.com>2011-02-23 16:25:27 -0500
commit2299423bd0e32ccef78bbf1d4075617e3fd6cfd3 (patch)
treeee833bc2169543439525784115a89b643976d738 /drivers/net
parent9a3d025be11a1da625f8a71636b55a3bd3718574 (diff)
ath9k_htc: Use VIF from the packet's control data
There is no need to use a locally stored reference. Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_txrx.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 6ddcf939aff..04d824863d9 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -232,6 +232,7 @@ static bool ath9k_htc_check_tx_aggr(struct ath9k_htc_priv *priv,
232void ath9k_tx_tasklet(unsigned long data) 232void ath9k_tx_tasklet(unsigned long data)
233{ 233{
234 struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *)data; 234 struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *)data;
235 struct ieee80211_vif *vif;
235 struct ieee80211_sta *sta; 236 struct ieee80211_sta *sta;
236 struct ieee80211_hdr *hdr; 237 struct ieee80211_hdr *hdr;
237 struct ieee80211_tx_info *tx_info; 238 struct ieee80211_tx_info *tx_info;
@@ -243,12 +244,16 @@ void ath9k_tx_tasklet(unsigned long data)
243 hdr = (struct ieee80211_hdr *) skb->data; 244 hdr = (struct ieee80211_hdr *) skb->data;
244 fc = hdr->frame_control; 245 fc = hdr->frame_control;
245 tx_info = IEEE80211_SKB_CB(skb); 246 tx_info = IEEE80211_SKB_CB(skb);
247 vif = tx_info->control.vif;
246 248
247 memset(&tx_info->status, 0, sizeof(tx_info->status)); 249 memset(&tx_info->status, 0, sizeof(tx_info->status));
248 250
251 if (!vif)
252 goto send_mac80211;
253
249 rcu_read_lock(); 254 rcu_read_lock();
250 255
251 sta = ieee80211_find_sta(priv->vif, hdr->addr1); 256 sta = ieee80211_find_sta(vif, hdr->addr1);
252 if (!sta) { 257 if (!sta) {
253 rcu_read_unlock(); 258 rcu_read_unlock();
254 ieee80211_tx_status(priv->hw, skb); 259 ieee80211_tx_status(priv->hw, skb);
@@ -278,6 +283,7 @@ void ath9k_tx_tasklet(unsigned long data)
278 283
279 rcu_read_unlock(); 284 rcu_read_unlock();
280 285
286 send_mac80211:
281 /* Send status to mac80211 */ 287 /* Send status to mac80211 */
282 ieee80211_tx_status(priv->hw, skb); 288 ieee80211_tx_status(priv->hw, skb);
283 } 289 }