aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2008-12-15 09:02:04 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-19 15:23:24 -0500
commitf7a276a625e0b980185d2eb8e8e3e9425a708bee (patch)
tree2fc8841c85f21f75b63876853c757d6adcbce9f9
parentda027ca00a48715364da9a94d4b663029add528d (diff)
ath9k: Remove MAC header pad before reporting TX status
Remove the possible MAC header pad before reporting TX status to mac80211. This pad is hardware specific operation and should not be exposed outside the driver. This fixes the frame body in monitor interfaces that could be used to check on TX status for transmitted frames. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/ath9k/xmit.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c
index d6d402c18934..3bfc3b90f256 100644
--- a/drivers/net/wireless/ath9k/xmit.c
+++ b/drivers/net/wireless/ath9k/xmit.c
@@ -106,6 +106,7 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
106 struct ieee80211_hw *hw = sc->hw; 106 struct ieee80211_hw *hw = sc->hw;
107 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb); 107 struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
108 struct ath_tx_info_priv *tx_info_priv = ATH_TX_INFO_PRIV(tx_info); 108 struct ath_tx_info_priv *tx_info_priv = ATH_TX_INFO_PRIV(tx_info);
109 int hdrlen, padsize;
109 110
110 DPRINTF(sc, ATH_DBG_XMIT, "TX complete: skb: %p\n", skb); 111 DPRINTF(sc, ATH_DBG_XMIT, "TX complete: skb: %p\n", skb);
111 112
@@ -135,6 +136,17 @@ static void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb,
135 rate_table->info[idx].ratecode & 0x7f; 136 rate_table->info[idx].ratecode & 0x7f;
136 } 137 }
137 138
139 hdrlen = ieee80211_get_hdrlen_from_skb(skb);
140 padsize = hdrlen & 3;
141 if (padsize && hdrlen >= 24) {
142 /*
143 * Remove MAC header padding before giving the frame back to
144 * mac80211.
145 */
146 memmove(skb->data + padsize, skb->data, hdrlen);
147 skb_pull(skb, padsize);
148 }
149
138 ieee80211_tx_status(hw, skb); 150 ieee80211_tx_status(hw, skb);
139} 151}
140 152