aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ath/ath9k/htc_drv_txrx.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index e602c9519709..c028df76b564 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -448,6 +448,7 @@ static void ath9k_htc_tx_process(struct ath9k_htc_priv *priv,
448 struct ieee80211_conf *cur_conf = &priv->hw->conf; 448 struct ieee80211_conf *cur_conf = &priv->hw->conf;
449 bool txok; 449 bool txok;
450 int slot; 450 int slot;
451 int hdrlen, padsize;
451 452
452 slot = strip_drv_header(priv, skb); 453 slot = strip_drv_header(priv, skb);
453 if (slot < 0) { 454 if (slot < 0) {
@@ -504,6 +505,15 @@ send_mac80211:
504 505
505 ath9k_htc_tx_clear_slot(priv, slot); 506 ath9k_htc_tx_clear_slot(priv, slot);
506 507
508 /* Remove padding before handing frame back to mac80211 */
509 hdrlen = ieee80211_get_hdrlen_from_skb(skb);
510
511 padsize = hdrlen & 3;
512 if (padsize && skb->len > hdrlen + padsize) {
513 memmove(skb->data + padsize, skb->data, hdrlen);
514 skb_pull(skb, padsize);
515 }
516
507 /* Send status to mac80211 */ 517 /* Send status to mac80211 */
508 ieee80211_tx_status(priv->hw, skb); 518 ieee80211_tx_status(priv->hw, skb);
509} 519}