From: Arend van Spriel <arend.vanspriel@broadcom.com>
To: Kalle Valo <kvalo@codeaurora.org>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Franky Lin <franky.lin@broadcom.com>,
Arend van Spriel <arend.vanspriel@broadcom.com>
Subject: [PATCH 4/5] brcmfmac: wrap brcmf_fws_del_interface into bcdc layer
Date: Fri, 10 Mar 2017 21:17:05 +0000 [thread overview]
Message-ID: <1489180626-6722-5-git-send-email-arend.vanspriel@broadcom.com> (raw)
In-Reply-To: <1489180626-6722-1-git-send-email-arend.vanspriel@broadcom.com>
From: Franky Lin <franky.lin@broadcom.com>
Create a new protocol interface function brcmf_proto_del_if for core
module to notify protocol layer upon interface deletion.
Signed-off-by: Franky Lin <franky.lin@broadcom.com>
Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
---
drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c | 7 +++++++
drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c | 4 ++--
drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h | 9 +++++++++
3 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
index 2e678a3..ae04125 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bcdc.c
@@ -405,6 +405,12 @@ static void brcmf_proto_bcdc_rxreorder(struct brcmf_if *ifp,
brcmf_fws_add_interface(ifp);
}
+static void
+brcmf_proto_bcdc_del_if(struct brcmf_if *ifp)
+{
+ brcmf_fws_del_interface(ifp);
+}
+
int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr)
{
struct brcmf_bcdc *bcdc;
@@ -429,6 +435,7 @@ int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr)
drvr->proto->add_tdls_peer = brcmf_proto_bcdc_add_tdls_peer;
drvr->proto->rxreorder = brcmf_proto_bcdc_rxreorder;
drvr->proto->add_if = brcmf_proto_bcdc_add_if;
+ drvr->proto->del_if = brcmf_proto_bcdc_del_if;
drvr->proto->pd = bcdc;
drvr->hdrlen += BCDC_HEADER_LEN + BRCMF_PROT_FW_SIGNAL_MAX_TXBYTES;
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
index 794a9f6..5bb0378 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
@@ -706,7 +706,7 @@ void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked)
return;
brcmf_dbg(TRACE, "Enter, bsscfgidx=%d, ifidx=%d\n", ifp->bsscfgidx,
ifp->ifidx);
- brcmf_fws_del_interface(ifp);
+ brcmf_proto_del_if(ifp->drvr, ifp);
brcmf_del_if(ifp->drvr, ifp->bsscfgidx, rtnl_locked);
}
@@ -1013,7 +1013,7 @@ int brcmf_bus_started(struct device *dev)
drvr->config = NULL;
}
if (drvr->fws) {
- brcmf_fws_del_interface(ifp);
+ brcmf_proto_del_if(ifp->drvr, ifp);
brcmf_fws_deinit(drvr);
}
brcmf_net_detach(ifp->ndev, false);
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h
index 3d001f3..2c76c96 100644
--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h
+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/proto.h
@@ -45,6 +45,7 @@ struct brcmf_proto {
u8 peer[ETH_ALEN]);
void (*rxreorder)(struct brcmf_if *ifp, struct sk_buff *skb);
void (*add_if)(struct brcmf_if *ifp);
+ void (*del_if)(struct brcmf_if *ifp);
void *pd;
};
@@ -127,4 +128,12 @@ static inline bool brcmf_proto_is_reorder_skb(struct sk_buff *skb)
drvr->proto->add_if(ifp);
}
+static inline void
+brcmf_proto_del_if(struct brcmf_pub *drvr, struct brcmf_if *ifp)
+{
+ if (!drvr->proto->del_if)
+ return;
+ drvr->proto->del_if(ifp);
+}
+
#endif /* BRCMFMAC_PROTO_H */
--
1.9.1
next prev parent reply other threads:[~2017-03-10 21:17 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-10 21:17 [PATCH 0/5] brcmfmac: only use fwsignal functionality for bcdc protocol Arend van Spriel
2017-03-10 21:17 ` [PATCH 1/5] brcmfmac: move brcmf_txflowblock to bcdc layer Arend van Spriel
2017-03-20 17:15 ` [1/5] " Kalle Valo
2017-03-10 21:17 ` [PATCH 2/5] brcmfmac: move brcmf_txcomplete " Arend van Spriel
2017-03-10 21:17 ` [PATCH 3/5] brcmfmac: wrap brcmf_fws_add_interface into " Arend van Spriel
2017-03-10 21:17 ` Arend van Spriel [this message]
2017-03-10 21:17 ` [PATCH 5/5] brcmfmac: wrap brcmf_fws_reset_interface " Arend van Spriel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1489180626-6722-5-git-send-email-arend.vanspriel@broadcom.com \
--to=arend.vanspriel@broadcom.com \
--cc=franky.lin@broadcom.com \
--cc=kvalo@codeaurora.org \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).