RinCat / RTL88x2BU-Linux-Driver

Realtek RTL88x2BU WiFi USB Driver for Linux
GNU General Public License v2.0
1.26k stars 198 forks source link

fix netdev (un)registration deadlock #235

Closed alex3d closed 5 months ago

alex3d commented 5 months ago

Fix deadlock on iw dev wlan0 del (this happen at least in OpenWRT during wifi re-configuration process).

Fix description from linux kernel maillist:

We used to not require anything in terms of registering netdevs
with cfg80211, using a netdev notifier instead. However, in the
next patch reducing RTNL locking, this causes big problems, and
the simplest way is to just require drivers to do things better.

Change the registration/unregistration semantics to require the
drivers to call cfg80211_(un)register_netdevice() when this is
happening due to a cfg80211 request, i.e. add_virtual_intf() or
del_virtual_intf() (or if it somehow has to happen in any other
cfg80211 callback).
RinCat commented 5 months ago

Thanks!