Skip to content

Commit

Permalink
mwifiex: Ignore BTCOEX events from the 88W8897 firmware
Browse files Browse the repository at this point in the history
[ Upstream commit 84d94e1 ]

The firmware of the 88W8897 PCIe+USB card sends those events very
unreliably, sometimes bluetooth together with 2.4ghz-wifi is used and no
COEX event comes in, and sometimes bluetooth is disabled but the
coexistance mode doesn't get disabled.

This means we sometimes end up capping the rx/tx window size while
bluetooth is not enabled anymore, artifically limiting wifi speeds even
though bluetooth is not being used.

Since we can't fix the firmware, let's just ignore those events on the
88W8897 device. From some Wireshark capture sessions it seems that the
Windows driver also doesn't change the rx/tx window sizes when bluetooth
gets enabled or disabled, so this is fairly consistent with the Windows
driver.

Signed-off-by: Jonas Dreßler <verdre@v0yd.nl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20211103205827.14559-1-verdre@v0yd.nl
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
jonas2515 authored and gregkh committed Aug 17, 2022
1 parent 26cdeed commit 358fbfc
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/net/wireless/marvell/mwifiex/main.h
Original file line number Diff line number Diff line change
Expand Up @@ -1054,6 +1054,8 @@ struct mwifiex_adapter {
void *devdump_data;
int devdump_len;
struct timer_list devdump_timer;

bool ignore_btcoex_events;
};

void mwifiex_process_tx_queue(struct mwifiex_adapter *adapter);
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/marvell/mwifiex/pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -3152,6 +3152,9 @@ static int mwifiex_init_pcie(struct mwifiex_adapter *adapter)
if (ret)
goto err_alloc_buffers;

if (pdev->device == PCIE_DEVICE_ID_MARVELL_88W8897)
adapter->ignore_btcoex_events = true;

return 0;

err_alloc_buffers:
Expand Down
3 changes: 3 additions & 0 deletions drivers/net/wireless/marvell/mwifiex/sta_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,6 +1062,9 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
break;
case EVENT_BT_COEX_WLAN_PARA_CHANGE:
dev_dbg(adapter->dev, "EVENT: BT coex wlan param update\n");
if (adapter->ignore_btcoex_events)
break;

mwifiex_bt_coex_wlan_param_update_event(priv,
adapter->event_skb);
break;
Expand Down

0 comments on commit 358fbfc

Please sign in to comment.