2010-09-20 09:03:05

by Kahn, Gery

[permalink] [raw]
Subject: [PATCH] Add 802.11a support configuration

This patch adds ability to configure 802.11a support on wl1271.

The code is not tested enough, this is why marked as EXPERIMENTAL.


Signed-off-by: Gery Kahn <[email protected]>
---
drivers/net/wireless/wl12xx/Kconfig | 7 +++++++
drivers/net/wireless/wl12xx/wl1271.h | 7 +------
drivers/net/wireless/wl12xx/wl1271_main.c | 8 ++------
3 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/wl12xx/Kconfig b/drivers/net/wireless/wl12xx/Kconfig
index 4a8bb25..7f62a6f 100644
--- a/drivers/net/wireless/wl12xx/Kconfig
+++ b/drivers/net/wireless/wl12xx/Kconfig
@@ -52,6 +52,13 @@ config WL1271
If you choose to build a module, it'll be called wl1271. Say N if
unsure.

+config WL1271_80211A
+ bool "TI wl1271 802.11a support (EXPERIMENTAL)"
+ depends on WL1271 && EXPERIMENTAL
+ default n
+ ---help---
+ This will enable 802.11a support for TI wl1271 chipset.
+
config WL1271_SPI
tristate "TI wl1271 SPI support"
depends on WL1271 && SPI_MASTER
diff --git a/drivers/net/wireless/wl12xx/wl1271.h b/drivers/net/wireless/wl12xx/wl1271.h
index 4134f44..a22769a 100644
--- a/drivers/net/wireless/wl12xx/wl1271.h
+++ b/drivers/net/wireless/wl12xx/wl1271.h
@@ -117,11 +117,6 @@ enum {
#define WL1271_TX_SECURITY_LO16(s) ((u16)((s) & 0xffff))
#define WL1271_TX_SECURITY_HI32(s) ((u32)(((s) >> 16) & 0xffffffff))

-/*
- * Enable/disable 802.11a support for WL1273
- */
-#undef WL1271_80211A_ENABLED
-
#define WL1271_BUSY_WORD_CNT 1
#define WL1271_BUSY_WORD_LEN (WL1271_BUSY_WORD_CNT * sizeof(u32))

@@ -501,7 +496,7 @@ int wl1271_plt_stop(struct wl1271 *wl);
static inline bool wl1271_11a_enabled(void)
{
/* FIXME: this could be determined based on the NVS-INI file */
-#ifdef WL1271_80211A_ENABLED
+#ifdef CONFIG_WL1271_80211A
return true;
#else
return false;
diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c b/drivers/net/wireless/wl12xx/wl1271_main.c
index af26150..783bf7b 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -568,8 +568,7 @@ static int wl1271_fetch_nvs(struct wl1271 *wl)
* around.
*/
if (fw->size != sizeof(struct wl1271_nvs_file) &&
- (fw->size != WL1271_INI_LEGACY_NVS_FILE_SIZE ||
- wl1271_11a_enabled())) {
+ (fw->size != WL1271_INI_LEGACY_NVS_FILE_SIZE)) {
wl1271_error("nvs size is not as expected: %zu != %zu",
fw->size, sizeof(struct wl1271_nvs_file));
ret = -EILSEQ;
@@ -1559,10 +1558,7 @@ static int wl1271_op_hw_scan(struct ieee80211_hw *hw,
if (ret < 0)
goto out;

- if (wl1271_11a_enabled())
- ret = wl1271_scan(hw->priv, ssid, len, req);
- else
- ret = wl1271_scan(hw->priv, ssid, len, req);
+ ret = wl1271_scan(hw->priv, ssid, len, req);

wl1271_ps_elp_sleep(wl);

--
1.7.0.4



2010-09-20 09:09:48

by Luciano Coelho

[permalink] [raw]
Subject: Re: [PATCH] Add 802.11a support configuration

Hi Gery,

On Mon, 2010-09-20 at 11:02 +0200, ext Gery Kahn wrote:
> This patch adds ability to configure 802.11a support on wl1271.
>
> The code is not tested enough, this is why marked as EXPERIMENTAL.
>
>
> Signed-off-by: Gery Kahn <[email protected]>
> ---

Sorry for not answering your previous email. I read it and was going to
reply to it later, but it got flooded down my inbox.

We already have a implemented a mechanism to decide whether to use 11a
or not at runtime. It is still not upstream because I haven't been able
to test our forward-ports. Now I got a beagle board with wl1271 and
I'll be able to test the upstream kernel and will submit everything
after I have tested.

Sorry for the trouble, but I have to NACK this.


--
Cheers,
Luca.