summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rsi/rsi_main.h
diff options
context:
space:
mode:
authorMartin Fuzzey <martin.fuzzey@flowbird.group>2021-08-30 17:26:44 +0200
committerKalle Valo <kvalo@codeaurora.org>2021-09-21 07:42:36 +0200
commit9b14ed6e11b72dd4806535449ca6c6962cb2369d (patch)
tree6c1745f151f2085147958ffb0646ae7b3a0172ff /drivers/net/wireless/rsi/rsi_main.h
parentLinux 5.15-rc1 (diff)
downloadlinux-9b14ed6e11b72dd4806535449ca6c6962cb2369d.tar.xz
linux-9b14ed6e11b72dd4806535449ca6c6962cb2369d.zip
rsi: fix occasional initialisation failure with BT coex
When BT coexistence is enabled (eg oper mode 13, which is the default) the initialisation on startup sometimes silently fails. In a normal initialisation we see usb 1-1.3: Product: Wireless USB Network Module usb 1-1.3: Manufacturer: Redpine Signals, Inc. usb 1-1.3: SerialNumber: 000000000001 rsi_91x: rsi_probe: Initialized os intf ops rsi_91x: rsi_load_9116_firmware: Loading chunk 0 rsi_91x: rsi_load_9116_firmware: Loading chunk 1 rsi_91x: rsi_load_9116_firmware: Loading chunk 2 rsi_91x: Max Stations Allowed = 1 But sometimes the last log is missing and the wlan net device is not created. Running a userspace loop that resets the hardware via a GPIO shows the problem occurring ~5/100 resets. The problem does not occur in oper mode 1 (wifi only). Adding logs shows that the initialisation state machine requests a MAC reset via rsi_send_reset_mac() but the firmware does not reply, leading to the initialisation sequence being incomplete. Fix this by delaying attaching the BT adapter until the wifi initialisation has completed. With this applied I have done > 300 reset loops with no errors. Fixes: 716b840c7641 ("rsi: handle BT traffic in driver") Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> CC: stable@vger.kernel.org Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/1630337206-12410-2-git-send-email-martin.fuzzey@flowbird.group
Diffstat (limited to 'drivers/net/wireless/rsi/rsi_main.h')
-rw-r--r--drivers/net/wireless/rsi/rsi_main.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/wireless/rsi/rsi_main.h b/drivers/net/wireless/rsi/rsi_main.h
index 0f535850a383..a3e4fd5bd3e9 100644
--- a/drivers/net/wireless/rsi/rsi_main.h
+++ b/drivers/net/wireless/rsi/rsi_main.h
@@ -320,6 +320,7 @@ struct rsi_common {
struct ieee80211_vif *roc_vif;
bool eapol4_confirm;
+ bool bt_defer_attach;
void *bt_adapter;
struct cfg80211_scan_request *hwscan;
@@ -401,5 +402,6 @@ struct rsi_host_intf_ops {
enum rsi_host_intf rsi_get_host_intf(void *priv);
void rsi_set_bt_context(void *priv, void *bt_context);
+void rsi_attach_bt(struct rsi_common *common);
#endif