Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [PATCH] b43: N-PHY: enable support for PHYs rev 3 and higher
From: Rafał Miłecki @ 2011-01-04 15:50 UTC (permalink / raw)
  To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
In-Reply-To: <1292963384-23684-1-git-send-email-zajec5@gmail.com>

W dniu 21 grudnia 2010 21:29 użytkownik Rafał Miłecki
<zajec5@gmail.com> napisał:
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> John: can we still make it for 2.6.38 merge? It was tested with 14e4:432b,
> support seems to be on the same level as for PHYs 1 and 2.

John, I dont see patches for rev3+ in wireless-testing. Any problems with them?

It means:
[PATCH 1/4] b43: use correct firmware for newer cores
[PATCH 2/4 v2] b43: N-PHY: implement radio 2056 init steps
[PATCH 3/4] b43: N-PHY: add init tables for 2056 radio
[PATCH 4/4] b43: N-PHY: avoid PHY hangs for rev 3 and 4

[PATCH 1/2] b43: N-PHY: use correct channel tables for rev4+
[PATCH 2/2 v2] b43: N-PHY: update 2056 radio on channel switch on rev3+
and this one.

-- 
Rafał

^ permalink raw reply

* Re: [PATCH] wl12xx: don't join upon disassociation
From: Eliad Peller @ 2011-01-04 13:13 UTC (permalink / raw)
  To: Juuso Oikarinen; +Cc: Luciano Coelho, linux-wireless
In-Reply-To: <1294145621.4166.118.camel@wimaxnb.nmp.nokia.com>

On Tue, Jan 4, 2011 at 2:53 PM, Juuso Oikarinen
<juuso.oikarinen@nokia.com> wrote:
> On Sun, 2010-12-26 at 10:27 +0200, ext Eliad Peller wrote:
>> wl12xx "rejoins" upon every BSS_CHANGED_BSSID notification.
>> However, there is no need to rejoin after disassociation, so just
>> filter out the case when the new bssid is 00:00:00:00:00:00.
>>
>> Signed-off-by: Eliad Peller <eliad@wizery.com>
>> ---
>>  drivers/net/wireless/wl12xx/main.c |   24 ++++++++++++++----------
>>  1 files changed, 14 insertions(+), 10 deletions(-)
>>
>> diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
>> index 062247e..7aa783c 100644
>> --- a/drivers/net/wireless/wl12xx/main.c
>> +++ b/drivers/net/wireless/wl12xx/main.c
>> @@ -1944,19 +1944,23 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
>>           memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) {
>>                       memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN);
>>
>> -                     ret = wl1271_cmd_build_null_data(wl);
>> -                     if (ret < 0)
>> -                             goto out_sleep;
>> +                     if (!is_zero_ether_addr(wl->bssid)) {
>> +                             ret = wl1271_cmd_build_null_data(wl);
>> +                             if (ret < 0)
>> +                                     goto out_sleep;
>>
>> -                     ret = wl1271_build_qos_null_data(wl);
>> -                     if (ret < 0)
>> -                             goto out_sleep;
>> +                             ret = wl1271_build_qos_null_data(wl);
>> +                             if (ret < 0)
>> +                                     goto out_sleep;
>>
>> -                     /* filter out all packets not from this BSSID */
>> -                     wl1271_configure_filters(wl, 0);
>> +                             /* filter out all packets not from this BSSID */
>> +                             wl1271_configure_filters(wl, 0);
>>
>> -                     /* Need to update the BSSID (for filtering etc) */
>> -                     do_join = true;
>> +                             /*
>> +                              * Need to update the BSSID (for filtering etc)
>> +                              */
>> +                             do_join = true;
>> +                     }
>>       }
>>
>>       if (changed & BSS_CHANGED_ASSOC) {
>
> The device still stays joined after disassoc, right? I guess the device
> should be receiving/transmitting frames while not idle.
>
> That is why we did have a specific dummy-join in disassoc, and also the
> BSSID filters etc are cleared!
>
the patch doesn't unjoin, it just prevents rejoining (and some other
configurations) to an "empty" bssid, so it shouldn't affect the
current join state.
the actual unjoin will only be only executed when the device goes idle.

^ permalink raw reply

* Re: [PATCH] wl12xx: don't join upon disassociation
From: Juuso Oikarinen @ 2011-01-04 12:53 UTC (permalink / raw)
  To: ext Eliad Peller; +Cc: Luciano Coelho, linux-wireless
In-Reply-To: <1293352070-17513-1-git-send-email-eliad@wizery.com>

On Sun, 2010-12-26 at 10:27 +0200, ext Eliad Peller wrote:
> wl12xx "rejoins" upon every BSS_CHANGED_BSSID notification.
> However, there is no need to rejoin after disassociation, so just
> filter out the case when the new bssid is 00:00:00:00:00:00.
> 
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---
>  drivers/net/wireless/wl12xx/main.c |   24 ++++++++++++++----------
>  1 files changed, 14 insertions(+), 10 deletions(-)
> 
> diff --git a/drivers/net/wireless/wl12xx/main.c b/drivers/net/wireless/wl12xx/main.c
> index 062247e..7aa783c 100644
> --- a/drivers/net/wireless/wl12xx/main.c
> +++ b/drivers/net/wireless/wl12xx/main.c
> @@ -1944,19 +1944,23 @@ static void wl1271_op_bss_info_changed(struct ieee80211_hw *hw,
>  	    memcmp(wl->bssid, bss_conf->bssid, ETH_ALEN)) {
>  			memcpy(wl->bssid, bss_conf->bssid, ETH_ALEN);
>  
> -			ret = wl1271_cmd_build_null_data(wl);
> -			if (ret < 0)
> -				goto out_sleep;
> +			if (!is_zero_ether_addr(wl->bssid)) {
> +				ret = wl1271_cmd_build_null_data(wl);
> +				if (ret < 0)
> +					goto out_sleep;
>  
> -			ret = wl1271_build_qos_null_data(wl);
> -			if (ret < 0)
> -				goto out_sleep;
> +				ret = wl1271_build_qos_null_data(wl);
> +				if (ret < 0)
> +					goto out_sleep;
>  
> -			/* filter out all packets not from this BSSID */
> -			wl1271_configure_filters(wl, 0);
> +				/* filter out all packets not from this BSSID */
> +				wl1271_configure_filters(wl, 0);
>  
> -			/* Need to update the BSSID (for filtering etc) */
> -			do_join = true;
> +				/*
> +				 * Need to update the BSSID (for filtering etc)
> +				 */
> +				do_join = true;
> +			}
>  	}
>  
>  	if (changed & BSS_CHANGED_ASSOC) {

The device still stays joined after disassoc, right? I guess the device
should be receiving/transmitting frames while not idle.

That is why we did have a specific dummy-join in disassoc, and also the
BSSID filters etc are cleared!

-Juuso


^ permalink raw reply

* [PATCH] mac80211: add remain-on-channel docs
From: Johannes Berg @ 2011-01-04 12:02 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless@vger.kernel.org

From: Johannes Berg <johannes.berg@intel.com>

Add documentation for the new callbacks that I
forgot in the patch adding the callbacks.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 include/net/mac80211.h |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- wireless-testing.orig/include/net/mac80211.h	2011-01-04 12:58:16.000000000 +0100
+++ wireless-testing/include/net/mac80211.h	2011-01-04 13:01:20.000000000 +0100
@@ -1753,6 +1753,16 @@ enum ieee80211_ampdu_mlme_action {
  *	(also see nl80211.h @NL80211_ATTR_WIPHY_ANTENNA_TX).
  *
  * @get_antenna: Get current antenna configuration from device (tx_ant, rx_ant).
+ *
+ * @remain_on_channel: Starts an off-channel period on the given channel, must
+ *	call back to ieee80211_ready_on_channel() when on that channel. Note
+ *	that normal channel traffic is not stopped as this is intended for hw
+ *	offload. Frames to transmit on the off-channel channel are transmitted
+ *	normally except for the %IEEE80211_TX_CTL_TX_OFFCHAN flag. When the
+ *	duration (which will always be non-zero) expires, the driver must call
+ *	ieee80211_remain_on_channel_expired(). This callback may sleep.
+ * @cancel_remain_on_channel: Requests that an ongoing off-channel period is
+ *	aborted before it expires. This callback may sleep.
  */
 struct ieee80211_ops {
 	int (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);



^ permalink raw reply

* Re: Hidden SSID and WLAN powersave
From: Johannes Berg @ 2011-01-04 11:05 UTC (permalink / raw)
  To: Juuso Oikarinen; +Cc: linux-wireless
In-Reply-To: <1294138841.4166.38.camel@wimaxnb.nmp.nokia.com>

On Tue, 2011-01-04 at 13:00 +0200, Juuso Oikarinen wrote:

> > > As result, the STA does not ever enter WLAN PSM.
> > > 
> > > Anyone stumbled on this issue?
> > 
> > I haven't come across it, but we don't test hidden SSIDs much ...
> > sounds perfectly logical.
> 
> I would fix this, but I'm afraid I don't know enough about the mac80211
> to make a valid decision on how to go about that.
> 
> For PSM, this is an issue about the TIM IE, or more specifically the
> DTIM period. AFAIK, all the bss entries with the same BSSID should share
> the same DTIM period - I think this is valid for other cases with
> multiple SSIDs on one BSSID too.
> 
> 
> Any suggestions on how to approach this issue?

I'd probably see if you can update all the matching BSS structs with the
received beacon IEs.

johannes


^ permalink raw reply

* Re: Hidden SSID and WLAN powersave
From: Juuso Oikarinen @ 2011-01-04 11:00 UTC (permalink / raw)
  To: ext Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1294138071.3511.0.camel@jlt3.sipsolutions.net>

On Tue, 2011-01-04 at 11:47 +0100, ext Johannes Berg wrote:
> On Tue, 2011-01-04 at 12:26 +0200, Juuso Oikarinen wrote:
> > Hi,
> > 
> > I stumbled upon a PSM issue when a hidden SSID is used. It seems that
> > mac80211 is not going to power-save mode with hidden SSID AP's at all.
> > 
> > As far as I can see the following happens:
> > 
> > - When generally scanning, the AP is getting a bss entry with a zero
> > SSID.
> > - When associating, a probe-req is sent to the AP with the SSID, and as
> > result a probe-response is received with the hidden SSID in place -> a
> > second bss entry is created for the AP, now with the real SSID.
> > - After association, mac80211 executes ieee80211_recalc_ps(), but does
> > not go to powersave because the beacon-ies are missing.
> > - A new beacon is received for the BSSID, but it updates the bss entry
> > with the zero SSID, ieee80211_recalc_ps() gets called, but for the
> > associated bss entry the beacon-ies are still missing.
> > 
> > As result, the STA does not ever enter WLAN PSM.
> > 
> > Anyone stumbled on this issue?
> 
> I haven't come across it, but we don't test hidden SSIDs much ...
> sounds perfectly logical.

I would fix this, but I'm afraid I don't know enough about the mac80211
to make a valid decision on how to go about that.

For PSM, this is an issue about the TIM IE, or more specifically the
DTIM period. AFAIK, all the bss entries with the same BSSID should share
the same DTIM period - I think this is valid for other cases with
multiple SSIDs on one BSSID too.


Any suggestions on how to approach this issue?

-Juuso




^ permalink raw reply

* Re: Hidden SSID and WLAN powersave
From: Johannes Berg @ 2011-01-04 10:47 UTC (permalink / raw)
  To: Juuso Oikarinen; +Cc: linux-wireless
In-Reply-To: <1294136801.4166.30.camel@wimaxnb.nmp.nokia.com>

On Tue, 2011-01-04 at 12:26 +0200, Juuso Oikarinen wrote:
> Hi,
> 
> I stumbled upon a PSM issue when a hidden SSID is used. It seems that
> mac80211 is not going to power-save mode with hidden SSID AP's at all.
> 
> As far as I can see the following happens:
> 
> - When generally scanning, the AP is getting a bss entry with a zero
> SSID.
> - When associating, a probe-req is sent to the AP with the SSID, and as
> result a probe-response is received with the hidden SSID in place -> a
> second bss entry is created for the AP, now with the real SSID.
> - After association, mac80211 executes ieee80211_recalc_ps(), but does
> not go to powersave because the beacon-ies are missing.
> - A new beacon is received for the BSSID, but it updates the bss entry
> with the zero SSID, ieee80211_recalc_ps() gets called, but for the
> associated bss entry the beacon-ies are still missing.
> 
> As result, the STA does not ever enter WLAN PSM.
> 
> Anyone stumbled on this issue?

I haven't come across it, but we don't test hidden SSIDs much ...
sounds perfectly logical.

johannes


^ permalink raw reply

* [PATCH] ath9k_hw: Fix RX handling for USB devices
From: Sujith @ 2011-01-04  8:13 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Sujith.Manoharan

From: Sujith Manoharan <Sujith.Manoharan@atheros.com>

Commit "ath9k_hw: Abort rx if hw is not coming out of full sleep in reset"
uncondionally added aborting RX DMA in a HW reset, though it is a bit
unclear as to why this is needed.

Anyway, RX DMA is handled in the target for USB devices, and this would
interfere with normal operations (scanning etc.), so fix this.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/hw.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index 4a44f71..1afb8bb 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1214,7 +1214,7 @@ int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
 	ah->txchainmask = common->tx_chainmask;
 	ah->rxchainmask = common->rx_chainmask;
 
-	if (!ah->chip_fullsleep) {
+	if ((common->bus_ops->ath_bus_type != ATH_USB) && !ah->chip_fullsleep) {
 		ath9k_hw_abortpcurecv(ah);
 		if (!ath9k_hw_stopdmarecv(ah)) {
 			ath_dbg(common, ATH_DBG_XMIT,
-- 
1.7.3.4


^ permalink raw reply related

* [PATCH 5/5] ath9k_hw: Offload USB eeprom reading to target
From: Sujith @ 2011-01-04  7:47 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Sujith.Manoharan

From: Sujith Manoharan <Sujith.Manoharan@atheros.com>

For USB devices, reading the EEPROM data can be offloaded
to the target. Use multiple register reads to take advantage
of this feature to reduce initialization time.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/eeprom.c      |   32 ++++++++++++++++++
 drivers/net/wireless/ath/ath9k/eeprom.h      |    2 +
 drivers/net/wireless/ath/ath9k/eeprom_4k.c   |   41 +++++++++++++++++------
 drivers/net/wireless/ath/ath9k/eeprom_9287.c |   45 +++++++++++++++++--------
 drivers/net/wireless/ath/ath9k/eeprom_def.c  |   32 ++++++++++++++++--
 5 files changed, 123 insertions(+), 29 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c
index d051631..8c18bed 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom.c
@@ -89,6 +89,38 @@ bool ath9k_hw_get_lower_upper_index(u8 target, u8 *pList, u16 listSize,
 	return false;
 }
 
+void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data,
+				  int eep_start_loc, int size)
+{
+	int i = 0, j, addr;
+	u32 addrdata[8];
+	u32 data[8];
+
+	for (addr = 0; addr < size; addr++) {
+		addrdata[i] = AR5416_EEPROM_OFFSET +
+			((addr + eep_start_loc) << AR5416_EEPROM_S);
+		i++;
+		if (i == 8) {
+			REG_READ_MULTI(ah, addrdata, data, i);
+
+			for (j = 0; j < i; j++) {
+				*eep_data = data[j];
+				eep_data++;
+			}
+			i = 0;
+		}
+	}
+
+	if (i != 0) {
+		REG_READ_MULTI(ah, addrdata, data, i);
+
+		for (j = 0; j < i; j++) {
+			*eep_data = data[j];
+			eep_data++;
+		}
+	}
+}
+
 bool ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data)
 {
 	return common->bus_ops->eeprom_read(common, off, data);
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.h b/drivers/net/wireless/ath/ath9k/eeprom.h
index 58e2ddc..bd82447 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom.h
+++ b/drivers/net/wireless/ath/ath9k/eeprom.h
@@ -665,6 +665,8 @@ int16_t ath9k_hw_interpolate(u16 target, u16 srcLeft, u16 srcRight,
 bool ath9k_hw_get_lower_upper_index(u8 target, u8 *pList, u16 listSize,
 				    u16 *indexL, u16 *indexR);
 bool ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data);
+void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data,
+				  int eep_start_loc, int size);
 void ath9k_hw_fill_vpd_table(u8 pwrMin, u8 pwrMax, u8 *pPwrList,
 			     u8 *pVpdList, u16 numIntercepts,
 			     u8 *pRetVpdList);
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
index fbdff7e..bc77a30 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
@@ -27,19 +27,13 @@ static int ath9k_hw_4k_get_eeprom_rev(struct ath_hw *ah)
 	return ((ah->eeprom.map4k.baseEepHeader.version) & 0xFFF);
 }
 
-static bool ath9k_hw_4k_fill_eeprom(struct ath_hw *ah)
-{
 #define SIZE_EEPROM_4K (sizeof(struct ar5416_eeprom_4k) / sizeof(u16))
+
+static bool __ath9k_hw_4k_fill_eeprom(struct ath_hw *ah)
+{
 	struct ath_common *common = ath9k_hw_common(ah);
 	u16 *eep_data = (u16 *)&ah->eeprom.map4k;
-	int addr, eep_start_loc = 0;
-
-	eep_start_loc = 64;
-
-	if (!ath9k_hw_use_flash(ah)) {
-		ath_dbg(common, ATH_DBG_EEPROM,
-			"Reading from EEPROM, not flash\n");
-	}
+	int addr, eep_start_loc = 64;
 
 	for (addr = 0; addr < SIZE_EEPROM_4K; addr++) {
 		if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) {
@@ -51,9 +45,34 @@ static bool ath9k_hw_4k_fill_eeprom(struct ath_hw *ah)
 	}
 
 	return true;
-#undef SIZE_EEPROM_4K
 }
 
+static bool __ath9k_hw_usb_4k_fill_eeprom(struct ath_hw *ah)
+{
+	u16 *eep_data = (u16 *)&ah->eeprom.map4k;
+
+	ath9k_hw_usb_gen_fill_eeprom(ah, eep_data, 64, SIZE_EEPROM_4K);
+
+	return true;
+}
+
+static bool ath9k_hw_4k_fill_eeprom(struct ath_hw *ah)
+{
+	struct ath_common *common = ath9k_hw_common(ah);
+
+	if (!ath9k_hw_use_flash(ah)) {
+		ath_dbg(common, ATH_DBG_EEPROM,
+			"Reading from EEPROM, not flash\n");
+	}
+
+	if (common->bus_ops->ath_bus_type == ATH_USB)
+		return __ath9k_hw_usb_4k_fill_eeprom(ah);
+	else
+		return __ath9k_hw_4k_fill_eeprom(ah);
+}
+
+#undef SIZE_EEPROM_4K
+
 static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)
 {
 #define EEPROM_4K_SIZE (sizeof(struct ar5416_eeprom_4k) / sizeof(u16))
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
index 9b6bc8a..8cd8333 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
@@ -17,7 +17,7 @@
 #include "hw.h"
 #include "ar9002_phy.h"
 
-#define NUM_EEP_WORDS (sizeof(struct ar9287_eeprom) / sizeof(u16))
+#define SIZE_EEPROM_AR9287 (sizeof(struct ar9287_eeprom) / sizeof(u16))
 
 static int ath9k_hw_ar9287_get_eeprom_ver(struct ath_hw *ah)
 {
@@ -29,25 +29,15 @@ static int ath9k_hw_ar9287_get_eeprom_rev(struct ath_hw *ah)
 	return (ah->eeprom.map9287.baseEepHeader.version) & 0xFFF;
 }
 
-static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
+static bool __ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
 {
 	struct ar9287_eeprom *eep = &ah->eeprom.map9287;
 	struct ath_common *common = ath9k_hw_common(ah);
 	u16 *eep_data;
-	int addr, eep_start_loc;
+	int addr, eep_start_loc = AR9287_EEP_START_LOC;
 	eep_data = (u16 *)eep;
 
-	if (common->bus_ops->ath_bus_type == ATH_USB)
-		eep_start_loc = AR9287_HTC_EEP_START_LOC;
-	else
-		eep_start_loc = AR9287_EEP_START_LOC;
-
-	if (!ath9k_hw_use_flash(ah)) {
-		ath_dbg(common, ATH_DBG_EEPROM,
-			"Reading from EEPROM, not flash\n");
-	}
-
-	for (addr = 0; addr < NUM_EEP_WORDS; addr++) {
+	for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) {
 		if (!ath9k_hw_nvram_read(common, addr + eep_start_loc,
 					 eep_data)) {
 			ath_dbg(common, ATH_DBG_EEPROM,
@@ -60,6 +50,31 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
 	return true;
 }
 
+static bool __ath9k_hw_usb_ar9287_fill_eeprom(struct ath_hw *ah)
+{
+	u16 *eep_data = (u16 *)&ah->eeprom.map9287;
+
+	ath9k_hw_usb_gen_fill_eeprom(ah, eep_data,
+				     AR9287_HTC_EEP_START_LOC,
+				     SIZE_EEPROM_AR9287);
+	return true;
+}
+
+static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
+{
+	struct ath_common *common = ath9k_hw_common(ah);
+
+	if (!ath9k_hw_use_flash(ah)) {
+		ath_dbg(common, ATH_DBG_EEPROM,
+			"Reading from EEPROM, not flash\n");
+	}
+
+	if (common->bus_ops->ath_bus_type == ATH_USB)
+		return __ath9k_hw_usb_ar9287_fill_eeprom(ah);
+	else
+		return __ath9k_hw_ar9287_fill_eeprom(ah);
+}
+
 static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah)
 {
 	u32 sum = 0, el, integer;
@@ -86,7 +101,7 @@ static int ath9k_hw_ar9287_check_eeprom(struct ath_hw *ah)
 				need_swap = true;
 				eepdata = (u16 *)(&ah->eeprom);
 
-				for (addr = 0; addr < NUM_EEP_WORDS; addr++) {
+				for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) {
 					temp = swab16(*eepdata);
 					*eepdata = temp;
 					eepdata++;
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
index 749a936..c9318ff 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
@@ -86,9 +86,10 @@ static int ath9k_hw_def_get_eeprom_rev(struct ath_hw *ah)
 	return ((ah->eeprom.def.baseEepHeader.version) & 0xFFF);
 }
 
-static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah)
-{
 #define SIZE_EEPROM_DEF (sizeof(struct ar5416_eeprom_def) / sizeof(u16))
+
+static bool __ath9k_hw_def_fill_eeprom(struct ath_hw *ah)
+{
 	struct ath_common *common = ath9k_hw_common(ah);
 	u16 *eep_data = (u16 *)&ah->eeprom.def;
 	int addr, ar5416_eep_start_loc = 0x100;
@@ -103,9 +104,34 @@ static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah)
 		eep_data++;
 	}
 	return true;
-#undef SIZE_EEPROM_DEF
 }
 
+static bool __ath9k_hw_usb_def_fill_eeprom(struct ath_hw *ah)
+{
+	u16 *eep_data = (u16 *)&ah->eeprom.def;
+
+	ath9k_hw_usb_gen_fill_eeprom(ah, eep_data,
+				     0x100, SIZE_EEPROM_DEF);
+	return true;
+}
+
+static bool ath9k_hw_def_fill_eeprom(struct ath_hw *ah)
+{
+	struct ath_common *common = ath9k_hw_common(ah);
+
+	if (!ath9k_hw_use_flash(ah)) {
+		ath_dbg(common, ATH_DBG_EEPROM,
+			"Reading from EEPROM, not flash\n");
+	}
+
+	if (common->bus_ops->ath_bus_type == ATH_USB)
+		return __ath9k_hw_usb_def_fill_eeprom(ah);
+	else
+		return __ath9k_hw_def_fill_eeprom(ah);
+}
+
+#undef SIZE_EEPROM_DEF
+
 static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)
 {
 	struct ar5416_eeprom_def *eep =
-- 
1.7.3.4


^ permalink raw reply related

* [PATCH 4/5] ath9k_htc: Add multiple register read API
From: Sujith @ 2011-01-04  7:47 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Sujith.Manoharan

From: Sujith Manoharan <Sujith.Manoharan@atheros.com>

This would decrease latency in reading bulk registers.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath.h                |    2 +
 drivers/net/wireless/ath/ath9k/htc_drv_init.c |   29 +++++++++++++++++++++++++
 drivers/net/wireless/ath/ath9k/hw.h           |    3 ++
 3 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath.h b/drivers/net/wireless/ath/ath.h
index e43210c..a6c6a46 100644
--- a/drivers/net/wireless/ath/ath.h
+++ b/drivers/net/wireless/ath/ath.h
@@ -108,12 +108,14 @@ enum ath_cipher {
  * struct ath_ops - Register read/write operations
  *
  * @read: Register read
+ * @multi_read: Multiple register read
  * @write: Register write
  * @enable_write_buffer: Enable multiple register writes
  * @write_flush: flush buffered register writes and disable buffering
  */
 struct ath_ops {
 	unsigned int (*read)(void *, u32 reg_offset);
+	void (*multi_read)(void *, u32 *addr, u32 *val, u16 count);
 	void (*write)(void *, u32 val, u32 reg_offset);
 	void (*enable_write_buffer)(void *);
 	void (*write_flush) (void *);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 9150ca6..f1c628e 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -297,6 +297,34 @@ static unsigned int ath9k_regread(void *hw_priv, u32 reg_offset)
 	return be32_to_cpu(val);
 }
 
+static void ath9k_multi_regread(void *hw_priv, u32 *addr,
+				u32 *val, u16 count)
+{
+	struct ath_hw *ah = (struct ath_hw *) hw_priv;
+	struct ath_common *common = ath9k_hw_common(ah);
+	struct ath9k_htc_priv *priv = (struct ath9k_htc_priv *) common->priv;
+	__be32 tmpaddr[8];
+	__be32 tmpval[8];
+	int i, ret;
+
+       for (i = 0; i < count; i++) {
+	       tmpaddr[i] = cpu_to_be32(addr[i]);
+       }
+
+       ret = ath9k_wmi_cmd(priv->wmi, WMI_REG_READ_CMDID,
+			   (u8 *)tmpaddr , sizeof(u32) * count,
+			   (u8 *)tmpval, sizeof(u32) * count,
+			   100);
+	if (unlikely(ret)) {
+		ath_dbg(common, ATH_DBG_WMI,
+			"Multiple REGISTER READ FAILED (count: %d)\n", count);
+	}
+
+       for (i = 0; i < count; i++) {
+	       val[i] = be32_to_cpu(tmpval[i]);
+       }
+}
+
 static void ath9k_regwrite_single(void *hw_priv, u32 val, u32 reg_offset)
 {
 	struct ath_hw *ah = (struct ath_hw *) hw_priv;
@@ -407,6 +435,7 @@ static void ath9k_regwrite_flush(void *hw_priv)
 
 static const struct ath_ops ath9k_common_ops = {
 	.read = ath9k_regread,
+	.multi_read = ath9k_multi_regread,
 	.write = ath9k_regwrite,
 	.enable_write_buffer = ath9k_enable_regwrite_buffer,
 	.write_flush = ath9k_regwrite_flush,
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 5a3dfec..c2b3515 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -70,6 +70,9 @@
 #define REG_READ(_ah, _reg) \
 	ath9k_hw_common(_ah)->ops->read((_ah), (_reg))
 
+#define REG_READ_MULTI(_ah, _addr, _val, _cnt)		\
+	ath9k_hw_common(_ah)->ops->multi_read((_ah), (_addr), (_val), (_cnt))
+
 #define ENABLE_REGWRITE_BUFFER(_ah)					\
 	do {								\
 		if (ath9k_hw_common(_ah)->ops->enable_write_buffer)	\
-- 
1.7.3.4


^ permalink raw reply related

* [PATCH 3/5] ath9k_hw: Fix thermal issue with UB94
From: Sujith @ 2011-01-04  7:47 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Sujith.Manoharan

From: Sujith Manoharan <Sujith.Manoharan@atheros.com>

Hardcode the output voltage of x-PA bias LDO to the lowest
value for UB94. The card doesn't get too hot now.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/eeprom_def.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c
index 088f141..749a936 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_def.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c
@@ -226,6 +226,10 @@ static int ath9k_hw_def_check_eeprom(struct ath_hw *ah)
 	    eep->baseEepHeader.pwdclkind == 0)
 		ah->need_an_top2_fixup = 1;
 
+	if ((common->bus_ops->ath_bus_type == ATH_USB) &&
+	    (AR_SREV_9280(ah)))
+		eep->modalHeader[0].xpaBiasLvl = 0;
+
 	return 0;
 }
 
-- 
1.7.3.4


^ permalink raw reply related

* [PATCH 2/5] ath9k_hw: Fix calibration for AR9287 devices
From: Sujith @ 2011-01-04  7:46 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Sujith.Manoharan

From: Sujith Manoharan <Sujith.Manoharan@atheros.com>

AR9287 based devices have issues with ADC gain calibration
which would cause uplink throughput drops in HT40 mode.
Remove ADC gain from the supported calibration algorithms.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/ar9002_calib.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9002_calib.c b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
index 01880aa..ea2e7d7 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
@@ -954,6 +954,9 @@ static void ar9002_hw_init_cal_settings(struct ath_hw *ah)
 				&adc_dc_cal_multi_sample;
 		}
 		ah->supp_cals = ADC_GAIN_CAL | ADC_DC_CAL | IQ_MISMATCH_CAL;
+
+		if (AR_SREV_9287(ah))
+			ah->supp_cals &= ~ADC_GAIN_CAL;
 	}
 }
 
-- 
1.7.3.4


^ permalink raw reply related

* [PATCH 1/5] ath9k_hw: Fix chip test
From: Sujith @ 2011-01-04  7:46 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Sujith.Manoharan

From: Sujith Manoharan <Sujith.Manoharan@atheros.com>

USB devices do not require the chip test routine.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/hw.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index fde9786..4a44f71 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -436,9 +436,10 @@ static int ath9k_hw_init_macaddr(struct ath_hw *ah)
 
 static int ath9k_hw_post_init(struct ath_hw *ah)
 {
+	struct ath_common *common = ath9k_hw_common(ah);
 	int ecode;
 
-	if (!AR_SREV_9271(ah)) {
+	if (common->bus_ops->ath_bus_type != ATH_USB) {
 		if (!ath9k_hw_chip_test(ah))
 			return -ENODEV;
 	}
-- 
1.7.3.4


^ permalink raw reply related

* Re: (rt61pci/hostapd) no packet activity when encryption is enabled and interface is bridged
From: C Anthony Risinger @ 2011-01-04  7:09 UTC (permalink / raw)
  To: linux-wireless; +Cc: C Anthony Risinger
In-Reply-To: <AANLkTinM9oPV=CJ3iUP2=fEH=+fRP5JPMO4tHLOZzHrS@mail.gmail.com>

On Mon, Jan 3, 2011 at 10:30 PM, C Anthony Risinger <anthony@extof.me> wrote:
>
> problem summary: an rt61pci driven card does not seem to allow any
> packets to enter/exit it's bridge ONLY WHEN ENCRYPTION is enabled;
> without it, everything works perfectly.

hmmmmm....

it would seem:

options rt61pci nohwcrypt=1

solves the problem.  what does this mean?  do i have a bad chip?
trying to determine if i need to exchange it; bought locally as a temp
card while i wait for my atheros USB b/g/n stick to have AP support
[ath9k_htc].

thanks,

C Anthony

^ permalink raw reply

* (rt61pci/hostapd) no packet activity when encryption is enabled and interface is bridged
From: C Anthony Risinger @ 2011-01-04  4:30 UTC (permalink / raw)
  To: linux-wireless

hello,

i've been trying to solve this for a few days, so after much googling,
i've given in and am looking here for assistance.

problem summary: an rt61pci driven card does not seem to allow any
packets to enter/exit it's bridge ONLY WHEN ENCRYPTION is enabled;
without it, everything works perfectly.

i recently bought an older wireless G card for use as an access point
to replace my ageing wrt54g.  my physical server runs libvirt/kvm and
[next to] nothing else.  hostapd runs on the host.  when hostapd
starts up, the card's interface (wlan0) is added to an existing bridge
(green0) via hostapd's config option.  a small VM is also linked to
this bridge; this "router/gateway" VM provides all local networking
services (NAT/DHCP/DNS forward/etc.), and manages the untrusted,
outside connection (red0)... also a bridge.

interface summary:

---------------------------------------------------------------

red0
    bridge.  untrusted; direct attached to internet
green0
    bridge.  trusted; [W]LAN and VM clients
wlan0
    wireless interface (rt61pci)
vnet0-0
    host facing interface of the router VM (WAN [red0])
vnet0-1
    VM facing interface of the router VM (WAN [red0])
vnet1-0
    host facing interface of the router VM (LAN [green0])
vnet1-1
    VM facing interface of the router VM (LAN [green0])
eth0
    untrusted physical link to internet

---------------------------------------------------------------

visual-ish summary:

---------------------------------------------------------------

[ green0 ]( wlan0, vnet1-0 )
|
|
[ vnet1-1 ]
:
: (firewall rules, policies, etc.)
:
[ vnet0-1 ]
|
|
[ red0 ]( eth0, vnet0-0 )

---------------------------------------------------------------

now, everything works perfectly... right up until i enable WPA in
hostapd.  after that, my clients can associate just fine (in fact, -dd
shows no sign of any problems whatsoever, see below) but they cannot
receive an IP via DHCP... no packets seem to pass through at all
(ifconfig?).

i have read elsewhere about problems with bridging, so i'm about to
test right now by running a DHCP daemon directly on wlan0... but i
can't do anything useful/simply without bridge support.

does anyone know what's going on here, or any tips on how to
confirm/test/debug?  i have tried from 4 clients with the same
results:

) google nexus s mobile
) samsung vibrant mobile
) thinkpad t43
) eee s101

so i'm fairly confident it's the AP.  also, when i do this (on host)
while hostapd is running:

ip link set wlan0 down && ip link set wlan0 up;

it strangely starts working (clients get IP, and can use the
connection for awhile), but not consistently; the nexus reconnects
every 5-10 seconds, and though the t43 remains connected... the AP
will shortly stop allowing traffic, and back to square one.

ideas?  following is every piece of info i thought might be useful :-)
let me know if i missed anything.  all commands (except last) ran from
host while hostapd runs in background.

thanks,

C Anthony

---------------------------------------------------------------

# lspci -s 04:06.0 -vv
04:06.0 Network controller: RaLink RT2561/RT61 802.11g PCI
	Subsystem: ASUSTeK Computer Inc. Device 837e
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV+ VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 64, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 21
	Region 0: Memory at febf8000 (32-bit, non-prefetchable) [size=32K]
	Capabilities: [40] Power Management version 2
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst- PME-Enable- DSel=0 DScale=0 PME-
	Kernel driver in use: rt61pci
	Kernel modules: rt61pci

---------------------------------------------------------------

(kernel 2.6.36.2)
# uname -a
Linux extofme-p01 2.6.36-ARCH #1 SMP PREEMPT Fri Dec 10 20:32:37 CET
2010 x86_64 AMD Phenom(tm) 9950 Quad-Core Processor AuthenticAMD
GNU/Linux

---------------------------------------------------------------

# modinfo rt61pci
filename:
/lib/modules/2.6.36-ARCH/kernel/drivers/net/wireless/rt2x00/rt61pci.ko
license:        GPL
firmware:       rt2661.bin
firmware:       rt2561s.bin
firmware:       rt2561.bin
description:    Ralink RT61 PCI & PCMCIA Wireless LAN driver.
version:        2.3.0
author:         http://rt2x00.serialmonkey.com
srcversion:     F1774A00C329E6A439932A5
alias:          pci:v00001814d00000401sv*sd*bc*sc*i*
alias:          pci:v00001814d00000302sv*sd*bc*sc*i*
alias:          pci:v00001814d00000301sv*sd*bc*sc*i*
depends:        rt2x00lib,rt2x00pci,eeprom_93cx6,crc-itu-t
vermagic:       2.6.36-ARCH SMP preempt mod_unload
parm:           nohwcrypt:Disable hardware encryption. (bool)

---------------------------------------------------------------

# ip link && ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP qlen 1000
    link/ether 00:23:54:16:74:82 brd ff:ff:ff:ff:ff:ff
4: red0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether 00:23:54:16:74:82 brd ff:ff:ff:ff:ff:ff
5: green0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN
    link/ether 48:5b:39:bd:fe:a2 brd ff:ff:ff:ff:ff:ff
7: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 500
    link/ether fe:54:00:75:c8:9d brd ff:ff:ff:ff:ff:ff
8: vnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 500
    link/ether fe:54:00:07:60:02 brd ff:ff:ff:ff:ff:ff
26: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state
UNKNOWN qlen 1000
    link/ether 48:5b:39:bd:fe:a2 brd ff:ff:ff:ff:ff:ff
27: mon.wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq
state UNKNOWN qlen 1000
    link/ieee802.11/radiotap 48:5b:39:bd:fe:a2 brd ff:ff:ff:ff:ff:ff
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UP qlen 1000
    link/ether 00:23:54:16:74:82 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::223:54ff:fe16:7482/64 scope link
       valid_lft forever preferred_lft forever
4: red0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN
    link/ether 00:23:54:16:74:82 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.150/24 brd 192.168.1.255 scope global red0
    inet6 fe80::223:54ff:fe16:7482/64 scope link
       valid_lft forever preferred_lft forever
5: green0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN
    link/ether 48:5b:39:bd:fe:a2 brd ff:ff:ff:ff:ff:ff
    inet 10.10.10.102/24 brd 10.10.10.255 scope global green0
    inet6 fe80::4a5b:39ff:febd:fea2/64 scope link
       valid_lft forever preferred_lft forever
7: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 500
    link/ether fe:54:00:75:c8:9d brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fe75:c89d/64 scope link
       valid_lft forever preferred_lft forever
8: vnet1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN qlen 500
    link/ether fe:54:00:07:60:02 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fe07:6002/64 scope link
       valid_lft forever preferred_lft forever
26: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state
UNKNOWN qlen 1000
    link/ether 48:5b:39:bd:fe:a2 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::4a5b:39ff:febd:fea2/64 scope link
       valid_lft forever preferred_lft forever
27: mon.wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq
state UNKNOWN qlen 1000
    link/ieee802.11/radiotap 48:5b:39:bd:fe:a2 brd ff:ff:ff:ff:ff:ff

---------------------------------------------------------------

(slightly edited for email)
# brctl show
bridge name	bridge id		STP enabled	interfaces
green0		8000.485b39bdfea2	no		vnet1, wlan0
red0		8000.002354167482	no		eth0, vnet0

---------------------------------------------------------------

(minimal version... the one i tweaked based on defaults had same results)
# cat /etc/hostapd/hostapd.conf
interface=wlan0
bridge=green0
logger_stdout=-1
logger_stdout_level=0
ssid=MySSID
hw_mode=g
channel=8
wpa=2
wpa_passphrase=wifipass
wpa_key_mgmt=WPA-PSK
rsn_pairwise=CCMP

---------------------------------------------------------------

# hostapd -dd /etc/hostapd/hostapd.conf
Configuration file: /etc/hostapd/hostapd.conf
nl80211: Add own interface ifindex 5
nl80211: Add own interface ifindex 18
nl80211: New interface mon.wlan0 created: ifindex=24
nl80211: Add own interface ifindex 24
nl80211: Adding interface wlan0 into bridge green0
BSS count 1, BSSID mask 00:00:00:00:00:00 (0 bits)
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=19 dBm
Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=19 dBm
Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=19 dBm
Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=19 dBm
Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=19 dBm
Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=17 dBm
Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=17 dBm
Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=17 dBm
Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=17 dBm
Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=17 dBm
Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=15 dBm
Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=19 dBm
Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=19 dBm
Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=19 dBm
Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=19 dBm
Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=19 dBm
Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=17 dBm
Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=17 dBm
Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=17 dBm
Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=17 dBm
Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=17 dBm
Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=15 dBm
RATE[0] rate=10 flags=0x1
RATE[1] rate=20 flags=0x1
RATE[2] rate=55 flags=0x1
RATE[3] rate=110 flags=0x1
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Completing interface initialization
Mode: IEEE 802.11g  Channel: 8  Frequency: 2447 MHz
Flushing old station entries
Deauthenticate all stations
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=(nil) key_idx=0
set_tx=1 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=(nil) key_idx=1
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=(nil) key_idx=2
set_tx=0 seq_len=0 key_len=0
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=(nil) key_idx=3
set_tx=0 seq_len=0 key_len=0
Using interface wlan0 with hwaddr 48:5b:39:bd:fe:a2 and ssid 'MySSID'
Deriving WPA PSK based on passphrase
SSID - hexdump_ascii(len=6):
     4d 79 53 53 49 44                                 MySSID
PSK (ASCII passphrase) - hexdump_ascii(len=8): [REMOVED]
PSK (from passphrase) - hexdump(len=32): [REMOVED]
WPA: group state machine entering state GTK_INIT (VLAN-ID 0)
GMK - hexdump(len=32): [REMOVED]
GTK - hexdump(len=16): [REMOVED]
WPA: group state machine entering state SETKEYSDONE (VLAN-ID 0)
wpa_driver_nl80211_set_key: ifindex=18 alg=3 addr=(nil) key_idx=1
set_tx=1 seq_len=0 key_len=16
nl80211: Set beacon (beacon_set=0)
wlan0: Setup of interface done.
RTM_NEWLINK: operstate=0 ifi_flags=0x1002 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'mon.wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x1102 ()
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
nl80211: Add ifindex 5 for bridge green0
nl80211: Add own interface ifindex 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11143 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
RTM_NEWLINK: operstate=0 ifi_flags=0x11143 ([UP][RUNNING][LOWER_UP])
RTM_NEWLINK, IFLA_IFNAME: Interface 'wlan0' added
Unknown event 5
nl80211: Add ifindex 5 for bridge green0
nl80211: Add own interface ifindex 5
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for our SSID
mgmt::proberesp cb
mgmt::auth
authentication: STA=b4:07:f9:e3:1d:5c auth_alg=0 auth_transaction=1
status_code=0 wep=0
  New STA
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: authentication OK (open system)
wlan0: STA b4:07:f9:e3:1d:5c MLME:
MLME-AUTHENTICATE.indication(b4:07:f9:e3:1d:5c, OPEN_SYSTEM)
wlan0: STA b4:07:f9:e3:1d:5c MLME: MLME-DELETEKEYS.request(b4:07:f9:e3:1d:5c)
authentication reply: STA=b4:07:f9:e3:1d:5c auth_alg=0
auth_transaction=2 resp=0 (IE len=0)
mgmt::assoc_req
association request: STA=b4:07:f9:e3:1d:5c capab_info=0x431 listen_interval=10
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
  new AID 1
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: association OK (aid 1)
mgmt::auth cb
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: authenticated
mgmt::assoc_resp cb
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: associated (aid 1)
wlan0: STA b4:07:f9:e3:1d:5c MLME: MLME-ASSOCIATE.indication(b4:07:f9:e3:1d:5c)
wlan0: STA b4:07:f9:e3:1d:5c MLME: MLME-DELETEKEYS.request(b4:07:f9:e3:1d:5c)
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c WPA: start authentication
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.1X: unauthorizing port
WPA: b4:07:f9:e3:1d:5c WPA_PTK_GROUP entering state IDLE
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state AUTHENTICATION
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state AUTHENTICATION2
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state INITPSK
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state PTKSTART
wlan0: STA b4:07:f9:e3:1d:5c WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8
kde_len=0 keyidx=0 encr=0)
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
IEEE 802.1X: b4:07:f9:e3:1d:5c TX status - version=2 type=3 length=95 - ack=1
IEEE 802.1X: 121 bytes from b4:07:f9:e3:1d:5c
   IEEE 802.1X: version=1 type=3 length=117
wlan0: STA b4:07:f9:e3:1d:5c WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state PTKCALCNEGOTIATING
WPA: PTK derivation - A1=48:5b:39:bd:fe:a2 A2=b4:07:f9:e3:1d:5c
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state PTKINITNEGOTIATING
wlan0: STA b4:07:f9:e3:1d:5c WPA: sending 3/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8
kde_len=46 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=56): [REMOVED]
IEEE 802.1X: b4:07:f9:e3:1d:5c TX status - version=2 type=3 length=151 - ack=1
IEEE 802.1X: 99 bytes from b4:07:f9:e3:1d:5c
   IEEE 802.1X: version=1 type=3 length=95
