Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: any controller working in AP mode ?
From: Ram kumar @ 2009-07-20 12:03 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: Javier Cardona, andrey, linux-wireless
In-Reply-To: <1247843954.25608.62.camel@mj>

hi,

> 5 minute search finds that Zonet ZEW2502 is what you need.  There is
> only one driver for that device on the Zonet site, and it's clearly for
> Marvell.
>
Thanks for the reply.
but when i visited the zonet website the ZEW2502 is under discontinued
products.But they have come up with higher versions of wireless usb
adapters like.

1.ZEW2542
http://www.zonetusa.com/products-140.aspx

ZEW2542 it uses Ralink RT2770+RT2720.
When i study the user manual of ZEW2542 it says it can support
software AP mode.The device uses Ralink wireless configuration tool
instead of the native windows wireless configuration tool to configure
the device.

but linux wireless website doesn't specify any info about RT2770.It
would he helpful if you can tell me whether the ZEW2542 can be
configured with hostapd ?

2.ZEW2507
http://www.zonetusa.com/products-54.aspx

ZEW2507 uses Chipset  	Ralink RT2571 + RT2528

I am assuming this device can be easily configured in linux using
hostapd.please correct me if i am wrong.

Regards,
Ram

^ permalink raw reply

* [PATCH v2] ath5k: fix values for bus error bits in ISR2
From: Pavel Roskin @ 2009-07-20 12:00 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, ath5k-devel

The new values are taken from the recently open sourced Atheros HAL.
Correctness is also confirmed by the users with access to Atheros
documentation.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
Now with the masks.  Pointed out by Brett Wright <Brett.Wright@elprotech.com>

 drivers/net/wireless/ath/ath5k/reg.h |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/ath/ath5k/reg.h b/drivers/net/wireless/ath/ath5k/reg.h
index 6809b54..debad07 100644
--- a/drivers/net/wireless/ath/ath5k/reg.h
+++ b/drivers/net/wireless/ath/ath5k/reg.h
@@ -339,9 +339,9 @@
 #define AR5K_SISR2		0x008c			/* Register Address [5211+] */
 #define AR5K_SISR2_QCU_TXURN	0x000003ff	/* Mask for QCU_TXURN */
 #define	AR5K_SISR2_QCU_TXURN_S	0
-#define	AR5K_SISR2_MCABT	0x00100000	/* Master Cycle Abort */
-#define	AR5K_SISR2_SSERR	0x00200000	/* Signaled System Error */
-#define	AR5K_SISR2_DPERR	0x00400000	/* Bus parity error */
+#define	AR5K_SISR2_MCABT	0x00010000	/* Master Cycle Abort */
+#define	AR5K_SISR2_SSERR	0x00020000	/* Signaled System Error */
+#define	AR5K_SISR2_DPERR	0x00040000	/* Bus parity error */
 #define	AR5K_SISR2_TIM		0x01000000	/* [5212+] */
 #define	AR5K_SISR2_CAB_END	0x02000000	/* [5212+] */
 #define	AR5K_SISR2_DTIM_SYNC	0x04000000	/* DTIM sync lost [5212+] */
@@ -430,9 +430,9 @@
 #define AR5K_SIMR2		0x00ac			/* Register Address [5211+] */
 #define AR5K_SIMR2_QCU_TXURN	0x000003ff	/* Mask for QCU_TXURN */
 #define AR5K_SIMR2_QCU_TXURN_S	0
-#define	AR5K_SIMR2_MCABT	0x00100000	/* Master Cycle Abort */
-#define	AR5K_SIMR2_SSERR	0x00200000	/* Signaled System Error */
-#define	AR5K_SIMR2_DPERR	0x00400000	/* Bus parity error */
+#define	AR5K_SIMR2_MCABT	0x00010000	/* Master Cycle Abort */
+#define	AR5K_SIMR2_SSERR	0x00020000	/* Signaled System Error */
+#define	AR5K_SIMR2_DPERR	0x00040000	/* Bus parity error */
 #define	AR5K_SIMR2_TIM		0x01000000	/* [5212+] */
 #define	AR5K_SIMR2_CAB_END	0x02000000	/* [5212+] */
 #define	AR5K_SIMR2_DTIM_SYNC	0x04000000	/* DTIM Sync lost [5212+] */

-- 
Regards,
Pavel Roskin

^ permalink raw reply related

* Re: Using compat-wireless w/ 2.6.27.26
From: Bob Copeland @ 2009-07-20 11:52 UTC (permalink / raw)
  To: Philip A. Prindeville; +Cc: linux-wireless
In-Reply-To: <4A63DF0B.4010801@redfish-solutions.com>

On Sun, Jul 19, 2009 at 08:05:47PM -0700, Philip A. Prindeville wrote:
> Actually, it's saying:
> 
> filename:       /lib/modules/2.6.27.26-astlinux/kernel/drivers/net/wireless/ath5k/ath5k.ko
> depends:        mac80211,cfg80211
> 
> And the 0.6.0 version number matches ath5k/base.c in the compat-wireless
> sources as well.

Yeah, ignore the module version number, no one ever changes it.

> Not seeing the dependency on "ath", which is strange.  Is that common code
> that's shared in 2.6.30 for the Atheros drivers?

In 2.6.31, yes.

> > The fix was merged after 2.6.30, IIRC, but it should definitely be in
> > compat-wireless.  Also check your modules directory for an old ath5k.ko
> > sitting in drivers/.../wireless/ath5k.  It should now be in ath/ath5k.

See above, the fix was post-2.6.30, however compat-wireless should have
it.  The module should now be in drivers/net/wireless/ath/ath5k, not
drivers/net/wireless/ath5k.

-- 
Bob Copeland %% www.bobcopeland.com


^ permalink raw reply

* Re: [PATCH 3/5] iwmc3200wifi: use cfg80211_connect_result to send req/resp IE
From: Johannes Berg @ 2009-07-20 10:37 UTC (permalink / raw)
  To: Zhu Yi; +Cc: linville, linux-wireless
In-Reply-To: <1248061667-8614-4-git-send-email-yi.zhu@intel.com>

[-- Attachment #1: Type: text/plain, Size: 343 bytes --]

On Mon, 2009-07-20 at 11:47 +0800, Zhu Yi wrote:
> cfg80211_connect_result() let us specify associate request and
> response IEs as parameters after we are connected. We use this
> capability instead of doing it ourselves with WEXT.

I think with this, you can now remove

        select WIRELESS_EXT

from your Kconfig.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: [PATCH 2/5] cfg80211: fix typo of IWEVASSOCRESPIE
From: Johannes Berg @ 2009-07-20 10:36 UTC (permalink / raw)
  To: Zhu Yi; +Cc: linville, linux-wireless
In-Reply-To: <1248061667-8614-3-git-send-email-yi.zhu@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1157 bytes --]

On Mon, 2009-07-20 at 11:47 +0800, Zhu Yi wrote:
> It should be IWEVASSOCREQIE instead.

Indeed, thanks.

> Signed-off-by: Zhu Yi <yi.zhu@intel.com>
> ---
>  net/wireless/sme.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/net/wireless/sme.c b/net/wireless/sme.c
> index e7a8851..82de2d9 100644
> --- a/net/wireless/sme.c
> +++ b/net/wireless/sme.c
> @@ -341,7 +341,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
>  		if (req_ie && status == WLAN_STATUS_SUCCESS) {
>  			memset(&wrqu, 0, sizeof(wrqu));
>  			wrqu.data.length = req_ie_len;
> -			wireless_send_event(dev, IWEVASSOCRESPIE, &wrqu, req_ie);
> +			wireless_send_event(dev, IWEVASSOCREQIE, &wrqu, req_ie);
>  		}
>  
>  		if (resp_ie && status == WLAN_STATUS_SUCCESS) {
> @@ -474,7 +474,7 @@ void __cfg80211_roamed(struct wireless_dev *wdev, const u8 *bssid,
>  	if (req_ie) {
>  		memset(&wrqu, 0, sizeof(wrqu));
>  		wrqu.data.length = req_ie_len;
> -		wireless_send_event(wdev->netdev, IWEVASSOCRESPIE,
> +		wireless_send_event(wdev->netdev, IWEVASSOCREQIE,
>  				    &wrqu, req_ie);
>  	}
>  

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: [PATCH 1/5] cfg80211: set_default_key only for WEP
From: Johannes Berg @ 2009-07-20 10:34 UTC (permalink / raw)
  To: Zhu Yi; +Cc: linville, linux-wireless
In-Reply-To: <1248061667-8614-2-git-send-email-yi.zhu@intel.com>

[-- Attachment #1: Type: text/plain, Size: 986 bytes --]

On Mon, 2009-07-20 at 11:47 +0800, Zhu Yi wrote:
> We invoke the cfg80211 set_default_key callback only for WEP key
> configuring.
> 
> Signed-off-by: Zhu Yi <yi.zhu@intel.com>

Acked-by: Johannes Berg <johannes@sipsolutions.net>

> ---
>  net/wireless/wext-compat.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
> index aa80c0c..c63e10e 100644
> --- a/net/wireless/wext-compat.c
> +++ b/net/wireless/wext-compat.c
> @@ -531,7 +531,8 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
>  			wdev->wext.keys->data[idx];
>  	}
>  
> -	if (params->cipher != WLAN_CIPHER_SUITE_AES_CMAC &&
> +	if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 ||
> +	     params->cipher == WLAN_CIPHER_SUITE_WEP104) &&
>  	    (tx_key || (!addr && wdev->wext.default_key == -1))) {
>  		if (wdev->current_bss)
>  			err = rdev->ops->set_default_key(&rdev->wiphy,

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: [PATCH] cfg80211: avoid setting default_key if add_key fails
From: Johannes Berg @ 2009-07-20 10:34 UTC (permalink / raw)
  To: Zhu Yi; +Cc: linville, linux-wireless
In-Reply-To: <1248077577-7295-1-git-send-email-yi.zhu@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]

On Mon, 2009-07-20 at 16:12 +0800, Zhu Yi wrote:
> In cfg80211_upload_connect_keys(), we call add_key, set_default_key
> and set_default_mgmt_key (if applicable) one by one. If one of these
> operations fails, we should stop calling the following functions.
> Because if the key is not added successfully, we should not set it as
> default key anyway.

Should we even disconnect again in that case?

johannes

> Signed-off-by: Zhu Yi <yi.zhu@intel.com>
> ---
>  net/wireless/util.c |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/net/wireless/util.c b/net/wireless/util.c
> index 4bab380..ba387d8 100644
> --- a/net/wireless/util.c
> +++ b/net/wireless/util.c
> @@ -546,13 +546,17 @@ void cfg80211_upload_connect_keys(struct wireless_dev *wdev)
>  		if (!wdev->connect_keys->params[i].cipher)
>  			continue;
>  		if (rdev->ops->add_key(wdev->wiphy, dev, i, NULL,
> -					&wdev->connect_keys->params[i]))
> +					&wdev->connect_keys->params[i])) {
>  			printk(KERN_ERR "%s: failed to set key %d\n",
>  				dev->name, i);
> +			continue;
> +		}
>  		if (wdev->connect_keys->def == i)
> -			if (rdev->ops->set_default_key(wdev->wiphy, dev, i))
> +			if (rdev->ops->set_default_key(wdev->wiphy, dev, i)) {
>  				printk(KERN_ERR "%s: failed to set defkey %d\n",
>  					dev->name, i);
> +				continue;
> +			}
>  		if (wdev->connect_keys->defmgmt == i)
>  			if (rdev->ops->set_default_mgmt_key(wdev->wiphy, dev, i))
>  				printk(KERN_ERR "%s: failed to set mgtdef %d\n",

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* [PATCH] cfg80211: avoid setting default_key if add_key fails
From: Zhu Yi @ 2009-07-20  8:12 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Zhu Yi

In cfg80211_upload_connect_keys(), we call add_key, set_default_key
and set_default_mgmt_key (if applicable) one by one. If one of these
operations fails, we should stop calling the following functions.
Because if the key is not added successfully, we should not set it as
default key anyway.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 net/wireless/util.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/wireless/util.c b/net/wireless/util.c
index 4bab380..ba387d8 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -546,13 +546,17 @@ void cfg80211_upload_connect_keys(struct wireless_dev *wdev)
 		if (!wdev->connect_keys->params[i].cipher)
 			continue;
 		if (rdev->ops->add_key(wdev->wiphy, dev, i, NULL,
-					&wdev->connect_keys->params[i]))
+					&wdev->connect_keys->params[i])) {
 			printk(KERN_ERR "%s: failed to set key %d\n",
 				dev->name, i);
+			continue;
+		}
 		if (wdev->connect_keys->def == i)
-			if (rdev->ops->set_default_key(wdev->wiphy, dev, i))
+			if (rdev->ops->set_default_key(wdev->wiphy, dev, i)) {
 				printk(KERN_ERR "%s: failed to set defkey %d\n",
 					dev->name, i);
+				continue;
+			}
 		if (wdev->connect_keys->defmgmt == i)
 			if (rdev->ops->set_default_mgmt_key(wdev->wiphy, dev, i))
 				printk(KERN_ERR "%s: failed to set mgtdef %d\n",
-- 
1.6.0.4


^ permalink raw reply related

* Re: [PATCH] wl12xx: fix spelling
From: Kalle Valo @ 2009-07-20  4:53 UTC (permalink / raw)
  To: Stefan Weil; +Cc: John W. Linville, Linux wireless
In-Reply-To: <1248008439-4703-1-git-send-email-weil@mail.berlios.de>

Stefan Weil <weil@mail.berlios.de> writes:

> Changes (comments and debug output):
> * couldnt -> couldn't
> * frmware -> firmware
> * recevied -> received
>
> Cc: Kalle Valo <kalle.valo@nokia.com>
> Cc: John W. Linville <linville@tuxdriver.com>
> Cc: Linux wireless <linux-wireless@vger.kernel.org>
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>

Thanks. John, please take the patch.

Acked-by: Kalle Valo <kalle.valo@nokia.com>

-- 
Kalle Valo

^ permalink raw reply

* [PATCH 5/5] iwmc3200wifi: fix a use-after-free bug
From: Zhu Yi @ 2009-07-20  3:47 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Zhu Yi
In-Reply-To: <1248061667-8614-5-git-send-email-yi.zhu@intel.com>

The patch fixes a use-after-free bug for cmd->seq_num;

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwmc3200wifi/hal.c |   16 +++++++++-------
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/iwmc3200wifi/hal.c b/drivers/net/wireless/iwmc3200wifi/hal.c
index ee127fe..c430418 100644
--- a/drivers/net/wireless/iwmc3200wifi/hal.c
+++ b/drivers/net/wireless/iwmc3200wifi/hal.c
@@ -105,9 +105,9 @@
 #include "umac.h"
 #include "debug.h"
 
-static void iwm_nonwifi_cmd_init(struct iwm_priv *iwm,
-				 struct iwm_nonwifi_cmd *cmd,
-				 struct iwm_udma_nonwifi_cmd *udma_cmd)
+static int iwm_nonwifi_cmd_init(struct iwm_priv *iwm,
+				struct iwm_nonwifi_cmd *cmd,
+				struct iwm_udma_nonwifi_cmd *udma_cmd)
 {
 	INIT_LIST_HEAD(&cmd->pending);
 
@@ -118,7 +118,7 @@ static void iwm_nonwifi_cmd_init(struct iwm_priv *iwm,
 	cmd->seq_num = iwm->nonwifi_seq_num;
 	udma_cmd->seq_num = cpu_to_le16(cmd->seq_num);
 
-	cmd->seq_num = iwm->nonwifi_seq_num++;
+	iwm->nonwifi_seq_num++;
 	iwm->nonwifi_seq_num %= UMAC_NONWIFI_SEQ_NUM_MAX;
 
 	if (udma_cmd->resp)
@@ -130,6 +130,8 @@ static void iwm_nonwifi_cmd_init(struct iwm_priv *iwm,
 	cmd->buf.len = 0;
 
 	memcpy(&cmd->udma_cmd, udma_cmd, sizeof(*udma_cmd));
+
+	return cmd->seq_num;
 }
 
 u16 iwm_alloc_wifi_cmd_seq(struct iwm_priv *iwm)
@@ -369,7 +371,7 @@ int iwm_hal_send_target_cmd(struct iwm_priv *iwm,
 			    const void *payload)
 {
 	struct iwm_nonwifi_cmd *cmd;
-	int ret;
+	int ret, seq_num;
 
 	cmd = kzalloc(sizeof(struct iwm_nonwifi_cmd), GFP_KERNEL);
 	if (!cmd) {
@@ -377,7 +379,7 @@ int iwm_hal_send_target_cmd(struct iwm_priv *iwm,
 		return -ENOMEM;
 	}
 
-	iwm_nonwifi_cmd_init(iwm, cmd, udma_cmd);
+	seq_num = iwm_nonwifi_cmd_init(iwm, cmd, udma_cmd);
 
 	if (cmd->udma_cmd.opcode == UMAC_HDI_OUT_OPCODE_WRITE ||
 	    cmd->udma_cmd.opcode == UMAC_HDI_OUT_OPCODE_WRITE_PERSISTENT) {
@@ -393,7 +395,7 @@ int iwm_hal_send_target_cmd(struct iwm_priv *iwm,
 	if (ret < 0)
 		return ret;
 
-	return cmd->seq_num;
+	return seq_num;
 }
 
 static void iwm_build_lmac_hdr(struct iwm_priv *iwm, struct iwm_lmac_hdr *hdr,
-- 
1.6.0.4


^ permalink raw reply related

* [PATCH 4/5] iwmc3200wifi: fix cfg80211_connect_result is called in IBSS
From: Zhu Yi @ 2009-07-20  3:47 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Zhu Yi
In-Reply-To: <1248061667-8614-4-git-send-email-yi.zhu@intel.com>

Avoid calling cfg80211_connect_result() in IBSS mode.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwmc3200wifi/rx.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c
index 6743391..86079a1 100644
--- a/drivers/net/wireless/iwmc3200wifi/rx.c
+++ b/drivers/net/wireless/iwmc3200wifi/rx.c
@@ -517,6 +517,9 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf,
 
 		iwm_link_on(iwm);
 
+		if (iwm->conf.mode == UMAC_MODE_IBSS)
+			goto ibss;
+
 		cfg80211_connect_result(iwm_to_ndev(iwm),
 					complete->bssid,
 					iwm->req_ie, iwm->req_ie_len,
@@ -530,6 +533,9 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf,
 
 		iwm_link_off(iwm);
 
+		if (iwm->conf.mode == UMAC_MODE_IBSS)
+			goto ibss;
+
 		cfg80211_connect_result(iwm_to_ndev(iwm), complete->bssid,
 					NULL, 0, NULL, 0,
 					WLAN_STATUS_UNSPECIFIED_FAILURE,
@@ -538,11 +544,10 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf,
 		break;
 	}
 
-	if (iwm->conf.mode == UMAC_MODE_IBSS) {
-		cfg80211_ibss_joined(iwm_to_ndev(iwm), iwm->bssid, GFP_KERNEL);
-		return 0;
-	}
+	return 0;
 
+ ibss:
+	cfg80211_ibss_joined(iwm_to_ndev(iwm), iwm->bssid, GFP_KERNEL);
 	return 0;
 }
 
-- 
1.6.0.4


^ permalink raw reply related

* [PATCH 3/5] iwmc3200wifi: use cfg80211_connect_result to send req/resp IE
From: Zhu Yi @ 2009-07-20  3:47 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Zhu Yi
In-Reply-To: <1248061667-8614-3-git-send-email-yi.zhu@intel.com>

cfg80211_connect_result() let us specify associate request and
response IEs as parameters after we are connected. We use this
capability instead of doing it ourselves with WEXT.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 drivers/net/wireless/iwmc3200wifi/iwm.h  |    5 ++++
 drivers/net/wireless/iwmc3200wifi/main.c |    7 +++++
 drivers/net/wireless/iwmc3200wifi/rx.c   |   36 +++++++++++++++++++----------
 3 files changed, 35 insertions(+), 13 deletions(-)

diff --git a/drivers/net/wireless/iwmc3200wifi/iwm.h b/drivers/net/wireless/iwmc3200wifi/iwm.h
index 79d9d89..2175a48 100644
--- a/drivers/net/wireless/iwmc3200wifi/iwm.h
+++ b/drivers/net/wireless/iwmc3200wifi/iwm.h
@@ -281,6 +281,11 @@ struct iwm_priv {
 	struct work_struct reset_worker;
 	struct mutex mutex;
 
+	u8 *req_ie;
+	int req_ie_len;
+	u8 *resp_ie;
+	int resp_ie_len;
+
 	char private[0] __attribute__((__aligned__(NETDEV_ALIGN)));
 };
 
diff --git a/drivers/net/wireless/iwmc3200wifi/main.c b/drivers/net/wireless/iwmc3200wifi/main.c
index 484f110..cf25744 100644
--- a/drivers/net/wireless/iwmc3200wifi/main.c
+++ b/drivers/net/wireless/iwmc3200wifi/main.c
@@ -497,6 +497,13 @@ void iwm_link_off(struct iwm_priv *iwm)
 	memset(wstats, 0, sizeof(struct iw_statistics));
 	wstats->qual.updated = IW_QUAL_ALL_INVALID;
 
+	kfree(iwm->req_ie);
+	iwm->req_ie = NULL;
+	iwm->req_ie_len = 0;
+	kfree(iwm->resp_ie);
+	iwm->resp_ie = NULL;
+	iwm->resp_ie_len = 0;
+
 	del_timer_sync(&iwm->watchdog);
 }
 
diff --git a/drivers/net/wireless/iwmc3200wifi/rx.c b/drivers/net/wireless/iwmc3200wifi/rx.c
index 82b572a..6743391 100644
--- a/drivers/net/wireless/iwmc3200wifi/rx.c
+++ b/drivers/net/wireless/iwmc3200wifi/rx.c
@@ -519,7 +519,8 @@ static int iwm_mlme_assoc_complete(struct iwm_priv *iwm, u8 *buf,
 
 		cfg80211_connect_result(iwm_to_ndev(iwm),
 					complete->bssid,
-					NULL, 0, NULL, 0,
+					iwm->req_ie, iwm->req_ie_len,
+					iwm->resp_ie, iwm->resp_ie_len,
 					WLAN_STATUS_SUCCESS, GFP_KERNEL);
 		break;
 	case UMAC_ASSOC_COMPLETE_FAILURE:
@@ -771,37 +772,46 @@ static int iwm_mlme_mgt_frame(struct iwm_priv *iwm, u8 *buf,
 			      unsigned long buf_size, struct iwm_wifi_cmd *cmd)
 {
 	struct iwm_umac_notif_mgt_frame *mgt_frame =
-	(struct iwm_umac_notif_mgt_frame *)buf;
+			(struct iwm_umac_notif_mgt_frame *)buf;
 	struct ieee80211_mgmt *mgt = (struct ieee80211_mgmt *)mgt_frame->frame;
 	u8 *ie;
-	unsigned int event;
-	union iwreq_data wrqu;
 
 	IWM_HEXDUMP(iwm, DBG, MLME, "MGT: ", mgt_frame->frame,
 		    le16_to_cpu(mgt_frame->len));
 
 	if (ieee80211_is_assoc_req(mgt->frame_control)) {
 		ie = mgt->u.assoc_req.variable;;
-		event = IWEVASSOCREQIE;
+		iwm->req_ie_len =
+				le16_to_cpu(mgt_frame->len) - (ie - (u8 *)mgt);
+		kfree(iwm->req_ie);
+		iwm->req_ie = kmemdup(mgt->u.assoc_req.variable,
+				      iwm->req_ie_len, GFP_KERNEL);
 	} else if (ieee80211_is_reassoc_req(mgt->frame_control)) {
 		ie = mgt->u.reassoc_req.variable;;
-		event = IWEVASSOCREQIE;
+		iwm->req_ie_len =
+				le16_to_cpu(mgt_frame->len) - (ie - (u8 *)mgt);
+		kfree(iwm->req_ie);
+		iwm->req_ie = kmemdup(mgt->u.reassoc_req.variable,
+				      iwm->req_ie_len, GFP_KERNEL);
 	} else if (ieee80211_is_assoc_resp(mgt->frame_control)) {
 		ie = mgt->u.assoc_resp.variable;;
-		event = IWEVASSOCRESPIE;
+		iwm->resp_ie_len =
+				le16_to_cpu(mgt_frame->len) - (ie - (u8 *)mgt);
+		kfree(iwm->resp_ie);
+		iwm->resp_ie = kmemdup(mgt->u.assoc_resp.variable,
+				       iwm->resp_ie_len, GFP_KERNEL);
 	} else if (ieee80211_is_reassoc_resp(mgt->frame_control)) {
 		ie = mgt->u.reassoc_resp.variable;;
-		event = IWEVASSOCRESPIE;
+		iwm->resp_ie_len =
+				le16_to_cpu(mgt_frame->len) - (ie - (u8 *)mgt);
+		kfree(iwm->resp_ie);
+		iwm->resp_ie = kmemdup(mgt->u.reassoc_resp.variable,
+				       iwm->resp_ie_len, GFP_KERNEL);
 	} else {
 		IWM_ERR(iwm, "Unsupported management frame");
 		return 0;
 	}
 
-	wrqu.data.length = le16_to_cpu(mgt_frame->len) - (ie - (u8 *)mgt);
-
-	IWM_HEXDUMP(iwm, DBG, MLME, "EVT: ", ie, wrqu.data.length);
-	wireless_send_event(iwm_to_ndev(iwm), event, &wrqu, ie);
-
 	return 0;
 }
 
-- 
1.6.0.4


^ permalink raw reply related

* [PATCH 2/5] cfg80211: fix typo of IWEVASSOCRESPIE
From: Zhu Yi @ 2009-07-20  3:47 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Zhu Yi
In-Reply-To: <1248061667-8614-2-git-send-email-yi.zhu@intel.com>

It should be IWEVASSOCREQIE instead.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 net/wireless/sme.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/wireless/sme.c b/net/wireless/sme.c
index e7a8851..82de2d9 100644
--- a/net/wireless/sme.c
+++ b/net/wireless/sme.c
@@ -341,7 +341,7 @@ void __cfg80211_connect_result(struct net_device *dev, const u8 *bssid,
 		if (req_ie && status == WLAN_STATUS_SUCCESS) {
 			memset(&wrqu, 0, sizeof(wrqu));
 			wrqu.data.length = req_ie_len;
-			wireless_send_event(dev, IWEVASSOCRESPIE, &wrqu, req_ie);
+			wireless_send_event(dev, IWEVASSOCREQIE, &wrqu, req_ie);
 		}
 
 		if (resp_ie && status == WLAN_STATUS_SUCCESS) {
@@ -474,7 +474,7 @@ void __cfg80211_roamed(struct wireless_dev *wdev, const u8 *bssid,
 	if (req_ie) {
 		memset(&wrqu, 0, sizeof(wrqu));
 		wrqu.data.length = req_ie_len;
-		wireless_send_event(wdev->netdev, IWEVASSOCRESPIE,
+		wireless_send_event(wdev->netdev, IWEVASSOCREQIE,
 				    &wrqu, req_ie);
 	}
 
-- 
1.6.0.4


^ permalink raw reply related

* [PATCH 1/5] cfg80211: set_default_key only for WEP
From: Zhu Yi @ 2009-07-20  3:47 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Zhu Yi
In-Reply-To: <1248061667-8614-1-git-send-email-yi.zhu@intel.com>

We invoke the cfg80211 set_default_key callback only for WEP key
configuring.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
---
 net/wireless/wext-compat.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index aa80c0c..c63e10e 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -531,7 +531,8 @@ static int __cfg80211_set_encryption(struct cfg80211_registered_device *rdev,
 			wdev->wext.keys->data[idx];
 	}
 
-	if (params->cipher != WLAN_CIPHER_SUITE_AES_CMAC &&
+	if ((params->cipher == WLAN_CIPHER_SUITE_WEP40 ||
+	     params->cipher == WLAN_CIPHER_SUITE_WEP104) &&
 	    (tx_key || (!addr && wdev->wext.default_key == -1))) {
 		if (wdev->current_bss)
 			err = rdev->ops->set_default_key(&rdev->wiphy,
-- 
1.6.0.4


^ permalink raw reply related

* [PATCH 00/0] iwmc3200wifi: fix WPA connect problem
From: Zhu Yi @ 2009-07-20  3:47 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, Zhu Yi

Hi,

Below patches make iwmc3200wifi WPA work again with the latest cfg80211
change.

[PATCH 1/5] cfg80211: set_default_key only for WEP
[PATCH 2/5] cfg80211: fix typo of IWEVASSOCRESPIE
[PATCH 3/5] iwmc3200wifi: use cfg80211_connect_result to send req/resp IE
[PATCH 4/5] iwmc3200wifi: fix cfg80211_connect_result is called in IBSS
[PATCH 5/5] iwmc3200wifi: fix a use-after-free bug

Thanks,
-yi

^ permalink raw reply

* Re: Using compat-wireless w/ 2.6.27.26
From: Philip A. Prindeville @ 2009-07-20  3:05 UTC (permalink / raw)
  To: Bob Copeland; +Cc: linux-wireless
In-Reply-To: <20090719203150.GA9972@hash.localnet>

Bob Copeland wrote:
> On Sun, Jul 19, 2009 at 10:55:16AM -0700, Philip A. Prindeville wrote:
>> Bob Copeland wrote:
>>> On Fri, Jul 17, 2009 at 9:27 PM, Philip A.
>>>> + iw dev wlan0 interface add ap0 type managed
>>>> + ip link set ap0 up
>>>> + iw dev ap0 connect xxxx
>>>> command failed: Operation not supported (-95)
>>> Why are you adding another interface?  Should be able to use "iw dev wlan0..."
>> Because I might want to run two access points (two SSIDs, anyway) on the same
>> radio...  one with WEP on one VLAN (for Wifi SIP handsets), and one with
>> WPA-PSK2 on another VLAN (for laptops, etc).
> 
> Hmm, I don't know if it matters, but you were creating it as a managed
> interface.  Anyway I don't believe ath5k supports that yet - ath9k might.
> Someone on ath5k-devel was porting the ath9k virtual wiphy stuff to
> ath5k but I haven't heard anything recently.
> 
>> But, if you think there's still a doubt, what to look for in the modinfo?
> 
> If it says "depends: mac80211,cfg80211,ath" then it is probably the right
> one.  It just sounds like this bug:
> 
> http://bugzilla.kernel.org/show_bug.cgi?id=12315

Actually, it's saying:

filename:       /lib/modules/2.6.27.26-astlinux/kernel/drivers/net/wireless/ath5k/ath5k.ko
version:        0.6.0 (EXPERIMENTAL)
license:        Dual BSD/GPL
description:    Support for 5xxx series of Atheros 802.11 wireless LAN cards.
author:         Nick Kossifidis
author:         Jiri Slaby
srcversion:     E33724BC42EBC4E7E7714E1
...
depends:        mac80211,cfg80211
vermagic:       2.6.27.26-astlinux preempt mod_unload modversions GEODE
parm:           nohwcrypt:Disable hardware encryption. (int)

"nohwcrypt" is present in the 2.6.30 wireless-compat sources but not in the 2.6.27 drivers, so I'm pretty sure we're looking at the right ones.

And the 0.6.0 version number matches ath5k/base.c in the compat-wireless sources as well.

Not seeing the dependency on "ath", which is strange.  Is that common code that's shared in 2.6.30 for the Atheros drivers?

> The fix was merged after 2.6.30, IIRC, but it should definitely be in
> compat-wireless.  Also check your modules directory for an old ath5k.ko
> sitting in drivers/.../wireless/ath5k.  It should now be in ath/ath5k.
> 
> HTH!
> 


^ permalink raw reply

* [PATCH] p54: Eliminate unnecessary initialization
From: Larry Finger @ 2009-07-20  2:53 UTC (permalink / raw)
  To: John W Linville; +Cc: chunkeey, linux-wireless

In two places, variables are unnecessilarly initialized to NULL.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---


Index: wireless-testing/drivers/net/wireless/p54/eeprom.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/p54/eeprom.c
+++ wireless-testing/drivers/net/wireless/p54/eeprom.c
@@ -346,7 +346,7 @@ static struct p54_cal_database *p54_conv
 int p54_parse_eeprom(struct ieee80211_hw *dev, void *eeprom, int len)
 {
 	struct p54_common *priv = dev->priv;
-	struct eeprom_pda_wrap *wrap = NULL;
+	struct eeprom_pda_wrap *wrap;
 	struct pda_entry *entry;
 	unsigned int data_len, entry_len;
 	void *tmp;
@@ -533,7 +533,7 @@ int p54_read_eeprom(struct ieee80211_hw
 	struct p54_common *priv = dev->priv;
 	size_t eeprom_size = 0x2020, offset = 0, blocksize, maxblocksize;
 	int ret = -ENOMEM;
-	void *eeprom = NULL;
+	void *eeprom;
 
 	maxblocksize = EEPROM_READBACK_LEN;
 	if (priv->fw_var >= 0x509)

^ permalink raw reply

* Re: iwmc3200wifi: using freed memory in iwm_hal_send_target_cmd()
From: Zhu Yi @ 2009-07-20  2:09 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <alpine.DEB.2.00.0907171555200.12306@bicker>

On Sun, 2009-07-19 at 19:53 +0800, Dan Carpenter wrote:
> Hello,
> 
> I found this with a source code checker (http://repo.or.cz/w/smatch.git).
> 
> We free "cmd" on line 390 and then dereference it on line 396.  I don't 
> know what we should return in that case or I would have sent a patch.  
> Sorry.
> 
> drivers/net/wireless/iwmc3200wifi/hal.c
>    390          if (!udma_cmd->resp)
>    391                  kfree(cmd);
>    392  
>    393          if (ret < 0)
>    394                  return ret;
>    395  
>    396          return cmd->seq_num;

Good catch! I'll send out a patch later.

Thanks,
-yi


^ permalink raw reply

* [RFT] p54: implement rfkill
From: Christian Lamparter @ 2009-07-19 21:54 UTC (permalink / raw)
  To: wireless

This patch gets rid of the deprecated radio_enabled

fwio.c: In function ‘p54_setup_mac’:
fwio.c:323: warning: ‘radio_enabled’ is deprecated (declared at include/net/mac80211.h:607)
---
diff --git a/drivers/net/wireless/p54/fwio.c b/drivers/net/wireless/p54/fwio.c
index efe47ec..9f5ebab 100644
--- a/drivers/net/wireless/p54/fwio.c
+++ b/drivers/net/wireless/p54/fwio.c
@@ -320,7 +320,7 @@ int p54_setup_mac(struct p54_common *priv)
 		return -ENOMEM;
 
 	setup = (struct p54_setup_mac *) skb_put(skb, sizeof(*setup));
-	if (priv->hw->conf.radio_enabled) {
+	if (!(priv->hw->conf.flags & IEEE80211_CONF_IDLE)) {
 		switch (priv->mode) {
 		case NL80211_IFTYPE_STATION:
 			mode = P54_FILTER_TYPE_STATION;
@@ -348,8 +348,9 @@ int p54_setup_mac(struct p54_common *priv)
 		     (priv->filter_flags & FIF_OTHER_BSS)) &&
 		    (mode != P54_FILTER_TYPE_PROMISCUOUS))
 			mode |= P54_FILTER_TYPE_TRANSPARENT;
-	} else
+	} else {
 		mode = P54_FILTER_TYPE_HIBERNATE;
+	}
 
 	setup->mac_mode = cpu_to_le16(mode);
 	memcpy(setup->mac_addr, priv->mac_addr, ETH_ALEN);
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 955f6d7..fe36983 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -288,7 +288,11 @@ static int p54_config(struct ieee80211_hw *dev, u32 changed)
 		if (ret)
 			goto out;
 	}
-
+	if (changed & IEEE80211_CONF_CHANGE_IDLE) {
+		ret = p54_setup_mac(priv);
+		if (ret)
+			goto out;
+	}
 out:
 	mutex_unlock(&priv->conf_mutex);
 	return ret;
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index 0d589d6..d38f10a 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -552,6 +552,12 @@ static void p54_rx_trap(struct p54_common *priv, struct sk_buff *skb)
 		break;
 	case P54_TRAP_TIMER:
 		break;
+	case P54_TRAP_FAA_RADIO_OFF:
+		wiphy_rfkill_set_hw_state(priv->hw->wiphy, true);
+		break;
+	case P54_TRAP_FAA_RADIO_ON:
+		wiphy_rfkill_set_hw_state(priv->hw->wiphy, false);
+		break;
 	default:
 		printk(KERN_INFO "%s: received event:%x freq:%d\n",
 		       wiphy_name(priv->hw->wiphy), event, freq);

^ permalink raw reply related

* Re: [PATCH] ath5k: fix values for bus error bits in ISR2
From: Bob Copeland @ 2009-07-19 21:30 UTC (permalink / raw)
  To: Pavel Roskin; +Cc: ath5k-devel, linux-wireless, John W. Linville
In-Reply-To: <20090718221212.10818.52921.stgit@mj.roinet.com>

On Sat, Jul 18, 2009 at 6:12 PM, Pavel Roskin<proski@gnu.org> wrote:
> The new values are taken from the recently open sourced Atheros HAL.
> Correctness is also confirmed by the users with access to Atheros
> documentation.
>
> Signed-off-by: Pavel Roskin <proski@gnu.org>

Acked-by: Bob Copeland <me@bobcopeland.com>

Thanks!

-- 
Bob Copeland %% www.bobcopeland.com

^ permalink raw reply

* [PATCH] mac80211: fix spare warnings in driver-trace.h
From: Christian Lamparter @ 2009-07-19 21:21 UTC (permalink / raw)
  To: wireless; +Cc: John W. Linville

This patch fixes the following errors:

driver-trace.h:148:1: error: cannot size expression
driver-trace.h:148:1: error: cannot size expression
[...]
driver-trace.h:222:1: error: cannot size expression
driver-trace.h:71:1: error: incompatible types for operation (<)
driver-trace.h:71:1:    left side has type void *<noident>
driver-trace.h:71:1:    right side has type int
driver-trace.h:99:1: error: incompatible types for operation (<)
driver-trace.h:99:1:    left side has type void *<noident>
driver-trace.h:99:1:    right side has type int
driver-trace.h:148:1: error: incompatible types for operation (<)
driver-trace.h:148:1:    left side has type void *<noident>
driver-trace.h:148:1:    right side has type int
driver-trace.h:222:1: error: cannot size expression
driver-trace.h:248:1: error: incompatible types for operation (<)
driver-trace.h:248:1:    left side has type void *<noident>
driver-trace.h:248:1:    right side has type int
driver-trace.h:446:1: error: incompatible types for operation (<)
driver-trace.h:446:1:    left side has type void *<noident>
driver-trace.h:446:1:    right side has type int

Signed-off-by: Christian Lamparter <chunkeey@web.de>
---
diff --git a/net/mac80211/driver-trace.h b/net/mac80211/driver-trace.h
index 48c93d1..5a10da2 100644
--- a/net/mac80211/driver-trace.h
+++ b/net/mac80211/driver-trace.h
@@ -5,7 +5,7 @@
 #include <net/mac80211.h>
 #include "ieee80211_i.h"
 
-#ifndef CONFIG_MAC80211_DRIVER_API_TRACER
+#if !defined(CONFIG_MAC80211_DRIVER_API_TRACER) || defined(__CHECKER__)
 #undef TRACE_EVENT
 #define TRACE_EVENT(name, proto, ...) \
 static inline void trace_ ## name(proto) {}
@@ -639,7 +639,7 @@ TRACE_EVENT(drv_ampdu_action,
 		LOCAL_PR_ARG, STA_PR_ARG, __entry->action, __entry->tid, __entry->ret
 	)
 );
-#endif /* __MAC80211_DRIVER_TRACE */
+#endif /* !__MAC80211_DRIVER_TRACE || TRACE_HEADER_MULTI_READ */
 
 #undef TRACE_INCLUDE_PATH
 #define TRACE_INCLUDE_PATH .

^ permalink raw reply related

* Re: Using compat-wireless w/ 2.6.27.26
From: Bob Copeland @ 2009-07-19 20:31 UTC (permalink / raw)
  To: Philip A. Prindeville; +Cc: linux-wireless
In-Reply-To: <4A635E04.4050204@redfish-solutions.com>

On Sun, Jul 19, 2009 at 10:55:16AM -0700, Philip A. Prindeville wrote:
> Bob Copeland wrote:
> > On Fri, Jul 17, 2009 at 9:27 PM, Philip A.
> >> + iw dev wlan0 interface add ap0 type managed
> >> + ip link set ap0 up
> >> + iw dev ap0 connect xxxx
> >> command failed: Operation not supported (-95)
> > 
> > Why are you adding another interface?  Should be able to use "iw dev wlan0..."
> 
> Because I might want to run two access points (two SSIDs, anyway) on the same
> radio...  one with WEP on one VLAN (for Wifi SIP handsets), and one with
> WPA-PSK2 on another VLAN (for laptops, etc).

Hmm, I don't know if it matters, but you were creating it as a managed
interface.  Anyway I don't believe ath5k supports that yet - ath9k might.
Someone on ath5k-devel was porting the ath9k virtual wiphy stuff to
ath5k but I haven't heard anything recently.

> But, if you think there's still a doubt, what to look for in the modinfo?

If it says "depends: mac80211,cfg80211,ath" then it is probably the right
one.  It just sounds like this bug:

http://bugzilla.kernel.org/show_bug.cgi?id=12315

The fix was merged after 2.6.30, IIRC, but it should definitely be in
compat-wireless.  Also check your modules directory for an old ath5k.ko
sitting in drivers/.../wireless/ath5k.  It should now be in ath/ath5k.

HTH!

-- 
Bob Copeland %% www.bobcopeland.com


^ permalink raw reply

* [PATCH] mac80211: do not monitor the connection while scanning
From: Christian Lamparter @ 2009-07-19 20:09 UTC (permalink / raw)
  To: Larry Finger; +Cc: Bob Copeland, Johannes Berg, wireless
In-Reply-To: <4A632F9C.8080207@lwfinger.net>

mac80211 constantly monitors the connection to the associated AP
in order to check if it is out of reach/dead.

This is absolutely fine most of the time.
Except when there is a scheduled scan for the whole neighborhood.
After all this path could trigger while scanning on different channel.
Or even worse: this AP probing triggers a WARN_ON in rate_lowest_index
when the scan code did a band transition!
( http://www.kerneloops.org/raw.php?rawid=449304 )

Reported-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
---
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 18dad22..4833e7c 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -2210,6 +2210,9 @@ static void ieee80211_sta_monitor_work(struct work_struct *work)
 		container_of(work, struct ieee80211_sub_if_data,
 			     u.mgd.monitor_work);
 
+	if (sdata->local->sw_scanning || sdata->local->hw_scanning)
+		return;
+
 	ieee80211_mgd_probe_ap(sdata, false);
 }
 

^ permalink raw reply related

* [PATCH v2] p54spi: fix potential null deref in p54spi.c
From: Christian Lamparter @ 2009-07-19 19:26 UTC (permalink / raw)
  To: linux-wireless; +Cc: Max Filippov, Dan Carpenter, John W. Linville
In-Reply-To: <alpine.DEB.2.00.0907171607280.12306@bicker>

From: Dan Carpenter <error27@gmail.com>

Fix a potential NULL dereference bug during 
error handling in p54spi_probe.

This bug was discovered by smatch:
(http://repo.or.cz/w/smatch.git).

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@web.de>
---
On Sunday 19 July 2009 13:53:57 Dan Carpenter wrote:

> We can't use dev_err() becuase "priv" is NULL.
yep, but that's my fault and not Micheal's.

> Found by smatch (http://repo.or.cz/w/smatch.git).
> regards,
> dan carpenter
what about this alternative?
it retains the dev_err by simply moving to the spi_device *spi
which comes from spi-subsystem and is initialized?

Regards,
	Chr
---
diff --git a/drivers/net/wireless/p54/p54spi.c b/drivers/net/wireless/p54/p54spi.c
index d5f181a..eef5329 100644
--- a/drivers/net/wireless/p54/p54spi.c
+++ b/drivers/net/wireless/p54/p54spi.c
@@ -600,7 +600,7 @@ static int __devinit p54spi_probe(struct spi_device *spi)
 
 	hw = p54_init_common(sizeof(*priv));
 	if (!hw) {
-		dev_err(&priv->spi->dev, "could not alloc ieee80211_hw");
+		dev_err(&spi->dev, "could not alloc ieee80211_hw");
 		return -ENOMEM;
 	}
 



^ permalink raw reply related

* Re: Using compat-wireless w/ 2.6.27.26
From: Philip A. Prindeville @ 2009-07-19 17:55 UTC (permalink / raw)
  To: Bob Copeland; +Cc: linux-wireless
In-Reply-To: <b6c5339f0907190638jc1bdacbo801adcd39a1cf5@mail.gmail.com>

Bob Copeland wrote:
> On Fri, Jul 17, 2009 at 9:27 PM, Philip A.
> Prindeville<philipp_subx@redfish-solutions.com> wrote:
>> + modprobe ath5k
>> ath5k phy0: Atheros AR5413 chip found (MAC: 0xa4, PHY: 0x61)
>>
>> + iw dev wlan0 interface add ap0 type managed
>> + ip link set ap0 up
>> + iw dev ap0 connect xxxx
>> command failed: Operation not supported (-95)
> 
> Why are you adding another interface?  Should be able to use "iw dev wlan0..."

Because I might want to run two access points (two SSIDs, anyway) on the same radio...  one with WEP on one VLAN (for Wifi SIP handsets), and one with WPA-PSK2 on another VLAN (for laptops, etc).

>> pbx ~ # iw phy phy0 info
>> command failed: No buffer space available (-105)
> 
> Means the netlink buffer was exceeded.  In the past this was because there
> were too many channels -- are you sure you're loading the compat-wireless
> ath5k instead of the .29 one (and not using all_channels modparam)?
> 

Reasonably sure, yes.  I stopped the distro build and did an "ls -R" after building linux, and there were no drivers other than cfg80211.ko and mac80211.ko that get duplicated.

After resuming the rest of the build, there were drivers from compat-wireless including ath5k, and cfg80211.ko and mac80211.ko also had refreshed timestamps matching everything else.

But, if you think there's still a doubt, what to look for in the modinfo?

-Philip

^ 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