]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
rsi: Remove internal header from Tx status skb
authorPrameela Rani Garnepudi <prameela.j04cs@gmail.com>
Mon, 10 Jul 2017 12:40:46 +0000 (18:10 +0530)
committerKalle Valo <kvalo@codeaurora.org>
Fri, 28 Jul 2017 14:25:44 +0000 (17:25 +0300)
Device specific descriptor for each TX packet is prepared on top of
skb data address. This descriptor should be pulled out before
indicating the TX status to mac80211.

Signed-off-by: Prameela Rani Garnepudi <prameela.j04cs@gmail.com>
Signed-off-by: Amitkumar Karwar <amit.karwar@redpinesignals.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
drivers/net/wireless/rsi/rsi_91x_mac80211.c

index 021e5ac5f1073c2d3ba98815359ea3f88f8ef514..36303ae820af4b69b86983c163141db8f13a0968 100644 (file)
@@ -229,12 +229,20 @@ void rsi_indicate_tx_status(struct rsi_hw *adapter,
                            int status)
 {
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
+       struct skb_info *tx_params;
 
-       memset(info->driver_data, 0, IEEE80211_TX_INFO_DRIVER_DATA_SIZE);
+       if (!adapter->hw) {
+               rsi_dbg(ERR_ZONE, "##### No MAC #####\n");
+               return;
+       }
 
        if (!status)
                info->flags |= IEEE80211_TX_STAT_ACK;
 
+       tx_params = (struct skb_info *)info->driver_data;
+       skb_pull(skb, tx_params->internal_hdr_size);
+       memset(info->driver_data, 0, IEEE80211_TX_INFO_DRIVER_DATA_SIZE);
+
        ieee80211_tx_status_irqsafe(adapter->hw, skb);
 }