Skip to content
Snippets Groups Projects
Commit 7f00ee2b authored by Rafał Miłecki's avatar Rafał Miłecki Committed by Kalle Valo
Browse files

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: default avatarRafał Miłecki <rafal@milecki.pl>
Acked-by: default avatarArend van Spriel <arend@broadcom.com>
Cc: stable@vger.kernel.org # 4.5+
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 2f0e56fa
No related branches found
No related tags found
No related merge requests found
...@@ -234,13 +234,20 @@ static void brcmf_flowring_block(struct brcmf_flowring *flow, u16 flowid, ...@@ -234,13 +234,20 @@ static void brcmf_flowring_block(struct brcmf_flowring *flow, u16 flowid,
void brcmf_flowring_delete(struct brcmf_flowring *flow, u16 flowid) void brcmf_flowring_delete(struct brcmf_flowring *flow, u16 flowid)
{ {
struct brcmf_bus *bus_if = dev_get_drvdata(flow->dev);
struct brcmf_flowring_ring *ring; struct brcmf_flowring_ring *ring;
struct brcmf_if *ifp;
u16 hash_idx; u16 hash_idx;
u8 ifidx;
struct sk_buff *skb; struct sk_buff *skb;
ring = flow->rings[flowid]; ring = flow->rings[flowid];
if (!ring) if (!ring)
return; return;
ifidx = brcmf_flowring_ifidx_get(flow, flowid);
ifp = brcmf_get_ifp(bus_if->drvr, ifidx);
brcmf_flowring_block(flow, flowid, false); brcmf_flowring_block(flow, flowid, false);
hash_idx = ring->hash_id; hash_idx = ring->hash_id;
flow->hash[hash_idx].ifidx = BRCMF_FLOWRING_INVALID_IFIDX; flow->hash[hash_idx].ifidx = BRCMF_FLOWRING_INVALID_IFIDX;
...@@ -249,7 +256,7 @@ void brcmf_flowring_delete(struct brcmf_flowring *flow, u16 flowid) ...@@ -249,7 +256,7 @@ void brcmf_flowring_delete(struct brcmf_flowring *flow, u16 flowid)
skb = skb_dequeue(&ring->skblist); skb = skb_dequeue(&ring->skblist);
while (skb) { while (skb) {
brcmu_pkt_buf_free_skb(skb); brcmf_txfinalize(ifp, skb, false);
skb = skb_dequeue(&ring->skblist); skb = skb_dequeue(&ring->skblist);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment