From: Eliad Peller <eliad@wizery.com>
To: Luciano Coelho <coelho@ti.com>
Cc: <linux-wireless@vger.kernel.org>
Subject: [PATCH 04/15] wlcore: workaround start_sta problem in wl12xx fw
Date: Mon, 19 Nov 2012 18:39:19 +0200 [thread overview]
Message-ID: <1353343170-26516-5-git-send-email-eliad@wizery.com> (raw)
In-Reply-To: <1353343170-26516-1-git-send-email-eliad@wizery.com>
for some reason, the wl12xx fw is not able to rx/tx
on the first start_sta cmd.
Workaround it by issuing a dummy start_sta + stop_sta
before starting the sta for the final time.
Signed-off-by: Eliad Peller <eliad@wizery.com>
---
drivers/net/wireless/ti/wl12xx/main.c | 9 ++++++---
drivers/net/wireless/ti/wlcore/main.c | 15 ++++++++++++++-
drivers/net/wireless/ti/wlcore/wlcore.h | 3 +++
3 files changed, 23 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index dadf1db..6c9fba4 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -637,7 +637,8 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
wl->quirks |= WLCORE_QUIRK_LEGACY_NVS |
WLCORE_QUIRK_DUAL_PROBE_TMPL |
- WLCORE_QUIRK_TKIP_HEADER_SPACE;
+ WLCORE_QUIRK_TKIP_HEADER_SPACE |
+ WLCORE_QUIRK_START_STA_FAILS;
wl->sr_fw_name = WL127X_FW_NAME_SINGLE;
wl->mr_fw_name = WL127X_FW_NAME_MULTI;
memcpy(&wl->conf.mem, &wl12xx_default_priv_conf.mem_wl127x,
@@ -657,7 +658,8 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
wl->quirks |= WLCORE_QUIRK_LEGACY_NVS |
WLCORE_QUIRK_DUAL_PROBE_TMPL |
- WLCORE_QUIRK_TKIP_HEADER_SPACE;
+ WLCORE_QUIRK_TKIP_HEADER_SPACE |
+ WLCORE_QUIRK_START_STA_FAILS;
wl->plt_fw_name = WL127X_PLT_FW_NAME;
wl->sr_fw_name = WL127X_FW_NAME_SINGLE;
wl->mr_fw_name = WL127X_FW_NAME_MULTI;
@@ -682,7 +684,8 @@ static int wl12xx_identify_chip(struct wl1271 *wl)
/* wl128x requires TX blocksize alignment */
wl->quirks |= WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN |
WLCORE_QUIRK_DUAL_PROBE_TMPL |
- WLCORE_QUIRK_TKIP_HEADER_SPACE;
+ WLCORE_QUIRK_TKIP_HEADER_SPACE |
+ WLCORE_QUIRK_START_STA_FAILS;
wlcore_set_min_fw_ver(wl, WL128X_CHIP_VER, WL128X_IFTYPE_VER,
WL128X_MAJOR_VER, WL128X_SUBTYPE_VER,
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 2cb978e..f4017f3 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -2490,8 +2490,21 @@ static int wlcore_join(struct wl1271 *wl, struct wl12xx_vif *wlvif)
if (is_ibss)
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);
+ }
return ret;
}
diff --git a/drivers/net/wireless/ti/wlcore/wlcore.h b/drivers/net/wireless/ti/wlcore/wlcore.h
index 68584aa..1030b6b 100644
--- a/drivers/net/wireless/ti/wlcore/wlcore.h
+++ b/drivers/net/wireless/ti/wlcore/wlcore.h
@@ -450,6 +450,9 @@ wlcore_set_min_fw_ver(struct wl1271 *wl, unsigned int chip,
/* Each RX/TX transaction requires an end-of-transaction transfer */
#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 */
#define WLCORE_QUIRK_TX_BLOCKSIZE_ALIGN BIT(2)
--
1.7.6.401.g6a319
next prev parent reply other threads:[~2012-11-19 16:39 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-19 16:39 [PATCH 00/15] wlcore: prepare to multi-channel Eliad Peller
2012-11-19 16:39 ` [PATCH 01/15] wlcore: start sta role on CHANGED_BSSID Eliad Peller
2012-11-19 18:14 ` Luciano Coelho
2012-11-20 8:22 ` Eliad Peller
2012-11-19 16:39 ` [PATCH 02/15] wlcore: set ssid before starting station role Eliad Peller
2012-11-19 16:39 ` [PATCH 03/15] wlcore: always use sta.hlid Eliad Peller
2012-11-19 22:39 ` Julian Calaby
2012-11-20 8:46 ` Eliad Peller
2012-11-19 16:39 ` Eliad Peller [this message]
2012-11-19 16:39 ` [PATCH 05/15] wlcore: implement .remain_on_channel() callback Eliad Peller
2012-11-19 21:13 ` Arik Nemtsov
2012-11-20 8:33 ` Eliad Peller
2012-11-19 16:39 ` [PATCH 06/15] wlcore: use dev_hlid if the tx is offchannel Eliad Peller
2012-11-19 16:39 ` [PATCH 07/15] wlcore: get channel from bss_conf instead of hw->conf Eliad Peller
2012-11-19 16:39 ` [PATCH 08/15] wlcore: add chanctx implementation Eliad Peller
2012-11-19 17:03 ` Johannes Berg
2012-11-19 17:16 ` Eliad Peller
2012-11-19 17:36 ` Luciano Coelho
2012-11-19 17:48 ` Eliad Peller
2012-11-19 21:23 ` Arik Nemtsov
2012-11-20 8:38 ` Eliad Peller
2012-11-20 11:03 ` Arik Nemtsov
2012-11-20 11:42 ` Johannes Berg
2012-11-20 11:47 ` Eliad Peller
2012-11-19 16:39 ` [PATCH 09/15] wlcore: remove channel handling from op_config Eliad Peller
2012-11-19 21:26 ` Arik Nemtsov
2012-11-19 16:39 ` [PATCH 10/15] wlcore: initiate ROC/CROC on sta state updates Eliad Peller
2012-11-19 21:41 ` Arik Nemtsov
2012-11-20 8:42 ` Eliad Peller
2012-11-20 10:25 ` Arik Nemtsov
2012-11-19 16:39 ` [PATCH 11/15] wlcore: set active psm on association Eliad Peller
2012-11-20 7:39 ` Luciano Coelho
2012-11-20 9:06 ` Eliad Peller
2012-11-19 16:39 ` [PATCH 12/15] wlcore: specify correct supported_rates Eliad Peller
2012-11-20 7:55 ` Luciano Coelho
2012-11-20 9:11 ` Eliad Peller
2012-11-19 16:39 ` [PATCH 13/15] wlcore: reconfigure rate policy on association Eliad Peller
2012-11-20 8:13 ` Luciano Coelho
2012-11-20 9:14 ` Eliad Peller
2012-11-19 16:39 ` [PATCH 14/15] wlcore: refactor CHANGED_HT handling Eliad Peller
2012-11-19 16:39 ` [PATCH 15/15] wlcore: configure the remote rates with our own rates Eliad Peller
2012-11-20 8:18 ` Luciano Coelho
2012-11-20 9:21 ` Eliad Peller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1353343170-26516-5-git-send-email-eliad@wizery.com \
--to=eliad@wizery.com \
--cc=coelho@ti.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox