Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 3.11 2/3] mwifiex: fix wrong data rates in P2P client
From: Bing Zhao @ 2013-07-29 23:32 UTC (permalink / raw)
  To: linux-wireless
  Cc: John W. Linville, Avinash Patil, Stone Piao, Amitkumar Karwar,
	Nishant Sarmukadam, Frank Huang, Bing Zhao
In-Reply-To: <1375140759-29767-1-git-send-email-bzhao@marvell.com>

From: Avinash Patil <patila@marvell.com>

This patch fixes an issue wherein adhoc rates were being copied
into association request from P2P client.

Cc: <stable@vger.kernel.org> # 3.10.y
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
 drivers/net/wireless/mwifiex/cfp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/mwifiex/cfp.c b/drivers/net/wireless/mwifiex/cfp.c
index 988552d..5178c46 100644
--- a/drivers/net/wireless/mwifiex/cfp.c
+++ b/drivers/net/wireless/mwifiex/cfp.c
@@ -415,7 +415,8 @@ u32 mwifiex_get_supported_rates(struct mwifiex_private *priv, u8 *rates)
 	u32 k = 0;
 	struct mwifiex_adapter *adapter = priv->adapter;
 
-	if (priv->bss_mode == NL80211_IFTYPE_STATION) {
+	if (priv->bss_mode == NL80211_IFTYPE_STATION ||
+	    priv->bss_mode == NL80211_IFTYPE_P2P_CLIENT) {
 		switch (adapter->config_bands) {
 		case BAND_B:
 			dev_dbg(adapter->dev, "info: infra band=%d "
-- 
1.8.2.3


^ permalink raw reply related

* [PATCH 3.11 1/3] mwifiex: check for bss_role instead of bss_mode for STA operations
From: Bing Zhao @ 2013-07-29 23:32 UTC (permalink / raw)
  To: linux-wireless
  Cc: John W. Linville, Avinash Patil, Stone Piao, Amitkumar Karwar,
	Nishant Sarmukadam, Frank Huang, Bing Zhao

From: Avinash Patil <patila@marvell.com>

This patch fixes an issue wherein association would fail on P2P
interfaces. This happened because we are checking priv->mode
against NL80211_IFTYPE_STATION. While this check is correct for
infrastructure stations, it would fail P2P clients for which mode
is NL80211_IFTYPE_P2P_CLIENT.

Better check would be bss_role which has only 2 values: STA/AP.

Cc: <stable@vger.kernel.org> # 3.10.y
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
 drivers/net/wireless/mwifiex/cfg80211.c | 4 ++--
 drivers/net/wireless/mwifiex/join.c     | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index cc334d5..d1e4816 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -1727,9 +1727,9 @@ mwifiex_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
 	struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
 	int ret;
 
-	if (priv->bss_mode != NL80211_IFTYPE_STATION) {
+	if (GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) {
 		wiphy_err(wiphy,
-			  "%s: reject infra assoc request in non-STA mode\n",
+			  "%s: reject infra assoc request in non-STA role\n",
 			  dev->name);
 		return -EINVAL;
 	}
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c
index ba043ca..9d7c0e6 100644
--- a/drivers/net/wireless/mwifiex/join.c
+++ b/drivers/net/wireless/mwifiex/join.c
@@ -1291,8 +1291,10 @@ int mwifiex_associate(struct mwifiex_private *priv,
 {
 	u8 current_bssid[ETH_ALEN];
 
-	/* Return error if the adapter or table entry is not marked as infra */
-	if ((priv->bss_mode != NL80211_IFTYPE_STATION) ||
+	/* Return error if the adapter is not STA role or table entry
+	 * is not marked as infra.
+	 */
+	if ((GET_BSS_ROLE(priv) != MWIFIEX_BSS_ROLE_STA) ||
 	    (bss_desc->bss_mode != NL80211_IFTYPE_STATION))
 		return -1;
 
-- 
1.8.2.3


^ permalink raw reply related

* [PATCH 3.11 3/3] mwifiex: fix command 0x2c timeout during p2p_find or p2p_connect
From: Bing Zhao @ 2013-07-29 23:32 UTC (permalink / raw)
  To: linux-wireless
  Cc: John W. Linville, Avinash Patil, Stone Piao, Amitkumar Karwar,
	Nishant Sarmukadam, Frank Huang, Bing Zhao
In-Reply-To: <1375140759-29767-1-git-send-email-bzhao@marvell.com>

From: Stone Piao <piaoyun@marvell.com>

We missed bss_mode check for P2P client.

Signed-off-by: Stone Piao <piaoyun@marvell.com>
Signed-off-by: Avinash Patil <patila@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
 drivers/net/wireless/mwifiex/sta_ioctl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index c071ce9..f084412 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -257,10 +257,10 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
 			goto done;
 	}
 
-	if (priv->bss_mode == NL80211_IFTYPE_STATION) {
+	if (priv->bss_mode == NL80211_IFTYPE_STATION ||
+	    priv->bss_mode == NL80211_IFTYPE_P2P_CLIENT) {
 		u8 config_bands;
 
-		/* Infra mode */
 		ret = mwifiex_deauthenticate(priv, NULL);
 		if (ret)
 			goto done;
-- 
1.8.2.3


^ permalink raw reply related

* RE: [PATCH] Bluetooth: btmrvl: add calibration data download support
From: Bing Zhao @ 2013-07-29 23:20 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: linux-bluetooth@vger.kernel.org, Gustavo Padovan, Johan Hedberg,
	linux-wireless@vger.kernel.org, Amitkumar Karwar
In-Reply-To: <791D5341-CA33-425C-BFB8-CB65F5451E39@holtmann.org>

Hi Marcel,

> it is also way harder to use and things need to be manually configured. Don't know know when the
> device needs calibration information or not. And you can just request_firmware() that file. If it is
> there, then load it, if not then skip the step.

Thanks for your suggestion. This approach should work for me.

> 
> > The firmware_request() requires a relative file path under /lib/firmware/.
> > What is the standard location you are referring to?
> 
> You have to create proper filenames for your hardware. Like mrvl/cal_data_v1.conf or similar.

Sure.

> As I said above, the device should know if it needs calibration or not. And just installing a file on
> disk is simpler than having to modify the module parameters somewhere.

This makes sense. I'll take your approach and re-spin the patch.

Thanks,
Bing


^ permalink raw reply

* Re: [PATCH] Bluetooth: btmrvl: add calibration data download support
From: Marcel Holtmann @ 2013-07-29 22:58 UTC (permalink / raw)
  To: Bing Zhao
  Cc: linux-bluetooth@vger.kernel.org, Gustavo Padovan, Johan Hedberg,
	linux-wireless@vger.kernel.org, Amitkumar Karwar
In-Reply-To: <477F20668A386D41ADCC57781B1F70430EA3215F2E@SC-VEXCH1.marvell.com>

Hi Bing,

>>> A text file containing calibration data in hex format can
>>> be provided while loading btmrvl module. The data will be
>>> downloaded to firmware.
>>> eg. insmod btmrvl.ko cal_data_cfg=mrvl/bt_cal_data.conf
>> 
>> why is this a module parameter and you do not just request a standard location via request_firmware().
> 
> Not all devices need downloading the calibration data from host to firmware.
> A module parameter seems more flexible than others.

it is also way harder to use and things need to be manually configured. Don't know know when the device needs calibration information or not. And you can just request_firmware() that file. If it is there, then load it, if not then skip the step.

> The firmware_request() requires a relative file path under /lib/firmware/.
> What is the standard location you are referring to?

You have to create proper filenames for your hardware. Like mrvl/cal_data_v1.conf or similar.

> 
>> I do not like the module parameter approach.
> 
> I'm open to any other approaches. Do you have any suggestions?

As I said above, the device should know if it needs calibration or not. And just installing a file on disk is simpler than having to modify the module parameters somewhere.

Regards

Marcel


^ permalink raw reply

* RE: [PATCH] Bluetooth: btmrvl: add calibration data download support
From: Bing Zhao @ 2013-07-29 21:28 UTC (permalink / raw)
  To: Marcel Holtmann
  Cc: linux-bluetooth@vger.kernel.org, Gustavo Padovan, Johan Hedberg,
	linux-wireless@vger.kernel.org, Amitkumar Karwar
In-Reply-To: <39BF90E7-8341-412E-A372-6039B703980D@holtmann.org>

Hi Marcel,

Thanks for your comments.

> Hi Bing,
> 
> > A text file containing calibration data in hex format can
> > be provided while loading btmrvl module. The data will be
> > downloaded to firmware.
> > eg. insmod btmrvl.ko cal_data_cfg=mrvl/bt_cal_data.conf
> 
> why is this a module parameter and you do not just request a standard location via request_firmware().

Not all devices need downloading the calibration data from host to firmware.
A module parameter seems more flexible than others.

The firmware_request() requires a relative file path under /lib/firmware/.
What is the standard location you are referring to?

> I do not like the module parameter approach.

I'm open to any other approaches. Do you have any suggestions?

Thanks,
Bing

> 
> Regards
> 
> Marcel


^ permalink raw reply

* Re: [PATCH V2] fwcutter: Add firmware 6.30.163.46
From: Rafał Miłecki @ 2013-07-29 21:23 UTC (permalink / raw)
  To: Hauke Mehrtens; +Cc: Larry Finger, linux-wireless, b43-dev, m
In-Reply-To: <51F6DB65.4000302@hauke-m.de>

2013/7/29 Hauke Mehrtens <hauke@hauke-m.de>:
> On 07/29/2013 10:07 PM, Rafał Miłecki wrote:
>> 2013/7/29 Rafał Miłecki <zajec5@gmail.com>:
>>> 2013/7/29 Larry Finger <Larry.Finger@lwfinger.net>:
>>>> This firmware version can be extracted from the GPL tarball for the ASUS
>>>> GPL code for the RT-AC66U 802.11ac Dual-Band Wireless-AC1750 Gigabit Router.
>>>>
>>>> I believe this to be the first instance of 802.11ac firmware for Broadcom
>>>> hardware. The firmware is version 784.2.
>>>>
>>>> Note: The http://www.lwfinger.com/broadcom-wl-6.30.163.46.tar.bz2 is the URL
>>>> of the extracted apsta binary. The full GPL package is at
>>>> http://dlcdnet.asus.com/pub/ASUS/wireless/RT-AC66U/GPL_RT_AC66U_3004372.zip.
>>>
>>> There is some (probably outdated) list of Broadcom 802.11ac routers:
>>> ASUS RT-AC66U
>>> Linksys EA6500
>>> Netgear R6300
>>>
>>> Did you compare wl.ko drivers from the 2 other firmwares? Is this the
>>> newest one?
>>>
>>> Did you start AC-PHY RE process?
>>
>> In case you wonder, I have a MIPS router with BCM4331 + BCM4360,
>> unfrotunately there isn't mmiotrace available for MIPS, so I can't
>> start RE that way :(
>>
>> I may think about buying PCE-AC66 at some point.
>>
> Hi Rafał,
>
> I have a Netgear R6250 (BCM4708 ARM Contex-A9) router with BCM4331 +
> BCM4360 and I am currently adding support for it to OpenWrt and mainline
> Linux kernel, could mmiotrace work on this CPU?

mmiotrace is x86/x86_64 only at this point :(

-- 
Rafał

^ permalink raw reply

* Re: [PATCH V2] fwcutter: Add firmware 6.30.163.46
From: Hauke Mehrtens @ 2013-07-29 21:15 UTC (permalink / raw)
  To: Rafał Miłecki; +Cc: Larry Finger, linux-wireless, b43-dev, m
In-Reply-To: <CACna6rxvnU_cwphP+Vvn_-CLuEcqMufEo4Zk7-Xqd63OA4Zmqg@mail.gmail.com>

On 07/29/2013 10:07 PM, Rafał Miłecki wrote:
> 2013/7/29 Rafał Miłecki <zajec5@gmail.com>:
>> 2013/7/29 Larry Finger <Larry.Finger@lwfinger.net>:
>>> This firmware version can be extracted from the GPL tarball for the ASUS
>>> GPL code for the RT-AC66U 802.11ac Dual-Band Wireless-AC1750 Gigabit Router.
>>>
>>> I believe this to be the first instance of 802.11ac firmware for Broadcom
>>> hardware. The firmware is version 784.2.
>>>
>>> Note: The http://www.lwfinger.com/broadcom-wl-6.30.163.46.tar.bz2 is the URL
>>> of the extracted apsta binary. The full GPL package is at
>>> http://dlcdnet.asus.com/pub/ASUS/wireless/RT-AC66U/GPL_RT_AC66U_3004372.zip.
>>
>> There is some (probably outdated) list of Broadcom 802.11ac routers:
>> ASUS RT-AC66U
>> Linksys EA6500
>> Netgear R6300
>>
>> Did you compare wl.ko drivers from the 2 other firmwares? Is this the
>> newest one?
>>
>> Did you start AC-PHY RE process?
> 
> In case you wonder, I have a MIPS router with BCM4331 + BCM4360,
> unfrotunately there isn't mmiotrace available for MIPS, so I can't
> start RE that way :(
> 
> I may think about buying PCE-AC66 at some point.
> 
Hi Rafał,

I have a Netgear R6250 (BCM4708 ARM Contex-A9) router with BCM4331 +
BCM4360 and I am currently adding support for it to OpenWrt and mainline
Linux kernel, could mmiotrace work on this CPU?

Hauke

^ permalink raw reply

* Re: [PATCH] Bluetooth: btmrvl: add calibration data download support
From: Marcel Holtmann @ 2013-07-29 20:35 UTC (permalink / raw)
  To: Bing Zhao
  Cc: linux-bluetooth, Gustavo Padovan, Johan Hedberg, linux-wireless,
	Amitkumar Karwar
In-Reply-To: <1375126147-28642-1-git-send-email-bzhao@marvell.com>

Hi Bing,

> A text file containing calibration data in hex format can
> be provided while loading btmrvl module. The data will be
> downloaded to firmware.
> eg. insmod btmrvl.ko cal_data_cfg=mrvl/bt_cal_data.conf

why is this a module parameter and you do not just request a standard location via request_firmware(). I do not like the module parameter approach.

Regards

Marcel


^ permalink raw reply

* Re: [PATCH V2] fwcutter: Add firmware 6.30.163.46
From: Rafał Miłecki @ 2013-07-29 20:07 UTC (permalink / raw)
  To: Larry Finger; +Cc: m, linux-wireless, b43-dev
In-Reply-To: <CACna6rzu4U+v1v1vj-+XyJHpReXMB3nscKP_C5jjbAAbKLQcKA@mail.gmail.com>

2013/7/29 Rafał Miłecki <zajec5@gmail.com>:
> 2013/7/29 Larry Finger <Larry.Finger@lwfinger.net>:
>> This firmware version can be extracted from the GPL tarball for the ASUS
>> GPL code for the RT-AC66U 802.11ac Dual-Band Wireless-AC1750 Gigabit Router.
>>
>> I believe this to be the first instance of 802.11ac firmware for Broadcom
>> hardware. The firmware is version 784.2.
>>
>> Note: The http://www.lwfinger.com/broadcom-wl-6.30.163.46.tar.bz2 is the URL
>> of the extracted apsta binary. The full GPL package is at
>> http://dlcdnet.asus.com/pub/ASUS/wireless/RT-AC66U/GPL_RT_AC66U_3004372.zip.
>
> There is some (probably outdated) list of Broadcom 802.11ac routers:
> ASUS RT-AC66U
> Linksys EA6500
> Netgear R6300
>
> Did you compare wl.ko drivers from the 2 other firmwares? Is this the
> newest one?
>
> Did you start AC-PHY RE process?

In case you wonder, I have a MIPS router with BCM4331 + BCM4360,
unfrotunately there isn't mmiotrace available for MIPS, so I can't
start RE that way :(

I may think about buying PCE-AC66 at some point.

-- 
Rafał

^ permalink raw reply

* Re: [PATCH V2] fwcutter: Add firmware 6.30.163.46
From: Rafał Miłecki @ 2013-07-29 20:05 UTC (permalink / raw)
  To: Larry Finger; +Cc: m, linux-wireless, b43-dev
In-Reply-To: <1375124213-28051-1-git-send-email-Larry.Finger@lwfinger.net>

2013/7/29 Larry Finger <Larry.Finger@lwfinger.net>:
> This firmware version can be extracted from the GPL tarball for the ASUS
> GPL code for the RT-AC66U 802.11ac Dual-Band Wireless-AC1750 Gigabit Router.
>
> I believe this to be the first instance of 802.11ac firmware for Broadcom
> hardware. The firmware is version 784.2.
>
> Note: The http://www.lwfinger.com/broadcom-wl-6.30.163.46.tar.bz2 is the URL
> of the extracted apsta binary. The full GPL package is at
> http://dlcdnet.asus.com/pub/ASUS/wireless/RT-AC66U/GPL_RT_AC66U_3004372.zip.

There is some (probably outdated) list of Broadcom 802.11ac routers:
ASUS RT-AC66U
Linksys EA6500
Netgear R6300

Did you compare wl.ko drivers from the 2 other firmwares? Is this the
newest one?

Did you start AC-PHY RE process?

-- 
Rafał

^ permalink raw reply

* Re: [PATCH V2] fwcutter: Add firmware 6.30.163.46
From: Michael Büsch @ 2013-07-29 19:38 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, b43-dev
In-Reply-To: <1375124213-28051-1-git-send-email-Larry.Finger@lwfinger.net>

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

On Mon, 29 Jul 2013 13:56:53 -0500
Larry Finger <Larry.Finger@lwfinger.net> wrote:

> V2 - Add original URL for full GPL package

Thanks.
I applied this and released b43-fwcutter-018.
It also contains a few minor fixes.

-- 
Michael

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* [PATCH] Bluetooth: btmrvl: add calibration data download support
From: Bing Zhao @ 2013-07-29 19:29 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: Marcel Holtmann, Gustavo Padovan, Johan Hedberg, linux-wireless,
	Bing Zhao, Amitkumar Karwar

From: Amitkumar Karwar <akarwar@marvell.com>

A text file containing calibration data in hex format can
be provided while loading btmrvl module. The data will be
downloaded to firmware.
eg. insmod btmrvl.ko cal_data_cfg=mrvl/bt_cal_data.conf

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
 drivers/bluetooth/btmrvl_drv.h  |   9 ++-
 drivers/bluetooth/btmrvl_main.c | 140 +++++++++++++++++++++++++++++++++++++++-
 drivers/bluetooth/btmrvl_sdio.c |   2 +-
 3 files changed, 147 insertions(+), 4 deletions(-)

diff --git a/drivers/bluetooth/btmrvl_drv.h b/drivers/bluetooth/btmrvl_drv.h
index 27068d1..f9a6e1b 100644
--- a/drivers/bluetooth/btmrvl_drv.h
+++ b/drivers/bluetooth/btmrvl_drv.h
@@ -23,6 +23,8 @@
 #include <linux/bitops.h>
 #include <linux/slab.h>
 #include <net/bluetooth/bluetooth.h>
+#include <linux/ctype.h>
+#include <linux/firmware.h>
 
 #define BTM_HEADER_LEN			4
 #define BTM_UPLD_SIZE			2312
@@ -41,6 +43,7 @@ struct btmrvl_thread {
 struct btmrvl_device {
 	void *card;
 	struct hci_dev *hcidev;
+	struct device *dev;
 
 	u8 dev_type;
 
@@ -91,6 +94,7 @@ struct btmrvl_private {
 #define BT_CMD_HOST_SLEEP_CONFIG	0x59
 #define BT_CMD_HOST_SLEEP_ENABLE	0x5A
 #define BT_CMD_MODULE_CFG_REQ		0x5B
+#define BT_CMD_LOAD_CONFIG_DATA		0x61
 
 /* Sub-commands: Module Bringup/Shutdown Request/Response */
 #define MODULE_BRINGUP_REQ		0xF1
@@ -116,10 +120,13 @@ struct btmrvl_private {
 #define PS_SLEEP			0x01
 #define PS_AWAKE			0x00
 
+#define BT_CMD_DATA_SIZE		32
+#define BT_CAL_DATA_SIZE		28
+
 struct btmrvl_cmd {
 	__le16 ocf_ogf;
 	u8 length;
-	u8 data[4];
+	u8 data[BT_CMD_DATA_SIZE];
 } __packed;
 
 struct btmrvl_event {
diff --git a/drivers/bluetooth/btmrvl_main.c b/drivers/bluetooth/btmrvl_main.c
index 9a9f518..e16c65c 100644
--- a/drivers/bluetooth/btmrvl_main.c
+++ b/drivers/bluetooth/btmrvl_main.c
@@ -27,6 +27,9 @@
 
 #define VERSION "1.0"
 
+static char *cal_data_cfg;
+module_param(cal_data_cfg, charp, 0);
+
 /*
  * This function is called by interface specific interrupt handler.
  * It updates Power Save & Host Sleep states, and wakes up the main
@@ -57,8 +60,9 @@ bool btmrvl_check_evtpkt(struct btmrvl_private *priv, struct sk_buff *skb)
 		ocf = hci_opcode_ocf(opcode);
 		ogf = hci_opcode_ogf(opcode);
 
-		if (ocf == BT_CMD_MODULE_CFG_REQ &&
-					priv->btmrvl_dev.sendcmdflag) {
+		if ((ocf == BT_CMD_MODULE_CFG_REQ ||
+		     ocf == BT_CMD_LOAD_CONFIG_DATA) &&
+		    priv->btmrvl_dev.sendcmdflag) {
 			priv->btmrvl_dev.sendcmdflag = false;
 			priv->adapter->cmd_complete = true;
 			wake_up_interruptible(&priv->adapter->cmd_wait_q);
@@ -552,6 +556,129 @@ static int btmrvl_service_main_thread(void *data)
 	return 0;
 }
 
+static int btmrvl_parse_cal_cfg(const u8 *src, u32 len, u8 *dst, u32 dst_size)
+{
+	const u8 *s = src;
+	u8 *d = dst;
+	int ret;
+	u8 tmp[3];
+
+	while ((s - src) < len) {
+		if (*s && (isspace(*s) || *s == '\t')) {
+			s++;
+			continue;
+		}
+
+		if (isxdigit(*s)) {
+			if ((d - dst) >= dst_size) {
+				BT_ERR("cal_file size too big!!!");
+				return -EINVAL;
+			}
+
+			memcpy(tmp, s, 2);
+			tmp[2] = '\0';
+
+			ret = kstrtol(tmp, 16, (long *)d++);
+			if (ret < 0)
+				return ret;
+
+			s += 2;
+		} else {
+			s++;
+		}
+	}
+	if (d == dst)
+		return -EINVAL;
+
+	return 0;
+}
+
+static int btmrvl_load_cal_data(struct btmrvl_private *priv,
+				u8 *config_data)
+{
+	struct sk_buff *skb;
+	struct btmrvl_cmd *cmd;
+	int i;
+
+	skb = bt_skb_alloc(sizeof(*cmd), GFP_ATOMIC);
+	if (!skb)
+		return -ENOMEM;
+
+	cmd = (struct btmrvl_cmd *)skb->data;
+	cmd->ocf_ogf =
+		cpu_to_le16(hci_opcode_pack(OGF, BT_CMD_LOAD_CONFIG_DATA));
+	cmd->length = BT_CMD_DATA_SIZE;
+	cmd->data[0] = 0x00;
+	cmd->data[1] = 0x00;
+	cmd->data[2] = 0x00;
+	cmd->data[3] = BT_CMD_DATA_SIZE - 4;
+
+	/* swap cal-data bytes */
+	for (i = 4; i < BT_CMD_DATA_SIZE; i++)
+		cmd->data[i] = config_data[(i/4)*8 - 1 - i];
+
+	bt_cb(skb)->pkt_type = MRVL_VENDOR_PKT;
+	skb_put(skb, sizeof(*cmd));
+	skb->dev = (void *)priv->btmrvl_dev.hcidev;
+	skb_queue_head(&priv->adapter->tx_queue, skb);
+	priv->btmrvl_dev.sendcmdflag = true;
+	priv->adapter->cmd_complete = false;
+
+	print_hex_dump_bytes("Calibration data: ",
+			     DUMP_PREFIX_OFFSET, cmd->data, BT_CMD_DATA_SIZE);
+
+	wake_up_interruptible(&priv->main_thread.wait_q);
+	if (!wait_event_interruptible_timeout(priv->adapter->cmd_wait_q,
+					      priv->adapter->cmd_complete,
+				       msecs_to_jiffies(WAIT_UNTIL_CMD_RESP))) {
+		BT_ERR("Timeout while loading calibration data");
+		return -ETIMEDOUT;
+	}
+
+	return 0;
+}
+
+static int
+btmrvl_process_cal_cfg(struct btmrvl_private *priv, u8 *data, u32 size)
+{
+	u8 cal_data[BT_CAL_DATA_SIZE];
+	int ret;
+
+	ret = btmrvl_parse_cal_cfg(data, size, cal_data, sizeof(cal_data));
+	if (ret)
+		return ret;
+
+	ret = btmrvl_load_cal_data(priv, cal_data);
+	if (ret) {
+		BT_ERR("Fail to load calibrate data");
+		return ret;
+	}
+
+	return 0;
+}
+
+static int btmrvl_cal_data_config(struct btmrvl_private *priv, char *cal_file)
+{
+	const struct firmware *cfg;
+	int ret;
+
+	if (!cal_file)
+		return 0;
+
+	ret = request_firmware(&cfg, cal_file, priv->btmrvl_dev.dev);
+	if (ret < 0) {
+		BT_ERR("request_firmware() %s failed", cal_file);
+		goto done;
+	}
+
+	ret = btmrvl_process_cal_cfg(priv, (u8 *)cfg->data, cfg->size);
+done:
+	if (cfg)
+		release_firmware(cfg);
+
+	return ret;
+}
+
 int btmrvl_register_hdev(struct btmrvl_private *priv)
 {
 	struct hci_dev *hdev = NULL;
@@ -583,12 +710,21 @@ int btmrvl_register_hdev(struct btmrvl_private *priv)
 		goto err_hci_register_dev;
 	}
 
+	ret = btmrvl_cal_data_config(priv, cal_data_cfg);
+	if (ret) {
+		BT_ERR("Set cal data failed");
+		goto err_cal_data_config;
+	}
+
 #ifdef CONFIG_DEBUG_FS
 	btmrvl_debugfs_init(hdev);
 #endif
 
 	return 0;
 
+err_cal_data_config:
+	hci_unregister_dev(hdev);
+
 err_hci_register_dev:
 	hci_free_dev(hdev);
 
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index 75c2626..bb9912c 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -18,7 +18,6 @@
  * this warranty disclaimer.
  **/
 
-#include <linux/firmware.h>
 #include <linux/slab.h>
 
 #include <linux/mmc/sdio_ids.h>
@@ -1034,6 +1033,7 @@ static int btmrvl_sdio_probe(struct sdio_func *func,
 	}
 
 	card->priv = priv;
+	priv->btmrvl_dev.dev = &card->func->dev;
 
 	/* Initialize the interface specific function pointers */
 	priv->hw_host_to_card = btmrvl_sdio_host_to_card;
-- 
1.8.0


^ permalink raw reply related

* Re: pull-request: iwlwifi-fixes 2013-07-26
From: John W. Linville @ 2013-07-29 18:45 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1374826675.8248.11.camel@jlt4.sipsolutions.net>

On Fri, Jul 26, 2013 at 10:17:55AM +0200, Johannes Berg wrote:
> John,
> 
> Yet some more fixes - we're adding tests and are doing a debug cycle
> with them.
> 
> We have a scan fix for passive channels, a new PCI device ID for an old
> device, a NIC reset fix, an RF-Kill fix, a fix for powersave when GO
> interfaces are present as well as an aggregation session fix (for a
> corner case) and a workaround for a firmware design issue - it only
> supports a single GTK in D3.
> 
> Let me know if there's any problem.
> 
> johannes
> 
> 
> 
> The following changes since commit a590ad411891de551e6de1b51ea635c0484148d6:
> 
>   iwlwifi: mvm: remove extra SSID from probe request (2013-07-16 13:55:15 +0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git for-john
> 
> for you to fetch changes up to a53ee0a308b16e392e0219c585b10f329345766b:
> 
>   iwlwifi: pcie: clear RFKILL interrupt in AMPG (2013-07-26 10:07:10 +0200)

Pulling now...

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: pull-request: mac80211 2013-07-26
From: John W. Linville @ 2013-07-29 18:48 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1374828153.8248.19.camel@jlt4.sipsolutions.net>

On Fri, Jul 26, 2013 at 10:42:33AM +0200, Johannes Berg wrote:
> John,
> 
> And another one for mac80211 - that's all for now then :-)
> 
> I only have three fixes this time, a fix for a suspend regression, a
> patch correcting the initiator in regulatory code and one fix for mesh
> station powersave.
> 
> Let me know if there's any problem.
> 
> johannes
> 
> 
> The following changes since commit 5c9fc93bc9bc417418fc1b6366833ae6a07b804d:
> 
>   mac80211/minstrel: fix NULL pointer dereference issue (2013-07-16 17:48:14 +0300)
> 
> are available in the git repository at:
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john
> 
> for you to fetch changes up to 23df0b731954502a9391e739b92927cee4360343:
> 
>   regulatory: use correct regulatory initiator on wiphy register (2013-07-25 09:52:46 +0200)

Pulling now...

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* [PATCH V2] fwcutter: Add firmware 6.30.163.46
From: Larry Finger @ 2013-07-29 18:56 UTC (permalink / raw)
  To: m; +Cc: linux-wireless, b43-dev, Larry Finger

This firmware version can be extracted from the GPL tarball for the ASUS
GPL code for the RT-AC66U 802.11ac Dual-Band Wireless-AC1750 Gigabit Router.

I believe this to be the first instance of 802.11ac firmware for Broadcom
hardware. The firmware is version 784.2.

Note: The http://www.lwfinger.com/broadcom-wl-6.30.163.46.tar.bz2 is the URL
of the extracted apsta binary. The full GPL package is at
http://dlcdnet.asus.com/pub/ASUS/wireless/RT-AC66U/GPL_RT_AC66U_3004372.zip.

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

V2 - Add original URL for full GPL package

---

 fwcutter/fwcutter_list.h | 182 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 182 insertions(+)

diff --git a/fwcutter/fwcutter_list.h b/fwcutter/fwcutter_list.h
index f84607f..4e0c07a 100644
--- a/fwcutter/fwcutter_list.h
+++ b/fwcutter/fwcutter_list.h
@@ -771,6 +771,179 @@ static struct extract _e1b05e268bcdbfef3560c28fc161f30e[] =
 	EXTRACT_LIST_END
 };
 
+static struct extract _29c8a47094fbae342902d84881a465ff[] =
+{
+	{ .name = "lcn1bsinitvals26", .offset = 0x22CF88, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n0bsinitvals22", .offset = 0x28D3D8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn0bsinitvals26", .offset = 0x22BF18, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ac1bsinitvals42", .offset = 0x274530, .type = EXT_IV, .length = 0x248 },
+	{ .name = "ucode24_lcn", .offset = 0x23AF24, .type = EXT_UCODE_3, .length = 0x891A },
+	/* ucode minor version at offset 0x288284 */
+	{ .name = "ht0bsinitvals26", .offset = 0x22F068, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ucode24_mimo", .offset = 0x231300, .type = EXT_UCODE_3, .length = 0x9C20 },
+	{ .name = "n20initvals36", .offset = 0x2312D0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode15", .offset = 0x2E86A0, .type = EXT_UCODE_3, .length = 0x7190 },
+	{ .name = "b0g0bsinitvals9", .offset = 0x2C8AF8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn405initvals35", .offset = 0x2312C0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac1initvals42", .offset = 0x273218, .type = EXT_IV, .length = 0x1310 },
+	{ .name = "lp0bsinitvals13", .offset = 0x2CC668, .type = EXT_IV, .length = 0x118 },
+	{ .name = "b0g0bsinitvals5", .offset = 0x2C6898, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ucode43", .offset = 0x288270, .type = EXT_UCODE_3, .length = 0x4 },
+	{ .name = "lp0initvals16", .offset = 0x28A3F8, .type = EXT_IV, .length = 0xF90 },
+	{ .name = "lp1bsinitvals20", .offset = 0x28C408, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn1initvals25", .offset = 0x2279C8, .type = EXT_IV, .length = 0x10D8 },
+	{ .name = "b0g0initvals13", .offset = 0x2CC788, .type = EXT_IV, .length = 0xBF0 },
+	{ .name = "lcn402initvals33", .offset = 0x231270, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn3bsinitvals21", .offset = 0x28D2B0, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ht0initvals29", .offset = 0x22F198, .type = EXT_IV, .length = 0xF98 },
+	{ .name = "n2bsinitvals19", .offset = 0x28C3B8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn1bsinitvals20", .offset = 0x28C3F8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode25_lcn", .offset = 0x24B570, .type = EXT_UCODE_3, .length = 0x8657 },
+	{ .name = "lcn0initvals24", .offset = 0x221FA8, .type = EXT_IV, .length = 0x10E0 },
+	{ .name = "lcn404initvals33", .offset = 0x231290, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn1bsinitvals27", .offset = 0x22F190, .type = EXT_IV, .length = 0x0 },
+/*	{ .name = "a0g0bsinitvals4", .offset = 0x2C5E80, .type = EXT_IV, .length = 0x0 }, */
+	{ .name = "lcn404bsinitvals33", .offset = 0x231298, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode22_sslpn", .offset = 0x2C5E44, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "lcn1bsinitvals25", .offset = 0x228AA8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn406initvals37", .offset = 0x2312E0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac3initvals43", .offset = 0x274780, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn2initvals26", .offset = 0x22D0A8, .type = EXT_IV, .length = 0xF48 },
+/*	{ .name = "b0g0initvals4", .offset = 0x2C5E68, .type = EXT_IV, .length = 0x0 }, */
+	{ .name = "ucode20_sslpn", .offset = 0x2B761C, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "lcn403bsinitvals33", .offset = 0x231288, .type = EXT_IV, .length = 0x0 },
+	{ .name = "a0g0bsinitvals9", .offset = 0x2CA1D8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n0initvals17", .offset = 0x28B4B0, .type = EXT_IV, .length = 0xDD8 },
+	{ .name = "ht0bsinitvals29", .offset = 0x230138, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ucode21_sslpn", .offset = 0x2B762C, .type = EXT_UCODE_3, .length = 0x7405 },
+	{ .name = "sslpn1initvals20", .offset = 0x28C3F0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn0initvals16", .offset = 0x289340, .type = EXT_IV, .length = 0xF90 },
+	{ .name = "lcn0initvals26", .offset = 0x22AFC8, .type = EXT_IV, .length = 0xF48 },
+	{ .name = "ucode27_sslpn", .offset = 0x25D6E0, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "ucode29_mimo", .offset = 0x25D6E8, .type = EXT_UCODE_3, .length = 0xA8D0 },
+	{ .name = "ucode21_sslpn_nobt", .offset = 0x2BEA38, .type = EXT_UCODE_3, .length = 0x7405 },
+	{ .name = "lp0initvals15", .offset = 0x2CE1C8, .type = EXT_IV, .length = 0xE68 },
+	{ .name = "ucode19_sslpn", .offset = 0x2B760C, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "lcn1bsinitvals24", .offset = 0x224298, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn401bsinitvals33", .offset = 0x231268, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lp0bsinitvals14", .offset = 0x2CE1C0, .type = EXT_IV, .length = 0x0 },
+/*	{ .name = "b0g0bsinitvals4", .offset = 0x2C5E70, .type = EXT_IV, .length = 0x0 }, */
+	{ .name = "ucode16_sslpn_nobt", .offset = 0x29DF44, .type = EXT_UCODE_3, .length = 0x701C },
+	{ .name = "n16bsinitvals30", .offset = 0x231120, .type = EXT_IV, .length = 0x118 },
+	{ .name = "a0g1bsinitvals13", .offset = 0x2CE098, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn402bsinitvals33", .offset = 0x231278, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode19_sslpn_nobt", .offset = 0x2B7614, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "ucode40", .offset = 0x274790, .type = EXT_UCODE_3, .length = 0x9E80 },
+	{ .name = "lcn1initvals24", .offset = 0x2231B0, .type = EXT_IV, .length = 0x10E0 },
+	{ .name = "sslpn2initvals19", .offset = 0x28C3C0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac2initvals41", .offset = 0x273208, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n16initvals30", .offset = 0x230258, .type = EXT_IV, .length = 0xEC0 },
+	{ .name = "ucode16_lp", .offset = 0x28D400, .type = EXT_UCODE_3, .length = 0x83E8 },
+	{ .name = "n0initvals22", .offset = 0x28D3D0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn3initvals21", .offset = 0x28C410, .type = EXT_IV, .length = 0xE98 },
+	{ .name = "lp1initvals22", .offset = 0x28D3F0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac2bsinitvals41", .offset = 0x273210, .type = EXT_IV, .length = 0x0 },
+	{ .name = "a0g1bsinitvals9", .offset = 0x2CA2F8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n0bsinitvals11", .offset = 0x2CB030, .type = EXT_IV, .length = 0x118 },
+	{ .name = "a0g1bsinitvals5", .offset = 0x2C7EF8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn2bsinitvals26", .offset = 0x22DFF8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ucode34_mimo", .offset = 0x271C58, .type = EXT_UCODE_3, .length = 0x4 },
+	{ .name = "n1initvals20", .offset = 0x28C3E0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn2initvals25", .offset = 0x228BC8, .type = EXT_IV, .length = 0x10D8 },
+	{ .name = "ucode37_lcn40", .offset = 0x271C70, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "n0initvals16", .offset = 0x288288, .type = EXT_IV, .length = 0xF90 },
+	{ .name = "n0bsinitvals24", .offset = 0x2266A8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n1bsinitvals20", .offset = 0x28C3E8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "b0g0initvals5", .offset = 0x2C5E88, .type = EXT_IV, .length = 0xA08 },
+	{ .name = "b0g0initvals9", .offset = 0x2C8018, .type = EXT_IV, .length = 0xAD8 },
+	{ .name = "lcn0bsinitvals24", .offset = 0x223090, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn2bsinitvals25", .offset = 0x229CA8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "sslpn4bsinitvals22", .offset = 0x28D3E8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode11", .offset = 0x2DA198, .type = EXT_UCODE_2, .length = 0x7818 },
+	{ .name = "n2initvals19", .offset = 0x28C3B0, .type = EXT_IV, .length = 0x0 },
+/*	{ .name = "a0g0initvals4", .offset = 0x2C5E78, .type = EXT_IV, .length = 0x0 }, */
+	{ .name = "pcm4", .offset = 0x2EF834, .type = EXT_PCM, .length = 0x4 },
+	{ .name = "ucode13", .offset = 0x2E19B4, .type = EXT_UCODE_2, .length = 0x6CE0 },
+	{ .name = "lcn0initvals25", .offset = 0x2267C8, .type = EXT_IV, .length = 0x10D8 },
+	{ .name = "sslpn1initvals27", .offset = 0x22F188, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lp0bsinitvals15", .offset = 0x2CF038, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lp0initvals14", .offset = 0x2CE1B8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lp1bsinitvals22", .offset = 0x28D3F8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n18initvals32", .offset = 0x231240, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn405bsinitvals35", .offset = 0x2312C8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode41", .offset = 0x27E614, .type = EXT_UCODE_3, .length = 0x4 },
+	{ .name = "lcn400initvals33", .offset = 0x231250, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn0bsinitvals16", .offset = 0x28A2D8, .type = EXT_IV, .length = 0x118 },
+	/* ucode minor version at offset 0x2c5e64 */
+	{ .name = "lcn401initvals33", .offset = 0x231260, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode33_lcn40", .offset = 0x271C50, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "a0g1initvals9", .offset = 0x2C96F8, .type = EXT_IV, .length = 0xAD8 },
+	{ .name = "ucode32_mimo", .offset = 0x271C48, .type = EXT_UCODE_3, .length = 0x4 },
+	{ .name = "lcn400bsinitvals33", .offset = 0x231258, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn404bsinitvals35", .offset = 0x2312B8, .type = EXT_IV, .length = 0x0 },
+	/* ucode major version at offset 0x221fa0 */
+	{ .name = "n19initvals34", .offset = 0x2312A0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac3bsinitvals43", .offset = 0x274788, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n0initvals25", .offset = 0x229DC8, .type = EXT_IV, .length = 0x10D8 },
+	{ .name = "ucode26_mimo", .offset = 0x253BCC, .type = EXT_UCODE_3, .length = 0x9B10 },
+	{ .name = "n0bsinitvals16", .offset = 0x289220, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn404initvals35", .offset = 0x2312B0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lp2bsinitvals19", .offset = 0x28C3D8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n19bsinitvals34", .offset = 0x2312A8, .type = EXT_IV, .length = 0x0 },
+/*	{ .name = "ucode4", .offset = 0x2CF158, .type = EXT_UCODE_1, .length = 0x4 }, */
+	{ .name = "ucode20_sslpn_nobt", .offset = 0x2B7624, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "ac0bsinitvals40", .offset = 0x272FB8, .type = EXT_IV, .length = 0x248 },
+	/* ucode minor version at offset 0x271c84 */
+	{ .name = "lcn2initvals24", .offset = 0x2243B8, .type = EXT_IV, .length = 0x10E0 },
+	{ .name = "sslpn4initvals22", .offset = 0x28D3E0, .type = EXT_IV, .length = 0x0 },
+	/* ucode major version at offset 0x288280 */
+	{ .name = "sslpn2bsinitvals19", .offset = 0x28C3C8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n0bsinitvals25", .offset = 0x22AEA8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lp2initvals19", .offset = 0x28C3D0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n18bsinitvals32", .offset = 0x231248, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn0bsinitvals25", .offset = 0x2278A8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n0initvals11", .offset = 0x2CA418, .type = EXT_IV, .length = 0xC10 },
+	{ .name = "lcn2bsinitvals24", .offset = 0x2254A0, .type = EXT_IV, .length = 0x118 },
+	/* ucode major version at offset 0x2c5e60 */
+	{ .name = "n0absinitvals11", .offset = 0x2CB150, .type = EXT_IV, .length = 0x118 },
+	{ .name = "a0g0initvals5", .offset = 0x2C69B8, .type = EXT_IV, .length = 0xA08 },
+	{ .name = "a0g1initvals13", .offset = 0x2CD4A0, .type = EXT_IV, .length = 0xBF0 },
+	{ .name = "pcm5", .offset = 0x2EF83C, .type = EXT_PCM, .length = 0x520 },
+	{ .name = "ucode35_lcn40", .offset = 0x271C60, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "ucode14", .offset = 0x2E8698, .type = EXT_UCODE_2, .length = 0x4 },
+	{ .name = "ucode36_mimo", .offset = 0x271C68, .type = EXT_UCODE_3, .length = 0x4 },
+	{ .name = "a0g0initvals9", .offset = 0x2C8C18, .type = EXT_IV, .length = 0xAD8 },
+	{ .name = "ucode17_mimo", .offset = 0x2AE928, .type = EXT_UCODE_3, .length = 0x8CE0 },
+	{ .name = "lp0initvals13", .offset = 0x2CB270, .type = EXT_IV, .length = 0x13F0 },
+	{ .name = "ucode25_mimo", .offset = 0x243844, .type = EXT_UCODE_3, .length = 0x7D28 },
+	{ .name = "lp0bsinitvals16", .offset = 0x28B390, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn406bsinitvals37", .offset = 0x2312E8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac0initvals40", .offset = 0x271C88, .type = EXT_IV, .length = 0x1328 },
+	{ .name = "ucode30_mimo", .offset = 0x267FBC, .type = EXT_UCODE_3, .length = 0x9C88 },
+	{ .name = "b0g0bsinitvals13", .offset = 0x2CD380, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n20bsinitvals36", .offset = 0x2312D8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode42", .offset = 0x27E61C, .type = EXT_UCODE_3, .length = 0x9C50 },
+	{ .name = "lcn407initvals38", .offset = 0x2312F0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn1initvals26", .offset = 0x22C038, .type = EXT_IV, .length = 0xF48 },
+	/* ucode major version at offset 0x271c80 */
+	{ .name = "ht0initvals26", .offset = 0x22E118, .type = EXT_IV, .length = 0xF48 },
+	{ .name = "ucode38_lcn40", .offset = 0x271C78, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "lcn407bsinitvals38", .offset = 0x2312F8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn403initvals33", .offset = 0x231280, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode16_sslpn", .offset = 0x2957EC, .type = EXT_UCODE_3, .length = 0x8753 },
+	{ .name = "ucode16_mimo", .offset = 0x2A4F64, .type = EXT_UCODE_3, .length = 0x99C0 },
+	/* ucode minor version at offset 0x221fa4 */
+	{ .name = "n0bsinitvals17", .offset = 0x28C290, .type = EXT_IV, .length = 0x118 },
+	{ .name = "a0g1initvals5", .offset = 0x2C73C8, .type = EXT_IV, .length = 0xA08 },
+	{ .name = "n0initvals24", .offset = 0x2255C0, .type = EXT_IV, .length = 0x10E0 },
+	{ .name = "lp1initvals20", .offset = 0x28C400, .type = EXT_IV, .length = 0x0 },
+	{ .name = "a0g0bsinitvals5", .offset = 0x2C7DD8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ucode9", .offset = 0x2D4394, .type = EXT_UCODE_2, .length = 0x5E00 },
+	{ .name = "ucode5", .offset = 0x2CF160, .type = EXT_UCODE_2, .length = 0x5230 },
+	{ .name = "ucode22_mimo", .offset = 0x2C5E4C, .type = EXT_UCODE_3, .length = 0x4 },
+	EXTRACT_LIST_END
+};
+
 /*
  * Links change, so let's not put them into the README.
  * I still put them here so we know where the file was obtained.
@@ -874,4 +1047,13 @@ static const struct file files[] =
 		.flags		= FW_FLAG_LE | FW_FLAG_V4,
 		.extract	= _e1b05e268bcdbfef3560c28fc161f30e,
 	},
+	{
+		/* http://www.lwfinger.com/b43-firmware/broadcom-wl-6.30.163.46.tar.bz2 */
+		/* http://dlcdnet.asus.com/pub/ASUS/wireless/RT-AC66U/GPL_RT_AC66U_3004372.zip */
+		.name		= "wl_apsta.o",
+		.ucode_version	= "784.2",
+		.md5		= "29c8a47094fbae342902d84881a465ff",
+		.flags		= FW_FLAG_LE | FW_FLAG_V4,
+		.extract	= _29c8a47094fbae342902d84881a465ff,
+	},
 };
-- 
1.8.1.4


^ permalink raw reply related

* Re: Pull request: ath-current 20130723
From: John W. Linville @ 2013-07-29 18:42 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless, ath6kl-devel, ath10k
In-Reply-To: <87ehapwqum.fsf@kamboji.qca.qualcomm.com>

On Tue, Jul 23, 2013 at 12:46:57PM +0300, Kalle Valo wrote:
> Hi John,
> 
> here's an ath6kl and ath10k pull request for 3.11-rc series.
> 
> Geert Uytterhoeven fixed an ath10k build problem when NO_DMA=y. I added
> a missing MAINTAINERS entry for ath10k and updated ath6kl git tree
> location.
> 
> Please let me know if there are any problems, or if you prefer me to
> send them through wireless-next instead.
> 
> Kalle
> 
> The following changes since commit 64b6f46f1141ad938e354f37af62e28da972e8eb:
> 
>   ath9k_hw: Fix multicast search for AR9002 family (2013-07-18 16:22:00 -0400)
> 
> are available in the git repository at:
> 
>   git://github.com/kvalo/ath.git for-linville-current
> 
> for you to fetch changes up to 58cfb681bffb43654776a218a087028ff425ba9e:
> 
>   MAINTAINERS: update ath6kl git location (2013-07-22 12:26:12 +0300)

Pulling now...

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: pull request: bluetooth 2013-07-25
From: John W. Linville @ 2013-07-29 18:43 UTC (permalink / raw)
  To: Gustavo Padovan, linux-wireless, linux-bluetooth, linux-kernel
In-Reply-To: <20130725150156.GA21959@joana>

On Thu, Jul 25, 2013 at 04:01:58PM +0100, Gustavo Padovan wrote:
> Hi John,
> 
> * Gustavo Padovan <gustavo@padovan.org> [2013-07-25 14:05:54 +0100]:
> 
> > Hi John,
> > 
> > A few fixes and devices ID additions for 3.11: 
> > 
> >  * There are 3 new ath3k device ids 
> >  * Fixed stack memory usage in ath3k.
> >  * Fixed the init process of BlueFRITZ! devices, they were failing to init
> >    due to an unsupported command we sent. 
> >  * Fixed wrong use of PTR_ERR in btusb code that was preventing intel devices
> >    to work properly 
> >  * Fixed race codition between hci_register_dev() and hci_dev_open() that
> >    could cause a NULL pointer dereference.
> 
> Marcel just raised the comment that we need to add more information to
> the BlueFRITZ! fixes so I'm steping back with it. So just ignore it for
> now.
> 
> 	Gustavo

Is a new version of this request still coming?

-- 
John W. Linville		Someday the world will need a hero, and you
linville@tuxdriver.com			might be all we have.  Be ready.

^ permalink raw reply

* Re: [RFC/RFT] fwcutter: Add firmware 6.30.163.46
From: Michael Büsch @ 2013-07-29 17:03 UTC (permalink / raw)
  To: Larry Finger; +Cc: linux-wireless, b43-dev
In-Reply-To: <1375115025-26851-1-git-send-email-Larry.Finger@lwfinger.net>

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

On Mon, 29 Jul 2013 11:23:45 -0500
Larry Finger <Larry.Finger@lwfinger.net> wrote:

> Is this change worthwhile?

Why not? Doesn't hurt to have it.

> @@ -874,4 +1047,12 @@ static const struct file files[] =
>  		.flags		= FW_FLAG_LE | FW_FLAG_V4,
>  		.extract	= _e1b05e268bcdbfef3560c28fc161f30e,
>  	},
> +	{
> +		/* http://www.lwfinger.com/b43-firmware/broadcom-wl-6.30.163.46.tar.bz2 */

Could you also add the original URL here?

-- 
Michael

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* 3.10, iwlwifi 6200AGN: AP changed bandwidth in a way we can't support - disconnect
From: Andy Isaacson @ 2013-07-29 16:34 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, netdev

After upgrading to 3.10.4 and traveling to Europe I'm often suffering
from failures to associate with the following in dmesg:

[   37.351621] wlan0: authenticate with 64:70:02:e6:a6:ba
[   37.364701] wlan0: send auth to 64:70:02:e6:a6:ba (try 1/3)
[   37.366358] wlan0: authenticated
[   37.368543] wlan0: associate with 64:70:02:e6:a6:ba (try 1/3)
[   37.372765] wlan0: RX AssocResp from 64:70:02:e6:a6:ba (capab=0x431 status=0 aid=8)
[   37.380190] wlan0: associated
[   37.438935] wlan0: AP 64:70:02:e6:a6:ba changed bandwidth, new config is 2447 MHz, width 1 (2447/0 MHz)
[   37.438941] wlan0: AP 64:70:02:e6:a6:ba changed bandwidth in a way we can't support - disconnect

I hacked the driver to do

-                  "AP %pM changed bandwidth, new config is %d MHz, width %d (%d/%d MHz)\n",
+                  "AP %pM changed bandwidth, new config is %d MHz, width %d (%d/%d MHz) flags %x/%x\n",
                   ifmgd->bssid, chandef.chan->center_freq, chandef.width,
-                  chandef.center_freq1, chandef.center_freq2);
+                  chandef.center_freq1, chandef.center_freq2, flags, ifmgd->flags);

and

-       if (flags != (ifmgd->flags & (IEEE80211_STA_DISABLE_HT |
+       if ((flags != 0x810 && ifmgd->flags != 0x804) && (
+            flags != (ifmgd->flags & (IEEE80211_STA_DISABLE_HT |

and the result is a working link with

[ 1277.069287] wlan0: authenticate with 64:70:02:e6:a6:ba
[ 1277.118344] wlan0: send auth to 64:70:02:e6:a6:ba (try 1/3)
[ 1277.222126] wlan0: send auth to 64:70:02:e6:a6:ba (try 2/3)
[ 1277.226656] wlan0: authenticated
[ 1277.226806] wlan0: waiting for beacon from 64:70:02:e6:a6:ba
[ 1277.258119] wlan0: associate with 64:70:02:e6:a6:ba (try 1/3)
[ 1277.262717] wlan0: RX AssocResp from 64:70:02:e6:a6:ba (capab=0x431 status=0 aid=9)
[ 1277.269678] wlan0: associated
[ 1277.269727] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[ 1277.366049] wlan0: AP 64:70:02:e6:a6:ba changed bandwidth, new config is 2447 MHz, width 1 (2447/0 MHz) flags 810/804
[ 2219.627077] wlan0: AP 64:70:02:e6:a6:ba changed bandwidth, new config is 2447 MHz, width 2 (2437/0 MHz) flags 800/804
[ 2220.668210] wlan0: AP 64:70:02:e6:a6:ba changed bandwidth, new config is 2447 MHz, width 1 (2447/0 MHz) flags 810/804

My userland is Debian unstable with 

ii  wpasupplicant    1.0-3+b2      amd64 client support for WPA and WPA2 (IEEE 802.11i)
ii  firmware-iwlwifi 0.36+wheezy.1 all   Binary firmware for Intel PRO/Wireless 3945 and 802.11

using ifup with the WPA configuration in /etc/network/interfaces.
Hardware is a Thinkpad x201s.  Bootup iwlwifi messages are

[    7.985050] iwlwifi 0000:02:00.0: irq 42 for MSI/MSI-X
[    8.061896] iwlwifi 0000:02:00.0: loaded firmware version 9.221.4.1 build 25532 op_mode iwldvm
[    8.087255] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUG enabled
[    8.087257] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEBUGFS enabled
[    8.087258] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEVICE_TRACING enabled
[    8.087260] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_DEVICE_TESTMODE disabled
[    8.087261] iwlwifi 0000:02:00.0: CONFIG_IWLWIFI_P2P enabled
[    8.087264] iwlwifi 0000:02:00.0: Detected Intel(R) Centrino(R) Advanced-N 6200 AGN, REV=0x74
[    8.087379] iwlwifi 0000:02:00.0: L1 Enabled; Disabling L0S
[   26.676655] iwlwifi 0000:02:00.0: L1 Enabled; Disabling L0S
[   26.683499] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1
[   27.023090] iwlwifi 0000:02:00.0: L1 Enabled; Disabling L0S
[   27.029927] iwlwifi 0000:02:00.0: Radio type=0x1-0x3-0x1

-andy

^ permalink raw reply

* [RFC/RFT] fwcutter: Add firmware 6.30.163.46
From: Larry Finger @ 2013-07-29 16:23 UTC (permalink / raw)
  To: m; +Cc: linux-wireless, b43-dev, Larry Finger

This firmware version can be extracted from the GPL tarball for the ASUS
GPL code for the RT-AC66U 802.11ac Dual-Band Wireless-AC1750 Gigabit Router.

I believe this to be the first instance of 802.11ac firmware for Broadcom
hardware. The firmware is version 784.2.

Note: The http://www.lwfinger.com/broadcom-wl-6.30.163.46.tar.bz2 is the URL
of the extracted apsta binary. The full GPL package is at
http://dlcdnet.asus.com/pub/ASUS/wireless/RT-AC66U/GPL_RT_AC66U_3004372.zip.

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

Michael and list,

Is this change worthwhile? This driver implements through ucode43, thus it covers a
lot of PHY revisions not currently available. I have no idea if there are any firmware
changes for boards that are currently supported by b43.

Larry
---

 fwcutter/fwcutter_list.h | 181 +++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 181 insertions(+)

diff --git a/fwcutter/fwcutter_list.h b/fwcutter/fwcutter_list.h
index f84607f..4e0c07a 100644
--- a/fwcutter/fwcutter_list.h
+++ b/fwcutter/fwcutter_list.h
@@ -771,6 +771,179 @@ static struct extract _e1b05e268bcdbfef3560c28fc161f30e[] =
 	EXTRACT_LIST_END
 };
 
+static struct extract _29c8a47094fbae342902d84881a465ff[] =
+{
+	{ .name = "lcn1bsinitvals26", .offset = 0x22CF88, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n0bsinitvals22", .offset = 0x28D3D8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn0bsinitvals26", .offset = 0x22BF18, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ac1bsinitvals42", .offset = 0x274530, .type = EXT_IV, .length = 0x248 },
+	{ .name = "ucode24_lcn", .offset = 0x23AF24, .type = EXT_UCODE_3, .length = 0x891A },
+	/* ucode minor version at offset 0x288284 */
+	{ .name = "ht0bsinitvals26", .offset = 0x22F068, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ucode24_mimo", .offset = 0x231300, .type = EXT_UCODE_3, .length = 0x9C20 },
+	{ .name = "n20initvals36", .offset = 0x2312D0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode15", .offset = 0x2E86A0, .type = EXT_UCODE_3, .length = 0x7190 },
+	{ .name = "b0g0bsinitvals9", .offset = 0x2C8AF8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn405initvals35", .offset = 0x2312C0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac1initvals42", .offset = 0x273218, .type = EXT_IV, .length = 0x1310 },
+	{ .name = "lp0bsinitvals13", .offset = 0x2CC668, .type = EXT_IV, .length = 0x118 },
+	{ .name = "b0g0bsinitvals5", .offset = 0x2C6898, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ucode43", .offset = 0x288270, .type = EXT_UCODE_3, .length = 0x4 },
+	{ .name = "lp0initvals16", .offset = 0x28A3F8, .type = EXT_IV, .length = 0xF90 },
+	{ .name = "lp1bsinitvals20", .offset = 0x28C408, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn1initvals25", .offset = 0x2279C8, .type = EXT_IV, .length = 0x10D8 },
+	{ .name = "b0g0initvals13", .offset = 0x2CC788, .type = EXT_IV, .length = 0xBF0 },
+	{ .name = "lcn402initvals33", .offset = 0x231270, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn3bsinitvals21", .offset = 0x28D2B0, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ht0initvals29", .offset = 0x22F198, .type = EXT_IV, .length = 0xF98 },
+	{ .name = "n2bsinitvals19", .offset = 0x28C3B8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn1bsinitvals20", .offset = 0x28C3F8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode25_lcn", .offset = 0x24B570, .type = EXT_UCODE_3, .length = 0x8657 },
+	{ .name = "lcn0initvals24", .offset = 0x221FA8, .type = EXT_IV, .length = 0x10E0 },
+	{ .name = "lcn404initvals33", .offset = 0x231290, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn1bsinitvals27", .offset = 0x22F190, .type = EXT_IV, .length = 0x0 },
+/*	{ .name = "a0g0bsinitvals4", .offset = 0x2C5E80, .type = EXT_IV, .length = 0x0 }, */
+	{ .name = "lcn404bsinitvals33", .offset = 0x231298, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode22_sslpn", .offset = 0x2C5E44, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "lcn1bsinitvals25", .offset = 0x228AA8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn406initvals37", .offset = 0x2312E0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac3initvals43", .offset = 0x274780, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn2initvals26", .offset = 0x22D0A8, .type = EXT_IV, .length = 0xF48 },
+/*	{ .name = "b0g0initvals4", .offset = 0x2C5E68, .type = EXT_IV, .length = 0x0 }, */
+	{ .name = "ucode20_sslpn", .offset = 0x2B761C, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "lcn403bsinitvals33", .offset = 0x231288, .type = EXT_IV, .length = 0x0 },
+	{ .name = "a0g0bsinitvals9", .offset = 0x2CA1D8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n0initvals17", .offset = 0x28B4B0, .type = EXT_IV, .length = 0xDD8 },
+	{ .name = "ht0bsinitvals29", .offset = 0x230138, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ucode21_sslpn", .offset = 0x2B762C, .type = EXT_UCODE_3, .length = 0x7405 },
+	{ .name = "sslpn1initvals20", .offset = 0x28C3F0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn0initvals16", .offset = 0x289340, .type = EXT_IV, .length = 0xF90 },
+	{ .name = "lcn0initvals26", .offset = 0x22AFC8, .type = EXT_IV, .length = 0xF48 },
+	{ .name = "ucode27_sslpn", .offset = 0x25D6E0, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "ucode29_mimo", .offset = 0x25D6E8, .type = EXT_UCODE_3, .length = 0xA8D0 },
+	{ .name = "ucode21_sslpn_nobt", .offset = 0x2BEA38, .type = EXT_UCODE_3, .length = 0x7405 },
+	{ .name = "lp0initvals15", .offset = 0x2CE1C8, .type = EXT_IV, .length = 0xE68 },
+	{ .name = "ucode19_sslpn", .offset = 0x2B760C, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "lcn1bsinitvals24", .offset = 0x224298, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn401bsinitvals33", .offset = 0x231268, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lp0bsinitvals14", .offset = 0x2CE1C0, .type = EXT_IV, .length = 0x0 },
+/*	{ .name = "b0g0bsinitvals4", .offset = 0x2C5E70, .type = EXT_IV, .length = 0x0 }, */
+	{ .name = "ucode16_sslpn_nobt", .offset = 0x29DF44, .type = EXT_UCODE_3, .length = 0x701C },
+	{ .name = "n16bsinitvals30", .offset = 0x231120, .type = EXT_IV, .length = 0x118 },
+	{ .name = "a0g1bsinitvals13", .offset = 0x2CE098, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn402bsinitvals33", .offset = 0x231278, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode19_sslpn_nobt", .offset = 0x2B7614, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "ucode40", .offset = 0x274790, .type = EXT_UCODE_3, .length = 0x9E80 },
+	{ .name = "lcn1initvals24", .offset = 0x2231B0, .type = EXT_IV, .length = 0x10E0 },
+	{ .name = "sslpn2initvals19", .offset = 0x28C3C0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac2initvals41", .offset = 0x273208, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n16initvals30", .offset = 0x230258, .type = EXT_IV, .length = 0xEC0 },
+	{ .name = "ucode16_lp", .offset = 0x28D400, .type = EXT_UCODE_3, .length = 0x83E8 },
+	{ .name = "n0initvals22", .offset = 0x28D3D0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn3initvals21", .offset = 0x28C410, .type = EXT_IV, .length = 0xE98 },
+	{ .name = "lp1initvals22", .offset = 0x28D3F0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac2bsinitvals41", .offset = 0x273210, .type = EXT_IV, .length = 0x0 },
+	{ .name = "a0g1bsinitvals9", .offset = 0x2CA2F8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n0bsinitvals11", .offset = 0x2CB030, .type = EXT_IV, .length = 0x118 },
+	{ .name = "a0g1bsinitvals5", .offset = 0x2C7EF8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn2bsinitvals26", .offset = 0x22DFF8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ucode34_mimo", .offset = 0x271C58, .type = EXT_UCODE_3, .length = 0x4 },
+	{ .name = "n1initvals20", .offset = 0x28C3E0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn2initvals25", .offset = 0x228BC8, .type = EXT_IV, .length = 0x10D8 },
+	{ .name = "ucode37_lcn40", .offset = 0x271C70, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "n0initvals16", .offset = 0x288288, .type = EXT_IV, .length = 0xF90 },
+	{ .name = "n0bsinitvals24", .offset = 0x2266A8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n1bsinitvals20", .offset = 0x28C3E8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "b0g0initvals5", .offset = 0x2C5E88, .type = EXT_IV, .length = 0xA08 },
+	{ .name = "b0g0initvals9", .offset = 0x2C8018, .type = EXT_IV, .length = 0xAD8 },
+	{ .name = "lcn0bsinitvals24", .offset = 0x223090, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn2bsinitvals25", .offset = 0x229CA8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "sslpn4bsinitvals22", .offset = 0x28D3E8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode11", .offset = 0x2DA198, .type = EXT_UCODE_2, .length = 0x7818 },
+	{ .name = "n2initvals19", .offset = 0x28C3B0, .type = EXT_IV, .length = 0x0 },
+/*	{ .name = "a0g0initvals4", .offset = 0x2C5E78, .type = EXT_IV, .length = 0x0 }, */
+	{ .name = "pcm4", .offset = 0x2EF834, .type = EXT_PCM, .length = 0x4 },
+	{ .name = "ucode13", .offset = 0x2E19B4, .type = EXT_UCODE_2, .length = 0x6CE0 },
+	{ .name = "lcn0initvals25", .offset = 0x2267C8, .type = EXT_IV, .length = 0x10D8 },
+	{ .name = "sslpn1initvals27", .offset = 0x22F188, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lp0bsinitvals15", .offset = 0x2CF038, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lp0initvals14", .offset = 0x2CE1B8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lp1bsinitvals22", .offset = 0x28D3F8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n18initvals32", .offset = 0x231240, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn405bsinitvals35", .offset = 0x2312C8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode41", .offset = 0x27E614, .type = EXT_UCODE_3, .length = 0x4 },
+	{ .name = "lcn400initvals33", .offset = 0x231250, .type = EXT_IV, .length = 0x0 },
+	{ .name = "sslpn0bsinitvals16", .offset = 0x28A2D8, .type = EXT_IV, .length = 0x118 },
+	/* ucode minor version at offset 0x2c5e64 */
+	{ .name = "lcn401initvals33", .offset = 0x231260, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode33_lcn40", .offset = 0x271C50, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "a0g1initvals9", .offset = 0x2C96F8, .type = EXT_IV, .length = 0xAD8 },
+	{ .name = "ucode32_mimo", .offset = 0x271C48, .type = EXT_UCODE_3, .length = 0x4 },
+	{ .name = "lcn400bsinitvals33", .offset = 0x231258, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn404bsinitvals35", .offset = 0x2312B8, .type = EXT_IV, .length = 0x0 },
+	/* ucode major version at offset 0x221fa0 */
+	{ .name = "n19initvals34", .offset = 0x2312A0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac3bsinitvals43", .offset = 0x274788, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n0initvals25", .offset = 0x229DC8, .type = EXT_IV, .length = 0x10D8 },
+	{ .name = "ucode26_mimo", .offset = 0x253BCC, .type = EXT_UCODE_3, .length = 0x9B10 },
+	{ .name = "n0bsinitvals16", .offset = 0x289220, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn404initvals35", .offset = 0x2312B0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lp2bsinitvals19", .offset = 0x28C3D8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n19bsinitvals34", .offset = 0x2312A8, .type = EXT_IV, .length = 0x0 },
+/*	{ .name = "ucode4", .offset = 0x2CF158, .type = EXT_UCODE_1, .length = 0x4 }, */
+	{ .name = "ucode20_sslpn_nobt", .offset = 0x2B7624, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "ac0bsinitvals40", .offset = 0x272FB8, .type = EXT_IV, .length = 0x248 },
+	/* ucode minor version at offset 0x271c84 */
+	{ .name = "lcn2initvals24", .offset = 0x2243B8, .type = EXT_IV, .length = 0x10E0 },
+	{ .name = "sslpn4initvals22", .offset = 0x28D3E0, .type = EXT_IV, .length = 0x0 },
+	/* ucode major version at offset 0x288280 */
+	{ .name = "sslpn2bsinitvals19", .offset = 0x28C3C8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n0bsinitvals25", .offset = 0x22AEA8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lp2initvals19", .offset = 0x28C3D0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "n18bsinitvals32", .offset = 0x231248, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn0bsinitvals25", .offset = 0x2278A8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n0initvals11", .offset = 0x2CA418, .type = EXT_IV, .length = 0xC10 },
+	{ .name = "lcn2bsinitvals24", .offset = 0x2254A0, .type = EXT_IV, .length = 0x118 },
+	/* ucode major version at offset 0x2c5e60 */
+	{ .name = "n0absinitvals11", .offset = 0x2CB150, .type = EXT_IV, .length = 0x118 },
+	{ .name = "a0g0initvals5", .offset = 0x2C69B8, .type = EXT_IV, .length = 0xA08 },
+	{ .name = "a0g1initvals13", .offset = 0x2CD4A0, .type = EXT_IV, .length = 0xBF0 },
+	{ .name = "pcm5", .offset = 0x2EF83C, .type = EXT_PCM, .length = 0x520 },
+	{ .name = "ucode35_lcn40", .offset = 0x271C60, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "ucode14", .offset = 0x2E8698, .type = EXT_UCODE_2, .length = 0x4 },
+	{ .name = "ucode36_mimo", .offset = 0x271C68, .type = EXT_UCODE_3, .length = 0x4 },
+	{ .name = "a0g0initvals9", .offset = 0x2C8C18, .type = EXT_IV, .length = 0xAD8 },
+	{ .name = "ucode17_mimo", .offset = 0x2AE928, .type = EXT_UCODE_3, .length = 0x8CE0 },
+	{ .name = "lp0initvals13", .offset = 0x2CB270, .type = EXT_IV, .length = 0x13F0 },
+	{ .name = "ucode25_mimo", .offset = 0x243844, .type = EXT_UCODE_3, .length = 0x7D28 },
+	{ .name = "lp0bsinitvals16", .offset = 0x28B390, .type = EXT_IV, .length = 0x118 },
+	{ .name = "lcn406bsinitvals37", .offset = 0x2312E8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ac0initvals40", .offset = 0x271C88, .type = EXT_IV, .length = 0x1328 },
+	{ .name = "ucode30_mimo", .offset = 0x267FBC, .type = EXT_UCODE_3, .length = 0x9C88 },
+	{ .name = "b0g0bsinitvals13", .offset = 0x2CD380, .type = EXT_IV, .length = 0x118 },
+	{ .name = "n20bsinitvals36", .offset = 0x2312D8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode42", .offset = 0x27E61C, .type = EXT_UCODE_3, .length = 0x9C50 },
+	{ .name = "lcn407initvals38", .offset = 0x2312F0, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn1initvals26", .offset = 0x22C038, .type = EXT_IV, .length = 0xF48 },
+	/* ucode major version at offset 0x271c80 */
+	{ .name = "ht0initvals26", .offset = 0x22E118, .type = EXT_IV, .length = 0xF48 },
+	{ .name = "ucode38_lcn40", .offset = 0x271C78, .type = EXT_UCODE_3, .length = 0x1 },
+	{ .name = "lcn407bsinitvals38", .offset = 0x2312F8, .type = EXT_IV, .length = 0x0 },
+	{ .name = "lcn403initvals33", .offset = 0x231280, .type = EXT_IV, .length = 0x0 },
+	{ .name = "ucode16_sslpn", .offset = 0x2957EC, .type = EXT_UCODE_3, .length = 0x8753 },
+	{ .name = "ucode16_mimo", .offset = 0x2A4F64, .type = EXT_UCODE_3, .length = 0x99C0 },
+	/* ucode minor version at offset 0x221fa4 */
+	{ .name = "n0bsinitvals17", .offset = 0x28C290, .type = EXT_IV, .length = 0x118 },
+	{ .name = "a0g1initvals5", .offset = 0x2C73C8, .type = EXT_IV, .length = 0xA08 },
+	{ .name = "n0initvals24", .offset = 0x2255C0, .type = EXT_IV, .length = 0x10E0 },
+	{ .name = "lp1initvals20", .offset = 0x28C400, .type = EXT_IV, .length = 0x0 },
+	{ .name = "a0g0bsinitvals5", .offset = 0x2C7DD8, .type = EXT_IV, .length = 0x118 },
+	{ .name = "ucode9", .offset = 0x2D4394, .type = EXT_UCODE_2, .length = 0x5E00 },
+	{ .name = "ucode5", .offset = 0x2CF160, .type = EXT_UCODE_2, .length = 0x5230 },
+	{ .name = "ucode22_mimo", .offset = 0x2C5E4C, .type = EXT_UCODE_3, .length = 0x4 },
+	EXTRACT_LIST_END
+};
+
 /*
  * Links change, so let's not put them into the README.
  * I still put them here so we know where the file was obtained.
@@ -874,4 +1047,12 @@ static const struct file files[] =
 		.flags		= FW_FLAG_LE | FW_FLAG_V4,
 		.extract	= _e1b05e268bcdbfef3560c28fc161f30e,
 	},
+	{
+		/* http://www.lwfinger.com/b43-firmware/broadcom-wl-6.30.163.46.tar.bz2 */
+		.name		= "wl_apsta.o",
+		.ucode_version	= "784.2",
+		.md5		= "29c8a47094fbae342902d84881a465ff",
+		.flags		= FW_FLAG_LE | FW_FLAG_V4,
+		.extract	= _29c8a47094fbae342902d84881a465ff,
+	},
 };
-- 
1.8.1.4


^ permalink raw reply related

* [PATCH v2] Documentation: dt: bindings: TI WiLink modules
From: Luciano Coelho @ 2013-07-29 14:55 UTC (permalink / raw)
  To: devicetree-discuss, linux-doc
  Cc: mturquette, mark.rutland, balbi, grant.likely, rob.herring,
	linux-kernel, linux-omap, linux-wireless, linux-arm, tony, nm,
	laurent.pinchart

Add device tree bindings documentation for the TI WiLink modules.
Currently only the WLAN part of the WiLink6, WiLink7 and WiLink8
modules is supported.

Signed-off-by: Luciano Coelho <coelho@ti.com>
---

Changes in v2:

Use generic clock definitions to get the clock data instead of passing
the frequencies directly.  Also added definition for "internal"
ti,wilink-clock.

Please review.

Luca.

 .../devicetree/bindings/net/wireless/ti-wilink.txt | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/wireless/ti-wilink.txt

diff --git a/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
new file mode 100644
index 0000000..5fd27dc
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/wireless/ti-wilink.txt
@@ -0,0 +1,68 @@
+TI WiLink Wireless Modules Device Tree Bindings
+===============================================
+
+The WiLink modules provide wireless connectivity, such as WLAN,
+Bluetooth, FM and NFC.
+
+There are several different modules available, which can be grouped by
+their generation: WiLink6, WiLink7 and WiLink8.  WiLink4 is not
+currently supported with device tree.
+
+Currently, only the WLAN portion of the modules is supported with
+device tree.
+
+Required properties:
+--------------------
+
+- compatible: should be "ti,wilink6", "ti,wilink7" or "ti,wilink8"
+- interrupt-parent: the interrupt controller
+- interrupts: out-of-band WLAN interrupt
+	See the interrupt controller's bindings documentation for
+	detailed definition.
+
+Optional properties:
+--------------------
+
+- clocks: list of clocks needed by the chip as follows:
+
+  refclock: the internal WLAN reference clock frequency (required for
+	WiLink6 and WiLink7; not used for WiLink8).
+
+  tcxoclock: the internal WLAN TCXO clock frequency (required for
+	WiLink7 not used for WiLink6 and WiLink8).
+
+  The clocks must be defined and named accordingly.  For example:
+
+  clocks = <&refclock>
+  clock-names = "refclock";
+
+  refclock: refclock {
+		     compatible = "ti,wilink-clock";
+		     #clock-cells = <0>;
+		     clock-frequency = <38400000>;
+	};
+
+  Some modules that contain the WiLink chip provide clocks in the
+  module itself.  In this case, we define a "ti,wilink-clock" as shown
+  above.  But any other clock could in theory be used, so the proper
+  clock definition should be used.
+
+
+Example:
+--------
+
+Example definition that can be used in OMAP4 Panda:
+
+wlan {
+	compatible = "ti,wilink6";
+	interrupt-parent = <&gpio2>;
+	interrupts = <21 0x4>;	/* gpio line 53, high level triggered */
+	clocks = <&refclock>;
+	clock-names = "refclock";
+
+	refclock: refclock {
+		compatible = "ti,wilink-clock";
+		#clock-cells = <0>;
+		clock-frequency = <38400000>;
+	};
+};
-- 
1.8.3.2


^ permalink raw reply related

* re: mwifiex: handle driver initialization error paths
From: Dan Carpenter @ 2013-07-29 14:47 UTC (permalink / raw)
  To: akarwar; +Cc: linux-wireless

Hello Amitkumar Karwar,

The patch 6b41f941d7cd: "mwifiex: handle driver initialization error 
paths" from Jul 22, 2013, leads to the following warning:
"drivers/net/wireless/mwifiex/main.c:533 mwifiex_fw_dpc()
	 warn: 'adapter' was already freed."

drivers/net/wireless/mwifiex/main.c
   529          adapter->surprise_removed = true;
   530          mwifiex_terminate_workqueue(adapter);
   531          mwifiex_free_adapter(adapter);
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Free.
   532  done:
   533          if (adapter->cal_data) {
                    ^^^^^^^^^^^^^^^^^
Dereference.
   534                  release_firmware(adapter->cal_data);
   535                  adapter->cal_data = NULL;
   536          }

regards,
dan carpenter


^ permalink raw reply

* [PATCH] ath9k: Add a debugfs file for antenna diversity
From: Sujith Manoharan @ 2013-07-29 10:34 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/antenna.c | 10 ++++-
 drivers/net/wireless/ath/ath9k/ath9k.h   |  2 +-
 drivers/net/wireless/ath/ath9k/debug.c   | 64 ++++++++++++++++++++++++++++++++
 drivers/net/wireless/ath/ath9k/debug.h   | 13 +++++++
 4 files changed, 86 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/antenna.c b/drivers/net/wireless/ath/ath9k/antenna.c
index 6560dcb..2785dc3 100644
--- a/drivers/net/wireless/ath/ath9k/antenna.c
+++ b/drivers/net/wireless/ath/ath9k/antenna.c
@@ -600,10 +600,16 @@ void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
 		antcomb->total_pkt_count++;
 		antcomb->main_total_rssi += main_rssi;
 		antcomb->alt_total_rssi  += alt_rssi;
-		if (main_ant_conf == rx_ant_conf)
+
+		if (main_ant_conf == rx_ant_conf) {
 			antcomb->main_recv_cnt++;
-		else
+			ANT_STAT_INC(ANT_MAIN, recv_cnt);
+			ANT_LNA_INC(ANT_MAIN, rx_ant_conf);
+		} else {
 			antcomb->alt_recv_cnt++;
+			ANT_STAT_INC(ANT_ALT, recv_cnt);
+			ANT_LNA_INC(ANT_ALT, rx_ant_conf);
+		}
 	}
 
 	/* Short scan check */
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 2992fd0..2d7e26d 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -609,7 +609,7 @@ struct ath_ant_comb {
 	int rssi_third;
 	bool alt_good;
 	int quick_scan_cnt;
-	int main_conf;
+	enum ath9k_ant_div_comb_lna_conf main_conf;
 	enum ath9k_ant_div_comb_lna_conf first_quick_scan_conf;
 	enum ath9k_ant_div_comb_lna_conf second_quick_scan_conf;
 	bool first_ratio;
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index 5639c5b..56cbe5d 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -321,6 +321,68 @@ static const struct file_operations fops_bt_ant_diversity = {
 	.llseek = default_llseek,
 };
 
+static ssize_t read_file_antenna_diversity(struct file *file,
+					   char __user *user_buf,
+					   size_t count, loff_t *ppos)
+{
+	struct ath_softc *sc = file->private_data;
+	struct ath_hw *ah = sc->sc_ah;
+	struct ath9k_hw_capabilities *pCap = &ah->caps;
+	struct ath_antenna_stats *as_main = &sc->debug.stats.ant_stats[ANT_MAIN];
+	struct ath_antenna_stats *as_alt = &sc->debug.stats.ant_stats[ANT_ALT];
+	unsigned int len = 0, size = 1024;
+	ssize_t retval = 0;
+	char *buf;
+
+	buf = kzalloc(size, GFP_KERNEL);
+	if (buf == NULL)
+		return -ENOMEM;
+
+	if (!(pCap->hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB)) {
+		len += snprintf(buf + len, size - len, "%s\n",
+				"Antenna Diversity Combining is disabled");
+		goto exit;
+	}
+
+	len += snprintf(buf + len, size - len, "%30s%15s\n",
+			"MAIN", "ALT");
+	len += snprintf(buf + len, size - len, "%-15s%15d%15d\n",
+			"RECV CNT",
+			as_main->recv_cnt,
+			as_alt->recv_cnt);
+	len += snprintf(buf + len, size - len, "%-15s%15d%15d\n",
+			"LNA1",
+			as_main->lna_config_cnt[ATH_ANT_DIV_COMB_LNA1],
+			as_alt->lna_config_cnt[ATH_ANT_DIV_COMB_LNA1]);
+	len += snprintf(buf + len, size - len, "%-15s%15d%15d\n",
+			"LNA2",
+			as_main->lna_config_cnt[ATH_ANT_DIV_COMB_LNA2],
+			as_alt->lna_config_cnt[ATH_ANT_DIV_COMB_LNA2]);
+	len += snprintf(buf + len, size - len, "%-15s%15d%15d\n",
+			"LNA1 + LNA2",
+			as_main->lna_config_cnt[ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2],
+			as_alt->lna_config_cnt[ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2]);
+	len += snprintf(buf + len, size - len, "%-15s%15d%15d\n",
+			"LNA1 - LNA2",
+			as_main->lna_config_cnt[ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2],
+			as_alt->lna_config_cnt[ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2]);
+exit:
+	if (len > size)
+		len = size;
+
+	retval = simple_read_from_buffer(user_buf, count, ppos, buf, len);
+	kfree(buf);
+
+	return retval;
+}
+
+static const struct file_operations fops_antenna_diversity = {
+	.read = read_file_antenna_diversity,
+	.open = simple_open,
+	.owner = THIS_MODULE,
+	.llseek = default_llseek,
+};
+
 static ssize_t read_file_dma(struct file *file, char __user *user_buf,
 			     size_t count, loff_t *ppos)
 {
@@ -1816,6 +1878,8 @@ int ath9k_init_debug(struct ath_hw *ah)
 			   sc->debug.debugfs_phy, &sc->sc_ah->gpio_val);
 	debugfs_create_file("bt_ant_diversity", S_IRUSR | S_IWUSR,
 			    sc->debug.debugfs_phy, sc, &fops_bt_ant_diversity);
+	debugfs_create_file("antenna_diversity", S_IRUSR,
+			    sc->debug.debugfs_phy, sc, &fops_antenna_diversity);
 #ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
 	debugfs_create_file("btcoex", S_IRUSR, sc->debug.debugfs_phy, sc,
 			    &fops_btcoex);
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h
index fc67919..a879e45 100644
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -28,9 +28,13 @@ struct fft_sample_tlv;
 #ifdef CONFIG_ATH9K_DEBUGFS
 #define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++
 #define RESET_STAT_INC(sc, type) sc->debug.stats.reset[type]++
+#define ANT_STAT_INC(i, c) sc->debug.stats.ant_stats[i].c++
+#define ANT_LNA_INC(i, c) sc->debug.stats.ant_stats[i].lna_config_cnt[c]++;
 #else
 #define TX_STAT_INC(q, c) do { } while (0)
 #define RESET_STAT_INC(sc, type) do { } while (0)
+#define ANT_STAT_INC(i, c) do { } while (0)
+#define ANT_LNA_INC(i, c) do { } while (0)
 #endif
 
 enum ath_reset_type {
@@ -243,11 +247,20 @@ struct ath_rx_stats {
 	u32 rx_spectral;
 };
 
+#define ANT_MAIN 0
+#define ANT_ALT  1
+
+struct ath_antenna_stats {
+	u32 recv_cnt;
+	u32 lna_config_cnt[4];
+};
+
 struct ath_stats {
 	struct ath_interrupt_stats istats;
 	struct ath_tx_stats txstats[ATH9K_NUM_TX_QUEUES];
 	struct ath_rx_stats rxstats;
 	struct ath_dfs_stats dfs_stats;
+	struct ath_antenna_stats ant_stats[2];
 	u32 reset[__RESET_TYPE_MAX];
 };
 
-- 
1.8.3.4


^ permalink raw reply related

* [RFC] iw: add chan_time scan parameter
From: Michal Kazior @ 2013-07-29  8:42 UTC (permalink / raw)
  To: johannes; +Cc: linux-wireless, Michal Kazior

The new parameter allows user to specify how long
driver should remain on each channel while
scanning.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
Note: nl/cfg/mac patches were sent separately.

      Should this be split into two patches - one
      that updates nl80211.h and the other adding
      the parameter support?

 nl80211.h |    8 ++++++++
 scan.c    |   16 +++++++++++++---
 2 files changed, 21 insertions(+), 3 deletions(-)

diff --git a/nl80211.h b/nl80211.h
index 5abc54d..f9ef050 100644
--- a/nl80211.h
+++ b/nl80211.h
@@ -1469,6 +1469,12 @@ enum nl80211_commands {
  *
  * @NL80211_ATTR_COALESCE_RULE: Coalesce rule information.
  *
+ * @NL80211_ATTR_SCAN_CHAN_TIME: Specifies how many msec should a driver spend
+ *	on each channel during scanning. This is optional and the default is
+ *	leave the decision up to the driver. This setting may, but preferrably
+ *	shouldn't, be ignored by a driver.
+ *
+ *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -1771,6 +1777,8 @@ enum nl80211_attrs {
 
 	NL80211_ATTR_COALESCE_RULE,
 
+	NL80211_ATTR_SCAN_CHAN_TIME,
+
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
diff --git a/scan.c b/scan.c
index 4fb0f23..c5bafd8 100644
--- a/scan.c
+++ b/scan.c
@@ -87,12 +87,13 @@ static int handle_scan(struct nl80211_state *state,
 		SSID,
 		MESHID,
 		DONE,
+		CHANTIME,
 	} parse = NONE;
 	int freq;
 	bool passive = false, have_ssids = false, have_freqs = false;
 	size_t ies_len = 0, meshid_len = 0;
 	unsigned char *ies = NULL, *meshid = NULL, *tmpies;
-	int flags = 0;
+	int flags = 0, chan_time = 0;
 
 	ssids = nlmsg_alloc();
 	if (!ssids)
@@ -137,6 +138,9 @@ static int handle_scan(struct nl80211_state *state,
 			} else if (strcmp(argv[i], "meshid") == 0) {
 				parse = MESHID;
 				break;
+			} else if (strcmp(argv[i], "chan-time") == 0) {
+				parse = CHANTIME;
+				break;
 			}
 		case DONE:
 			return 1;
@@ -170,6 +174,10 @@ static int handle_scan(struct nl80211_state *state,
 			meshid_len += 2;
 			parse = NONE;
 			break;
+		case CHANTIME:
+			chan_time = strtoul(argv[i], &eptr, 10);
+			parse = NONE;
+			break;
 		}
 	}
 
@@ -198,6 +206,8 @@ static int handle_scan(struct nl80211_state *state,
 		nla_put_nested(msg, NL80211_ATTR_SCAN_FREQUENCIES, freqs);
 	if (flags)
 		NLA_PUT_U32(msg, NL80211_ATTR_SCAN_FLAGS, flags);
+	if (chan_time)
+		NLA_PUT_U32(msg, NL80211_ATTR_SCAN_CHAN_TIME, chan_time);
 
 	err = 0;
  nla_put_failure:
@@ -1596,7 +1606,7 @@ static int handle_scan_combined(struct nl80211_state *state,
 	dump_argv[0] = argv[0];
 	return handle_cmd(state, id, dump_argc, dump_argv);
 }
-TOPLEVEL(scan, "[-u] [freq <freq>*] [ies <hex as 00:11:..>] [meshid <meshid>] [lowpri,flush,ap-force] [ssid <ssid>*|passive]", 0, 0,
+TOPLEVEL(scan, "[-u] [freq <freq>*] [ies <hex as 00:11:..>] [meshid <meshid>] [lowpri,flush,ap-force] [chan-time <msec>] [ssid <ssid>*|passive]", 0, 0,
 	 CIB_NETDEV, handle_scan_combined,
 	 "Scan on the given frequencies and probe for the given SSIDs\n"
 	 "(or wildcard if not given) unless passive scanning is requested.\n"
@@ -1606,7 +1616,7 @@ COMMAND(scan, dump, "[-u]",
 	NL80211_CMD_GET_SCAN, NLM_F_DUMP, CIB_NETDEV, handle_scan_dump,
 	"Dump the current scan results. If -u is specified, print unknown\n"
 	"data in scan results.");
-COMMAND(scan, trigger, "[freq <freq>*] [ies <hex as 00:11:..>] [meshid <meshid>] [lowpri,flush,ap-force] [ssid <ssid>*|passive]",
+COMMAND(scan, trigger, "[freq <freq>*] [ies <hex as 00:11:..>] [meshid <meshid>] [lowpri,flush,ap-force] [chan-time <msec>] [ssid <ssid>*|passive]",
 	NL80211_CMD_TRIGGER_SCAN, 0, CIB_NETDEV, handle_scan,
 	 "Trigger a scan on the given frequencies with probing for the given\n"
 	 "SSIDs (or wildcard if not given) unless passive scanning is requested.");
-- 
1.7.9.5


^ permalink raw reply related


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