Message ID | 20210426212905.6b0f78581429.I2ee37448e499091b3ec0b23d642e3113ef670a8e@changeid |
---|---|
State | New |
Headers | show |
Series | [RFC] brcmfmac: don't take RTNL if already locked | expand |
diff --git a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c index ea78fe527c5d..ce9d8781b62b 100644 --- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c +++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c @@ -926,9 +926,11 @@ static void brcmf_del_if(struct brcmf_pub *drvr, s32 bsscfgidx, if (ifp->ndev) { if (bsscfgidx == 0) { if (ifp->ndev->netdev_ops == &brcmf_netdev_ops_pri) { - rtnl_lock(); + if (!locked) + rtnl_lock(); brcmf_netdev_stop(ifp->ndev); - rtnl_unlock(); + if (!locked) + rtnl_unlock(); } } else { netif_stop_queue(ifp->ndev);