提交 817b178c 编写于 作者: H Hante Meuleman 提交者: John W. Linville

brcmfmac: on halting driver check before release or free.

brcmf_netdev_stop shall first check bus_if status before bringing
down cfg80211. brcmf_detach shall first check if driver is
allocated.
Reviewed-by: NArend Van Spriel <arend@broadcom.com>
Signed-off-by: NHante Meuleman <meuleman@broadcom.com>
Signed-off-by: NFranky Lin <frankyl@broadcom.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 6034d0a1
......@@ -600,10 +600,12 @@ static int brcmf_netdev_stop(struct net_device *ndev)
struct brcmf_pub *drvr = ifp->drvr;
brcmf_dbg(TRACE, "Enter\n");
brcmf_cfg80211_down(drvr->config);
if (drvr->bus_if->drvr_up == 0)
return 0;
brcmf_cfg80211_down(drvr->config);
/* Set state and stop OS transmissions */
drvr->bus_if->drvr_up = false;
netif_stop_queue(ndev);
......@@ -905,6 +907,8 @@ void brcmf_detach(struct device *dev)
brcmf_dbg(TRACE, "Enter\n");
if (drvr == NULL)
return;
/* make sure primary interface removed last */
for (i = BRCMF_MAX_IFS-1; i > -1; i--)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册
新手
引导
客服 返回
顶部