lwfinger / rtl8723bu

Driver for RTL8723BU
283 stars 143 forks source link

rtl8723bu: move wiphy setup to after reading the regulatory settings #177

Closed mansr closed 3 years ago

mansr commented 3 years ago

This corresponds to 50af06d43eab ("staging: rtl8723bs: Move wiphy setup to after reading the regulatory settings from the chip") in Linus' tree.

Commit d6ed42081580 ("rtl8723bu: fix wireless regulatory API misuse") moved the wiphy_apply_custom_regulatory() call to earlier in the driver's init-sequence, so that it gets called before wiphy_register().

But at this point in time the eFuses which code the regulatory-settings for the chip have not been read by the driver yet, causing _rtw_reg_apply_flags() to set the IEEE80211_CHAN_DISABLED flag on all channels.

We cannot move the wiphy_apply_custom_regulatory() call back, because that call must be made before the wiphy_register() call.

Instead move the entire rtw_wdev_alloc() call to after the Efuses have been read, fixing all channels being disabled in the initial channel-map.

Fixes: d6ed42081580 ("rtl8723bu: fix wireless regulatory API misuse") Signed-off-by: Hans de Goede hdegoede@redhat.com Signed-off-by: Mans Rullgard mans@mansr.com

lwfinger commented 3 years ago

Thanks. Code change merged.