wlcore: Fix command execute failure 19 for wl12xx
We can currently get a "command execute failure 19" error on beacon loss if the signal is weak: wlcore: Beacon loss detected. roles:0xff wlcore: Connection loss work (role_id: 0). ... wlcore: ERROR command execute failure 19 ... WARNING: CPU: 0 PID: 1552 at drivers/net/wireless/ti/wlcore/main.c:803 ... (wl12xx_queue_recovery_work.part.0 [wlcore]) (wl12xx_cmd_role_start_sta [wlcore]) (wl1271_op_bss_info_changed [wlcore]) (ieee80211_prep_connection [mac80211]) Error 19 is defined as CMD_STATUS_WRONG_NESTING from the wlcore firmware, and seems to mean that the firmware no longer wants to see the quirk handling for WLCORE_QUIRK_START_STA_FAILS done. This quirk got added with commit18eab43070
("wlcore: workaround start_sta problem in wl12xx fw"), and it seems that this already got fixed in the firmware long time ago back in 2012 as wl18xx never had this quirk in place to start with. As we no longer even support firmware that early, to me it seems that it's safe to just drop WLCORE_QUIRK_START_STA_FAILS to fix the error. Looks like earlier firmware got disabled back in 2013 with commit0e284c074e
("wl12xx: increase minimum singlerole firmware version required"). If it turns out we still need WLCORE_QUIRK_START_STA_FAILS with any firmware that the driver works with, we can simply revert this patch and add extra checks for firmware version used. With this fix wlcore reconnects properly after a beacon loss. Cc: Raz Bouganim <r-bouganim@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org> Link: https://lore.kernel.org/r/20210115065613.7731-1-tony@atomide.com
This commit is contained in:
parent
2a9269b1cd
commit
cb88d01b67
|
@ -635,7 +635,6 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
|
||||||
wl->quirks |= WLCORE_QUIRK_LEGACY_NVS |
|
wl->quirks |= WLCORE_QUIRK_LEGACY_NVS |
|
||||||
WLCORE_QUIRK_DUAL_PROBE_TMPL |
|
WLCORE_QUIRK_DUAL_PROBE_TMPL |
|
||||||
WLCORE_QUIRK_TKIP_HEADER_SPACE |
|
WLCORE_QUIRK_TKIP_HEADER_SPACE |
|
||||||
WLCORE_QUIRK_START_STA_FAILS |
|
|
||||||
WLCORE_QUIRK_AP_ZERO_SESSION_ID;
|
WLCORE_QUIRK_AP_ZERO_SESSION_ID;
|
||||||
wl->sr_fw_name = WL127X_FW_NAME_SINGLE;
|
wl->sr_fw_name = WL127X_FW_NAME_SINGLE;
|
||||||
wl->mr_fw_name = WL127X_FW_NAME_MULTI;
|
wl->mr_fw_name = WL127X_FW_NAME_MULTI;
|
||||||
|
@ -659,7 +658,6 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
|
||||||
wl->quirks |= WLCORE_QUIRK_LEGACY_NVS |
|
wl->quirks |= WLCORE_QUIRK_LEGACY_NVS |
|
||||||
WLCORE_QUIRK_DUAL_PROBE_TMPL |
|
WLCORE_QUIRK_DUAL_PROBE_TMPL |
|
||||||
WLCORE_QUIRK_TKIP_HEADER_SPACE |
|
WLCORE_QUIRK_TKIP_HEADER_SPACE |
|
||||||
WLCORE_QUIRK_START_STA_FAILS |
|
|
||||||
WLCORE_QUIRK_AP_ZERO_SESSION_ID;
|
WLCORE_QUIRK_AP_ZERO_SESSION_ID;
|
||||||
wl->plt_fw_name = WL127X_PLT_FW_NAME;
|
wl->plt_fw_name = WL127X_PLT_FW_NAME;
|
||||||
wl->sr_fw_name = WL127X_FW_NAME_SINGLE;
|
wl->sr_fw_name = WL127X_FW_NAME_SINGLE;
|
||||||
|
@ -688,7 +686,6 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
|
||||||
wl->quirks |= WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN |
|
wl->quirks |= WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN |
|
||||||
WLCORE_QUIRK_DUAL_PROBE_TMPL |
|
WLCORE_QUIRK_DUAL_PROBE_TMPL |
|
||||||
WLCORE_QUIRK_TKIP_HEADER_SPACE |
|
WLCORE_QUIRK_TKIP_HEADER_SPACE |
|
||||||
WLCORE_QUIRK_START_STA_FAILS |
|
|
||||||
WLCORE_QUIRK_AP_ZERO_SESSION_ID;
|
WLCORE_QUIRK_AP_ZERO_SESSION_ID;
|
||||||
|
|
||||||
wlcore_set_min_fw_ver(wl, WL128X_CHIP_VER,
|
wlcore_set_min_fw_ver(wl, WL128X_CHIP_VER,
|
||||||
|
|
|
@ -2872,21 +2872,8 @@ static int wlcore_join(struct wl1271 *wl, struct wl12xx_vif *wlvif)
|
||||||
|
|
||||||
if (is_ibss)
|
if (is_ibss)
|
||||||
ret = wl12xx_cmd_role_start_ibss(wl, wlvif);
|
ret = wl12xx_cmd_role_start_ibss(wl, wlvif);
|
||||||
else {
|
else
|
||||||
if (wl->quirks & WLCORE_QUIRK_START_STA_FAILS) {
|
|
||||||
/*
|
|
||||||
* TODO: this is an ugly workaround for wl12xx fw
|
|
||||||
* bug - we are not able to tx/rx after the first
|
|
||||||
* start_sta, so make dummy start+stop calls,
|
|
||||||
* and then call start_sta again.
|
|
||||||
* this should be fixed in the fw.
|
|
||||||
*/
|
|
||||||
wl12xx_cmd_role_start_sta(wl, wlvif);
|
|
||||||
wl12xx_cmd_role_stop_sta(wl, wlvif);
|
|
||||||
}
|
|
||||||
|
|
||||||
ret = wl12xx_cmd_role_start_sta(wl, wlvif);
|
ret = wl12xx_cmd_role_start_sta(wl, wlvif);
|
||||||
}
|
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -547,9 +547,6 @@ wlcore_set_min_fw_ver(struct wl1271 *wl, unsigned int chip,
|
||||||
/* Each RX/TX transaction requires an end-of-transaction transfer */
|
/* Each RX/TX transaction requires an end-of-transaction transfer */
|
||||||
#define WLCORE_QUIRK_END_OF_TRANSACTION BIT(0)
|
#define WLCORE_QUIRK_END_OF_TRANSACTION BIT(0)
|
||||||
|
|
||||||
/* the first start_role(sta) sometimes doesn't work on wl12xx */
|
|
||||||
#define WLCORE_QUIRK_START_STA_FAILS BIT(1)
|
|
||||||
|
|
||||||
/* wl127x and SPI don't support SDIO block size alignment */
|
/* wl127x and SPI don't support SDIO block size alignment */
|
||||||
#define WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN BIT(2)
|
#define WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN BIT(2)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue