Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [PATCH] mwifiex: Add module parameter for regdomain
From: Ben Greear @ 2013-06-13 17:36 UTC (permalink / raw)
  To: John W. Linville
  Cc: Bing Zhao, Kalle Valo, linux-wireless@vger.kernel.org,
	Amitkumar Karwar, Avinash Patil, Yogesh Powar, Nishant Sarmukadam,
	Frank Huang, Paul Stewart
In-Reply-To: <20130613173002.GC3246@tuxdriver.com>

On 06/13/2013 10:30 AM, John W. Linville wrote:
> On Wed, Jun 12, 2013 at 12:01:23PM -0700, Bing Zhao wrote:
>>
>>>>> "iw reg set XX" or "country_code=XX" in hostapd.conf is a *user* hint.
>>>>>
>>>>> What we need here is a *driver* hint. Furthermore, with a driver
>>>>> regulatory hint, the passive-scan and no-ibss flags are cleared so we
>>>>> can start AP with hostapd on 5G band.
>>>>
>>>> So it's a driver hint which is coming from user space via a module
>>>> parameter. IMHO you are abusing interfaces here. Is there any better way
>>>> to solve your problem?
>>>
>>> It would be nice to have some way to do this for ath9k and other NICs
>>> as well.  Best I could come up with is a similar hack for ath9k.
>>>
>>> I think part of the problem is that this config info needs to be
>>> available very early in the module loading/init logic, so it's
>>> too late to be configured using 'iw' or similar.
>>
>> Exactly. regulatory_hint () needs to be called right after wiphy registration.
>
> It does seem a bit ugly.  But if Marvell wants it, I don't see any
> "regulatory" argument to disallow something like this.
>
> Does anyone have a better suggestion for a user interface for such
> a feature?

Maybe a global over-ride module-option in cfg80211 module so that
we wouldn't have to have an individual module-option hack for
each driver?

But, then again, maybe we would still want individual driver
config options....

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply

* Re: [PATCH] mwifiex: Add module parameter for regdomain
From: Paul Stewart @ 2013-06-13 17:35 UTC (permalink / raw)
  To: John W. Linville
  Cc: Bing Zhao, Ben Greear, Kalle Valo, linux-wireless@vger.kernel.org,
	Amitkumar Karwar, Avinash Patil, Yogesh Powar, Nishant Sarmukadam,
	Frank Huang
In-Reply-To: <CAMcMvsgVHMzVY4fnW7n+vgdWKKVgvF+fJ93xvRkkfZUjxt-bBQ@mail.gmail.com>

On Thu, Jun 13, 2013 at 10:33 AM, Paul Stewart <pstew@chromium.org> wrote:
> On Thu, Jun 13, 2013 at 10:30 AM, John W. Linville
> <linville@tuxdriver.com> wrote:
>>
>> On Wed, Jun 12, 2013 at 12:01:23PM -0700, Bing Zhao wrote:
>> >
>> > > >> "iw reg set XX" or "country_code=XX" in hostapd.conf is a *user* hint.
>> > > >>
>> > > >> What we need here is a *driver* hint. Furthermore, with a driver
>> > > >> regulatory hint, the passive-scan and no-ibss flags are cleared so we
>> > > >> can start AP with hostapd on 5G band.
>> > > >
>> > > > So it's a driver hint which is coming from user space via a module
>> > > > parameter. IMHO you are abusing interfaces here. Is there any better way
>> > > > to solve your problem?
>> > >
>> > > It would be nice to have some way to do this for ath9k and other NICs
>> > > as well.  Best I could come up with is a similar hack for ath9k.
>> > >
>> > > I think part of the problem is that this config info needs to be
>> > > available very early in the module loading/init logic, so it's
>> > > too late to be configured using 'iw' or similar.
>> >
>> > Exactly. regulatory_hint () needs to be called right after wiphy registration.
>>
>> It does seem a bit ugly.  But if Marvell wants it, I don't see any
>> "regulatory" argument to disallow something like this.
>>
>> Does anyone have a better suggestion for a user interface for such
>> a feature?
>
>
> The only (slightly) cleaner thing I could think of is a module
> parameter to cfg80211 so all drivers in the system would be made aware
> of the boot-time regulatory domain.

Oh, wait.  That exists in the 'ieee80211_regdom' parameter to
cfg80211.  You should use that. :-)

>>
>>
>> John
>> --
>> 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: [PATCH] mwifiex: Add module parameter for regdomain
From: Paul Stewart @ 2013-06-13 17:33 UTC (permalink / raw)
  To: John W. Linville
  Cc: Bing Zhao, Ben Greear, Kalle Valo, linux-wireless@vger.kernel.org,
	Amitkumar Karwar, Avinash Patil, Yogesh Powar, Nishant Sarmukadam,
	Frank Huang
In-Reply-To: <20130613173002.GC3246@tuxdriver.com>

On Thu, Jun 13, 2013 at 10:30 AM, John W. Linville
<linville@tuxdriver.com> wrote:
>
> On Wed, Jun 12, 2013 at 12:01:23PM -0700, Bing Zhao wrote:
> >
> > > >> "iw reg set XX" or "country_code=XX" in hostapd.conf is a *user* hint.
> > > >>
> > > >> What we need here is a *driver* hint. Furthermore, with a driver
> > > >> regulatory hint, the passive-scan and no-ibss flags are cleared so we
> > > >> can start AP with hostapd on 5G band.
> > > >
> > > > So it's a driver hint which is coming from user space via a module
> > > > parameter. IMHO you are abusing interfaces here. Is there any better way
> > > > to solve your problem?
> > >
> > > It would be nice to have some way to do this for ath9k and other NICs
> > > as well.  Best I could come up with is a similar hack for ath9k.
> > >
> > > I think part of the problem is that this config info needs to be
> > > available very early in the module loading/init logic, so it's
> > > too late to be configured using 'iw' or similar.
> >
> > Exactly. regulatory_hint () needs to be called right after wiphy registration.
>
> It does seem a bit ugly.  But if Marvell wants it, I don't see any
> "regulatory" argument to disallow something like this.
>
> Does anyone have a better suggestion for a user interface for such
> a feature?


The only (slightly) cleaner thing I could think of is a module
parameter to cfg80211 so all drivers in the system would be made aware
of the boot-time regulatory domain.

>
>
> John
> --
> 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: [PATCH] mwifiex: Add module parameter for regdomain
From: John W. Linville @ 2013-06-13 17:30 UTC (permalink / raw)
  To: Bing Zhao
  Cc: Ben Greear, Kalle Valo, linux-wireless@vger.kernel.org,
	Amitkumar Karwar, Avinash Patil, Yogesh Powar, Nishant Sarmukadam,
	Frank Huang, Paul Stewart
In-Reply-To: <477F20668A386D41ADCC57781B1F70430EA268B4A3@SC-VEXCH1.marvell.com>

On Wed, Jun 12, 2013 at 12:01:23PM -0700, Bing Zhao wrote:
> 
> > >> "iw reg set XX" or "country_code=XX" in hostapd.conf is a *user* hint.
> > >>
> > >> What we need here is a *driver* hint. Furthermore, with a driver
> > >> regulatory hint, the passive-scan and no-ibss flags are cleared so we
> > >> can start AP with hostapd on 5G band.
> > >
> > > So it's a driver hint which is coming from user space via a module
> > > parameter. IMHO you are abusing interfaces here. Is there any better way
> > > to solve your problem?
> > 
> > It would be nice to have some way to do this for ath9k and other NICs
> > as well.  Best I could come up with is a similar hack for ath9k.
> > 
> > I think part of the problem is that this config info needs to be
> > available very early in the module loading/init logic, so it's
> > too late to be configured using 'iw' or similar.
> 
> Exactly. regulatory_hint () needs to be called right after wiphy registration.

It does seem a bit ugly.  But if Marvell wants it, I don't see any
"regulatory" argument to disallow something like this.

Does anyone have a better suggestion for a user interface for such
a feature?

John
-- 
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-06-13
From: John W. Linville @ 2013-06-13 17:17 UTC (permalink / raw)
  To: Gustavo Padovan, linux-wireless, linux-bluetooth, linux-kernel
In-Reply-To: <20130613112228.GB17870@joana>

On Thu, Jun 13, 2013 at 12:22:28PM +0100, Gustavo Padovan wrote:
> Hi John,
> 
> A few important fixes to 3.10. The first one is a crash fix and talks by itself.
> Then we have the support for a device id, it should be fine if you want to
> remove this. Next there are two btmrvl fixes, one for a potential race
> condition that could make its main thread never stop and the other to fix the
> return code when a memory allocation fails. It was returning 0 instead of
> -ENOMEM. Last is a fix to an issue that affects at least some Thinkpad X60,
> Initialization on those laptops were failing due by unsupported cmd we were
> sending to the device. The patch fixes this by checking if the cmd is
> supported first.
> 
> Please pull or let me know of any concerns you may have.
> 
> 	Gustavo
> 
> ---
> The following changes since commit d90b9e29ec5fe7a08eb7965386ebb47615306584:
> 
>   Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes (2013-06-12 14:28:21 -0400)
> 
> are available in the git repository at:
> 
> 
>   git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth master
> 
> for you to fetch changes up to 0e1aba9361bf292fbdca781d419dca67d6b9911f:
> 
>   Bluetooth: btmrvl: fix thread stopping race (2013-06-13 11:48:38 +0100)
> 
> ----------------------------------------------------------------

I applied these manually to the wireless tree:

> Anderson Lizardo (1):
>       Bluetooth: Fix crash in l2cap_build_cmd() with small MTU
> 
> Daniel Drake (1):
>       Bluetooth: btmrvl: fix thread stopping race
> 
> Johan Hedberg (1):
>       Bluetooth: Fix conditions for HCI_Delete_Stored_Link_Key

These I will manually apply to wireless-next:

> Cho, Yu-Chen (1):
>       Bluetooth: Add support for Mediatek Bluetooth device [0e8d:763f]
> 
> Wei Yongjun (1):
>       Bluetooth: btmrvl: fix error return code in btmrvl_sdio_card_to_host()

The device ID one might be OK, but it can wait for now.  The error
return code patch fixes the return code for a function whose return
code isn't actually checked, so it doesn't seem to need a quick fix.

John
-- 
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

* Question on rcu_access_pointer, rcu_assign_pointer and locking.
From: Ben Greear @ 2013-06-13 17:24 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: linux-wireless@vger.kernel.org

Hello!

I'm trying to better understand some code in net/mac80211/scan.c in order
to track down some memory leaks reported by kmemleak.

My question boils down to this.  Assume we have code similar to this:

spin_lock_bh(&dev->bss_lock);
old = rcu_access_pointer(found->pub.beacon_ies);
rcu_assign_pointer(found->pub.beacon_ies, tmp->pub.beacon_ies);
if (old)
	kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
spin_unlock_bh(&dev->bss_lock);

Would it be possible to somehow leak what is assigned to found->pub.beacon_ies,
perhaps because two threads managed to go through this
code within a single RCU period?

I think that if the rcu_assign_pointer logic wasn't 'published'
before a second thread came through this logic it could cause
this leakage?

The actual code I'm curious about is in net/mac80211/scan.c, in
the cfg80211_bss_update method.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply

* [PATCH v2] ath9k: Add custom parameters for CUS198
From: Sujith Manoharan @ 2013-06-13 17:21 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, jkp, gfmichaud

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

CUS198 is a card based on AR9485. There are differences
between the base reference design HB125 and CUS198.
Identify such cards based on the PCI subsystem IDs and
set HW parameters appropriately.

Addresses this bug - https://bugzilla.kernel.org/show_bug.cgi?id=49201

Cc: jkp@iki.fi
Cc: gfmichaud@gmail.com
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 18 +++++++++++++---
 drivers/net/wireless/ath/ath9k/ath9k.h         |  3 +++
 drivers/net/wireless/ath/ath9k/hw.h            |  4 ++++
 drivers/net/wireless/ath/ath9k/init.c          | 21 +++++++++++++++++++
 drivers/net/wireless/ath/ath9k/pci.c           | 29 ++++++++++++++++++++++++++
 5 files changed, 72 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 25b8bbb..9a00bc0 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3563,16 +3563,22 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)
 {
 	struct ath9k_hw_capabilities *pCap = &ah->caps;
 	int chain;
-	u32 regval, value;
+	u32 regval, value, gpio;
 	static const u32 switch_chain_reg[AR9300_MAX_CHAINS] = {
 			AR_PHY_SWITCH_CHAIN_0,
 			AR_PHY_SWITCH_CHAIN_1,
 			AR_PHY_SWITCH_CHAIN_2,
 	};
 
-	if (AR_SREV_9485(ah) && (ar9003_hw_get_rx_gain_idx(ah) == 0))
+	if (AR_SREV_9485(ah) && (ar9003_hw_get_rx_gain_idx(ah) == 0)) {
+		if (ah->config.xlna_gpio)
+			gpio = ah->config.xlna_gpio;
+		else
+			gpio = AR9300_EXT_LNA_CTL_GPIO_AR9485;
+
 		ath9k_hw_cfg_output(ah, AR9300_EXT_LNA_CTL_GPIO_AR9485,
 				    AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED);
+	}
 
 	value = ar9003_hw_ant_ctrl_common_get(ah, is2ghz);
 
@@ -3800,7 +3806,13 @@ static void ar9003_hw_atten_apply(struct ath_hw *ah, struct ath9k_channel *chan)
 			REG_RMW_FIELD(ah, ext_atten_reg[i],
 				      AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, value);
 
-			value = ar9003_hw_atten_chain_get_margin(ah, i, chan);
+			if (AR_SREV_9485(ah) &&
+			    (ar9003_hw_get_rx_gain_idx(ah) == 0) &&
+			    ah->config.xatten_margin_cfg)
+				value = 5;
+			else
+				value = ar9003_hw_atten_chain_get_margin(ah, i, chan);
+
 			REG_RMW_FIELD(ah, ext_atten_reg[i],
 				      AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN,
 				      value);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index a6e666b..74965ee 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -631,6 +631,8 @@ void ath_ant_comb_update(struct ath_softc *sc);
 /* Main driver core */
 /********************/
 
+#define ATH9K_PCI_CUS198 0x0001
+
 /*
  * Default cache line size, in bytes.
  * Used when PCI device not fully initialized by bootrom/BIOS
@@ -715,6 +717,7 @@ struct ath_softc {
 
 	unsigned int hw_busy_count;
 	unsigned long sc_flags;
+	unsigned long driver_data;
 
 	u32 intrstatus;
 	u16 ps_flags; /* PS_* */
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 7d259b7..ed7d4fc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -307,6 +307,10 @@ struct ath9k_ops_config {
 	u16 spurchans[AR_EEPROM_MODAL_SPURS][2];
 	u8 max_txtrig_level;
 	u16 ani_poll_interval; /* ANI poll interval in ms */
+
+	/* Platform specific config */
+	u32 xlna_gpio;
+	bool xatten_margin_cfg;
 };
 
 enum ath9k_int {
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 818f22d..7c2ed1c 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -513,6 +513,22 @@ static void ath9k_init_misc(struct ath_softc *sc)
 	sc->spec_config.fft_period = 0xF;
 }
 
+static void ath9k_init_platform(struct ath_softc *sc)
+{
+	struct ath_hw *ah = sc->sc_ah;
+	struct ath_common *common = ath9k_hw_common(ah);
+
+	if (common->bus_ops->ath_bus_type != ATH_PCI)
+		return;
+
+	if (sc->driver_data & ATH9K_PCI_CUS198) {
+		ah->config.xlna_gpio = 9;
+		ah->config.xatten_margin_cfg = true;
+
+		ath_info(common, "Set parameters for CUS198\n");
+	}
+}
+
 static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob,
 				    void *ctx)
 {
@@ -605,6 +621,11 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
 	common->disable_ani = false;
 
 	/*
+	 * Platform quirks.
+	 */
+	ath9k_init_platform(sc);
+
+	/*
 	 * Enable Antenna diversity only when BTCOEX is disabled
 	 * and the user manually requests the feature.
 	 */
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 0e0d395..4ac00b4 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -34,6 +34,34 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
 	{ PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI   */
 	{ PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */
 	{ PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E  AR9300 */
+
+	/* PCI-E CUS198 */
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2086),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x1237),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2126),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2152),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_FOXCONN,
+			 0xE075),
+	  .driver_data = ATH9K_PCI_CUS198 },
+
 	{ PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E  AR9485 */
 	{ PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E  AR9580 */
 	{ PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E  AR9462 */
@@ -221,6 +249,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	sc->hw = hw;
 	sc->dev = &pdev->dev;
 	sc->mem = pcim_iomap_table(pdev)[0];
+	sc->driver_data = id->driver_data;
 
 	/* Will be cleared in ath9k_start() */
 	set_bit(SC_OP_INVALID, &sc->sc_flags);
-- 
1.8.3.1


^ permalink raw reply related

* [PATCH] ath9k: Add custom parameters for CUS198
From: Sujith Manoharan @ 2013-06-13 17:20 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

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

CUS198 is a card based on AR9485. There are differences
between the base reference design HB125 and CUS198.
Identify such cards based on the PCI subsystem IDs and
set HW parameters appropriately.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 18 +++++++++++++---
 drivers/net/wireless/ath/ath9k/ath9k.h         |  3 +++
 drivers/net/wireless/ath/ath9k/hw.h            |  4 ++++
 drivers/net/wireless/ath/ath9k/init.c          | 21 +++++++++++++++++++
 drivers/net/wireless/ath/ath9k/pci.c           | 29 ++++++++++++++++++++++++++
 5 files changed, 72 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 25b8bbb..9a00bc0 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3563,16 +3563,22 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)
 {
 	struct ath9k_hw_capabilities *pCap = &ah->caps;
 	int chain;
-	u32 regval, value;
+	u32 regval, value, gpio;
 	static const u32 switch_chain_reg[AR9300_MAX_CHAINS] = {
 			AR_PHY_SWITCH_CHAIN_0,
 			AR_PHY_SWITCH_CHAIN_1,
 			AR_PHY_SWITCH_CHAIN_2,
 	};
 
-	if (AR_SREV_9485(ah) && (ar9003_hw_get_rx_gain_idx(ah) == 0))
+	if (AR_SREV_9485(ah) && (ar9003_hw_get_rx_gain_idx(ah) == 0)) {
+		if (ah->config.xlna_gpio)
+			gpio = ah->config.xlna_gpio;
+		else
+			gpio = AR9300_EXT_LNA_CTL_GPIO_AR9485;
+
 		ath9k_hw_cfg_output(ah, AR9300_EXT_LNA_CTL_GPIO_AR9485,
 				    AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED);
+	}
 
 	value = ar9003_hw_ant_ctrl_common_get(ah, is2ghz);
 
@@ -3800,7 +3806,13 @@ static void ar9003_hw_atten_apply(struct ath_hw *ah, struct ath9k_channel *chan)
 			REG_RMW_FIELD(ah, ext_atten_reg[i],
 				      AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, value);
 
-			value = ar9003_hw_atten_chain_get_margin(ah, i, chan);
+			if (AR_SREV_9485(ah) &&
+			    (ar9003_hw_get_rx_gain_idx(ah) == 0) &&
+			    ah->config.xatten_margin_cfg)
+				value = 5;
+			else
+				value = ar9003_hw_atten_chain_get_margin(ah, i, chan);
+
 			REG_RMW_FIELD(ah, ext_atten_reg[i],
 				      AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN,
 				      value);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index a6e666b..74965ee 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -631,6 +631,8 @@ void ath_ant_comb_update(struct ath_softc *sc);
 /* Main driver core */
 /********************/
 
+#define ATH9K_PCI_CUS198 0x0001
+
 /*
  * Default cache line size, in bytes.
  * Used when PCI device not fully initialized by bootrom/BIOS
@@ -715,6 +717,7 @@ struct ath_softc {
 
 	unsigned int hw_busy_count;
 	unsigned long sc_flags;
+	unsigned long driver_data;
 
 	u32 intrstatus;
 	u16 ps_flags; /* PS_* */
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 7d259b7..ed7d4fc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -307,6 +307,10 @@ struct ath9k_ops_config {
 	u16 spurchans[AR_EEPROM_MODAL_SPURS][2];
 	u8 max_txtrig_level;
 	u16 ani_poll_interval; /* ANI poll interval in ms */
+
+	/* Platform specific config */
+	u32 xlna_gpio;
+	bool xatten_margin_cfg;
 };
 
 enum ath9k_int {
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 818f22d..7c2ed1c 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -513,6 +513,22 @@ static void ath9k_init_misc(struct ath_softc *sc)
 	sc->spec_config.fft_period = 0xF;
 }
 
+static void ath9k_init_platform(struct ath_softc *sc)
+{
+	struct ath_hw *ah = sc->sc_ah;
+	struct ath_common *common = ath9k_hw_common(ah);
+
+	if (common->bus_ops->ath_bus_type != ATH_PCI)
+		return;
+
+	if (sc->driver_data & ATH9K_PCI_CUS198) {
+		ah->config.xlna_gpio = 9;
+		ah->config.xatten_margin_cfg = true;
+
+		ath_info(common, "Set parameters for CUS198\n");
+	}
+}
+
 static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob,
 				    void *ctx)
 {
@@ -605,6 +621,11 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
 	common->disable_ani = false;
 
 	/*
+	 * Platform quirks.
+	 */
+	ath9k_init_platform(sc);
+
+	/*
 	 * Enable Antenna diversity only when BTCOEX is disabled
 	 * and the user manually requests the feature.
 	 */
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 0e0d395..4ac00b4 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -34,6 +34,34 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
 	{ PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI   */
 	{ PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */
 	{ PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E  AR9300 */
+
+	/* PCI-E CUS198 */
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2086),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x1237),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2126),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2152),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_FOXCONN,
+			 0xE075),
+	  .driver_data = ATH9K_PCI_CUS198 },
+
 	{ PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E  AR9485 */
 	{ PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E  AR9580 */
 	{ PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E  AR9462 */
@@ -221,6 +249,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	sc->hw = hw;
 	sc->dev = &pdev->dev;
 	sc->mem = pcim_iomap_table(pdev)[0];
+	sc->driver_data = id->driver_data;
 
 	/* Will be cleared in ath9k_start() */
 	set_bit(SC_OP_INVALID, &sc->sc_flags);
-- 
1.8.3.1


^ permalink raw reply related

* Re: [PATCH 3/3] skbuff: Added new helper function skb_cow_clone_head.
From: Ben Hutchings @ 2013-06-13 16:53 UTC (permalink / raw)
  To: Dave Wiltshire
  Cc: davem, netdev, linux-kernel, nsujir, mchan, rmody, jcliburn,
	chris.snook, jeffrey.t.kirsher, bruce.w.allan, alexander.h.duyck,
	cooldavid, linux-driver, linux-wimax, wimax, linux-wireless, viro,
	eparis, edumazet, dev, jhs
In-Reply-To: <1371040811-8319-2-git-send-email-david.wiltshire@gmx.com>

On Wed, 2013-06-12 at 22:40 +1000, Dave Wiltshire wrote:
> In a few different drivers there is a check of (skb_cloned &&
> !skb_clone_writable) before then using pskb_expand_head to copy the skb
> if that is required. There are already some skb_cow_* functions for
> other conditions, so added this one and changed the call sites.
> 
> Signed-off-by: Dave Wiltshire <david.wiltshire@gmx.com>
> ---
>  include/linux/skbuff.h    |   14 ++++++++++++++
>  net/core/dev.c            |    8 ++------
>  net/openvswitch/actions.c |   22 +++++++---------------
>  net/sched/act_csum.c      |    8 ++------
>  net/sched/act_nat.c       |   18 +++++-------------
>  5 files changed, 30 insertions(+), 40 deletions(-)
> 
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index a7393ad..7d18541 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -2154,6 +2154,20 @@ static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom)
>  }
>  
>  /**
> + * skb_cow_clone_head

This is a missing a short description after the name.

Ben.

> + * @skb: buffer to cow
> + * @len: length up to which to write
> + *
> + * This function is identical to skb_cow and sb_cow_head except that we
> + * replace the skb_cloned check by skb_cloned && !skb_clone_writable.
> + *
> + */
> +static inline int skb_cow_clone_head(struct sk_buff *skb, unsigned int len)
> +{
> +	return __skb_cow(skb, 0, skb_cloned(skb) && !skb_clone_writable(skb, len));
> +}
[...]

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply

* Re: [GIT] [3.10] NFC fixes
From: John W. Linville @ 2013-06-13 15:18 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: Linux Wireless, Linux NFC
In-Reply-To: <20130613090209.GA7998@zurbaran>

On Thu, Jun 13, 2013 at 11:02:09AM +0200, Samuel Ortiz wrote:
> Hi John,
> 
> On Wed, Jun 12, 2013 at 02:22:38PM -0400, John W. Linville wrote:
> > Given recent events, I'm not sure that this is really acceptable as
> > a fix request.  The service bit and endianness in particular don't
> > sound like they are addressing big problems, and the other two don't
> > sound like they are really fixing any regressions either.
> > 
> > Can these wait for 3.11?
> I guess so, although they really are fixes.

I don't doubt that they are fixes, but I think that Dave is trying
to clamp down to only 'important' fixes -- data loss, crashes, etc.

> I'll queue them in nfc-next and will send you a pull request.
> Btw, are you going to merge wireless into wireless-next soon ?

I merged the wireless tree into wireless-next yesterday.

John
-- 
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: [PATCH] mac80211: Use RCU protection in ieee80211_get_tx_rates()
From: Calvin Owens @ 2013-06-13 15:27 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Johannes Berg, Luis R. Rodriguez, John W. Linville,
	linux-wireless, linux-kernel, ath9k-devel, netdev, jcalvinowens
In-Reply-To: <51B843C9.9090500@openwrt.org>

On Wednesday 06/12 at 11:47 +0200, Felix Fietkau wrote:
> On 2013-06-12 10:00 AM, Calvin Owens wrote:
> > Copying the rate table should be done in an RCU read-side critical
> > section.
> I think this approach is wrong. The sta entry is also under RCU
> protection (no locking for read access in that part of the code.
> In a normal driver tx path, no extra rcu_read_lock/rcu_read_unlock is
> needed. Only if the driver does some scheduling outside of the tx
> function (which ath9k does), this RCU warning appears.
> 
> How about this change instead:
> ---
> --- a/drivers/net/wireless/ath/ath9k/xmit.c
> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
> @@ -1570,6 +1570,8 @@ void ath_txq_schedule(struct ath_softc *
>  	    txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
>  		return;
>  
> +	rcu_read_lock();
> +
>  	ac = list_first_entry(&txq->axq_acq, struct ath_atx_ac, list);
>  	last_ac = list_entry(txq->axq_acq.prev, struct ath_atx_ac, list);
>  
> @@ -1608,8 +1610,10 @@ void ath_txq_schedule(struct ath_softc *
>  
>  		if (ac == last_ac ||
>  		    txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
> -			return;
> +			break;
>  	}
> +
> +	rcu_read_unlock();
>  }
>  
>  /***********/
>

Yep, that stops the RCU warning for me.

Tested-by: Calvin Owens <jcalvinowens@gmail.com>

^ permalink raw reply

* Re: [PATCH v2 1/2] mac80211: move tx_control_flag into flags2 within ieee80211_tx_info
From: Thomas Hühn @ 2013-06-13 12:44 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville, linux-wireless, nbd
In-Reply-To: <1371117219.8335.9.camel@jlt4.sipsolutions.net>

Hi Johannes,
> 
> I'm sure some drivers use it in their status path. Have you audited them
> all?
> 
> No, you clearly haven't. carl9170 is *obviously* broken by this change,
> others may not so obvious.

You are right, carl9170 could access this flag from any context so tx_info->control.flags2 can be invalid.
Sorry for that mistake.

> 
>> 		} else if ((txinfo->flags & IEEE80211_TX_STAT_ACK) &&
>> -			   !(txinfo->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
>> +			   !(txinfo->control.flags2 & IEEE80211_TX_CTL2_REQ_TX_STATUS)) {
> 
> I bet you did some sort of automatic replace, but these lines look far
> too long.
> 
> Also, if you're doing hugely invasive patches like this then I think you
> should move more flags and be done with it.

Ok. I will go through all possible flags to check wether I can move them to flags2 and send a v3.

> 
>> @@ -1561,7 +1561,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
>> 			 u16 transaction, u16 auth_alg, u16 status,
>> 			 const u8 *extra, size_t extra_len, const u8 *bssid,
>> 			 const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
>> -			 u32 tx_flags);
>> +			 u32 tx_flags, u16 tx_flags2);
> 
> This function already has far too many arguments, I'm not taking a patch
> adding yet another one.

This should be obsolete as the flag in question would break carl9170 and I will skip that one.


Greetings Thomas


^ permalink raw reply

* pull request: bluetooth 2013-06-13
From: Gustavo Padovan @ 2013-06-13 11:22 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, linux-bluetooth, linux-kernel

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

Hi John,

A few important fixes to 3.10. The first one is a crash fix and talks by itself.
Then we have the support for a device id, it should be fine if you want to
remove this. Next there are two btmrvl fixes, one for a potential race
condition that could make its main thread never stop and the other to fix the
return code when a memory allocation fails. It was returning 0 instead of
-ENOMEM. Last is a fix to an issue that affects at least some Thinkpad X60,
Initialization on those laptops were failing due by unsupported cmd we were
sending to the device. The patch fixes this by checking if the cmd is
supported first.

Please pull or let me know of any concerns you may have.

	Gustavo

---
The following changes since commit d90b9e29ec5fe7a08eb7965386ebb47615306584:

  Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes (2013-06-12 14:28:21 -0400)

are available in the git repository at:


  git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth master

for you to fetch changes up to 0e1aba9361bf292fbdca781d419dca67d6b9911f:

  Bluetooth: btmrvl: fix thread stopping race (2013-06-13 11:48:38 +0100)

----------------------------------------------------------------
Anderson Lizardo (1):
      Bluetooth: Fix crash in l2cap_build_cmd() with small MTU

Cho, Yu-Chen (1):
      Bluetooth: Add support for Mediatek Bluetooth device [0e8d:763f]

Daniel Drake (1):
      Bluetooth: btmrvl: fix thread stopping race

Johan Hedberg (1):
      Bluetooth: Fix conditions for HCI_Delete_Stored_Link_Key

Wei Yongjun (1):
      Bluetooth: btmrvl: fix error return code in btmrvl_sdio_card_to_host()

 drivers/bluetooth/btmrvl_main.c |  9 ++++-----
 drivers/bluetooth/btmrvl_sdio.c |  1 +
 drivers/bluetooth/btusb.c       |  3 +++
 net/bluetooth/hci_core.c        | 15 ++++++++++-----
 net/bluetooth/l2cap_core.c      |  3 +++
 5 files changed, 21 insertions(+), 10 deletions(-)


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

^ permalink raw reply

* Re: [PATCH v2 1/2] mac80211: move tx_control_flag into flags2 within ieee80211_tx_info
From: Johannes Berg @ 2013-06-13  9:53 UTC (permalink / raw)
  To: Thomas Huehn; +Cc: linville, linux-wireless, nbd
In-Reply-To: <1371112067-19239-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

On Thu, 2013-06-13 at 10:27 +0200, Thomas Huehn wrote:


> Flag IEEE80211_TX_CTL_REQ_TX_STATUS at bit(0) in
> mac80211_tx_control_flags
> is moved to ieee80211_tx_info->control.flags2 as it is only used in
> the
> tx-path. This frees one bit in ieee80211_tx_info->flags.

I'm sure some drivers use it in their status path. Have you audited them
all?

No, you clearly haven't. carl9170 is *obviously* broken by this change,
others may not so obvious.

>  		} else if ((txinfo->flags & IEEE80211_TX_STAT_ACK) &&
> -			   !(txinfo->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
> +			   !(txinfo->control.flags2 & IEEE80211_TX_CTL2_REQ_TX_STATUS)) {

I bet you did some sort of automatic replace, but these lines look far
too long.

Also, if you're doing hugely invasive patches like this then I think you
should move more flags and be done with it.

> @@ -1561,7 +1561,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
>  			 u16 transaction, u16 auth_alg, u16 status,
>  			 const u8 *extra, size_t extra_len, const u8 *bssid,
>  			 const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
> -			 u32 tx_flags);
> +			 u32 tx_flags, u16 tx_flags2);

This function already has far too many arguments, I'm not taking a patch
adding yet another one.

Please repost only when you've actually checked what you're doing.

johannes


^ permalink raw reply

* Re: [GIT] [3.10] NFC fixes
From: Samuel Ortiz @ 2013-06-13  9:02 UTC (permalink / raw)
  To: John W. Linville; +Cc: Linux Wireless, Linux NFC
In-Reply-To: <20130612182238.GG11589@tuxdriver.com>

Hi John,

On Wed, Jun 12, 2013 at 02:22:38PM -0400, John W. Linville wrote:
> Given recent events, I'm not sure that this is really acceptable as
> a fix request.  The service bit and endianness in particular don't
> sound like they are addressing big problems, and the other two don't
> sound like they are really fixing any regressions either.
> 
> Can these wait for 3.11?
I guess so, although they really are fixes.
I'll queue them in nfc-next and will send you a pull request.
Btw, are you going to merge wireless into wireless-next soon ?

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/

^ permalink raw reply

* [PATCH v2 2/2] mac80211: move flag IEEE80211_TX_CTL_ASSIGN_SEQ from flag to flags2
From: Thomas Huehn @ 2013-06-13  8:27 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, nbd, johannes
In-Reply-To: <1371112067-19239-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

Flag IEEE80211_TX_CTL_ASSIGN_SEQ at bit(1) in mac80211_tx_control_flags
is moved to ieee80211_tx_info->control.flags2 as it is only used in the
tx-path. This frees one bit in ieee80211_tx_info->flags.

Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Signed-off-by: Benjamin Vahl <bvahl@net.t-labs.tu-berlin.de>
---
 drivers/net/wireless/ath/ath9k/beacon.c         |    2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c |    2 +-
 drivers/net/wireless/ath/ath9k/xmit.c           |    2 +-
 drivers/net/wireless/ath/carl9170/tx.c          |    2 +-
 drivers/net/wireless/b43/xmit.c                 |    2 +-
 drivers/net/wireless/b43legacy/xmit.c           |    2 +-
 drivers/net/wireless/brcm80211/brcmsmac/main.c  |    2 +-
 drivers/net/wireless/iwlwifi/dvm/tx.c           |    2 +-
 drivers/net/wireless/iwlwifi/mvm/tx.c           |    2 +-
 drivers/net/wireless/mwl8k.c                    |    2 +-
 drivers/net/wireless/p54/txrx.c                 |    2 +-
 drivers/net/wireless/rt2x00/rt2x00queue.c       |    2 +-
 drivers/net/wireless/rtl818x/rtl8180/dev.c      |    2 +-
 drivers/net/wireless/rtl818x/rtl8187/dev.c      |    2 +-
 include/net/mac80211.h                          |   24 +++++++++++------------
 net/mac80211/tx.c                               |    6 +++---
 16 files changed, 29 insertions(+), 29 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index fd1eeba..dbac96d 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -161,7 +161,7 @@ static struct ath_buf *ath9k_beacon_generate(struct ieee80211_hw *hw,
 	mgmt_hdr->u.beacon.timestamp = avp->tsf_adjust;
 
 	info = IEEE80211_SKB_CB(skb);
-	if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
+	if (info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ) {
 		/*
 		 * TODO: make sure the seq# gets assigned properly (vs. other
 		 * TX frames)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index e0c03bd..2471515 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -386,7 +386,7 @@ static void ath9k_htc_send_beacon(struct ath9k_htc_priv *priv,
 	mgmt->u.beacon.timestamp = avp->tsfadjust;
 
 	info = IEEE80211_SKB_CB(beacon);
-	if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
+	if (info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ) {
 		struct ieee80211_hdr *hdr =
 			(struct ieee80211_hdr *) beacon->data;
 		avp->seq_no += 0x10;
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index eab0fcb..8e28d5b 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1929,7 +1929,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	 * to be cleaned up to work better with Beacon transmission and virtual
 	 * BSSes.
 	 */
-	if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
+	if (info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ) {
 		if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
 			sc->tx.seq_no += 0x10;
 		hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 10250a7..ce285fabd 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -925,7 +925,7 @@ static int carl9170_tx_prepare(struct ar9170 *ar,
 	if (unlikely(info->flags & IEEE80211_TX_CTL_SEND_AFTER_DTIM))
 		txc->s.misc |= CARL9170_TX_SUPER_MISC_CAB;
 
-	if (unlikely(info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ))
+	if (unlikely(info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ))
 		txc->s.misc |= CARL9170_TX_SUPER_MISC_ASSIGN_SEQ;
 
 	if (unlikely(ieee80211_is_probe_resp(hdr->frame_control)))
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index 8cb206a..42b43a1 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -404,7 +404,7 @@ int b43_generate_txhdr(struct b43_wldev *dev,
 	if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
 		mac_ctl |= B43_TXH_MAC_ACK;
 	/* use hardware sequence counter as the non-TID counter */
-	if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)
+	if (info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ)
 		mac_ctl |= B43_TXH_MAC_HWSEQ;
 	if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
 		mac_ctl |= B43_TXH_MAC_STMSDU;
diff --git a/drivers/net/wireless/b43legacy/xmit.c b/drivers/net/wireless/b43legacy/xmit.c
index 849a28c..1ac54a3 100644
--- a/drivers/net/wireless/b43legacy/xmit.c
+++ b/drivers/net/wireless/b43legacy/xmit.c
@@ -283,7 +283,7 @@ static int generate_txhdr_fw3(struct b43legacy_wldev *dev,
 	rates = info->control.rates;
 	if (!(info->flags & IEEE80211_TX_CTL_NO_ACK))
 		mac_ctl |= B43legacy_TX4_MAC_ACK;
-	if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)
+	if (info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ)
 		mac_ctl |= B43legacy_TX4_MAC_HWSEQ;
 	if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
 		mac_ctl |= B43legacy_TX4_MAC_STMSDU;
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 28e7aee..496cc89 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -6327,7 +6327,7 @@ brcms_c_d11hdrs_mac80211(struct brcms_c_info *wlc, struct ieee80211_hw *hw,
 	memset(txh, 0, D11_TXH_LEN);
 
 	/* setup frameid */
-	if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
+	if (tx_info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ) {
 		/* non-AP STA should never use BCMC queue */
 		if (queue == TX_BCMC_FIFO) {
 			brcms_err(wlc->hw->d11core,
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
index 353a053..2e5cd0c 100644
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
@@ -101,7 +101,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
 		tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
 	} else {
 		tx_cmd->tid_tspec = IWL_TID_NON_QOS;
-		if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)
+		if (info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ)
 			tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
 		else
 			tx_flags &= ~TX_CMD_FLG_SEQ_CTL_MSK;
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index f212f16..d129997 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -107,7 +107,7 @@ static void iwl_mvm_set_tx_cmd(struct iwl_mvm *mvm, struct sk_buff *skb,
 		tx_flags &= ~TX_CMD_FLG_SEQ_CTL;
 	} else {
 		tx_cmd->tid_tspec = IWL_TID_NON_QOS;
-		if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ)
+		if (info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ)
 			tx_flags |= TX_CMD_FLG_SEQ_CTL;
 		else
 			tx_flags &= ~TX_CMD_FLG_SEQ_CTL;
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index a3707fd..3aa9fbd 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1921,7 +1921,7 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw,
 	tx_info = IEEE80211_SKB_CB(skb);
 	mwl8k_vif = MWL8K_VIF(tx_info->control.vif);
 
-	if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
+	if (tx_info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ) {
 		wh->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
 		wh->seq_ctrl |= cpu_to_le16(mwl8k_vif->seqno);
 		mwl8k_vif->seqno += 0x10;
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index f95de0d..a9d333c 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -692,7 +692,7 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
 	else
 		*burst_possible = false;
 
-	if (!(info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ))
+	if (!(info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ))
 		*flags |= P54_HDR_FLAG_DATA_OUT_SEQNR;
 
 	if (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 2c12311..10ce254 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -221,7 +221,7 @@ static void rt2x00queue_create_tx_descriptor_seq(struct rt2x00_dev *rt2x00dev,
 	struct rt2x00_intf *intf = vif_to_intf(tx_info->control.vif);
 	u16 seqno;
 
-	if (!(tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ))
+	if (!(tx_info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ))
 		return;
 
 	__set_bit(ENTRY_TXD_GENERATE_SEQ, &txdesc->flags);
diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 91a04e2..ee0e35f 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -302,7 +302,7 @@ static void rtl8180_tx(struct ieee80211_hw *dev,
 
 	spin_lock_irqsave(&priv->lock, flags);
 
-	if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
+	if (info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ) {
 		if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
 			priv->seqno += 0x10;
 		hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index f49220e..e698d9c 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -264,7 +264,7 @@ static void rtl8187_tx(struct ieee80211_hw *dev,
 		flags |= ieee80211_get_rts_cts_rate(dev, info)->hw_value << 19;
 	}
 
-	if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
+	if (info->control.flags2 & IEEE80211_TX_CTL2_ASSIGN_SEQ) {
 		if (info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT)
 			priv->seqno += 0x10;
 		tx_hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 447c95a..080b364 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -374,17 +374,6 @@ struct ieee80211_bss_conf {
  *
  * These flags are used with the @flags member of &ieee80211_tx_info.
  *
- * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence
- *	number to this frame, taking care of not overwriting the fragment
- *	number and increasing the sequence number only when the
- *	IEEE80211_TX_CTL_FIRST_FRAGMENT flag is set. mac80211 will properly
- *	assign sequence numbers to QoS-data frames but cannot do so correctly
- *	for non-QoS-data and management frames because beacons need them from
- *	that counter as well and mac80211 cannot guarantee proper sequencing.
- *	If this flag is set, the driver should instruct the hardware to
- *	assign a sequence number to the frame or assign one itself. Cf. IEEE
- *	802.11-2007 7.1.3.4.1 paragraph 3. This flag will always be set for
- *	beacons and always be clear for frames without a sequence number field.
  * @IEEE80211_TX_CTL_NO_ACK: tell the low level not to wait for an ack
  * @IEEE80211_TX_CTL_CLEAR_PS_FILT: clear powersave filter for destination
  *	station
@@ -466,7 +455,6 @@ struct ieee80211_bss_conf {
  *	 forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
  */
 enum mac80211_tx_control_flags {
-	IEEE80211_TX_CTL_ASSIGN_SEQ		= BIT(1),
 	IEEE80211_TX_CTL_NO_ACK			= BIT(2),
 	IEEE80211_TX_CTL_CLEAR_PS_FILT		= BIT(3),
 	IEEE80211_TX_CTL_FIRST_FRAGMENT		= BIT(4),
@@ -505,9 +493,21 @@ enum mac80211_tx_control_flags {
  * and are only available within the tx path where tx_info->control is valid.
  *
  * @IEEE80211_TX_CTL2_REQ_TX_STATUS: require TX status callback for this frame.
+ * @IEEE80211_TX_CTL2_ASSIGN_SEQ: The driver has to assign a sequence
+ *  number to this frame, taking care of not overwriting the fragment
+ *  number and increasing the sequence number only when the
+ *  IEEE80211_TX_CTL_FIRST_FRAGMENT flag is set. mac80211 will properly
+ *  assign sequence numbers to QoS-data frames but cannot do so correctly
+ *  for non-QoS-data and management frames because beacons need them from
+ *  that counter as well and mac80211 cannot guarantee proper sequencing.
+ *  If this flag is set, the driver should instruct the hardware to
+ *  assign a sequence number to the frame or assign one itself. Cf. IEEE
+ *  802.11-2007 7.1.3.4.1 paragraph 3. This flag will always be set for
+ *  beacons and always be clear for frames without a sequence number field.
  */
 enum mac80211_tx_control_flags2 {
 	IEEE80211_TX_CTL2_REQ_TX_STATUS		= BIT(0),
+	IEEE80211_TX_CTL2_ASSIGN_SEQ		= BIT(1),
 };
 
 
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 63e96ba..e9b2d47 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -768,7 +768,7 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx)
 	 */
 	if (!ieee80211_is_data_qos(hdr->frame_control)) {
 		/* driver should assign sequence number */
-		info->flags |= IEEE80211_TX_CTL_ASSIGN_SEQ;
+		info->control.flags2 |= IEEE80211_TX_CTL2_ASSIGN_SEQ;
 		/* for pure STA mode without beacons, we can do it */
 		hdr->seq_ctrl = cpu_to_le16(tx->sdata->sequence_number);
 		tx->sdata->sequence_number += 0x10;
@@ -777,7 +777,7 @@ ieee80211_tx_h_sequence(struct ieee80211_tx_data *tx)
 
 	/*
 	 * This should be true for injected/management frames only, for
-	 * management frames we have set the IEEE80211_TX_CTL_ASSIGN_SEQ
+	 * management frames we have set the IEEE80211_TX_CTL2_ASSIGN_SEQ
 	 * above since they are not QoS-data frames.
 	 */
 	if (!tx->sta)
@@ -2447,8 +2447,8 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
 	info->control.vif = vif;
 
 	info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT |
-			IEEE80211_TX_CTL_ASSIGN_SEQ |
 			IEEE80211_TX_CTL_FIRST_FRAGMENT;
+	info->control.flags2 |= IEEE80211_TX_CTL2_ASSIGN_SEQ;
  out:
 	rcu_read_unlock();
 	return skb;
-- 
1.7.9.5


^ permalink raw reply related

* [PATCH v2 1/2] mac80211: move tx_control_flag into flags2 within ieee80211_tx_info
From: Thomas Huehn @ 2013-06-13  8:27 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, nbd, johannes

All usable  bits in enum mac80211_tx_control_flags are depleted. In
order to allow aditional control flag assigments, we introduce a
new u16 variable ieee8011_tx_info->control.flags2 with its
corresponding enum mac80211_tx_control_flags2.
Flag IEEE80211_TX_CTL_REQ_TX_STATUS at bit(0) in mac80211_tx_control_flags
is moved to ieee80211_tx_info->control.flags2 as it is only used in the
tx-path. This frees one bit in ieee80211_tx_info->flags.

Signed-off-by: Benjamin Vahl <bvahl@net.t-labs.tu-berlin.de>
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
---
 drivers/net/wireless/ath/carl9170/tx.c |    2 +-
 drivers/net/wireless/mac80211_hwsim.c  |    2 +-
 drivers/net/wireless/ti/wl1251/tx.c    |    4 ++--
 include/net/mac80211.h                 |   22 ++++++++++++++++++----
 net/mac80211/agg-tx.c                  |    4 ++--
 net/mac80211/cfg.c                     |   13 ++++++++-----
 net/mac80211/ht.c                      |    2 +-
 net/mac80211/ibss.c                    |    4 ++--
 net/mac80211/ieee80211_i.h             |    2 +-
 net/mac80211/mesh_ps.c                 |    6 +++---
 net/mac80211/mlme.c                    |   30 ++++++++++++++++++------------
 net/mac80211/sta_info.c                |    8 ++++----
 net/mac80211/status.c                  |    2 +-
 net/mac80211/tx.c                      |    8 +++++---
 net/mac80211/util.c                    |    3 ++-
 15 files changed, 69 insertions(+), 43 deletions(-)

diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index d21c81d..10250a7 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -298,7 +298,7 @@ static void carl9170_tx_release(struct kref *ref)
 			txinfo->status.ampdu_len = super->s.rix;
 			txinfo->status.ampdu_ack_len = super->s.cnt;
 		} else if ((txinfo->flags & IEEE80211_TX_STAT_ACK) &&
-			   !(txinfo->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
+			   !(txinfo->control.flags2 & IEEE80211_TX_CTL2_REQ_TX_STATUS)) {
 			/*
 			 * drop redundant tx_status reports:
 			 *
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index cb34c78..8c03f3b 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -642,7 +642,7 @@ static void mac80211_hwsim_tx_frame_nl(struct ieee80211_hw *hw,
 	/* We get the flags for this transmission, and we translate them to
 	   wmediumd flags  */
 
-	if (info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)
+	if (info->control.flags2 & IEEE80211_TX_CTL2_REQ_TX_STATUS)
 		hwsim_flags |= HWSIM_TX_CTL_REQ_TX_STATUS;
 
 	if (info->flags & IEEE80211_TX_CTL_NO_ACK)
diff --git a/drivers/net/wireless/ti/wl1251/tx.c b/drivers/net/wireless/ti/wl1251/tx.c
index 28121c5..78a3fff 100644
--- a/drivers/net/wireless/ti/wl1251/tx.c
+++ b/drivers/net/wireless/ti/wl1251/tx.c
@@ -540,7 +540,7 @@ void wl1251_tx_flush(struct wl1251 *wl)
 
 		wl1251_debug(DEBUG_TX, "flushing skb 0x%p", skb);
 
-		if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS))
+		if (!(info->control.flags2 & IEEE80211_TX_CTL2_REQ_TX_STATUS))
 				continue;
 
 		ieee80211_tx_status(wl->hw, skb);
@@ -551,7 +551,7 @@ void wl1251_tx_flush(struct wl1251 *wl)
 			skb = wl->tx_frames[i];
 			info = IEEE80211_SKB_CB(skb);
 
-			if (!(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS))
+			if (!(info->control.flags2 & IEEE80211_TX_CTL2_REQ_TX_STATUS))
 				continue;
 
 			ieee80211_tx_status(wl->hw, skb);
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index a405a7a..447c95a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -374,7 +374,6 @@ struct ieee80211_bss_conf {
  *
  * These flags are used with the @flags member of &ieee80211_tx_info.
  *
- * @IEEE80211_TX_CTL_REQ_TX_STATUS: require TX status callback for this frame.
  * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence
  *	number to this frame, taking care of not overwriting the fragment
  *	number and increasing the sequence number only when the
@@ -467,7 +466,6 @@ struct ieee80211_bss_conf {
  *	 forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
  */
 enum mac80211_tx_control_flags {
-	IEEE80211_TX_CTL_REQ_TX_STATUS		= BIT(0),
 	IEEE80211_TX_CTL_ASSIGN_SEQ		= BIT(1),
 	IEEE80211_TX_CTL_NO_ACK			= BIT(2),
 	IEEE80211_TX_CTL_CLEAR_PS_FILT		= BIT(3),
@@ -500,6 +498,20 @@ enum mac80211_tx_control_flags {
 	IEEE80211_TX_CTL_PS_RESPONSE		= BIT(31),
 };
 
+/**
+ * enum mac80211_tx_control_flags2 - control related flags to describe transmission information/status
+ *
+ * These flags are used with the @flags2 member of &ieee80211_tx_info inside control
+ * and are only available within the tx path where tx_info->control is valid.
+ *
+ * @IEEE80211_TX_CTL2_REQ_TX_STATUS: require TX status callback for this frame.
+ */
+enum mac80211_tx_control_flags2 {
+	IEEE80211_TX_CTL2_REQ_TX_STATUS		= BIT(0),
+};
+
+
+
 #define IEEE80211_TX_CTL_STBC_SHIFT		23
 
 /*
@@ -675,7 +687,9 @@ struct ieee80211_tx_info {
 			/* NB: vif can be NULL for injected frames */
 			struct ieee80211_vif *vif;
 			struct ieee80211_key_conf *hw_key;
-			/* 8 bytes free */
+
+			u16 flags2;
+			/* 6 bytes free */
 		} control;
 		struct {
 			struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
@@ -1973,7 +1987,7 @@ void ieee80211_free_txskb(struct ieee80211_hw *hw, struct sk_buff *skb);
  * on each frame. The last frame in the service period (or the only
  * response to a PS-Poll) also has %IEEE80211_TX_STATUS_EOSP set to
  * indicate that it ends the service period; as this frame must have
- * TX status report it also sets %IEEE80211_TX_CTL_REQ_TX_STATUS.
+ * TX status report it also sets %IEEE80211_TX_CTL2_REQ_TX_STATUS.
  * When TX status is reported for this frame, the service period is
  * marked has having ended and a new one can be started by the peer.
  *
diff --git a/net/mac80211/agg-tx.c b/net/mac80211/agg-tx.c
index 13b7683..5b27f64 100644
--- a/net/mac80211/agg-tx.c
+++ b/net/mac80211/agg-tx.c
@@ -135,8 +135,8 @@ void ieee80211_send_bar(struct ieee80211_vif *vif, u8 *ra, u16 tid, u16 ssn)
 	bar->control = cpu_to_le16(bar_control);
 	bar->start_seq_num = cpu_to_le16(ssn);
 
-	IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
-					IEEE80211_TX_CTL_REQ_TX_STATUS;
+	IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
+	IEEE80211_SKB_CB(skb)->control.flags2 |= IEEE80211_TX_CTL2_REQ_TX_STATUS;
 	ieee80211_tx_skb_tid(sdata, skb, tid);
 }
 EXPORT_SYMBOL(ieee80211_send_bar);
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 64cf294..d15a6cb 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2790,13 +2790,15 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
 	const struct ieee80211_mgmt *mgmt = (void *)buf;
 	bool need_offchan = false;
 	u32 flags;
+	u16 flags2;
 	int ret;
 
 	if (dont_wait_for_ack)
 		flags = IEEE80211_TX_CTL_NO_ACK;
-	else
-		flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX |
-			IEEE80211_TX_CTL_REQ_TX_STATUS;
+	else {
+		flags = IEEE80211_TX_INTFL_NL80211_FRAME_TX;
+		flags2 = IEEE80211_TX_CTL2_REQ_TX_STATUS;
+	}
 
 	if (no_cck)
 		flags |= IEEE80211_TX_CTL_NO_CCK_RATE;
@@ -2883,6 +2885,7 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
 	memcpy(skb_put(skb, len), buf, len);
 
 	IEEE80211_SKB_CB(skb)->flags = flags;
+	IEEE80211_SKB_CB(skb)->control.flags2 = flags2;
 
 	skb->dev = sdata->dev;
 
@@ -3375,8 +3378,8 @@ static int ieee80211_probe_client(struct wiphy *wiphy, struct net_device *dev,
 
 	info = IEEE80211_SKB_CB(skb);
 
-	info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS |
-		       IEEE80211_TX_INTFL_NL80211_FRAME_TX;
+	info->flags |= IEEE80211_TX_INTFL_NL80211_FRAME_TX;
+	info->control.flags2 |= IEEE80211_TX_CTL2_REQ_TX_STATUS;
 
 	skb_set_queue_mapping(skb, IEEE80211_AC_VO);
 	skb->priority = 7;
diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c
index 75dff33..192aa0a 100644
--- a/net/mac80211/ht.c
+++ b/net/mac80211/ht.c
@@ -417,7 +417,7 @@ int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata,
 	}
 
 	/* we'll do more on status of this frame */
-	IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
+	IEEE80211_SKB_CB(skb)->control.flags2 |= IEEE80211_TX_CTL2_REQ_TX_STATUS;
 	ieee80211_tx_skb(sdata, skb);
 
 	return 0;
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index caa4b4f..eada676 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -326,7 +326,7 @@ static struct sta_info *ieee80211_ibss_finish_sta(struct sta_info *sta,
 			 "TX Auth SA=%pM DA=%pM BSSID=%pM (auth_transaction=1)\n",
 			 sdata->vif.addr, addr, sdata->u.ibss.bssid);
 		ieee80211_send_auth(sdata, 1, WLAN_AUTH_OPEN, 0, NULL, 0,
-				    addr, sdata->u.ibss.bssid, NULL, 0, 0, 0);
+				    addr, sdata->u.ibss.bssid, NULL, 0, 0, 0, 0);
 	}
 	return sta;
 }
@@ -448,7 +448,7 @@ static void ieee80211_rx_mgmt_auth_ibss(struct ieee80211_sub_if_data *sdata,
 	 * has actually implemented this.
 	 */
 	ieee80211_send_auth(sdata, 2, WLAN_AUTH_OPEN, 0, NULL, 0,
-			    mgmt->sa, sdata->u.ibss.bssid, NULL, 0, 0, 0);
+			    mgmt->sa, sdata->u.ibss.bssid, NULL, 0, 0, 0, 0);
 }
 
 static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 7a6f1a0..f999bfe 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1561,7 +1561,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
 			 u16 transaction, u16 auth_alg, u16 status,
 			 const u8 *extra, size_t extra_len, const u8 *bssid,
 			 const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
-			 u32 tx_flags);
+			 u32 tx_flags, u16 tx_flags2);
 void ieee80211_send_deauth_disassoc(struct ieee80211_sub_if_data *sdata,
 				    const u8 *bssid, u16 stype, u16 reason,
 				    bool send_frame, u8 *frame_buf);
diff --git a/net/mac80211/mesh_ps.c b/net/mac80211/mesh_ps.c
index 3b7bfc0..f2b658f 100644
--- a/net/mac80211/mesh_ps.c
+++ b/net/mac80211/mesh_ps.c
@@ -384,8 +384,8 @@ static void mpsp_trigger_send(struct sta_info *sta, bool rspi, bool eosp)
 
 	info = IEEE80211_SKB_CB(skb);
 
-	info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER |
-		       IEEE80211_TX_CTL_REQ_TX_STATUS;
+	info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER;
+	info->control.flags2 |= IEEE80211_TX_CTL2_REQ_TX_STATUS;
 
 	mps_dbg(sdata, "sending MPSP trigger%s%s to %pM\n",
 		rspi ? " RSPI" : "", eosp ? " EOSP" : "", sta->sta.addr);
@@ -508,7 +508,7 @@ static void mps_frame_deliver(struct sta_info *sta, int n_frames)
 
 			/* MPSP trigger frame ends service period */
 			*qoshdr |= IEEE80211_QOS_CTL_EOSP;
-			info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
+			info->control.flags2 |= IEEE80211_TX_CTL2_REQ_TX_STATUS;
 		}
 	}
 
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index ad9bb9e..0ab0226 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -839,9 +839,10 @@ static void ieee80211_send_assoc(struct ieee80211_sub_if_data *sdata)
 	drv_mgd_prepare_tx(local, sdata);
 
 	IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT;
-	if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
-		IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS |
-						IEEE80211_TX_INTFL_MLME_CONN_TX;
+	if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) {
+		IEEE80211_SKB_CB(skb)->control.flags2 |= IEEE80211_TX_CTL2_REQ_TX_STATUS;
+		IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_MLME_CONN_TX;
+	}
 	ieee80211_tx_skb(sdata, skb);
 }
 
@@ -882,7 +883,8 @@ void ieee80211_send_nullfunc(struct ieee80211_local *local,
 					IEEE80211_TX_INTFL_OFFCHAN_TX_OK;
 
 	if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
-		IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
+		IEEE80211_SKB_CB(skb)->control.flags2 |=
+			IEEE80211_TX_CTL2_REQ_TX_STATUS;
 
 	if (ifmgd->flags & (IEEE80211_STA_BEACON_POLL |
 			    IEEE80211_STA_CONNECTION_POLL))
@@ -2249,6 +2251,7 @@ static void ieee80211_auth_challenge(struct ieee80211_sub_if_data *sdata,
 	u8 *pos;
 	struct ieee802_11_elems elems;
 	u32 tx_flags = 0;
+	u16 tx_flags2 = 0;
 
 	pos = mgmt->u.auth.variable;
 	ieee802_11_parse_elems(pos, len - (pos - (u8 *) mgmt), false, &elems);
@@ -2256,14 +2259,15 @@ static void ieee80211_auth_challenge(struct ieee80211_sub_if_data *sdata,
 		return;
 	auth_data->expected_transaction = 4;
 	drv_mgd_prepare_tx(sdata->local, sdata);
-	if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
-		tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
-			   IEEE80211_TX_INTFL_MLME_CONN_TX;
+	if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) {
+		tx_flags2 = IEEE80211_TX_CTL2_REQ_TX_STATUS;
+		tx_flags = IEEE80211_TX_INTFL_MLME_CONN_TX;
+	}
 	ieee80211_send_auth(sdata, 3, auth_data->algorithm, 0,
 			    elems.challenge - 2, elems.challenge_len + 2,
 			    auth_data->bss->bssid, auth_data->bss->bssid,
 			    auth_data->key, auth_data->key_len,
-			    auth_data->key_idx, tx_flags);
+			    auth_data->key_idx, tx_flags, tx_flags2);
 }
 
 static void ieee80211_rx_mgmt_auth(struct ieee80211_sub_if_data *sdata,
@@ -3237,6 +3241,7 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata)
 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
 	struct ieee80211_mgd_auth_data *auth_data = ifmgd->auth_data;
 	u32 tx_flags = 0;
+	u16 tx_flags2 = 0;
 
 	sdata_assert_lock(sdata);
 
@@ -3276,15 +3281,16 @@ static int ieee80211_probe_auth(struct ieee80211_sub_if_data *sdata)
 			auth_data->expected_transaction = trans;
 		}
 
-		if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)
-			tx_flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
-				   IEEE80211_TX_INTFL_MLME_CONN_TX;
+		if (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS){
+			tx_flags = IEEE80211_TX_INTFL_MLME_CONN_TX;
+			tx_flags2 = IEEE80211_TX_CTL2_REQ_TX_STATUS;
+		}
 
 		ieee80211_send_auth(sdata, trans, auth_data->algorithm, status,
 				    auth_data->data, auth_data->data_len,
 				    auth_data->bss->bssid,
 				    auth_data->bss->bssid, NULL, 0, 0,
-				    tx_flags);
+				    tx_flags, tx_flags2);
 	} else {
 		const u8 *ssidie;
 
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index b429798..9160b8c 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -1133,8 +1133,8 @@ static void ieee80211_send_null_response(struct ieee80211_sub_if_data *sdata,
 	 */
 	info->flags |= IEEE80211_TX_CTL_NO_PS_BUFFER |
 		       IEEE80211_TX_CTL_PS_RESPONSE |
-		       IEEE80211_TX_STATUS_EOSP |
-		       IEEE80211_TX_CTL_REQ_TX_STATUS;
+		       IEEE80211_TX_STATUS_EOSP;
+	info->control.flags2 |= IEEE80211_TX_CTL2_REQ_TX_STATUS;
 
 	drv_allow_buffered_frames(local, sta, BIT(tid), 1, reason, false);
 
@@ -1294,8 +1294,8 @@ ieee80211_sta_ps_deliver_response(struct sta_info *sta,
 				    qoshdr)
 					*qoshdr |= IEEE80211_QOS_CTL_EOSP;
 
-				info->flags |= IEEE80211_TX_STATUS_EOSP |
-					       IEEE80211_TX_CTL_REQ_TX_STATUS;
+				info->flags |= IEEE80211_TX_STATUS_EOSP;
+				info->control.flags2 |= IEEE80211_TX_CTL2_REQ_TX_STATUS;
 			}
 
 			if (qoshdr)
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 4343920..8298a7c 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -28,7 +28,7 @@ void ieee80211_tx_status_irqsafe(struct ieee80211_hw *hw,
 	int tmp;
 
 	skb->pkt_type = IEEE80211_TX_STATUS_MSG;
-	skb_queue_tail(info->flags & IEEE80211_TX_CTL_REQ_TX_STATUS ?
+	skb_queue_tail(info->control.flags2 & IEEE80211_TX_CTL2_REQ_TX_STATUS ?
 		       &local->skb_queue : &local->skb_queue_unreliable, skb);
 	tmp = skb_queue_len(&local->skb_queue) +
 		skb_queue_len(&local->skb_queue_unreliable);
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4105d0c..63e96ba 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1609,8 +1609,8 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff *skb,
 
 	memset(info, 0, sizeof(*info));
 
-	info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
-		      IEEE80211_TX_CTL_INJECTED;
+	info->flags = IEEE80211_TX_CTL_INJECTED;
+	info->control.flags2 = IEEE80211_TX_CTL2_REQ_TX_STATUS;
 
 	/* process and remove the injection radiotap header */
 	if (!ieee80211_parse_tx_radiotap(skb))
@@ -1723,6 +1723,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 	bool tdls_direct = false;
 	bool multicast;
 	u32 info_flags = 0;
+	u16 info_flags2 = 0;
 	u16 info_id = 0;
 	struct ieee80211_chanctx_conf *chanctx_conf;
 	struct ieee80211_sub_if_data *ap_sdata;
@@ -1988,7 +1989,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 
 			if (id >= 0) {
 				info_id = id;
-				info_flags |= IEEE80211_TX_CTL_REQ_TX_STATUS;
+				info_flags2 |= IEEE80211_TX_CTL2_REQ_TX_STATUS;
 			} else if (skb_shared(skb)) {
 				kfree_skb(orig_skb);
 			} else {
@@ -2113,6 +2114,7 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
 	dev->trans_start = jiffies;
 
 	info->flags = info_flags;
+	info->control.flags2 = info_flags2;
 	info->ack_frame_id = info_id;
 
 	ieee80211_xmit(sdata, skb, band);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 5a6c135..06721b5 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1082,7 +1082,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
 			 u16 transaction, u16 auth_alg, u16 status,
 			 const u8 *extra, size_t extra_len, const u8 *da,
 			 const u8 *bssid, const u8 *key, u8 key_len, u8 key_idx,
-			 u32 tx_flags)
+			 u32 tx_flags, u16 tx_flags2)
 {
 	struct ieee80211_local *local = sdata->local;
 	struct sk_buff *skb;
@@ -1117,6 +1117,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
 
 	IEEE80211_SKB_CB(skb)->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
 					tx_flags;
+	IEEE80211_SKB_CB(skb)->control.flags2 |= tx_flags2;
 	ieee80211_tx_skb(sdata, skb);
 }
 
-- 
1.7.9.5


^ permalink raw reply related

* Re: [PATCH] mac80211: Ensure tid_start_tx is protected by sta->lock.
From: Johannes Berg @ 2013-06-13  8:28 UTC (permalink / raw)
  To: greearb; +Cc: linux-wireless
In-Reply-To: <1371071324-12440-1-git-send-email-greearb@candelatech.com>

On Wed, 2013-06-12 at 14:08 -0700, greearb@candelatech.com wrote:
> From: Ben Greear <greearb@candelatech.com>
> 
> All accesses of the tid_start_tx lock should be protected
> by sta->lock if there is any chance that another thread
> could still be accessing the sta object.

Applied.

johannes


^ permalink raw reply

* Re: [PATCH] brcmfmac: Turn off ARP offloading when configured for AP.
From: Arend van Spriel @ 2013-06-13  8:22 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, linux-wireless, Hante Meuleman, John W. Linville, Greg KH
In-Reply-To: <1371092062.10688.36.camel@deadeye.wl.decadent.org.uk>

On 06/13/2013 04:54 AM, Ben Hutchings wrote:
> On Thu, 2013-06-06 at 10:55 +0200, Arend van Spriel wrote:
>> From: Hante Meuleman <meuleman@broadcom.com>
>>
>> [backport of upstream commit b3657453f16a7b84eab9b93bb9a9a2901ffc70af]
> [...]
>
> You didn't say which version(s) this is for, but it certainly doesn't
> apply to 3.2.
>
> Ben.
>

I actually did the backport because I got notified the upstream commit 
did not apply to 3.9-stable (see [1]).

Gr. AvS

[1] http://mid.gmane.org/13704614501119@kroah.org


^ permalink raw reply

* Re: [PATCH] brcmfmac: Turn off ARP offloading when configured for AP.
From: Arend van Spriel @ 2013-06-13  8:23 UTC (permalink / raw)
  To: Ben Hutchings
  Cc: stable, linux-wireless, Hante Meuleman, John W. Linville, Greg KH
In-Reply-To: <51B98145.7010908@broadcom.com>

On 06/13/2013 10:22 AM, Arend van Spriel wrote:
> On 06/13/2013 04:54 AM, Ben Hutchings wrote:
>> On Thu, 2013-06-06 at 10:55 +0200, Arend van Spriel wrote:
>>> From: Hante Meuleman <meuleman@broadcom.com>
>>>
>>> [backport of upstream commit b3657453f16a7b84eab9b93bb9a9a2901ffc70af]
>> [...]
>>
>> You didn't say which version(s) this is for, but it certainly doesn't
>> apply to 3.2.
>>
>> Ben.
>>
>
> I actually did the backport because I got notified the upstream commit
> did not apply to 3.9-stable (see [1]).

In 3.2 brcmfmac did not support AP mode so that explains the fact that 
is does not apply ;-)

> Gr. AvS
>
> [1] http://mid.gmane.org/13704614501119@kroah.org



^ permalink raw reply

* Re: Regression in 9390ace brcmfmac: free net device when registration fails
From: Arend van Spriel @ 2013-06-13  8:09 UTC (permalink / raw)
  To: Stephen Warren
  Cc: John W. Linville, Hante Meuleman,
	'linux-wireless@vger.kernel.org',
	linux-next@vger.kernel.org
In-Reply-To: <51B8E5FA.9040400@wwwdotorg.org>

On 06/12/2013 11:19 PM, Stephen Warren wrote:
> On 06/06/2013 03:36 PM, Stephen Warren wrote:
>> On 06/06/2013 03:10 PM, Arend van Spriel wrote:
>>> On 06/04/13 14:58, Arend van Spriel wrote:
>>>> On 06/04/2013 12:56 AM, Stephen Warren wrote:
>>>>> (John, note that this commit is part of the pull request you sent to
>>>>> Dave today)
>>>>>
>>>>> Arend,
>>>>>
>>>>> Commit 9390ace "brcmfmac: free net device when registration fails"
>>>>> causes a regression.
>>>>>
>>>>> I had the BCM4330 firmware present in my root fs, whereas my HW is a
>>>>> BCM4329. With this patch applied, I get a kernel panic on boot. With it
>>>>> reverted, I see that no issues of that nature. This is true in
>>>>> next-20130531 (and also 5/30 and 6/1 but not earlier). A bisect of
>>>>> Linus's tree followed by a merge of John's wireless pull request from
>>>>> today pointed at this same commit.
>>>>
>>>> Thanks, Stephen
>>>>
>>>> I will look into this.
>>>
>>> Hi Stephen,
>>>
>>> Can you try the attached patch? If it does not solve the issue, could
>>> you provide a log.
>>
>> Yes, that works great, thanks.
>>
>> Tested-by: Stephen Warren <swarren@nvidia.com>
>
> Did this patch get applied anywhere? I was hoping it'd go into 3.10-rc*
> given it's a user-triggerable backtrace introduced in 3.10-rc*.

Hi Stephen,

The patch went into the wireless-next tree. Given recent events with our 
patch series I am a bit more carsful to tag patches for 3.10. Your issue 
is user-triggerable but the scenario to get there can be avoided. But 
you are right it was introduced in the 3.10-rc cycle. I leave it to John 
to decide.

Regards,
Arend



^ permalink raw reply

* [PATCH] ath9k: Fix ANI trigger threshold
From: Sujith Manoharan @ 2013-06-13  3:22 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

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

Since raising/lowering the limits based on INI has
been changed, the error limit for OFDM has to be 1000,
not 3500.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ani.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath9k/ani.h b/drivers/net/wireless/ath/ath9k/ani.h
index b75aea2..77a06fd 100644
--- a/drivers/net/wireless/ath/ath9k/ani.h
+++ b/drivers/net/wireless/ath/ath9k/ani.h
@@ -20,7 +20,7 @@
 #define BEACON_RSSI(ahp) (ahp->stats.avgbrssi)
 
 /* units are errors per second */
-#define ATH9K_ANI_OFDM_TRIG_HIGH          3500
+#define ATH9K_ANI_OFDM_TRIG_HIGH          1000
 #define ATH9K_ANI_OFDM_TRIG_LOW           400
 #define ATH9K_ANI_CCK_TRIG_HIGH           600
 #define ATH9K_ANI_CCK_TRIG_LOW            300
-- 
1.8.3.1


^ permalink raw reply related

* Re: [PATCH] brcmfmac: Turn off ARP offloading when configured for AP.
From: Ben Hutchings @ 2013-06-13  2:54 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: stable, linux-wireless, Hante Meuleman, John W. Linville
In-Reply-To: <1370508957-12709-1-git-send-email-arend@broadcom.com>

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

On Thu, 2013-06-06 at 10:55 +0200, Arend van Spriel wrote:
> From: Hante Meuleman <meuleman@broadcom.com>
> 
> [backport of upstream commit b3657453f16a7b84eab9b93bb9a9a2901ffc70af]
[...]

You didn't say which version(s) this is for, but it certainly doesn't
apply to 3.2.

Ben.

-- 
Ben Hutchings
friends: People who know you well, but like you anyway.

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

^ permalink raw reply

* brcmfmac sdio device id 0x4319 ?
From: Jason Cooper @ 2013-06-12 22:21 UTC (permalink / raw)
  To: rvossen, arend; +Cc: linux-wireless

All,

I have a Seagate Wireless Plus I am trying to put a vanilla kernel on
(currently v3.10-rc5 for various omap DT bits).

I have the board booting and running a debian rootfs on the HD.  I just
got mmc to come up and I've discovered that the wireless card is vendor
0x02d0, device 0x4319.

My hope, once I got to this point, was that I would be able to use
the mainline, open source driver.  Unfortunately, it looks like brcmfmac
lost support for the 0x4319 while it was in staging.

The commit in question is:

  4dad253 staging: brcm80211: remove code for unsupported chip

Is adding it back in a bridge too far?

thx,

Jason.

^ permalink raw reply

* Re: [PATCH] mac80211: fix TX aggregation TID struct leak
From: Ben Greear @ 2013-06-12 22:13 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Johannes Berg
In-Reply-To: <1371070209-24107-1-git-send-email-johannes@sipsolutions.net>

On 06/12/2013 01:50 PM, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> Ben reports that kmemleak is saying TX aggregation TID
> structs are leaked. Given his workload, I suspect that
> they're leaked because stations are destroyed before
> their aggregation sessions get a chance to start. Fix
> this by simply freeing structs that are not used yet.
>
> Reported-by: Ben Greear <greearb@candelatech.com>
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---
>   net/mac80211/sta_info.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
> index b429798..aaf68d2 100644
> --- a/net/mac80211/sta_info.c
> +++ b/net/mac80211/sta_info.c
> @@ -149,6 +149,7 @@ static void cleanup_single_sta(struct sta_info *sta)
>   	 * directly by station destruction.
>   	 */
>   	for (i = 0; i < IEEE80211_NUM_TIDS; i++) {
> +		kfree(sta->ampdu_mlme.tid_start_tx[i]);
>   		tid_tx = rcu_dereference_raw(sta->ampdu_mlme.tid_tx[i]);
>   		if (!tid_tx)
>   			continue;
>


This does fix the TID leakage for me.

Tested-by:  Ben Greear <greearb@candelatech.com>

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ 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