Merge tag 'wireless-drivers-2021-06-19' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers

Kalle Valo says:

====================
wireless-drivers fixes for v5.13

Only one important fix for an mwifiex regression.

mwifiex

* fix deadlock during rmmod or firmware reset, regression from
  cfg80211 RTNL changes in v5.12-rc1
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
David S. Miller
2021-06-21 12:21:46 -07:00

View File

@@ -1445,11 +1445,18 @@ static void mwifiex_uninit_sw(struct mwifiex_adapter *adapter)
if (!priv)
continue;
rtnl_lock();
wiphy_lock(adapter->wiphy);
if (priv->netdev &&
priv->wdev.iftype != NL80211_IFTYPE_UNSPECIFIED)
priv->wdev.iftype != NL80211_IFTYPE_UNSPECIFIED) {
/*
* Close the netdev now, because if we do it later, the
* netdev notifiers will need to acquire the wiphy lock
* again --> deadlock.
*/
dev_close(priv->wdev.netdev);
wiphy_lock(adapter->wiphy);
mwifiex_del_virtual_intf(adapter->wiphy, &priv->wdev);
wiphy_unlock(adapter->wiphy);
wiphy_unlock(adapter->wiphy);
}
rtnl_unlock();
}