wlan0: STA b4:07:f9:e3:1d:5c WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state PTKINITDONE
wpa_driver_nl80211_set_key: ifindex=18 alg=3 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=16
   addr=b4:07:f9:e3:1d:5c
AP-STA-CONNECTED b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.1X: authorizing port
wlan0: STA b4:07:f9:e3:1d:5c RADIUS: starting accounting session
4D229FBB-00000000
wlan0: STA b4:07:f9:e3:1d:5c WPA: pairwise key handshake completed (RSN)
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
STA 00:23:15:1a:ea:dc sent probe request for broadcast SSID
mgmt::proberesp cb
STA 00:23:15:1a:ea:dc sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
STA 00:13:ce:77:8a:eb sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
STA 00:13:ce:77:8a:eb sent probe request for broadcast SSID
mgmt::proberesp cb
STA 00:13:ce:77:8a:eb sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
mgmt::disassoc
disassocation: STA=b4:07:f9:e3:1d:5c reason_code=8
AP-STA-DISCONNECTED b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c WPA: event 2 notification
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state DISCONNECTED
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.1X: unauthorizing port
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: disassociated
wlan0: STA b4:07:f9:e3:1d:5c MLME:
MLME-DISASSOCIATE.indication(b4:07:f9:e3:1d:5c, 8)
wlan0: STA b4:07:f9:e3:1d:5c MLME: MLME-DELETEKEYS.request(b4:07:f9:e3:1d:5c)
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
Sending deauthentication info to STA b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: deauthenticated due to inactivity
wlan0: STA b4:07:f9:e3:1d:5c MLME:
MLME-DEAUTHENTICATE.indication(b4:07:f9:e3:1d:5c, 2)
wlan0: STA b4:07:f9:e3:1d:5c MLME: MLME-DELETEKEYS.request(b4:07:f9:e3:1d:5c)
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for broadcast SSID
mgmt::proberesp cb
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
STA b4:07:f9:e3:1d:5c sent probe request for our SSID
mgmt::proberesp cb
mgmt::auth
authentication: STA=b4:07:f9:e3:1d:5c auth_alg=0 auth_transaction=1
status_code=0 wep=0
  New STA
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: authentication OK (open system)
wlan0: STA b4:07:f9:e3:1d:5c MLME:
MLME-AUTHENTICATE.indication(b4:07:f9:e3:1d:5c, OPEN_SYSTEM)
wlan0: STA b4:07:f9:e3:1d:5c MLME: MLME-DELETEKEYS.request(b4:07:f9:e3:1d:5c)
authentication reply: STA=b4:07:f9:e3:1d:5c auth_alg=0
auth_transaction=2 resp=0 (IE len=0)
mgmt::auth cb
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: authenticated
mgmt::assoc_req
association request: STA=b4:07:f9:e3:1d:5c capab_info=0x431 listen_interval=10
unknown vendor specific information element ignored (vendor OUI 00:10:18 len=9)
  new AID 1
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: association OK (aid 1)
mgmt::assoc_resp cb
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: associated (aid 1)
wlan0: STA b4:07:f9:e3:1d:5c MLME: MLME-ASSOCIATE.indication(b4:07:f9:e3:1d:5c)
wlan0: STA b4:07:f9:e3:1d:5c MLME: MLME-DELETEKEYS.request(b4:07:f9:e3:1d:5c)
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c WPA: event 1 notification
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c WPA: start authentication
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.1X: unauthorizing port
WPA: b4:07:f9:e3:1d:5c WPA_PTK_GROUP entering state IDLE
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state AUTHENTICATION
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state AUTHENTICATION2
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state INITPSK
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state PTKSTART
wlan0: STA b4:07:f9:e3:1d:5c WPA: sending 1/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=0 mic=0 ack=1 install=0 pairwise=8
kde_len=0 keyidx=0 encr=0)
nl80211: Event message available
nl80211: Ignored unknown event (cmd=19)
IEEE 802.1X: b4:07:f9:e3:1d:5c TX status - version=2 type=3 length=95 - ack=1
IEEE 802.1X: 121 bytes from b4:07:f9:e3:1d:5c
   IEEE 802.1X: version=1 type=3 length=117
wlan0: STA b4:07:f9:e3:1d:5c WPA: received EAPOL-Key frame (2/4 Pairwise)
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state PTKCALCNEGOTIATING
WPA: PTK derivation - A1=48:5b:39:bd:fe:a2 A2=b4:07:f9:e3:1d:5c
WPA: PMK - hexdump(len=32): [REMOVED]
WPA: PTK - hexdump(len=48): [REMOVED]
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state PTKCALCNEGOTIATING2
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state PTKINITNEGOTIATING
wlan0: STA b4:07:f9:e3:1d:5c WPA: sending 3/4 msg of 4-Way Handshake
WPA: Send EAPOL(version=2 secure=1 mic=1 ack=1 install=1 pairwise=8
kde_len=46 keyidx=1 encr=1)
Plaintext EAPOL-Key Key Data - hexdump(len=56): [REMOVED]
IEEE 802.1X: b4:07:f9:e3:1d:5c TX status - version=2 type=3 length=151 - ack=1
IEEE 802.1X: 99 bytes from b4:07:f9:e3:1d:5c
   IEEE 802.1X: version=1 type=3 length=95
wlan0: STA b4:07:f9:e3:1d:5c WPA: received EAPOL-Key frame (4/4 Pairwise)
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state PTKINITDONE
wpa_driver_nl80211_set_key: ifindex=18 alg=3 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=16
   addr=b4:07:f9:e3:1d:5c
