lwfinger / rtl8723bu

Driver for RTL8723BU
283 stars 143 forks source link

rtl8723bu: fix wireless regulatory API misuse #176

Closed mansr closed 3 years ago

mansr commented 3 years ago

This is 81f153faacd0 ("staging: rtl8723bs: fix wireless regulatory API misuse") in Linus' tree. Original commit message follows.

This code ends up calling wiphy_apply_custom_regulatory(), for which we document that it should be called before wiphy_register(). This driver doesn't do that, but calls it from ndo_open() with the RTNL held, which caused deadlocks.

Since the driver just registers static regdomain data and then the notifier applies the channel changes if any, there's no reason for it to call this in ndo_open(), move it earlier to fix the deadlock.

Signed-off-by: Johannes Berg johannes.berg@intel.com Signed-off-by: Mans Rullgard mans@mansr.com

lwfinger commented 3 years ago

Merged. Thanks.