summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
diff options
context:
space:
mode:
authorPiotr Haber <phaber@broadcom.com>2012-11-28 21:44:05 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-11-30 19:38:16 +0100
commitc4dea35e34f5f46e1701156153a09cce429d1ea9 (patch)
tree8548445b7d6e44c974a038ad146a07c26a5095f6 /drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
parentbrcm80211: update the MAINTAINERS file (diff)
downloadlinux-c4dea35e34f5f46e1701156153a09cce429d1ea9.tar.xz
linux-c4dea35e34f5f46e1701156153a09cce429d1ea9.zip
brcmsmac: handle packet drop during transmit correctly
The .tx() callback function can drop packets when there is no space in the DMA fifo. Propagate that information to caller and make sure the freed sk_buff reference is not accessed. Reviewed-by: Arend van Spriel <arend@broadcom.com> Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Signed-off-by: Piotr Haber <phaber@broadcom.com> Signed-off-by: Arend van Spriel <arend@broadcom.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 1710ccba8bac..f917d621acca 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -285,8 +285,8 @@ static void brcms_ops_tx(struct ieee80211_hw *hw,
kfree_skb(skb);
goto done;
}
- brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
- tx_info->rate_driver_data[0] = control->sta;
+ if (brcms_c_sendpkt_mac80211(wl->wlc, skb, hw))
+ tx_info->rate_driver_data[0] = control->sta;
done:
spin_unlock_bh(&wl->lock);
}