AP-STA-CONNECTED b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.1X: authorizing port
wlan0: STA b4:07:f9:e3:1d:5c RADIUS: starting accounting session
4D229FBB-00000001
wlan0: STA b4:07:f9:e3:1d:5c WPA: pairwise key handshake completed (RSN)
...
...
(the STA will then disco in a couple seconds like above ...)
...
...
mgmt::disassoc
disassocation: STA=b4:07:f9:e3:1d:5c reason_code=8
AP-STA-DISCONNECTED b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c WPA: event 2 notification
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state DISCONNECTED
WPA: b4:07:f9:e3:1d:5c WPA_PTK entering state INITIALIZE
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.1X: unauthorizing port
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: disassociated
wlan0: STA b4:07:f9:e3:1d:5c MLME:
MLME-DISASSOCIATE.indication(b4:07:f9:e3:1d:5c, 8)
wlan0: STA b4:07:f9:e3:1d:5c MLME: MLME-DELETEKEYS.request(b4:07:f9:e3:1d:5c)
wpa_driver_nl80211_set_key: ifindex=18 alg=0 addr=0x2051090 key_idx=0
set_tx=1 seq_len=0 key_len=0
   addr=b4:07:f9:e3:1d:5c
Sending deauthentication info to STA b4:07:f9:e3:1d:5c
wlan0: STA b4:07:f9:e3:1d:5c IEEE 802.11: deauthenticated due to inactivity
wlan0: STA b4:07:f9:e3:1d:5c MLME:
MLME-DEAUTHENTICATE.indication(b4:07:f9:e3:1d:5c, 2)
wlan0: STA b4:07:f9:e3:1d:5c MLME: MLME-DELETEKEYS.request(b4:07:f9:e3:1d:5c)
...
...
(... and the whole thing repeats over and over because the STA never
receives a DHCP response, and the DHCP server never gets the
request... wtf yo?)
...
...

