Commit 3ea186d1 authored by Arik Nemtsov's avatar Arik Nemtsov Committed by Luciano Coelho

wlcore/wl12xx: make sure session id is always zero for AP

The 12xx FW doesn't support non-zero session ids for AP-mode. Introduce
an appropriate quirk to make sure the session id is always zero when
needed.
Signed-off-by: default avatarArik Nemtsov <arik@wizery.com>
Signed-off-by: default avatarLuciano Coelho <coelho@ti.com>
parent aaabee8b
...@@ -644,7 +644,8 @@ static int wl12xx_identify_chip(struct wl1271 *wl) ...@@ -644,7 +644,8 @@ 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_START_STA_FAILS |
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;
memcpy(&wl->conf.mem, &wl12xx_default_priv_conf.mem_wl127x, memcpy(&wl->conf.mem, &wl12xx_default_priv_conf.mem_wl127x,
...@@ -667,7 +668,8 @@ static int wl12xx_identify_chip(struct wl1271 *wl) ...@@ -667,7 +668,8 @@ 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_START_STA_FAILS |
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;
wl->mr_fw_name = WL127X_FW_NAME_MULTI; wl->mr_fw_name = WL127X_FW_NAME_MULTI;
...@@ -695,7 +697,8 @@ static int wl12xx_identify_chip(struct wl1271 *wl) ...@@ -695,7 +697,8 @@ 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_START_STA_FAILS |
WLCORE_QUIRK_AP_ZERO_SESSION_ID;
wlcore_set_min_fw_ver(wl, WL128X_CHIP_VER, wlcore_set_min_fw_ver(wl, WL128X_CHIP_VER,
WL128X_IFTYPE_SR_VER, WL128X_MAJOR_SR_VER, WL128X_IFTYPE_SR_VER, WL128X_MAJOR_SR_VER,
......
...@@ -293,9 +293,14 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif, ...@@ -293,9 +293,14 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif,
tx_attr |= TX_HW_ATTR_TX_DUMMY_REQ; tx_attr |= TX_HW_ATTR_TX_DUMMY_REQ;
} else if (wlvif) { } else if (wlvif) {
u8 session_id = wl->session_ids[hlid];
if ((wl->quirks & WLCORE_QUIRK_AP_ZERO_SESSION_ID) &&
(wlvif->bss_type == BSS_TYPE_AP_BSS))
session_id = 0;
/* configure the tx attributes */ /* configure the tx attributes */
tx_attr = wl->session_ids[hlid] << tx_attr = session_id << TX_HW_ATTR_OFST_SESSION_COUNTER;
TX_HW_ATTR_OFST_SESSION_COUNTER;
} }
desc->hlid = hlid; desc->hlid = hlid;
......
...@@ -533,6 +533,8 @@ wlcore_set_min_fw_ver(struct wl1271 *wl, unsigned int chip, ...@@ -533,6 +533,8 @@ wlcore_set_min_fw_ver(struct wl1271 *wl, unsigned int chip,
/* Firmware requires reg domain configuration for active calibration */ /* Firmware requires reg domain configuration for active calibration */
#define WLCORE_QUIRK_REGDOMAIN_CONF BIT(11) #define WLCORE_QUIRK_REGDOMAIN_CONF BIT(11)
/* The FW only support a zero session id for AP */
#define WLCORE_QUIRK_AP_ZERO_SESSION_ID BIT(12)
/* TODO: move all these common registers and values elsewhere */ /* TODO: move all these common registers and values elsewhere */
#define HW_ACCESS_ELP_CTRL_REG 0x1FFFC #define HW_ACCESS_ELP_CTRL_REG 0x1FFFC
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment