fix: isolate the 0x8820 loader profile per USB device

Derive the FMAC-only profile from each device readback instead of a module-global latch. A regular D80 must still load its patches after another adapter reports product 0x8820. Reject a busy connect with EBUSY without resetting the state of an operation already in flight.

Extracted-function tests cover alternating devices, reprobe, cache setup, configuration errors and unchanged busy states. All three modules build against Linux 6.17 headers. Hardware retest of this revision and Bluetooth remain pending.
This commit is contained in:
Shen Mintao committed 2026-10-28 10:17:39 +08:00
1 parent 73e0a57128
commit 35d815c0ae
6 files changed
+159 -10

No files matched your search

+2 -4
View File
@@ -3207,13 +3207,11 @@ static int rwnx_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
(int)atomic_read(&rwnx_vif->drv_conn_state) == (int)RWNX_DRV_STATUS_CONNECTING) {
AICWFDBG(LOGERROR, "%s driver is disconnecting or connecting ,return it \r\n", __func__);
/*
* local fix: returning 0 here leaves cfg80211 waiting for a connect
* Returning 0 here leaves cfg80211 waiting for a connect
* result that never comes, so every later connect fails with -EALREADY
* (NetworkManager then loops asking for the password forever).
* Report the failure instead so cfg80211 drops its pending request.
* Reject the new request without changing an in-flight operation's state.
*/
rwnx_set_conn_state(rwnx_vif, &rwnx_vif->drv_conn_state,
(int)RWNX_DRV_STATUS_DISCONNECTED);
return -EBUSY;
}
#endif