^ permalink raw reply

* [PATCH] mwifiex: remove struct ieee_htcap
From: Bing Zhao @ 2011-01-04  3:43 UTC (permalink / raw)
  To: linux-wireless
  Cc: John W. Linville, Johannes Berg, Amitkumar Karwar, Kiran Divekar,
	Frank Huang, Bing Zhao

replace it with struct ieee80211_ht_cap

Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Kiran Divekar <dkiran@marvell.com>
---
 drivers/net/wireless/mwifiex/11n.c      |   28 ++++++++++++++++------------
 drivers/net/wireless/mwifiex/cfg80211.c |   13 +++++++------
 drivers/net/wireless/mwifiex/fw.h       |    2 +-
 drivers/net/wireless/mwifiex/ieee.h     |   11 +----------
 drivers/net/wireless/mwifiex/ioctl.h    |    2 --
 drivers/net/wireless/mwifiex/join.c     |   11 ++++++-----
 drivers/net/wireless/mwifiex/scan.c     |    3 ++-
 7 files changed, 33 insertions(+), 37 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/11n.c b/drivers/net/wireless/mwifiex/11n.c
index 93de7ca..e4a0314 100644
--- a/drivers/net/wireless/mwifiex/11n.c
+++ b/drivers/net/wireless/mwifiex/11n.c
@@ -353,9 +353,10 @@ mwifiex_fill_cap_info(struct mwifiex_private *priv,
 		      struct mwifiex_ie_types_htcap *ht_cap)
 {
 	struct mwifiex_adapter *adapter = priv->adapter;
+	u8 *mcs;
 	int rx_mcs_supp;
-	uint16_t ht_cap_info = le16_to_cpu(ht_cap->ht_cap.ht_cap_info);
-	uint16_t ht_ext_cap = le16_to_cpu(ht_cap->ht_cap.ht_ext_cap);
+	uint16_t ht_cap_info = le16_to_cpu(ht_cap->ht_cap.cap_info);
+	uint16_t ht_ext_cap = le16_to_cpu(ht_cap->ht_cap.extended_ht_cap_info);
 
 	ENTER();
 
@@ -407,32 +408,34 @@ mwifiex_fill_cap_info(struct mwifiex_private *priv,
 	else
 		RESETHT_40MHZ_INTOLARANT(ht_cap_info);
 
-	SETAMPDU_SIZE(ht_cap->ht_cap.ampdu_param, AMPDU_FACTOR_64K);
-	SETAMPDU_SPACING(ht_cap->ht_cap.ampdu_param, 0);
+	SETAMPDU_SIZE(ht_cap->ht_cap.ampdu_params_info, AMPDU_FACTOR_64K);
+	SETAMPDU_SPACING(ht_cap->ht_cap.ampdu_params_info, 0);
 
 	/* Need change to support 8k AMSDU receive */
 	RESETHT_MAXAMSDU(ht_cap_info);
 
 	rx_mcs_supp = GET_RXMCSSUPP(adapter->hw_dev_mcs_support);
 
+	mcs = (u8 *)&ht_cap->ht_cap.mcs;
+
 	/* Set MCS for 1x1 */
-	memset((u8 *) ht_cap->ht_cap.supported_mcs_set, 0xff, rx_mcs_supp);
+	memset(mcs, 0xff, rx_mcs_supp);
 
 	/* Clear all the other values */
-	memset((u8 *) &ht_cap->ht_cap.supported_mcs_set[rx_mcs_supp], 0,
-	       NUM_MCS_FIELD - rx_mcs_supp);
+	memset(&mcs[rx_mcs_supp], 0,
+			sizeof(struct ieee80211_mcs_info) - rx_mcs_supp);
 
 	if (priv->bss_mode == MWIFIEX_BSS_MODE_INFRA ||
 	    (ISSUPP_CHANWIDTH40(adapter->hw_dot_11n_dev_cap) &&
 	     ISSUPP_CHANWIDTH40(adapter->usr_dot_11n_dev_cap)))
 		/* Set MCS32 for infra mode or ad-hoc mode with 40MHz support */
-		SETHT_MCS32(ht_cap->ht_cap.supported_mcs_set);
+		SETHT_MCS32(ht_cap->ht_cap.mcs.rx_mask);
 
 	/* Clear RD responder bit */
 	RESETHT_EXTCAP_RDG(ht_ext_cap);
 
-	ht_cap->ht_cap.ht_cap_info = cpu_to_le16(ht_cap_info);
-	ht_cap->ht_cap.ht_ext_cap = cpu_to_le16(ht_ext_cap);
+	ht_cap->ht_cap.cap_info = cpu_to_le16(ht_cap_info);
+	ht_cap->ht_cap.extended_ht_cap_info = cpu_to_le16(ht_ext_cap);
 
 	LEAVE();
 }
@@ -830,7 +833,8 @@ mwifiex_cmd_append_11n_tlv(struct mwifiex_private *priv,
 		ht_cap = (struct mwifiex_ie_types_htcap *) *buffer;
 		memset(ht_cap, 0, sizeof(struct mwifiex_ie_types_htcap));
 		ht_cap->header.type = cpu_to_le16(WLAN_EID_HT_CAPABILITY);
-		ht_cap->header.len = cpu_to_le16(sizeof(struct ieee_htcap));
+		ht_cap->header.len =
+				cpu_to_le16(sizeof(struct ieee80211_ht_cap));
 		memcpy((u8 *) ht_cap + sizeof(struct mwifiex_ie_types_header),
 		       (u8 *) bss_desc->bcn_ht_cap +
 		       sizeof(struct ieee_types_header),
@@ -964,7 +968,7 @@ mwifiex_cfg_tx_buf(struct mwifiex_private *priv,
 
 	if (bss_desc->bcn_ht_cap) {
 		if (GETHT_MAXAMSDU(le16_to_cpu(bss_desc->bcn_ht_cap->ht_cap
-				.ht_cap_info)))
+				.cap_info)))
 			max_amsdu = MWIFIEX_TX_DATA_BUF_SIZE_8K;
 		else
 			max_amsdu = MWIFIEX_TX_DATA_BUF_SIZE_4K;
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index 8d74446..c961e0f 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1416,7 +1416,8 @@ mwifiex_setup_ht_caps(struct ieee80211_sta_ht_cap *ht_info,
 		      struct mwifiex_private *priv)
 {
 	int rx_mcs_supp;
-	u8 mcs_set[NUM_MCS_FIELD];
+	struct ieee80211_mcs_info mcs_set;
+	u8 *mcs = (u8 *)&mcs_set;
 	struct mwifiex_adapter *adapter = priv->adapter;
 	ENTER();
 
@@ -1429,17 +1430,17 @@ mwifiex_setup_ht_caps(struct ieee80211_sta_ht_cap *ht_info,
 
 	rx_mcs_supp = GET_RXMCSSUPP(priv->adapter->hw_dev_mcs_support);
 	/* Set MCS for 1x1 */
-	memset((u8 *) mcs_set, 0xff, rx_mcs_supp);
+	memset(mcs, 0xff, rx_mcs_supp);
 	/* Clear all the other values */
-	memset((u8 *) &mcs_set[rx_mcs_supp], 0,
-			NUM_MCS_FIELD - rx_mcs_supp);
+	memset(&mcs[rx_mcs_supp], 0,
+			sizeof(struct ieee80211_mcs_info) - rx_mcs_supp);
 	if (priv->bss_mode == MWIFIEX_BSS_MODE_INFRA ||
 			(ISSUPP_CHANWIDTH40(adapter->hw_dot_11n_dev_cap) &&
 			 ISSUPP_CHANWIDTH40(adapter->usr_dot_11n_dev_cap)))
 		/* Set MCS32 for infra mode or ad-hoc mode with 40MHz support */
-		SETHT_MCS32(mcs_set);
+		SETHT_MCS32(mcs_set.rx_mask);
 
-	memcpy(&ht_info->mcs, mcs_set, NUM_MCS_FIELD);
+	memcpy((u8 *) &ht_info->mcs, mcs, sizeof(struct ieee80211_mcs_info));
 
 	ht_info->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
 
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index f166991..d2c39c7 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -1170,7 +1170,7 @@ struct mwifiex_wmm_ac_status {
 
 struct mwifiex_ie_types_htcap {
 	struct mwifiex_ie_types_header header;
-	struct ieee_htcap ht_cap;
+	struct ieee80211_ht_cap ht_cap;
 } __packed;
 
 struct mwifiex_ie_types_htinfo {
diff --git a/drivers/net/wireless/mwifiex/ieee.h b/drivers/net/wireless/mwifiex/ieee.h
index 8888106..70af50c 100644
--- a/drivers/net/wireless/mwifiex/ieee.h
+++ b/drivers/net/wireless/mwifiex/ieee.h
@@ -158,15 +158,6 @@ struct ieee_types_wmm_parameter {
 #define MWIFIEX_MAX_TRIPLET_802_11D		83
 #define COUNTRY_CODE_LEN			3
 
-struct ieee_htcap {
-	__le16 ht_cap_info;
-	u8 ampdu_param;
-	u8 supported_mcs_set[16];
-	__le16 ht_ext_cap;
-	u32 tx_bf_cap;
-	u8 asel;
-} __packed;
-
 struct ieee_bssco_2040 {
 	u8 bss_co_2040_value;
 } __packed;
@@ -187,7 +178,7 @@ struct ieee_obss_scan_param {
 
 struct ieee_types_htcap {
 	struct ieee_types_header ieee_hdr;
-	struct ieee_htcap ht_cap;
+	struct ieee80211_ht_cap ht_cap;
 } __packed;
 
 struct ieee_types_htinfo {
diff --git a/drivers/net/wireless/mwifiex/ioctl.h b/drivers/net/wireless/mwifiex/ioctl.h
index c5205cb..5ed613d 100644
--- a/drivers/net/wireless/mwifiex/ioctl.h
+++ b/drivers/net/wireless/mwifiex/ioctl.h
@@ -605,8 +605,6 @@ struct mwifiex_ds_wmm_cfg {
 	} param;
 };
 
-#define NUM_MCS_FIELD				16
-
 struct mwifiex_ds_11n_addba_param {
 	u32 timeout;
 	u32 tx_win_size;
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index 8723c85..6ef516c 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -1121,19 +1121,20 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv,
 			ht_cap->header.type =
 				cpu_to_le16(WLAN_EID_HT_CAPABILITY);
 			ht_cap->header.len =
-			       cpu_to_le16(sizeof(struct ieee_htcap));
-			ht_cap_info = le16_to_cpu(ht_cap->ht_cap.ht_cap_info);
+			       cpu_to_le16(sizeof(struct ieee80211_ht_cap));
+			ht_cap_info = le16_to_cpu(ht_cap->ht_cap.cap_info);
 
 			SETHT_SHORTGI20(ht_cap_info);
 			if (adapter->chan_offset) {
 				SETHT_SHORTGI40(ht_cap_info);
 				SETHT_DSSSCCK40(ht_cap_info);
 				SETHT_SUPPCHANWIDTH(ht_cap_info);
-				SETHT_MCS32(ht_cap->ht_cap.supported_mcs_set);
+				SETHT_MCS32(ht_cap->ht_cap.mcs.rx_mask);
 			}
 
-			ht_cap->ht_cap.ampdu_param = MAX_RX_AMPDU_SIZE_64K;
-			ht_cap->ht_cap.supported_mcs_set[0] = 0xff;
+			ht_cap->ht_cap.ampdu_params_info
+					= MAX_RX_AMPDU_SIZE_64K;
+			ht_cap->ht_cap.mcs.rx_mask[0] = 0xff;
 			HEXDUMP("ADHOC_START: HT_CAPABILITIES IE",
 				(u8 *) ht_cap,
 				sizeof(struct mwifiex_ie_types_htcap));
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 29d457a..104589e 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1132,7 +1132,8 @@ mwifiex_scan_setup_scan_config(struct mwifiex_private *priv,
 		ht_cap = (struct mwifiex_ie_types_htcap *) tlv_pos;
 		memset(ht_cap, 0, sizeof(struct mwifiex_ie_types_htcap));
 		ht_cap->header.type = cpu_to_le16(WLAN_EID_HT_CAPABILITY);
-		ht_cap->header.len = cpu_to_le16(sizeof(struct ieee_htcap));
+		ht_cap->header.len =
+				cpu_to_le16(sizeof(struct ieee80211_ht_cap));
 		mwifiex_fill_cap_info(priv, ht_cap);
 		HEXDUMP("SCAN: HT_CAPABILITIES IE", (u8 *) ht_cap,
 			sizeof(struct mwifiex_ie_types_htcap));
-- 
1.7.0.2


^ permalink raw reply related

* Re: Tp-link wn7200nd - cannot associate
From: Ming-Ching Tiew @ 2011-01-04  1:45 UTC (permalink / raw)
  To: linux-wireless
In-Reply-To: <AANLkTinBGj6Q1DoGogerhFDMD0ZR1OVYqjSucc-a4oPu@mail.gmail.com>



--- On Mon, 1/3/11, Rafał Miłecki <zajec5@gmail.com> wrote:

> >
> > I have a TP-LINK WN7200ND, I am tested it with Kernel
> 2.6.36.1 and 2.6.35.10, basically after inserting the USB,
> the interface is up and it can never associate with any
> access point.
> >
> > #lsmod |grep rt2
> >
> > rt2800usb               7632  0
> > rt2800lib              20328  1 rt2800usb
> > rt2x00usb               4628  2
> rt2800usb,rt2800lib
> > rt2x00lib              15408  2
> rt2800lib,rt2x00usb
> > mac80211              122068  2
> rt2x00usb,rt2x00lib
> > cfg80211               92252  2
> rt2x00lib,mac80211
> >
> > There are a lot of similar complaints on the net, this
> is one example :-
> >
> > http://ubuntuforums.org/showthread.php?t=1530095
> >
> > There don't seem to be any issue with 'iwlist wlanX
> scan'. But just can't associate.
> >
> > Any recommendation ? Any debug information I should
> provide ?
> 
> Are your networks encrypted? How? What is output of
> wpa_supplicant? Did you try
> nohwcrypt=1
> ?
> 

Thanks for the reply. Now I am suspecting that it's the power supply to the usb device. The device is supposed to be 500mW, what do I have to do to check indeed the notebook usb power supply is not enough ?

Regards.


      

^ permalink raw reply

* Re: [PATCH] Revert "ath9k: Parse DTIM period from mac80211"
From: Kalle Valo @ 2011-01-03 21:25 UTC (permalink / raw)
  To: Jouni Malinen
  Cc: Mohammed Shafi Shajakhan, linville, linux-wireless, lrodriguez,
	Jouni Malinen
In-Reply-To: <20110102085300.GA14217@jm.kir.nu>

Jouni Malinen <j@w1.fi> writes:

> On Sat, Jan 01, 2011 at 11:50:50AM +0200, Kalle Valo wrote:
>> Mohammed Shafi Shajakhan <mshajakhan@atheros.com> writes:
>> > * Preventing association with broken AP's
>> 
>> How can different dtim value cause problems with association? Power
>> save should not be even enabled during association. Or do you mean
>> there are problems after association, for example during eap
>> negotation?
>
> It is not the DTIM value, it is the part of having to receive a Beacon
> frame before even trying to associate. This is very much a corner case,
> but well, that behavior did change with the commit.

[...]

> The real issue (as far as I can tell) was that ath9k was changed to
> require mac80211 to get it DTIM period before association. I'm not aware
> of any need for that with ath9k. It should have no problems updating PS
> parameters after association and as such, should not require mac80211 to
> figure DTIM period out before being able to associate. This change is
> not about hardcoding DTIM period; it is about removing unneeded change
> that added extra latency without any real gain.

Ah, sorry. I misunderstood the case here then.

I have a feeling ath9k consumes quite a lot of power already, even
when I use dtim 10, and I was worried if ath9k power consumption even
increases more :)

-- 
Kalle Valo

^ permalink raw reply

* Compat-wireless release for 2011-01-03 is baked
From: Compat-wireless cronjob account @ 2011-01-03 20:02 UTC (permalink / raw)
  To: linux-wireless

cat: /var/opt/compat/compat-wireless-2.6/compat_version: No such file or directory
cat: compat_base_tree: No such file or directory
cat: compat_base_tree_version: No such file or directory
cat: compat_version: No such file or directory
cat: /var/opt/compat/compat-wireless-2.6/compat_version: No such file or directory
scripts/Makefile.clean:17: /var/opt/compat/compat-wireless-2.6/drivers/net/wireless/hostap/Makefile: No such file or directory
make[4]: *** No rule to make target `/var/opt/compat/compat-wireless-2.6/drivers/net/wireless/hostap/Makefile'.  Stop.
make[3]: *** [/var/opt/compat/compat-wireless-2.6/drivers/net/wireless/hostap] Error 2
make[2]: *** [/var/opt/compat/compat-wireless-2.6/drivers/net/wireless] Error 2
make[1]: *** [_clean_/var/opt/compat/compat-wireless-2.6] Error 2
make: *** [clean] Error 2
/usr/bin/sha1sum: *.tar.bz2: No such file or directory

compat-wireless code metrics

    774936 - Total upstream lines of code being pulled

^ permalink raw reply

* [PATCH] mac80211: fix some key comments and code
From: Johannes Berg @ 2011-01-03 18:51 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless@vger.kernel.org

From: Johannes Berg <johannes.berg@intel.com>

The key documentation is slightly out of date, fix
that. Also, the list entry in the key struct is no
longer used that way, so list_del_init() isn't
necessary any more there.

Finally, ieee80211_key_link() is no longer invoked
under RCU read lock, but rather with an appropriate
station lock held.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/key.c |   38 +++++++++++++++++---------------------
 1 file changed, 17 insertions(+), 21 deletions(-)

--- wireless-testing.orig/net/mac80211/key.c	2011-01-03 19:04:20.000000000 +0100
+++ wireless-testing/net/mac80211/key.c	2011-01-03 19:48:40.000000000 +0100
@@ -30,19 +30,20 @@
  * keys and per-station keys. Since each station belongs to an interface,
  * each station key also belongs to that interface.
  *
- * Hardware acceleration is done on a best-effort basis, for each key
- * that is eligible the hardware is asked to enable that key but if
- * it cannot do that they key is simply kept for software encryption.
- * There is currently no way of knowing this except by looking into
- * debugfs.
+ * Hardware acceleration is done on a best-effort basis for algorithms
+ * that are implemented in software,  for each key the hardware is asked
+ * to enable that key for offloading but if it cannot do that the key is
+ * simply kept for software encryption (unless it is for an algorithm
+ * that isn't implemented in software).
+ * There is currently no way of knowing whether a key is handled in SW
+ * or HW except by looking into debugfs.
  *
- * All key operations are protected internally.
- *
- * Within mac80211, key references are, just as STA structure references,
- * protected by RCU. Note, however, that some things are unprotected,
- * namely the key->sta dereferences within the hardware acceleration
- * functions. This means that sta_info_destroy() must remove the key
- * which waits for an RCU grace period.
+ * All key management is internally protected by a mutex. Within all
+ * other parts of mac80211, key references are, just as STA structure
+ * references, protected by RCU. Note, however, that some things are
+ * unprotected, namely the key->sta dereferences within the hardware
+ * acceleration functions. This means that sta_info_destroy() must
+ * remove the key which waits for an RCU grace period.
  */
 
 static const u8 bcast_addr[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
@@ -279,13 +280,8 @@ static void __ieee80211_key_replace(stru
 							 new->conf.keyidx);
 	}
 
-	if (old) {
-		/*
-		 * We'll use an empty list to indicate that the key
-		 * has already been removed.
-		 */
-		list_del_init(&old->list);
-	}
+	if (old)
+		list_del(&old->list);
 }
 
 struct ieee80211_key *ieee80211_key_alloc(u32 cipher, int idx, size_t key_len,
@@ -426,8 +422,8 @@ int ieee80211_key_link(struct ieee80211_
 			struct sta_info *ap;
 
 			/*
-			 * We're getting a sta pointer in,
-			 * so must be under RCU read lock.
+			 * We're getting a sta pointer in, so must be under
+			 * appropriate locking for sta_info_get().
 			 */
 
 			/* same here, the AP could be using QoS */



^ permalink raw reply

* [PATCH 2.6.37] mac80211: add missing synchronize_rcu
From: Johannes Berg @ 2011-01-03 18:42 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless@vger.kernel.org

From: Johannes Berg <johannes.berg@intel.com>

commit ad0e2b5a00dbec303e4682b403bb6703d11dcdb2
Author: Johannes Berg <johannes.berg@intel.com>
Date:   Tue Jun 1 10:19:19 2010 +0200

    mac80211: simplify key locking

removed the synchronization against RCU and thus
opened a race window where we can use a key for
TX while it is already freed. Put a synchronisation
into the right place to close that window.

Reported-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Cc: stable@kernel.org [2.6.36+]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/key.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- wireless-testing.orig/net/mac80211/key.c	2011-01-03 19:04:10.000000000 +0100
+++ wireless-testing/net/mac80211/key.c	2011-01-03 19:04:20.000000000 +0100
@@ -379,6 +379,12 @@ static void __ieee80211_key_destroy(stru
 	if (!key)
 		return;
 
+	/*
+	 * Synchronize so the TX path can no longer be using
+	 * this key before we free/remove it.
+	 */
+	synchronize_rcu();
+
 	if (key->local)
 		ieee80211_key_disable_hw_accel(key);
 



^ permalink raw reply

* Re: OOPS at ieee80211_aes_ccm_encrypt()?
From: Johannes Berg @ 2011-01-03 18:16 UTC (permalink / raw)
  To: Jussi Kivilinna; +Cc: linux-wireless
In-Reply-To: <20110103201138.146879onsq0vcqqg@hayate.sektori.org>

On Mon, 2011-01-03 at 20:11 +0200, Jussi Kivilinna wrote:
> Quoting Johannes Berg <johannes@sipsolutions.net>:
> 
> >
> > It looks like it. Can you reproduce this fairly easily? I wonder if it's
> > an RCU problem, we do key lookups under RCU but I see no grace period
> > right now ... try the patch below, I'll look into it in more detail.
> >
> 
> I have been running tests past two weeks and this came up once. I have  
> been running hostapd with wpa_group_rekey=30 and wpa_ptk_rekey=60 and  
> doing 'nc < /dev/zero > /dev/null' at both ends and 'ping -f'. When  
> this crash happened other end was rndis_wlan. I'll try reproducing,  
> but doubt it will.

Alright, thanks. In the meantime, I dug through the code and history and
saw that there was a synchronize_rcu that I accidentally removed, so
I'll just send out the patch with more commentary.

johannes




^ permalink raw reply

* Re: wl1271 status/update
From: Elvis Dowson @ 2011-01-03 18:11 UTC (permalink / raw)
  To: Brzezowski, Karen; +Cc: Linux Wireless Mailing List
In-Reply-To: <0826983CC0CB074798C42E77D8ACD07F0616CB@pdtms1.pdt.com>


On Jan 3, 2011, at 8:02 PM, Brzezowski, Karen wrote:

> talk has been about compat-wireless, etc..

I tried this briefly and abandoned it, because the android-2.6.32 kernel code base is
different from the run-time pm sdio patch set that's published on the wl1271 wiki site.

I managed to get the proprietary ti wilink 6.1.0.0 working with an arago-omappsp-03.00.00.05-kernel.

But for some reason, when compiling it against the android-2.6.32 (rowboat-eclair-2.6.32 kernel)
it gives some sdio related errors. I'm still working on it.

the wl1271 wlan driver in the android kernel didn't work, possibly for the same reason that the wilink-6.1.0.0
driver didn't work with the android kernel.

I mean, one would think that its already been made to work, i.e. rowboat-eclair-2.6.32 kernel + android-2.2 wl1271 driver
but that is so far from the truth.

Elvis Dowson

^ permalink raw reply

* Re: OOPS at ieee80211_aes_ccm_encrypt()?
From: Jussi Kivilinna @ 2011-01-03 18:11 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1294073190.3436.2.camel@jlt3.sipsolutions.net>

Quoting Johannes Berg <johannes@sipsolutions.net>:

>
> It looks like it. Can you reproduce this fairly easily? I wonder if it's
> an RCU problem, we do key lookups under RCU but I see no grace period
> right now ... try the patch below, I'll look into it in more detail.
>

I have been running tests past two weeks and this came up once. I have  
been running hostapd with wpa_group_rekey=30 and wpa_ptk_rekey=60 and  
doing 'nc < /dev/zero > /dev/null' at both ends and 'ping -f'. When  
this crash happened other end was rndis_wlan. I'll try reproducing,  
but doubt it will.

-Jussi



^ permalink raw reply

* Re: wl1271 status/update
From: Ohad Ben-Cohen @ 2011-01-03 17:23 UTC (permalink / raw)
  To: Brzezowski, Karen; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <0826983CC0CB074798C42E77D8ACD07F063277@pdtms1.pdt.com>

Hi Karen,

On Mon, Jan 3, 2011 at 7:00 PM, Brzezowski, Karen
<Karen.Brzezowski@pdt.com> wrote:
...
> I see things about compat-wireless, mac80211, sdio runtime pm support,
> lenient generic runtime pm callbacks,
> etc..
>
> I don't really understand.. do i need all of this for wl1271...

compat-wireless will build you the mac80211 layer and the wl1271
driver as external modules.

Normally that should have been enough, but in order to support the
SDIO interface of the wl1271 we had to change a few stuff in the
kernel (mainly add runtime PM support into the SDIO subsystem).

Those changes were merged into 2.6.37, so users of older kernels have
to backport them manually. Here's the list of items you need:

* SDIO runtime PM (11 patches)
* The "lenient pm callbacks" patch (a really small and trivial patch)
* "wl12xx: add platform data passing support" (that one is not
mentioned in the wiki yet for some reason, here's its link:
http://www.mail-archive.com/linux-omap@vger.kernel.org/msg34839.html)

But if you're using 2.6.31 you may need other stuff too.. E.g. I'm not
sure that SDIO suspend/resume even made it to 2.6.31 at all...

> is there any high level documentation as to how wl1271 fits into linux/android?

Hmm.. the wiki ?  :)

Regards,
Ohad.

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox