Commit c02a5eb8 authored by Franky Lin's avatar Franky Lin Committed by Kalle Valo

brcmfmac: wrap brcmf_fws_del_interface into bcdc layer

Create a new protocol interface function brcmf_proto_del_if for core
module to notify protocol layer upon interface deletion.
Signed-off-by: default avatarFranky Lin <franky.lin@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend.vanspriel@broadcom.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 9fdc64bb
...@@ -405,6 +405,12 @@ brcmf_proto_bcdc_add_if(struct brcmf_if *ifp) ...@@ -405,6 +405,12 @@ brcmf_proto_bcdc_add_if(struct brcmf_if *ifp)
brcmf_fws_add_interface(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) int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr)
{ {
struct brcmf_bcdc *bcdc; struct brcmf_bcdc *bcdc;
...@@ -429,6 +435,7 @@ int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr) ...@@ -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->add_tdls_peer = brcmf_proto_bcdc_add_tdls_peer;
drvr->proto->rxreorder = brcmf_proto_bcdc_rxreorder; drvr->proto->rxreorder = brcmf_proto_bcdc_rxreorder;
drvr->proto->add_if = brcmf_proto_bcdc_add_if; drvr->proto->add_if = brcmf_proto_bcdc_add_if;
drvr->proto->del_if = brcmf_proto_bcdc_del_if;
drvr->proto->pd = bcdc; drvr->proto->pd = bcdc;
drvr->hdrlen += BCDC_HEADER_LEN + BRCMF_PROT_FW_SIGNAL_MAX_TXBYTES; drvr->hdrlen += BCDC_HEADER_LEN + BRCMF_PROT_FW_SIGNAL_MAX_TXBYTES;
......
...@@ -706,7 +706,7 @@ void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked) ...@@ -706,7 +706,7 @@ void brcmf_remove_interface(struct brcmf_if *ifp, bool rtnl_locked)
return; return;
brcmf_dbg(TRACE, "Enter, bsscfgidx=%d, ifidx=%d\n", ifp->bsscfgidx, brcmf_dbg(TRACE, "Enter, bsscfgidx=%d, ifidx=%d\n", ifp->bsscfgidx,
ifp->ifidx); ifp->ifidx);
brcmf_fws_del_interface(ifp); brcmf_proto_del_if(ifp->drvr, ifp);
brcmf_del_if(ifp->drvr, ifp->bsscfgidx, rtnl_locked); brcmf_del_if(ifp->drvr, ifp->bsscfgidx, rtnl_locked);
} }
...@@ -1035,7 +1035,7 @@ int brcmf_bus_started(struct device *dev) ...@@ -1035,7 +1035,7 @@ int brcmf_bus_started(struct device *dev)
drvr->config = NULL; drvr->config = NULL;
} }
if (drvr->fws) { if (drvr->fws) {
brcmf_fws_del_interface(ifp); brcmf_proto_del_if(ifp->drvr, ifp);
brcmf_fws_deinit(drvr); brcmf_fws_deinit(drvr);
} }
brcmf_net_detach(ifp->ndev, false); brcmf_net_detach(ifp->ndev, false);
......
...@@ -45,6 +45,7 @@ struct brcmf_proto { ...@@ -45,6 +45,7 @@ struct brcmf_proto {
u8 peer[ETH_ALEN]); u8 peer[ETH_ALEN]);
void (*rxreorder)(struct brcmf_if *ifp, struct sk_buff *skb); void (*rxreorder)(struct brcmf_if *ifp, struct sk_buff *skb);
void (*add_if)(struct brcmf_if *ifp); void (*add_if)(struct brcmf_if *ifp);
void (*del_if)(struct brcmf_if *ifp);
void *pd; void *pd;
}; };
...@@ -127,4 +128,12 @@ brcmf_proto_add_if(struct brcmf_pub *drvr, struct brcmf_if *ifp) ...@@ -127,4 +128,12 @@ brcmf_proto_add_if(struct brcmf_pub *drvr, struct brcmf_if *ifp)
drvr->proto->add_if(ifp); 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 */ #endif /* BRCMFMAC_PROTO_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment