summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArend van Spriel <arend@broadcom.com>2013-04-03 12:40:36 +0200
committerJohn W. Linville <linville@tuxdriver.com>2013-04-03 15:07:05 -0400
commita3e993c78631b918f26db38605678889e3a5e964 (patch)
treeb0f7b5de7c3b14e1c0829b0055c40872de3577ee /drivers
parentebb93883cf4c4ea0b44abab254ad35fd6236177b (diff)
downloadlwn-a3e993c78631b918f26db38605678889e3a5e964.tar.gz
lwn-a3e993c78631b918f26db38605678889e3a5e964.zip
brcmfmac: perform filtered firmware-signalling cleanup upon DEL_IF
When an interface is deleted make sure to cleanup all packet buffers related to that interface. Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com> Reviewed-by: Hante Meuleman <meuleman@broadcom.com> Reviewed-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')
-rw-r--r--drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
index eba510694cb6..b123a80b17cf 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
@@ -354,21 +354,31 @@ static void brcmf_fws_mac_desc_cleanup(struct brcmf_fws_mac_descriptor *entry,
}
}
+static bool brcmf_fws_ifidx_match(struct sk_buff *skb, void *arg)
+{
+ u32 ifidx = brcmf_skb_if_flags_get_field(skb, INDEX);
+ return ifidx == *(int *)arg;
+}
+
static void brcmf_fws_cleanup(struct brcmf_fws_info *fws, int ifidx)
{
int i;
struct brcmf_fws_mac_descriptor *table;
+ bool (*matchfn)(struct sk_buff *, void *) = NULL;
brcmf_dbg(TRACE, "enter: ifidx=%d\n", ifidx);
if (fws == NULL)
return;
+ if (ifidx != -1)
+ matchfn = brcmf_fws_ifidx_match;
+
/* cleanup individual nodes */
table = &fws->nodes[0];
for (i = 0; i < ARRAY_SIZE(fws->nodes); i++)
- brcmf_fws_mac_desc_cleanup(&table[i], NULL, ifidx);
+ brcmf_fws_mac_desc_cleanup(&table[i], matchfn, ifidx);
- brcmf_fws_mac_desc_cleanup(&fws->other, NULL, ifidx);
+ brcmf_fws_mac_desc_cleanup(&fws->other, matchfn, ifidx);
}
static int brcmf_fws_rssi_indicate(struct brcmf_fws_info *fws, s8 rssi)
@@ -678,5 +688,6 @@ void brcmf_fws_del_interface(struct brcmf_if *ifp)
ifp->fws_desc = NULL;
brcmf_fws_clear_mac_descriptor(entry);
+ brcmf_fws_cleanup(ifp->drvr->fws, ifp->ifidx);
kfree(entry);
}