aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorRafał Miłecki <rafal@milecki.pl>2016-09-27 08:11:04 -0400
committerKalle Valo <kvalo@codeaurora.org>2016-09-27 11:47:55 -0400
commit7f00ee2bbc630900ba16fc2690473f3e2db0e264 (patch)
tree9c5e8605c23fe66806cd51b063a9ab4ba516a24f /drivers/net
parent2f0e56fa37cce60a5ac5d451bcadec51cd711436 (diff)
brcmfmac: use correct skb freeing helper when deleting flowring
Flowrings contain skbs waiting for transmission that were passed to us by netif. It means we checked every one of them looking for 802.1x Ethernet type. When deleting flowring we have to use freeing function that will check for 802.1x type as well. Freeing skbs without a proper check was leading to counter not being properly decreased. This was triggering a WARNING every time brcmf_netdev_wait_pend8021x was called. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Arend van Spriel <arend@broadcom.com> Cc: stable@vger.kernel.org # 4.5+ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c
index b16b367b0569..d0b738da2458 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/flowring.c
@@ -234,13 +234,20 @@ static void brcmf_flowring_block(struct brcmf_flowring *flow, u16 flowid,
234 234
235void brcmf_flowring_delete(struct brcmf_flowring *flow, u16 flowid) 235void brcmf_flowring_delete(struct brcmf_flowring *flow, u16 flowid)
236{ 236{
237 struct brcmf_bus *bus_if = dev_get_drvdata(flow->dev);
237 struct brcmf_flowring_ring *ring; 238 struct brcmf_flowring_ring *ring;
239 struct brcmf_if *ifp;
238 u16 hash_idx; 240 u16 hash_idx;
241 u8 ifidx;
239 struct sk_buff *skb; 242 struct sk_buff *skb;
240 243
241 ring = flow->rings[flowid]; 244 ring = flow->rings[flowid];
242 if (!ring) 245 if (!ring)
243 return; 246 return;
247
248 ifidx = brcmf_flowring_ifidx_get(flow, flowid);
249 ifp = brcmf_get_ifp(bus_if->drvr, ifidx);
250
244 brcmf_flowring_block(flow, flowid, false); 251 brcmf_flowring_block(flow, flowid, false);
245 hash_idx = ring->hash_id; 252 hash_idx = ring->hash_id;
246 flow->hash[hash_idx].ifidx = BRCMF_FLOWRING_INVALID_IFIDX; 253 flow->hash[hash_idx].ifidx = BRCMF_FLOWRING_INVALID_IFIDX;
@@ -249,7 +256,7 @@ void brcmf_flowring_delete(struct brcmf_flowring *flow, u16 flowid)
249 256
250 skb = skb_dequeue(&ring->skblist); 257 skb = skb_dequeue(&ring->skblist);
251 while (skb) { 258 while (skb) {
252 brcmu_pkt_buf_free_skb(skb); 259 brcmf_txfinalize(ifp, skb, false);
253 skb = skb_dequeue(&ring->skblist); 260 skb = skb_dequeue(&ring->skblist);
254 } 261 }
255 262