aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/tx.c
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2011-02-27 17:16:13 -0500
committerLuciano Coelho <coelho@ti.com>2011-03-03 09:10:45 -0500
commit50e9f746f63c9b881f2ca4a35dbdfd34b1a8a215 (patch)
treeb0d81cbf3fc53f8535f114712106b336b8b7a4d4 /drivers/net/wireless/wl12xx/tx.c
parent11251e7e5c7c5411d1f77dbc7f9bfa2c23626749 (diff)
wl12xx: Remove private headers in wl1271_tx_reset
Frames in the tx_frames array include extra private headers, which must be removed before passing the skbs to ieee80211_tx_status. Fix this by removing any private headers in wl1271_tx_reset, similar to how this is done in wl1271_tx_complete_packet. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Arik Nemtsov <arik@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/tx.c')
-rw-r--r--drivers/net/wireless/wl12xx/tx.c32
1 files changed, 23 insertions, 9 deletions
diff --git a/drivers/net/wireless/wl12xx/tx.c b/drivers/net/wireless/wl12xx/tx.c
index ac60d577319f..37d354ddd58e 100644
--- a/drivers/net/wireless/wl12xx/tx.c
+++ b/drivers/net/wireless/wl12xx/tx.c
@@ -687,16 +687,30 @@ void wl1271_tx_reset(struct wl1271 *wl)
687 */ 687 */
688 wl1271_handle_tx_low_watermark(wl); 688 wl1271_handle_tx_low_watermark(wl);
689 689
690 for (i = 0; i < ACX_TX_DESCRIPTORS; i++) 690 for (i = 0; i < ACX_TX_DESCRIPTORS; i++) {
691 if (wl->tx_frames[i] != NULL) { 691 if (wl->tx_frames[i] == NULL)
692 skb = wl->tx_frames[i]; 692 continue;
693 wl1271_free_tx_id(wl, i); 693
694 wl1271_debug(DEBUG_TX, "freeing skb 0x%p", skb); 694 skb = wl->tx_frames[i];
695 info = IEEE80211_SKB_CB(skb); 695 wl1271_free_tx_id(wl, i);
696 info->status.rates[0].idx = -1; 696 wl1271_debug(DEBUG_TX, "freeing skb 0x%p", skb);
697 info->status.rates[0].count = 0; 697
698 ieee80211_tx_status(wl->hw, skb); 698 /* Remove private headers before passing the skb to mac80211 */
699 info = IEEE80211_SKB_CB(skb);
700 skb_pull(skb, sizeof(struct wl1271_tx_hw_descr));
701 if (info->control.hw_key &&
702 info->control.hw_key->cipher == WLAN_CIPHER_SUITE_TKIP) {
703 int hdrlen = ieee80211_get_hdrlen_from_skb(skb);
704 memmove(skb->data + WL1271_TKIP_IV_SPACE, skb->data,
705 hdrlen);
706 skb_pull(skb, WL1271_TKIP_IV_SPACE);
699 } 707 }
708
709 info->status.rates[0].idx = -1;
710 info->status.rates[0].count = 0;
711
712 ieee80211_tx_status(wl->hw, skb);
713 }
700} 714}
701 715
702#define WL1271_TX_FLUSH_TIMEOUT 500000 716#define WL1271_TX_FLUSH_TIMEOUT 500000