From arend at broadcom.com  Tue Jul  3 02:51:29 2012
From: arend at broadcom.com (Arend van Spriel)
Date: Tue, 3 Jul 2012 08:51:29 +0200
Subject: REGRESSION: [PATCH v2 0/9] bcma misc updates
In-Reply-To: <1341013486-2520-1-git-send-email-hauke@hauke-m.de>
References: <1341013486-2520-1-git-send-email-hauke@hauke-m.de>
Message-ID: <4FF29671.1020406@broadcom.com>

On 06/30/2012 01:44 AM, Hauke Mehrtens wrote:
> These are some updates for bcma. Some are extending or completing some 
> workarounds for PCIe based wireless cards. A patch adds 
> bcma_pmu_spuravoid_pllupdate, used by brcmsmac and an other patch adds 
> constants for the chip ids. This code is mostly based on code from 
> brcmsmac and the Broadcom SDK for BCM47XX SoCs.
> 
> This was tested on a BCM4718 SoC with a BCM43224 PCIe and a BCM5357.
> The Wifi part of the BCM4718 and BCM43224 is more or less working with 
> brcmsmac, which need some more patches for that, but it has low speed 
> and some times or with some access points I still get errors. The wifi 
> of the BCM5357 does not work.
> 

Hi Hauke,

This patch series caused a regression in one of our smoketest machines
last night. I have not looked at the exact patch causing it (suspect
2/9). The failure happens on a BCM43224 chip with external SPROM. Here
is the log info:

[317752.101665] bcma: Found chip with id 0xA8D8, rev 0x01 and package 0x08
[317752.101809] bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800,
rev 0x22, class 0x0)
[317752.101827] bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812,
rev 0x17, class 0x0)
[317752.101870] bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev
0x0F, class 0x0)
[317752.171926] bcma: Failed to get SPROM: -71 <== -EPROTO (crc failed).
[317752.171982] bcma: Bus registered
[317753.184455] brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 16
[317753.191868] brcmsmac: Applying 43224B0+ WARs
[317753.193918] ieee80211 phy0: wl0: brcms_b_attach: bad macaddr
[317753.193924] ieee80211 phy0: wl0: brcms_b_attach: failed with err 22
[317753.193928] ieee80211 phy0: wl0: brcms_c_attach: failed with err 22
[317753.193959] ieee80211 phy0: brcmsmac: attach() failed with code 22
[317753.193966] brcmsmac: brcms_bcma_probe: brcms_attach failed!

I suspect it tries reading OTP instead of the external SPROM.

Gr. AvS



From hauke at hauke-m.de  Tue Jul  3 03:44:20 2012
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Tue, 03 Jul 2012 09:44:20 +0200
Subject: REGRESSION: [PATCH v2 0/9] bcma misc updates
In-Reply-To: <4FF29671.1020406@broadcom.com>
References: <1341013486-2520-1-git-send-email-hauke@hauke-m.de>
 <4FF29671.1020406@broadcom.com>
Message-ID: <4FF2A2D4.9070308@hauke-m.de>

On 07/03/2012 08:51 AM, Arend van Spriel wrote:
> On 06/30/2012 01:44 AM, Hauke Mehrtens wrote:
>> These are some updates for bcma. Some are extending or completing some 
>> workarounds for PCIe based wireless cards. A patch adds 
>> bcma_pmu_spuravoid_pllupdate, used by brcmsmac and an other patch adds 
>> constants for the chip ids. This code is mostly based on code from 
>> brcmsmac and the Broadcom SDK for BCM47XX SoCs.
>>
>> This was tested on a BCM4718 SoC with a BCM43224 PCIe and a BCM5357.
>> The Wifi part of the BCM4718 and BCM43224 is more or less working with 
>> brcmsmac, which need some more patches for that, but it has low speed 
>> and some times or with some access points I still get errors. The wifi 
>> of the BCM5357 does not work.
>>
> 
> Hi Hauke,
> 
> This patch series caused a regression in one of our smoketest machines
> last night. I have not looked at the exact patch causing it (suspect
> 2/9). The failure happens on a BCM43224 chip with external SPROM. Here
> is the log info:
> 
> [317752.101665] bcma: Found chip with id 0xA8D8, rev 0x01 and package 0x08
> [317752.101809] bcma: Core 0 found: ChipCommon (manuf 0x4BF, id 0x800,
> rev 0x22, class 0x0)
> [317752.101827] bcma: Core 1 found: IEEE 802.11 (manuf 0x4BF, id 0x812,
> rev 0x17, class 0x0)
> [317752.101870] bcma: Core 2 found: PCIe (manuf 0x4BF, id 0x820, rev
> 0x0F, class 0x0)
> [317752.171926] bcma: Failed to get SPROM: -71 <== -EPROTO (crc failed).
> [317752.171982] bcma: Bus registered
> [317753.184455] brcmsmac bcma0:0: mfg 4bf core 812 rev 23 class 0 irq 16
> [317753.191868] brcmsmac: Applying 43224B0+ WARs
> [317753.193918] ieee80211 phy0: wl0: brcms_b_attach: bad macaddr
> [317753.193924] ieee80211 phy0: wl0: brcms_b_attach: failed with err 22
> [317753.193928] ieee80211 phy0: wl0: brcms_c_attach: failed with err 22
> [317753.193959] ieee80211 phy0: brcmsmac: attach() failed with code 22
> [317753.193966] brcmsmac: brcms_bcma_probe: brcms_attach failed!
> 
> I suspect it tries reading OTP instead of the external SPROM.
> 
> Gr. AvS
> 
Hi Arend,

my BCM43224 uses a Sprom from the flash chip of the SoC, so it could be
that something is wrong in the sprom reading, but I haven't touched the
sprom code expect for using constants.

Do you know which patch is causing this issue?

Hauke


From arend at broadcom.com  Tue Jul  3 04:22:46 2012
From: arend at broadcom.com (Arend van Spriel)
Date: Tue, 3 Jul 2012 10:22:46 +0200
Subject: REGRESSION: [PATCH v2 0/9] bcma misc updates
In-Reply-To: <4FF2A2D4.9070308@hauke-m.de>
References: <1341013486-2520-1-git-send-email-hauke@hauke-m.de>
 <4FF29671.1020406@broadcom.com> <4FF2A2D4.9070308@hauke-m.de>
Message-ID: <4FF2ABD6.3070007@broadcom.com>

On 07/03/2012 09:44 AM, Hauke Mehrtens wrote:
>> I suspect it tries reading OTP instead of the external SPROM.
>> > 
>> > Gr. AvS
>> > 
> Hi Arend,
> 
> my BCM43224 uses a Sprom from the flash chip of the SoC, so it could be
> that something is wrong in the sprom reading, but I haven't touched the
> sprom code expect for using constants.
> 
> Do you know which patch is causing this issue?
> 
> Hauke
> 

I intended to bisect the series. I will let you know what I find.

Gr. AvS




From teg at jklm.no  Tue Jul  3 15:56:16 2012
From: teg at jklm.no (Tom Gundersen)
Date: Tue, 3 Jul 2012 21:56:16 +0200
Subject: kernel oops on rmmod
Message-ID: <CAG-2HqW0CZdrbjU+6S-fDQv2h6EcC-CutTV_0hutUQ_ezLEyFQ@mail.gmail.com>

Hi guys,

I just experienced a kernel oops, and thought I'd let you know even if
I don't have much details, as I imagine it might be simple to verify.

I'm on linux 3.4.4 using the b43 module.

The trigger was:

Boot without the correct firmware installed and immediately do "rmmod
b43". The backtrace mentioned "workqueue" and "b43".

I can get more details if you require it (assuming it is easily
reproducible, I only did this once so far).

Cheers,

Tom


From zajec5 at gmail.com  Thu Jul  5 15:55:46 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu,  5 Jul 2012 21:55:46 +0200
Subject: [PATCH] b43: N-PHY: fix RSSI calibration
Message-ID: <1341518146-20261-1-git-send-email-zajec5@gmail.com>

Specs were updated, change code to match it.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 drivers/net/wireless/b43/phy_n.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 1081188..b92bb9c 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -1369,7 +1369,7 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)
 					i << 2);
 			b43_nphy_poll_rssi(dev, 2, results[i], 8);
 		}
-		for (i = 0; i < 4; i++) {
+		for (i = 0; i < 4; i += 2) {
 			s32 curr;
 			s32 mind = 40;
 			s32 minpoll = 249;
@@ -1415,14 +1415,15 @@ static void b43_nphy_rev3_rssi_cal(struct b43_wldev *dev)
 			b43_nphy_scale_offset_rssi(dev, 0, 0, core + 1, 1, i);
 			b43_nphy_poll_rssi(dev, i, poll_results, 8);
 			for (j = 0; j < 4; j++) {
-				if (j / 2 == core)
+				if (j / 2 == core) {
 					offset[j] = 232 - poll_results[j];
-				if (offset[j] < 0)
-					offset[j] = -(abs(offset[j] + 4) / 8);
-				else
-					offset[j] = (offset[j] + 4) / 8;
-				b43_nphy_scale_offset_rssi(dev, 0,
-					offset[2 * core], core + 1, j % 2, i);
+					if (offset[j] < 0)
+						offset[j] = -(abs(offset[j] + 4) / 8);
+					else
+						offset[j] = (offset[j] + 4) / 8;
+					b43_nphy_scale_offset_rssi(dev, 0,
+						offset[2 * core], core + 1, j % 2, i);
+				}
 			}
 		}
 	}
-- 
1.7.7



From eloy.anguiano at uam.es  Sun Jul  8 17:27:05 2012
From: eloy.anguiano at uam.es (Eloy Anguiano)
Date: Sun, 08 Jul 2012 23:27:05 +0200
Subject: b43 does not work on broadcom 43227
Message-ID: <1341782825.4900.11.camel@zeus>

Dear developers,

Perhaps this is not a bug because my card is not probed. I have a
Broadcom 43227 and the wireless does not work at all. I need your driver
to activate it as a AP, but as far as I know, is imposible at this
moment. Then I will use Broadcom driver waiting to your next
developments. I say you because I think that developers need some
feedback, for free software development.

Thank you,

-- 
Eloy Anguiano Rey 
  http://rincon.uam.es/dir?cw=109722900390625
  Alternative phone: +34-914-972-266-- 




From Larry.Finger at lwfinger.net  Sun Jul  8 18:31:24 2012
From: Larry.Finger at lwfinger.net (Larry Finger)
Date: Sun, 08 Jul 2012 17:31:24 -0500
Subject: b43 does not work on broadcom 43227
In-Reply-To: <1341782825.4900.11.camel@zeus>
References: <1341782825.4900.11.camel@zeus>
Message-ID: <4FFA0A3C.3040204@lwfinger.net>

On 07/08/2012 04:27 PM, Eloy Anguiano wrote:
> Dear developers,
>
> Perhaps this is not a bug because my card is not probed. I have a
> Broadcom 43227 and the wireless does not work at all. I need your driver
> to activate it as a AP, but as far as I know, is imposible at this
> moment. Then I will use Broadcom driver waiting to your next
> developments. I say you because I think that developers need some
> feedback, for free software development.

As you guessed, it is not a bug as support for that device has never been 
enabled. I think your device will use bcma just as my BCM43228 does. I have 
started developing the patches needed to implement it with b43; however, I have 
not gotten very far. Could you please confirm that the the PCI ID is 14e4:4358? 
If that is correct, could you also try the attached patch and report the info 
that is logged in the dmesg output?

I think that Broadcom will be changing brcmsmac to support these devices, but my 
understanding is that they are concentrating on fullmac devices at the moment.

Larry
-------------- next part --------------
Index: wireless-testing-new/drivers/bcma/host_pci.c
===================================================================
--- wireless-testing-new.orig/drivers/bcma/host_pci.c
+++ wireless-testing-new/drivers/bcma/host_pci.c
@@ -272,6 +272,7 @@ static DEFINE_PCI_DEVICE_TABLE(bcma_pci_
 	{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4331) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4353) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4357) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4738) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_BROADCOM, 0x4727) },
 	{ 0, },
 };

From arend at broadcom.com  Mon Jul  9 04:53:15 2012
From: arend at broadcom.com (Arend van Spriel)
Date: Mon, 9 Jul 2012 10:53:15 +0200
Subject: b43 does not work on broadcom 43227
In-Reply-To: <4FFA0A3C.3040204@lwfinger.net>
References: <1341782825.4900.11.camel@zeus>
 <4FFA0A3C.3040204@lwfinger.net>
Message-ID: <4FFA9BFB.3020600@broadcom.com>

On 07/09/2012 12:31 AM, Larry Finger wrote:
> I think that Broadcom will be changing brcmsmac to support these
> devices, but my understanding is that they are concentrating on fullmac
> devices at the moment.
> 
> Larry

That is correct. The bcm43227 is very similar to the bcm43228, the
difference being the supported bands. I have not heard back since I
forwarded your questions on 43228 support in brcmsmac. So for now I can
only say that bcm43227 and bcm43228 will be added in one patch.

Gr. AvS



From thomas at net.t-labs.tu-berlin.de  Fri Jul 13 14:52:23 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Fri, 13 Jul 2012 20:52:23 +0200
Subject: mac80211: Restructure ieee80211_tx_info->control to gain free space
 along tx-path 
Message-ID: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

In order to enable new annotations per data packet along the max80211 tx-path,
(e.g. upcoming Transmit Power Control (TPC) per packet) this patch-serie does:

- fix the ieee80211_tx_info->control usage in driver mac80211_hwsim
- remove control.sta from ieee80211_tx_info and adapt all affected drivers


Greetings Thomas                                                                                                                                                                                                                        

---
CC list is a reduced "get_maintainer.pl", focuses on mailing lists - suggested
by J. Berg



From thomas at net.t-labs.tu-berlin.de  Fri Jul 13 14:52:24 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Fri, 13 Jul 2012 20:52:24 +0200
Subject: [PATCH 1/2] mac80211_hwsim: fix possible race condition in usage of
 info->control.sta & control.vif
In-Reply-To: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
Message-ID: <1342205545-45382-2-git-send-email-thomas@net.t-labs.tu-berlin.de>

info->control.sta and control.vif may only be dereferenced during the
drv_tx call otherwise could lead to use-after-free bugs.

Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
---
 drivers/net/wireless/mac80211_hwsim.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 3f38d84..826ac7b 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1540,11 +1540,6 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
 	/* now send back TX status */
 	txi = IEEE80211_SKB_CB(skb);
 
-	if (txi->control.vif)
-		hwsim_check_magic(txi->control.vif);
-	if (txi->control.sta)
-		hwsim_check_sta_magic(txi->control.sta);
-
 	ieee80211_tx_info_clear_status(txi);
 
 	for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
-- 
1.7.11.1



From thomas at net.t-labs.tu-berlin.de  Fri Jul 13 14:52:25 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Fri, 13 Jul 2012 20:52:25 +0200
Subject: [PATCH 2/2] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
Message-ID: <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>

The pointer control.sta is removed from ieee80211_tx_info to free up sufficient
memory in SKB_CB on the tx-path to enable new annotations per data packet e.g.
support of upcoming Transmit Power Control (TPC).
Now the control.sta pointer is put on the stack where it is passed as function
parameter to the .tx equivalent (ieee80211_ops) of each affected wireless
driver. Therefore a new structure ieee80211_tx_control is added to mac80211.h
which holds the sta structure instead.

The tx-path of all affected drivers is restructured to respect the chaneged
layout of struct ieee80211_tx_info. List of modified drivers:
ath9k
ath5k
iwl3954
iwl4965
iwl-agn
mwl8k
carl9170
ath9k-htc
p54
rt2x00
rtl8180
rtl8087
hwsim
b43
b43legacy
brcmsmac
zd1211rw
wl1251
wlcore
rtlwifi
libertas_tf
at76c50x-usb
adm8211

Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
Signed-off-by: Alina Friedrichsen <x-alina at gmx.net>
Signed-off-by: Felix Fietkau <nbd at openwrt.org>
---
restructure this patch to respect logical API evolutions. thx to Johannes Berg
add missing drivers that are effected as well. thx to Xose Vazquez Perez
---
 drivers/net/wireless/adm8211.c                     |  4 +++-
 drivers/net/wireless/at76c50x-usb.c                |  4 +++-
 drivers/net/wireless/ath/ath5k/mac80211-ops.c      |  3 ++-
 drivers/net/wireless/ath/ath9k/ath9k.h             |  1 +
 drivers/net/wireless/ath/ath9k/htc.h               |  1 +
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c    |  2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |  6 +++--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |  2 +-
 drivers/net/wireless/ath/ath9k/main.c              |  5 ++++-
 drivers/net/wireless/ath/ath9k/xmit.c              |  9 ++++----
 drivers/net/wireless/ath/carl9170/carl9170.h       |  4 +++-
 drivers/net/wireless/ath/carl9170/tx.c             | 16 ++++++-------
 drivers/net/wireless/b43/main.c                    |  3 ++-
 drivers/net/wireless/b43legacy/main.c              |  1 +
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
 drivers/net/wireless/iwlegacy/3945-mac.c           | 12 ++++++----
 drivers/net/wireless/iwlegacy/4965-mac.c           | 26 +++++++++++++---------
 drivers/net/wireless/iwlegacy/4965.h               |  8 +++++--
 drivers/net/wireless/iwlwifi/dvm/agn.h             |  4 +++-
 drivers/net/wireless/iwlwifi/dvm/mac80211.c        |  6 +++--
 drivers/net/wireless/iwlwifi/dvm/tx.c              | 16 +++++++------
 drivers/net/wireless/libertas_tf/main.c            |  4 +++-
 drivers/net/wireless/mac80211_hwsim.c              |  8 ++++---
 drivers/net/wireless/mwl8k.c                       | 17 ++++++++------
 drivers/net/wireless/p54/lmac.h                    |  4 +++-
 drivers/net/wireless/p54/main.c                    |  2 +-
 drivers/net/wireless/p54/txrx.c                    | 15 ++++++++-----
 drivers/net/wireless/rt2x00/rt2x00.h               |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00dev.c            |  2 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c            |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00queue.c          | 20 +++++++++--------
 drivers/net/wireless/rtl818x/rtl8180/dev.c         |  6 +++--
 drivers/net/wireless/rtl818x/rtl8187/dev.c         |  6 +++--
 drivers/net/wireless/rtlwifi/core.c                |  4 +++-
 drivers/net/wireless/ti/wl1251/main.c              |  4 +++-
 drivers/net/wireless/ti/wlcore/main.c              |  4 +++-
 drivers/net/wireless/zd1211rw/zd_mac.c             |  6 +++--
 include/net/mac80211.h                             | 19 +++++++++++-----
 net/mac80211/driver-ops.h                          |  6 +++--
 net/mac80211/ieee80211_i.h                         |  2 ++
 net/mac80211/tx.c                                  | 13 ++++++-----
 41 files changed, 186 insertions(+), 103 deletions(-)

diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 0ac09a2..b661ce2 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1661,7 +1661,9 @@ static void adm8211_tx_raw(struct ieee80211_hw *dev, struct sk_buff *skb,
 }
 
 /* Put adm8211_tx_hdr on skb and transmit */
-static void adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void adm8211_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct adm8211_tx_hdr *txhdr;
 	size_t payload_len, hdrlen;
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index efc162e..abb520d 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1726,7 +1726,9 @@ static void at76_mac80211_tx_callback(struct urb *urb)
 	ieee80211_wake_queues(priv->hw);
 }
 
-static void at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void at76_mac80211_tx(struct ieee80211_hw *hw,
+			     struct ieee80211_tx_control *control,
+			     struct sk_buff *skb)
 {
 	struct at76_priv *priv = hw->priv;
 	struct at76_tx_buffer *tx_buffer = priv->bulk_out_buffer;
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 22b80af..93a800f 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -55,7 +55,8 @@
 \********************/
 
 static void
-ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+ath5k_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
+	 struct sk_buff *skb)
 {
 	struct ath5k_hw *ah = hw->priv;
 	u16 qnum = skb_get_queue_mapping(skb);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 54f0c9d0..9a08d9f 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -280,6 +280,7 @@ struct ath_tx_control {
 	struct ath_txq *txq;
 	struct ath_node *an;
 	u8 paprd;
+	struct ieee80211_sta *sta;
 };
 
 #define ATH_TX_ERROR        0x01
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 936e920..b30596f 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -542,6 +542,7 @@ void ath9k_htc_stop_ani(struct ath9k_htc_priv *priv);
 
 int ath9k_tx_init(struct ath9k_htc_priv *priv);
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb, u8 slot, bool is_cab);
 void ath9k_tx_cleanup(struct ath9k_htc_priv *priv);
 bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index 77d541f..f42d2eb 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -326,7 +326,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv,
 			goto next;
 		}
 
-		ret = ath9k_htc_tx_start(priv, skb, tx_slot, true);
+		ret = ath9k_htc_tx_start(priv, NULL, skb, tx_slot, true);
 		if (ret != 0) {
 			ath9k_htc_tx_clear_slot(priv, tx_slot);
 			dev_kfree_skb_any(skb);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 374c32e..ee053b2 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -856,7 +856,9 @@ set_timer:
 /* mac80211 Callbacks */
 /**********************/
 
-static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_htc_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct ath9k_htc_priv *priv = hw->priv;
@@ -883,7 +885,7 @@ static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto fail_tx;
 	}
 
-	ret = ath9k_htc_tx_start(priv, skb, slot, false);
+	ret = ath9k_htc_tx_start(priv, control->sta, skb, slot, false);
 	if (ret != 0) {
 		ath_dbg(common, XMIT, "Tx failed\n");
 		goto clear_slot;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 47e61d0..06cdcb7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -333,12 +333,12 @@ static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,
 }
 
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb,
 		       u8 slot, bool is_cab)
 {
 	struct ieee80211_hdr *hdr;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_vif *vif = tx_info->control.vif;
 	struct ath9k_htc_sta *ista;
 	struct ath9k_htc_vif *avp = NULL;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 01a5f18..45a77ff 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -691,7 +691,9 @@ mutex_unlock:
 	return r;
 }
 
-static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct ath_softc *sc = hw->priv;
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
@@ -751,6 +753,7 @@ static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	memset(&txctl, 0, sizeof(struct ath_tx_control));
 	txctl.txq = sc->tx.txq_map[skb_get_queue_mapping(skb)];
+	txctl.sta = control->sta;
 
 	ath_dbg(common, XMIT, "transmitting packet, skb: %p\n", skb);
 
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index cafb4a0..4912214 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1771,11 +1771,12 @@ static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
 	TX_STAT_INC(txq->axq_qnum, queued);
 }
 
-static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb,
+static void setup_frame_info(struct ieee80211_hw *hw,
+			     struct ieee80211_sta *sta,
+			     struct sk_buff *skb,
 			     int framelen)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	const struct ieee80211_rate *rate;
@@ -1933,7 +1934,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
+	struct ieee80211_sta *sta = txctl->sta;
 	struct ieee80211_vif *vif = info->control.vif;
 	struct ath_softc *sc = hw->priv;
 	struct ath_txq *txq = txctl->txq;
@@ -1977,7 +1978,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	    !ieee80211_is_data(hdr->frame_control))
 		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
 
-	setup_frame_info(hw, skb, frmlen);
+	setup_frame_info(hw, sta, skb, frmlen);
 
 	/*
 	 * At this point, the vif, hw_key and sta pointers in the tx control
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index 376be11..8f0cbc3 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -577,7 +577,9 @@ void carl9170_rx(struct ar9170 *ar, void *buf, unsigned int len);
 void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len);
 
 /* TX */
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb);
 void carl9170_tx_janitor(struct work_struct *work);
 void carl9170_tx_process_status(struct ar9170 *ar,
 				const struct carl9170_rsp *cmd);
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 6a86814..84377cf 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -867,14 +867,15 @@ static bool carl9170_tx_cts_check(struct ar9170 *ar,
 	return false;
 }
 
-static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
+static int carl9170_tx_prepare(struct ar9170 *ar,
+			       struct ieee80211_sta *sta,
+			       struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct _carl9170_tx_superframe *txc;
 	struct carl9170_vif_info *cvif;
 	struct ieee80211_tx_info *info;
 	struct ieee80211_tx_rate *txrate;
-	struct ieee80211_sta *sta;
 	struct carl9170_tx_info *arinfo;
 	unsigned int hw_queue;
 	int i;
@@ -910,8 +911,6 @@ static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
 	else
 		cvif = NULL;
 
-	sta = info->control.sta;
-
 	txc = (void *)skb_push(skb, sizeof(*txc));
 	memset(txc, 0, sizeof(*txc));
 
@@ -1457,20 +1456,21 @@ err_unlock_rcu:
 	return false;
 }
 
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb)
 {
 	struct ar9170 *ar = hw->priv;
 	struct ieee80211_tx_info *info;
-	struct ieee80211_sta *sta;
+	struct ieee80211_sta *sta = control->sta;
 	bool run;
 
 	if (unlikely(!IS_STARTED(ar)))
 		goto err_free;
 
 	info = IEEE80211_SKB_CB(skb);
-	sta = info->control.sta;
 
-	if (unlikely(carl9170_tx_prepare(ar, skb)))
+	if (unlikely(carl9170_tx_prepare(ar, sta, skb)))
 		goto err_free;
 
 	carl9170_tx_accounting(ar, skb);
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 1b988f2..b6fc409 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3409,7 +3409,8 @@ static void b43_tx_work(struct work_struct *work)
 }
 
 static void b43_op_tx(struct ieee80211_hw *hw,
-		     struct sk_buff *skb)
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct b43_wl *wl = hw_to_b43_wl(hw);
 
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 8156135..74d4c20 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2492,6 +2492,7 @@ static void b43legacy_tx_work(struct work_struct *work)
 }
 
 static void b43legacy_op_tx(struct ieee80211_hw *hw,
+			    struct ieee80211_tx_control *control,
 			    struct sk_buff *skb)
 {
 	struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 9e79d47..a7be68d 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
 	}
 }
 
-static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void brcms_ops_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct brcms_info *wl = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -276,7 +278,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto done;
 	}
 	brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
-	tx_info->rate_driver_data[0] = tx_info->control.sta;
+	tx_info->rate_driver_data[0] = control->sta;
  done:
 	spin_unlock_bh(&wl->lock);
 }
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index faec404..e252acb 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -460,7 +460,9 @@ il3945_build_tx_cmd_basic(struct il_priv *il, struct il_device_cmd *cmd,
  * start C_TX command process
  */
 static int
-il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il3945_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -512,7 +514,7 @@ il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	hdr_len = ieee80211_hdrlen(fc);
 
 	/* Find idx into station table for destination station */
-	sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+	sta_id = il_sta_id_or_broadcast(il, sta);
 	if (sta_id == IL_INVALID_STATION) {
 		D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
 		goto drop;
@@ -2859,7 +2861,9 @@ il3945_mac_stop(struct ieee80211_hw *hw)
 }
 
 static void
-il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il3945_mac_tx(struct ieee80211_hw *hw,
+	       struct ieee80211_tx_control *control,
+	       struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -2868,7 +2872,7 @@ il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il3945_tx_skb(il, skb))
+	if (il3945_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MAC80211("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 34f61a0..eac4dc8 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -1526,8 +1526,11 @@ il4965_tx_cmd_build_basic(struct il_priv *il, struct sk_buff *skb,
 }
 
 static void
-il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
-			 struct ieee80211_tx_info *info, __le16 fc)
+il4965_tx_cmd_build_rate(struct il_priv *il,
+			 struct il_tx_cmd *tx_cmd,
+			 struct ieee80211_tx_info *info,
+			 struct ieee80211_sta *sta,
+			 __le16 fc)
 {
 	const u8 rts_retry_limit = 60;
 	u32 rate_flags;
@@ -1561,9 +1564,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
 	rate_idx = info->control.rates[0].idx;
 	if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0
 	    || rate_idx > RATE_COUNT_LEGACY)
-		rate_idx =
-		    rate_lowest_index(&il->bands[info->band],
-				      info->control.sta);
+		rate_idx = rate_lowest_index(&il->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IL_FIRST_OFDM_RATE;
@@ -1630,11 +1631,12 @@ il4965_tx_cmd_build_hwcrypto(struct il_priv *il, struct ieee80211_tx_info *info,
  * start C_TX command process
  */
 int
-il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il4965_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct il_station_priv *sta_priv = NULL;
 	struct il_tx_queue *txq;
 	struct il_queue *q;
@@ -1680,7 +1682,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 		sta_id = il->hw_params.bcast_id;
 	else {
 		/* Find idx into station table for destination station */
-		sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+		sta_id = il_sta_id_or_broadcast(il, sta);
 
 		if (sta_id == IL_INVALID_STATION) {
 			D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
@@ -1786,7 +1788,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id);
 
-	il4965_tx_cmd_build_rate(il, tx_cmd, info, fc);
+	il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc);
 
 	il_update_stats(il, true, fc, len);
 	/*
@@ -5828,7 +5830,9 @@ il4965_mac_stop(struct ieee80211_hw *hw)
 }
 
 void
-il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il4965_mac_tx(struct ieee80211_hw *hw,
+	      struct ieee80211_tx_control *control,
+	      struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -5837,7 +5841,7 @@ il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il4965_tx_skb(il, skb))
+	if (il4965_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MACDUMP("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 1db6776..2d092f3 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -78,7 +78,9 @@ int il4965_hw_txq_attach_buf_to_tfd(struct il_priv *il, struct il_tx_queue *txq,
 int il4965_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq);
 void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags,
 				 struct ieee80211_tx_info *info);
-int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb);
+int il4965_tx_skb(struct il_priv *il,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 * ssn);
 int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif,
@@ -163,7 +165,9 @@ void il4965_eeprom_release_semaphore(struct il_priv *il);
 int il4965_eeprom_check_version(struct il_priv *il);
 
 /* mac80211 handlers (for 4965) */
-void il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void il4965_mac_tx(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 int il4965_mac_start(struct ieee80211_hw *hw);
 void il4965_mac_stop(struct ieee80211_hw *hw);
 void il4965_configure_filter(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlwifi/dvm/agn.h b/drivers/net/wireless/iwlwifi/dvm/agn.h
index 9bb16bd..f0b8c1f 100644
--- a/drivers/net/wireless/iwlwifi/dvm/agn.h
+++ b/drivers/net/wireless/iwlwifi/dvm/agn.h
@@ -201,7 +201,9 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success);
 
 
 /* tx */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb);
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 *ssn);
 int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif,
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index a5f7bce..e64af60 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -511,14 +511,16 @@ static void iwlagn_mac_set_wakeup(struct ieee80211_hw *hw, bool enabled)
 }
 #endif
 
-static void iwlagn_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void iwlagn_mac_tx(struct ieee80211_hw *hw,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
 	struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
 
 	IWL_DEBUG_TX(priv, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 		     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (iwlagn_tx_skb(priv, skb))
+	if (iwlagn_tx_skb(priv, control->sta, skb))
 		dev_kfree_skb_any(skb);
 }
 
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
index 5971a23..d17799b 100644
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
@@ -127,6 +127,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
 static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 				     struct iwl_tx_cmd *tx_cmd,
 				     struct ieee80211_tx_info *info,
+				     struct ieee80211_sta *sta,
 				     __le16 fc)
 {
 	u32 rate_flags;
@@ -187,8 +188,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 	if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS ||
 			(rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY))
 		rate_idx = rate_lowest_index(
-				&priv->eeprom_data->bands[info->band],
-				info->control.sta);
+				&priv->eeprom_data->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IWL_FIRST_OFDM_RATE;
@@ -291,7 +291,9 @@ static int iwl_sta_id_or_broadcast(struct iwl_rxon_context *context,
 /*
  * start REPLY_TX command process
  */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -345,7 +347,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 		sta_id = ctx->bcast_sta_id;
 	else {
 		/* Find index into station table for destination station */
-		sta_id = iwl_sta_id_or_broadcast(ctx, info->control.sta);
+		sta_id = iwl_sta_id_or_broadcast(ctx, sta);
 		if (sta_id == IWL_INVALID_STATION) {
 			IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
 				       hdr->addr1);
@@ -355,8 +357,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 
 	IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
 
-	if (info->control.sta)
-		sta_priv = (void *)info->control.sta->drv_priv;
+	if (sta)
+		sta_priv = (void *)sta->drv_priv;
 
 	if (sta_priv && sta_priv->asleep &&
 	    (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) {
@@ -397,7 +399,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	iwlagn_tx_cmd_build_basic(priv, skb, tx_cmd, info, hdr, sta_id);
 
-	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, fc);
+	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, sta, fc);
 
 	memset(&info->status, 0, sizeof(info->status));
 
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index a034572..7001856 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -227,7 +227,9 @@ static void lbtf_free_adapter(struct lbtf_private *priv)
 	lbtf_deb_leave(LBTF_DEB_MAIN);
 }
 
-static void lbtf_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void lbtf_op_tx(struct ieee80211_hw *hw,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct lbtf_private *priv = hw->priv;
 
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 826ac7b..ff20dbb 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -709,7 +709,9 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
 	return ack;
 }
 
-static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
+			      struct ieee80211_tx_control *control,
+			      struct sk_buff *skb)
 {
 	bool ack;
 	struct ieee80211_tx_info *txi;
@@ -741,8 +743,8 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	if (txi->control.vif)
 		hwsim_check_magic(txi->control.vif);
-	if (txi->control.sta)
-		hwsim_check_sta_magic(txi->control.sta);
+	if (control->sta)
+		hwsim_check_sta_magic(control->sta);
 
 	ieee80211_tx_info_clear_status(txi);
 
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 224e03a..5099e53 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1830,12 +1830,14 @@ static inline void mwl8k_tx_count_packet(struct ieee80211_sta *sta, u8 tid)
 }
 
 static void
-mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
+mwl8k_txq_xmit(struct ieee80211_hw *hw,
+	       int index,
+	       struct ieee80211_sta *sta,
+	       struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	struct ieee80211_tx_info *tx_info;
 	struct mwl8k_vif *mwl8k_vif;
-	struct ieee80211_sta *sta;
 	struct ieee80211_hdr *wh;
 	struct mwl8k_tx_queue *txq;
 	struct mwl8k_tx_desc *tx;
@@ -1867,7 +1869,6 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	wh = &((struct mwl8k_dma_data *)skb->data)->wh;
 
 	tx_info = IEEE80211_SKB_CB(skb);
-	sta = tx_info->control.sta;
 	mwl8k_vif = MWL8K_VIF(tx_info->control.vif);
 
 	if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
@@ -2019,8 +2020,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	tx->pkt_phys_addr = cpu_to_le32(dma);
 	tx->pkt_len = cpu_to_le16(skb->len);
 	tx->rate_info = 0;
-	if (!priv->ap_fw && tx_info->control.sta != NULL)
-		tx->peer_id = MWL8K_STA(tx_info->control.sta)->peer_id;
+	if (!priv->ap_fw && sta != NULL)
+		tx->peer_id = MWL8K_STA(sta)->peer_id;
 	else
 		tx->peer_id = 0;
 
@@ -4364,7 +4365,9 @@ static void mwl8k_rx_poll(unsigned long data)
 /*
  * Core driver operations.
  */
-static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mwl8k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	int index = skb_get_queue_mapping(skb);
@@ -4376,7 +4379,7 @@ static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		return;
 	}
 
-	mwl8k_txq_xmit(hw, index, skb);
+	mwl8k_txq_xmit(hw, index, control->sta, skb);
 }
 
 static int mwl8k_start(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/p54/lmac.h b/drivers/net/wireless/p54/lmac.h
index 3d8d622..de1d46b 100644
--- a/drivers/net/wireless/p54/lmac.h
+++ b/drivers/net/wireless/p54/lmac.h
@@ -526,7 +526,9 @@ int p54_init_leds(struct p54_common *priv);
 void p54_unregister_leds(struct p54_common *priv);
 
 /* xmit functions */
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb);
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int p54_tx_cancel(struct p54_common *priv, __le32 req_id);
 void p54_tx(struct p54_common *priv, struct sk_buff *skb);
 
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 7cffea7..5e91ad0 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -158,7 +158,7 @@ static int p54_beacon_update(struct p54_common *priv,
 	 * to cancel the old beacon template by hand, instead the firmware
 	 * will release the previous one through the feedback mechanism.
 	 */
-	p54_tx_80211(priv->hw, beacon);
+	p54_tx_80211(priv->hw, NULL, beacon);
 	priv->tsf_high32 = 0;
 	priv->tsf_low32 = 0;
 
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index f38786e..5861e13 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -676,8 +676,9 @@ int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb)
 EXPORT_SYMBOL_GPL(p54_rx);
 
 static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
-				struct ieee80211_tx_info *info, u8 *queue,
-				u32 *extra_len, u16 *flags, u16 *aid,
+				struct ieee80211_tx_info *info,
+				struct ieee80211_sta *sta,
+				u8 *queue, u32 *extra_len, u16 *flags, u16 *aid,
 				bool *burst_possible)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -746,8 +747,8 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
 			}
 		}
 
-		if (info->control.sta)
-			*aid = info->control.sta->aid;
+		if (sta)
+			*aid = sta->aid;
 		break;
 	}
 }
@@ -767,7 +768,9 @@ static u8 p54_convert_algo(u32 cipher)
 	}
 }
 
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct p54_common *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -784,7 +787,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
 	u8 nrates = 0, nremaining = 8;
 	bool burst_allowed = false;
 
-	p54_tx_80211_header(priv, skb, info, &queue, &extra_len,
+	p54_tx_80211_header(priv, skb, info, control->sta, &queue, &extra_len,
 			    &hdr_flags, &aid, &burst_allowed);
 
 	if (p54_tx_qos_accounting_alloc(priv, skb, queue)) {
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 8afb546..f991e8b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1287,7 +1287,9 @@ void rt2x00lib_rxdone(struct queue_entry *entry, gfp_t gfp);
 /*
  * mac80211 handlers.
  */
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int rt2x00mac_start(struct ieee80211_hw *hw);
 void rt2x00mac_stop(struct ieee80211_hw *hw);
 int rt2x00mac_add_interface(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index a6b88bd..a59048f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -194,7 +194,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
 	 */
 	skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	while (skb) {
-		rt2x00mac_tx(rt2x00dev->hw, skb);
+		rt2x00mac_tx(rt2x00dev->hw, NULL, skb);
 		skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	}
 }
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 4ff26c2..c3d0f2f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -99,7 +99,9 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
 	return retval;
 }
 
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index f7e74a0..e488b94 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -315,6 +315,7 @@ static void rt2x00queue_create_tx_descriptor_plcp(struct rt2x00_dev *rt2x00dev,
 static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 						struct sk_buff *skb,
 						struct txentry_desc *txdesc,
+						struct ieee80211_sta *sta,
 						const struct rt2x00_rate *hwrate)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -322,11 +323,11 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct rt2x00_sta *sta_priv = NULL;
 
-	if (tx_info->control.sta) {
+	if (sta) {
 		txdesc->u.ht.mpdu_density =
-		    tx_info->control.sta->ht_cap.ampdu_density;
+		    sta->ht_cap.ampdu_density;
 
-		sta_priv = sta_to_rt2x00_sta(tx_info->control.sta);
+		sta_priv = sta_to_rt2x00_sta(sta);
 		txdesc->u.ht.wcid = sta_priv->wcid;
 	}
 
@@ -341,8 +342,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 		 * MIMO PS should be set to 1 for STA's using dynamic SM PS
 		 * when using more then one tx stream (>MCS7).
 		 */
-		if (tx_info->control.sta && txdesc->u.ht.mcs > 7 &&
-		    ((tx_info->control.sta->ht_cap.cap &
+		if (sta && txdesc->u.ht.mcs > 7 &&
+		    ((sta->ht_cap.cap &
 		      IEEE80211_HT_CAP_SM_PS) >>
 		     IEEE80211_HT_CAP_SM_PS_SHIFT) ==
 		    WLAN_HT_CAP_SM_PS_DYNAMIC)
@@ -409,7 +410,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 
 static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 					     struct sk_buff *skb,
-					     struct txentry_desc *txdesc)
+					     struct txentry_desc *txdesc,
+					     struct ieee80211_sta *sta)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -503,7 +505,7 @@ static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 
 	if (test_bit(REQUIRE_HT_TX_DESC, &rt2x00dev->cap_flags))
 		rt2x00queue_create_tx_descriptor_ht(rt2x00dev, skb, txdesc,
-						    hwrate);
+						   sta, hwrate);
 	else
 		rt2x00queue_create_tx_descriptor_plcp(rt2x00dev, skb, txdesc,
 						      hwrate);
@@ -595,7 +597,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc, NULL);
 
 	/*
 	 * All information is retrieved from the skb->cb array,
@@ -740,7 +742,7 @@ int rt2x00queue_update_beacon_locked(struct rt2x00_dev *rt2x00dev,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc, NULL);
 
 	/*
 	 * Fill in skb descriptor
diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 3b50539..fd8fcbd 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -244,7 +244,9 @@ static irqreturn_t rtl8180_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static void rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8180_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -710,7 +712,7 @@ static void rtl8180_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8180_tx(dev, skb);
+	rtl8180_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index 4fb1ca1..c7bfcf3 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -228,7 +228,9 @@ static void rtl8187_tx_cb(struct urb *urb)
 	}
 }
 
-static void rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8187_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct rtl8187_priv *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1076,7 +1078,7 @@ static void rtl8187_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8187_tx(dev, skb);
+	rtl8187_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 278e9f9..5684c54 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -124,7 +124,9 @@ static void rtl_op_stop(struct ieee80211_hw *hw)
 	mutex_unlock(&rtlpriv->locks.conf_mutex);
 }
 
-static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void rtl_op_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index 3118c42..441cbcc 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -354,7 +354,9 @@ out:
 	return ret;
 }
 
-static void wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1251_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1251 *wl = hw->priv;
 	unsigned long flags;
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 9f04b64..f4744b1 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1166,7 +1166,9 @@ out:
 	return ret;
 }
 
-static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1271_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1271 *wl = hw->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index c9e2660..4598801 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -937,7 +937,9 @@ static int fill_ctrlset(struct zd_mac *mac,
  * control block of the skbuff will be initialized. If necessary the incoming
  * mac80211 queues will be stopped.
  */
-static void zd_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void zd_op_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct zd_mac *mac = zd_hw_mac(hw);
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1176,7 +1178,7 @@ static void zd_beacon_done(struct zd_mac *mac)
 		skb = ieee80211_get_buffered_bc(mac->hw, mac->vif);
 		if (!skb)
 			break;
-		zd_op_tx(mac->hw, skb);
+		zd_op_tx(mac->hw, NULL, skb);
 	}
 
 	/*
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index bb86aa6..d1de945 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -522,9 +522,6 @@ struct ieee80211_tx_rate {
  *  (2) driver internal use (if applicable)
  *  (3) TX status information - driver tells mac80211 what happened
  *
- * The TX control's sta pointer is only valid during the ->tx call,
- * it may be NULL.
- *
  * @flags: transmit info flags, defined above
  * @band: the band to transmit on (use for checking for races)
  * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC
@@ -555,6 +552,7 @@ struct ieee80211_tx_info {
 					struct ieee80211_tx_rate rates[
 						IEEE80211_TX_MAX_RATES];
 					s8 rts_cts_rate_idx;
+					/* 3 bytes free */
 				};
 				/* only needed before rate control */
 				unsigned long jiffies;
@@ -562,7 +560,7 @@ struct ieee80211_tx_info {
 			/* NB: vif can be NULL for injected frames */
 			struct ieee80211_vif *vif;
 			struct ieee80211_key_conf *hw_key;
-			struct ieee80211_sta *sta;
+			/* 8 bytes free */
 		} control;
 		struct {
 			struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
@@ -1074,6 +1072,15 @@ enum sta_notify_cmd {
 };
 
 /**
+ * struct ieee80211_tx_control - TX control data
+ *
+ * @sta: station table entry
+  */
+struct ieee80211_tx_control {
+	struct ieee80211_sta *sta;
+};
+
+/**
  * enum ieee80211_hw_flags - hardware flags
  *
  * These flags are used to indicate hardware capabilities to
@@ -2264,7 +2271,9 @@ enum ieee80211_rate_control_changed {
  *	The callback is optional and can (should!) sleep.
  */
 struct ieee80211_ops {
-	void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
+	void (*tx)(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 	int (*start)(struct ieee80211_hw *hw);
 	void (*stop)(struct ieee80211_hw *hw);
 #ifdef CONFIG_PM
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index df92031..a81117a 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -22,9 +22,11 @@ get_bss_sdata(struct ieee80211_sub_if_data *sdata)
 	return sdata;
 }
 
-static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
+static inline void drv_tx(struct ieee80211_local *local,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
-	local->ops->tx(&local->hw, skb);
+	local->ops->tx(&local->hw, control, skb);
 }
 
 static inline void drv_get_et_strings(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 7998513..6258da6 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -196,6 +196,8 @@ struct ieee80211_tx_data {
 	struct ieee80211_channel *channel;
 
 	unsigned int flags;
+
+	struct ieee80211_tx_control control;
 };
 
 
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index acf712f..7706f01 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1201,6 +1201,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
 static bool ieee80211_tx_frags(struct ieee80211_local *local,
 			       struct ieee80211_vif *vif,
 			       struct ieee80211_sta *sta,
+			       struct ieee80211_tx_control *control,
 			       struct sk_buff_head *skbs,
 			       bool txpending)
 {
@@ -1240,10 +1241,10 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
 		spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 
 		info->control.vif = vif;
-		info->control.sta = sta;
+		control->sta = sta;
 
 		__skb_unlink(skb, skbs);
-		drv_tx(local, skb);
+		drv_tx(local, control, skb);
 	}
 
 	return true;
@@ -1253,6 +1254,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
  * Returns false if the frame couldn't be transmitted but was queued instead.
  */
 static bool __ieee80211_tx(struct ieee80211_local *local,
+			   struct ieee80211_tx_control *control,
 			   struct sk_buff_head *skbs, int led_len,
 			   struct sta_info *sta, bool txpending)
 {
@@ -1301,7 +1303,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
 		break;
 	}
 
-	result = ieee80211_tx_frags(local, vif, pubsta, skbs,
+	result = ieee80211_tx_frags(local, vif, pubsta, control, skbs,
 				    txpending);
 
 	ieee80211_tpt_led_trig_tx(local, fc, led_len);
@@ -1409,7 +1411,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
 			sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
 
 	if (!invoke_tx_handlers(&tx))
-		result = __ieee80211_tx(local, &tx.skbs, led_len,
+		result = __ieee80211_tx(local, &tx.control, &tx.skbs, led_len,
 					tx.sta, txpending);
  out:
 	rcu_read_unlock();
@@ -2154,6 +2156,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
 	struct ieee80211_sub_if_data *sdata;
 	struct sta_info *sta;
 	struct ieee80211_hdr *hdr;
+	struct ieee80211_tx_control control;
 	bool result;
 
 	sdata = vif_to_sdata(info->control.vif);
@@ -2169,7 +2172,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
 		hdr = (struct ieee80211_hdr *)skb->data;
 		sta = sta_info_get(sdata, hdr->addr1);
 
-		result = __ieee80211_tx(local, &skbs, skb->len, sta, true);
+		result = __ieee80211_tx(local, &control, &skbs, skb->len, sta, true);
 	}
 
 	return result;
-- 
1.7.11.1



From shea.levy at logicblox.com  Fri Jul 13 21:54:08 2012
From: shea.levy at logicblox.com (Shea Levy)
Date: Fri, 13 Jul 2012 21:54:08 -0400
Subject: Macbook Pro 9,2 (mid-2012) bcm4331 not working on Linux 3.4
Message-ID: <5000D140.4020500@logicblox.com>

Hello,

With the firmware installed, udev doesn't autoload b43 and loading it 
manually does not create a new network interface. Is this interface 
supported?

Thanks,
Shea Levy

$ uname -a
Linux laptop.shealevy.com 3.4.4 #1 SMP Mon Jun 25 16:29:03 UTC 2012 
x86_64 GNU/Linux

$ sudo lspci -vvn|grep 43 -A7
02:00.0 0280: 14e4:4331 (rev 02)
         Subsystem: 14e4:4331
         Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- 
ParErr- Stepping- SERR- FastB2B- DisINTx-
         Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- 
<TAbort- <MAbort- >SERR- <PERR- INTx+
         Latency: 0, Cache Line Size: 256 bytes
         Interrupt: pin A routed to IRQ 0
         Region 0: Memory at a0600000 (64-bit, non-prefetchable) [size=16K]
         Capabilities: [40] Power Management version 3
                 Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA 
PME(D0-,D1-,D2-,D3hot-,D3cold-)

$ dmesg

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.4.4 (nixbld@) (gcc version 4.6.3 (GCC) ) #1 SMP Mon Jun 25 16:29:03 UTC 2012
[    0.000000] Command line: systemConfig=/nix/store/dsdlapl9d1fkskpyn99gv6kjgn6m9pgh-nixos-0.1pre-git init=/nix/store/dsdlapl9d1fkskpyn99gv6kjgn6m9pgh-nixos-0.1pre-git/init initrd=\efi\nixos\q3hiagpv9giqbhr95wq54fg088765apz-initrd-initrd
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000008e000 (usable)
[    0.000000]  BIOS-e820: 000000000008e000 - 0000000000090000 (reserved)
[    0.000000]  BIOS-e820: 0000000000090000 - 00000000000a0000 (usable)
[    0.000000]  BIOS-e820: 00000000000a0000 - 00000000000c0000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 0000000020000000 (usable)
[    0.000000]  BIOS-e820: 0000000020000000 - 0000000020200000 (reserved)
[    0.000000]  BIOS-e820: 0000000020200000 - 0000000040004000 (usable)
[    0.000000]  BIOS-e820: 0000000040004000 - 0000000040005000 (reserved)
[    0.000000]  BIOS-e820: 0000000040005000 - 000000008ad14000 (usable)
[    0.000000]  BIOS-e820: 000000008ad14000 - 000000008ad53000 (ACPI NVS)
[    0.000000]  BIOS-e820: 000000008ad53000 - 000000008ad69000 (usable)
[    0.000000]  BIOS-e820: 000000008ad69000 - 000000008ad8f000 (ACPI data)
[    0.000000]  BIOS-e820: 000000008ad8f000 - 000000008ae31000 (usable)
[    0.000000]  BIOS-e820: 000000008ae31000 - 000000008ae8f000 (reserved)
[    0.000000]  BIOS-e820: 000000008ae8f000 - 000000008aece000 (usable)
[    0.000000]  BIOS-e820: 000000008aece000 - 000000008aeff000 (reserved)
[    0.000000]  BIOS-e820: 000000008aeff000 - 000000008af92000 (usable)
[    0.000000]  BIOS-e820: 000000008af92000 - 000000008afff000 (reserved)
[    0.000000]  BIOS-e820: 000000008afff000 - 000000008b000000 (usable)
[    0.000000]  BIOS-e820: 000000008b000000 - 000000008fa00000 (reserved)
[    0.000000]  BIOS-e820: 00000000e00f8000 - 00000000e00f9000 (reserved)
[    0.000000]  BIOS-e820: 00000000fed1c000 - 00000000fed20000 (reserved)
[    0.000000]  BIOS-e820: 00000000ffe70000 - 00000000ffea0000 (reserved)
[    0.000000]  BIOS-e820: 0000000100000000 - 000000026f600000 (usable)
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] efi: EFI v1.10 by Apple
[    0.000000] efi:  ACPI=0x8ad8e000  ACPI 2.0=0x8ad8e014  SMBIOS=0x8ad1b000
[    0.000000] efi: mem00: type=7, attr=0x80000000000000f, range=[0x0000000000000000-0x000000000008e000) (0MB)
[    0.000000] efi: mem01: type=0, attr=0x80000000000000f, range=[0x000000000008e000-0x0000000000090000) (0MB)
[    0.000000] efi: mem02: type=2, attr=0x80000000000000f, range=[0x0000000000090000-0x000000000009a000) (0MB)
[    0.000000] efi: mem03: type=7, attr=0x80000000000000f, range=[0x000000000009a000-0x00000000000a0000) (0MB)
[    0.000000] efi: mem04: type=7, attr=0xf, range=[0x0000000000100000-0x0000000001000000) (15MB)
[    0.000000] efi: mem05: type=2, attr=0xf, range=[0x0000000001000000-0x0000000001c61000) (12MB)
[    0.000000] efi: mem06: type=7, attr=0xf, range=[0x0000000001c61000-0x0000000020000000) (483MB)
[    0.000000] efi: mem07: type=0, attr=0xf, range=[0x0000000020000000-0x0000000020200000) (2MB)
[    0.000000] efi: mem08: type=7, attr=0xf, range=[0x0000000020200000-0x0000000040004000) (510MB)
[    0.000000] efi: mem09: type=0, attr=0xf, range=[0x0000000040004000-0x0000000040005000) (0MB)
[    0.000000] efi: mem10: type=7, attr=0xf, range=[0x0000000040005000-0x000000007fb20000) (1019MB)
[    0.000000] efi: mem11: type=2, attr=0xf, range=[0x000000007fb20000-0x0000000080000000) (4MB)
[    0.000000] efi: mem12: type=7, attr=0xf, range=[0x0000000080000000-0x0000000082b55000) (43MB)
[    0.000000] efi: mem13: type=1, attr=0xf, range=[0x0000000082b55000-0x0000000082e23000) (2MB)
[    0.000000] efi: mem14: type=7, attr=0xf, range=[0x0000000082e23000-0x00000000830ee000) (2MB)
[    0.000000] efi: mem15: type=2, attr=0xf, range=[0x00000000830ee000-0x00000000830f0000) (0MB)
[    0.000000] efi: mem16: type=7, attr=0xf, range=[0x00000000830f0000-0x00000000830f1000) (0MB)
[    0.000000] efi: mem17: type=4, attr=0xf, range=[0x00000000830f1000-0x000000008818f000) (80MB)
[    0.000000] efi: mem18: type=3, attr=0xf, range=[0x000000008818f000-0x00000000882a6000) (1MB)
[    0.000000] efi: mem19: type=4, attr=0xf, range=[0x00000000882a6000-0x0000000088360000) (0MB)
[    0.000000] efi: mem20: type=3, attr=0xf, range=[0x0000000088360000-0x0000000088383000) (0MB)
[    0.000000] efi: mem21: type=4, attr=0xf, range=[0x0000000088383000-0x00000000883b0000) (0MB)
[    0.000000] efi: mem22: type=3, attr=0xf, range=[0x00000000883b0000-0x00000000883be000) (0MB)
[    0.000000] efi: mem23: type=4, attr=0xf, range=[0x00000000883be000-0x00000000883c5000) (0MB)
[    0.000000] efi: mem24: type=3, attr=0xf, range=[0x00000000883c5000-0x00000000883d3000) (0MB)
[    0.000000] efi: mem25: type=4, attr=0xf, range=[0x00000000883d3000-0x00000000883d8000) (0MB)
[    0.000000] efi: mem26: type=3, attr=0xf, range=[0x00000000883d8000-0x00000000883dd000) (0MB)
[    0.000000] efi: mem27: type=2, attr=0xf, range=[0x00000000883dd000-0x00000000883de000) (0MB)
[    0.000000] efi: mem28: type=4, attr=0xf, range=[0x00000000883de000-0x00000000883e1000) (0MB)
[    0.000000] efi: mem29: type=3, attr=0xf, range=[0x00000000883e1000-0x00000000883fa000) (0MB)
[    0.000000] efi: mem30: type=4, attr=0xf, range=[0x00000000883fa000-0x00000000883fc000) (0MB)
[    0.000000] efi: mem31: type=2, attr=0xf, range=[0x00000000883fc000-0x00000000883fd000) (0MB)
[    0.000000] efi: mem32: type=3, attr=0xf, range=[0x00000000883fd000-0x00000000883fe000) (0MB)
[    0.000000] efi: mem33: type=4, attr=0xf, range=[0x00000000883fe000-0x0000000088400000) (0MB)
[    0.000000] efi: mem34: type=3, attr=0xf, range=[0x0000000088400000-0x0000000088403000) (0MB)
[    0.000000] efi: mem35: type=4, attr=0xf, range=[0x0000000088403000-0x0000000088405000) (0MB)
[    0.000000] efi: mem36: type=3, attr=0xf, range=[0x0000000088405000-0x000000008840b000) (0MB)
[    0.000000] efi: mem37: type=4, attr=0xf, range=[0x000000008840b000-0x000000008840f000) (0MB)
[    0.000000] efi: mem38: type=3, attr=0xf, range=[0x000000008840f000-0x0000000088413000) (0MB)
[    0.000000] efi: mem39: type=4, attr=0xf, range=[0x0000000088413000-0x0000000088415000) (0MB)
[    0.000000] efi: mem40: type=3, attr=0xf, range=[0x0000000088415000-0x0000000088416000) (0MB)
[    0.000000] efi: mem41: type=2, attr=0xf, range=[0x0000000088416000-0x0000000088417000) (0MB)
[    0.000000] efi: mem42: type=4, attr=0xf, range=[0x0000000088417000-0x000000008841b000) (0MB)
[    0.000000] efi: mem43: type=3, attr=0xf, range=[0x000000008841b000-0x0000000088422000) (0MB)
[    0.000000] efi: mem44: type=4, attr=0xf, range=[0x0000000088422000-0x0000000088423000) (0MB)
[    0.000000] efi: mem45: type=2, attr=0xf, range=[0x0000000088423000-0x0000000088424000) (0MB)
[    0.000000] efi: mem46: type=4, attr=0xf, range=[0x0000000088424000-0x0000000088426000) (0MB)
[    0.000000] efi: mem47: type=3, attr=0xf, range=[0x0000000088426000-0x0000000088428000) (0MB)
[    0.000000] efi: mem48: type=4, attr=0xf, range=[0x0000000088428000-0x0000000088429000) (0MB)
[    0.000000] efi: mem49: type=3, attr=0xf, range=[0x0000000088429000-0x000000008843c000) (0MB)
[    0.000000] efi: mem50: type=4, attr=0xf, range=[0x000000008843c000-0x000000008843d000) (0MB)
[    0.000000] efi: mem51: type=3, attr=0xf, range=[0x000000008843d000-0x0000000088441000) (0MB)
[    0.000000] efi: mem52: type=4, attr=0xf, range=[0x0000000088441000-0x0000000088445000) (0MB)
[    0.000000] efi: mem53: type=3, attr=0xf, range=[0x0000000088445000-0x0000000088461000) (0MB)
[    0.000000] efi: mem54: type=4, attr=0xf, range=[0x0000000088461000-0x00000000884a6000) (0MB)
[    0.000000] efi: mem55: type=2, attr=0xf, range=[0x00000000884a6000-0x00000000884a7000) (0MB)
[    0.000000] efi: mem56: type=4, attr=0xf, range=[0x00000000884a7000-0x00000000884a8000) (0MB)
[    0.000000] efi: mem57: type=3, attr=0xf, range=[0x00000000884a8000-0x00000000884b1000) (0MB)
[    0.000000] efi: mem58: type=4, attr=0xf, range=[0x00000000884b1000-0x00000000884b3000) (0MB)
[    0.000000] efi: mem59: type=3, attr=0xf, range=[0x00000000884b3000-0x00000000884c1000) (0MB)
[    0.000000] efi: mem60: type=4, attr=0xf, range=[0x00000000884c1000-0x00000000884ca000) (0MB)
[    0.000000] efi: mem61: type=3, attr=0xf, range=[0x00000000884ca000-0x00000000884cf000) (0MB)
[    0.000000] efi: mem62: type=4, attr=0xf, range=[0x00000000884cf000-0x00000000884d0000) (0MB)
[    0.000000] efi: mem63: type=2, attr=0xf, range=[0x00000000884d0000-0x00000000884d1000) (0MB)
[    0.000000] efi: mem64: type=4, attr=0xf, range=[0x00000000884d1000-0x00000000884d2000) (0MB)
[    0.000000] efi: mem65: type=3, attr=0xf, range=[0x00000000884d2000-0x00000000884d3000) (0MB)
[    0.000000] efi: mem66: type=4, attr=0xf, range=[0x00000000884d3000-0x0000000088c3a000) (7MB)
[    0.000000] efi: mem67: type=3, attr=0xf, range=[0x0000000088c3a000-0x0000000088c3f000) (0MB)
[    0.000000] efi: mem68: type=4, attr=0xf, range=[0x0000000088c3f000-0x000000008958e000) (9MB)
[    0.000000] efi: mem69: type=2, attr=0xf, range=[0x000000008958e000-0x000000008958f000) (0MB)
[    0.000000] efi: mem70: type=4, attr=0xf, range=[0x000000008958f000-0x00000000895a8000) (0MB)
[    0.000000] efi: mem71: type=3, attr=0xf, range=[0x00000000895a8000-0x00000000895b0000) (0MB)
[    0.000000] efi: mem72: type=4, attr=0xf, range=[0x00000000895b0000-0x00000000895cb000) (0MB)
[    0.000000] efi: mem73: type=3, attr=0xf, range=[0x00000000895cb000-0x00000000895cd000) (0MB)
[    0.000000] efi: mem74: type=4, attr=0xf, range=[0x00000000895cd000-0x00000000895d5000) (0MB)
[    0.000000] efi: mem75: type=3, attr=0xf, range=[0x00000000895d5000-0x00000000895dc000) (0MB)
[    0.000000] efi: mem76: type=2, attr=0xf, range=[0x00000000895dc000-0x00000000895dd000) (0MB)
[    0.000000] efi: mem77: type=3, attr=0xf, range=[0x00000000895dd000-0x00000000895de000) (0MB)
[    0.000000] efi: mem78: type=4, attr=0xf, range=[0x00000000895de000-0x00000000895e0000) (0MB)
[    0.000000] efi: mem79: type=3, attr=0xf, range=[0x00000000895e0000-0x00000000895e1000) (0MB)
[    0.000000] efi: mem80: type=4, attr=0xf, range=[0x00000000895e1000-0x00000000895e3000) (0MB)
[    0.000000] efi: mem81: type=3, attr=0xf, range=[0x00000000895e3000-0x00000000895e8000) (0MB)
[    0.000000] efi: mem82: type=4, attr=0xf, range=[0x00000000895e8000-0x0000000089603000) (0MB)
[    0.000000] efi: mem83: type=3, attr=0xf, range=[0x0000000089603000-0x0000000089607000) (0MB)
[    0.000000] efi: mem84: type=4, attr=0xf, range=[0x0000000089607000-0x000000008960b000) (0MB)
[    0.000000] efi: mem85: type=2, attr=0xf, range=[0x000000008960b000-0x000000008960c000) (0MB)
[    0.000000] efi: mem86: type=4, attr=0xf, range=[0x000000008960c000-0x000000008960d000) (0MB)
[    0.000000] efi: mem87: type=3, attr=0xf, range=[0x000000008960d000-0x000000008960e000) (0MB)
[    0.000000] efi: mem88: type=4, attr=0xf, range=[0x000000008960e000-0x0000000089610000) (0MB)
[    0.000000] efi: mem89: type=3, attr=0xf, range=[0x0000000089610000-0x0000000089611000) (0MB)
[    0.000000] efi: mem90: type=4, attr=0xf, range=[0x0000000089611000-0x0000000089612000) (0MB)
[    0.000000] efi: mem91: type=3, attr=0xf, range=[0x0000000089612000-0x000000008961c000) (0MB)
[    0.000000] efi: mem92: type=4, attr=0xf, range=[0x000000008961c000-0x0000000089622000) (0MB)
[    0.000000] efi: mem93: type=3, attr=0xf, range=[0x0000000089622000-0x0000000089624000) (0MB)
[    0.000000] efi: mem94: type=2, attr=0xf, range=[0x0000000089624000-0x0000000089625000) (0MB)
[    0.000000] efi: mem95: type=4, attr=0xf, range=[0x0000000089625000-0x000000008963d000) (0MB)
[    0.000000] efi: mem96: type=3, attr=0xf, range=[0x000000008963d000-0x0000000089679000) (0MB)
[    0.000000] efi: mem97: type=4, attr=0xf, range=[0x0000000089679000-0x000000008968e000) (0MB)
[    0.000000] efi: mem98: type=3, attr=0xf, range=[0x000000008968e000-0x0000000089691000) (0MB)
[    0.000000] efi: mem99: type=4, attr=0xf, range=[0x0000000089691000-0x0000000089696000) (0MB)
[    0.000000] efi: mem100: type=2, attr=0xf, range=[0x0000000089696000-0x0000000089697000) (0MB)
[    0.000000] efi: mem101: type=4, attr=0xf, range=[0x0000000089697000-0x00000000896bf000) (0MB)
[    0.000000] efi: mem102: type=3, attr=0xf, range=[0x00000000896bf000-0x00000000896d7000) (0MB)
[    0.000000] efi: mem103: type=4, attr=0xf, range=[0x00000000896d7000-0x00000000896e5000) (0MB)
[    0.000000] efi: mem104: type=3, attr=0xf, range=[0x00000000896e5000-0x00000000896ef000) (0MB)
[    0.000000] efi: mem105: type=4, attr=0xf, range=[0x00000000896ef000-0x00000000896fd000) (0MB)
[    0.000000] efi: mem106: type=3, attr=0xf, range=[0x00000000896fd000-0x00000000896ff000) (0MB)
[    0.000000] efi: mem107: type=4, attr=0xf, range=[0x00000000896ff000-0x0000000089704000) (0MB)
[    0.000000] efi: mem108: type=3, attr=0xf, range=[0x0000000089704000-0x000000008971d000) (0MB)
[    0.000000] efi: mem109: type=4, attr=0xf, range=[0x000000008971d000-0x000000008971f000) (0MB)
[    0.000000] efi: mem110: type=3, attr=0xf, range=[0x000000008971f000-0x0000000089720000) (0MB)
[    0.000000] efi: mem111: type=2, attr=0xf, range=[0x0000000089720000-0x0000000089721000) (0MB)
[    0.000000] efi: mem112: type=4, attr=0xf, range=[0x0000000089721000-0x0000000089722000) (0MB)
[    0.000000] efi: mem113: type=3, attr=0xf, range=[0x0000000089722000-0x0000000089723000) (0MB)
[    0.000000] efi: mem114: type=4, attr=0xf, range=[0x0000000089723000-0x0000000089726000) (0MB)
[    0.000000] efi: mem115: type=3, attr=0xf, range=[0x0000000089726000-0x0000000089727000) (0MB)
[    0.000000] efi: mem116: type=2, attr=0xf, range=[0x0000000089727000-0x0000000089728000) (0MB)
[    0.000000] efi: mem117: type=4, attr=0xf, range=[0x0000000089728000-0x0000000089729000) (0MB)
[    0.000000] efi: mem118: type=3, attr=0xf, range=[0x0000000089729000-0x000000008972f000) (0MB)
[    0.000000] efi: mem119: type=4, attr=0xf, range=[0x000000008972f000-0x0000000089731000) (0MB)
[    0.000000] efi: mem120: type=3, attr=0xf, range=[0x0000000089731000-0x0000000089732000) (0MB)
[    0.000000] efi: mem121: type=4, attr=0xf, range=[0x0000000089732000-0x0000000089735000) (0MB)
[    0.000000] efi: mem122: type=3, attr=0xf, range=[0x0000000089735000-0x0000000089736000) (0MB)
[    0.000000] efi: mem123: type=4, attr=0xf, range=[0x0000000089736000-0x0000000089737000) (0MB)
[    0.000000] efi: mem124: type=3, attr=0xf, range=[0x0000000089737000-0x0000000089739000) (0MB)
[    0.000000] efi: mem125: type=2, attr=0xf, range=[0x0000000089739000-0x000000008973a000) (0MB)
[    0.000000] efi: mem126: type=4, attr=0xf, range=[0x000000008973a000-0x000000008973c000) (0MB)
[    0.000000] efi: mem127: type=3, attr=0xf, range=[0x000000008973c000-0x000000008973d000) (0MB)
[    0.000000] efi: mem128: type=4, attr=0xf, range=[0x000000008973d000-0x000000008973f000) (0MB)
[    0.000000] efi: mem129: type=3, attr=0xf, range=[0x000000008973f000-0x0000000089743000) (0MB)
[    0.000000] efi: mem130: type=4, attr=0xf, range=[0x0000000089743000-0x0000000089745000) (0MB)
[    0.000000] efi: mem131: type=3, attr=0xf, range=[0x0000000089745000-0x000000008974c000) (0MB)
[    0.000000] efi: mem132: type=2, attr=0xf, range=[0x000000008974c000-0x000000008974d000) (0MB)
[    0.000000] efi: mem133: type=4, attr=0xf, range=[0x000000008974d000-0x000000008974e000) (0MB)
[    0.000000] efi: mem134: type=3, attr=0xf, range=[0x000000008974e000-0x0000000089753000) (0MB)
[    0.000000] efi: mem135: type=4, attr=0xf, range=[0x0000000089753000-0x0000000089754000) (0MB)
[    0.000000] efi: mem136: type=3, attr=0xf, range=[0x0000000089754000-0x0000000089755000) (0MB)
[    0.000000] efi: mem137: type=4, attr=0xf, range=[0x0000000089755000-0x0000000089757000) (0MB)
[    0.000000] efi: mem138: type=3, attr=0xf, range=[0x0000000089757000-0x000000008975d000) (0MB)
[    0.000000] efi: mem139: type=4, attr=0xf, range=[0x000000008975d000-0x000000008975f000) (0MB)
[    0.000000] efi: mem140: type=3, attr=0xf, range=[0x000000008975f000-0x0000000089761000) (0MB)
[    0.000000] efi: mem141: type=4, attr=0xf, range=[0x0000000089761000-0x0000000089762000) (0MB)
[    0.000000] efi: mem142: type=2, attr=0xf, range=[0x0000000089762000-0x0000000089763000) (0MB)
[    0.000000] efi: mem143: type=3, attr=0xf, range=[0x0000000089763000-0x0000000089767000) (0MB)
[    0.000000] efi: mem144: type=4, attr=0xf, range=[0x0000000089767000-0x000000008976c000) (0MB)
[    0.000000] efi: mem145: type=2, attr=0xf, range=[0x000000008976c000-0x000000008976d000) (0MB)
[    0.000000] efi: mem146: type=4, attr=0xf, range=[0x000000008976d000-0x0000000089773000) (0MB)
[    0.000000] efi: mem147: type=3, attr=0xf, range=[0x0000000089773000-0x0000000089778000) (0MB)
[    0.000000] efi: mem148: type=4, attr=0xf, range=[0x0000000089778000-0x0000000089781000) (0MB)
[    0.000000] efi: mem149: type=3, attr=0xf, range=[0x0000000089781000-0x000000008979a000) (0MB)
[    0.000000] efi: mem150: type=4, attr=0xf, range=[0x000000008979a000-0x000000008979b000) (0MB)
[    0.000000] efi: mem151: type=3, attr=0xf, range=[0x000000008979b000-0x00000000897a0000) (0MB)
[    0.000000] efi: mem152: type=4, attr=0xf, range=[0x00000000897a0000-0x00000000897a3000) (0MB)
[    0.000000] efi: mem153: type=3, attr=0xf, range=[0x00000000897a3000-0x00000000897aa000) (0MB)
[    0.000000] efi: mem154: type=4, attr=0xf, range=[0x00000000897aa000-0x00000000897ac000) (0MB)
[    0.000000] efi: mem155: type=3, attr=0xf, range=[0x00000000897ac000-0x00000000897c0000) (0MB)
[    0.000000] efi: mem156: type=4, attr=0xf, range=[0x00000000897c0000-0x00000000897c1000) (0MB)
[    0.000000] efi: mem157: type=3, attr=0xf, range=[0x00000000897c1000-0x00000000897c5000) (0MB)
[    0.000000] efi: mem158: type=4, attr=0xf, range=[0x00000000897c5000-0x00000000897c9000) (0MB)
[    0.000000] efi: mem159: type=3, attr=0xf, range=[0x00000000897c9000-0x00000000897cd000) (0MB)
[    0.000000] efi: mem160: type=2, attr=0xf, range=[0x00000000897cd000-0x00000000897ce000) (0MB)
[    0.000000] efi: mem161: type=4, attr=0xf, range=[0x00000000897ce000-0x00000000897d4000) (0MB)
[    0.000000] efi: mem162: type=2, attr=0xf, range=[0x00000000897d4000-0x00000000897d5000) (0MB)
[    0.000000] efi: mem163: type=4, attr=0xf, range=[0x00000000897d5000-0x00000000897d6000) (0MB)
[    0.000000] efi: mem164: type=3, attr=0xf, range=[0x00000000897d6000-0x00000000897d9000) (0MB)
[    0.000000] efi: mem165: type=4, attr=0xf, range=[0x00000000897d9000-0x00000000897db000) (0MB)
[    0.000000] efi: mem166: type=3, attr=0xf, range=[0x00000000897db000-0x00000000897ed000) (0MB)
[    0.000000] efi: mem167: type=4, attr=0xf, range=[0x00000000897ed000-0x00000000897f4000) (0MB)
[    0.000000] efi: mem168: type=3, attr=0xf, range=[0x00000000897f4000-0x00000000897fb000) (0MB)
[    0.000000] efi: mem169: type=4, attr=0xf, range=[0x00000000897fb000-0x00000000897fc000) (0MB)
[    0.000000] efi: mem170: type=3, attr=0xf, range=[0x00000000897fc000-0x00000000897fe000) (0MB)
[    0.000000] efi: mem171: type=4, attr=0xf, range=[0x00000000897fe000-0x0000000089800000) (0MB)
[    0.000000] efi: mem172: type=2, attr=0xf, range=[0x0000000089800000-0x0000000089801000) (0MB)
[    0.000000] efi: mem173: type=4, attr=0xf, range=[0x0000000089801000-0x0000000089802000) (0MB)
[    0.000000] efi: mem174: type=3, attr=0xf, range=[0x0000000089802000-0x0000000089803000) (0MB)
[    0.000000] efi: mem175: type=4, attr=0xf, range=[0x0000000089803000-0x0000000089806000) (0MB)
[    0.000000] efi: mem176: type=3, attr=0xf, range=[0x0000000089806000-0x0000000089821000) (0MB)
[    0.000000] efi: mem177: type=4, attr=0xf, range=[0x0000000089821000-0x0000000089823000) (0MB)
[    0.000000] efi: mem178: type=3, attr=0xf, range=[0x0000000089823000-0x0000000089833000) (0MB)
[    0.000000] efi: mem179: type=4, attr=0xf, range=[0x0000000089833000-0x0000000089836000) (0MB)
[    0.000000] efi: mem180: type=2, attr=0xf, range=[0x0000000089836000-0x0000000089837000) (0MB)
[    0.000000] efi: mem181: type=4, attr=0xf, range=[0x0000000089837000-0x0000000089838000) (0MB)
[    0.000000] efi: mem182: type=3, attr=0xf, range=[0x0000000089838000-0x000000008983f000) (0MB)
[    0.000000] efi: mem183: type=4, attr=0xf, range=[0x000000008983f000-0x0000000089842000) (0MB)
[    0.000000] efi: mem184: type=3, attr=0xf, range=[0x0000000089842000-0x0000000089843000) (0MB)
[    0.000000] efi: mem185: type=4, attr=0xf, range=[0x0000000089843000-0x0000000089846000) (0MB)
[    0.000000] efi: mem186: type=2, attr=0xf, range=[0x0000000089846000-0x0000000089847000) (0MB)
[    0.000000] efi: mem187: type=4, attr=0xf, range=[0x0000000089847000-0x0000000089848000) (0MB)
[    0.000000] efi: mem188: type=3, attr=0xf, range=[0x0000000089848000-0x000000008984a000) (0MB)
[    0.000000] efi: mem189: type=4, attr=0xf, range=[0x000000008984a000-0x000000008984d000) (0MB)
[    0.000000] efi: mem190: type=3, attr=0xf, range=[0x000000008984d000-0x000000008984e000) (0MB)
[    0.000000] efi: mem191: type=4, attr=0xf, range=[0x000000008984e000-0x0000000089852000) (0MB)
[    0.000000] efi: mem192: type=3, attr=0xf, range=[0x0000000089852000-0x0000000089854000) (0MB)
[    0.000000] efi: mem193: type=4, attr=0xf, range=[0x0000000089854000-0x0000000089855000) (0MB)
[    0.000000] efi: mem194: type=3, attr=0xf, range=[0x0000000089855000-0x0000000089858000) (0MB)
[    0.000000] efi: mem195: type=4, attr=0xf, range=[0x0000000089858000-0x0000000089859000) (0MB)
[    0.000000] efi: mem196: type=3, attr=0xf, range=[0x0000000089859000-0x0000000089862000) (0MB)
[    0.000000] efi: mem197: type=4, attr=0xf, range=[0x0000000089862000-0x0000000089864000) (0MB)
[    0.000000] efi: mem198: type=3, attr=0xf, range=[0x0000000089864000-0x0000000089866000) (0MB)
[    0.000000] efi: mem199: type=2, attr=0xf, range=[0x0000000089866000-0x0000000089867000) (0MB)
[    0.000000] efi: mem200: type=4, attr=0xf, range=[0x0000000089867000-0x0000000089868000) (0MB)
[    0.000000] efi: mem201: type=2, attr=0xf, range=[0x0000000089868000-0x0000000089869000) (0MB)
[    0.000000] efi: mem202: type=4, attr=0xf, range=[0x0000000089869000-0x000000008986a000) (0MB)
[    0.000000] efi: mem203: type=3, attr=0xf, range=[0x000000008986a000-0x000000008986b000) (0MB)
[    0.000000] efi: mem204: type=4, attr=0xf, range=[0x000000008986b000-0x0000000089870000) (0MB)
[    0.000000] efi: mem205: type=3, attr=0xf, range=[0x0000000089870000-0x0000000089871000) (0MB)
[    0.000000] efi: mem206: type=4, attr=0xf, range=[0x0000000089871000-0x0000000089874000) (0MB)
[    0.000000] efi: mem207: type=3, attr=0xf, range=[0x0000000089874000-0x0000000089876000) (0MB)
[    0.000000] efi: mem208: type=4, attr=0xf, range=[0x0000000089876000-0x0000000089878000) (0MB)
[    0.000000] efi: mem209: type=2, attr=0xf, range=[0x0000000089878000-0x0000000089879000) (0MB)
[    0.000000] efi: mem210: type=4, attr=0xf, range=[0x0000000089879000-0x000000008987b000) (0MB)
[    0.000000] efi: mem211: type=3, attr=0xf, range=[0x000000008987b000-0x000000008987c000) (0MB)
[    0.000000] efi: mem212: type=4, attr=0xf, range=[0x000000008987c000-0x000000008987e000) (0MB)
[    0.000000] efi: mem213: type=3, attr=0xf, range=[0x000000008987e000-0x000000008987f000) (0MB)
[    0.000000] efi: mem214: type=4, attr=0xf, range=[0x000000008987f000-0x000000008988d000) (0MB)
[    0.000000] efi: mem215: type=3, attr=0xf, range=[0x000000008988d000-0x0000000089892000) (0MB)
[    0.000000] efi: mem216: type=4, attr=0xf, range=[0x0000000089892000-0x0000000089898000) (0MB)
[    0.000000] efi: mem217: type=2, attr=0xf, range=[0x0000000089898000-0x0000000089899000) (0MB)
[    0.000000] efi: mem218: type=4, attr=0xf, range=[0x0000000089899000-0x00000000898c0000) (0MB)
[    0.000000] efi: mem219: type=3, attr=0xf, range=[0x00000000898c0000-0x00000000898d2000) (0MB)
[    0.000000] efi: mem220: type=4, attr=0xf, range=[0x00000000898d2000-0x00000000898ed000) (0MB)
[    0.000000] efi: mem221: type=3, attr=0xf, range=[0x00000000898ed000-0x00000000898f0000) (0MB)
[    0.000000] efi: mem222: type=4, attr=0xf, range=[0x00000000898f0000-0x000000008991c000) (0MB)
[    0.000000] efi: mem223: type=3, attr=0xf, range=[0x000000008991c000-0x0000000089930000) (0MB)
[    0.000000] efi: mem224: type=4, attr=0xf, range=[0x0000000089930000-0x0000000089931000) (0MB)
[    0.000000] efi: mem225: type=2, attr=0xf, range=[0x0000000089931000-0x0000000089932000) (0MB)
[    0.000000] efi: mem226: type=4, attr=0xf, range=[0x0000000089932000-0x000000008994e000) (0MB)
[    0.000000] efi: mem227: type=3, attr=0xf, range=[0x000000008994e000-0x0000000089953000) (0MB)
[    0.000000] efi: mem228: type=4, attr=0xf, range=[0x0000000089953000-0x0000000089959000) (0MB)
[    0.000000] efi: mem229: type=2, attr=0xf, range=[0x0000000089959000-0x000000008995a000) (0MB)
[    0.000000] efi: mem230: type=4, attr=0xf, range=[0x000000008995a000-0x000000008995b000) (0MB)
[    0.000000] efi: mem231: type=3, attr=0xf, range=[0x000000008995b000-0x000000008995c000) (0MB)
[    0.000000] efi: mem232: type=4, attr=0xf, range=[0x000000008995c000-0x000000008995d000) (0MB)
[    0.000000] efi: mem233: type=3, attr=0xf, range=[0x000000008995d000-0x000000008995e000) (0MB)
[    0.000000] efi: mem234: type=4, attr=0xf, range=[0x000000008995e000-0x0000000089971000) (0MB)
[    0.000000] efi: mem235: type=3, attr=0xf, range=[0x0000000089971000-0x0000000089976000) (0MB)
[    0.000000] efi: mem236: type=4, attr=0xf, range=[0x0000000089976000-0x0000000089977000) (0MB)
[    0.000000] efi: mem237: type=3, attr=0xf, range=[0x0000000089977000-0x000000008997a000) (0MB)
[    0.000000] efi: mem238: type=4, attr=0xf, range=[0x000000008997a000-0x000000008997b000) (0MB)
[    0.000000] efi: mem239: type=3, attr=0xf, range=[0x000000008997b000-0x000000008998c000) (0MB)
[    0.000000] efi: mem240: type=4, attr=0xf, range=[0x000000008998c000-0x000000008998f000) (0MB)
[    0.000000] efi: mem241: type=3, attr=0xf, range=[0x000000008998f000-0x000000008999b000) (0MB)
[    0.000000] efi: mem242: type=2, attr=0xf, range=[0x000000008999b000-0x000000008999c000) (0MB)
[    0.000000] efi: mem243: type=4, attr=0xf, range=[0x000000008999c000-0x000000008999d000) (0MB)
[    0.000000] efi: mem244: type=3, attr=0xf, range=[0x000000008999d000-0x000000008999e000) (0MB)
[    0.000000] efi: mem245: type=2, attr=0xf, range=[0x000000008999e000-0x000000008999f000) (0MB)
[    0.000000] efi: mem246: type=4, attr=0xf, range=[0x000000008999f000-0x00000000899a0000) (0MB)
[    0.000000] efi: mem247: type=3, attr=0xf, range=[0x00000000899a0000-0x00000000899a3000) (0MB)
[    0.000000] efi: mem248: type=4, attr=0xf, range=[0x00000000899a3000-0x00000000899a4000) (0MB)
[    0.000000] efi: mem249: type=3, attr=0xf, range=[0x00000000899a4000-0x00000000899a6000) (0MB)
[    0.000000] efi: mem250: type=2, attr=0xf, range=[0x00000000899a6000-0x00000000899a7000) (0MB)
[    0.000000] efi: mem251: type=4, attr=0xf, range=[0x00000000899a7000-0x00000000899a8000) (0MB)
[    0.000000] efi: mem252: type=3, attr=0xf, range=[0x00000000899a8000-0x00000000899a9000) (0MB)
[    0.000000] efi: mem253: type=4, attr=0xf, range=[0x00000000899a9000-0x0000000089dca000) (4MB)
[    0.000000] efi: mem254: type=3, attr=0xf, range=[0x0000000089dca000-0x0000000089dcf000) (0MB)
[    0.000000] efi: mem255: type=4, attr=0xf, range=[0x0000000089dcf000-0x0000000089e57000) (0MB)
[    0.000000] efi: mem256: type=3, attr=0xf, range=[0x0000000089e57000-0x0000000089e5e000) (0MB)
[    0.000000] efi: mem257: type=4, attr=0xf, range=[0x0000000089e5e000-0x0000000089e5f000) (0MB)
[    0.000000] efi: mem258: type=2, attr=0xf, range=[0x0000000089e5f000-0x0000000089e60000) (0MB)
[    0.000000] efi: mem259: type=3, attr=0xf, range=[0x0000000089e60000-0x0000000089e61000) (0MB)
[    0.000000] efi: mem260: type=4, attr=0xf, range=[0x0000000089e61000-0x0000000089e62000) (0MB)
[    0.000000] efi: mem261: type=3, attr=0xf, range=[0x0000000089e62000-0x0000000089e67000) (0MB)
[    0.000000] efi: mem262: type=4, attr=0xf, range=[0x0000000089e67000-0x0000000089e68000) (0MB)
[    0.000000] efi: mem263: type=3, attr=0xf, range=[0x0000000089e68000-0x0000000089e69000) (0MB)
[    0.000000] efi: mem264: type=4, attr=0xf, range=[0x0000000089e69000-0x0000000089e6a000) (0MB)
[    0.000000] efi: mem265: type=3, attr=0xf, range=[0x0000000089e6a000-0x0000000089e6b000) (0MB)
[    0.000000] efi: mem266: type=4, attr=0xf, range=[0x0000000089e6b000-0x0000000089e6d000) (0MB)
[    0.000000] efi: mem267: type=3, attr=0xf, range=[0x0000000089e6d000-0x0000000089e6e000) (0MB)
[    0.000000] efi: mem268: type=4, attr=0xf, range=[0x0000000089e6e000-0x0000000089e93000) (0MB)
[    0.000000] efi: mem269: type=3, attr=0xf, range=[0x0000000089e93000-0x0000000089e94000) (0MB)
[    0.000000] efi: mem270: type=4, attr=0xf, range=[0x0000000089e94000-0x000000008a358000) (4MB)
[    0.000000] efi: mem271: type=2, attr=0xf, range=[0x000000008a358000-0x000000008a359000) (0MB)
[    0.000000] efi: mem272: type=4, attr=0xf, range=[0x000000008a359000-0x000000008acf7000) (9MB)
[    0.000000] efi: mem273: type=2, attr=0xf, range=[0x000000008acf7000-0x000000008acf8000) (0MB)
[    0.000000] efi: mem274: type=4, attr=0xf, range=[0x000000008acf8000-0x000000008acfa000) (0MB)
[    0.000000] efi: mem275: type=2, attr=0xf, range=[0x000000008acfa000-0x000000008acfb000) (0MB)
[    0.000000] efi: mem276: type=4, attr=0xf, range=[0x000000008acfb000-0x000000008ad03000) (0MB)
[    0.000000] efi: mem277: type=7, attr=0xf, range=[0x000000008ad03000-0x000000008ad14000) (0MB)
[    0.000000] efi: mem278: type=10, attr=0xf, range=[0x000000008ad14000-0x000000008ad53000) (0MB)
[    0.000000] efi: mem279: type=7, attr=0xf, range=[0x000000008ad53000-0x000000008ad69000) (0MB)
[    0.000000] efi: mem280: type=9, attr=0xf, range=[0x000000008ad69000-0x000000008ad8f000) (0MB)
[    0.000000] efi: mem281: type=7, attr=0xf, range=[0x000000008ad8f000-0x000000008ae31000) (0MB)
[    0.000000] efi: mem282: type=6, attr=0x800000000000000f, range=[0x000000008ae31000-0x000000008ae8f000) (0MB)
[    0.000000] efi: mem283: type=7, attr=0xf, range=[0x000000008ae8f000-0x000000008aece000) (0MB)
[    0.000000] efi: mem284: type=5, attr=0x800000000000000f, range=[0x000000008aece000-0x000000008aeff000) (0MB)
[    0.000000] efi: mem285: type=7, attr=0xf, range=[0x000000008aeff000-0x000000008af92000) (0MB)
[    0.000000] efi: mem286: type=0, attr=0xf, range=[0x000000008af92000-0x000000008afff000) (0MB)
[    0.000000] efi: mem287: type=2, attr=0xf, range=[0x000000008afff000-0x000000008b000000) (0MB)
[    0.000000] efi: mem288: type=7, attr=0xf, range=[0x0000000100000000-0x000000026f600000) (5878MB)
[    0.000000] efi: mem289: type=0, attr=0x8000000000000000, range=[0x00000000000a0000-0x00000000000c0000) (0MB)
[    0.000000] efi: mem290: type=0, attr=0x8000000000000000, range=[0x000000008b000000-0x000000008fa00000) (74MB)
[    0.000000] efi: mem291: type=11, attr=0x8000000000000000, range=[0x00000000e00f8000-0x00000000e00f9000) (0MB)
[    0.000000] efi: mem292: type=11, attr=0x8000000000000000, range=[0x00000000fed1c000-0x00000000fed20000) (0MB)
[    0.000000] efi: mem293: type=11, attr=0x8000000000000000, range=[0x00000000ffe70000-0x00000000ffea0000) (0MB)
[    0.000000] DMI 2.4 present.
[    0.000000] DMI: Apple Inc. MacBookPro9,2/Mac-6F01561E16C75D06, BIOS MBP91.88Z.00D3.B06.1205101904 05/10/2012
[    0.000000] e820 update range: 0000000000000000 - 0000000000010000 (usable) ==>  (reserved)
[    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
[    0.000000] No AGP bridge found
[    0.000000] last_pfn = 0x26f600 max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: write-back
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-BFFFF uncachable
[    0.000000]   C0000-DFFFF write-protect
[    0.000000]   E0000-FFFFF uncachable
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 base 0C0000000 mask FC0000000 uncachable
[    0.000000]   1 base 0A0000000 mask FE0000000 uncachable
[    0.000000]   2 base 090000000 mask FF0000000 uncachable
[    0.000000]   3 base 08C000000 mask FFC000000 uncachable
[    0.000000]   4 base 08B000000 mask FFF000000 uncachable
[    0.000000]   5 disabled
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000]   8 disabled
[    0.000000]   9 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] last_pfn = 0x8b000 max_arch_pfn = 0x400000000
[    0.000000] initial memory mapped : 0 - 20000000
[    0.000000] Base memory trampoline at [ffff88000009a000] 9a000 size 20480
[    0.000000] init_memory_mapping: 0000000000000000-000000008b000000
[    0.000000]  0000000000 - 008b000000 page 2M
[    0.000000] kernel direct mapping tables up to 8b000000 @ 1fffc000-20000000
[    0.000000] init_memory_mapping: 0000000100000000-000000026f600000
[    0.000000]  0100000000 - 026f600000 page 2M
[    0.000000] kernel direct mapping tables up to 26f600000 @ 8af87000-8af92000
[    0.000000] RAMDISK: 7fb20000 - 80000000
[    0.000000] ACPI: RSDP 000000008ad8e014 00024 (v02 APPLE )
[    0.000000] ACPI: XSDT 000000008ad8e1c0 000B4 (v01 APPLE   Apple00 00000000      01000013)
[    0.000000] ACPI: FACP 000000008ad8c000 000F4 (v04 APPLE   Apple00 00000000 Loki 0000005F)
[    0.000000] ACPI: DSDT 000000008ad82000 04D53 (v01 APPLE  MacBookP 00090001 INTL 20100915)
[    0.000000] ACPI: FACS 000000008ad1e000 00040
[    0.000000] ACPI: HPET 000000008ad8b000 00038 (v01 APPLE   Apple00 00000001 Loki 0000005F)
[    0.000000] ACPI: APIC 000000008ad8a000 000BC (v02 APPLE   Apple00 00000001 Loki 0000005F)
[    0.000000] ACPI: SBST 000000008ad88000 00030 (v01 APPLE   Apple00 00000001 Loki 0000005F)
[    0.000000] ACPI: ECDT 000000008ad87000 00053 (v01 APPLE   Apple00 00000001 Loki 0000005F)
[    0.000000] ACPI: SSDT 000000008ad7f000 002E0 (v01 APPLE  SataAhci 00001000 INTL 20100915)
[    0.000000] ACPI: SSDT 000000008ad7e000 00024 (v01 APPLE   SmcDppt 00001000 INTL 20100915)
[    0.000000] ACPI: SSDT 000000008ad79000 00D20 (v01 APPLE    UsbPpt 00001000 INTL 20100915)
[    0.000000] ACPI: SSDT 000000008ad77000 00159 (v02 APPLE     IGHda 00001000 INTL 20100915)
[    0.000000] ACPI: SSDT 000000008ad75000 00032 (v01 APPLE    SsdtS3 00001000 INTL 20100915)
[    0.000000] ACPI: SSDT 000000008ad73000 015EB (v02 APPLE  SsdtIGPU 00001000 INTL 20100915)
[    0.000000] ACPI: SSDT 000000008ad70000 00AE6 (v01 APPLE  TbtPEG10 00001000 INTL 20100915)
[    0.000000] ACPI: SSDT 000000008ad6d000 0073E (v01  PmRef  Cpu0Ist 00003000 INTL 20100915)
[    0.000000] ACPI: SSDT 000000008ad6c000 00B3D (v01  PmRef    CpuPm 00003000 INTL 20100915)
[    0.000000] ACPI: SSDT 000000008ad6b000 00315 (v01  PmRef  Cpu0Tst 00003000 INTL 20100915)
[    0.000000] ACPI: SSDT 000000008ad6a000 0037A (v01  PmRef    ApTst 00003000 INTL 20100915)
[    0.000000] ACPI: DMAR 000000008ad69000 000B8 (v01 APPLE      IVB  00000001 AAPL 00000001)
[    0.000000] ACPI: MCFG 000000008ad89000 0003C (v01 APPLE   Apple00 00000001 Loki 0000005F)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at 0000000000000000-000000026f600000
[    0.000000] Initmem setup node 0 0000000000000000-000000026f600000
[    0.000000]   NODE_DATA [000000026f5fc000 - 000000026f5fffff]
[    0.000000]  [ffffea0000000000-ffffea0009bfffff] PMD ->  [ffff880266c00000-ffff88026ebfffff] on node 0
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000010 ->  0x00001000
[    0.000000]   DMA32    0x00001000 ->  0x00100000
[    0.000000]   Normal   0x00100000 ->  0x0026f600
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000010 ->  0x0000008e
[    0.000000]     0: 0x00000090 ->  0x000000a0
[    0.000000]     0: 0x00000100 ->  0x00020000
[    0.000000]     0: 0x00020200 ->  0x00040004
[    0.000000]     0: 0x00040005 ->  0x0008ad14
[    0.000000]     0: 0x0008ad53 ->  0x0008ad69
[    0.000000]     0: 0x0008ad8f ->  0x0008ae31
[    0.000000]     0: 0x0008ae8f ->  0x0008aece
[    0.000000]     0: 0x0008aeff ->  0x0008af92
[    0.000000]     0: 0x0008afff ->  0x0008b000
[    0.000000]     0: 0x00100000 ->  0x0026f600
[    0.000000] On node 0 totalpages: 2073132
[    0.000000]   DMA zone: 64 pages used for memmap
[    0.000000]   DMA zone: 10 pages reserved
[    0.000000]   DMA zone: 3908 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 16320 pages used for memmap
[    0.000000]   DMA32 zone: 548062 pages, LIFO batch:31
[    0.000000]   Normal zone: 23512 pages used for memmap
[    0.000000]   Normal zone: 1481256 pages, LIFO batch:31
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x02] lapic_id[0x02] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x03] lapic_id[0x01] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x04] lapic_id[0x03] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x05] lapic_id[0xff] disabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x06] lapic_id[0xff] disabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x07] lapic_id[0xff] disabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x08] lapic_id[0xff] disabled)
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x08] high edge lint[0x1])
[    0.000000] ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.000000] SMP: Allowing 8 CPUs, 4 hotplug CPUs
[    0.000000] nr_irqs_gsi: 40
[    0.000000] PM: Registered nosave memory: 000000000008e000 - 0000000000090000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000c0000
[    0.000000] PM: Registered nosave memory: 00000000000c0000 - 0000000000100000
[    0.000000] PM: Registered nosave memory: 0000000020000000 - 0000000020200000
[    0.000000] PM: Registered nosave memory: 0000000040004000 - 0000000040005000
[    0.000000] PM: Registered nosave memory: 000000008ad14000 - 000000008ad53000
[    0.000000] PM: Registered nosave memory: 000000008ad69000 - 000000008ad8f000
[    0.000000] PM: Registered nosave memory: 000000008ae31000 - 000000008ae8f000
[    0.000000] PM: Registered nosave memory: 000000008aece000 - 000000008aeff000
[    0.000000] PM: Registered nosave memory: 000000008af92000 - 000000008afff000
[    0.000000] PM: Registered nosave memory: 000000008b000000 - 000000008fa00000
[    0.000000] PM: Registered nosave memory: 000000008fa00000 - 00000000e00f8000
[    0.000000] PM: Registered nosave memory: 00000000e00f8000 - 00000000e00f9000
[    0.000000] PM: Registered nosave memory: 00000000e00f9000 - 00000000fed1c000
[    0.000000] PM: Registered nosave memory: 00000000fed1c000 - 00000000fed20000
[    0.000000] PM: Registered nosave memory: 00000000fed20000 - 00000000ffe70000
[    0.000000] PM: Registered nosave memory: 00000000ffe70000 - 00000000ffea0000
[    0.000000] PM: Registered nosave memory: 00000000ffea0000 - 0000000100000000
[    0.000000] Allocating PCI resources starting at 8fa00000 (gap: 8fa00000:506f8000)
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64 nr_cpu_ids:8 nr_node_ids:1
[    0.000000] PERCPU: Embedded 27 pages/cpu @ffff88026f200000 s80960 r8192 d21440 u262144
[    0.000000] pcpu-alloc: s80960 r8192 d21440 u262144 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1 2 3 4 5 6 7
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 2033226
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: systemConfig=/nix/store/dsdlapl9d1fkskpyn99gv6kjgn6m9pgh-nixos-0.1pre-git init=/nix/store/dsdlapl9d1fkskpyn99gv6kjgn6m9pgh-nixos-0.1pre-git/init initrd=\efi\nixos\q3hiagpv9giqbhr95wq54fg088765apz-initrd-initrd
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] xsave/xrstor: enabled xstate_bv 0x7, cntxt size 0x340
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Calgary: detecting Calgary via BIOS EBDA area
[    0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
[    0.000000] Memory: 7953932k/10213376k available (3924k kernel code, 1920848k absent, 338596k reserved, 2814k data, 700k init)
[    0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0, CPUs=8, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:4352 nr_irqs:744 16
[    0.000000] Extended CMOS year: 2000
[    0.000000] Console: colour dummy device 80x25
[    0.000000] console [tty0] enabled
[    0.000000] allocated 33554432 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't want memory cgroups
[    0.000000] hpet clockevent registered
[    0.000000] Fast TSC calibration using PIT
[    0.001000] Detected 2893.340 MHz processor.
[    0.000002] Calibrating delay loop (skipped), value calculated using timer frequency.. 5786.68 BogoMIPS (lpj=2893340)
[    0.000014] pid_max: default: 32768 minimum: 301
[    0.000068] init_memory_mapping: 000000008b000000-000000008fa00000
[    0.000071]  008b000000 - 008fa00000 page 2M
[    0.025510] Security Framework initialized
[    0.025515] SELinux:  Disabled at boot.
[    0.025902] Dentry cache hash table entries: 1048576 (order: 11, 8388608 bytes)
[    0.027596] Inode-cache hash table entries: 524288 (order: 10, 4194304 bytes)
[    0.028345] Mount-cache hash table entries: 256
[    0.028457] Initializing cgroup subsys cpuacct
[    0.028460] Initializing cgroup subsys memory
[    0.028465] Initializing cgroup subsys devices
[    0.028467] Initializing cgroup subsys freezer
[    0.028470] Initializing cgroup subsys blkio
[    0.028491] CPU: Physical Processor ID: 0
[    0.028493] CPU: Processor Core ID: 0
[    0.028801] mce: CPU supports 7 MCE banks
[    0.028811] CPU0: Thermal monitoring enabled (TM1)
[    0.028817] using mwait in idle threads.
[    0.029580] ACPI: Core revision 20120320
[    0.034510] ftrace: allocating 15883 entries in 63 pages
[    0.040875] DMAR: Host address width 36
[    0.040877] DMAR: DRHD base: 0x000000fed90000 flags: 0x0
[    0.040883] IOMMU 0: reg_base_addr fed90000 ver 1:0 cap c0000020e60262 ecap f0101a
[    0.040886] DMAR: DRHD base: 0x000000fed91000 flags: 0x1
[    0.040892] IOMMU 1: reg_base_addr fed91000 ver 1:0 cap c9008020660262 ecap f0105a
[    0.040895] DMAR: RMRR base: 0x0000003e2e0000 end: 0x0000003e2fffff
[    0.040897] DMAR: RMRR base: 0x0000008b800000 end: 0x0000008f9fffff
[    0.041418] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.051395] CPU0: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz stepping 09
[    0.152618] Performance Events: PEBS fmt1+, generic architected perfmon, Intel PMU driver.
[    0.152624] ... version:                3
[    0.152626] ... bit width:              48
[    0.152627] ... generic registers:      4
[    0.152629] ... value mask:             0000ffffffffffff
[    0.152631] ... max period:             000000007fffffff
[    0.152633] ... fixed-purpose events:   3
[    0.152634] ... event mask:             000000070000000f
[    0.152723] Booting Node   0, Processors  #1 #2 #3
[    0.193274] Brought up 4 CPUs
[    0.193279] Total of 4 processors activated (23146.72 BogoMIPS).
[    0.196612] devtmpfs: initialized
[    0.196716] PM: Registering ACPI NVS region [mem 0x8ad14000-0x8ad52fff] (258048 bytes)
[    0.197317] dummy:
[    0.197361] NET: Registered protocol family 16
[    0.197541] ACPI: bus type pci registered
[    0.197624] PCI: MMCONFIG for domain 0000 [bus 00-9a] at [mem 0xe0000000-0xe9afffff] (base 0xe0000000)
[    0.197628] PCI: not using MMCONFIG
[    0.197630] PCI: Using configuration type 1 for base access
[    0.198441] bio: create slab<bio-0>  at 0
[    0.198501] ACPI: Added _OSI(Module Device)
[    0.198503] ACPI: Added _OSI(Processor Device)
[    0.198505] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.198507] ACPI: Added _OSI(Processor Aggregator Device)
[    0.199442] ACPI: EC: EC description table is found, configuring boot EC
[    0.202912] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    2.197325] ACPI Exception: AE_ERROR, Returned by Handler for [PCI_Config] (20120320/evregion-501)
[    2.197339] ACPI Error: Method parse/execution failed [\_SB_.PCI0.ZYXW] (Node ffff88026387fb68), AE_ERROR (20120320/psparse-536)
[    2.197362] ACPI Error: Method parse/execution failed [\_SB_._INI] (Node ffff88026385afa0), AE_ERROR (20120320/psparse-536)
[    2.197667] ACPI: SSDT 000000008ad19190 008AD (v01  PmRef  Cpu0Cst 00003001 INTL 20100915)
[    2.197910] ACPI: Dynamic OEM Table Load:
[    2.197913] ACPI: SSDT           (null) 008AD (v01  PmRef  Cpu0Cst 00003001 INTL 20100915)
[    2.200488] ACPI: SSDT 000000008ad1a710 003A4 (v01  PmRef    ApIst 00003000 INTL 20100915)
[    2.200757] ACPI: Dynamic OEM Table Load:
[    2.200760] ACPI: SSDT           (null) 003A4 (v01  PmRef    ApIst 00003000 INTL 20100915)
[    2.203385] ACPI: SSDT 000000008ad18d90 00119 (v01  PmRef    ApCst 00003000 INTL 20100915)
[    2.203621] ACPI: Dynamic OEM Table Load:
[    2.203623] ACPI: SSDT           (null) 00119 (v01  PmRef    ApCst 00003000 INTL 20100915)
[    2.206653] ACPI: Interpreter enabled
[    2.206657] ACPI: (supports S0 S3 S4 S5)
[    2.206671] ACPI: Using IOAPIC for interrupt routing
[    2.206684] PCI: MMCONFIG for domain 0000 [bus 00-9a] at [mem 0xe0000000-0xe9afffff] (base 0xe0000000)
[    2.206954] PCI: MMCONFIG at [mem 0xe0000000-0xe9afffff] reserved in ACPI motherboard resources
[    2.246817] ACPI: EC: GPE = 0x17, I/O: command/status = 0x66, data = 0x62
[    2.246940] ACPI: No dock devices found.
[    2.246944] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    2.247067] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    2.247210] pci_root PNP0A08:00: host bridge window [io  0x0000-0x0cf7]
[    2.247213] pci_root PNP0A08:00: host bridge window [io  0x0d00-0xffff]
[    2.247216] pci_root PNP0A08:00: host bridge window [mem 0x000a0000-0x000bffff]
[    2.247219] pci_root PNP0A08:00: host bridge window [mem 0x000c0000-0x000c3fff]
[    2.247221] pci_root PNP0A08:00: host bridge window [mem 0x000c4000-0x000c7fff]
[    2.247224] pci_root PNP0A08:00: host bridge window [mem 0x000c8000-0x000cbfff]
[    2.247227] pci_root PNP0A08:00: host bridge window [mem 0x000cc000-0x000cffff]
[    2.247229] pci_root PNP0A08:00: host bridge window [mem 0x000d0000-0x000d3fff]
[    2.247232] pci_root PNP0A08:00: host bridge window [mem 0x000d4000-0x000d7fff]
[    2.247235] pci_root PNP0A08:00: host bridge window [mem 0x000d8000-0x000dbfff]
[    2.247237] pci_root PNP0A08:00: host bridge window [mem 0x000dc000-0x000dffff]
[    2.247240] pci_root PNP0A08:00: host bridge window [mem 0x000e0000-0x000e3fff]
[    2.247243] pci_root PNP0A08:00: host bridge window [mem 0x000e4000-0x000e7fff]
[    2.247246] pci_root PNP0A08:00: host bridge window [mem 0x000e8000-0x000ebfff]
[    2.247248] pci_root PNP0A08:00: host bridge window [mem 0x000ec000-0x000effff]
[    2.247251] pci_root PNP0A08:00: host bridge window [mem 0x000f0000-0x000fffff]
[    2.247254] pci_root PNP0A08:00: host bridge window [mem 0x8fa00000-0xfeafffff]
[    2.247256] pci_root PNP0A08:00: host bridge window [mem 0xfed40000-0xfed44fff]
[    2.247291] PCI host bridge to bus 0000:00
[    2.247295] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7]
[    2.247297] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff]
[    2.247299] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
[    2.247302] pci_bus 0000:00: root bus resource [mem 0x000c0000-0x000c3fff]
[    2.247304] pci_bus 0000:00: root bus resource [mem 0x000c4000-0x000c7fff]
[    2.247307] pci_bus 0000:00: root bus resource [mem 0x000c8000-0x000cbfff]
[    2.247309] pci_bus 0000:00: root bus resource [mem 0x000cc000-0x000cffff]
[    2.247311] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff]
[    2.247314] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff]
[    2.247316] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff]
[    2.247319] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff]
[    2.247321] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e3fff]
[    2.247323] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff]
[    2.247326] pci_bus 0000:00: root bus resource [mem 0x000e8000-0x000ebfff]
[    2.247328] pci_bus 0000:00: root bus resource [mem 0x000ec000-0x000effff]
[    2.247331] pci_bus 0000:00: root bus resource [mem 0x000f0000-0x000fffff]
[    2.247333] pci_bus 0000:00: root bus resource [mem 0x8fa00000-0xfeafffff]
[    2.247336] pci_bus 0000:00: root bus resource [mem 0xfed40000-0xfed44fff]
[    2.247343] pci 0000:00:00.0: [8086:0154] type 00 class 0x060000
[    2.247380] pci 0000:00:01.0: [8086:0151] type 01 class 0x060400
[    2.247447] pci 0000:00:01.0: PME# supported from D0 D3hot D3cold
[    2.247471] pci 0000:00:02.0: [8086:0166] type 00 class 0x030000
[    2.247479] pci 0000:00:02.0: reg 10: [mem 0xa0000000-0xa03fffff 64bit]
[    2.247484] pci 0000:00:02.0: reg 18: [mem 0x90000000-0x9fffffff 64bit pref]
[    2.247488] pci 0000:00:02.0: reg 20: [io  0x2000-0x203f]
[    2.247532] pci 0000:00:14.0: [8086:1e31] type 00 class 0x0c0330
[    2.247553] pci 0000:00:14.0: reg 10: [mem 0xa0800000-0xa080ffff 64bit]
[    2.247620] pci 0000:00:14.0: PME# supported from D3hot D3cold
[    2.247641] pci 0000:00:16.0: [8086:1e3a] type 00 class 0x078000
[    2.247663] pci 0000:00:16.0: reg 10: [mem 0xa0817100-0xa081710f 64bit]
[    2.247735] pci 0000:00:16.0: PME# supported from D0 D3hot D3cold
[    2.247766] pci 0000:00:1a.0: [8086:1e2d] type 00 class 0x0c0320
[    2.247786] pci 0000:00:1a.0: reg 10: [mem 0xa0816c00-0xa0816fff]
[    2.247871] pci 0000:00:1a.0: PME# supported from D0 D3hot D3cold
[    2.247895] pci 0000:00:1b.0: [8086:1e20] type 00 class 0x040300
[    2.247909] pci 0000:00:1b.0: reg 10: [mem 0xa0810000-0xa0813fff 64bit]
[    2.247976] pci 0000:00:1b.0: PME# supported from D0 D3hot D3cold
[    2.247996] pci 0000:00:1c.0: [8086:1e10] type 01 class 0x060400
[    2.248071] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    2.248093] pci 0000:00:1c.1: [8086:1e12] type 01 class 0x060400
[    2.248169] pci 0000:00:1c.1: PME# supported from D0 D3hot D3cold
[    2.248192] pci 0000:00:1c.2: [8086:1e14] type 01 class 0x060400
[    2.248267] pci 0000:00:1c.2: PME# supported from D0 D3hot D3cold
[    2.248297] pci 0000:00:1d.0: [8086:1e26] type 00 class 0x0c0320
[    2.248317] pci 0000:00:1d.0: reg 10: [mem 0xa0816800-0xa0816bff]
[    2.248402] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    2.248425] pci 0000:00:1f.0: [8086:1e57] type 00 class 0x060100
[    2.248542] pci 0000:00:1f.2: [8086:1e03] type 00 class 0x010601
[    2.248559] pci 0000:00:1f.2: reg 10: [io  0x2098-0x209f]
[    2.248567] pci 0000:00:1f.2: reg 14: [io  0x20bc-0x20bf]
[    2.248574] pci 0000:00:1f.2: reg 18: [io  0x2090-0x2097]
[    2.248582] pci 0000:00:1f.2: reg 1c: [io  0x20b8-0x20bb]
[    2.248589] pci 0000:00:1f.2: reg 20: [io  0x2060-0x207f]
[    2.248597] pci 0000:00:1f.2: reg 24: [mem 0xa0816000-0xa08167ff]
[    2.248639] pci 0000:00:1f.2: PME# supported from D3hot
[    2.248655] pci 0000:00:1f.3: [8086:1e22] type 00 class 0x0c0500
[    2.248669] pci 0000:00:1f.3: reg 10: [mem 0xa0817000-0xa08170ff 64bit]
[    2.248689] pci 0000:00:1f.3: reg 20: [io  0xefa0-0xefbf]
[    2.248755] pci 0000:00:01.0: PCI bridge to [bus 04-9a]
[    2.248758] pci 0000:00:01.0:   bridge window [io  0x3000-0x5fff]
[    2.248761] pci 0000:00:01.0:   bridge window [mem 0xa0900000-0xacbfffff]
[    2.248766] pci 0000:00:01.0:   bridge window [mem 0xacc00000-0xb8bfffff 64bit pref]
[    2.248872] pci 0000:01:00.0: [14e4:16b4] type 00 class 0x020000
[    2.248908] pci 0000:01:00.0: reg 10: [mem 0xa0400000-0xa040ffff 64bit pref]
[    2.248937] pci 0000:01:00.0: reg 18: [mem 0xa0410000-0xa041ffff 64bit pref]
[    2.249088] pci 0000:01:00.0: PME# supported from D0 D3hot D3cold
[    2.249157] pci 0000:01:00.1: [14e4:16bc] type 00 class 0x080501
[    2.249194] pci 0000:01:00.1: reg 10: [mem 0xa0420000-0xa042ffff 64bit pref]
[    2.249369] pci 0000:01:00.1: PME# supported from D0 D3hot D3cold
[    2.251028] pci 0000:00:1c.0: PCI bridge to [bus 01-01]
[    2.251034] pci 0000:00:1c.0:   bridge window [mem 0xa0700000-0xa07fffff]
[    2.251041] pci 0000:00:1c.0:   bridge window [mem 0xa0400000-0xa04fffff 64bit pref]
[    2.251112] pci 0000:02:00.0: [14e4:4331] type 00 class 0x028000
[    2.251140] pci 0000:02:00.0: reg 10: [mem 0xa0600000-0xa0603fff 64bit]
[    2.251298] pci 0000:02:00.0: supports D1 D2
[    2.252978] pci 0000:00:1c.1: PCI bridge to [bus 02-02]
[    2.252991] pci 0000:00:1c.1:   bridge window [mem 0xa0600000-0xa06fffff]
[    2.253086] pci 0000:03:00.0: [11c1:5901] type 00 class 0x0c0010
[    2.253123] pci 0000:03:00.0: reg 10: [mem 0xa0500000-0xa0500fff 64bit]
[    2.253306] pci 0000:03:00.0: supports D1 D2
[    2.253308] pci 0000:03:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    2.254969] pci 0000:00:1c.2: PCI bridge to [bus 03-03]
[    2.254983] pci 0000:00:1c.2:   bridge window [mem 0xa0500000-0xa05fffff]
[    2.255024] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    2.255087] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.P0P2._PRT]
[    2.255118] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP01._PRT]
[    2.255141] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP02._PRT]
[    2.255161] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP03._PRT]
[    2.255225]  pci0000:00: Requesting ACPI _OSC control (0x1d)
[    2.255292]  pci0000:00: ACPI _OSC control (0x1d) granted
[    2.257117] ACPI: PCI Interrupt Link [LNKA] (IRQs 1 3 4 5 6 7 10 12 14 15) *0, disabled.
[    2.257154] ACPI: PCI Interrupt Link [LNKB] (IRQs 1 3 4 5 6 7 11 12 14 15) *0, disabled.
[    2.257185] ACPI: PCI Interrupt Link [LNKC] (IRQs 1 3 4 5 6 7 10 12 14 15) *0, disabled.
[    2.257216] ACPI: PCI Interrupt Link [LNKD] (IRQs 1 3 4 5 6 7 11 12 14 15) *0, disabled.
[    2.257246] ACPI: PCI Interrupt Link [LNKE] (IRQs 1 3 4 5 6 7 10 12 14 15) *0, disabled.
[    2.257276] ACPI: PCI Interrupt Link [LNKF] (IRQs 1 3 4 5 6 7 11 12 14 15) *0, disabled.
[    2.257307] ACPI: PCI Interrupt Link [LNKG] (IRQs 1 3 4 5 6 7 10 12 14 15) *0, disabled.
[    2.257337] ACPI: PCI Interrupt Link [LNKH] (IRQs 1 3 4 5 6 7 11 12 14 15) *0, disabled.
[    2.257462] vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
[    2.257468] vgaarb: loaded
[    2.257469] vgaarb: bridge control possible 0000:00:02.0
[    2.257519] PCI: Using ACPI for IRQ routing
[    2.261747] PCI: pci_cache_line_size set to 64 bytes
[    2.261879] reserve RAM buffer: 000000000008e000 - 000000000008ffff
[    2.261881] reserve RAM buffer: 0000000040004000 - 0000000043ffffff
[    2.261882] reserve RAM buffer: 000000008ad14000 - 000000008bffffff
[    2.261884] reserve RAM buffer: 000000008ad69000 - 000000008bffffff
[    2.261886] reserve RAM buffer: 000000008ae31000 - 000000008bffffff
[    2.261888] reserve RAM buffer: 000000008aece000 - 000000008bffffff
[    2.261890] reserve RAM buffer: 000000008af92000 - 000000008bffffff
[    2.261891] reserve RAM buffer: 000000008b000000 - 000000008bffffff
[    2.261893] reserve RAM buffer: 000000026f600000 - 000000026fffffff
[    2.261996] NetLabel: Initializing
[    2.261998] NetLabel:  domain hash size = 128
[    2.262000] NetLabel:  protocols = UNLABELED CIPSOv4
[    2.262007] NetLabel:  unlabeled traffic allowed by default
[    2.262020] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0, 0, 0, 0, 0, 0
[    2.262026] hpet0: 8 comparators, 64-bit 14.318180 MHz counter
[    2.265039] Switching to clocksource hpet
[    2.268205] pnp: PnP ACPI init
[    2.268217] ACPI: bus type pnp registered
[    2.268319] pnp 00:00: [bus 00-ff]
[    2.268321] pnp 00:00: [io  0x0000-0x0cf7 window]
[    2.268323] pnp 00:00: [io  0x0cf8-0x0cff]
[    2.268324] pnp 00:00: [io  0x0d00-0xffff window]
[    2.268325] pnp 00:00: [mem 0x000a0000-0x000bffff window]
[    2.268327] pnp 00:00: [mem 0x000c0000-0x000c3fff window]
[    2.268328] pnp 00:00: [mem 0x000c4000-0x000c7fff window]
[    2.268329] pnp 00:00: [mem 0x000c8000-0x000cbfff window]
[    2.268332] pnp 00:00: [mem 0x000cc000-0x000cffff window]
[    2.268333] pnp 00:00: [mem 0x000d0000-0x000d3fff window]
[    2.268334] pnp 00:00: [mem 0x000d4000-0x000d7fff window]
[    2.268336] pnp 00:00: [mem 0x000d8000-0x000dbfff window]
[    2.268337] pnp 00:00: [mem 0x000dc000-0x000dffff window]
[    2.268338] pnp 00:00: [mem 0x000e0000-0x000e3fff window]
[    2.268339] pnp 00:00: [mem 0x000e4000-0x000e7fff window]
[    2.268341] pnp 00:00: [mem 0x000e8000-0x000ebfff window]
[    2.268342] pnp 00:00: [mem 0x000ec000-0x000effff window]
[    2.268343] pnp 00:00: [mem 0x000f0000-0x000fffff window]
[    2.268345] pnp 00:00: [mem 0x8fa00000-0xfeafffff window]
[    2.268346] pnp 00:00: [mem 0xfed40000-0xfed44fff window]
[    2.268419] pnp 00:00: Plug and Play ACPI device, IDs PNP0a08 PNP0a03 (active)
[    2.268471] pnp 00:01: [io  0x0000-0x001f]
[    2.268472] pnp 00:01: [io  0x0081-0x0091]
[    2.268473] pnp 00:01: [io  0x0093-0x009f]
[    2.268474] pnp 00:01: [io  0x00c0-0x00df]
[    2.268476] pnp 00:01: [dma 4]
[    2.268514] pnp 00:01: Plug and Play ACPI device, IDs PNP0200 (active)
[    2.268520] pnp 00:02: [mem 0xff000000-0xffffffff]
[    2.268558] pnp 00:02: Plug and Play ACPI device, IDs INT0800 (active)
[    2.268611] pnp 00:03: [irq 0 disabled]
[    2.268618] pnp 00:03: [irq 8]
[    2.268619] pnp 00:03: [mem 0xfed00000-0xfed003ff]
[    2.268670] system 00:03: [mem 0xfed00000-0xfed003ff] has been reserved
[    2.268674] system 00:03: Plug and Play ACPI device, IDs PNP0103 PNP0c01 (active)
[    2.268681] pnp 00:04: [io  0x00f0]
[    2.268685] pnp 00:04: [irq 13]
[    2.268727] pnp 00:04: Plug and Play ACPI device, IDs PNP0c04 (active)
[    2.268734] pnp 00:05: [io  0x002e-0x002f]
[    2.268735] pnp 00:05: [io  0x004e-0x004f]
[    2.268736] pnp 00:05: [io  0x0061]
[    2.268737] pnp 00:05: [io  0x0063]
[    2.268738] pnp 00:05: [io  0x0065]
[    2.268739] pnp 00:05: [io  0x0067]
[    2.268740] pnp 00:05: [io  0x0080]
[    2.268741] pnp 00:05: [io  0x0092]
[    2.268742] pnp 00:05: [io  0x00b2-0x00b3]
[    2.268743] pnp 00:05: [io  0x1000-0x100f]
[    2.268744] pnp 00:05: [io  0x0400-0x047f]
[    2.268745] pnp 00:05: [io  0x0500-0x057f]
[    2.268792] system 00:05: [io  0x1000-0x100f] has been reserved
[    2.268796] system 00:05: [io  0x0400-0x047f] has been reserved
[    2.268798] system 00:05: [io  0x0500-0x057f] has been reserved
[    2.268801] system 00:05: Plug and Play ACPI device, IDs PNP0c02 (active)
[    2.268806] pnp 00:06: [io  0x0070-0x0077]
[    2.268845] pnp 00:06: Plug and Play ACPI device, IDs PNP0b00 (active)
[    2.268853] pnp 00:07: [io  0x0300-0x031f]
[    2.268854] pnp 00:07: [mem 0xfef00000-0xfef0ffff]
[    2.268858] pnp 00:07: [irq 6]
[    2.268896] pnp 00:07: Plug and Play ACPI device, IDs APP0001 (active)
[    2.268927] pnp 00:08: [io  0x0700-0x07fe]
[    2.268972] pnp 00:08: Plug and Play ACPI device, IDs APP000b (active)
[    2.269053] pnp 00:09: [mem 0xfed1c000-0xfed1ffff]
[    2.269055] pnp 00:09: [mem 0xfed10000-0xfed17fff]
[    2.269057] pnp 00:09: [mem 0xfed18000-0xfed18fff]
[    2.269058] pnp 00:09: [mem 0xfed19000-0xfed19fff]
[    2.269060] pnp 00:09: [mem 0xe0000000-0xefffffff]
[    2.269061] pnp 00:09: [mem 0xfed20000-0xfed3ffff]
[    2.269062] pnp 00:09: [mem 0xfed90000-0xfed93fff]
[    2.269063] pnp 00:09: [mem 0xfed45000-0xfed8ffff]
[    2.269064] pnp 00:09: [mem 0xff000000-0xffffffff]
[    2.269065] pnp 00:09: [mem 0xfee00000-0xfeefffff]
[    2.269067] pnp 00:09: [mem 0x00000000-0xffffffffffffffff disabled]
[    2.269121] system 00:09: [mem 0xfed1c000-0xfed1ffff] has been reserved
[    2.269124] system 00:09: [mem 0xfed10000-0xfed17fff] has been reserved
[    2.269126] system 00:09: [mem 0xfed18000-0xfed18fff] has been reserved
[    2.269129] system 00:09: [mem 0xfed19000-0xfed19fff] has been reserved
[    2.269132] system 00:09: [mem 0xe0000000-0xefffffff] could not be reserved
[    2.269135] system 00:09: [mem 0xfed20000-0xfed3ffff] has been reserved
[    2.269137] system 00:09: [mem 0xfed90000-0xfed93fff] has been reserved
[    2.269140] system 00:09: [mem 0xfed45000-0xfed8ffff] has been reserved
[    2.269143] system 00:09: [mem 0xff000000-0xffffffff] could not be reserved
[    2.269145] system 00:09: [mem 0xfee00000-0xfeefffff] has been reserved
[    2.269148] system 00:09: Plug and Play ACPI device, IDs PNP0c02 (active)
[    2.270896] pnp 00:0a: [mem 0x20000000-0x201fffff]
[    2.270897] pnp 00:0a: [mem 0x40000000-0x401fffff]
[    2.270976] system 00:0a: [mem 0x20000000-0x201fffff] has been reserved
[    2.270979] system 00:0a: [mem 0x40000000-0x401fffff] could not be reserved
[    2.270982] system 00:0a: Plug and Play ACPI device, IDs PNP0c01 (active)
[    2.270988] pnp: PnP ACPI: found 11 devices
[    2.270990] ACPI: ACPI bus type pnp unregistered
[    2.278594] pci 0000:00:01.0: PCI bridge to [bus 04-9a]
[    2.278598] pci 0000:00:01.0:   bridge window [io  0x3000-0x5fff]
[    2.278603] pci 0000:00:01.0:   bridge window [mem 0xa0900000-0xacbfffff]
[    2.278607] pci 0000:00:01.0:   bridge window [mem 0xacc00000-0xb8bfffff 64bit pref]
[    2.278613] pci 0000:00:1c.0: PCI bridge to [bus 01-01]
[    2.278618] pci 0000:00:1c.0:   bridge window [mem 0xa0700000-0xa07fffff]
[    2.278624] pci 0000:00:1c.0:   bridge window [mem 0xa0400000-0xa04fffff 64bit pref]
[    2.278631] pci 0000:00:1c.1: PCI bridge to [bus 02-02]
[    2.278637] pci 0000:00:1c.1:   bridge window [mem 0xa0600000-0xa06fffff]
[    2.278646] pci 0000:00:1c.2: PCI bridge to [bus 03-03]
[    2.278651] pci 0000:00:1c.2:   bridge window [mem 0xa0500000-0xa05fffff]
[    2.278691] pci 0000:00:1c.1: power state changed by ACPI to D0
[    2.278696] pci 0000:00:1c.1: power state changed by ACPI to D0
[    2.278711] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7]
[    2.278713] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff]
[    2.278714] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff]
[    2.278716] pci_bus 0000:00: resource 7 [mem 0x000c0000-0x000c3fff]
[    2.278717] pci_bus 0000:00: resource 8 [mem 0x000c4000-0x000c7fff]
[    2.278718] pci_bus 0000:00: resource 9 [mem 0x000c8000-0x000cbfff]
[    2.278720] pci_bus 0000:00: resource 10 [mem 0x000cc000-0x000cffff]
[    2.278721] pci_bus 0000:00: resource 11 [mem 0x000d0000-0x000d3fff]
[    2.278723] pci_bus 0000:00: resource 12 [mem 0x000d4000-0x000d7fff]
[    2.278724] pci_bus 0000:00: resource 13 [mem 0x000d8000-0x000dbfff]
[    2.278725] pci_bus 0000:00: resource 14 [mem 0x000dc000-0x000dffff]
[    2.278727] pci_bus 0000:00: resource 15 [mem 0x000e0000-0x000e3fff]
[    2.278728] pci_bus 0000:00: resource 16 [mem 0x000e4000-0x000e7fff]
[    2.278729] pci_bus 0000:00: resource 17 [mem 0x000e8000-0x000ebfff]
[    2.278731] pci_bus 0000:00: resource 18 [mem 0x000ec000-0x000effff]
[    2.278732] pci_bus 0000:00: resource 19 [mem 0x000f0000-0x000fffff]
[    2.278734] pci_bus 0000:00: resource 20 [mem 0x8fa00000-0xfeafffff]
[    2.278735] pci_bus 0000:00: resource 21 [mem 0xfed40000-0xfed44fff]
[    2.278737] pci_bus 0000:04: resource 0 [io  0x3000-0x5fff]
[    2.278738] pci_bus 0000:04: resource 1 [mem 0xa0900000-0xacbfffff]
[    2.278739] pci_bus 0000:04: resource 2 [mem 0xacc00000-0xb8bfffff 64bit pref]
[    2.278741] pci_bus 0000:01: resource 1 [mem 0xa0700000-0xa07fffff]
[    2.278742] pci_bus 0000:01: resource 2 [mem 0xa0400000-0xa04fffff 64bit pref]
[    2.278744] pci_bus 0000:02: resource 1 [mem 0xa0600000-0xa06fffff]
[    2.278745] pci_bus 0000:03: resource 1 [mem 0xa0500000-0xa05fffff]
[    2.278768] NET: Registered protocol family 2
[    2.278887] IP route cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    2.279394] TCP established hash table entries: 524288 (order: 11, 8388608 bytes)
[    2.280299] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    2.280431] TCP: Hash tables configured (established 524288 bind 65536)
[    2.280434] TCP: reno registered
[    2.280443] UDP hash table entries: 4096 (order: 5, 131072 bytes)
[    2.280466] UDP-Lite hash table entries: 4096 (order: 5, 131072 bytes)
[    2.280537] pci 0000:00:02.0: Boot video device
[    2.280546] pci 0000:00:14.0: enabling device (0000 ->  0002)
[    2.280551] pci 0000:00:14.0: can't derive routing for PCI INT A
[    2.280553] pci 0000:00:14.0: PCI INT A: no GSI
[    2.280611] pci 0000:00:14.0: can't derive routing for PCI INT A
[    2.280742] PCI: CLS 256 bytes, default 64
[    2.280768] Unpacking initramfs...
[    2.347628] Freeing initrd memory: 4992k freed
[    2.348106] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    2.348112] Placing 64MB software IO TLB between ffff88007bb20000 - ffff88007fb20000
[    2.348115] software IO TLB at phys 0x7bb20000 - 0x7fb20000
[    2.348679] audit: initializing netlink socket (disabled)
[    2.348688] type=2000 audit(1342229332.245:1): initialized
[    2.349067] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    2.351321] VFS: Disk quotas dquot_6.5.2
[    2.351367] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    2.351446] msgmni has been set to 15792
[    2.351620] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
[    2.351625] io scheduler noop registered
[    2.351694] io scheduler cfq registered (default)
[    2.351798] pcieport 0000:00:01.0: irq 40 for MSI/MSI-X
[    2.351936] pcieport 0000:00:1c.0: irq 41 for MSI/MSI-X
[    2.352051] pcieport 0000:00:1c.1: irq 42 for MSI/MSI-X
[    2.352171] pcieport 0000:00:1c.2: irq 43 for MSI/MSI-X
[    2.352304] pcieport 0000:00:01.0: Signaling PME through PCIe PME interrupt
[    2.352309] pcie_pme 0000:00:01.0:pcie01: service driver pcie_pme loaded
[    2.352323] pcieport 0000:00:1c.0: Signaling PME through PCIe PME interrupt
[    2.352326] pci 0000:01:00.0: Signaling PME through PCIe PME interrupt
[    2.352328] pci 0000:01:00.1: Signaling PME through PCIe PME interrupt
[    2.352333] pcie_pme 0000:00:1c.0:pcie01: service driver pcie_pme loaded
[    2.352347] pcieport 0000:00:1c.1: Signaling PME through PCIe PME interrupt
[    2.352350] pci 0000:02:00.0: Signaling PME through PCIe PME interrupt
[    2.352355] pcie_pme 0000:00:1c.1:pcie01: service driver pcie_pme loaded
[    2.352368] pcieport 0000:00:1c.2: Signaling PME through PCIe PME interrupt
[    2.352371] pci 0000:03:00.0: Signaling PME through PCIe PME interrupt
[    2.352376] pcie_pme 0000:00:1c.2:pcie01: service driver pcie_pme loaded
[    2.352436] efifb: probing for efifb
[    2.353421] efifb: framebuffer at 0x90000000, mapped to 0xffffc9000b300000, using 4000k, total 4000k
[    2.353425] efifb: mode is 1280x800x32, linelength=5120, pages=1
[    2.353426] efifb: scrolling: redraw
[    2.353429] efifb: Truecolor: size=8:8:8:8, shift=24:16:8:0
[    2.353480] fb0: EFI VGA frame buffer device
[    2.353574] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    2.354208] i8042: PNP: No PS/2 controller found. Probing ports directly.
[    2.355086] i8042: No controller found
[    2.355131] mousedev: PS/2 mouse device common for all mice
[    2.355171] cpuidle: using governor ladder
[    2.355173] cpuidle: using governor menu
[    2.355217] Registering the dns_resolver key type
[    2.355343] PM: Hibernation image not present or could not be loaded.
[    2.355347] registered taskstats version 1
[    2.356643] Freeing unused kernel memory: 700k freed
[    2.356709] Write protecting the kernel read-only data: 6144k
[    2.357078] Freeing unused kernel memory: 152k freed
[    2.358680] Freeing unused kernel memory: 784k freed
[    2.367996] usbcore: registered new interface driver usbfs
[    2.368030] usbcore: registered new interface driver hub
[    2.368071] usbcore: registered new device driver usb
[    2.368409] xhci_hcd 0000:00:14.0: can't derive routing for PCI INT A
[    2.368412] xhci_hcd 0000:00:14.0: PCI INT A: no GSI
[    2.368452] xhci_hcd 0000:00:14.0: setting latency timer to 64
[    2.368455] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    2.368469] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[    2.368552] xhci_hcd 0000:00:14.0: cache line size of 256 is not supported
[    2.368590] xhci_hcd 0000:00:14.0: irq 44 for MSI/MSI-X
[    2.368631] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.368634] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.368636] usb usb1: Product: xHCI Host Controller
[    2.368638] usb usb1: Manufacturer: Linux 3.4.4 xhci_hcd
[    2.368640] usb usb1: SerialNumber: 0000:00:14.0
[    2.368709] xHCI xhci_add_endpoint called for root hub
[    2.368710] xHCI xhci_check_bandwidth called for root hub
[    2.368745] hub 1-0:1.0: USB hub found
[    2.368752] hub 1-0:1.0: 4 ports detected
[    2.368796] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    2.368801] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[    2.368813] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[    2.368815] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.368818] usb usb2: Product: xHCI Host Controller
[    2.368820] usb usb2: Manufacturer: Linux 3.4.4 xhci_hcd
[    2.368822] usb usb2: SerialNumber: 0000:00:14.0
[    2.368877] xHCI xhci_add_endpoint called for root hub
[    2.368878] xHCI xhci_check_bandwidth called for root hub
[    2.368913] hub 2-0:1.0: USB hub found
[    2.368920] hub 2-0:1.0: 4 ports detected
[    2.373264] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.373296] ehci_hcd 0000:00:1a.0: setting latency timer to 64
[    2.373299] ehci_hcd 0000:00:1a.0: EHCI Host Controller
[    2.373305] ehci_hcd 0000:00:1a.0: new USB bus registered, assigned bus number 3
[    2.373325] ehci_hcd 0000:00:1a.0: debug port 2
[    2.377213] ehci_hcd 0000:00:1a.0: cache line size of 256 is not supported
[    2.377225] ehci_hcd 0000:00:1a.0: irq 23, io mem 0xa0816c00
[    2.383088] ehci_hcd 0000:00:1a.0: USB 2.0 started, EHCI 1.00
[    2.383115] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[    2.383122] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.383137] usb usb3: Product: EHCI Host Controller
[    2.383139] usb usb3: Manufacturer: Linux 3.4.4 ehci_hcd
[    2.383141] usb usb3: SerialNumber: 0000:00:1a.0
[    2.383232] hub 3-0:1.0: USB hub found
[    2.383236] hub 3-0:1.0: 2 ports detected
[    2.383283] ehci_hcd 0000:00:1d.0: setting latency timer to 64
[    2.383286] ehci_hcd 0000:00:1d.0: EHCI Host Controller
[    2.383291] ehci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 4
[    2.383310] ehci_hcd 0000:00:1d.0: debug port 2
[    2.387194] ehci_hcd 0000:00:1d.0: cache line size of 256 is not supported
[    2.387205] ehci_hcd 0000:00:1d.0: irq 22, io mem 0xa0816800
[    2.393066] ehci_hcd 0000:00:1d.0: USB 2.0 started, EHCI 1.00
[    2.393093] usb usb4: New USB device found, idVendor=1d6b, idProduct=0002
[    2.393100] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.393113] usb usb4: Product: EHCI Host Controller
[    2.393115] usb usb4: Manufacturer: Linux 3.4.4 ehci_hcd
[    2.393117] usb usb4: SerialNumber: 0000:00:1d.0
[    2.393211] hub 4-0:1.0: USB hub found
[    2.393215] hub 4-0:1.0: 2 ports detected
[    2.394959] SCSI subsystem initialized
[    2.395766] libata version 3.00 loaded.
[    2.396162] ahci 0000:00:1f.2: version 3.0
[    2.396213] ahci 0000:00:1f.2: irq 45 for MSI/MSI-X
[    2.396254] ahci 0000:00:1f.2: AHCI 0001.0300 32 slots 6 ports 6 Gbps 0x3 impl SATA mode
[    2.396258] ahci 0000:00:1f.2: flags: 64bit ncq pm led clo pio slum part ems apst
[    2.396263] ahci 0000:00:1f.2: setting latency timer to 64
[    2.398675] scsi0 : ahci
[    2.398758] scsi1 : ahci
[    2.398834] scsi2 : ahci
[    2.398907] scsi3 : ahci
[    2.398981] scsi4 : ahci
[    2.399068] scsi5 : ahci
[    2.399215] ata1: SATA max UDMA/133 abar m2048 at 0xa0816000 port 0xa0816100 irq 45
[    2.399220] ata2: SATA max UDMA/133 abar m2048 at 0xa0816000 port 0xa0816180 irq 45
[    2.399223] ata3: DUMMY
[    2.399224] ata4: DUMMY
[    2.399225] ata5: DUMMY
[    2.399227] ata6: DUMMY
[    2.703272] ata1: SATA link up 6.0 Gbps (SStatus 133 SControl 300)
[    2.703302] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    2.703754] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    2.703857] ata1.00: ATA-8: APPLE SSD SM128E, CXM07A1Q, max UDMA/133
[    2.703863] ata1.00: 236978176 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    2.704120] ata1.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    2.704218] ata1.00: configured for UDMA/133
[    2.704336] scsi 0:0:0:0: Direct-Access     ATA      APPLE SSD SM128E CXM0 PQ: 0 ANSI: 5
[    2.705179] ata2.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    2.705184] ata2.00: ATAPI: MATSHITADVD-R   UJ-8A8, HB14, max UDMA/100
[    2.708001] ata2.00: ACPI cmd ef/10:03:00:00:00:a0 (SET FEATURES) filtered out
[    2.708005] ata2.00: configured for UDMA/100
[    2.711659] scsi 1:0:0:0: CD-ROM            MATSHITA DVD-R   UJ-8A8   HB14 PQ: 0 ANSI: 5
[    2.720245] usb 1-2: new low-speed USB device number 2 using xhci_hcd
[    2.736565] usb 1-2: New USB device found, idVendor=046d, idProduct=c051
[    2.736572] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.736578] usb 1-2: Product: USB-PS/2 Optical Mouse
[    2.736583] usb 1-2: Manufacturer: Logitech
[    2.736677] usb 1-2: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
[    2.764241] firewire_ohci 0000:03:00.0: irq 46 for MSI/MSI-X
[    2.764283] firewire_ohci 0000:03:00.0: added OHCI v1.10 device as card 0, 8 IR + 8 IT contexts, quirks 0x0
[    2.768996] input: Logitech USB-PS/2 Optical Mouse as /devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/input/input0
[    2.769089] generic-usb 0003:046D:C051.0001: input,hidraw0: USB HID v1.10 Mouse [Logitech USB-PS/2 Optical Mouse] on usb-0000:00:14.0-2/input0
[    2.769119] usbcore: registered new interface driver usbhid
[    2.769121] usbhid: USB HID core driver
[    2.779783] Btrfs loaded
[    2.782142] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel at redhat.com
[    2.783499] Console: switching to colour frame buffer device 160x50
[    2.787643] NET: Registered protocol family 1
[    2.808203] sd 0:0:0:0: [sda] 236978176 512-byte logical blocks: (121 GB/113 GiB)
[    2.808236] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    2.808316] sd 0:0:0:0: [sda] Write Protect is off
[    2.808341] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    2.808362] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.811124]  sda: sda1 sda2 sda3 sda4 sda5
[    2.811913] sd 0:0:0:0: [sda] Attached SCSI disk
[    2.814870] sr0: scsi3-mmc drive: 62x/62x writer cd/rw xa/form2 cdda tray
[    2.814910] cdrom: Uniform CD-ROM driver Revision: 3.20
[    2.815727] sr 1:0:0:0: Attached scsi CD-ROM sr0
[    2.838920] usb 3-1: new high-speed USB device number 2 using ehci_hcd
[    2.953042] usb 3-1: New USB device found, idVendor=8087, idProduct=0024
[    2.953100] usb 3-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    2.953339] hub 3-1:1.0: USB hub found
[    2.953405] hub 3-1:1.0: 6 ports detected
[    3.055362] usb 4-1: new high-speed USB device number 2 using ehci_hcd
[    3.169475] usb 4-1: New USB device found, idVendor=8087, idProduct=0024
[    3.169498] usb 4-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.169771] hub 4-1:1.0: USB hub found
[    3.169851] hub 4-1:1.0: 8 ports detected
[    3.244049] usb 3-1.1: new high-speed USB device number 3 using ehci_hcd
[    3.263927] firewire_core 0000:03:00.0: created device fw0: GUID 003ee1fffe33c2ea, S800
[    3.263959] firewire_core 0000:03:00.0: phy config: new root=ffc0, gap_count=63
[    3.345409] usb 3-1.1: New USB device found, idVendor=05ac, idProduct=8509
[    3.345466] usb 3-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    3.346198] usb 3-1.1: Product: FaceTime HD Camera (Built-in)
[    3.346926] usb 3-1.1: Manufacturer: Apple Inc.
[    3.347619] Refined TSC clocksource calibration: 2893.427 MHz.
[    3.347622] Switching to clocksource tsc
[    3.349872] usb 3-1.1: SerialNumber: CC2C6J00E0DG6LL0
[    3.444531] usb 4-1.8: new high-speed USB device number 3 using ehci_hcd
[    3.530555] usb 4-1.8: New USB device found, idVendor=0424, idProduct=2513
[    3.531304] usb 4-1.8: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.532214] hub 4-1.8:1.0: USB hub found
[    3.533049] hub 4-1.8:1.0: 3 ports detected
[    3.560477] device label root devid 1 transid 301 /dev/sda5
[    3.679221] PM: Hibernation mode set to 'shutdown'
[    3.728691] device label root devid 1 transid 301 /dev/disk/by-label/root
[    3.729693] btrfs: disk space caching is enabled
[    3.734461] Btrfs detected SSD devices, enabling SSD mode
[    3.806607] usb 4-1.8.1: new full-speed USB device number 4 using ehci_hcd
[    3.809449] btrfs: disk space caching is enabled
[    3.893870] usb 4-1.8.1: New USB device found, idVendor=0a5c, idProduct=4500
[    3.894638] usb 4-1.8.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.895350] usb 4-1.8.1: Product: BRCM20702 Hub
[    3.896050] usb 4-1.8.1: Manufacturer: Apple Inc.
[    3.897105] hub 4-1.8.1:1.0: USB hub found
[    3.897976] hub 4-1.8.1:1.0: 3 ports detected
[    3.972168] usb 4-1.8.2: new low-speed USB device number 5 using ehci_hcd
[    4.063683] usb 4-1.8.2: New USB device found, idVendor=05ac, idProduct=8242
[    4.064436] usb 4-1.8.2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.065105] usb 4-1.8.2: Product: IR Receiver
[    4.065782] usb 4-1.8.2: Manufacturer: Apple Computer, Inc.
[    4.141882] usb 4-1.8.3: new full-speed USB device number 6 using ehci_hcd
[    4.152002] udevd[1469]: starting version 173
[    4.161500] device label root devid 1 transid 302 /dev/sda5
[    4.233371] usb 4-1.8.3: New USB device found, idVendor=05ac, idProduct=0252
[    4.234073] usb 4-1.8.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.234741] usb 4-1.8.3: Product: Apple Internal Keyboard / Trackpad
[    4.235405] usb 4-1.8.3: Manufacturer: Apple Inc.
[    4.252267] input: bcm5974 as /devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.8/4-1.8.3/4-1.8.3:1.2/input/input1
[    4.253075] usbcore: registered new interface driver bcm5974
[    4.255613] apple 0003:05AC:8242.0002: hiddev0,hidraw1: USB HID v1.11 Device [Apple Computer, Inc. IR Receiver] on usb-0000:00:1d.0-1.8.2/input0
[    4.260339] input: Apple Inc. Apple Internal Keyboard / Trackpad as /devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.8/4-1.8.3/4-1.8.3:1.0/input/input2
[    4.261153] apple 0003:05AC:0252.0003: input,hidraw2: USB HID v1.11 Keyboard [Apple Inc. Apple Internal Keyboard / Trackpad] on usb-0000:00:1d.0-1.8.3/input0
[    4.300335] usb 4-1.8.1.1: new full-speed USB device number 7 using ehci_hcd
[    4.377625] usb 4-1.8.1.1: New USB device found, idVendor=05ac, idProduct=820a
[    4.378443] usb 4-1.8.1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    4.380465] input: HID 05ac:820a as /devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.8/4-1.8.1/4-1.8.1.1/4-1.8.1.1:1.0/input/input3
[    4.381645] generic-usb 0003:05AC:820A.0005: input,hidraw3: USB HID v1.11 Keyboard [HID 05ac:820a] on usb-0000:00:1d.0-1.8.1.1/input0
[    4.396301] NET: Registered protocol family 10
[    4.401572] loop: module loaded
[    4.420298] ACPI: Requesting acpi_cpufreq
[    4.423068] Monitor-Mwait will be used to enter C-1 state
[    4.423082] Monitor-Mwait will be used to enter C-2 state
[    4.423092] Monitor-Mwait will be used to enter C-3 state
[    4.423103] ACPI: acpi_idle registered with cpuidle
[    4.439078] EFI Variables Facility v0.08 2004-May-17
[    4.443981] usb 4-1.8.1.2: new full-speed USB device number 8 using ehci_hcd
[    4.533253] usb 4-1.8.1.2: New USB device found, idVendor=05ac, idProduct=820b
[    4.534099] usb 4-1.8.1.2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    4.536586] input: HID 05ac:820b as /devices/pci0000:00/0000:00:1d.0/usb4/4-1/4-1.8/4-1.8.1/4-1.8.1.2/4-1.8.1.2:1.0/input/input4
[    4.537873] generic-usb 0003:05AC:820B.0006: input,hidraw4: USB HID v1.11 Mouse [HID 05ac:820b] on usb-0000:00:1d.0-1.8.1.2/input0
[    4.575679] apple 0003:05AC:0252.0004: hidraw5: USB HID v1.11 Device [Apple Inc. Apple Internal Keyboard / Trackpad] on usb-0000:00:1d.0-1.8.3/input1
[    4.595655] input: Lid Switch as /devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input5
[    4.596479] ACPI: Lid Switch [LID0]
[    4.596526] input: Power Button as /devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input6
[    4.596555] ACPI: Power Button [PWRB]
[    4.596593] input: Sleep Button as /devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input7
[    4.596618] ACPI: Sleep Button [SLPB]
[    4.596656] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input8
[    4.596677] ACPI: Power Button [PWRF]
[    4.600550] usb 4-1.8.1.3: new full-speed USB device number 9 using ehci_hcd
[    4.600771] sd 0:0:0:0: Attached scsi generic sg0 type 0
[    4.600802] sr 1:0:0:0: Attached scsi generic sg1 type 5
[    4.608790] input: PC Speaker as /devices/platform/pcspkr/input/input9
[    4.608797] microcode: CPU0 sig=0x306a9, pf=0x10, revision=0x12
[    4.609340] Linux agpgart interface v0.103
[    4.613803] mei: module is from the staging directory, the quality is unknown, you have been warned.
[    4.614133] mei 0000:00:16.0: setting latency timer to 64
[    4.614214] mei 0000:00:16.0: irq 47 for MSI/MSI-X
[    4.614486] sdhci: Secure Digital Host Controller Interface driver
[    4.614487] sdhci: Copyright(c) Pierre Ossman
[    4.615464] sdhci-pci 0000:01:00.1: SDHCI controller found [14e4:16bc] (rev 10)
[    4.615511] sdhci-pci 0000:01:00.1: Invalid iomem size. You may experience problems.
[    4.615616] mmc0: no vmmc regulator found
[    4.615644] Registered led device: mmc0::
[    4.617365] mmc0: SDHCI controller on PCI [0000:01:00.1] using ADMA
[    4.618040] iTCO_wdt: Intel TCO WatchDog Timer Driver v1.07
[    4.618114] iTCO_wdt: unable to reset NO_REBOOT flag, device disabled by hardware/BIOS
[    4.623281] snd_hda_intel 0000:00:1b.0: enabling device (0000 ->  0002)
[    4.623362] snd_hda_intel 0000:00:1b.0: irq 48 for MSI/MSI-X
[    4.625557] ACPI: AC Adapter [ADP1] (on-line)
[    4.630517] tg3.c:v3.123 (March 21, 2012)
[    4.638031] tg3 0000:01:00.0: eth0: Tigon3 [partno(BCM957765) rev 57785100] (PCI Express) MAC address 40:6c:8f:50:ef:78
[    4.638034] tg3 0000:01:00.0: eth0: attached PHY is 57765 (10/100/1000Base-T Ethernet) (WireSpeed[1], EEE[1])
[    4.638037] tg3 0000:01:00.0: eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[0] TSOcap[1]
[    4.638039] tg3 0000:01:00.0: eth0: dma_rwctrl[00000001] dma_mask[64-bit]
[    4.644368] apple_gmux: gmux device not present
[    4.652730] applesmc: : read arg fail
[    4.700678] microcode: CPU1 sig=0x306a9, pf=0x10, revision=0x12
[    4.701238] usb 4-1.8.1.3: New USB device found, idVendor=05ac, idProduct=821d
[    4.701339] usb 4-1.8.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    4.701341] microcode: CPU2 sig=0x306a9, pf=0x10, revision=0x12
[    4.701346] usb 4-1.8.1.3: Product: Bluetooth USB Host Controller
[    4.701348] usb 4-1.8.1.3: Manufacturer: Apple Inc.
[    4.701968] microcode: CPU3 sig=0x306a9, pf=0x10, revision=0x12
[    4.702767] microcode: Microcode Update Driver: v2.00<tigran at aivazian.fsnet.co.uk>, Peter Oruba
[    4.705900] rtc_cmos 00:06: RTC can wake from S4
[    4.706113] rtc_cmos 00:06: rtc core: registered rtc_cmos as rtc0
[    4.706152] rtc0: alarms up to one month, y3k, 242 bytes nvram, hpet irqs
[    4.751041] applesmc: LSSB: read arg fail
[    4.779891] ACPI: Battery Slot [BAT0] (battery present)
[    4.817920] Linux video capture interface: v2.00
[    4.824612] uvcvideo: Found UVC 1.00 device FaceTime HD Camera (Built-in) (05ac:8509)
[    4.833277] input: FaceTime HD Camera (Built-in) as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1.1/3-1.1:1.0/input/input10
[    4.833492] usbcore: registered new interface driver uvcvideo
[    4.833494] USB Video Class driver (1.1.1)
[    4.843487] applesmc: : read arg fail
[    4.927336] applesmc: : read arg fail
[    5.011211] applesmc: : read arg fail
[    5.095051] applesmc: : read arg fail
[    5.175188] agpgart-intel 0000:00:00.0: Intel Ivybridge Chipset
[    5.175662] agpgart-intel 0000:00:00.0: detected gtt size: 2097152K total, 262144K mappable
[    5.178676] agpgart-intel 0000:00:00.0: detected 65536K stolen memory
[    5.178837] applesmc: : read arg fail
[    5.179277] agpgart-intel 0000:00:00.0: AGP aperture is 256M @ 0x90000000
[    5.179312] i801_smbus 0000:00:1f.3: enabling device (0000 ->  0003)
[    5.179328] ACPI Warning: 0x000000000000efa0-0x000000000000efbf SystemIO conflicts with Region \_SB_.PCI0.SBUS.SMBI 1 (20120320/utaddress-251)
[    5.179341] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver
[    5.244791] [drm] Initialized drm 1.1.0 20060810
[    5.255165] i915 0000:00:02.0: setting latency timer to 64
[    5.262531] applesmc: : read arg fail
[    5.346370] applesmc: : read arg fail
[    5.348586] i915 0000:00:02.0: irq 49 for MSI/MSI-X
[    5.348596] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    5.348597] [drm] Driver supports precise vblank timestamp query.
[    5.348636] [drm:intel_dsm_platform_mux_info] *ERROR* MUX INFO call failed
[    5.348863] vgaarb: device changed decodes: PCI:0000:00:02.0,olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    5.430298] applesmc: : read arg fail
[    5.440530] irq 17: nobody cared (try booting with the "irqpoll" option)
[    5.440537] Pid: 0, comm: swapper/2 Tainted: G         C   3.4.4 #1
[    5.440540] Call Trace:
[    5.440543]<IRQ>   [<ffffffff810c18dd>] __report_bad_irq+0x3d/0xe0
[    5.440555]  [<ffffffff810c1b8c>] note_interrupt+0x15c/0x210
[    5.440561]  [<ffffffff810bf5ba>] handle_irq_event_percpu+0xba/0x240
[    5.440566]  [<ffffffff810bf781>] handle_irq_event+0x41/0x70
[    5.440571]  [<ffffffff810c26b9>] handle_fasteoi_irq+0x59/0x100
[    5.440577]  [<ffffffff810156a2>] handle_irq+0x22/0x40
[    5.440582]  [<ffffffff813d2eea>] do_IRQ+0x5a/0xe0
[    5.440587]  [<ffffffff813d096a>] common_interrupt+0x6a/0x6a
[    5.440589]<EOI>   [<ffffffffa04e54ff>] ? arch_local_irq_enable+0x8/0xd [processor]
[    5.440618]  [<ffffffffa04e6351>] acpi_idle_enter_c1+0x95/0xbf [processor]
[    5.440626]  [<ffffffff812f7cf9>] cpuidle_enter+0x19/0x20
[    5.440631]  [<ffffffff812f832c>] cpuidle_idle_call+0xbc/0x2c0
[    5.440637]  [<ffffffff8101d4b5>] cpu_idle+0x85/0xe0
[    5.440644]  [<ffffffff813c2c09>] start_secondary+0x1af/0x1b3
[    5.440647] handlers:
[    5.440652] [<ffffffffa00be860>] sdhci_irq
[    5.440655] Disabling IRQ #17
[    5.514808] applesmc: : read arg fail
[    5.598623] applesmc: : read arg fail
[    5.682390] applesmc: : read arg fail
[    5.696234] [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp off
[    5.766192] applesmc: : read arg fail
[    5.848780] checking generic (90000000 3e8000) vs hw (90000000 10000000)
[    5.848786] fb: conflicting fb hw usage inteldrmfb vs EFI VGA - removing generic driver
[    5.848829] Console: switching to colour dummy device 80x25
[    5.849948] applesmc: : read arg fail
[    5.850300] fbcon: inteldrmfb (fb0) is primary device
[    5.933748] applesmc: : read arg fail
[    6.008953] Console: switching to colour frame buffer device 160x50
[    6.013538] fb0: inteldrmfb frame buffer device
[    6.013541] drm: registered panic notifier
[    6.017545] applesmc: : read arg fail
[    6.020395] acpi device:0e: registered as cooling_device4
[    6.020973] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:00/input/input11
[    6.021114] ACPI: Video Device [IGPU] (multi-head: yes  rom: no  post: no)
[    6.021184] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
[    6.101360] applesmc: : read arg fail
[    6.185151] applesmc: : read arg fail
[    6.268935] applesmc: : read arg fail
[    6.352723] applesmc: : read arg fail
[    6.436507] applesmc: : read arg fail
[    6.520294] applesmc: : read arg fail
[    6.604053] applesmc: : read arg fail
[    6.687863] applesmc: : read arg fail
[    6.771669] applesmc: : read arg fail
[    6.855436] applesmc: : read arg fail
[    6.939215] applesmc: : read arg fail
[    7.023006] applesmc: : read arg fail
[    7.106789] applesmc: : read arg fail
[    7.190572] applesmc: : read arg fail
[    7.274358] applesmc: : read arg fail
[    7.358144] applesmc: : read arg fail
[    7.441860] applesmc: : read arg fail
[    7.525714] applesmc: : read arg fail
[    7.609500] applesmc: : read arg fail
[    7.693229] applesmc: : read arg fail
[    7.777069] applesmc: : read arg fail
[    7.860802] applesmc: : read arg fail
[    7.944642] applesmc: : read arg fail
[    8.028371] applesmc: : read arg fail
[    8.112156] applesmc: : read arg fail
[    8.195995] applesmc: : read arg fail
[    8.279727] applesmc: : read arg fail
[    8.363562] applesmc: : read arg fail
[    8.447295] applesmc: : read arg fail
[    8.531067] applesmc: : read arg fail
[    8.614853] applesmc: : read arg fail
[    8.698639] applesmc: : read arg fail
[    8.782424] applesmc: : read arg fail
[    8.866287] applesmc: : read arg fail
[    8.949989] applesmc: : read arg fail
[    9.033778] applesmc: : read arg fail
[    9.117563] applesmc: : read arg fail
[    9.201348] applesmc: : read arg fail
[    9.285133] applesmc: : read arg fail
[    9.368903] applesmc: : read arg fail
[    9.452774] applesmc: : read arg fail
[    9.536488] applesmc: : read arg fail
[    9.620341] applesmc: : read arg fail
[    9.704058] applesmc: : read arg fail
[    9.787911] applesmc: : read arg fail
[    9.871689] applesmc: : read arg fail
[    9.955416] applesmc: : read arg fail
[   10.039265] applesmc: : read arg fail
[   10.123051] applesmc: : read arg fail
[   10.206836] applesmc: : read arg fail
[   10.290619] applesmc: : read arg fail
[   10.374405] applesmc: : read arg fail
[   10.458139] applesmc: : read arg fail
[   10.541973] applesmc: : read arg fail
[   10.625761] applesmc: : read arg fail
[   10.709546] applesmc: : read arg fail
[   10.793333] applesmc: : read arg fail
[   10.877104] applesmc: : read arg fail
[   10.960846] applesmc: : read arg fail
[   11.044687] applesmc: : read arg fail
[   11.128472] applesmc: : read arg fail
[   11.212261] applesmc: : read arg fail
[   11.296043] applesmc: : read arg fail
[   11.379770] applesmc: : read arg fail
[   11.463559] applesmc: : read arg fail
[   11.547329] applesmc: : read arg fail
[   11.631186] applesmc: : read arg fail
[   11.714897] applesmc: : read arg fail
[   11.798755] applesmc: : read arg fail
[   11.882533] applesmc: : read arg fail
[   11.966323] applesmc: : read arg fail
[   12.050109] applesmc: : read arg fail
[   12.133895] applesmc: : read arg fail
[   12.217678] applesmc: : read arg fail
[   12.301462] applesmc: : read arg fail
[   12.385248] applesmc: : read arg fail
[   12.469033] applesmc: : read arg fail
[   12.552750] applesmc: : read arg fail
[   12.636604] applesmc: : read arg fail
[   12.720320] applesmc: : read arg fail
[   12.804173] applesmc: : read arg fail
[   12.887892] applesmc: : read arg fail
[   12.971688] applesmc: : read arg fail
[   13.021814] applesmc: probe of applesmc.768 failed with error -5
[   13.055495] applesmc: : read arg fail
[   13.139262] applesmc: : read arg fail
[   13.223098] applesmc: : read arg fail
[   13.306829] applesmc: : read arg fail
[   13.392170] applesmc: : read arg fail
[   13.476444] applesmc: : read arg fail
[   13.560233] applesmc: : read arg fail
[   13.644020] applesmc: : read arg fail
[   13.727802] applesmc: : read arg fail
[   13.811590] applesmc: : read arg fail
[   13.895309] applesmc: : read arg fail
[   13.979091] applesmc: : read arg fail
[   14.062943] applesmc: : read arg fail
[   14.146663] applesmc: : read arg fail
[   14.230512] applesmc: : read arg fail
[   14.314359] applesmc: : read arg fail
[   14.398081] applesmc: : read arg fail
[   14.481804] applesmc: : read arg fail
[   14.565655] applesmc: : read arg fail
[   14.649389] applesmc: : read arg fail
[   14.733223] applesmc: : read arg fail
[   14.816945] applesmc: : read arg fail
[   14.900797] applesmc: : read arg fail
[   14.984513] applesmc: : read arg fail
[   15.068365] applesmc: : read arg fail
[   15.152084] applesmc: : read arg fail
[   15.235935] applesmc: : read arg fail
[   15.319718] applesmc: : read arg fail
[   15.403504] applesmc: : read arg fail
[   15.487234] applesmc: : read arg fail
[   15.571078] applesmc: : read arg fail
[   15.654856] applesmc: : read arg fail
[   15.738591] applesmc: : read arg fail
[   15.822429] applesmc: : read arg fail
[   15.906215] applesmc: : read arg fail
[   15.989997] applesmc: : read arg fail
[   16.073696] applesmc: : read arg fail
[   16.157572] applesmc: : read arg fail
[   16.241289] applesmc: : read arg fail
[   16.325139] applesmc: : read arg fail
[   16.408858] applesmc: : read arg fail
[   16.492642] applesmc: : read arg fail
[   16.576429] applesmc: : read arg fail
[   16.660213] applesmc: : read arg fail
[   16.744013] applesmc: : read arg fail
[   16.827784] applesmc: : read arg fail
[   16.911567] applesmc: : read arg fail
[   16.995353] applesmc: : read arg fail
[   17.079207] applesmc: : read arg fail
[   17.162923] applesmc: : read arg fail
[   17.246763] applesmc: : read arg fail
[   17.330495] applesmc: : read arg fail
[   17.414291] applesmc: : read arg fail
[   17.498063] applesmc: : read arg fail
[   17.581920] applesmc: : read arg fail
[   17.665634] applesmc: : read arg fail
[   17.749487] applesmc: : read arg fail
[   17.833268] applesmc: : read arg fail
[   17.917059] applesmc: : read arg fail
[   18.000789] applesmc: : read arg fail
[   18.084559] applesmc: : read arg fail
[   18.168411] applesmc: : read arg fail
[   18.252128] applesmc: : read arg fail
[   18.335982] applesmc: : read arg fail
[   18.419701] applesmc: : read arg fail
[   18.503552] applesmc: : read arg fail
[   18.587271] applesmc: : read arg fail
[   18.671121] applesmc: : read arg fail
[   18.754839] applesmc: : read arg fail
[   18.838692] applesmc: : read arg fail
[   18.922410] applesmc: : read arg fail
[   19.006192] applesmc: : read arg fail
[   19.089982] applesmc: : read arg fail
[   19.173765] applesmc: : read arg fail
[   19.257547] applesmc: : read arg fail
[   19.341322] applesmc: : read arg fail
[   19.425318] applesmc: : read arg fail
[   19.508904] applesmc: : read arg fail
[   19.592746] applesmc: : read arg fail
[   19.676540] applesmc: : read arg fail
[   19.760330] applesmc: : read arg fail
[   19.844082] applesmc: : read arg fail
[   19.927844] applesmc: : read arg fail
[   20.011685] applesmc: : read arg fail
[   20.095470] applesmc: : read arg fail
[   20.179255] applesmc: : read arg fail
[   20.263038] applesmc: : read arg fail
[   20.346815] applesmc: : read arg fail
[   20.430608] applesmc: : read arg fail
[   20.514396] applesmc: : read arg fail
[   20.598181] applesmc: : read arg fail
[   20.681909] applesmc: : read arg fail
[   20.765694] applesmc: : read arg fail
[   20.849479] applesmc: : read arg fail
[   20.933322] applesmc: : read arg fail
[   21.017050] applesmc: : read arg fail
[   21.100893] applesmc: : read arg fail
[   21.184620] applesmc: : read arg fail
[   21.268455] applesmc: : read arg fail
[   21.352247] applesmc: : read arg fail
[   21.402438] applesmc: driver init failed (ret=-5)!
[   21.446308] applesmc: : read arg fail
[   21.530789] applesmc: : read arg fail
[   21.614570] applesmc: : read arg fail
[   21.698357] applesmc: : read arg fail
[   21.782140] applesmc: : read arg fail
[   21.865924] applesmc: : read arg fail
[   21.949643] applesmc: : read arg fail
[   22.033467] applesmc: : read arg fail
[   22.117280] applesmc: : read arg fail
[   22.201066] applesmc: : read arg fail
[   22.284784] applesmc: : read arg fail
[   22.368764] applesmc: : read arg fail
[   22.452354] applesmc: : read arg fail
[   22.536205] applesmc: : read arg fail
[   22.619994] applesmc: : read arg fail
[   22.703775] applesmc: : read arg fail
[   22.787494] applesmc: : read arg fail
[   22.871345] applesmc: : read arg fail
[   22.955069] applesmc: : read arg fail
[   23.038916] applesmc: : read arg fail
[   23.122703] applesmc: : read arg fail
[   23.206487] applesmc: : read arg fail
[   23.290272] applesmc: : read arg fail
[   23.374056] applesmc: : read arg fail
[   23.457841] applesmc: : read arg fail
[   23.541628] applesmc: : read arg fail
[   23.625415] applesmc: : read arg fail
[   23.709196] applesmc: : read arg fail
[   23.792915] applesmc: : read arg fail
[   23.876765] applesmc: : read arg fail
[   23.960502] applesmc: : read arg fail
[   24.044338] applesmc: : read arg fail
[   24.128128] applesmc: : read arg fail
[   24.211908] applesmc: : read arg fail
[   24.295694] applesmc: : read arg fail
[   24.379479] applesmc: : read arg fail
[   24.463262] applesmc: : read arg fail
[   24.547048] applesmc: : read arg fail
[   24.630833] applesmc: : read arg fail
[   24.714617] applesmc: : read arg fail
[   24.798404] applesmc: : read arg fail
[   24.882193] applesmc: : read arg fail
[   24.965971] applesmc: : read arg fail
[   25.049759] applesmc: : read arg fail
[   25.133546] applesmc: : read arg fail
[   25.217331] applesmc: : read arg fail
[   25.301116] applesmc: : read arg fail
[   25.384831] applesmc: : read arg fail
[   25.468681] applesmc: : read arg fail
[   25.552599] applesmc: : read arg fail
[   25.636198] applesmc: : read arg fail
[   25.720039] applesmc: : read arg fail
[   25.803771] applesmc: : read arg fail
[   25.887609] applesmc: : read arg fail
[   25.971340] applesmc: : read arg fail
[   26.055178] applesmc: : read arg fail
[   26.138958] applesmc: : read arg fail
[   26.222876] applesmc: : read arg fail
[   26.306533] applesmc: : read arg fail
[   26.390318] applesmc: : read arg fail
[   26.474105] applesmc: : read arg fail
[   26.557953] applesmc: : read arg fail
[   26.641621] applesmc: : read arg fail
[   26.725392] applesmc: : read arg fail
[   26.809191] applesmc: : read arg fail
[   26.892961] applesmc: : read arg fail
[   26.976761] applesmc: : read arg fail
[   27.060533] applesmc: : read arg fail
[   27.144331] applesmc: : read arg fail
[   27.228099] applesmc: : read arg fail
[   27.311901] applesmc: : read arg fail
[   27.395669] applesmc: : read arg fail
[   27.479472] applesmc: : read arg fail
[   27.563243] applesmc: : read arg fail
[   27.647096] applesmc: : read arg fail
[   27.730813] applesmc: : read arg fail
[   27.814668] applesmc: : read arg fail
[   27.898451] applesmc: : read arg fail
[   27.982168] applesmc: : read arg fail
[   28.066018] applesmc: : read arg fail
[   28.149739] applesmc: : read arg fail
[   28.233590] applesmc: : read arg fail
[   28.317350] applesmc: : read arg fail
[   28.401158] applesmc: : read arg fail
[   28.484950] applesmc: : read arg fail
[   28.568663] applesmc: : read arg fail
[   28.652515] applesmc: : read arg fail
[   28.736235] applesmc: : read arg fail
[   28.820086] applesmc: : read arg fail
[   28.903806] applesmc: : read arg fail
[   28.987655] applesmc: : read arg fail
[   29.071443] applesmc: : read arg fail
[   29.155227] applesmc: : read arg fail
[   29.239011] applesmc: : read arg fail
[   29.322772] applesmc: : read arg fail
[   29.406528] applesmc: : read arg fail
[   29.490366] applesmc: : read arg fail
[   29.574151] applesmc: : read arg fail
[   29.657936] applesmc: : read arg fail
[   29.741722] applesmc: : read arg fail
[   29.791808] applesmc: probe of applesmc.768 failed with error -5
[   29.825483] applesmc: : read arg fail
[   29.909294] applesmc: : read arg fail
[   29.993075] applesmc: : read arg fail
[   30.076865] applesmc: : read arg fail
[   30.160649] applesmc: : read arg fail
[   30.244435] applesmc: : read arg fail
[   30.328217] applesmc: : read arg fail
[   30.411996] applesmc: : read arg fail
[   30.495787] applesmc: : read arg fail
[   30.579552] applesmc: : read arg fail
[   30.663302] applesmc: : read arg fail
[   30.747141] applesmc: : read arg fail
[   30.830874] applesmc: : read arg fail
[   30.914712] applesmc: : read arg fail
[   30.998444] applesmc: : read arg fail
[   31.082282] applesmc: : read arg fail
[   31.166014] applesmc: : read arg fail
[   31.249852] applesmc: : read arg fail
[   31.333638] applesmc: : read arg fail
[   31.417423] applesmc: : read arg fail
[   31.501208] applesmc: : read arg fail
[   31.584995] applesmc: : read arg fail
[   31.668778] applesmc: : read arg fail
[   31.752560] applesmc: : read arg fail
[   31.836345] applesmc: : read arg fail
[   31.920078] applesmc: : read arg fail
[   32.003850] applesmc: : read arg fail
[   32.087704] applesmc: : read arg fail
[   32.171420] applesmc: : read arg fail
[   32.255270] applesmc: : read arg fail
[   32.338988] applesmc: : read arg fail
[   32.422843] applesmc: : read arg fail
[   32.506605] applesmc: : read arg fail
[   32.590410] applesmc: : read arg fail
[   32.674198] applesmc: : read arg fail
[   32.757919] applesmc: : read arg fail
[   32.841716] applesmc: : read arg fail
[   32.925487] applesmc: : read arg fail
[   33.009285] applesmc: : read arg fail
[   33.093124] applesmc: : read arg fail
[   33.176855] applesmc: : read arg fail
[   33.260698] applesmc: : read arg fail
[   33.344424] applesmc: : read arg fail
[   33.428265] applesmc: : read arg fail
[   33.511994] applesmc: : read arg fail
[   33.595969] applesmc: : read arg fail
[   33.679552] applesmc: : read arg fail
[   33.763387] applesmc: : read arg fail
[   33.847122] applesmc: : read arg fail
[   33.931105] applesmc: : read arg fail
[   34.014893] applesmc: : read arg fail
[   34.098677] applesmc: : read arg fail
[   34.182460] applesmc: : read arg fail
[   34.266245] applesmc: : read arg fail
[   34.350029] applesmc: : read arg fail
[   34.433815] applesmc: : read arg fail
[   34.517398] applesmc: : read arg fail
[   34.601383] applesmc: : read arg fail
[   34.684975] applesmc: : read arg fail
[   34.768953] applesmc: : read arg fail
[   34.852545] applesmc: : read arg fail
[   34.936457] applesmc: : read arg fail
[   35.020114] applesmc: : read arg fail
[   35.103899] applesmc: : read arg fail
[   35.187879] applesmc: : read arg fail
[   35.271666] applesmc: : read arg fail
[   35.355265] applesmc: : read arg fail
[   35.439235] applesmc: : read arg fail
[   35.523022] applesmc: : read arg fail
[   35.606620] applesmc: : read arg fail
[   35.690590] applesmc: : read arg fail
[   35.774368] applesmc: : read arg fail
[   35.858162] applesmc: : read arg fail
[   35.941944] applesmc: : read arg fail
[   36.025727] applesmc: : read arg fail
[   36.109513] applesmc: : read arg fail
[   36.193301] applesmc: : read arg fail
[   36.277086] applesmc: : read arg fail
[   36.360871] applesmc: : read arg fail
[   36.444459] applesmc: : read arg fail
[   36.528440] applesmc: : read arg fail
[   36.612029] applesmc: : read arg fail
[   36.696008] applesmc: : read arg fail
[   36.779798] applesmc: : read arg fail
[   36.866723] applesmc: CLKC: read arg fail
[   36.951355] applesmc: : read arg fail
[   37.034943] applesmc: : read arg fail
[   37.118926] applesmc: : read arg fail
[   37.202516] applesmc: : read arg fail
[   37.286498] applesmc: : read arg fail
[   37.370084] applesmc: : read arg fail
[   37.453884] applesmc: : read arg fail
[   37.537654] applesmc: : read arg fail
[   37.621640] applesmc: : read arg fail
[   37.705226] applesmc: : read arg fail
[   37.789207] applesmc: : read arg fail
[   37.872993] applesmc: : read arg fail
[   37.956777] applesmc: : read arg fail
[   38.040563] applesmc: : read arg fail
[   38.124348] applesmc: : read arg fail
[   38.174426] applesmc: driver init failed (ret=-5)!
[   38.256712] tg3 0000:01:00.0: irq 50 for MSI/MSI-X
[   38.256716] tg3 0000:01:00.0: irq 51 for MSI/MSI-X
[   38.256719] tg3 0000:01:00.0: irq 52 for MSI/MSI-X
[   38.256722] tg3 0000:01:00.0: irq 53 for MSI/MSI-X
[   38.256725] tg3 0000:01:00.0: irq 54 for MSI/MSI-X
[   38.551847] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   42.092285] tg3 0000:01:00.0: eth0: Link is up at 1000 Mbps, full duplex
[   42.092291] tg3 0000:01:00.0: eth0: Flow control is on for TX and on for RX
[   42.092295] tg3 0000:01:00.0: eth0: EEE is disabled
[   42.093286] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   42.137049] NET: Registered protocol family 17
[   44.207094] tg3 0000:01:00.0: irq 50 for MSI/MSI-X
[   44.207105] tg3 0000:01:00.0: irq 51 for MSI/MSI-X
[   44.207113] tg3 0000:01:00.0: irq 52 for MSI/MSI-X
[   44.207121] tg3 0000:01:00.0: irq 53 for MSI/MSI-X
[   44.207129] tg3 0000:01:00.0: irq 54 for MSI/MSI-X
[   44.502560] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   44.941128] tg3 0000:01:00.0: irq 50 for MSI/MSI-X
[   44.941144] tg3 0000:01:00.0: irq 51 for MSI/MSI-X
[   44.941157] tg3 0000:01:00.0: irq 52 for MSI/MSI-X
[   44.941168] tg3 0000:01:00.0: irq 53 for MSI/MSI-X
[   44.941180] tg3 0000:01:00.0: irq 54 for MSI/MSI-X
[   45.236617] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   46.194649] dhcpcd[2129]: segfault at 2a74656e6e ip 00007f9dd67562d9 sp 00007fff69aebd30 error 4 in libc-2.13.so[7f9dd66df000+182000]
[   46.195083] init: dhcpcd main process (2129) killed by SEGV signal
[   46.195157] init: dhcpcd main process ended, respawning
[   48.070897] tg3 0000:01:00.0: eth0: Link is up at 1000 Mbps, full duplex
[   48.070904] tg3 0000:01:00.0: eth0: Flow control is on for TX and on for RX
[   48.070908] tg3 0000:01:00.0: eth0: EEE is disabled
[   48.071891] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   51.181198] tg3 0000:01:00.0: irq 50 for MSI/MSI-X
[   51.181210] tg3 0000:01:00.0: irq 51 for MSI/MSI-X
[   51.181218] tg3 0000:01:00.0: irq 52 for MSI/MSI-X
[   51.181226] tg3 0000:01:00.0: irq 53 for MSI/MSI-X
[   51.181234] tg3 0000:01:00.0: irq 54 for MSI/MSI-X
[   51.477323] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   54.742386] tg3 0000:01:00.0: eth0: Link is up at 1000 Mbps, full duplex
[   54.742393] tg3 0000:01:00.0: eth0: Flow control is on for TX and on for RX
[   54.742397] tg3 0000:01:00.0: eth0: EEE is disabled
[   54.743379] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   56.093862] dhcpcd[2397]: segfault at 2a74656e6e ip 00007fa7514f42d9 sp 00007fffd4e35c60 error 4 in libc-2.13.so[7fa75147d000+182000]
[   56.101520] init: dhcpcd main process (2397) killed by SEGV signal
[   56.101586] init: dhcpcd main process ended, respawning
[   65.143105] eth0: no IPv6 routers present
[  148.788304] cfg80211: Calling CRDA to update world regulatory domain
[  148.806775] Broadcom 43xx driver loaded [ Features: PML ]
[  880.637222] Broadcom 43xx driver loaded [ Features: PML ]





From Larry.Finger at lwfinger.net  Fri Jul 13 22:28:31 2012
From: Larry.Finger at lwfinger.net (Larry Finger)
Date: Fri, 13 Jul 2012 21:28:31 -0500
Subject: Macbook Pro 9,2 (mid-2012) bcm4331 not working on Linux 3.4
In-Reply-To: <5000D140.4020500@logicblox.com>
References: <5000D140.4020500@logicblox.com>
Message-ID: <5000D94F.7000405@lwfinger.net>

On 07/13/2012 08:54 PM, Shea Levy wrote:
> Hello,
>
> With the firmware installed, udev doesn't autoload b43 and loading it manually
> does not create a new network interface. Is this interface supported?

Check your .config and make sure that the following configuration variables are set:

CONFIG_B43_BCMA=y
CONFIG_B43_PHY_HT=y
CONFIG_BCMA=m
CONFIG_BCMA_BLOCKIO=y
CONFIG_BCMA_HOST_PCI_POSSIBLE=y
CONFIG_BCMA_HOST_PCI=y

Larry


From arend at broadcom.com  Sat Jul 14 06:10:08 2012
From: arend at broadcom.com (Arend van Spriel)
Date: Sat, 14 Jul 2012 12:10:08 +0200
Subject: [PATCH 2/2] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
Message-ID: <50014580.7060702@broadcom.com>

On 07/13/2012 08:52 PM, Thomas Huehn wrote:
> The pointer control.sta is removed from ieee80211_tx_info to free up sufficient
> memory in SKB_CB on the tx-path to enable new annotations per data packet e.g.
> support of upcoming Transmit Power Control (TPC).
> Now the control.sta pointer is put on the stack where it is passed as function
> parameter to the .tx equivalent (ieee80211_ops) of each affected wireless
> driver. Therefore a new structure ieee80211_tx_control is added to mac80211.h
> which holds the sta structure instead.
> 
> ---
>  .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
> 
> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
> index 9e79d47..a7be68d 100644
> --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
> +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
> @@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
>  	}
>  }
>  
> -static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
> +static void brcms_ops_tx(struct ieee80211_hw *hw,
> +			 struct ieee80211_tx_control *control,
> +			 struct sk_buff *skb)

Fix indent here (if it is not a mailer issue).

>  {
>  	struct brcms_info *wl = hw->priv;
>  	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
> @@ -276,7 +278,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
>  		goto done;
>  	}
>  	brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
> -	tx_info->rate_driver_data[0] = tx_info->control.sta;
> +	tx_info->rate_driver_data[0] = control->sta;
>   done:
>  	spin_unlock_bh(&wl->lock);
>  }

Gr. AvS



From nbd at openwrt.org  Sat Jul 14 07:44:24 2012
From: nbd at openwrt.org (Felix Fietkau)
Date: Sat, 14 Jul 2012 13:44:24 +0200
Subject: [ath9k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <50014580.7060702@broadcom.com>
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <50014580.7060702@broadcom.com>
Message-ID: <50015B98.60705@openwrt.org>

On 2012-07-14 12:10 PM, Arend van Spriel wrote:
> On 07/13/2012 08:52 PM, Thomas Huehn wrote:
>> The pointer control.sta is removed from ieee80211_tx_info to free up sufficient
>> memory in SKB_CB on the tx-path to enable new annotations per data packet e.g.
>> support of upcoming Transmit Power Control (TPC).
>> Now the control.sta pointer is put on the stack where it is passed as function
>> parameter to the .tx equivalent (ieee80211_ops) of each affected wireless
>> driver. Therefore a new structure ieee80211_tx_control is added to mac80211.h
>> which holds the sta structure instead.
>> 
>> ---
>>  .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
>> 
>> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
>> index 9e79d47..a7be68d 100644
>> --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
>> +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
>> @@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
>>  	}
>>  }
>>  
>> -static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
>> +static void brcms_ops_tx(struct ieee80211_hw *hw,
>> +			 struct ieee80211_tx_control *control,
>> +			 struct sk_buff *skb)
> 
> Fix indent here (if it is not a mailer issue).
Indentation looks correct to me. The + in front of the 'static' moves
the rest of the line one character further to the right, whereas in the
other lines it's compensated by the tabstop.

- Felix


From arend at broadcom.com  Sat Jul 14 08:55:41 2012
From: arend at broadcom.com (Arend van Spriel)
Date: Sat, 14 Jul 2012 14:55:41 +0200
Subject: [ath9k-devel] [PATCH 2/2] mac80211: Remove control.sta from
 struct ieee80211_tx_info and restructure tx-path
In-Reply-To: <50015B98.60705@openwrt.org>
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <50014580.7060702@broadcom.com> <50015B98.60705@openwrt.org>
Message-ID: <50016C4D.4050706@broadcom.com>

On 07/14/2012 01:44 PM, Felix Fietkau wrote:
> On 2012-07-14 12:10 PM, Arend van Spriel wrote:
>> On 07/13/2012 08:52 PM, Thomas Huehn wrote:
>>> The pointer control.sta is removed from ieee80211_tx_info to free up sufficient
>>> memory in SKB_CB on the tx-path to enable new annotations per data packet e.g.
>>> support of upcoming Transmit Power Control (TPC).
>>> Now the control.sta pointer is put on the stack where it is passed as function
>>> parameter to the .tx equivalent (ieee80211_ops) of each affected wireless
>>> driver. Therefore a new structure ieee80211_tx_control is added to mac80211.h
>>> which holds the sta structure instead.
>>>
>>> ---
>>>  .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
>>>
>>> diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
>>> index 9e79d47..a7be68d 100644
>>> --- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
>>> +++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
>>> @@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
>>>  	}
>>>  }
>>>  
>>> -static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
>>> +static void brcms_ops_tx(struct ieee80211_hw *hw,
>>> +			 struct ieee80211_tx_control *control,
>>> +			 struct sk_buff *skb)
>>
>> Fix indent here (if it is not a mailer issue).
> Indentation looks correct to me. The + in front of the 'static' moves
> the rest of the line one character further to the right, whereas in the
> other lines it's compensated by the tabstop.
> 
> - Felix
> 

I see. I did not apply the patch to be sure.

Gr. AvS




From shea.levy at logicblox.com  Sat Jul 14 10:06:41 2012
From: shea.levy at logicblox.com (Shea Levy)
Date: Sat, 14 Jul 2012 10:06:41 -0400
Subject: Macbook Pro 9,2 (mid-2012) bcm4331 not working on Linux 3.4
In-Reply-To: <5000D94F.7000405@lwfinger.net>
References: <5000D140.4020500@logicblox.com> <5000D94F.7000405@lwfinger.net>
Message-ID: <50017CF1.60807@logicblox.com>

On 07/13/2012 10:28 PM, Larry Finger wrote:
> On 07/13/2012 08:54 PM, Shea Levy wrote:
>> Hello,
>>
>> With the firmware installed, udev doesn't autoload b43 and loading it 
>> manually
>> does not create a new network interface. Is this interface supported?
>
> Check your .config and make sure that the following configuration 
> variables are set:
>
> CONFIG_B43_BCMA=y
> CONFIG_B43_PHY_HT=y
> CONFIG_BCMA=m
> CONFIG_BCMA_BLOCKIO=y
> CONFIG_BCMA_HOST_PCI_POSSIBLE=y
> CONFIG_BCMA_HOST_PCI=y
>
> Larry

Ah, that did it, thanks. Is there a place where the kernel config 
requirements are documented?

~Shea


From Larry.Finger at lwfinger.net  Sat Jul 14 10:54:56 2012
From: Larry.Finger at lwfinger.net (Larry Finger)
Date: Sat, 14 Jul 2012 09:54:56 -0500
Subject: Macbook Pro 9,2 (mid-2012) bcm4331 not working on Linux 3.4
In-Reply-To: <50017CF1.60807@logicblox.com>
References: <5000D140.4020500@logicblox.com> <5000D94F.7000405@lwfinger.net>
 <50017CF1.60807@logicblox.com>
Message-ID: <50018840.1070206@lwfinger.net>

On 07/14/2012 09:06 AM, Shea Levy wrote:
>
> Ah, that did it, thanks. Is there a place where the kernel config requirements
> are documented?

If such documentation exists, I don't know about it. Most people either use the 
shotgun approach and enable everything the way distro does. If you build a lot 
of kernels, and do not want to waste time on things you will never use, then a 
minimum configuration is created, and then one looks carefully at the things 
that don't work. In this case, the key was knowing that recent Broadcom devices 
need bcma to work, while older ones need ssb.

The tough part is when a particular distro depends on an unusual combination of 
configuration parameters for their kernel to function. Linus Torvalds has just 
started a conversation on this issue. See the thread at
https://groups.google.com/forum/?fromgroups#!msg/fa.linux.kernel/EqysPjaJGDU/oDG2WXqokNoJ.

Larry



From coelho at ti.com  Sun Jul 15 00:49:15 2012
From: coelho at ti.com (Luciano Coelho)
Date: Sun, 15 Jul 2012 07:49:15 +0300
Subject: [PATCH 2/2] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
Message-ID: <1342327755.1196.6.camel@cumari.coelho.fi>

On Fri, 2012-07-13 at 20:52 +0200, Thomas Huehn wrote:
> The pointer control.sta is removed from ieee80211_tx_info to free up sufficient
> memory in SKB_CB on the tx-path to enable new annotations per data packet e.g.
> support of upcoming Transmit Power Control (TPC).
> Now the control.sta pointer is put on the stack where it is passed as function
> parameter to the .tx equivalent (ieee80211_ops) of each affected wireless
> driver. Therefore a new structure ieee80211_tx_control is added to mac80211.h
> which holds the sta structure instead.
> 
> The tx-path of all affected drivers is restructured to respect the chaneged
> layout of struct ieee80211_tx_info. List of modified drivers:
> ath9k
> ath5k
> iwl3954
> iwl4965
> iwl-agn
> mwl8k
> carl9170
> ath9k-htc
> p54
> rt2x00
> rtl8180
> rtl8087
> hwsim
> b43
> b43legacy
> brcmsmac
> zd1211rw
> wl1251
> wlcore
> rtlwifi
> libertas_tf
> at76c50x-usb
> adm8211
> 
> Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
> Signed-off-by: Alina Friedrichsen <x-alina at gmx.net>
> Signed-off-by: Felix Fietkau <nbd at openwrt.org>
> ---

For the TI drivers part (wl1251/wlcore):

Acked-by: Luciano Coelho <coelho at ti.com>

--
Luca.



From hauke at hauke-m.de  Mon Jul 16 17:44:25 2012
From: hauke at hauke-m.de (Hauke Mehrtens)
Date: Mon, 16 Jul 2012 23:44:25 +0200
Subject: REGRESSION: [PATCH v2 0/9] bcma misc updates
In-Reply-To: <4FF2ABD6.3070007@broadcom.com>
References: <1341013486-2520-1-git-send-email-hauke@hauke-m.de>
 <4FF29671.1020406@broadcom.com> <4FF2A2D4.9070308@hauke-m.de>
 <4FF2ABD6.3070007@broadcom.com>
Message-ID: <50048B39.7060507@hauke-m.de>

On 07/03/2012 10:22 AM, Arend van Spriel wrote:
> On 07/03/2012 09:44 AM, Hauke Mehrtens wrote:
>>> I suspect it tries reading OTP instead of the external SPROM.
>>>>
>>>> Gr. AvS
>>>>
>> Hi Arend,
>>
>> my BCM43224 uses a Sprom from the flash chip of the SoC, so it could be
>> that something is wrong in the sprom reading, but I haven't touched the
>> sprom code expect for using constants.
>>
>> Do you know which patch is causing this issue?
>>
>> Hauke
>>
> 
> I intended to bisect the series. I will let you know what I find.
> 
> Gr. AvS

Hi Arend,

Did you bisect this? I still have no idea which or why any of the
patches could cause this.

Hauke


From arend at broadcom.com  Tue Jul 17 03:31:33 2012
From: arend at broadcom.com (Arend van Spriel)
Date: Tue, 17 Jul 2012 09:31:33 +0200
Subject: REGRESSION: [PATCH v2 0/9] bcma misc updates
In-Reply-To: <50048B39.7060507@hauke-m.de>
References: <1341013486-2520-1-git-send-email-hauke@hauke-m.de>
 <4FF29671.1020406@broadcom.com> <4FF2A2D4.9070308@hauke-m.de>
 <4FF2ABD6.3070007@broadcom.com> <50048B39.7060507@hauke-m.de>
Message-ID: <500514D5.4090207@broadcom.com>

On 07/16/2012 11:44 PM, Hauke Mehrtens wrote:
> On 07/03/2012 10:22 AM, Arend van Spriel wrote:
>> On 07/03/2012 09:44 AM, Hauke Mehrtens wrote:
>>>> I suspect it tries reading OTP instead of the external SPROM.
>>>>>
>>>>> Gr. AvS
>>>>>
>>> Hi Arend,
>>>
>>> my BCM43224 uses a Sprom from the flash chip of the SoC, so it could be
>>> that something is wrong in the sprom reading, but I haven't touched the
>>> sprom code expect for using constants.
>>>
>>> Do you know which patch is causing this issue?
>>>
>>> Hauke
>>>
>>
>> I intended to bisect the series. I will let you know what I find.
>>
>> Gr. Av
> 
> Hi Arend,
> 
> Did you bisect this? I still have no idea which or why any of the
> patches could cause this.
> 
> Hauke
> 

Hi Hauke,

I seem to have a number of issues with BCMA, which all seem host_pci
related. It looks like there is some merge issue in PCI API. It may be
due to the fact that wireless-testing got rebased by John and I merged
it into our internal branch.

So my plan is to rebase our internal branch to wireless-testing instead
of a merge. I did not come back to you because I wanted to make sense of
the issues I was seeing.

Gr. AvS



From johannes at sipsolutions.net  Tue Jul 17 05:44:50 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Tue, 17 Jul 2012 11:44:50 +0200
Subject: [PATCH 2/2] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120713_205245_114771_49FF4AC7)
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120713_205245_114771_49FF4AC7)
Message-ID: <1342518290.7427.9.camel@jlt3.sipsolutions.net>

Ok first of all, please actually compile the tree after your changes. It
doesn't. When it does, please fix
 1) line length in the commit log should be < 72 chars
 2) indentation in mac80211.h
 3) removal of an important comment in mac80211.h that I pointed out in
    previous review

> The tx-path of all affected drivers is restructured to respect the chaneged
> layout of struct ieee80211_tx_info. List of modified drivers:
> ath9k

Please also remove the driver list. git can tell you the modified files
very easily.

johannes



From thomas at net.t-labs.tu-berlin.de  Tue Jul 17 08:57:35 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Tue, 17 Jul 2012 14:57:35 +0200
Subject: [ath5k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1342518290.7427.9.camel@jlt3.sipsolutions.net>
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120713_205245_114771_49FF4AC7)
 <1342518290.7427.9.camel@jlt3.sipsolutions.net>
Message-ID: <5005613F.1000004@net.t-labs.tu-berlin.de>

Hi Johannes,

Johannes Berg schrieb:
> Ok first of all, please actually compile the tree after your changes. It
> doesn't. When it does, please fix

I always do compile the compat-wireless-tree after changes I introduce,
and it compiles without errors in the case of this mac80211:sta-remove
patch. But as my build tree is based on the OpenWrt environment, it
might be not 100% in sync. Could you be a bit more explicit where does
it brake in you case (which function, driver...) ?

>  1) line length in the commit log should be < 72 chars

Will do so in v2.

>  3) removal of an important comment in mac80211.h that I pointed out in
>     previous review

>From your previous review:"...btw, you lost an important comment about
it being NULL along the way"
I guess you refer to the comment in mac80211.h, struct tx_info that I
removed:
- * The TX control's sta pointer is only valid during the ->tx call,
- * it may be NULL.

I am not sure what you want me to keep here as comment. As the sta
pointer is moved into the new struct tx_control and the remaining
pointers in the tx_info->control structure (vif, hw_key) are ALL only
valid during the ->tx call and may be NULL. So I could think of adding a
comment to tx_control about the sta been NULL, but anything more ?


>> The tx-path of all affected drivers is restructured to respect the
chaneged
>> layout of struct ieee80211_tx_info. List of modified drivers:
>> ath9k
>
> Please also remove the driver list. git can tell you the modified files
> very easily.

Will do so in v2.

Greetings Thomas


From johannes at sipsolutions.net  Tue Jul 17 09:03:57 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Tue, 17 Jul 2012 15:03:57 +0200
Subject: [ath5k-devel] [PATCH 2/2] mac80211: Remove control.sta from
 struct ieee80211_tx_info and restructure tx-path
In-Reply-To: <5005613F.1000004@net.t-labs.tu-berlin.de>
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120713_205245_114771_49FF4AC7)
 <1342518290.7427.9.camel@jlt3.sipsolutions.net>
 <5005613F.1000004@net.t-labs.tu-berlin.de>
Message-ID: <1342530237.8139.5.camel@jlt3.sipsolutions.net>

On Tue, 2012-07-17 at 14:57 +0200, Thomas Huehn wrote:

> > Ok first of all, please actually compile the tree after your changes. It
> > doesn't. When it does, please fix
> 
> I always do compile the compat-wireless-tree after changes I introduce,
> and it compiles without errors in the case of this mac80211:sta-remove
> patch. But as my build tree is based on the OpenWrt environment, it
> might be not 100% in sync. Could you be a bit more explicit where does
> it brake in you case (which function, driver...) ?

No, I'm not going to play that game. Make sure it compiles on
wireless-next.

> I guess you refer to the comment in mac80211.h, struct tx_info that I
> removed:
> - * The TX control's sta pointer is only valid during the ->tx call,
> - * it may be NULL.
> 
> I am not sure what you want me to keep here as comment. As the sta
> pointer is moved into the new struct tx_control and the remaining
> pointers in the tx_info->control structure (vif, hw_key) are ALL only
> valid during the ->tx call and may be NULL. So I could think of adding a
> comment to tx_control about the sta been NULL, but anything more ?

It's also not allowed to copy the pointer, due to RCU, which is
information you lost.

johannes



From thomas at net.t-labs.tu-berlin.de  Tue Jul 17 16:11:15 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Tue, 17 Jul 2012 22:11:15 +0200
Subject: [PATCH v2 0/0] mac80211: Restructure ieee80211_tx_info->control to
 gain free space along tx-path 
Message-ID: <1342555877-23563-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

In order to enable new annotations per data packet along the max80211 tx-path,
(e.g. upcoming Transmit Power Control (TPC) per packet) this patch-serie does:

- fix the ieee80211_tx_info->control usage in driver mac80211_hwsim
- remove control.sta from ieee80211_tx_info and adapt all affected drivers


Greetings Thomas                                                                                                                                                                                                                        

---
CC list is a reduced "get_maintainer.pl", focuses on mailing lists - suggested
by J. Berg



From thomas at net.t-labs.tu-berlin.de  Tue Jul 17 16:11:16 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Tue, 17 Jul 2012 22:11:16 +0200
Subject: [PATCH v2 0/0 1/2] mac80211_hwsim: fix possible race condition in
 usage of info->control.sta & control.vif
In-Reply-To: <1342555877-23563-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
References: <1342555877-23563-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
Message-ID: <1342555877-23563-2-git-send-email-thomas@net.t-labs.tu-berlin.de>

info->control.sta and control.vif may only be dereferenced during the
drv_tx call otherwise could lead to use-after-free bugs.

Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
---
 drivers/net/wireless/mac80211_hwsim.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 3f38d84..826ac7b 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1540,11 +1540,6 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
 	/* now send back TX status */
 	txi = IEEE80211_SKB_CB(skb);
 
-	if (txi->control.vif)
-		hwsim_check_magic(txi->control.vif);
-	if (txi->control.sta)
-		hwsim_check_sta_magic(txi->control.sta);
-
 	ieee80211_tx_info_clear_status(txi);
 
 	for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
-- 
1.7.11.1



From thomas at net.t-labs.tu-berlin.de  Tue Jul 17 16:11:17 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Tue, 17 Jul 2012 22:11:17 +0200
Subject: [PATCH v2 0/0 2/2] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1342555877-23563-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
References: <1342555877-23563-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
Message-ID: <1342555877-23563-3-git-send-email-thomas@net.t-labs.tu-berlin.de>

The pointer control.sta is removed from ieee80211_tx_info to free up
sufficient memory in SKB_CB on the tx-path to enable new annotations
per data packet e.g.support of upcoming Transmit Power Control (TPC).
Now the control.sta pointer is put on the stack where passed as
function parameter to the .tx equivalent (ieee80211_ops) of each
affected wireless driver.
Therefore a new structure ieee80211_tx_control is added to mac80211.h
which holds the sta structure instead. The tx-path of all affected
drivers is restructured to respect the chaneges.

Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
Signed-off-by: Alina Friedrichsen <x-alina at gmx.net>
Signed-off-by: Felix Fietkau <nbd at openwrt.org>
---
restructure this patch to respect logical API evolutions. thx to Johannes Berg
add missing drivers that are effected as well. thx to Xose Vazquez Perez
add missing drivers that are effected as well. thx to Johannes Berg
---
 drivers/net/wireless/adm8211.c                     |  4 +++-
 drivers/net/wireless/at76c50x-usb.c                |  4 +++-
 drivers/net/wireless/ath/ath5k/mac80211-ops.c      |  3 ++-
 drivers/net/wireless/ath/ath9k/ath9k.h             |  1 +
 drivers/net/wireless/ath/ath9k/htc.h               |  1 +
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c    |  2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |  6 +++--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |  2 +-
 drivers/net/wireless/ath/ath9k/main.c              |  5 ++++-
 drivers/net/wireless/ath/ath9k/xmit.c              |  9 ++++----
 drivers/net/wireless/ath/carl9170/carl9170.h       |  4 +++-
 drivers/net/wireless/ath/carl9170/tx.c             | 16 ++++++-------
 drivers/net/wireless/b43/main.c                    |  3 ++-
 drivers/net/wireless/b43legacy/main.c              |  1 +
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
 drivers/net/wireless/iwlegacy/3945-mac.c           | 12 ++++++----
 drivers/net/wireless/iwlegacy/4965-mac.c           | 26 +++++++++++++---------
 drivers/net/wireless/iwlegacy/4965.h               |  8 +++++--
 drivers/net/wireless/iwlwifi/dvm/agn.h             |  4 +++-
 drivers/net/wireless/iwlwifi/dvm/mac80211.c        |  6 +++--
 drivers/net/wireless/iwlwifi/dvm/tx.c              | 16 +++++++------
 drivers/net/wireless/libertas_tf/main.c            |  4 +++-
 drivers/net/wireless/mac80211_hwsim.c              |  8 ++++---
 drivers/net/wireless/mwl8k.c                       | 17 ++++++++------
 drivers/net/wireless/p54/lmac.h                    |  4 +++-
 drivers/net/wireless/p54/main.c                    |  2 +-
 drivers/net/wireless/p54/txrx.c                    | 15 ++++++++-----
 drivers/net/wireless/rt2x00/rt2x00.h               |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00dev.c            |  2 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c            |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00queue.c          | 20 +++++++++--------
 drivers/net/wireless/rtl818x/rtl8180/dev.c         |  6 +++--
 drivers/net/wireless/rtl818x/rtl8187/dev.c         |  6 +++--
 drivers/net/wireless/rtlwifi/base.c                |  3 +--
 drivers/net/wireless/rtlwifi/core.c                |  8 ++++---
 drivers/net/wireless/rtlwifi/pci.c                 | 16 ++++++-------
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.h       |  4 +++-
 drivers/net/wireless/rtlwifi/rtl8192de/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192de/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/rtl8192se/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192se/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/usb.c                 | 15 ++++++++-----
 drivers/net/wireless/rtlwifi/wifi.h                | 13 +++++++----
 drivers/net/wireless/ti/wl1251/main.c              |  4 +++-
 drivers/net/wireless/ti/wlcore/main.c              |  6 +++--
 drivers/net/wireless/ti/wlcore/tx.c                | 19 +++++++++++-----
 drivers/net/wireless/zd1211rw/zd_mac.c             |  6 +++--
 drivers/staging/winbond/wbusb.c                    |  4 +++-
 include/net/mac80211.h                             | 20 ++++++++++++-----
 net/mac80211/driver-ops.h                          |  6 +++--
 net/mac80211/ieee80211_i.h                         |  2 ++
 net/mac80211/tx.c                                  | 13 ++++++-----
 55 files changed, 252 insertions(+), 141 deletions(-)

diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 0ac09a2..b661ce2 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1661,7 +1661,9 @@ static void adm8211_tx_raw(struct ieee80211_hw *dev, struct sk_buff *skb,
 }
 
 /* Put adm8211_tx_hdr on skb and transmit */
-static void adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void adm8211_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct adm8211_tx_hdr *txhdr;
 	size_t payload_len, hdrlen;
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index efc162e..abb520d 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1726,7 +1726,9 @@ static void at76_mac80211_tx_callback(struct urb *urb)
 	ieee80211_wake_queues(priv->hw);
 }
 
-static void at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void at76_mac80211_tx(struct ieee80211_hw *hw,
+			     struct ieee80211_tx_control *control,
+			     struct sk_buff *skb)
 {
 	struct at76_priv *priv = hw->priv;
 	struct at76_tx_buffer *tx_buffer = priv->bulk_out_buffer;
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 22b80af..93a800f 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -55,7 +55,8 @@
 \********************/
 
 static void
-ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+ath5k_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
+	 struct sk_buff *skb)
 {
 	struct ath5k_hw *ah = hw->priv;
 	u16 qnum = skb_get_queue_mapping(skb);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 54f0c9d0..9a08d9f 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -280,6 +280,7 @@ struct ath_tx_control {
 	struct ath_txq *txq;
 	struct ath_node *an;
 	u8 paprd;
+	struct ieee80211_sta *sta;
 };
 
 #define ATH_TX_ERROR        0x01
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 936e920..b30596f 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -542,6 +542,7 @@ void ath9k_htc_stop_ani(struct ath9k_htc_priv *priv);
 
 int ath9k_tx_init(struct ath9k_htc_priv *priv);
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb, u8 slot, bool is_cab);
 void ath9k_tx_cleanup(struct ath9k_htc_priv *priv);
 bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index 77d541f..f42d2eb 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -326,7 +326,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv,
 			goto next;
 		}
 
-		ret = ath9k_htc_tx_start(priv, skb, tx_slot, true);
+		ret = ath9k_htc_tx_start(priv, NULL, skb, tx_slot, true);
 		if (ret != 0) {
 			ath9k_htc_tx_clear_slot(priv, tx_slot);
 			dev_kfree_skb_any(skb);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 374c32e..ee053b2 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -856,7 +856,9 @@ set_timer:
 /* mac80211 Callbacks */
 /**********************/
 
-static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_htc_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct ath9k_htc_priv *priv = hw->priv;
@@ -883,7 +885,7 @@ static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto fail_tx;
 	}
 
-	ret = ath9k_htc_tx_start(priv, skb, slot, false);
+	ret = ath9k_htc_tx_start(priv, control->sta, skb, slot, false);
 	if (ret != 0) {
 		ath_dbg(common, XMIT, "Tx failed\n");
 		goto clear_slot;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 47e61d0..06cdcb7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -333,12 +333,12 @@ static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,
 }
 
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb,
 		       u8 slot, bool is_cab)
 {
 	struct ieee80211_hdr *hdr;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_vif *vif = tx_info->control.vif;
 	struct ath9k_htc_sta *ista;
 	struct ath9k_htc_vif *avp = NULL;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 01a5f18..45a77ff 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -691,7 +691,9 @@ mutex_unlock:
 	return r;
 }
 
-static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct ath_softc *sc = hw->priv;
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
@@ -751,6 +753,7 @@ static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	memset(&txctl, 0, sizeof(struct ath_tx_control));
 	txctl.txq = sc->tx.txq_map[skb_get_queue_mapping(skb)];
+	txctl.sta = control->sta;
 
 	ath_dbg(common, XMIT, "transmitting packet, skb: %p\n", skb);
 
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index cafb4a0..4912214 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1771,11 +1771,12 @@ static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
 	TX_STAT_INC(txq->axq_qnum, queued);
 }
 
-static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb,
+static void setup_frame_info(struct ieee80211_hw *hw,
+			     struct ieee80211_sta *sta,
+			     struct sk_buff *skb,
 			     int framelen)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	const struct ieee80211_rate *rate;
@@ -1933,7 +1934,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
+	struct ieee80211_sta *sta = txctl->sta;
 	struct ieee80211_vif *vif = info->control.vif;
 	struct ath_softc *sc = hw->priv;
 	struct ath_txq *txq = txctl->txq;
@@ -1977,7 +1978,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	    !ieee80211_is_data(hdr->frame_control))
 		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
 
-	setup_frame_info(hw, skb, frmlen);
+	setup_frame_info(hw, sta, skb, frmlen);
 
 	/*
 	 * At this point, the vif, hw_key and sta pointers in the tx control
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index 376be11..8f0cbc3 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -577,7 +577,9 @@ void carl9170_rx(struct ar9170 *ar, void *buf, unsigned int len);
 void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len);
 
 /* TX */
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb);
 void carl9170_tx_janitor(struct work_struct *work);
 void carl9170_tx_process_status(struct ar9170 *ar,
 				const struct carl9170_rsp *cmd);
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 6a86814..84377cf 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -867,14 +867,15 @@ static bool carl9170_tx_cts_check(struct ar9170 *ar,
 	return false;
 }
 
-static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
+static int carl9170_tx_prepare(struct ar9170 *ar,
+			       struct ieee80211_sta *sta,
+			       struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct _carl9170_tx_superframe *txc;
 	struct carl9170_vif_info *cvif;
 	struct ieee80211_tx_info *info;
 	struct ieee80211_tx_rate *txrate;
-	struct ieee80211_sta *sta;
 	struct carl9170_tx_info *arinfo;
 	unsigned int hw_queue;
 	int i;
@@ -910,8 +911,6 @@ static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
 	else
 		cvif = NULL;
 
-	sta = info->control.sta;
-
 	txc = (void *)skb_push(skb, sizeof(*txc));
 	memset(txc, 0, sizeof(*txc));
 
@@ -1457,20 +1456,21 @@ err_unlock_rcu:
 	return false;
 }
 
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb)
 {
 	struct ar9170 *ar = hw->priv;
 	struct ieee80211_tx_info *info;
-	struct ieee80211_sta *sta;
+	struct ieee80211_sta *sta = control->sta;
 	bool run;
 
 	if (unlikely(!IS_STARTED(ar)))
 		goto err_free;
 
 	info = IEEE80211_SKB_CB(skb);
-	sta = info->control.sta;
 
-	if (unlikely(carl9170_tx_prepare(ar, skb)))
+	if (unlikely(carl9170_tx_prepare(ar, sta, skb)))
 		goto err_free;
 
 	carl9170_tx_accounting(ar, skb);
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 1b988f2..b6fc409 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3409,7 +3409,8 @@ static void b43_tx_work(struct work_struct *work)
 }
 
 static void b43_op_tx(struct ieee80211_hw *hw,
-		     struct sk_buff *skb)
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct b43_wl *wl = hw_to_b43_wl(hw);
 
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 8156135..74d4c20 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2492,6 +2492,7 @@ static void b43legacy_tx_work(struct work_struct *work)
 }
 
 static void b43legacy_op_tx(struct ieee80211_hw *hw,
+			    struct ieee80211_tx_control *control,
 			    struct sk_buff *skb)
 {
 	struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 9e79d47..a7be68d 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
 	}
 }
 
-static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void brcms_ops_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct brcms_info *wl = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -276,7 +278,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto done;
 	}
 	brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
-	tx_info->rate_driver_data[0] = tx_info->control.sta;
+	tx_info->rate_driver_data[0] = control->sta;
  done:
 	spin_unlock_bh(&wl->lock);
 }
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index faec404..e252acb 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -460,7 +460,9 @@ il3945_build_tx_cmd_basic(struct il_priv *il, struct il_device_cmd *cmd,
  * start C_TX command process
  */
 static int
-il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il3945_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -512,7 +514,7 @@ il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	hdr_len = ieee80211_hdrlen(fc);
 
 	/* Find idx into station table for destination station */
-	sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+	sta_id = il_sta_id_or_broadcast(il, sta);
 	if (sta_id == IL_INVALID_STATION) {
 		D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
 		goto drop;
@@ -2859,7 +2861,9 @@ il3945_mac_stop(struct ieee80211_hw *hw)
 }
 
 static void
-il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il3945_mac_tx(struct ieee80211_hw *hw,
+	       struct ieee80211_tx_control *control,
+	       struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -2868,7 +2872,7 @@ il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il3945_tx_skb(il, skb))
+	if (il3945_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MAC80211("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 34f61a0..eac4dc8 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -1526,8 +1526,11 @@ il4965_tx_cmd_build_basic(struct il_priv *il, struct sk_buff *skb,
 }
 
 static void
-il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
-			 struct ieee80211_tx_info *info, __le16 fc)
+il4965_tx_cmd_build_rate(struct il_priv *il,
+			 struct il_tx_cmd *tx_cmd,
+			 struct ieee80211_tx_info *info,
+			 struct ieee80211_sta *sta,
+			 __le16 fc)
 {
 	const u8 rts_retry_limit = 60;
 	u32 rate_flags;
@@ -1561,9 +1564,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
 	rate_idx = info->control.rates[0].idx;
 	if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0
 	    || rate_idx > RATE_COUNT_LEGACY)
-		rate_idx =
-		    rate_lowest_index(&il->bands[info->band],
-				      info->control.sta);
+		rate_idx = rate_lowest_index(&il->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IL_FIRST_OFDM_RATE;
@@ -1630,11 +1631,12 @@ il4965_tx_cmd_build_hwcrypto(struct il_priv *il, struct ieee80211_tx_info *info,
  * start C_TX command process
  */
 int
-il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il4965_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct il_station_priv *sta_priv = NULL;
 	struct il_tx_queue *txq;
 	struct il_queue *q;
@@ -1680,7 +1682,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 		sta_id = il->hw_params.bcast_id;
 	else {
 		/* Find idx into station table for destination station */
-		sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+		sta_id = il_sta_id_or_broadcast(il, sta);
 
 		if (sta_id == IL_INVALID_STATION) {
 			D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
@@ -1786,7 +1788,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id);
 
-	il4965_tx_cmd_build_rate(il, tx_cmd, info, fc);
+	il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc);
 
 	il_update_stats(il, true, fc, len);
 	/*
@@ -5828,7 +5830,9 @@ il4965_mac_stop(struct ieee80211_hw *hw)
 }
 
 void
-il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il4965_mac_tx(struct ieee80211_hw *hw,
+	      struct ieee80211_tx_control *control,
+	      struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -5837,7 +5841,7 @@ il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il4965_tx_skb(il, skb))
+	if (il4965_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MACDUMP("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 1db6776..2d092f3 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -78,7 +78,9 @@ int il4965_hw_txq_attach_buf_to_tfd(struct il_priv *il, struct il_tx_queue *txq,
 int il4965_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq);
 void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags,
 				 struct ieee80211_tx_info *info);
-int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb);
+int il4965_tx_skb(struct il_priv *il,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 * ssn);
 int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif,
@@ -163,7 +165,9 @@ void il4965_eeprom_release_semaphore(struct il_priv *il);
 int il4965_eeprom_check_version(struct il_priv *il);
 
 /* mac80211 handlers (for 4965) */
-void il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void il4965_mac_tx(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 int il4965_mac_start(struct ieee80211_hw *hw);
 void il4965_mac_stop(struct ieee80211_hw *hw);
 void il4965_configure_filter(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlwifi/dvm/agn.h b/drivers/net/wireless/iwlwifi/dvm/agn.h
index 9bb16bd..f0b8c1f 100644
--- a/drivers/net/wireless/iwlwifi/dvm/agn.h
+++ b/drivers/net/wireless/iwlwifi/dvm/agn.h
@@ -201,7 +201,9 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success);
 
 
 /* tx */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb);
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 *ssn);
 int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif,
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index a5f7bce..e64af60 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -511,14 +511,16 @@ static void iwlagn_mac_set_wakeup(struct ieee80211_hw *hw, bool enabled)
 }
 #endif
 
-static void iwlagn_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void iwlagn_mac_tx(struct ieee80211_hw *hw,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
 	struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
 
 	IWL_DEBUG_TX(priv, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 		     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (iwlagn_tx_skb(priv, skb))
+	if (iwlagn_tx_skb(priv, control->sta, skb))
 		dev_kfree_skb_any(skb);
 }
 
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
index 5971a23..d17799b 100644
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
@@ -127,6 +127,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
 static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 				     struct iwl_tx_cmd *tx_cmd,
 				     struct ieee80211_tx_info *info,
+				     struct ieee80211_sta *sta,
 				     __le16 fc)
 {
 	u32 rate_flags;
@@ -187,8 +188,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 	if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS ||
 			(rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY))
 		rate_idx = rate_lowest_index(
-				&priv->eeprom_data->bands[info->band],
-				info->control.sta);
+				&priv->eeprom_data->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IWL_FIRST_OFDM_RATE;
@@ -291,7 +291,9 @@ static int iwl_sta_id_or_broadcast(struct iwl_rxon_context *context,
 /*
  * start REPLY_TX command process
  */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -345,7 +347,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 		sta_id = ctx->bcast_sta_id;
 	else {
 		/* Find index into station table for destination station */
-		sta_id = iwl_sta_id_or_broadcast(ctx, info->control.sta);
+		sta_id = iwl_sta_id_or_broadcast(ctx, sta);
 		if (sta_id == IWL_INVALID_STATION) {
 			IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
 				       hdr->addr1);
@@ -355,8 +357,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 
 	IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
 
-	if (info->control.sta)
-		sta_priv = (void *)info->control.sta->drv_priv;
+	if (sta)
+		sta_priv = (void *)sta->drv_priv;
 
 	if (sta_priv && sta_priv->asleep &&
 	    (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) {
@@ -397,7 +399,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	iwlagn_tx_cmd_build_basic(priv, skb, tx_cmd, info, hdr, sta_id);
 
-	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, fc);
+	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, sta, fc);
 
 	memset(&info->status, 0, sizeof(info->status));
 
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index a034572..7001856 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -227,7 +227,9 @@ static void lbtf_free_adapter(struct lbtf_private *priv)
 	lbtf_deb_leave(LBTF_DEB_MAIN);
 }
 
-static void lbtf_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void lbtf_op_tx(struct ieee80211_hw *hw,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct lbtf_private *priv = hw->priv;
 
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 826ac7b..ff20dbb 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -709,7 +709,9 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
 	return ack;
 }
 
-static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
+			      struct ieee80211_tx_control *control,
+			      struct sk_buff *skb)
 {
 	bool ack;
 	struct ieee80211_tx_info *txi;
@@ -741,8 +743,8 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	if (txi->control.vif)
 		hwsim_check_magic(txi->control.vif);
-	if (txi->control.sta)
-		hwsim_check_sta_magic(txi->control.sta);
+	if (control->sta)
+		hwsim_check_sta_magic(control->sta);
 
 	ieee80211_tx_info_clear_status(txi);
 
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 224e03a..5099e53 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1830,12 +1830,14 @@ static inline void mwl8k_tx_count_packet(struct ieee80211_sta *sta, u8 tid)
 }
 
 static void
-mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
+mwl8k_txq_xmit(struct ieee80211_hw *hw,
+	       int index,
+	       struct ieee80211_sta *sta,
+	       struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	struct ieee80211_tx_info *tx_info;
 	struct mwl8k_vif *mwl8k_vif;
-	struct ieee80211_sta *sta;
 	struct ieee80211_hdr *wh;
 	struct mwl8k_tx_queue *txq;
 	struct mwl8k_tx_desc *tx;
@@ -1867,7 +1869,6 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	wh = &((struct mwl8k_dma_data *)skb->data)->wh;
 
 	tx_info = IEEE80211_SKB_CB(skb);
-	sta = tx_info->control.sta;
 	mwl8k_vif = MWL8K_VIF(tx_info->control.vif);
 
 	if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
@@ -2019,8 +2020,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	tx->pkt_phys_addr = cpu_to_le32(dma);
 	tx->pkt_len = cpu_to_le16(skb->len);
 	tx->rate_info = 0;
-	if (!priv->ap_fw && tx_info->control.sta != NULL)
-		tx->peer_id = MWL8K_STA(tx_info->control.sta)->peer_id;
+	if (!priv->ap_fw && sta != NULL)
+		tx->peer_id = MWL8K_STA(sta)->peer_id;
 	else
 		tx->peer_id = 0;
 
@@ -4364,7 +4365,9 @@ static void mwl8k_rx_poll(unsigned long data)
 /*
  * Core driver operations.
  */
-static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mwl8k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	int index = skb_get_queue_mapping(skb);
@@ -4376,7 +4379,7 @@ static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		return;
 	}
 
-	mwl8k_txq_xmit(hw, index, skb);
+	mwl8k_txq_xmit(hw, index, control->sta, skb);
 }
 
 static int mwl8k_start(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/p54/lmac.h b/drivers/net/wireless/p54/lmac.h
index 3d8d622..de1d46b 100644
--- a/drivers/net/wireless/p54/lmac.h
+++ b/drivers/net/wireless/p54/lmac.h
@@ -526,7 +526,9 @@ int p54_init_leds(struct p54_common *priv);
 void p54_unregister_leds(struct p54_common *priv);
 
 /* xmit functions */
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb);
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int p54_tx_cancel(struct p54_common *priv, __le32 req_id);
 void p54_tx(struct p54_common *priv, struct sk_buff *skb);
 
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 7cffea7..5e91ad0 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -158,7 +158,7 @@ static int p54_beacon_update(struct p54_common *priv,
 	 * to cancel the old beacon template by hand, instead the firmware
 	 * will release the previous one through the feedback mechanism.
 	 */
-	p54_tx_80211(priv->hw, beacon);
+	p54_tx_80211(priv->hw, NULL, beacon);
 	priv->tsf_high32 = 0;
 	priv->tsf_low32 = 0;
 
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index f38786e..5861e13 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -676,8 +676,9 @@ int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb)
 EXPORT_SYMBOL_GPL(p54_rx);
 
 static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
-				struct ieee80211_tx_info *info, u8 *queue,
-				u32 *extra_len, u16 *flags, u16 *aid,
+				struct ieee80211_tx_info *info,
+				struct ieee80211_sta *sta,
+				u8 *queue, u32 *extra_len, u16 *flags, u16 *aid,
 				bool *burst_possible)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -746,8 +747,8 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
 			}
 		}
 
-		if (info->control.sta)
-			*aid = info->control.sta->aid;
+		if (sta)
+			*aid = sta->aid;
 		break;
 	}
 }
@@ -767,7 +768,9 @@ static u8 p54_convert_algo(u32 cipher)
 	}
 }
 
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct p54_common *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -784,7 +787,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
 	u8 nrates = 0, nremaining = 8;
 	bool burst_allowed = false;
 
-	p54_tx_80211_header(priv, skb, info, &queue, &extra_len,
+	p54_tx_80211_header(priv, skb, info, control->sta, &queue, &extra_len,
 			    &hdr_flags, &aid, &burst_allowed);
 
 	if (p54_tx_qos_accounting_alloc(priv, skb, queue)) {
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 8afb546..f991e8b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1287,7 +1287,9 @@ void rt2x00lib_rxdone(struct queue_entry *entry, gfp_t gfp);
 /*
  * mac80211 handlers.
  */
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int rt2x00mac_start(struct ieee80211_hw *hw);
 void rt2x00mac_stop(struct ieee80211_hw *hw);
 int rt2x00mac_add_interface(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index a6b88bd..a59048f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -194,7 +194,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
 	 */
 	skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	while (skb) {
-		rt2x00mac_tx(rt2x00dev->hw, skb);
+		rt2x00mac_tx(rt2x00dev->hw, NULL, skb);
 		skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	}
 }
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 4ff26c2..c3d0f2f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -99,7 +99,9 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
 	return retval;
 }
 
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index f7e74a0..e488b94 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -315,6 +315,7 @@ static void rt2x00queue_create_tx_descriptor_plcp(struct rt2x00_dev *rt2x00dev,
 static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 						struct sk_buff *skb,
 						struct txentry_desc *txdesc,
+						struct ieee80211_sta *sta,
 						const struct rt2x00_rate *hwrate)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -322,11 +323,11 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct rt2x00_sta *sta_priv = NULL;
 
-	if (tx_info->control.sta) {
+	if (sta) {
 		txdesc->u.ht.mpdu_density =
-		    tx_info->control.sta->ht_cap.ampdu_density;
+		    sta->ht_cap.ampdu_density;
 
-		sta_priv = sta_to_rt2x00_sta(tx_info->control.sta);
+		sta_priv = sta_to_rt2x00_sta(sta);
 		txdesc->u.ht.wcid = sta_priv->wcid;
 	}
 
@@ -341,8 +342,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 		 * MIMO PS should be set to 1 for STA's using dynamic SM PS
 		 * when using more then one tx stream (>MCS7).
 		 */
-		if (tx_info->control.sta && txdesc->u.ht.mcs > 7 &&
-		    ((tx_info->control.sta->ht_cap.cap &
+		if (sta && txdesc->u.ht.mcs > 7 &&
+		    ((sta->ht_cap.cap &
 		      IEEE80211_HT_CAP_SM_PS) >>
 		     IEEE80211_HT_CAP_SM_PS_SHIFT) ==
 		    WLAN_HT_CAP_SM_PS_DYNAMIC)
@@ -409,7 +410,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 
 static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 					     struct sk_buff *skb,
-					     struct txentry_desc *txdesc)
+					     struct txentry_desc *txdesc,
+					     struct ieee80211_sta *sta)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -503,7 +505,7 @@ static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 
 	if (test_bit(REQUIRE_HT_TX_DESC, &rt2x00dev->cap_flags))
 		rt2x00queue_create_tx_descriptor_ht(rt2x00dev, skb, txdesc,
-						    hwrate);
+						   sta, hwrate);
 	else
 		rt2x00queue_create_tx_descriptor_plcp(rt2x00dev, skb, txdesc,
 						      hwrate);
@@ -595,7 +597,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc, NULL);
 
 	/*
 	 * All information is retrieved from the skb->cb array,
@@ -740,7 +742,7 @@ int rt2x00queue_update_beacon_locked(struct rt2x00_dev *rt2x00dev,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc, NULL);
 
 	/*
 	 * Fill in skb descriptor
diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 3b50539..fd8fcbd 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -244,7 +244,9 @@ static irqreturn_t rtl8180_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static void rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8180_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -710,7 +712,7 @@ static void rtl8180_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8180_tx(dev, skb);
+	rtl8180_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index 4fb1ca1..c7bfcf3 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -228,7 +228,9 @@ static void rtl8187_tx_cb(struct urb *urb)
 	}
 }
 
-static void rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8187_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct rtl8187_priv *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1076,7 +1078,7 @@ static void rtl8187_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8187_tx(dev, skb);
+	rtl8187_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 41f7f12..1b2ffdb 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -1341,9 +1341,8 @@ int rtl_send_smps_action(struct ieee80211_hw *hw,
 		rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
 
 		info->control.rates[0].idx = 0;
-		info->control.sta = sta;
 		info->band = hw->conf.channel->band;
-		rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+		rtlpriv->intf_ops->adapter_tx(hw, sta, skb, &tcb_desc);
 	}
 err_free:
 	return 0;
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 278e9f9..db903fd 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -124,7 +124,9 @@ static void rtl_op_stop(struct ieee80211_hw *hw)
 	mutex_unlock(&rtlpriv->locks.conf_mutex);
 }
 
-static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void rtl_op_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
@@ -138,8 +140,8 @@ static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	if (!test_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status))
 		goto err_free;
 
-	if (!rtlpriv->intf_ops->waitq_insert(hw, skb))
-		rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+	if (!rtlpriv->intf_ops->waitq_insert(hw, control->sta, skb))
+		rtlpriv->intf_ops->adapter_tx(hw, control->sta, skb, &tcb_desc);
 
 	return;
 
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 2c6eb9e..0bde0ce 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -504,7 +504,7 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
 				_rtl_update_earlymode_info(hw, skb,
 							   &tcb_desc, tid);
 
-			rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+			rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, &tcb_desc);
 		}
 	}
 }
@@ -929,7 +929,7 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
 	info = IEEE80211_SKB_CB(pskb);
 	pdesc = &ring->desc[0];
 	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc,
-		info, pskb, BEACON_QUEUE, &tcb_desc);
+		info, NULL, pskb, BEACON_QUEUE, &tcb_desc);
 
 	__skb_queue_tail(&ring->queue, pskb);
 
@@ -1305,11 +1305,10 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw)
 }
 
 static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta,
 					struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct rtl_sta_info *sta_entry = NULL;
 	u8 tid = rtl_get_tid(skb);
 
@@ -1337,13 +1336,14 @@ static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
 	return true;
 }
 
-static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
-		struct rtl_tcb_desc *ptcb_desc)
+static int rtl_pci_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_sta *sta,
+		      struct sk_buff *skb,
+		      struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_sta_info *sta_entry = NULL;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct rtl8192_tx_ring *ring;
 	struct rtl_tx_desc *pdesc;
 	u8 idx;
@@ -1418,7 +1418,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
 
 	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc,
-			info, skb, hw_queue, ptcb_desc);
+			info, sta, skb, hw_queue, ptcb_desc);
 
 	__skb_queue_tail(&ring->queue, skb);
 
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
index 3af874e..1b13001 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
@@ -596,7 +596,9 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
 
 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 hw_queue, struct rtl_tcb_desc *tcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -604,7 +606,6 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	bool defaultadapter = true;
-	struct ieee80211_sta *sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
index c4adb97..a7cdd51 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
@@ -713,6 +713,7 @@ struct rx_desc_92c {
 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
index 21bc827..bb528a7 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
@@ -496,7 +496,9 @@ static void _rtl_tx_desc_checksum(u8 *txdesc)
 
 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 queue_index,
 			  struct rtl_tcb_desc *tcb_desc)
 {
@@ -504,7 +506,6 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	bool defaultadapter = true;
-	struct ieee80211_sta *sta = info->control.sta = info->control.sta;
 	u8 *qc = ieee80211_get_qos_ctl(hdr);
 	u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
 	u16 seq_number;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
index 332b06e..725c53a 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
@@ -420,7 +420,9 @@ struct sk_buff *rtl8192c_tx_aggregate_hdl(struct ieee80211_hw *,
 					   struct sk_buff_head *);
 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 queue_index,
 			  struct rtl_tcb_desc *tcb_desc);
 void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
index 1666ef7..323450e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
@@ -551,7 +551,9 @@ static void _rtl92de_insert_emcontent(struct rtl_tcb_desc *ptcb_desc,
 
 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -559,7 +561,6 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
-	struct ieee80211_sta *sta = info->control.sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
index 057a524..c1b5dfb 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
@@ -730,6 +730,7 @@ struct rx_desc_92d {
 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 bool rtl92de_rx_query_desc(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
index 812b585..55cb73f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
@@ -591,14 +591,15 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
 
 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
 		struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-		struct ieee80211_tx_info *info, struct sk_buff *skb,
+		struct ieee80211_tx_info *info,
+		struct ieee80211_sta *sta,
+		struct sk_buff *skb,
 		u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-	struct ieee80211_sta *sta = info->control.sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
index 011e7b0..64dd66f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
@@ -31,6 +31,7 @@
 
 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, bool firstseg,
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index aa970fc..9140469 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -848,8 +848,10 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
 	_rtl_submit_tx_urb(hw, _urb);
 }
 
-static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
-			    u16 hw_queue)
+static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw,
+				   struct ieee80211_sta *sta,
+				   struct sk_buff *skb,
+				   u16 hw_queue)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
@@ -891,7 +893,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
 		seq_number += 1;
 		seq_number <<= 4;
 	}
-	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, skb,
+	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, sta, skb,
 					hw_queue, &tcb_desc);
 	if (!ieee80211_has_morefrags(hdr->frame_control)) {
 		if (qc)
@@ -901,7 +903,9 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
 		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
 }
 
-static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
+static int rtl_usb_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_sta *sta,
+		      struct sk_buff *skb,
 		      struct rtl_tcb_desc *dummy)
 {
 	struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
@@ -913,7 +917,7 @@ static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 	if (unlikely(is_hal_stop(rtlhal)))
 		goto err_free;
 	hw_queue = rtlusb->usb_mq_to_hwq(fc, skb_get_queue_mapping(skb));
-	_rtl_usb_tx_preprocess(hw, skb, hw_queue);
+	_rtl_usb_tx_preprocess(hw, sta, skb, hw_queue);
 	_rtl_usb_transmit(hw, skb, hw_queue);
 	return NETDEV_TX_OK;
 
@@ -923,6 +927,7 @@ err_free:
 }
 
 static bool rtl_usb_tx_chk_waitq_insert(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta,
 					struct sk_buff *skb)
 {
 	return false;
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index cdaa21f..40153e7 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -122,7 +122,7 @@ enum rt_eeprom_type {
 	EEPROM_BOOT_EFUSE,
 };
 
-enum rtl_status {
+enum ttl_status {
 	RTL_STATUS_INTERFACE_START = 0,
 };
 
@@ -1418,6 +1418,7 @@ struct rtl_hal_ops {
 	void (*fill_tx_desc) (struct ieee80211_hw *hw,
 			      struct ieee80211_hdr *hdr, u8 *pdesc_tx,
 			      struct ieee80211_tx_info *info,
+			      struct ieee80211_sta *sta,
 			      struct sk_buff *skb, u8 hw_queue,
 			      struct rtl_tcb_desc *ptcb_desc);
 	void (*fill_fake_txdesc) (struct ieee80211_hw *hw, u8 *pDesc,
@@ -1475,11 +1476,15 @@ struct rtl_intf_ops {
 	int (*adapter_start) (struct ieee80211_hw *hw);
 	void (*adapter_stop) (struct ieee80211_hw *hw);
 
-	int (*adapter_tx) (struct ieee80211_hw *hw, struct sk_buff *skb,
-			struct rtl_tcb_desc *ptcb_desc);
+	int (*adapter_tx) (struct ieee80211_hw *hw,
+			   struct ieee80211_sta *sta,
+			   struct sk_buff *skb,
+			   struct rtl_tcb_desc *ptcb_desc);
 	void (*flush)(struct ieee80211_hw *hw, bool drop);
 	int (*reset_trx_ring) (struct ieee80211_hw *hw);
-	bool (*waitq_insert) (struct ieee80211_hw *hw, struct sk_buff *skb);
+	bool (*waitq_insert) (struct ieee80211_hw *hw,
+			      struct ieee80211_sta *sta,
+			      struct sk_buff *skb);
 
 	/*pci */
 	void (*disable_aspm) (struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index 3118c42..441cbcc 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -354,7 +354,9 @@ out:
 	return ret;
 }
 
-static void wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1251_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1251 *wl = hw->priv;
 	unsigned long flags;
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 9f04b64..cbce2ea 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1166,7 +1166,9 @@ out:
 	return ret;
 }
 
-static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1271_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1271 *wl = hw->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1182,7 +1184,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	mapping = skb_get_queue_mapping(skb);
 	q = wl1271_tx_get_queue(mapping);
 
-	hlid = wl12xx_tx_get_hlid(wl, wlvif, skb);
+	hlid = wl12xx_tx_get_hlid(wl, wlvif, sta, skb);
 
 	spin_lock_irqsave(&wl->wl_lock, flags);
 
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index 6a28aee..2027d70 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -131,15 +131,15 @@ bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb)
 EXPORT_SYMBOL(wl12xx_is_dummy_packet);
 
 u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif,
-			 struct sk_buff *skb)
+			 struct ieee80211_sta *sta, struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *control = IEEE80211_SKB_CB(skb);
 
-	if (control->control.sta) {
+	if (sta) {
 		struct wl1271_station *wl_sta;
 
 		wl_sta = (struct wl1271_station *)
-				control->control.sta->drv_priv;
+				sta->drv_priv;
 		return wl_sta->hlid;
 	} else {
 		struct ieee80211_hdr *hdr;
@@ -164,7 +164,7 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		return wl->system_hlid;
 
 	if (wlvif->bss_type == BSS_TYPE_AP_BSS)
-		return wl12xx_tx_get_hlid_ap(wl, wlvif, skb);
+		return wl12xx_tx_get_hlid_ap(wl, wlvif, sta, skb);
 
 	if ((test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) ||
 	     test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags)) &&
@@ -256,7 +256,9 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	__le16 frame_control;
 	struct ieee80211_hdr *hdr;
 	u8 *frame_start;
-	bool is_dummy;
+	bool is_dummy;i
+	struct ieee80211_sta *sta,
+	struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
 
 	desc = (struct wl1271_tx_hw_descr *) skb->data;
 	frame_start = (u8 *)(desc + 1);
@@ -310,14 +312,19 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		 * send them with AP rate policies (EAPOLs are an exception),
 		 * otherwise use default basic rates
 		 */
+
+		rcu_read_lock();
+		sta = ieee80211_find_sta(vif, wl->links[hlid].addr);
+
 		if (control->flags & IEEE80211_TX_CTL_NO_CCK_RATE)
 			rate_idx = wlvif->sta.p2p_rate_idx;
 		else if (skb->protocol == cpu_to_be16(ETH_P_PAE))
 			rate_idx = wlvif->sta.basic_rate_idx;
-		else if (control->control.sta)
+		else if (sta)
 			rate_idx = wlvif->sta.ap_rate_idx;
 		else
 			rate_idx = wlvif->sta.basic_rate_idx;
+		rcu_read_unlock();
 	} else {
 		if (hlid == wlvif->ap.global_hlid)
 			rate_idx = wlvif->ap.mgmt_rate_idx;
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index c9e2660..4598801 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -937,7 +937,9 @@ static int fill_ctrlset(struct zd_mac *mac,
  * control block of the skbuff will be initialized. If necessary the incoming
  * mac80211 queues will be stopped.
  */
-static void zd_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void zd_op_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct zd_mac *mac = zd_hw_mac(hw);
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1176,7 +1178,7 @@ static void zd_beacon_done(struct zd_mac *mac)
 		skb = ieee80211_get_buffered_bc(mac->hw, mac->vif);
 		if (!skb)
 			break;
-		zd_op_tx(mac->hw, skb);
+		zd_op_tx(mac->hw, NULL, skb);
 	}
 
 	/*
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index c3751a7..c6566e5 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -119,7 +119,9 @@ static void wbsoft_configure_filter(struct ieee80211_hw *dev,
 	*total_flags = new_flags;
 }
 
-static void wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void wbsoft_tx(struct ieee80211_hw *dev,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct wbsoft_priv *priv = dev->priv;
 
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index bb86aa6..4309d8a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -522,9 +522,6 @@ struct ieee80211_tx_rate {
  *  (2) driver internal use (if applicable)
  *  (3) TX status information - driver tells mac80211 what happened
  *
- * The TX control's sta pointer is only valid during the ->tx call,
- * it may be NULL.
- *
  * @flags: transmit info flags, defined above
  * @band: the band to transmit on (use for checking for races)
  * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC
@@ -555,6 +552,7 @@ struct ieee80211_tx_info {
 					struct ieee80211_tx_rate rates[
 						IEEE80211_TX_MAX_RATES];
 					s8 rts_cts_rate_idx;
+					/* 3 bytes free */
 				};
 				/* only needed before rate control */
 				unsigned long jiffies;
@@ -562,7 +560,7 @@ struct ieee80211_tx_info {
 			/* NB: vif can be NULL for injected frames */
 			struct ieee80211_vif *vif;
 			struct ieee80211_key_conf *hw_key;
-			struct ieee80211_sta *sta;
+			/* 8 bytes free */
 		} control;
 		struct {
 			struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
@@ -1074,6 +1072,16 @@ enum sta_notify_cmd {
 };
 
 /**
+ * struct ieee80211_tx_control - TX control data
+ *
+ * @sta: station table entry, this sta pointer may be NULL and
+ * 	it is not allowed to copy the pointer, due to RCU.
+ */
+struct ieee80211_tx_control {
+	struct ieee80211_sta *sta;
+};
+
+/**
  * enum ieee80211_hw_flags - hardware flags
  *
  * These flags are used to indicate hardware capabilities to
@@ -2264,7 +2272,9 @@ enum ieee80211_rate_control_changed {
  *	The callback is optional and can (should!) sleep.
  */
 struct ieee80211_ops {
-	void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
+	void (*tx)(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 	int (*start)(struct ieee80211_hw *hw);
 	void (*stop)(struct ieee80211_hw *hw);
 #ifdef CONFIG_PM
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index df92031..a81117a 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -22,9 +22,11 @@ get_bss_sdata(struct ieee80211_sub_if_data *sdata)
 	return sdata;
 }
 
-static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
+static inline void drv_tx(struct ieee80211_local *local,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
-	local->ops->tx(&local->hw, skb);
+	local->ops->tx(&local->hw, control, skb);
 }
 
 static inline void drv_get_et_strings(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 7998513..6258da6 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -196,6 +196,8 @@ struct ieee80211_tx_data {
 	struct ieee80211_channel *channel;
 
 	unsigned int flags;
+
+	struct ieee80211_tx_control control;
 };
 
 
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index acf712f..7706f01 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1201,6 +1201,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
 static bool ieee80211_tx_frags(struct ieee80211_local *local,
 			       struct ieee80211_vif *vif,
 			       struct ieee80211_sta *sta,
+			       struct ieee80211_tx_control *control,
 			       struct sk_buff_head *skbs,
 			       bool txpending)
 {
@@ -1240,10 +1241,10 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
 		spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 
 		info->control.vif = vif;
-		info->control.sta = sta;
+		control->sta = sta;
 
 		__skb_unlink(skb, skbs);
-		drv_tx(local, skb);
+		drv_tx(local, control, skb);
 	}
 
 	return true;
@@ -1253,6 +1254,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
  * Returns false if the frame couldn't be transmitted but was queued instead.
  */
 static bool __ieee80211_tx(struct ieee80211_local *local,
+			   struct ieee80211_tx_control *control,
 			   struct sk_buff_head *skbs, int led_len,
 			   struct sta_info *sta, bool txpending)
 {
@@ -1301,7 +1303,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
 		break;
 	}
 
-	result = ieee80211_tx_frags(local, vif, pubsta, skbs,
+	result = ieee80211_tx_frags(local, vif, pubsta, control, skbs,
 				    txpending);
 
 	ieee80211_tpt_led_trig_tx(local, fc, led_len);
@@ -1409,7 +1411,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
 			sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
 
 	if (!invoke_tx_handlers(&tx))
-		result = __ieee80211_tx(local, &tx.skbs, led_len,
+		result = __ieee80211_tx(local, &tx.control, &tx.skbs, led_len,
 					tx.sta, txpending);
  out:
 	rcu_read_unlock();
@@ -2154,6 +2156,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
 	struct ieee80211_sub_if_data *sdata;
 	struct sta_info *sta;
 	struct ieee80211_hdr *hdr;
+	struct ieee80211_tx_control control;
 	bool result;
 
 	sdata = vif_to_sdata(info->control.vif);
@@ -2169,7 +2172,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
 		hdr = (struct ieee80211_hdr *)skb->data;
 		sta = sta_info_get(sdata, hdr->addr1);
 
-		result = __ieee80211_tx(local, &skbs, skb->len, sta, true);
+		result = __ieee80211_tx(local, &control, &skbs, skb->len, sta, true);
 	}
 
 	return result;
-- 
1.7.11.1



From thomas at net.t-labs.tu-berlin.de  Tue Jul 17 16:16:13 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Tue, 17 Jul 2012 22:16:13 +0200
Subject: [PATCH v3 1/2] mac80211_hwsim: fix possible race condition in usage
 of info->control.sta & control.vif
In-Reply-To: <1342556174-23769-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
References: <1342556174-23769-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
Message-ID: <1342556174-23769-2-git-send-email-thomas@net.t-labs.tu-berlin.de>

info->control.sta and control.vif may only be dereferenced during the
drv_tx call otherwise could lead to use-after-free bugs.

Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
---
 drivers/net/wireless/mac80211_hwsim.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 3f38d84..826ac7b 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1540,11 +1540,6 @@ static int hwsim_tx_info_frame_received_nl(struct sk_buff *skb_2,
 	/* now send back TX status */
 	txi = IEEE80211_SKB_CB(skb);
 
-	if (txi->control.vif)
-		hwsim_check_magic(txi->control.vif);
-	if (txi->control.sta)
-		hwsim_check_sta_magic(txi->control.sta);
-
 	ieee80211_tx_info_clear_status(txi);
 
 	for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
-- 
1.7.11.1



From thomas at net.t-labs.tu-berlin.de  Tue Jul 17 16:16:12 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Tue, 17 Jul 2012 22:16:12 +0200
Subject: [PATCH v3 0/0] mac80211: Restructure ieee80211_tx_info->control to
 gain free space along tx-path 
Message-ID: <1342556174-23769-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

In order to enable new annotations per data packet along the max80211 tx-path,
(e.g. upcoming Transmit Power Control (TPC) per packet) this patch-serie does:

- fix the ieee80211_tx_info->control usage in driver mac80211_hwsim
- remove control.sta from ieee80211_tx_info and adapt all affected drivers


Greetings Thomas                                                                                                                                                                                                                        

---
CC list is a reduced "get_maintainer.pl", focuses on mailing lists - suggested
by J. Berg



From thomas at net.t-labs.tu-berlin.de  Tue Jul 17 16:16:14 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Tue, 17 Jul 2012 22:16:14 +0200
Subject: [PATCH v3 2/2] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1342556174-23769-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
References: <1342556174-23769-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
Message-ID: <1342556174-23769-3-git-send-email-thomas@net.t-labs.tu-berlin.de>

The pointer control.sta is removed from ieee80211_tx_info to free up
sufficient memory in SKB_CB on the tx-path to enable new annotations
per data packet e.g.support of upcoming Transmit Power Control (TPC).
Now the control.sta pointer is put on the stack where passed as
function parameter to the .tx equivalent (ieee80211_ops) of each
affected wireless driver.
Therefore a new structure ieee80211_tx_control is added to mac80211.h
which holds the sta structure instead. The tx-path of all affected
drivers is restructured to respect the chaneges.

Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
Signed-off-by: Alina Friedrichsen <x-alina at gmx.net>
Signed-off-by: Felix Fietkau <nbd at openwrt.org>
---
restructure this patch to respect logical API evolutions. thx to Johannes Berg
add missing drivers that are effected as well. thx to Xose Vazquez Perez
add missing drivers that are effected as well. thx to Johannes Berg
---
 drivers/net/wireless/adm8211.c                     |  4 +++-
 drivers/net/wireless/at76c50x-usb.c                |  4 +++-
 drivers/net/wireless/ath/ath5k/mac80211-ops.c      |  3 ++-
 drivers/net/wireless/ath/ath9k/ath9k.h             |  1 +
 drivers/net/wireless/ath/ath9k/htc.h               |  1 +
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c    |  2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |  6 +++--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |  2 +-
 drivers/net/wireless/ath/ath9k/main.c              |  5 ++++-
 drivers/net/wireless/ath/ath9k/xmit.c              |  9 ++++----
 drivers/net/wireless/ath/carl9170/carl9170.h       |  4 +++-
 drivers/net/wireless/ath/carl9170/tx.c             | 16 ++++++-------
 drivers/net/wireless/b43/main.c                    |  3 ++-
 drivers/net/wireless/b43legacy/main.c              |  1 +
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
 drivers/net/wireless/iwlegacy/3945-mac.c           | 12 ++++++----
 drivers/net/wireless/iwlegacy/4965-mac.c           | 26 +++++++++++++---------
 drivers/net/wireless/iwlegacy/4965.h               |  8 +++++--
 drivers/net/wireless/iwlwifi/dvm/agn.h             |  4 +++-
 drivers/net/wireless/iwlwifi/dvm/mac80211.c        |  6 +++--
 drivers/net/wireless/iwlwifi/dvm/tx.c              | 16 +++++++------
 drivers/net/wireless/libertas_tf/main.c            |  4 +++-
 drivers/net/wireless/mac80211_hwsim.c              |  8 ++++---
 drivers/net/wireless/mwl8k.c                       | 17 ++++++++------
 drivers/net/wireless/p54/lmac.h                    |  4 +++-
 drivers/net/wireless/p54/main.c                    |  2 +-
 drivers/net/wireless/p54/txrx.c                    | 15 ++++++++-----
 drivers/net/wireless/rt2x00/rt2x00.h               |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00dev.c            |  2 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c            |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00queue.c          | 20 +++++++++--------
 drivers/net/wireless/rtl818x/rtl8180/dev.c         |  6 +++--
 drivers/net/wireless/rtl818x/rtl8187/dev.c         |  6 +++--
 drivers/net/wireless/rtlwifi/base.c                |  3 +--
 drivers/net/wireless/rtlwifi/core.c                |  8 ++++---
 drivers/net/wireless/rtlwifi/pci.c                 | 16 ++++++-------
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.h       |  4 +++-
 drivers/net/wireless/rtlwifi/rtl8192de/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192de/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/rtl8192se/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192se/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/usb.c                 | 15 ++++++++-----
 drivers/net/wireless/rtlwifi/wifi.h                | 13 +++++++----
 drivers/net/wireless/ti/wl1251/main.c              |  4 +++-
 drivers/net/wireless/ti/wlcore/main.c              |  6 +++--
 drivers/net/wireless/ti/wlcore/tx.c                | 19 +++++++++++-----
 drivers/net/wireless/zd1211rw/zd_mac.c             |  6 +++--
 drivers/staging/winbond/wbusb.c                    |  4 +++-
 include/net/mac80211.h                             | 20 ++++++++++++-----
 net/mac80211/driver-ops.h                          |  6 +++--
 net/mac80211/ieee80211_i.h                         |  2 ++
 net/mac80211/tx.c                                  | 13 ++++++-----
 55 files changed, 252 insertions(+), 141 deletions(-)

diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 0ac09a2..b661ce2 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1661,7 +1661,9 @@ static void adm8211_tx_raw(struct ieee80211_hw *dev, struct sk_buff *skb,
 }
 
 /* Put adm8211_tx_hdr on skb and transmit */
-static void adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void adm8211_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct adm8211_tx_hdr *txhdr;
 	size_t payload_len, hdrlen;
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index efc162e..abb520d 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1726,7 +1726,9 @@ static void at76_mac80211_tx_callback(struct urb *urb)
 	ieee80211_wake_queues(priv->hw);
 }
 
-static void at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void at76_mac80211_tx(struct ieee80211_hw *hw,
+			     struct ieee80211_tx_control *control,
+			     struct sk_buff *skb)
 {
 	struct at76_priv *priv = hw->priv;
 	struct at76_tx_buffer *tx_buffer = priv->bulk_out_buffer;
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 22b80af..93a800f 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -55,7 +55,8 @@
 \********************/
 
 static void
-ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+ath5k_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
+	 struct sk_buff *skb)
 {
 	struct ath5k_hw *ah = hw->priv;
 	u16 qnum = skb_get_queue_mapping(skb);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 54f0c9d0..9a08d9f 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -280,6 +280,7 @@ struct ath_tx_control {
 	struct ath_txq *txq;
 	struct ath_node *an;
 	u8 paprd;
+	struct ieee80211_sta *sta;
 };
 
 #define ATH_TX_ERROR        0x01
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 936e920..b30596f 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -542,6 +542,7 @@ void ath9k_htc_stop_ani(struct ath9k_htc_priv *priv);
 
 int ath9k_tx_init(struct ath9k_htc_priv *priv);
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb, u8 slot, bool is_cab);
 void ath9k_tx_cleanup(struct ath9k_htc_priv *priv);
 bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index 77d541f..f42d2eb 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -326,7 +326,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv,
 			goto next;
 		}
 
-		ret = ath9k_htc_tx_start(priv, skb, tx_slot, true);
+		ret = ath9k_htc_tx_start(priv, NULL, skb, tx_slot, true);
 		if (ret != 0) {
 			ath9k_htc_tx_clear_slot(priv, tx_slot);
 			dev_kfree_skb_any(skb);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index 374c32e..ee053b2 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -856,7 +856,9 @@ set_timer:
 /* mac80211 Callbacks */
 /**********************/
 
-static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_htc_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct ath9k_htc_priv *priv = hw->priv;
@@ -883,7 +885,7 @@ static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto fail_tx;
 	}
 
-	ret = ath9k_htc_tx_start(priv, skb, slot, false);
+	ret = ath9k_htc_tx_start(priv, control->sta, skb, slot, false);
 	if (ret != 0) {
 		ath_dbg(common, XMIT, "Tx failed\n");
 		goto clear_slot;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 47e61d0..06cdcb7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -333,12 +333,12 @@ static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,
 }
 
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb,
 		       u8 slot, bool is_cab)
 {
 	struct ieee80211_hdr *hdr;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_vif *vif = tx_info->control.vif;
 	struct ath9k_htc_sta *ista;
 	struct ath9k_htc_vif *avp = NULL;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 01a5f18..45a77ff 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -691,7 +691,9 @@ mutex_unlock:
 	return r;
 }
 
-static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct ath_softc *sc = hw->priv;
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
@@ -751,6 +753,7 @@ static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	memset(&txctl, 0, sizeof(struct ath_tx_control));
 	txctl.txq = sc->tx.txq_map[skb_get_queue_mapping(skb)];
+	txctl.sta = control->sta;
 
 	ath_dbg(common, XMIT, "transmitting packet, skb: %p\n", skb);
 
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index cafb4a0..4912214 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1771,11 +1771,12 @@ static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
 	TX_STAT_INC(txq->axq_qnum, queued);
 }
 
-static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb,
+static void setup_frame_info(struct ieee80211_hw *hw,
+			     struct ieee80211_sta *sta,
+			     struct sk_buff *skb,
 			     int framelen)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	const struct ieee80211_rate *rate;
@@ -1933,7 +1934,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
+	struct ieee80211_sta *sta = txctl->sta;
 	struct ieee80211_vif *vif = info->control.vif;
 	struct ath_softc *sc = hw->priv;
 	struct ath_txq *txq = txctl->txq;
@@ -1977,7 +1978,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	    !ieee80211_is_data(hdr->frame_control))
 		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
 
-	setup_frame_info(hw, skb, frmlen);
+	setup_frame_info(hw, sta, skb, frmlen);
 
 	/*
 	 * At this point, the vif, hw_key and sta pointers in the tx control
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index 376be11..8f0cbc3 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -577,7 +577,9 @@ void carl9170_rx(struct ar9170 *ar, void *buf, unsigned int len);
 void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len);
 
 /* TX */
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb);
 void carl9170_tx_janitor(struct work_struct *work);
 void carl9170_tx_process_status(struct ar9170 *ar,
 				const struct carl9170_rsp *cmd);
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 6a86814..84377cf 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -867,14 +867,15 @@ static bool carl9170_tx_cts_check(struct ar9170 *ar,
 	return false;
 }
 
-static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
+static int carl9170_tx_prepare(struct ar9170 *ar,
+			       struct ieee80211_sta *sta,
+			       struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct _carl9170_tx_superframe *txc;
 	struct carl9170_vif_info *cvif;
 	struct ieee80211_tx_info *info;
 	struct ieee80211_tx_rate *txrate;
-	struct ieee80211_sta *sta;
 	struct carl9170_tx_info *arinfo;
 	unsigned int hw_queue;
 	int i;
@@ -910,8 +911,6 @@ static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
 	else
 		cvif = NULL;
 
-	sta = info->control.sta;
-
 	txc = (void *)skb_push(skb, sizeof(*txc));
 	memset(txc, 0, sizeof(*txc));
 
@@ -1457,20 +1456,21 @@ err_unlock_rcu:
 	return false;
 }
 
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb)
 {
 	struct ar9170 *ar = hw->priv;
 	struct ieee80211_tx_info *info;
-	struct ieee80211_sta *sta;
+	struct ieee80211_sta *sta = control->sta;
 	bool run;
 
 	if (unlikely(!IS_STARTED(ar)))
 		goto err_free;
 
 	info = IEEE80211_SKB_CB(skb);
-	sta = info->control.sta;
 
-	if (unlikely(carl9170_tx_prepare(ar, skb)))
+	if (unlikely(carl9170_tx_prepare(ar, sta, skb)))
 		goto err_free;
 
 	carl9170_tx_accounting(ar, skb);
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 1b988f2..b6fc409 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3409,7 +3409,8 @@ static void b43_tx_work(struct work_struct *work)
 }
 
 static void b43_op_tx(struct ieee80211_hw *hw,
-		     struct sk_buff *skb)
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct b43_wl *wl = hw_to_b43_wl(hw);
 
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 8156135..74d4c20 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2492,6 +2492,7 @@ static void b43legacy_tx_work(struct work_struct *work)
 }
 
 static void b43legacy_op_tx(struct ieee80211_hw *hw,
+			    struct ieee80211_tx_control *control,
 			    struct sk_buff *skb)
 {
 	struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 9e79d47..a7be68d 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
 	}
 }
 
-static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void brcms_ops_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct brcms_info *wl = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -276,7 +278,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto done;
 	}
 	brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
-	tx_info->rate_driver_data[0] = tx_info->control.sta;
+	tx_info->rate_driver_data[0] = control->sta;
  done:
 	spin_unlock_bh(&wl->lock);
 }
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index faec404..e252acb 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -460,7 +460,9 @@ il3945_build_tx_cmd_basic(struct il_priv *il, struct il_device_cmd *cmd,
  * start C_TX command process
  */
 static int
-il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il3945_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -512,7 +514,7 @@ il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	hdr_len = ieee80211_hdrlen(fc);
 
 	/* Find idx into station table for destination station */
-	sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+	sta_id = il_sta_id_or_broadcast(il, sta);
 	if (sta_id == IL_INVALID_STATION) {
 		D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
 		goto drop;
@@ -2859,7 +2861,9 @@ il3945_mac_stop(struct ieee80211_hw *hw)
 }
 
 static void
-il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il3945_mac_tx(struct ieee80211_hw *hw,
+	       struct ieee80211_tx_control *control,
+	       struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -2868,7 +2872,7 @@ il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il3945_tx_skb(il, skb))
+	if (il3945_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MAC80211("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 34f61a0..eac4dc8 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -1526,8 +1526,11 @@ il4965_tx_cmd_build_basic(struct il_priv *il, struct sk_buff *skb,
 }
 
 static void
-il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
-			 struct ieee80211_tx_info *info, __le16 fc)
+il4965_tx_cmd_build_rate(struct il_priv *il,
+			 struct il_tx_cmd *tx_cmd,
+			 struct ieee80211_tx_info *info,
+			 struct ieee80211_sta *sta,
+			 __le16 fc)
 {
 	const u8 rts_retry_limit = 60;
 	u32 rate_flags;
@@ -1561,9 +1564,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
 	rate_idx = info->control.rates[0].idx;
 	if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0
 	    || rate_idx > RATE_COUNT_LEGACY)
-		rate_idx =
-		    rate_lowest_index(&il->bands[info->band],
-				      info->control.sta);
+		rate_idx = rate_lowest_index(&il->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IL_FIRST_OFDM_RATE;
@@ -1630,11 +1631,12 @@ il4965_tx_cmd_build_hwcrypto(struct il_priv *il, struct ieee80211_tx_info *info,
  * start C_TX command process
  */
 int
-il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il4965_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct il_station_priv *sta_priv = NULL;
 	struct il_tx_queue *txq;
 	struct il_queue *q;
@@ -1680,7 +1682,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 		sta_id = il->hw_params.bcast_id;
 	else {
 		/* Find idx into station table for destination station */
-		sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+		sta_id = il_sta_id_or_broadcast(il, sta);
 
 		if (sta_id == IL_INVALID_STATION) {
 			D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
@@ -1786,7 +1788,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id);
 
-	il4965_tx_cmd_build_rate(il, tx_cmd, info, fc);
+	il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc);
 
 	il_update_stats(il, true, fc, len);
 	/*
@@ -5828,7 +5830,9 @@ il4965_mac_stop(struct ieee80211_hw *hw)
 }
 
 void
-il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il4965_mac_tx(struct ieee80211_hw *hw,
+	      struct ieee80211_tx_control *control,
+	      struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -5837,7 +5841,7 @@ il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il4965_tx_skb(il, skb))
+	if (il4965_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MACDUMP("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 1db6776..2d092f3 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -78,7 +78,9 @@ int il4965_hw_txq_attach_buf_to_tfd(struct il_priv *il, struct il_tx_queue *txq,
 int il4965_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq);
 void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags,
 				 struct ieee80211_tx_info *info);
-int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb);
+int il4965_tx_skb(struct il_priv *il,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 * ssn);
 int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif,
@@ -163,7 +165,9 @@ void il4965_eeprom_release_semaphore(struct il_priv *il);
 int il4965_eeprom_check_version(struct il_priv *il);
 
 /* mac80211 handlers (for 4965) */
-void il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void il4965_mac_tx(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 int il4965_mac_start(struct ieee80211_hw *hw);
 void il4965_mac_stop(struct ieee80211_hw *hw);
 void il4965_configure_filter(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlwifi/dvm/agn.h b/drivers/net/wireless/iwlwifi/dvm/agn.h
index 9bb16bd..f0b8c1f 100644
--- a/drivers/net/wireless/iwlwifi/dvm/agn.h
+++ b/drivers/net/wireless/iwlwifi/dvm/agn.h
@@ -201,7 +201,9 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success);
 
 
 /* tx */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb);
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 *ssn);
 int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif,
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index a5f7bce..e64af60 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -511,14 +511,16 @@ static void iwlagn_mac_set_wakeup(struct ieee80211_hw *hw, bool enabled)
 }
 #endif
 
-static void iwlagn_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void iwlagn_mac_tx(struct ieee80211_hw *hw,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
 	struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
 
 	IWL_DEBUG_TX(priv, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 		     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (iwlagn_tx_skb(priv, skb))
+	if (iwlagn_tx_skb(priv, control->sta, skb))
 		dev_kfree_skb_any(skb);
 }
 
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
index 5971a23..d17799b 100644
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
@@ -127,6 +127,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
 static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 				     struct iwl_tx_cmd *tx_cmd,
 				     struct ieee80211_tx_info *info,
+				     struct ieee80211_sta *sta,
 				     __le16 fc)
 {
 	u32 rate_flags;
@@ -187,8 +188,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 	if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS ||
 			(rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY))
 		rate_idx = rate_lowest_index(
-				&priv->eeprom_data->bands[info->band],
-				info->control.sta);
+				&priv->eeprom_data->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IWL_FIRST_OFDM_RATE;
@@ -291,7 +291,9 @@ static int iwl_sta_id_or_broadcast(struct iwl_rxon_context *context,
 /*
  * start REPLY_TX command process
  */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -345,7 +347,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 		sta_id = ctx->bcast_sta_id;
 	else {
 		/* Find index into station table for destination station */
-		sta_id = iwl_sta_id_or_broadcast(ctx, info->control.sta);
+		sta_id = iwl_sta_id_or_broadcast(ctx, sta);
 		if (sta_id == IWL_INVALID_STATION) {
 			IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
 				       hdr->addr1);
@@ -355,8 +357,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 
 	IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
 
-	if (info->control.sta)
-		sta_priv = (void *)info->control.sta->drv_priv;
+	if (sta)
+		sta_priv = (void *)sta->drv_priv;
 
 	if (sta_priv && sta_priv->asleep &&
 	    (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) {
@@ -397,7 +399,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	iwlagn_tx_cmd_build_basic(priv, skb, tx_cmd, info, hdr, sta_id);
 
-	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, fc);
+	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, sta, fc);
 
 	memset(&info->status, 0, sizeof(info->status));
 
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index a034572..7001856 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -227,7 +227,9 @@ static void lbtf_free_adapter(struct lbtf_private *priv)
 	lbtf_deb_leave(LBTF_DEB_MAIN);
 }
 
-static void lbtf_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void lbtf_op_tx(struct ieee80211_hw *hw,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct lbtf_private *priv = hw->priv;
 
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 826ac7b..ff20dbb 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -709,7 +709,9 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
 	return ack;
 }
 
-static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
+			      struct ieee80211_tx_control *control,
+			      struct sk_buff *skb)
 {
 	bool ack;
 	struct ieee80211_tx_info *txi;
@@ -741,8 +743,8 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	if (txi->control.vif)
 		hwsim_check_magic(txi->control.vif);
-	if (txi->control.sta)
-		hwsim_check_sta_magic(txi->control.sta);
+	if (control->sta)
+		hwsim_check_sta_magic(control->sta);
 
 	ieee80211_tx_info_clear_status(txi);
 
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 224e03a..5099e53 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1830,12 +1830,14 @@ static inline void mwl8k_tx_count_packet(struct ieee80211_sta *sta, u8 tid)
 }
 
 static void
-mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
+mwl8k_txq_xmit(struct ieee80211_hw *hw,
+	       int index,
+	       struct ieee80211_sta *sta,
+	       struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	struct ieee80211_tx_info *tx_info;
 	struct mwl8k_vif *mwl8k_vif;
-	struct ieee80211_sta *sta;
 	struct ieee80211_hdr *wh;
 	struct mwl8k_tx_queue *txq;
 	struct mwl8k_tx_desc *tx;
@@ -1867,7 +1869,6 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	wh = &((struct mwl8k_dma_data *)skb->data)->wh;
 
 	tx_info = IEEE80211_SKB_CB(skb);
-	sta = tx_info->control.sta;
 	mwl8k_vif = MWL8K_VIF(tx_info->control.vif);
 
 	if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
@@ -2019,8 +2020,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	tx->pkt_phys_addr = cpu_to_le32(dma);
 	tx->pkt_len = cpu_to_le16(skb->len);
 	tx->rate_info = 0;
-	if (!priv->ap_fw && tx_info->control.sta != NULL)
-		tx->peer_id = MWL8K_STA(tx_info->control.sta)->peer_id;
+	if (!priv->ap_fw && sta != NULL)
+		tx->peer_id = MWL8K_STA(sta)->peer_id;
 	else
 		tx->peer_id = 0;
 
@@ -4364,7 +4365,9 @@ static void mwl8k_rx_poll(unsigned long data)
 /*
  * Core driver operations.
  */
-static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mwl8k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	int index = skb_get_queue_mapping(skb);
@@ -4376,7 +4379,7 @@ static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		return;
 	}
 
-	mwl8k_txq_xmit(hw, index, skb);
+	mwl8k_txq_xmit(hw, index, control->sta, skb);
 }
 
 static int mwl8k_start(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/p54/lmac.h b/drivers/net/wireless/p54/lmac.h
index 3d8d622..de1d46b 100644
--- a/drivers/net/wireless/p54/lmac.h
+++ b/drivers/net/wireless/p54/lmac.h
@@ -526,7 +526,9 @@ int p54_init_leds(struct p54_common *priv);
 void p54_unregister_leds(struct p54_common *priv);
 
 /* xmit functions */
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb);
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int p54_tx_cancel(struct p54_common *priv, __le32 req_id);
 void p54_tx(struct p54_common *priv, struct sk_buff *skb);
 
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 7cffea7..5e91ad0 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -158,7 +158,7 @@ static int p54_beacon_update(struct p54_common *priv,
 	 * to cancel the old beacon template by hand, instead the firmware
 	 * will release the previous one through the feedback mechanism.
 	 */
-	p54_tx_80211(priv->hw, beacon);
+	p54_tx_80211(priv->hw, NULL, beacon);
 	priv->tsf_high32 = 0;
 	priv->tsf_low32 = 0;
 
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index f38786e..5861e13 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -676,8 +676,9 @@ int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb)
 EXPORT_SYMBOL_GPL(p54_rx);
 
 static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
-				struct ieee80211_tx_info *info, u8 *queue,
-				u32 *extra_len, u16 *flags, u16 *aid,
+				struct ieee80211_tx_info *info,
+				struct ieee80211_sta *sta,
+				u8 *queue, u32 *extra_len, u16 *flags, u16 *aid,
 				bool *burst_possible)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -746,8 +747,8 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
 			}
 		}
 
-		if (info->control.sta)
-			*aid = info->control.sta->aid;
+		if (sta)
+			*aid = sta->aid;
 		break;
 	}
 }
@@ -767,7 +768,9 @@ static u8 p54_convert_algo(u32 cipher)
 	}
 }
 
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct p54_common *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -784,7 +787,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
 	u8 nrates = 0, nremaining = 8;
 	bool burst_allowed = false;
 
-	p54_tx_80211_header(priv, skb, info, &queue, &extra_len,
+	p54_tx_80211_header(priv, skb, info, control->sta, &queue, &extra_len,
 			    &hdr_flags, &aid, &burst_allowed);
 
 	if (p54_tx_qos_accounting_alloc(priv, skb, queue)) {
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 8afb546..f991e8b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1287,7 +1287,9 @@ void rt2x00lib_rxdone(struct queue_entry *entry, gfp_t gfp);
 /*
  * mac80211 handlers.
  */
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int rt2x00mac_start(struct ieee80211_hw *hw);
 void rt2x00mac_stop(struct ieee80211_hw *hw);
 int rt2x00mac_add_interface(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index a6b88bd..a59048f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -194,7 +194,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
 	 */
 	skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	while (skb) {
-		rt2x00mac_tx(rt2x00dev->hw, skb);
+		rt2x00mac_tx(rt2x00dev->hw, NULL, skb);
 		skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	}
 }
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 4ff26c2..c3d0f2f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -99,7 +99,9 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
 	return retval;
 }
 
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index f7e74a0..e488b94 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -315,6 +315,7 @@ static void rt2x00queue_create_tx_descriptor_plcp(struct rt2x00_dev *rt2x00dev,
 static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 						struct sk_buff *skb,
 						struct txentry_desc *txdesc,
+						struct ieee80211_sta *sta,
 						const struct rt2x00_rate *hwrate)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -322,11 +323,11 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct rt2x00_sta *sta_priv = NULL;
 
-	if (tx_info->control.sta) {
+	if (sta) {
 		txdesc->u.ht.mpdu_density =
-		    tx_info->control.sta->ht_cap.ampdu_density;
+		    sta->ht_cap.ampdu_density;
 
-		sta_priv = sta_to_rt2x00_sta(tx_info->control.sta);
+		sta_priv = sta_to_rt2x00_sta(sta);
 		txdesc->u.ht.wcid = sta_priv->wcid;
 	}
 
@@ -341,8 +342,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 		 * MIMO PS should be set to 1 for STA's using dynamic SM PS
 		 * when using more then one tx stream (>MCS7).
 		 */
-		if (tx_info->control.sta && txdesc->u.ht.mcs > 7 &&
-		    ((tx_info->control.sta->ht_cap.cap &
+		if (sta && txdesc->u.ht.mcs > 7 &&
+		    ((sta->ht_cap.cap &
 		      IEEE80211_HT_CAP_SM_PS) >>
 		     IEEE80211_HT_CAP_SM_PS_SHIFT) ==
 		    WLAN_HT_CAP_SM_PS_DYNAMIC)
@@ -409,7 +410,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 
 static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 					     struct sk_buff *skb,
-					     struct txentry_desc *txdesc)
+					     struct txentry_desc *txdesc,
+					     struct ieee80211_sta *sta)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -503,7 +505,7 @@ static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 
 	if (test_bit(REQUIRE_HT_TX_DESC, &rt2x00dev->cap_flags))
 		rt2x00queue_create_tx_descriptor_ht(rt2x00dev, skb, txdesc,
-						    hwrate);
+						   sta, hwrate);
 	else
 		rt2x00queue_create_tx_descriptor_plcp(rt2x00dev, skb, txdesc,
 						      hwrate);
@@ -595,7 +597,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc, NULL);
 
 	/*
 	 * All information is retrieved from the skb->cb array,
@@ -740,7 +742,7 @@ int rt2x00queue_update_beacon_locked(struct rt2x00_dev *rt2x00dev,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc, NULL);
 
 	/*
 	 * Fill in skb descriptor
diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 3b50539..fd8fcbd 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -244,7 +244,9 @@ static irqreturn_t rtl8180_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static void rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8180_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -710,7 +712,7 @@ static void rtl8180_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8180_tx(dev, skb);
+	rtl8180_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index 4fb1ca1..c7bfcf3 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -228,7 +228,9 @@ static void rtl8187_tx_cb(struct urb *urb)
 	}
 }
 
-static void rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8187_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct rtl8187_priv *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1076,7 +1078,7 @@ static void rtl8187_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8187_tx(dev, skb);
+	rtl8187_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 41f7f12..1b2ffdb 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -1341,9 +1341,8 @@ int rtl_send_smps_action(struct ieee80211_hw *hw,
 		rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
 
 		info->control.rates[0].idx = 0;
-		info->control.sta = sta;
 		info->band = hw->conf.channel->band;
-		rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+		rtlpriv->intf_ops->adapter_tx(hw, sta, skb, &tcb_desc);
 	}
 err_free:
 	return 0;
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 278e9f9..db903fd 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -124,7 +124,9 @@ static void rtl_op_stop(struct ieee80211_hw *hw)
 	mutex_unlock(&rtlpriv->locks.conf_mutex);
 }
 
-static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void rtl_op_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
@@ -138,8 +140,8 @@ static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	if (!test_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status))
 		goto err_free;
 
-	if (!rtlpriv->intf_ops->waitq_insert(hw, skb))
-		rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+	if (!rtlpriv->intf_ops->waitq_insert(hw, control->sta, skb))
+		rtlpriv->intf_ops->adapter_tx(hw, control->sta, skb, &tcb_desc);
 
 	return;
 
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 2c6eb9e..0bde0ce 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -504,7 +504,7 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
 				_rtl_update_earlymode_info(hw, skb,
 							   &tcb_desc, tid);
 
-			rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+			rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, &tcb_desc);
 		}
 	}
 }
@@ -929,7 +929,7 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
 	info = IEEE80211_SKB_CB(pskb);
 	pdesc = &ring->desc[0];
 	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc,
-		info, pskb, BEACON_QUEUE, &tcb_desc);
+		info, NULL, pskb, BEACON_QUEUE, &tcb_desc);
 
 	__skb_queue_tail(&ring->queue, pskb);
 
@@ -1305,11 +1305,10 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw)
 }
 
 static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta,
 					struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct rtl_sta_info *sta_entry = NULL;
 	u8 tid = rtl_get_tid(skb);
 
@@ -1337,13 +1336,14 @@ static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
 	return true;
 }
 
-static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
-		struct rtl_tcb_desc *ptcb_desc)
+static int rtl_pci_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_sta *sta,
+		      struct sk_buff *skb,
+		      struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_sta_info *sta_entry = NULL;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct rtl8192_tx_ring *ring;
 	struct rtl_tx_desc *pdesc;
 	u8 idx;
@@ -1418,7 +1418,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
 
 	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc,
-			info, skb, hw_queue, ptcb_desc);
+			info, sta, skb, hw_queue, ptcb_desc);
 
 	__skb_queue_tail(&ring->queue, skb);
 
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
index 3af874e..1b13001 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
@@ -596,7 +596,9 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
 
 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 hw_queue, struct rtl_tcb_desc *tcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -604,7 +606,6 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	bool defaultadapter = true;
-	struct ieee80211_sta *sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
index c4adb97..a7cdd51 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
@@ -713,6 +713,7 @@ struct rx_desc_92c {
 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
index 21bc827..bb528a7 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
@@ -496,7 +496,9 @@ static void _rtl_tx_desc_checksum(u8 *txdesc)
 
 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 queue_index,
 			  struct rtl_tcb_desc *tcb_desc)
 {
@@ -504,7 +506,6 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	bool defaultadapter = true;
-	struct ieee80211_sta *sta = info->control.sta = info->control.sta;
 	u8 *qc = ieee80211_get_qos_ctl(hdr);
 	u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
 	u16 seq_number;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
index 332b06e..725c53a 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
@@ -420,7 +420,9 @@ struct sk_buff *rtl8192c_tx_aggregate_hdl(struct ieee80211_hw *,
 					   struct sk_buff_head *);
 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 queue_index,
 			  struct rtl_tcb_desc *tcb_desc);
 void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
index 1666ef7..323450e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
@@ -551,7 +551,9 @@ static void _rtl92de_insert_emcontent(struct rtl_tcb_desc *ptcb_desc,
 
 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -559,7 +561,6 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
-	struct ieee80211_sta *sta = info->control.sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
index 057a524..c1b5dfb 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
@@ -730,6 +730,7 @@ struct rx_desc_92d {
 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 bool rtl92de_rx_query_desc(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
index 812b585..55cb73f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
@@ -591,14 +591,15 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
 
 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
 		struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-		struct ieee80211_tx_info *info, struct sk_buff *skb,
+		struct ieee80211_tx_info *info,
+		struct ieee80211_sta *sta,
+		struct sk_buff *skb,
 		u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-	struct ieee80211_sta *sta = info->control.sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
index 011e7b0..64dd66f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
@@ -31,6 +31,7 @@
 
 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, bool firstseg,
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index aa970fc..9140469 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -848,8 +848,10 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
 	_rtl_submit_tx_urb(hw, _urb);
 }
 
-static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
-			    u16 hw_queue)
+static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw,
+				   struct ieee80211_sta *sta,
+				   struct sk_buff *skb,
+				   u16 hw_queue)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
@@ -891,7 +893,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
 		seq_number += 1;
 		seq_number <<= 4;
 	}
-	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, skb,
+	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, sta, skb,
 					hw_queue, &tcb_desc);
 	if (!ieee80211_has_morefrags(hdr->frame_control)) {
 		if (qc)
@@ -901,7 +903,9 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
 		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
 }
 
-static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
+static int rtl_usb_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_sta *sta,
+		      struct sk_buff *skb,
 		      struct rtl_tcb_desc *dummy)
 {
 	struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
@@ -913,7 +917,7 @@ static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 	if (unlikely(is_hal_stop(rtlhal)))
 		goto err_free;
 	hw_queue = rtlusb->usb_mq_to_hwq(fc, skb_get_queue_mapping(skb));
-	_rtl_usb_tx_preprocess(hw, skb, hw_queue);
+	_rtl_usb_tx_preprocess(hw, sta, skb, hw_queue);
 	_rtl_usb_transmit(hw, skb, hw_queue);
 	return NETDEV_TX_OK;
 
@@ -923,6 +927,7 @@ err_free:
 }
 
 static bool rtl_usb_tx_chk_waitq_insert(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta,
 					struct sk_buff *skb)
 {
 	return false;
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index cdaa21f..40153e7 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -122,7 +122,7 @@ enum rt_eeprom_type {
 	EEPROM_BOOT_EFUSE,
 };
 
-enum rtl_status {
+enum ttl_status {
 	RTL_STATUS_INTERFACE_START = 0,
 };
 
@@ -1418,6 +1418,7 @@ struct rtl_hal_ops {
 	void (*fill_tx_desc) (struct ieee80211_hw *hw,
 			      struct ieee80211_hdr *hdr, u8 *pdesc_tx,
 			      struct ieee80211_tx_info *info,
+			      struct ieee80211_sta *sta,
 			      struct sk_buff *skb, u8 hw_queue,
 			      struct rtl_tcb_desc *ptcb_desc);
 	void (*fill_fake_txdesc) (struct ieee80211_hw *hw, u8 *pDesc,
@@ -1475,11 +1476,15 @@ struct rtl_intf_ops {
 	int (*adapter_start) (struct ieee80211_hw *hw);
 	void (*adapter_stop) (struct ieee80211_hw *hw);
 
-	int (*adapter_tx) (struct ieee80211_hw *hw, struct sk_buff *skb,
-			struct rtl_tcb_desc *ptcb_desc);
+	int (*adapter_tx) (struct ieee80211_hw *hw,
+			   struct ieee80211_sta *sta,
+			   struct sk_buff *skb,
+			   struct rtl_tcb_desc *ptcb_desc);
 	void (*flush)(struct ieee80211_hw *hw, bool drop);
 	int (*reset_trx_ring) (struct ieee80211_hw *hw);
-	bool (*waitq_insert) (struct ieee80211_hw *hw, struct sk_buff *skb);
+	bool (*waitq_insert) (struct ieee80211_hw *hw,
+			      struct ieee80211_sta *sta,
+			      struct sk_buff *skb);
 
 	/*pci */
 	void (*disable_aspm) (struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index 3118c42..441cbcc 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -354,7 +354,9 @@ out:
 	return ret;
 }
 
-static void wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1251_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1251 *wl = hw->priv;
 	unsigned long flags;
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 9f04b64..cbce2ea 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1166,7 +1166,9 @@ out:
 	return ret;
 }
 
-static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1271_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1271 *wl = hw->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1182,7 +1184,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	mapping = skb_get_queue_mapping(skb);
 	q = wl1271_tx_get_queue(mapping);
 
-	hlid = wl12xx_tx_get_hlid(wl, wlvif, skb);
+	hlid = wl12xx_tx_get_hlid(wl, wlvif, sta, skb);
 
 	spin_lock_irqsave(&wl->wl_lock, flags);
 
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index 6a28aee..2027d70 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -131,15 +131,15 @@ bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb)
 EXPORT_SYMBOL(wl12xx_is_dummy_packet);
 
 u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif,
-			 struct sk_buff *skb)
+			 struct ieee80211_sta *sta, struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *control = IEEE80211_SKB_CB(skb);
 
-	if (control->control.sta) {
+	if (sta) {
 		struct wl1271_station *wl_sta;
 
 		wl_sta = (struct wl1271_station *)
-				control->control.sta->drv_priv;
+				sta->drv_priv;
 		return wl_sta->hlid;
 	} else {
 		struct ieee80211_hdr *hdr;
@@ -164,7 +164,7 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		return wl->system_hlid;
 
 	if (wlvif->bss_type == BSS_TYPE_AP_BSS)
-		return wl12xx_tx_get_hlid_ap(wl, wlvif, skb);
+		return wl12xx_tx_get_hlid_ap(wl, wlvif, sta, skb);
 
 	if ((test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) ||
 	     test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags)) &&
@@ -256,7 +256,9 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	__le16 frame_control;
 	struct ieee80211_hdr *hdr;
 	u8 *frame_start;
-	bool is_dummy;
+	bool is_dummy;i
+	struct ieee80211_sta *sta,
+	struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
 
 	desc = (struct wl1271_tx_hw_descr *) skb->data;
 	frame_start = (u8 *)(desc + 1);
@@ -310,14 +312,19 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		 * send them with AP rate policies (EAPOLs are an exception),
 		 * otherwise use default basic rates
 		 */
+
+		rcu_read_lock();
+		sta = ieee80211_find_sta(vif, wl->links[hlid].addr);
+
 		if (control->flags & IEEE80211_TX_CTL_NO_CCK_RATE)
 			rate_idx = wlvif->sta.p2p_rate_idx;
 		else if (skb->protocol == cpu_to_be16(ETH_P_PAE))
 			rate_idx = wlvif->sta.basic_rate_idx;
-		else if (control->control.sta)
+		else if (sta)
 			rate_idx = wlvif->sta.ap_rate_idx;
 		else
 			rate_idx = wlvif->sta.basic_rate_idx;
+		rcu_read_unlock();
 	} else {
 		if (hlid == wlvif->ap.global_hlid)
 			rate_idx = wlvif->ap.mgmt_rate_idx;
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index c9e2660..4598801 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -937,7 +937,9 @@ static int fill_ctrlset(struct zd_mac *mac,
  * control block of the skbuff will be initialized. If necessary the incoming
  * mac80211 queues will be stopped.
  */
-static void zd_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void zd_op_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct zd_mac *mac = zd_hw_mac(hw);
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1176,7 +1178,7 @@ static void zd_beacon_done(struct zd_mac *mac)
 		skb = ieee80211_get_buffered_bc(mac->hw, mac->vif);
 		if (!skb)
 			break;
-		zd_op_tx(mac->hw, skb);
+		zd_op_tx(mac->hw, NULL, skb);
 	}
 
 	/*
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index c3751a7..c6566e5 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -119,7 +119,9 @@ static void wbsoft_configure_filter(struct ieee80211_hw *dev,
 	*total_flags = new_flags;
 }
 
-static void wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void wbsoft_tx(struct ieee80211_hw *dev,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct wbsoft_priv *priv = dev->priv;
 
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index bb86aa6..4309d8a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -522,9 +522,6 @@ struct ieee80211_tx_rate {
  *  (2) driver internal use (if applicable)
  *  (3) TX status information - driver tells mac80211 what happened
  *
- * The TX control's sta pointer is only valid during the ->tx call,
- * it may be NULL.
- *
  * @flags: transmit info flags, defined above
  * @band: the band to transmit on (use for checking for races)
  * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC
@@ -555,6 +552,7 @@ struct ieee80211_tx_info {
 					struct ieee80211_tx_rate rates[
 						IEEE80211_TX_MAX_RATES];
 					s8 rts_cts_rate_idx;
+					/* 3 bytes free */
 				};
 				/* only needed before rate control */
 				unsigned long jiffies;
@@ -562,7 +560,7 @@ struct ieee80211_tx_info {
 			/* NB: vif can be NULL for injected frames */
 			struct ieee80211_vif *vif;
 			struct ieee80211_key_conf *hw_key;
-			struct ieee80211_sta *sta;
+			/* 8 bytes free */
 		} control;
 		struct {
 			struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
@@ -1074,6 +1072,16 @@ enum sta_notify_cmd {
 };
 
 /**
+ * struct ieee80211_tx_control - TX control data
+ *
+ * @sta: station table entry, this sta pointer may be NULL and
+ * 	it is not allowed to copy the pointer, due to RCU.
+ */
+struct ieee80211_tx_control {
+	struct ieee80211_sta *sta;
+};
+
+/**
  * enum ieee80211_hw_flags - hardware flags
  *
  * These flags are used to indicate hardware capabilities to
@@ -2264,7 +2272,9 @@ enum ieee80211_rate_control_changed {
  *	The callback is optional and can (should!) sleep.
  */
 struct ieee80211_ops {
-	void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
+	void (*tx)(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 	int (*start)(struct ieee80211_hw *hw);
 	void (*stop)(struct ieee80211_hw *hw);
 #ifdef CONFIG_PM
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index df92031..a81117a 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -22,9 +22,11 @@ get_bss_sdata(struct ieee80211_sub_if_data *sdata)
 	return sdata;
 }
 
-static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
+static inline void drv_tx(struct ieee80211_local *local,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
-	local->ops->tx(&local->hw, skb);
+	local->ops->tx(&local->hw, control, skb);
 }
 
 static inline void drv_get_et_strings(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 7998513..6258da6 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -196,6 +196,8 @@ struct ieee80211_tx_data {
 	struct ieee80211_channel *channel;
 
 	unsigned int flags;
+
+	struct ieee80211_tx_control control;
 };
 
 
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index acf712f..7706f01 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1201,6 +1201,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
 static bool ieee80211_tx_frags(struct ieee80211_local *local,
 			       struct ieee80211_vif *vif,
 			       struct ieee80211_sta *sta,
+			       struct ieee80211_tx_control *control,
 			       struct sk_buff_head *skbs,
 			       bool txpending)
 {
@@ -1240,10 +1241,10 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
 		spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 
 		info->control.vif = vif;
-		info->control.sta = sta;
+		control->sta = sta;
 
 		__skb_unlink(skb, skbs);
-		drv_tx(local, skb);
+		drv_tx(local, control, skb);
 	}
 
 	return true;
@@ -1253,6 +1254,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
  * Returns false if the frame couldn't be transmitted but was queued instead.
  */
 static bool __ieee80211_tx(struct ieee80211_local *local,
+			   struct ieee80211_tx_control *control,
 			   struct sk_buff_head *skbs, int led_len,
 			   struct sta_info *sta, bool txpending)
 {
@@ -1301,7 +1303,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
 		break;
 	}
 
-	result = ieee80211_tx_frags(local, vif, pubsta, skbs,
+	result = ieee80211_tx_frags(local, vif, pubsta, control, skbs,
 				    txpending);
 
 	ieee80211_tpt_led_trig_tx(local, fc, led_len);
@@ -1409,7 +1411,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
 			sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
 
 	if (!invoke_tx_handlers(&tx))
-		result = __ieee80211_tx(local, &tx.skbs, led_len,
+		result = __ieee80211_tx(local, &tx.control, &tx.skbs, led_len,
 					tx.sta, txpending);
  out:
 	rcu_read_unlock();
@@ -2154,6 +2156,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
 	struct ieee80211_sub_if_data *sdata;
 	struct sta_info *sta;
 	struct ieee80211_hdr *hdr;
+	struct ieee80211_tx_control control;
 	bool result;
 
 	sdata = vif_to_sdata(info->control.vif);
@@ -2169,7 +2172,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
 		hdr = (struct ieee80211_hdr *)skb->data;
 		sta = sta_info_get(sdata, hdr->addr1);
 
-		result = __ieee80211_tx(local, &skbs, skb->len, sta, true);
+		result = __ieee80211_tx(local, &control, &skbs, skb->len, sta, true);
 	}
 
 	return result;
-- 
1.7.11.1



From thomas at net.t-labs.tu-berlin.de  Tue Jul 17 16:33:42 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Tue, 17 Jul 2012 22:33:42 +0200
Subject: [ath5k-devel] [PATCH 2/2] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1342530237.8139.5.camel@jlt3.sipsolutions.net>
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120713_205245_114771_49FF4AC7)
 <1342518290.7427.9.camel@jlt3.sipsolutions.net>
 <5005613F.1000004@net.t-labs.tu-berlin.de>
 <1342530237.8139.5.camel@jlt3.sipsolutions.net>
Message-ID: <5005CC26.6090408@net.t-labs.tu-berlin.de>

Hi Johannes,


> No, I'm not going to play that game. Make sure it compiles on
> wireless-next.

Virtual box did the job and I found 3 drivers that somehow did not
complain in my OpenWRT build env... thx for not playing :)... v3 is out.

I used wireless-testing and not -next,as in -next the necessary patch
for mwlk8 is not included but in -testing. So my general question is on
which tree to develop, on testing or next?

Greetings Thomas



> 
> 
> _______________________________________________
> b43-dev mailing list
> b43-dev at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/b43-dev



From johannes at sipsolutions.net  Wed Jul 18 02:48:30 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Wed, 18 Jul 2012 08:48:30 +0200
Subject: [ath5k-devel] [PATCH 2/2] mac80211: Remove control.sta from
 struct ieee80211_tx_info and restructure tx-path
In-Reply-To: <5005CC26.6090408@net.t-labs.tu-berlin.de>
References: <1342205545-45382-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1342205545-45382-3-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120713_205245_114771_49FF4AC7)
 <1342518290.7427.9.camel@jlt3.sipsolutions.net>
 <5005613F.1000004@net.t-labs.tu-berlin.de>
 <1342530237.8139.5.camel@jlt3.sipsolutions.net>
 <5005CC26.6090408@net.t-labs.tu-berlin.de>
Message-ID: <1342594110.5310.2.camel@jlt3.sipsolutions.net>


> Virtual box did the job and I found 3 drivers that somehow did not
> complain in my OpenWRT build env... thx for not playing :)... v3 is out.

See, that's why I don't want to play the game -- I could've gone back
and forth with you for like a week over multiple compile failures :-)

> I used wireless-testing and not -next,as in -next the necessary patch
> for mwlk8 is not included but in -testing. So my general question is on
> which tree to develop, on testing or next?

Well, they don't usually diverge much. I guess I can merge in
wireless-next.git and wireless.git into mac80211-next.git if there's a
problem applying. I have meetings now, will try to apply it later.

johannes



From felix.janda at posteo.de  Thu Jul 19 04:52:08 2012
From: felix.janda at posteo.de (Felix Janda)
Date: Thu, 19 Jul 2012 10:52:08 +0200
Subject: BCM4306 (rev 5) Problem with firmware loading since kernel 3.4
Message-ID: <20120719085208.GA17532@dirichlet.Morel>

Hello,

I'm using the card:

03:03.0 0280: 14e4:4320 (rev 03)

Since kernel 3.4 b43 has problems with loading the firmware for me.
Bisecting gave

# bad: [6b6fa5868eec26bdc6a83543cebb8cf832a2645a] b43: Load firmware from a work queue and not from the probe routine
git bisect bad 6b6fa5868eec26bdc6a83543cebb8cf832a2645a
# good: [a3ea2c76b193be5794e0de6aff66e14c21b904f8] b43legacy: Load firmware from work queue instead of from probe routine
git bisect good a3ea2c76b193be5794e0de6aff66e14c21b904f8

With the problematic kernel dmesg tells me:

[    1.230562] b43-phy0: Broadcom 4306 WLAN found (core revision 5)
[    1.363845] b43-phy0 debug: Found PHY: Analog 2, Type 2, Revision 2
[    1.363866] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 2
[   61.944937] b43-phy0 ERROR: Firmware file "b43/ucode5.fw" not found
[   61.944942] b43-phy0 ERROR: Firmware file "b43-open/ucode5.fw" not found
[   61.944945] b43-phy0 ERROR: You must go to http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and download the correct firmware for this driver version. Please carefully read all instructions on this website.

Surprisingly, I could get the driver to load the firmware by including
b43/ucode5.fw in the kernel. Furthermore it seems to be able to load
other firmware from /lib/firmware. Now (actually this output is from
the current kernel from git) dmesg says:

[    1.224694] b43-phy0: Broadcom 4306 WLAN found (core revision 5)
[    1.358016] b43-phy0 debug: Found PHY: Analog 2, Type 2, Revision 2
[    1.358037] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 2
[   62.012797] Registered led device: b43-phy0::tx
[   62.019411] Registered led device: b43-phy0::rx
[   62.022505] Registered led device: b43-phy0::radio
[   62.512028] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)
[   62.512034] b43-phy0 warning: No "pcm5.fw" firmware file found. Hardware accelerated cryptography is disabled.
[   62.512037] b43-phy0 warning: You must go to http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and download the correct firmware for this driver version. Please carefully read all instructions on this website.
[   62.544048] b43-phy0 debug: Chip initialized
[   62.544203] b43-phy0 debug: 30-bit DMA initialized
[   62.544244] b43-phy0 debug: QoS enabled
[   62.548076] b43-phy0 debug: Wireless interface started
[   62.548126] b43-phy0 debug: Adding Interface type 2

The delay of 60 seconds is kind of inconvenient...

Do you have an idea what could be the problem or give me some hints how
to debug it?

Regards, Felix


From Larry.Finger at lwfinger.net  Thu Jul 19 11:07:23 2012
From: Larry.Finger at lwfinger.net (Larry Finger)
Date: Thu, 19 Jul 2012 10:07:23 -0500
Subject: BCM4306 (rev 5) Problem with firmware loading since kernel 3.4
In-Reply-To: <20120719085208.GA17532@dirichlet.Morel>
References: <20120719085208.GA17532@dirichlet.Morel>
Message-ID: <500822AB.9080601@lwfinger.net>

On 07/19/2012 03:52 AM, Felix Janda wrote:
> Hello,
>
> I'm using the card:
>
> 03:03.0 0280: 14e4:4320 (rev 03)
>
> Since kernel 3.4 b43 has problems with loading the firmware for me.
> Bisecting gave
>
> # bad: [6b6fa5868eec26bdc6a83543cebb8cf832a2645a] b43: Load firmware from a work queue and not from the probe routine
> git bisect bad 6b6fa5868eec26bdc6a83543cebb8cf832a2645a
> # good: [a3ea2c76b193be5794e0de6aff66e14c21b904f8] b43legacy: Load firmware from work queue instead of from probe routine
> git bisect good a3ea2c76b193be5794e0de6aff66e14c21b904f8
>
> With the problematic kernel dmesg tells me:
>
> [    1.230562] b43-phy0: Broadcom 4306 WLAN found (core revision 5)
> [    1.363845] b43-phy0 debug: Found PHY: Analog 2, Type 2, Revision 2
> [    1.363866] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 2
> [   61.944937] b43-phy0 ERROR: Firmware file "b43/ucode5.fw" not found
> [   61.944942] b43-phy0 ERROR: Firmware file "b43-open/ucode5.fw" not found
> [   61.944945] b43-phy0 ERROR: You must go to http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and download the correct firmware for this driver version. Please carefully read all instructions on this website.
>
> Surprisingly, I could get the driver to load the firmware by including
> b43/ucode5.fw in the kernel. Furthermore it seems to be able to load
> other firmware from /lib/firmware. Now (actually this output is from
> the current kernel from git) dmesg says:
>
> [    1.224694] b43-phy0: Broadcom 4306 WLAN found (core revision 5)
> [    1.358016] b43-phy0 debug: Found PHY: Analog 2, Type 2, Revision 2
> [    1.358037] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 2
> [   62.012797] Registered led device: b43-phy0::tx
> [   62.019411] Registered led device: b43-phy0::rx
> [   62.022505] Registered led device: b43-phy0::radio
> [   62.512028] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)
> [   62.512034] b43-phy0 warning: No "pcm5.fw" firmware file found. Hardware accelerated cryptography is disabled.
> [   62.512037] b43-phy0 warning: You must go to http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and download the correct firmware for this driver version. Please carefully read all instructions on this website.
> [   62.544048] b43-phy0 debug: Chip initialized
> [   62.544203] b43-phy0 debug: 30-bit DMA initialized
> [   62.544244] b43-phy0 debug: QoS enabled
> [   62.548076] b43-phy0 debug: Wireless interface started
> [   62.548126] b43-phy0 debug: Adding Interface type 2
>
> The delay of 60 seconds is kind of inconvenient...
>
> Do you have an idea what could be the problem or give me some hints how
> to debug it?

Is b43 built into your kernel rather than as a module? If so, then the problem 
is known. I have started generating a fix, but it is not yet ready. As a 
workaround, change your kernel configuration so that b43 and ssb are modules.

If b43 is already a module, please let me know.

Larry





From zajec5 at gmail.com  Sun Jul 22 09:00:54 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Sun, 22 Jul 2012 15:00:54 +0200
Subject: [IDEA RFC][PATCH] b43: G-PHY: drop unused PHY rev 1 code
Message-ID: <1342962054-26239-1-git-send-email-zajec5@gmail.com>

b43 does not support devices with G-PHY rev 1. They are handled by
b43legacy.
---
This change matches http://bcm-v4.sipsolutions.net/802.11/PHY/Init/G
routine. Since b43 and b43legacy were splitted, I believe PHY support
can be splitted too.

I think similar change (just "reversed" can be applied to the b43legacy)
---
 drivers/net/wireless/b43/main.c  |    2 +-
 drivers/net/wireless/b43/phy_g.c |  103 +-------------------------------------
 2 files changed, 2 insertions(+), 103 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index b80352b..8e5f4e8 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4306,7 +4306,7 @@ static int b43_phy_versioning(struct b43_wldev *dev)
 			unsupported = 1;
 		break;
 	case B43_PHYTYPE_G:
-		if (phy_rev > 9)
+		if (phy_rev < 2 || phy_rev > 9)
 			unsupported = 1;
 		break;
 #ifdef CONFIG_B43_PHY_N
diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
index 12f467b..a67f278 100644
--- a/drivers/net/wireless/b43/phy_g.c
+++ b/drivers/net/wireless/b43/phy_g.c
@@ -1489,104 +1489,6 @@ static u16 b43_radio_init2050(struct b43_wldev *dev)
 	return ret;
 }
 
-static void b43_phy_initb5(struct b43_wldev *dev)
-{
-	struct b43_phy *phy = &dev->phy;
-	struct b43_phy_g *gphy = phy->g;
-	u16 offset, value;
-	u8 old_channel;
-
-	if (phy->analog == 1) {
-		b43_radio_set(dev, 0x007A, 0x0050);
-	}
-	if ((dev->dev->board_vendor != SSB_BOARDVENDOR_BCM) &&
-	    (dev->dev->board_type != SSB_BOARD_BU4306)) {
-		value = 0x2120;
-		for (offset = 0x00A8; offset < 0x00C7; offset++) {
-			b43_phy_write(dev, offset, value);
-			value += 0x202;
-		}
-	}
-	b43_phy_maskset(dev, 0x0035, 0xF0FF, 0x0700);
-	if (phy->radio_ver == 0x2050)
-		b43_phy_write(dev, 0x0038, 0x0667);
-
-	if (phy->gmode || phy->rev >= 2) {
-		if (phy->radio_ver == 0x2050) {
-			b43_radio_set(dev, 0x007A, 0x0020);
-			b43_radio_set(dev, 0x0051, 0x0004);
-		}
-		b43_write16(dev, B43_MMIO_PHY_RADIO, 0x0000);
-
-		b43_phy_set(dev, 0x0802, 0x0100);
-		b43_phy_set(dev, 0x042B, 0x2000);
-
-		b43_phy_write(dev, 0x001C, 0x186A);
-
-		b43_phy_maskset(dev, 0x0013, 0x00FF, 0x1900);
-		b43_phy_maskset(dev, 0x0035, 0xFFC0, 0x0064);
-		b43_phy_maskset(dev, 0x005D, 0xFF80, 0x000A);
-	}
-
-	if (dev->bad_frames_preempt) {
-		b43_phy_set(dev, B43_PHY_RADIO_BITFIELD, (1 << 11));
-	}
-
-	if (phy->analog == 1) {
-		b43_phy_write(dev, 0x0026, 0xCE00);
-		b43_phy_write(dev, 0x0021, 0x3763);
-		b43_phy_write(dev, 0x0022, 0x1BC3);
-		b43_phy_write(dev, 0x0023, 0x06F9);
-		b43_phy_write(dev, 0x0024, 0x037E);
-	} else
-		b43_phy_write(dev, 0x0026, 0xCC00);
-	b43_phy_write(dev, 0x0030, 0x00C6);
-	b43_write16(dev, 0x03EC, 0x3F22);
-
-	if (phy->analog == 1)
-		b43_phy_write(dev, 0x0020, 0x3E1C);
-	else
-		b43_phy_write(dev, 0x0020, 0x301C);
-
-	if (phy->analog == 0)
-		b43_write16(dev, 0x03E4, 0x3000);
-
-	old_channel = phy->channel;
-	/* Force to channel 7, even if not supported. */
-	b43_gphy_channel_switch(dev, 7, 0);
-
-	if (phy->radio_ver != 0x2050) {
-		b43_radio_write16(dev, 0x0075, 0x0080);
-		b43_radio_write16(dev, 0x0079, 0x0081);
-	}
-
-	b43_radio_write16(dev, 0x0050, 0x0020);
-	b43_radio_write16(dev, 0x0050, 0x0023);
-
-	if (phy->radio_ver == 0x2050) {
-		b43_radio_write16(dev, 0x0050, 0x0020);
-		b43_radio_write16(dev, 0x005A, 0x0070);
-	}
-
-	b43_radio_write16(dev, 0x005B, 0x007B);
-	b43_radio_write16(dev, 0x005C, 0x00B0);
-
-	b43_radio_set(dev, 0x007A, 0x0007);
-
-	b43_gphy_channel_switch(dev, old_channel, 0);
-
-	b43_phy_write(dev, 0x0014, 0x0080);
-	b43_phy_write(dev, 0x0032, 0x00CA);
-	b43_phy_write(dev, 0x002A, 0x88A3);
-
-	b43_set_txpower_g(dev, &gphy->bbatt, &gphy->rfatt, gphy->tx_control);
-
-	if (phy->radio_ver == 0x2050)
-		b43_radio_write16(dev, 0x005D, 0x000D);
-
-	b43_write16(dev, 0x03E4, (b43_read16(dev, 0x03E4) & 0xFFC0) | 0x0004);
-}
-
 static void b43_phy_initb6(struct b43_wldev *dev)
 {
 	struct b43_phy *phy = &dev->phy;
@@ -1993,10 +1895,7 @@ static void b43_phy_initg(struct b43_wldev *dev)
 	struct b43_phy_g *gphy = phy->g;
 	u16 tmp;
 
-	if (phy->rev == 1)
-		b43_phy_initb5(dev);
-	else
-		b43_phy_initb6(dev);
+	b43_phy_initb6(dev);
 
 	if (phy->rev >= 2 || phy->gmode)
 		b43_phy_inita(dev);
-- 
1.7.7



From jonas.gorski at gmail.com  Sun Jul 22 09:09:14 2012
From: jonas.gorski at gmail.com (Jonas Gorski)
Date: Sun, 22 Jul 2012 15:09:14 +0200
Subject: [IDEA RFC][PATCH] b43: G-PHY: drop unused PHY rev 1 code
In-Reply-To: <1342962054-26239-1-git-send-email-zajec5@gmail.com>
References: <1342962054-26239-1-git-send-email-zajec5@gmail.com>
Message-ID: <CAOiHx==DNDHt43yM6=dFMTRDrKqRj4pduhybwipxjg8aLM3eew@mail.gmail.com>

On 22 July 2012 15:00, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
> b43 does not support devices with G-PHY rev 1. They are handled by
> b43legacy.
> ---
> This change matches http://bcm-v4.sipsolutions.net/802.11/PHY/Init/G
> routine. Since b43 and b43legacy were splitted, I believe PHY support
> can be splitted too.
>
> I think similar change (just "reversed" can be applied to the b43legacy)
> ---
>  drivers/net/wireless/b43/main.c  |    2 +-
>  drivers/net/wireless/b43/phy_g.c |  103 +-------------------------------------
>  2 files changed, 2 insertions(+), 103 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> index b80352b..8e5f4e8 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> (snip)
> @@ -1993,10 +1895,7 @@ static void b43_phy_initg(struct b43_wldev *dev)
>         struct b43_phy_g *gphy = phy->g;
>         u16 tmp;
>
> -       if (phy->rev == 1)
> -               b43_phy_initb5(dev);
> -       else
> -               b43_phy_initb6(dev);
> +       b43_phy_initb6(dev);
>
>         if (phy->rev >= 2 || phy->gmode)

Isn't this one then also always true?

>                 b43_phy_inita(dev);


Jonas


From zajec5 at gmail.com  Sun Jul 22 10:02:14 2012
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Sun, 22 Jul 2012 16:02:14 +0200
Subject: [IDEA RFC][PATCH] b43: G-PHY: drop unused PHY rev 1 code
In-Reply-To: <CAOiHx==DNDHt43yM6=dFMTRDrKqRj4pduhybwipxjg8aLM3eew@mail.gmail.com>
References: <1342962054-26239-1-git-send-email-zajec5@gmail.com>
 <CAOiHx==DNDHt43yM6=dFMTRDrKqRj4pduhybwipxjg8aLM3eew@mail.gmail.com>
Message-ID: <CACna6rzmqfSakBUhZzLGS0hrKfqTeq4uLGx5+js=Gi5i6a+fyg@mail.gmail.com>

2012/7/22 Jonas Gorski <jonas.gorski at gmail.com>:
> On 22 July 2012 15:00, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
>> b43 does not support devices with G-PHY rev 1. They are handled by
>> b43legacy.
>> ---
>> This change matches http://bcm-v4.sipsolutions.net/802.11/PHY/Init/G
>> routine. Since b43 and b43legacy were splitted, I believe PHY support
>> can be splitted too.
>>
>> I think similar change (just "reversed" can be applied to the b43legacy)
>> ---
>>  drivers/net/wireless/b43/main.c  |    2 +-
>>  drivers/net/wireless/b43/phy_g.c |  103 +-------------------------------------
>>  2 files changed, 2 insertions(+), 103 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
>> index b80352b..8e5f4e8 100644
>> --- a/drivers/net/wireless/b43/main.c
>> +++ b/drivers/net/wireless/b43/main.c
>> (snip)
>> @@ -1993,10 +1895,7 @@ static void b43_phy_initg(struct b43_wldev *dev)
>>         struct b43_phy_g *gphy = phy->g;
>>         u16 tmp;
>>
>> -       if (phy->rev == 1)
>> -               b43_phy_initb5(dev);
>> -       else
>> -               b43_phy_initb6(dev);
>> +       b43_phy_initb6(dev);
>>
>>         if (phy->rev >= 2 || phy->gmode)
>
> Isn't this one then also always true?

There's MUCH more to be dropped, I just wanted to put this IDEA for RFC :)

-- 
Rafa?


From Larry.Finger at lwfinger.net  Sun Jul 22 16:42:38 2012
From: Larry.Finger at lwfinger.net (Larry Finger)
Date: Sun, 22 Jul 2012 15:42:38 -0500
Subject: [IDEA RFC][PATCH] b43: G-PHY: drop unused PHY rev 1 code
In-Reply-To: <1342962054-26239-1-git-send-email-zajec5@gmail.com>
References: <1342962054-26239-1-git-send-email-zajec5@gmail.com>
Message-ID: <500C65BE.8030700@lwfinger.net>

On 07/22/2012 08:00 AM, Rafa? Mi?ecki wrote:
> b43 does not support devices with G-PHY rev 1. They are handled by
> b43legacy.

I agree with this change.

Larry

> ---
> This change matches http://bcm-v4.sipsolutions.net/802.11/PHY/Init/G
> routine. Since b43 and b43legacy were splitted, I believe PHY support
> can be splitted too.
>
> I think similar change (just "reversed" can be applied to the b43legacy)
> ---
>   drivers/net/wireless/b43/main.c  |    2 +-
>   drivers/net/wireless/b43/phy_g.c |  103 +-------------------------------------
>   2 files changed, 2 insertions(+), 103 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> index b80352b..8e5f4e8 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -4306,7 +4306,7 @@ static int b43_phy_versioning(struct b43_wldev *dev)
>   			unsupported = 1;
>   		break;
>   	case B43_PHYTYPE_G:
> -		if (phy_rev > 9)
> +		if (phy_rev < 2 || phy_rev > 9)
>   			unsupported = 1;
>   		break;
>   #ifdef CONFIG_B43_PHY_N
> diff --git a/drivers/net/wireless/b43/phy_g.c b/drivers/net/wireless/b43/phy_g.c
> index 12f467b..a67f278 100644
> --- a/drivers/net/wireless/b43/phy_g.c
> +++ b/drivers/net/wireless/b43/phy_g.c
> @@ -1489,104 +1489,6 @@ static u16 b43_radio_init2050(struct b43_wldev *dev)
>   	return ret;
>   }
>
> -static void b43_phy_initb5(struct b43_wldev *dev)
> -{
> -	struct b43_phy *phy = &dev->phy;
> -	struct b43_phy_g *gphy = phy->g;
> -	u16 offset, value;
> -	u8 old_channel;
> -
> -	if (phy->analog == 1) {
> -		b43_radio_set(dev, 0x007A, 0x0050);
> -	}
> -	if ((dev->dev->board_vendor != SSB_BOARDVENDOR_BCM) &&
> -	    (dev->dev->board_type != SSB_BOARD_BU4306)) {
> -		value = 0x2120;
> -		for (offset = 0x00A8; offset < 0x00C7; offset++) {
> -			b43_phy_write(dev, offset, value);
> -			value += 0x202;
> -		}
> -	}
> -	b43_phy_maskset(dev, 0x0035, 0xF0FF, 0x0700);
> -	if (phy->radio_ver == 0x2050)
> -		b43_phy_write(dev, 0x0038, 0x0667);
> -
> -	if (phy->gmode || phy->rev >= 2) {
> -		if (phy->radio_ver == 0x2050) {
> -			b43_radio_set(dev, 0x007A, 0x0020);
> -			b43_radio_set(dev, 0x0051, 0x0004);
> -		}
> -		b43_write16(dev, B43_MMIO_PHY_RADIO, 0x0000);
> -
> -		b43_phy_set(dev, 0x0802, 0x0100);
> -		b43_phy_set(dev, 0x042B, 0x2000);
> -
> -		b43_phy_write(dev, 0x001C, 0x186A);
> -
> -		b43_phy_maskset(dev, 0x0013, 0x00FF, 0x1900);
> -		b43_phy_maskset(dev, 0x0035, 0xFFC0, 0x0064);
> -		b43_phy_maskset(dev, 0x005D, 0xFF80, 0x000A);
> -	}
> -
> -	if (dev->bad_frames_preempt) {
> -		b43_phy_set(dev, B43_PHY_RADIO_BITFIELD, (1 << 11));
> -	}
> -
> -	if (phy->analog == 1) {
> -		b43_phy_write(dev, 0x0026, 0xCE00);
> -		b43_phy_write(dev, 0x0021, 0x3763);
> -		b43_phy_write(dev, 0x0022, 0x1BC3);
> -		b43_phy_write(dev, 0x0023, 0x06F9);
> -		b43_phy_write(dev, 0x0024, 0x037E);
> -	} else
> -		b43_phy_write(dev, 0x0026, 0xCC00);
> -	b43_phy_write(dev, 0x0030, 0x00C6);
> -	b43_write16(dev, 0x03EC, 0x3F22);
> -
> -	if (phy->analog == 1)
> -		b43_phy_write(dev, 0x0020, 0x3E1C);
> -	else
> -		b43_phy_write(dev, 0x0020, 0x301C);
> -
> -	if (phy->analog == 0)
> -		b43_write16(dev, 0x03E4, 0x3000);
> -
> -	old_channel = phy->channel;
> -	/* Force to channel 7, even if not supported. */
> -	b43_gphy_channel_switch(dev, 7, 0);
> -
> -	if (phy->radio_ver != 0x2050) {
> -		b43_radio_write16(dev, 0x0075, 0x0080);
> -		b43_radio_write16(dev, 0x0079, 0x0081);
> -	}
> -
> -	b43_radio_write16(dev, 0x0050, 0x0020);
> -	b43_radio_write16(dev, 0x0050, 0x0023);
> -
> -	if (phy->radio_ver == 0x2050) {
> -		b43_radio_write16(dev, 0x0050, 0x0020);
> -		b43_radio_write16(dev, 0x005A, 0x0070);
> -	}
> -
> -	b43_radio_write16(dev, 0x005B, 0x007B);
> -	b43_radio_write16(dev, 0x005C, 0x00B0);
> -
> -	b43_radio_set(dev, 0x007A, 0x0007);
> -
> -	b43_gphy_channel_switch(dev, old_channel, 0);
> -
> -	b43_phy_write(dev, 0x0014, 0x0080);
> -	b43_phy_write(dev, 0x0032, 0x00CA);
> -	b43_phy_write(dev, 0x002A, 0x88A3);
> -
> -	b43_set_txpower_g(dev, &gphy->bbatt, &gphy->rfatt, gphy->tx_control);
> -
> -	if (phy->radio_ver == 0x2050)
> -		b43_radio_write16(dev, 0x005D, 0x000D);
> -
> -	b43_write16(dev, 0x03E4, (b43_read16(dev, 0x03E4) & 0xFFC0) | 0x0004);
> -}
> -
>   static void b43_phy_initb6(struct b43_wldev *dev)
>   {
>   	struct b43_phy *phy = &dev->phy;
> @@ -1993,10 +1895,7 @@ static void b43_phy_initg(struct b43_wldev *dev)
>   	struct b43_phy_g *gphy = phy->g;
>   	u16 tmp;
>
> -	if (phy->rev == 1)
> -		b43_phy_initb5(dev);
> -	else
> -		b43_phy_initb6(dev);
> +	b43_phy_initb6(dev);
>
>   	if (phy->rev >= 2 || phy->gmode)
>   		b43_phy_inita(dev);
>




From zajec5 at gmail.com  Mon Jul 23 13:11:02 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Mon, 23 Jul 2012 19:11:02 +0200
Subject: [PATCH] b43: be more user friendly with PHY info
Message-ID: <1343063462-3719-1-git-send-email-zajec5@gmail.com>

First of all, use PHY names instead of magic numbers. It should make
configuring kernel easier in case of not enabled PHY type support.
Secondly, always print info about PHY. This is really basic info about
hardware and quite important for the support level.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 drivers/net/wireless/b43/main.c |   36 +++++++++++++++++++++++++++++++-----
 1 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index b80352b..a56f182 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4277,6 +4277,33 @@ out:
 	return err;
 }
 
+static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
+{
+	switch (phy_type) {
+	case B43_PHYTYPE_A:
+		return "A";
+	case B43_PHYTYPE_B:
+		return "B";
+	case B43_PHYTYPE_G:
+		return "G";
+	case B43_PHYTYPE_N:
+		return "N";
+	case B43_PHYTYPE_LP:
+		return "LP";
+	case B43_PHYTYPE_SSLPN:
+		return "SSLPN";
+	case B43_PHYTYPE_HT:
+		return "HT";
+	case B43_PHYTYPE_LCN:
+		return "LCN";
+	case B43_PHYTYPE_LCNXN:
+		return "LCNXN";
+	}
+
+	b43err(dev->wl, "Unknown PHY Type: %d\n", phy_type);
+	return "UNKNOWN";
+}
+
 /* Get PHY and RADIO versioning numbers */
 static int b43_phy_versioning(struct b43_wldev *dev)
 {
@@ -4337,13 +4364,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
 		unsupported = 1;
 	}
 	if (unsupported) {
-		b43err(dev->wl, "FOUND UNSUPPORTED PHY "
-		       "(Analog %u, Type %u, Revision %u)\n",
-		       analog_type, phy_type, phy_rev);
+		b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %s, Revision %u)\n",
+		       analog_type, b43_phy_name(dev, phy_type), phy_rev);
 		return -EOPNOTSUPP;
 	}
-	b43dbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n",
-	       analog_type, phy_type, phy_rev);
+	b43info(dev->wl, "Found PHY: Analog %u, Type %s, Revision %u\n",
+		analog_type, b43_phy_name(dev, phy_type), phy_rev);
 
 	/* Get RADIO versioning */
 	if (dev->dev->core_rev >= 24) {
-- 
1.7.7



From Larry.Finger at lwfinger.net  Mon Jul 23 12:46:28 2012
From: Larry.Finger at lwfinger.net (Larry Finger)
Date: Mon, 23 Jul 2012 11:46:28 -0500
Subject: [PATCH] b43: be more user friendly with PHY info
In-Reply-To: <1343063462-3719-1-git-send-email-zajec5@gmail.com>
References: <1343063462-3719-1-git-send-email-zajec5@gmail.com>
Message-ID: <500D7FE4.1090100@lwfinger.net>

On 07/23/2012 12:11 PM, Rafa? Mi?ecki wrote:
> First of all, use PHY names instead of magic numbers. It should make
> configuring kernel easier in case of not enabled PHY type support.
> Secondly, always print info about PHY. This is really basic info about
> hardware and quite important for the support level.
>
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
> ---
>   drivers/net/wireless/b43/main.c |   36 +++++++++++++++++++++++++++++++-----
>   1 files changed, 31 insertions(+), 5 deletions(-)

I like this change. It is worth the small increase in the size of b43.

Larry

>
> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> index b80352b..a56f182 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -4277,6 +4277,33 @@ out:
>   	return err;
>   }
>
> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
> +{
> +	switch (phy_type) {
> +	case B43_PHYTYPE_A:
> +		return "A";
> +	case B43_PHYTYPE_B:
> +		return "B";
> +	case B43_PHYTYPE_G:
> +		return "G";
> +	case B43_PHYTYPE_N:
> +		return "N";
> +	case B43_PHYTYPE_LP:
> +		return "LP";
> +	case B43_PHYTYPE_SSLPN:
> +		return "SSLPN";
> +	case B43_PHYTYPE_HT:
> +		return "HT";
> +	case B43_PHYTYPE_LCN:
> +		return "LCN";
> +	case B43_PHYTYPE_LCNXN:
> +		return "LCNXN";
> +	}
> +
> +	b43err(dev->wl, "Unknown PHY Type: %d\n", phy_type);
> +	return "UNKNOWN";
> +}
> +
>   /* Get PHY and RADIO versioning numbers */
>   static int b43_phy_versioning(struct b43_wldev *dev)
>   {
> @@ -4337,13 +4364,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
>   		unsupported = 1;
>   	}
>   	if (unsupported) {
> -		b43err(dev->wl, "FOUND UNSUPPORTED PHY "
> -		       "(Analog %u, Type %u, Revision %u)\n",
> -		       analog_type, phy_type, phy_rev);
> +		b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %s, Revision %u)\n",
> +		       analog_type, b43_phy_name(dev, phy_type), phy_rev);
>   		return -EOPNOTSUPP;
>   	}
> -	b43dbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n",
> -	       analog_type, phy_type, phy_rev);
> +	b43info(dev->wl, "Found PHY: Analog %u, Type %s, Revision %u\n",
> +		analog_type, b43_phy_name(dev, phy_type), phy_rev);
>
>   	/* Get RADIO versioning */
>   	if (dev->dev->core_rev >= 24) {
>




From thomas at net.t-labs.tu-berlin.de  Mon Jul 23 15:33:42 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Mon, 23 Jul 2012 21:33:42 +0200
Subject: [PATCH v4] mac80211: Remove control.sta from struct ieee80211_tx_info
 and restructure tx-path
Message-ID: <1343072022-1383-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

The pointer control.sta is removed from ieee80211_tx_info to free up
sufficient memory in SKB_CB on the tx-path to enable new annotations
per data packet e.g.support of upcoming Transmit Power Control (TPC).
Now the control.sta pointer is put on the stack where passed as
function parameter to the .tx equivalent (ieee80211_ops) of each
affected wireless driver.
Therefore a new structure ieee80211_tx_control is added to mac80211.h
which holds the sta structure instead. The tx-path of all affected
drivers is restructured to respect the chaneges.

Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
Signed-off-by: Alina Friedrichsen <x-alina at gmx.net>
Signed-off-by: Felix Fietkau <nbd at openwrt.org>
---
restructure this patch to respect logical API evolutions. thx to Johannes Berg
add missing drivers that are effected as well. thx to Xose Vazquez Perez
add missing drivers that are effected as well. thx to Johannes Berg
updated to lastest version of wireless-testing
---
 drivers/net/wireless/adm8211.c                     |  4 +++-
 drivers/net/wireless/at76c50x-usb.c                |  4 +++-
 drivers/net/wireless/ath/ath5k/mac80211-ops.c      |  3 ++-
 drivers/net/wireless/ath/ath9k/ath9k.h             |  1 +
 drivers/net/wireless/ath/ath9k/htc.h               |  1 +
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c    |  2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |  6 +++--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |  2 +-
 drivers/net/wireless/ath/ath9k/main.c              |  5 ++++-
 drivers/net/wireless/ath/ath9k/xmit.c              |  9 ++++----
 drivers/net/wireless/ath/carl9170/carl9170.h       |  4 +++-
 drivers/net/wireless/ath/carl9170/tx.c             | 16 ++++++-------
 drivers/net/wireless/b43/main.c                    |  3 ++-
 drivers/net/wireless/b43legacy/main.c              |  1 +
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
 drivers/net/wireless/iwlegacy/3945-mac.c           | 12 ++++++----
 drivers/net/wireless/iwlegacy/4965-mac.c           | 26 +++++++++++++---------
 drivers/net/wireless/iwlegacy/4965.h               |  8 +++++--
 drivers/net/wireless/iwlwifi/dvm/agn.h             |  4 +++-
 drivers/net/wireless/iwlwifi/dvm/mac80211.c        |  6 +++--
 drivers/net/wireless/iwlwifi/dvm/tx.c              | 16 +++++++------
 drivers/net/wireless/libertas_tf/main.c            |  4 +++-
 drivers/net/wireless/mac80211_hwsim.c              |  8 ++++---
 drivers/net/wireless/mwl8k.c                       | 17 ++++++++------
 drivers/net/wireless/p54/lmac.h                    |  4 +++-
 drivers/net/wireless/p54/main.c                    |  2 +-
 drivers/net/wireless/p54/txrx.c                    | 15 ++++++++-----
 drivers/net/wireless/rt2x00/rt2x00.h               |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00dev.c            |  2 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c            |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00queue.c          | 20 +++++++++--------
 drivers/net/wireless/rtl818x/rtl8180/dev.c         |  6 +++--
 drivers/net/wireless/rtl818x/rtl8187/dev.c         |  6 +++--
 drivers/net/wireless/rtlwifi/base.c                |  3 +--
 drivers/net/wireless/rtlwifi/core.c                |  8 ++++---
 drivers/net/wireless/rtlwifi/pci.c                 | 16 ++++++-------
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.h       |  4 +++-
 drivers/net/wireless/rtlwifi/rtl8192de/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192de/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/rtl8192se/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192se/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/usb.c                 | 15 ++++++++-----
 drivers/net/wireless/rtlwifi/wifi.h                | 13 +++++++----
 drivers/net/wireless/ti/wl1251/main.c              |  4 +++-
 drivers/net/wireless/ti/wlcore/main.c              |  6 +++--
 drivers/net/wireless/ti/wlcore/tx.c                | 11 ++++-----
 drivers/net/wireless/zd1211rw/zd_mac.c             |  6 +++--
 drivers/staging/winbond/wbusb.c                    |  4 +++-
 include/net/mac80211.h                             | 20 ++++++++++++-----
 net/mac80211/driver-ops.h                          |  6 +++--
 net/mac80211/ieee80211_i.h                         |  2 ++
 net/mac80211/tx.c                                  | 13 ++++++-----
 55 files changed, 245 insertions(+), 140 deletions(-)

diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 0ac09a2..b661ce2 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1661,7 +1661,9 @@ static void adm8211_tx_raw(struct ieee80211_hw *dev, struct sk_buff *skb,
 }
 
 /* Put adm8211_tx_hdr on skb and transmit */
-static void adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void adm8211_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct adm8211_tx_hdr *txhdr;
 	size_t payload_len, hdrlen;
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index efc162e..abb520d 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1726,7 +1726,9 @@ static void at76_mac80211_tx_callback(struct urb *urb)
 	ieee80211_wake_queues(priv->hw);
 }
 
-static void at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void at76_mac80211_tx(struct ieee80211_hw *hw,
+			     struct ieee80211_tx_control *control,
+			     struct sk_buff *skb)
 {
 	struct at76_priv *priv = hw->priv;
 	struct at76_tx_buffer *tx_buffer = priv->bulk_out_buffer;
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 260e7dc..934f04c 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -55,7 +55,8 @@
 \********************/
 
 static void
-ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+ath5k_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
+	 struct sk_buff *skb)
 {
 	struct ath5k_hw *ah = hw->priv;
 	u16 qnum = skb_get_queue_mapping(skb);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index b09285c..7373e4b 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -280,6 +280,7 @@ struct ath_tx_control {
 	struct ath_txq *txq;
 	struct ath_node *an;
 	u8 paprd;
+	struct ieee80211_sta *sta;
 };
 
 #define ATH_TX_ERROR        0x01
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 936e920..b30596f 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -542,6 +542,7 @@ void ath9k_htc_stop_ani(struct ath9k_htc_priv *priv);
 
 int ath9k_tx_init(struct ath9k_htc_priv *priv);
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb, u8 slot, bool is_cab);
 void ath9k_tx_cleanup(struct ath9k_htc_priv *priv);
 bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index 77d541f..f42d2eb 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -326,7 +326,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv,
 			goto next;
 		}
 
-		ret = ath9k_htc_tx_start(priv, skb, tx_slot, true);
+		ret = ath9k_htc_tx_start(priv, NULL, skb, tx_slot, true);
 		if (ret != 0) {
 			ath9k_htc_tx_clear_slot(priv, tx_slot);
 			dev_kfree_skb_any(skb);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index c785129..8a0ccf7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -856,7 +856,9 @@ set_timer:
 /* mac80211 Callbacks */
 /**********************/
 
-static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_htc_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct ath9k_htc_priv *priv = hw->priv;
@@ -883,7 +885,7 @@ static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto fail_tx;
 	}
 
-	ret = ath9k_htc_tx_start(priv, skb, slot, false);
+	ret = ath9k_htc_tx_start(priv, control->sta, skb, slot, false);
 	if (ret != 0) {
 		ath_dbg(common, XMIT, "Tx failed\n");
 		goto clear_slot;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 47e61d0..06cdcb7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -333,12 +333,12 @@ static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,
 }
 
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb,
 		       u8 slot, bool is_cab)
 {
 	struct ieee80211_hdr *hdr;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_vif *vif = tx_info->control.vif;
 	struct ath9k_htc_sta *ista;
 	struct ath9k_htc_vif *avp = NULL;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 6049d8b..4d8dc9f 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -694,7 +694,9 @@ mutex_unlock:
 	return r;
 }
 
-static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct ath_softc *sc = hw->priv;
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
@@ -754,6 +756,7 @@ static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	memset(&txctl, 0, sizeof(struct ath_tx_control));
 	txctl.txq = sc->tx.txq_map[skb_get_queue_mapping(skb)];
+	txctl.sta = control->sta;
 
 	ath_dbg(common, XMIT, "transmitting packet, skb: %p\n", skb);
 
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 2c9da6b..ef91f6c 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1773,11 +1773,12 @@ static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
 	TX_STAT_INC(txq->axq_qnum, queued);
 }
 
-static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb,
+static void setup_frame_info(struct ieee80211_hw *hw,
+			     struct ieee80211_sta *sta,
+			     struct sk_buff *skb,
 			     int framelen)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	const struct ieee80211_rate *rate;
@@ -1935,7 +1936,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
+	struct ieee80211_sta *sta = txctl->sta;
 	struct ieee80211_vif *vif = info->control.vif;
 	struct ath_softc *sc = hw->priv;
 	struct ath_txq *txq = txctl->txq;
@@ -1979,7 +1980,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	    !ieee80211_is_data(hdr->frame_control))
 		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
 
-	setup_frame_info(hw, skb, frmlen);
+	setup_frame_info(hw, sta, skb, frmlen);
 
 	/*
 	 * At this point, the vif, hw_key and sta pointers in the tx control
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index 376be11..8f0cbc3 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -577,7 +577,9 @@ void carl9170_rx(struct ar9170 *ar, void *buf, unsigned int len);
 void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len);
 
 /* TX */
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb);
 void carl9170_tx_janitor(struct work_struct *work);
 void carl9170_tx_process_status(struct ar9170 *ar,
 				const struct carl9170_rsp *cmd);
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 6a86814..84377cf 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -867,14 +867,15 @@ static bool carl9170_tx_cts_check(struct ar9170 *ar,
 	return false;
 }
 
-static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
+static int carl9170_tx_prepare(struct ar9170 *ar,
+			       struct ieee80211_sta *sta,
+			       struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct _carl9170_tx_superframe *txc;
 	struct carl9170_vif_info *cvif;
 	struct ieee80211_tx_info *info;
 	struct ieee80211_tx_rate *txrate;
-	struct ieee80211_sta *sta;
 	struct carl9170_tx_info *arinfo;
 	unsigned int hw_queue;
 	int i;
@@ -910,8 +911,6 @@ static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
 	else
 		cvif = NULL;
 
-	sta = info->control.sta;
-
 	txc = (void *)skb_push(skb, sizeof(*txc));
 	memset(txc, 0, sizeof(*txc));
 
@@ -1457,20 +1456,21 @@ err_unlock_rcu:
 	return false;
 }
 
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb)
 {
 	struct ar9170 *ar = hw->priv;
 	struct ieee80211_tx_info *info;
-	struct ieee80211_sta *sta;
+	struct ieee80211_sta *sta = control->sta;
 	bool run;
 
 	if (unlikely(!IS_STARTED(ar)))
 		goto err_free;
 
 	info = IEEE80211_SKB_CB(skb);
-	sta = info->control.sta;
 
-	if (unlikely(carl9170_tx_prepare(ar, skb)))
+	if (unlikely(carl9170_tx_prepare(ar, sta, skb)))
 		goto err_free;
 
 	carl9170_tx_accounting(ar, skb);
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index b80352b..2ca4e88 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3407,7 +3407,8 @@ static void b43_tx_work(struct work_struct *work)
 }
 
 static void b43_op_tx(struct ieee80211_hw *hw,
-		     struct sk_buff *skb)
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct b43_wl *wl = hw_to_b43_wl(hw);
 
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 8156135..74d4c20 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2492,6 +2492,7 @@ static void b43legacy_tx_work(struct work_struct *work)
 }
 
 static void b43legacy_op_tx(struct ieee80211_hw *hw,
+			    struct ieee80211_tx_control *control,
 			    struct sk_buff *skb)
 {
 	struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 9e79d47..a7be68d 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
 	}
 }
 
-static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void brcms_ops_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct brcms_info *wl = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -276,7 +278,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto done;
 	}
 	brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
-	tx_info->rate_driver_data[0] = tx_info->control.sta;
+	tx_info->rate_driver_data[0] = control->sta;
  done:
 	spin_unlock_bh(&wl->lock);
 }
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index faec404..e252acb 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -460,7 +460,9 @@ il3945_build_tx_cmd_basic(struct il_priv *il, struct il_device_cmd *cmd,
  * start C_TX command process
  */
 static int
-il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il3945_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -512,7 +514,7 @@ il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	hdr_len = ieee80211_hdrlen(fc);
 
 	/* Find idx into station table for destination station */
-	sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+	sta_id = il_sta_id_or_broadcast(il, sta);
 	if (sta_id == IL_INVALID_STATION) {
 		D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
 		goto drop;
@@ -2859,7 +2861,9 @@ il3945_mac_stop(struct ieee80211_hw *hw)
 }
 
 static void
-il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il3945_mac_tx(struct ieee80211_hw *hw,
+	       struct ieee80211_tx_control *control,
+	       struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -2868,7 +2872,7 @@ il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il3945_tx_skb(il, skb))
+	if (il3945_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MAC80211("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 34f61a0..eac4dc8 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -1526,8 +1526,11 @@ il4965_tx_cmd_build_basic(struct il_priv *il, struct sk_buff *skb,
 }
 
 static void
-il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
-			 struct ieee80211_tx_info *info, __le16 fc)
+il4965_tx_cmd_build_rate(struct il_priv *il,
+			 struct il_tx_cmd *tx_cmd,
+			 struct ieee80211_tx_info *info,
+			 struct ieee80211_sta *sta,
+			 __le16 fc)
 {
 	const u8 rts_retry_limit = 60;
 	u32 rate_flags;
@@ -1561,9 +1564,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
 	rate_idx = info->control.rates[0].idx;
 	if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0
 	    || rate_idx > RATE_COUNT_LEGACY)
-		rate_idx =
-		    rate_lowest_index(&il->bands[info->band],
-				      info->control.sta);
+		rate_idx = rate_lowest_index(&il->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IL_FIRST_OFDM_RATE;
@@ -1630,11 +1631,12 @@ il4965_tx_cmd_build_hwcrypto(struct il_priv *il, struct ieee80211_tx_info *info,
  * start C_TX command process
  */
 int
-il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il4965_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct il_station_priv *sta_priv = NULL;
 	struct il_tx_queue *txq;
 	struct il_queue *q;
@@ -1680,7 +1682,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 		sta_id = il->hw_params.bcast_id;
 	else {
 		/* Find idx into station table for destination station */
-		sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+		sta_id = il_sta_id_or_broadcast(il, sta);
 
 		if (sta_id == IL_INVALID_STATION) {
 			D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
@@ -1786,7 +1788,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id);
 
-	il4965_tx_cmd_build_rate(il, tx_cmd, info, fc);
+	il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc);
 
 	il_update_stats(il, true, fc, len);
 	/*
@@ -5828,7 +5830,9 @@ il4965_mac_stop(struct ieee80211_hw *hw)
 }
 
 void
-il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il4965_mac_tx(struct ieee80211_hw *hw,
+	      struct ieee80211_tx_control *control,
+	      struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -5837,7 +5841,7 @@ il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il4965_tx_skb(il, skb))
+	if (il4965_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MACDUMP("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 1db6776..2d092f3 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -78,7 +78,9 @@ int il4965_hw_txq_attach_buf_to_tfd(struct il_priv *il, struct il_tx_queue *txq,
 int il4965_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq);
 void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags,
 				 struct ieee80211_tx_info *info);
-int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb);
+int il4965_tx_skb(struct il_priv *il,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 * ssn);
 int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif,
@@ -163,7 +165,9 @@ void il4965_eeprom_release_semaphore(struct il_priv *il);
 int il4965_eeprom_check_version(struct il_priv *il);
 
 /* mac80211 handlers (for 4965) */
-void il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void il4965_mac_tx(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 int il4965_mac_start(struct ieee80211_hw *hw);
 void il4965_mac_stop(struct ieee80211_hw *hw);
 void il4965_configure_filter(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlwifi/dvm/agn.h b/drivers/net/wireless/iwlwifi/dvm/agn.h
index 9bb16bd..f0b8c1f 100644
--- a/drivers/net/wireless/iwlwifi/dvm/agn.h
+++ b/drivers/net/wireless/iwlwifi/dvm/agn.h
@@ -201,7 +201,9 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success);
 
 
 /* tx */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb);
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 *ssn);
 int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif,
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index a5f7bce..e64af60 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -511,14 +511,16 @@ static void iwlagn_mac_set_wakeup(struct ieee80211_hw *hw, bool enabled)
 }
 #endif
 
-static void iwlagn_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void iwlagn_mac_tx(struct ieee80211_hw *hw,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
 	struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
 
 	IWL_DEBUG_TX(priv, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 		     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (iwlagn_tx_skb(priv, skb))
+	if (iwlagn_tx_skb(priv, control->sta, skb))
 		dev_kfree_skb_any(skb);
 }
 
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
index 5971a23..d17799b 100644
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
@@ -127,6 +127,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
 static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 				     struct iwl_tx_cmd *tx_cmd,
 				     struct ieee80211_tx_info *info,
+				     struct ieee80211_sta *sta,
 				     __le16 fc)
 {
 	u32 rate_flags;
@@ -187,8 +188,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 	if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS ||
 			(rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY))
 		rate_idx = rate_lowest_index(
-				&priv->eeprom_data->bands[info->band],
-				info->control.sta);
+				&priv->eeprom_data->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IWL_FIRST_OFDM_RATE;
@@ -291,7 +291,9 @@ static int iwl_sta_id_or_broadcast(struct iwl_rxon_context *context,
 /*
  * start REPLY_TX command process
  */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -345,7 +347,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 		sta_id = ctx->bcast_sta_id;
 	else {
 		/* Find index into station table for destination station */
-		sta_id = iwl_sta_id_or_broadcast(ctx, info->control.sta);
+		sta_id = iwl_sta_id_or_broadcast(ctx, sta);
 		if (sta_id == IWL_INVALID_STATION) {
 			IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
 				       hdr->addr1);
@@ -355,8 +357,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 
 	IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
 
-	if (info->control.sta)
-		sta_priv = (void *)info->control.sta->drv_priv;
+	if (sta)
+		sta_priv = (void *)sta->drv_priv;
 
 	if (sta_priv && sta_priv->asleep &&
 	    (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) {
@@ -397,7 +399,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	iwlagn_tx_cmd_build_basic(priv, skb, tx_cmd, info, hdr, sta_id);
 
-	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, fc);
+	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, sta, fc);
 
 	memset(&info->status, 0, sizeof(info->status));
 
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index a034572..7001856 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -227,7 +227,9 @@ static void lbtf_free_adapter(struct lbtf_private *priv)
 	lbtf_deb_leave(LBTF_DEB_MAIN);
 }
 
-static void lbtf_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void lbtf_op_tx(struct ieee80211_hw *hw,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct lbtf_private *priv = hw->priv;
 
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 826ac7b..ff20dbb 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -709,7 +709,9 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
 	return ack;
 }
 
-static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
+			      struct ieee80211_tx_control *control,
+			      struct sk_buff *skb)
 {
 	bool ack;
 	struct ieee80211_tx_info *txi;
@@ -741,8 +743,8 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	if (txi->control.vif)
 		hwsim_check_magic(txi->control.vif);
-	if (txi->control.sta)
-		hwsim_check_sta_magic(txi->control.sta);
+	if (control->sta)
+		hwsim_check_sta_magic(control->sta);
 
 	ieee80211_tx_info_clear_status(txi);
 
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 224e03a..5099e53 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1830,12 +1830,14 @@ static inline void mwl8k_tx_count_packet(struct ieee80211_sta *sta, u8 tid)
 }
 
 static void
-mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
+mwl8k_txq_xmit(struct ieee80211_hw *hw,
+	       int index,
+	       struct ieee80211_sta *sta,
+	       struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	struct ieee80211_tx_info *tx_info;
 	struct mwl8k_vif *mwl8k_vif;
-	struct ieee80211_sta *sta;
 	struct ieee80211_hdr *wh;
 	struct mwl8k_tx_queue *txq;
 	struct mwl8k_tx_desc *tx;
@@ -1867,7 +1869,6 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	wh = &((struct mwl8k_dma_data *)skb->data)->wh;
 
 	tx_info = IEEE80211_SKB_CB(skb);
-	sta = tx_info->control.sta;
 	mwl8k_vif = MWL8K_VIF(tx_info->control.vif);
 
 	if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
@@ -2019,8 +2020,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	tx->pkt_phys_addr = cpu_to_le32(dma);
 	tx->pkt_len = cpu_to_le16(skb->len);
 	tx->rate_info = 0;
-	if (!priv->ap_fw && tx_info->control.sta != NULL)
-		tx->peer_id = MWL8K_STA(tx_info->control.sta)->peer_id;
+	if (!priv->ap_fw && sta != NULL)
+		tx->peer_id = MWL8K_STA(sta)->peer_id;
 	else
 		tx->peer_id = 0;
 
@@ -4364,7 +4365,9 @@ static void mwl8k_rx_poll(unsigned long data)
 /*
  * Core driver operations.
  */
-static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mwl8k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	int index = skb_get_queue_mapping(skb);
@@ -4376,7 +4379,7 @@ static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		return;
 	}
 
-	mwl8k_txq_xmit(hw, index, skb);
+	mwl8k_txq_xmit(hw, index, control->sta, skb);
 }
 
 static int mwl8k_start(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/p54/lmac.h b/drivers/net/wireless/p54/lmac.h
index 3d8d622..de1d46b 100644
--- a/drivers/net/wireless/p54/lmac.h
+++ b/drivers/net/wireless/p54/lmac.h
@@ -526,7 +526,9 @@ int p54_init_leds(struct p54_common *priv);
 void p54_unregister_leds(struct p54_common *priv);
 
 /* xmit functions */
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb);
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int p54_tx_cancel(struct p54_common *priv, __le32 req_id);
 void p54_tx(struct p54_common *priv, struct sk_buff *skb);
 
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 7cffea7..5e91ad0 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -158,7 +158,7 @@ static int p54_beacon_update(struct p54_common *priv,
 	 * to cancel the old beacon template by hand, instead the firmware
 	 * will release the previous one through the feedback mechanism.
 	 */
-	p54_tx_80211(priv->hw, beacon);
+	p54_tx_80211(priv->hw, NULL, beacon);
 	priv->tsf_high32 = 0;
 	priv->tsf_low32 = 0;
 
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index f38786e..5861e13 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -676,8 +676,9 @@ int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb)
 EXPORT_SYMBOL_GPL(p54_rx);
 
 static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
-				struct ieee80211_tx_info *info, u8 *queue,
-				u32 *extra_len, u16 *flags, u16 *aid,
+				struct ieee80211_tx_info *info,
+				struct ieee80211_sta *sta,
+				u8 *queue, u32 *extra_len, u16 *flags, u16 *aid,
 				bool *burst_possible)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -746,8 +747,8 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
 			}
 		}
 
-		if (info->control.sta)
-			*aid = info->control.sta->aid;
+		if (sta)
+			*aid = sta->aid;
 		break;
 	}
 }
@@ -767,7 +768,9 @@ static u8 p54_convert_algo(u32 cipher)
 	}
 }
 
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct p54_common *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -784,7 +787,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
 	u8 nrates = 0, nremaining = 8;
 	bool burst_allowed = false;
 
-	p54_tx_80211_header(priv, skb, info, &queue, &extra_len,
+	p54_tx_80211_header(priv, skb, info, control->sta, &queue, &extra_len,
 			    &hdr_flags, &aid, &burst_allowed);
 
 	if (p54_tx_qos_accounting_alloc(priv, skb, queue)) {
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 8afb546..f991e8b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1287,7 +1287,9 @@ void rt2x00lib_rxdone(struct queue_entry *entry, gfp_t gfp);
 /*
  * mac80211 handlers.
  */
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int rt2x00mac_start(struct ieee80211_hw *hw);
 void rt2x00mac_stop(struct ieee80211_hw *hw);
 int rt2x00mac_add_interface(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index a6b88bd..a59048f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -194,7 +194,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
 	 */
 	skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	while (skb) {
-		rt2x00mac_tx(rt2x00dev->hw, skb);
+		rt2x00mac_tx(rt2x00dev->hw, NULL, skb);
 		skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	}
 }
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 4ff26c2..c3d0f2f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -99,7 +99,9 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
 	return retval;
 }
 
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index f7e74a0..e488b94 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -315,6 +315,7 @@ static void rt2x00queue_create_tx_descriptor_plcp(struct rt2x00_dev *rt2x00dev,
 static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 						struct sk_buff *skb,
 						struct txentry_desc *txdesc,
+						struct ieee80211_sta *sta,
 						const struct rt2x00_rate *hwrate)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -322,11 +323,11 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct rt2x00_sta *sta_priv = NULL;
 
-	if (tx_info->control.sta) {
+	if (sta) {
 		txdesc->u.ht.mpdu_density =
-		    tx_info->control.sta->ht_cap.ampdu_density;
+		    sta->ht_cap.ampdu_density;
 
-		sta_priv = sta_to_rt2x00_sta(tx_info->control.sta);
+		sta_priv = sta_to_rt2x00_sta(sta);
 		txdesc->u.ht.wcid = sta_priv->wcid;
 	}
 
@@ -341,8 +342,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 		 * MIMO PS should be set to 1 for STA's using dynamic SM PS
 		 * when using more then one tx stream (>MCS7).
 		 */
-		if (tx_info->control.sta && txdesc->u.ht.mcs > 7 &&
-		    ((tx_info->control.sta->ht_cap.cap &
+		if (sta && txdesc->u.ht.mcs > 7 &&
+		    ((sta->ht_cap.cap &
 		      IEEE80211_HT_CAP_SM_PS) >>
 		     IEEE80211_HT_CAP_SM_PS_SHIFT) ==
 		    WLAN_HT_CAP_SM_PS_DYNAMIC)
@@ -409,7 +410,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 
 static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 					     struct sk_buff *skb,
-					     struct txentry_desc *txdesc)
+					     struct txentry_desc *txdesc,
+					     struct ieee80211_sta *sta)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -503,7 +505,7 @@ static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 
 	if (test_bit(REQUIRE_HT_TX_DESC, &rt2x00dev->cap_flags))
 		rt2x00queue_create_tx_descriptor_ht(rt2x00dev, skb, txdesc,
-						    hwrate);
+						   sta, hwrate);
 	else
 		rt2x00queue_create_tx_descriptor_plcp(rt2x00dev, skb, txdesc,
 						      hwrate);
@@ -595,7 +597,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc, NULL);
 
 	/*
 	 * All information is retrieved from the skb->cb array,
@@ -740,7 +742,7 @@ int rt2x00queue_update_beacon_locked(struct rt2x00_dev *rt2x00dev,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc, NULL);
 
 	/*
 	 * Fill in skb descriptor
diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 3b50539..fd8fcbd 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -244,7 +244,9 @@ static irqreturn_t rtl8180_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static void rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8180_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -710,7 +712,7 @@ static void rtl8180_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8180_tx(dev, skb);
+	rtl8180_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index 4fb1ca1..c7bfcf3 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -228,7 +228,9 @@ static void rtl8187_tx_cb(struct urb *urb)
 	}
 }
 
-static void rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8187_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct rtl8187_priv *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1076,7 +1078,7 @@ static void rtl8187_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8187_tx(dev, skb);
+	rtl8187_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 41f7f12..1b2ffdb 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -1341,9 +1341,8 @@ int rtl_send_smps_action(struct ieee80211_hw *hw,
 		rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
 
 		info->control.rates[0].idx = 0;
-		info->control.sta = sta;
 		info->band = hw->conf.channel->band;
-		rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+		rtlpriv->intf_ops->adapter_tx(hw, sta, skb, &tcb_desc);
 	}
 err_free:
 	return 0;
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 278e9f9..db903fd 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -124,7 +124,9 @@ static void rtl_op_stop(struct ieee80211_hw *hw)
 	mutex_unlock(&rtlpriv->locks.conf_mutex);
 }
 
-static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void rtl_op_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
@@ -138,8 +140,8 @@ static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	if (!test_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status))
 		goto err_free;
 
-	if (!rtlpriv->intf_ops->waitq_insert(hw, skb))
-		rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+	if (!rtlpriv->intf_ops->waitq_insert(hw, control->sta, skb))
+		rtlpriv->intf_ops->adapter_tx(hw, control->sta, skb, &tcb_desc);
 
 	return;
 
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 2c6eb9e..0bde0ce 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -504,7 +504,7 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
 				_rtl_update_earlymode_info(hw, skb,
 							   &tcb_desc, tid);
 
-			rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+			rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, &tcb_desc);
 		}
 	}
 }
@@ -929,7 +929,7 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
 	info = IEEE80211_SKB_CB(pskb);
 	pdesc = &ring->desc[0];
 	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc,
-		info, pskb, BEACON_QUEUE, &tcb_desc);
+		info, NULL, pskb, BEACON_QUEUE, &tcb_desc);
 
 	__skb_queue_tail(&ring->queue, pskb);
 
@@ -1305,11 +1305,10 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw)
 }
 
 static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta,
 					struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct rtl_sta_info *sta_entry = NULL;
 	u8 tid = rtl_get_tid(skb);
 
@@ -1337,13 +1336,14 @@ static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
 	return true;
 }
 
-static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
-		struct rtl_tcb_desc *ptcb_desc)
+static int rtl_pci_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_sta *sta,
+		      struct sk_buff *skb,
+		      struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_sta_info *sta_entry = NULL;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct rtl8192_tx_ring *ring;
 	struct rtl_tx_desc *pdesc;
 	u8 idx;
@@ -1418,7 +1418,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
 
 	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc,
-			info, skb, hw_queue, ptcb_desc);
+			info, sta, skb, hw_queue, ptcb_desc);
 
 	__skb_queue_tail(&ring->queue, skb);
 
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
index 3af874e..1b13001 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
@@ -596,7 +596,9 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
 
 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 hw_queue, struct rtl_tcb_desc *tcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -604,7 +606,6 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	bool defaultadapter = true;
-	struct ieee80211_sta *sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
index c4adb97..a7cdd51 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
@@ -713,6 +713,7 @@ struct rx_desc_92c {
 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
index 21bc827..bb528a7 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
@@ -496,7 +496,9 @@ static void _rtl_tx_desc_checksum(u8 *txdesc)
 
 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 queue_index,
 			  struct rtl_tcb_desc *tcb_desc)
 {
@@ -504,7 +506,6 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	bool defaultadapter = true;
-	struct ieee80211_sta *sta = info->control.sta = info->control.sta;
 	u8 *qc = ieee80211_get_qos_ctl(hdr);
 	u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
 	u16 seq_number;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
index 332b06e..725c53a 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
@@ -420,7 +420,9 @@ struct sk_buff *rtl8192c_tx_aggregate_hdl(struct ieee80211_hw *,
 					   struct sk_buff_head *);
 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 queue_index,
 			  struct rtl_tcb_desc *tcb_desc);
 void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
index 1666ef7..323450e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
@@ -551,7 +551,9 @@ static void _rtl92de_insert_emcontent(struct rtl_tcb_desc *ptcb_desc,
 
 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -559,7 +561,6 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
-	struct ieee80211_sta *sta = info->control.sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
index 057a524..c1b5dfb 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
@@ -730,6 +730,7 @@ struct rx_desc_92d {
 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 bool rtl92de_rx_query_desc(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
index 812b585..55cb73f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
@@ -591,14 +591,15 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
 
 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
 		struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-		struct ieee80211_tx_info *info, struct sk_buff *skb,
+		struct ieee80211_tx_info *info,
+		struct ieee80211_sta *sta,
+		struct sk_buff *skb,
 		u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-	struct ieee80211_sta *sta = info->control.sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
index 011e7b0..64dd66f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
@@ -31,6 +31,7 @@
 
 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, bool firstseg,
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index aa970fc..9140469 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -848,8 +848,10 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
 	_rtl_submit_tx_urb(hw, _urb);
 }
 
-static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
-			    u16 hw_queue)
+static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw,
+				   struct ieee80211_sta *sta,
+				   struct sk_buff *skb,
+				   u16 hw_queue)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
@@ -891,7 +893,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
 		seq_number += 1;
 		seq_number <<= 4;
 	}
-	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, skb,
+	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, sta, skb,
 					hw_queue, &tcb_desc);
 	if (!ieee80211_has_morefrags(hdr->frame_control)) {
 		if (qc)
@@ -901,7 +903,9 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
 		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
 }
 
-static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
+static int rtl_usb_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_sta *sta,
+		      struct sk_buff *skb,
 		      struct rtl_tcb_desc *dummy)
 {
 	struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
@@ -913,7 +917,7 @@ static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 	if (unlikely(is_hal_stop(rtlhal)))
 		goto err_free;
 	hw_queue = rtlusb->usb_mq_to_hwq(fc, skb_get_queue_mapping(skb));
-	_rtl_usb_tx_preprocess(hw, skb, hw_queue);
+	_rtl_usb_tx_preprocess(hw, sta, skb, hw_queue);
 	_rtl_usb_transmit(hw, skb, hw_queue);
 	return NETDEV_TX_OK;
 
@@ -923,6 +927,7 @@ err_free:
 }
 
 static bool rtl_usb_tx_chk_waitq_insert(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta,
 					struct sk_buff *skb)
 {
 	return false;
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index cdaa21f..40153e7 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -122,7 +122,7 @@ enum rt_eeprom_type {
 	EEPROM_BOOT_EFUSE,
 };
 
-enum rtl_status {
+enum ttl_status {
 	RTL_STATUS_INTERFACE_START = 0,
 };
 
@@ -1418,6 +1418,7 @@ struct rtl_hal_ops {
 	void (*fill_tx_desc) (struct ieee80211_hw *hw,
 			      struct ieee80211_hdr *hdr, u8 *pdesc_tx,
 			      struct ieee80211_tx_info *info,
+			      struct ieee80211_sta *sta,
 			      struct sk_buff *skb, u8 hw_queue,
 			      struct rtl_tcb_desc *ptcb_desc);
 	void (*fill_fake_txdesc) (struct ieee80211_hw *hw, u8 *pDesc,
@@ -1475,11 +1476,15 @@ struct rtl_intf_ops {
 	int (*adapter_start) (struct ieee80211_hw *hw);
 	void (*adapter_stop) (struct ieee80211_hw *hw);
 
-	int (*adapter_tx) (struct ieee80211_hw *hw, struct sk_buff *skb,
-			struct rtl_tcb_desc *ptcb_desc);
+	int (*adapter_tx) (struct ieee80211_hw *hw,
+			   struct ieee80211_sta *sta,
+			   struct sk_buff *skb,
+			   struct rtl_tcb_desc *ptcb_desc);
 	void (*flush)(struct ieee80211_hw *hw, bool drop);
 	int (*reset_trx_ring) (struct ieee80211_hw *hw);
-	bool (*waitq_insert) (struct ieee80211_hw *hw, struct sk_buff *skb);
+	bool (*waitq_insert) (struct ieee80211_hw *hw,
+			      struct ieee80211_sta *sta,
+			      struct sk_buff *skb);
 
 	/*pci */
 	void (*disable_aspm) (struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index 3118c42..441cbcc 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -354,7 +354,9 @@ out:
 	return ret;
 }
 
-static void wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1251_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1251 *wl = hw->priv;
 	unsigned long flags;
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 7254860..cdac196 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1181,7 +1181,9 @@ out:
 	return ret;
 }
 
-static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1271_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1271 *wl = hw->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1197,7 +1199,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	mapping = skb_get_queue_mapping(skb);
 	q = wl1271_tx_get_queue(mapping);
 
-	hlid = wl12xx_tx_get_hlid(wl, wlvif, skb);
+	hlid = wl12xx_tx_get_hlid(wl, wlvif, sta, skb);
 
 	spin_lock_irqsave(&wl->wl_lock, flags);
 
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index c1d9320..58510fe 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -131,15 +131,15 @@ bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb)
 EXPORT_SYMBOL(wl12xx_is_dummy_packet);
 
 u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif,
-			 struct sk_buff *skb)
+			 struct ieee80211_sta *sta, struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *control = IEEE80211_SKB_CB(skb);
 
-	if (control->control.sta) {
+	if (sta) {
 		struct wl1271_station *wl_sta;
 
 		wl_sta = (struct wl1271_station *)
-				control->control.sta->drv_priv;
+				sta->drv_priv;
 		return wl_sta->hlid;
 	} else {
 		struct ieee80211_hdr *hdr;
@@ -164,7 +164,7 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		return wl->system_hlid;
 
 	if (wlvif->bss_type == BSS_TYPE_AP_BSS)
-		return wl12xx_tx_get_hlid_ap(wl, wlvif, skb);
+		return wl12xx_tx_get_hlid_ap(wl, wlvif, sta, skb);
 
 	if ((test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) ||
 	     test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags)) &&
@@ -256,7 +256,8 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	__le16 frame_control;
 	struct ieee80211_hdr *hdr;
 	u8 *frame_start;
-	bool is_dummy;
+	bool is_dummy;i
+	struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
 
 	desc = (struct wl1271_tx_hw_descr *) skb->data;
 	frame_start = (u8 *)(desc + 1);
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index c9e2660..4598801 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -937,7 +937,9 @@ static int fill_ctrlset(struct zd_mac *mac,
  * control block of the skbuff will be initialized. If necessary the incoming
  * mac80211 queues will be stopped.
  */
-static void zd_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void zd_op_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct zd_mac *mac = zd_hw_mac(hw);
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1176,7 +1178,7 @@ static void zd_beacon_done(struct zd_mac *mac)
 		skb = ieee80211_get_buffered_bc(mac->hw, mac->vif);
 		if (!skb)
 			break;
-		zd_op_tx(mac->hw, skb);
+		zd_op_tx(mac->hw, NULL, skb);
 	}
 
 	/*
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index c3751a7..c6566e5 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -119,7 +119,9 @@ static void wbsoft_configure_filter(struct ieee80211_hw *dev,
 	*total_flags = new_flags;
 }
 
-static void wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void wbsoft_tx(struct ieee80211_hw *dev,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct wbsoft_priv *priv = dev->priv;
 
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index bb86aa6..4309d8a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -522,9 +522,6 @@ struct ieee80211_tx_rate {
  *  (2) driver internal use (if applicable)
  *  (3) TX status information - driver tells mac80211 what happened
  *
- * The TX control's sta pointer is only valid during the ->tx call,
- * it may be NULL.
- *
  * @flags: transmit info flags, defined above
  * @band: the band to transmit on (use for checking for races)
  * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC
@@ -555,6 +552,7 @@ struct ieee80211_tx_info {
 					struct ieee80211_tx_rate rates[
 						IEEE80211_TX_MAX_RATES];
 					s8 rts_cts_rate_idx;
+					/* 3 bytes free */
 				};
 				/* only needed before rate control */
 				unsigned long jiffies;
@@ -562,7 +560,7 @@ struct ieee80211_tx_info {
 			/* NB: vif can be NULL for injected frames */
 			struct ieee80211_vif *vif;
 			struct ieee80211_key_conf *hw_key;
-			struct ieee80211_sta *sta;
+			/* 8 bytes free */
 		} control;
 		struct {
 			struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
@@ -1074,6 +1072,16 @@ enum sta_notify_cmd {
 };
 
 /**
+ * struct ieee80211_tx_control - TX control data
+ *
+ * @sta: station table entry, this sta pointer may be NULL and
+ * 	it is not allowed to copy the pointer, due to RCU.
+ */
+struct ieee80211_tx_control {
+	struct ieee80211_sta *sta;
+};
+
+/**
  * enum ieee80211_hw_flags - hardware flags
  *
  * These flags are used to indicate hardware capabilities to
@@ -2264,7 +2272,9 @@ enum ieee80211_rate_control_changed {
  *	The callback is optional and can (should!) sleep.
  */
 struct ieee80211_ops {
-	void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
+	void (*tx)(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 	int (*start)(struct ieee80211_hw *hw);
 	void (*stop)(struct ieee80211_hw *hw);
 #ifdef CONFIG_PM
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index df92031..a81117a 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -22,9 +22,11 @@ get_bss_sdata(struct ieee80211_sub_if_data *sdata)
 	return sdata;
 }
 
-static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
+static inline void drv_tx(struct ieee80211_local *local,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
-	local->ops->tx(&local->hw, skb);
+	local->ops->tx(&local->hw, control, skb);
 }
 
 static inline void drv_get_et_strings(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index bb61f77..936f31a 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -196,6 +196,8 @@ struct ieee80211_tx_data {
 	struct ieee80211_channel *channel;
 
 	unsigned int flags;
+
+	struct ieee80211_tx_control control;
 };
 
 
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index acf712f..7706f01 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1201,6 +1201,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
 static bool ieee80211_tx_frags(struct ieee80211_local *local,
 			       struct ieee80211_vif *vif,
 			       struct ieee80211_sta *sta,
+			       struct ieee80211_tx_control *control,
 			       struct sk_buff_head *skbs,
 			       bool txpending)
 {
@@ -1240,10 +1241,10 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
 		spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 
 		info->control.vif = vif;
-		info->control.sta = sta;
+		control->sta = sta;
 
 		__skb_unlink(skb, skbs);
-		drv_tx(local, skb);
+		drv_tx(local, control, skb);
 	}
 
 	return true;
@@ -1253,6 +1254,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
  * Returns false if the frame couldn't be transmitted but was queued instead.
  */
 static bool __ieee80211_tx(struct ieee80211_local *local,
+			   struct ieee80211_tx_control *control,
 			   struct sk_buff_head *skbs, int led_len,
 			   struct sta_info *sta, bool txpending)
 {
@@ -1301,7 +1303,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
 		break;
 	}
 
-	result = ieee80211_tx_frags(local, vif, pubsta, skbs,
+	result = ieee80211_tx_frags(local, vif, pubsta, control, skbs,
 				    txpending);
 
 	ieee80211_tpt_led_trig_tx(local, fc, led_len);
@@ -1409,7 +1411,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
 			sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
 
 	if (!invoke_tx_handlers(&tx))
-		result = __ieee80211_tx(local, &tx.skbs, led_len,
+		result = __ieee80211_tx(local, &tx.control, &tx.skbs, led_len,
 					tx.sta, txpending);
  out:
 	rcu_read_unlock();
@@ -2154,6 +2156,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
 	struct ieee80211_sub_if_data *sdata;
 	struct sta_info *sta;
 	struct ieee80211_hdr *hdr;
+	struct ieee80211_tx_control control;
 	bool result;
 
 	sdata = vif_to_sdata(info->control.vif);
@@ -2169,7 +2172,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
 		hdr = (struct ieee80211_hdr *)skb->data;
 		sta = sta_info_get(sdata, hdr->addr1);
 
-		result = __ieee80211_tx(local, &skbs, skb->len, sta, true);
+		result = __ieee80211_tx(local, &control, &skbs, skb->len, sta, true);
 	}
 
 	return result;
-- 
1.7.11.1



From zajec5 at gmail.com  Mon Jul 23 16:57:01 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Mon, 23 Jul 2012 22:57:01 +0200
Subject: [PATCH] b43: fix logic in GPIO init
Message-ID: <1343077021-14020-1-git-send-email-zajec5@gmail.com>

Add some comments by the way

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 drivers/net/wireless/b43/main.c |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index a56f182..f6f8ccd 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -2719,32 +2719,37 @@ static int b43_gpio_init(struct b43_wldev *dev)
 	if (dev->dev->chip_id == 0x4301) {
 		mask |= 0x0060;
 		set |= 0x0060;
+	} else if (dev->dev->chip_id == 0x5354) {
+		/* Don't allow overtaking buttons GPIOs */
+		set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */
 	}
-	if (dev->dev->chip_id == 0x5354)
-		set &= 0xff02;
+
 	if (0 /* FIXME: conditional unknown */ ) {
 		b43_write16(dev, B43_MMIO_GPIO_MASK,
 			    b43_read16(dev, B43_MMIO_GPIO_MASK)
 			    | 0x0100);
-		mask |= 0x0180;
-		set |= 0x0180;
+		/* BT Coexistance Input */
+		mask |= 0x0080;
+		set |= 0x0080;
+		/* BT Coexistance Out */
+		mask |= 0x0100;
+		set |= 0x0100;
 	}
 	if (dev->dev->bus_sprom->boardflags_lo & B43_BFL_PACTRL) {
+		/* PA is controlled by gpio 9, let ucode handle it */
 		b43_write16(dev, B43_MMIO_GPIO_MASK,
 			    b43_read16(dev, B43_MMIO_GPIO_MASK)
 			    | 0x0200);
 		mask |= 0x0200;
 		set |= 0x0200;
 	}
-	if (dev->dev->core_rev >= 2)
-		mask |= 0x0010;	/* FIXME: This is redundant. */
 
 	switch (dev->dev->bus_type) {
 #ifdef CONFIG_B43_BCMA
 	case B43_BUS_BCMA:
 		bcma_cc_write32(&dev->dev->bdev->bus->drv_cc, BCMA_CC_GPIOCTL,
 				(bcma_cc_read32(&dev->dev->bdev->bus->drv_cc,
-					BCMA_CC_GPIOCTL) & mask) | set);
+					BCMA_CC_GPIOCTL) & ~mask) | set);
 		break;
 #endif
 #ifdef CONFIG_B43_SSB
@@ -2753,7 +2758,7 @@ static int b43_gpio_init(struct b43_wldev *dev)
 		if (gpiodev)
 			ssb_write32(gpiodev, B43_GPIO_CONTROL,
 				    (ssb_read32(gpiodev, B43_GPIO_CONTROL)
-				    & mask) | set);
+				    & ~mask) | set);
 		break;
 #endif
 	}
-- 
1.7.7



From johannes at sipsolutions.net  Tue Jul 24 10:47:31 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Tue, 24 Jul 2012 16:47:31 +0200
Subject: [PATCH v4] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343072022-1383-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120723_213356_862232_300A4FC5)
References: <1343072022-1383-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120723_213356_862232_300A4FC5)
Message-ID: <1343141251.4415.39.camel@jlt3.sipsolutions.net>

On Mon, 2012-07-23 at 21:33 +0200, Thomas Huehn wrote:

> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -196,6 +196,8 @@ struct ieee80211_tx_data {
>  	struct ieee80211_channel *channel;
>  
>  	unsigned int flags;
> +
> +	struct ieee80211_tx_control control;

Why is this needed/useful?

>  		info->control.vif = vif;
> -		info->control.sta = sta;
> +		control->sta = sta;
>  
>  		__skb_unlink(skb, skbs);
> -		drv_tx(local, skb);
> +		drv_tx(local, control, skb);

You're assigning to it right before, and I don't see you using it any
time before, so why not just have the control struct on the stack of
this function?

That would save all this passing around:

> @@ -1253,6 +1254,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
>   * Returns false if the frame couldn't be transmitted but was queued instead.
>   */
>  static bool __ieee80211_tx(struct ieee80211_local *local,
> +			   struct ieee80211_tx_control *control,
>  			   struct sk_buff_head *skbs, int led_len,
>  			   struct sta_info *sta, bool txpending)
>  {
> @@ -1301,7 +1303,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
>  		break;
>  	}
>  
> -	result = ieee80211_tx_frags(local, vif, pubsta, skbs,
> +	result = ieee80211_tx_frags(local, vif, pubsta, control, skbs,
>  				    txpending);
>  
>  	ieee80211_tpt_led_trig_tx(local, fc, led_len);
> @@ -1409,7 +1411,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
>  			sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
>  
>  	if (!invoke_tx_handlers(&tx))
> -		result = __ieee80211_tx(local, &tx.skbs, led_len,
> +		result = __ieee80211_tx(local, &tx.control, &tx.skbs, led_len,
>  					tx.sta, txpending);
>   out:
>  	rcu_read_unlock();
> @@ -2154,6 +2156,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
>  	struct ieee80211_sub_if_data *sdata;
>  	struct sta_info *sta;
>  	struct ieee80211_hdr *hdr;
> +	struct ieee80211_tx_control control;
>  	bool result;
>  
>  	sdata = vif_to_sdata(info->control.vif);
> @@ -2169,7 +2172,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
>  		hdr = (struct ieee80211_hdr *)skb->data;
>  		sta = sta_info_get(sdata, hdr->addr1);
>  
> -		result = __ieee80211_tx(local, &skbs, skb->len, sta, true);
> +		result = __ieee80211_tx(local, &control, &skbs, skb->len, sta, true);
>  	}
>  
>  	return result;


johannes



From zajec5 at gmail.com  Tue Jul 24 13:18:20 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Tue, 24 Jul 2012 19:18:20 +0200
Subject: [PATCH 2/2] b43: N-PHY: add PHY rev7+ workarounds
In-Reply-To: <1343150300-4002-1-git-send-email-zajec5@gmail.com>
References: <1343150300-4002-1-git-send-email-zajec5@gmail.com>
Message-ID: <1343150300-4002-2-git-send-email-zajec5@gmail.com>


Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 drivers/net/wireless/b43/phy_n.c |  328 +++++++++++++++++++++++++++++++++++++-
 1 files changed, 326 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 40bb63d..e49d847 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -1860,12 +1860,334 @@ static void b43_nphy_gain_ctl_workarounds_rev1_2(struct b43_wldev *dev)
 /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/WorkaroundsGainCtrl */
 static void b43_nphy_gain_ctl_workarounds(struct b43_wldev *dev)
 {
-	if (dev->phy.rev >= 3)
+	if (dev->phy.rev >= 7)
+		; /* TODO */
+	else if (dev->phy.rev >= 3)
 		b43_nphy_gain_ctl_workarounds_rev3plus(dev);
 	else
 		b43_nphy_gain_ctl_workarounds_rev1_2(dev);
 }
 
+/* http://bcm-v4.sipsolutions.net/PHY/N/Read_Lpf_Bw_Ctl */
+static u16 b43_nphy_read_lpf_ctl(struct b43_wldev *dev, u16 offset)
+{
+	if (!offset)
+		offset = (dev->phy.is_40mhz) ? 0x159 : 0x154;
+	return b43_ntab_read(dev, B43_NTAB16(7, offset)) & 0x7;
+}
+
+static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev)
+{
+	struct ssb_sprom *sprom = dev->dev->bus_sprom;
+	struct b43_phy *phy = &dev->phy;
+
+	u8 rx2tx_events_ipa[9] = { 0x0, 0x1, 0x2, 0x8, 0x5, 0x6, 0xF, 0x3,
+					0x1F };
+	u8 rx2tx_delays_ipa[9] = { 8, 6, 6, 4, 4, 16, 43, 1, 1 };
+
+	u16 ntab7_15e_16e[] = { 0x10f, 0x10f };
+	u8 ntab7_138_146[] = { 0x11, 0x11 };
+	u8 ntab7_133[] = { 0x77, 0x11, 0x11 };
+
+	u16 lpf_20, lpf_40, lpf_11b;
+	u16 bcap_val, bcap_val_11b, bcap_val_11n_20, bcap_val_11n_40;
+	u16 scap_val, scap_val_11b, scap_val_11n_20, scap_val_11n_40;
+	bool rccal_ovrd = false;
+
+	u16 rx2tx_lut_20_11b, rx2tx_lut_20_11n, rx2tx_lut_40_11n;
+	u16 bias, conv, filt;
+
+	u32 tmp32;
+	u8 core;
+
+	if (phy->rev == 7) {
+		b43_phy_set(dev, B43_NPHY_FINERX2_CGC, 0x10);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN0, 0xFF80, 0x0020);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN0, 0x80FF, 0x2700);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN1, 0xFF80, 0x002E);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN1, 0x80FF, 0x3300);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN2, 0xFF80, 0x0037);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN2, 0x80FF, 0x3A00);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN3, 0xFF80, 0x003C);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN3, 0x80FF, 0x3E00);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN4, 0xFF80, 0x003E);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN4, 0x80FF, 0x3F00);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN5, 0xFF80, 0x0040);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN5, 0x80FF, 0x4000);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN6, 0xFF80, 0x0040);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN6, 0x80FF, 0x4000);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN7, 0xFF80, 0x0040);
+		b43_phy_maskset(dev, B43_NPHY_FREQGAIN7, 0x80FF, 0x4000);
+	}
+	if (phy->rev <= 8) {
+		b43_phy_write(dev, 0x23F, 0x1B0);
+		b43_phy_write(dev, 0x240, 0x1B0);
+	}
+	if (phy->rev >= 8)
+		b43_phy_maskset(dev, B43_NPHY_TXTAILCNT, ~0xFF, 0x72);
+
+	b43_ntab_write(dev, B43_NTAB16(8, 0x00), 2);
+	b43_ntab_write(dev, B43_NTAB16(8, 0x10), 2);
+	tmp32 = b43_ntab_read(dev, B43_NTAB32(30, 0));
+	tmp32 &= 0xffffff;
+	b43_ntab_write(dev, B43_NTAB32(30, 0), tmp32);
+	b43_ntab_write_bulk(dev, B43_NTAB16(7, 0x15e), 2, ntab7_15e_16e);
+	b43_ntab_write_bulk(dev, B43_NTAB16(7, 0x16e), 2, ntab7_15e_16e);
+
+	if (b43_nphy_ipa(dev))
+		b43_nphy_set_rf_sequence(dev, 0, rx2tx_events_ipa,
+				rx2tx_delays_ipa, ARRAY_SIZE(rx2tx_events_ipa));
+
+	b43_phy_maskset(dev, 0x299, 0x3FFF, 0x4000);
+	b43_phy_maskset(dev, 0x29D, 0x3FFF, 0x4000);
+
+	lpf_20 = b43_nphy_read_lpf_ctl(dev, 0x154);
+	lpf_40 = b43_nphy_read_lpf_ctl(dev, 0x159);
+	lpf_11b = b43_nphy_read_lpf_ctl(dev, 0x152);
+	if (b43_nphy_ipa(dev)) {
+		if ((phy->radio_rev == 5 && phy->is_40mhz) ||
+		    phy->radio_rev == 7 || phy->radio_rev == 8) {
+			bcap_val = b43_radio_read(dev, 0x16b);
+			scap_val = b43_radio_read(dev, 0x16a);
+			scap_val_11b = scap_val;
+			bcap_val_11b = bcap_val;
+			if (phy->radio_rev == 5 && phy->is_40mhz) {
+				scap_val_11n_20 = scap_val;
+				bcap_val_11n_20 = bcap_val;
+				scap_val_11n_40 = bcap_val_11n_40 = 0xc;
+				rccal_ovrd = true;
+			} else { /* Rev 7/8 */
+				lpf_20 = 4;
+				lpf_11b = 1;
+				if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
+					scap_val_11n_20 = 0xc;
+					bcap_val_11n_20 = 0xc;
+					scap_val_11n_40 = 0xa;
+					bcap_val_11n_40 = 0xa;
+				} else {
+					scap_val_11n_20 = 0x14;
+					bcap_val_11n_20 = 0x14;
+					scap_val_11n_40 = 0xf;
+					bcap_val_11n_40 = 0xf;
+				}
+				rccal_ovrd = true;
+			}
+		}
+	} else {
+		if (phy->radio_rev == 5) {
+			lpf_20 = 1;
+			lpf_40 = 3;
+			bcap_val = b43_radio_read(dev, 0x16b);
+			scap_val = b43_radio_read(dev, 0x16a);
+			scap_val_11b = scap_val;
+			bcap_val_11b = bcap_val;
+			scap_val_11n_20 = 0x11;
+			scap_val_11n_40 = 0x11;
+			bcap_val_11n_20 = 0x13;
+			bcap_val_11n_40 = 0x13;
+			rccal_ovrd = true;
+		}
+	}
+	if (rccal_ovrd) {
+		rx2tx_lut_20_11b = (bcap_val_11b << 8) |
+				   (scap_val_11b << 3) |
+				   lpf_11b;
+		rx2tx_lut_20_11n = (bcap_val_11n_20 << 8) |
+				   (scap_val_11n_20 << 3) |
+				   lpf_20;
+		rx2tx_lut_40_11n = (bcap_val_11n_40 << 8) |
+				   (scap_val_11n_40 << 3) |
+				   lpf_40;
+		for (core = 0; core < 2; core++) {
+			b43_ntab_write(dev, B43_NTAB16(7, 0x152 + core * 16),
+				       rx2tx_lut_20_11b);
+			b43_ntab_write(dev, B43_NTAB16(7, 0x153 + core * 16),
+				       rx2tx_lut_20_11n);
+			b43_ntab_write(dev, B43_NTAB16(7, 0x154 + core * 16),
+				       rx2tx_lut_20_11n);
+			b43_ntab_write(dev, B43_NTAB16(7, 0x155 + core * 16),
+				       rx2tx_lut_40_11n);
+			b43_ntab_write(dev, B43_NTAB16(7, 0x156 + core * 16),
+				       rx2tx_lut_40_11n);
+			b43_ntab_write(dev, B43_NTAB16(7, 0x157 + core * 16),
+				       rx2tx_lut_40_11n);
+			b43_ntab_write(dev, B43_NTAB16(7, 0x158 + core * 16),
+				       rx2tx_lut_40_11n);
+			b43_ntab_write(dev, B43_NTAB16(7, 0x159 + core * 16),
+				       rx2tx_lut_40_11n);
+		}
+		/* b43_nphy_rf_control_override_rev7(dev, 16, 1, 3, 0, 2); */
+	}
+	b43_phy_write(dev, 0x32F, 0x3);
+	if (phy->radio_rev == 4 || phy->radio_rev == 6)
+		; /* b43_nphy_rf_control_override_rev7(dev, 4, 1, 3, 0, 0); */
+
+	if (phy->radio_rev == 3 || phy->radio_rev == 4 || phy->radio_rev == 6) {
+		if (sprom->revision &&
+		    sprom->boardflags2_hi & B43_BFH2_IPALVLSHIFT_3P3) {
+			b43_radio_write(dev, 0x5, 0x05);
+			b43_radio_write(dev, 0x6, 0x30);
+			b43_radio_write(dev, 0x7, 0x00);
+			b43_radio_set(dev, 0x4f, 0x1);
+			b43_radio_set(dev, 0xd4, 0x1);
+			bias = 0x1f;
+			conv = 0x6f;
+			filt = 0xaa;
+		} else {
+			bias = 0x2b;
+			conv = 0x7f;
+			filt = 0xee;
+		}
+		if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
+			for (core = 0; core < 2; core++) {
+				if (core == 0) {
+					b43_radio_write(dev, 0x5F, bias);
+					b43_radio_write(dev, 0x64, conv);
+					b43_radio_write(dev, 0x66, filt);
+				} else {
+					b43_radio_write(dev, 0xE8, bias);
+					b43_radio_write(dev, 0xE9, conv);
+					b43_radio_write(dev, 0xEB, filt);
+				}
+			}
+		}
+	}
+
+	if (b43_nphy_ipa(dev)) {
+		if (b43_current_band(dev->wl) == IEEE80211_BAND_2GHZ) {
+			if (phy->radio_rev == 3 || phy->radio_rev == 4 ||
+			    phy->radio_rev == 6) {
+				for (core = 0; core < 2; core++) {
+					if (core == 0)
+						b43_radio_write(dev, 0x51,
+								0x7f);
+					else
+						b43_radio_write(dev, 0xd6,
+								0x7f);
+				}
+			}
+			if (phy->radio_rev == 3) {
+				for (core = 0; core < 2; core++) {
+					if (core == 0) {
+						b43_radio_write(dev, 0x64,
+								0x13);
+						b43_radio_write(dev, 0x5F,
+								0x1F);
+						b43_radio_write(dev, 0x66,
+								0xEE);
+						b43_radio_write(dev, 0x59,
+								0x8A);
+						b43_radio_write(dev, 0x80,
+								0x3E);
+					} else {
+						b43_radio_write(dev, 0x69,
+								0x13);
+						b43_radio_write(dev, 0xE8,
+								0x1F);
+						b43_radio_write(dev, 0xEB,
+								0xEE);
+						b43_radio_write(dev, 0xDE,
+								0x8A);
+						b43_radio_write(dev, 0x105,
+								0x3E);
+					}
+				}
+			} else if (phy->radio_rev == 7 || phy->radio_rev == 8) {
+				if (!phy->is_40mhz) {
+					b43_radio_write(dev, 0x5F, 0x14);
+					b43_radio_write(dev, 0xE8, 0x12);
+				} else {
+					b43_radio_write(dev, 0x5F, 0x16);
+					b43_radio_write(dev, 0xE8, 0x16);
+				}
+			}
+		} else {
+			u16 freq = phy->channel_freq;
+			if ((freq >= 5180 && freq <= 5230) ||
+			    (freq >= 5745 && freq <= 5805)) {
+				b43_radio_write(dev, 0x7D, 0xFF);
+				b43_radio_write(dev, 0xFE, 0xFF);
+			}
+		}
+	} else {
+		if (phy->radio_rev != 5) {
+			for (core = 0; core < 2; core++) {
+				if (core == 0) {
+					b43_radio_write(dev, 0x5c, 0x61);
+					b43_radio_write(dev, 0x51, 0x70);
+				} else {
+					b43_radio_write(dev, 0xe1, 0x61);
+					b43_radio_write(dev, 0xd6, 0x70);
+				}
+			}
+		}
+	}
+
+	if (phy->radio_rev == 4) {
+		b43_ntab_write(dev, B43_NTAB16(8, 0x05), 0x20);
+		b43_ntab_write(dev, B43_NTAB16(8, 0x15), 0x20);
+		for (core = 0; core < 2; core++) {
+			if (core == 0) {
+				b43_radio_write(dev, 0x1a1, 0x00);
+				b43_radio_write(dev, 0x1a2, 0x3f);
+				b43_radio_write(dev, 0x1a6, 0x3f);
+			} else {
+				b43_radio_write(dev, 0x1a7, 0x00);
+				b43_radio_write(dev, 0x1ab, 0x3f);
+				b43_radio_write(dev, 0x1ac, 0x3f);
+			}
+		}
+	} else {
+		b43_phy_set(dev, B43_NPHY_AFECTL_C1, 0x4);
+		b43_phy_set(dev, B43_NPHY_AFECTL_OVER1, 0x4);
+		b43_phy_set(dev, B43_NPHY_AFECTL_C2, 0x4);
+		b43_phy_set(dev, B43_NPHY_AFECTL_OVER, 0x4);
+
+		b43_phy_mask(dev, B43_NPHY_AFECTL_C1, ~0x1);
+		b43_phy_set(dev, B43_NPHY_AFECTL_OVER1, 0x1);
+		b43_phy_mask(dev, B43_NPHY_AFECTL_C2, ~0x1);
+		b43_phy_set(dev, B43_NPHY_AFECTL_OVER, 0x1);
+		b43_ntab_write(dev, B43_NTAB16(8, 0x05), 0x20);
+		b43_ntab_write(dev, B43_NTAB16(8, 0x15), 0x20);
+
+		b43_phy_mask(dev, B43_NPHY_AFECTL_C1, ~0x4);
+		b43_phy_mask(dev, B43_NPHY_AFECTL_OVER1, ~0x4);
+		b43_phy_mask(dev, B43_NPHY_AFECTL_C2, ~0x4);
+		b43_phy_mask(dev, B43_NPHY_AFECTL_OVER, ~0x4);
+	}
+
+	b43_phy_write(dev, B43_NPHY_ENDROP_TLEN, 0x2);
+
+	b43_ntab_write(dev, B43_NTAB32(16, 0x100), 20);
+	b43_ntab_write_bulk(dev, B43_NTAB16(7, 0x138), 2, ntab7_138_146);
+	b43_ntab_write(dev, B43_NTAB16(7, 0x141), 0x77);
+	b43_ntab_write_bulk(dev, B43_NTAB16(7, 0x133), 3, ntab7_133);
+	b43_ntab_write_bulk(dev, B43_NTAB16(7, 0x146), 2, ntab7_138_146);
+	b43_ntab_write(dev, B43_NTAB16(7, 0x123), 0x77);
+	b43_ntab_write(dev, B43_NTAB16(7, 0x12A), 0x77);
+
+	if (!phy->is_40mhz) {
+		b43_ntab_write(dev, B43_NTAB32(16, 0x03), 0x18D);
+		b43_ntab_write(dev, B43_NTAB32(16, 0x7F), 0x18D);
+	} else {
+		b43_ntab_write(dev, B43_NTAB32(16, 0x03), 0x14D);
+		b43_ntab_write(dev, B43_NTAB32(16, 0x7F), 0x14D);
+	}
+
+	b43_nphy_gain_ctl_workarounds(dev);
+
+	/* TODO
+	b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x08), 4,
+			    aux_adc_vmid_rev7_core0);
+	b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x18), 4,
+			    aux_adc_vmid_rev7_core1);
+	b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x0C), 4,
+			    aux_adc_gain_rev7);
+	b43_ntab_write_bulk(dev, B43_NTAB16(8, 0x1C), 4,
+			    aux_adc_gain_rev7);
+	*/
+}
+
 static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev)
 {
 	struct b43_phy_n *nphy = dev->phy.n;
@@ -2097,7 +2419,9 @@ static void b43_nphy_workarounds(struct b43_wldev *dev)
 	b43_phy_set(dev, B43_NPHY_IQFLIP,
 		    B43_NPHY_IQFLIP_ADC1 | B43_NPHY_IQFLIP_ADC2);
 
-	if (dev->phy.rev >= 3)
+	if (dev->phy.rev >= 7)
+		b43_nphy_workarounds_rev7plus(dev);
+	else if (dev->phy.rev >= 3)
 		b43_nphy_workarounds_rev3plus(dev);
 	else
 		b43_nphy_workarounds_rev1_2(dev);
-- 
1.7.7



From zajec5 at gmail.com  Tue Jul 24 13:18:19 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Tue, 24 Jul 2012 19:18:19 +0200
Subject: [PATCH 1/2] b43: N-PHY: update workarounds
Message-ID: <1343150300-4002-1-git-send-email-zajec5@gmail.com>


Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 drivers/net/wireless/b43/phy_n.c |   46 ++++++++++++++++++++++++-------------
 1 files changed, 30 insertions(+), 16 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index b92bb9c..40bb63d 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -1916,7 +1916,7 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev)
 			rx2tx_delays[6] = 1;
 			rx2tx_events[7] = 0x1F;
 		}
-		b43_nphy_set_rf_sequence(dev, 1, rx2tx_events, rx2tx_delays,
+		b43_nphy_set_rf_sequence(dev, 0, rx2tx_events, rx2tx_delays,
 					 ARRAY_SIZE(rx2tx_events));
 	}
 
@@ -1926,8 +1926,13 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev)
 
 	b43_phy_maskset(dev, 0x294, 0xF0FF, 0x0700);
 
-	b43_ntab_write(dev, B43_NTAB32(16, 3), 0x18D);
-	b43_ntab_write(dev, B43_NTAB32(16, 127), 0x18D);
+	if (!dev->phy.is_40mhz) {
+		b43_ntab_write(dev, B43_NTAB32(16, 3), 0x18D);
+		b43_ntab_write(dev, B43_NTAB32(16, 127), 0x18D);
+	} else {
+		b43_ntab_write(dev, B43_NTAB32(16, 3), 0x14D);
+		b43_ntab_write(dev, B43_NTAB32(16, 127), 0x14D);
+	}
 
 	b43_nphy_gain_ctl_workarounds(dev);
 
@@ -1963,13 +1968,14 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev)
 	b43_ntab_write(dev, B43_NTAB32(30, 3), tmp32);
 
 	if (dev->phy.rev == 4 &&
-		b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
+	    b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ) {
 		b43_radio_write(dev, B2056_TX0 | B2056_TX_GMBB_IDAC,
 				0x70);
 		b43_radio_write(dev, B2056_TX1 | B2056_TX_GMBB_IDAC,
 				0x70);
 	}
 
+	/* Dropped probably-always-true condition */
 	b43_phy_write(dev, 0x224, 0x03eb);
 	b43_phy_write(dev, 0x225, 0x03eb);
 	b43_phy_write(dev, 0x226, 0x0341);
@@ -1982,6 +1988,9 @@ static void b43_nphy_workarounds_rev3plus(struct b43_wldev *dev)
 	b43_phy_write(dev, 0x22d, 0x042b);
 	b43_phy_write(dev, 0x22e, 0x0381);
 	b43_phy_write(dev, 0x22f, 0x0381);
+
+	if (dev->phy.rev >= 6 && sprom->boardflags2_lo & B43_BFL2_SINGLEANT_CCK)
+		; /* TODO: 0x0080000000000000 HF */
 }
 
 static void b43_nphy_workarounds_rev1_2(struct b43_wldev *dev)
@@ -1996,6 +2005,12 @@ static void b43_nphy_workarounds_rev1_2(struct b43_wldev *dev)
 	u8 events2[7] = { 0x0, 0x3, 0x5, 0x4, 0x2, 0x1, 0x8 };
 	u8 delays2[7] = { 0x8, 0x6, 0x2, 0x4, 0x4, 0x6, 0x1 };
 
+	if (sprom->boardflags2_lo & B43_BFL2_SKWRKFEM_BRD ||
+	    dev->dev->board_type == 0x8B) {
+		delays1[0] = 0x1;
+		delays1[5] = 0x14;
+	}
+
 	if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ &&
 	    nphy->band5g_pwrgain) {
 		b43_radio_mask(dev, B2055_C1_TX_RF_SPARE, ~0x8);
@@ -2007,8 +2022,10 @@ static void b43_nphy_workarounds_rev1_2(struct b43_wldev *dev)
 
 	b43_ntab_write(dev, B43_NTAB16(8, 0x00), 0x000A);
 	b43_ntab_write(dev, B43_NTAB16(8, 0x10), 0x000A);
-	b43_ntab_write(dev, B43_NTAB16(8, 0x02), 0xCDAA);
-	b43_ntab_write(dev, B43_NTAB16(8, 0x12), 0xCDAA);
+	if (dev->phy.rev < 3) {
+		b43_ntab_write(dev, B43_NTAB16(8, 0x02), 0xCDAA);
+		b43_ntab_write(dev, B43_NTAB16(8, 0x12), 0xCDAA);
+	}
 
 	if (dev->phy.rev < 2) {
 		b43_ntab_write(dev, B43_NTAB16(8, 0x08), 0x0000);
@@ -2024,11 +2041,6 @@ static void b43_nphy_workarounds_rev1_2(struct b43_wldev *dev)
 	b43_phy_write(dev, B43_NPHY_RFCTL_LUT_TRSW_LO2, 0x2D8);
 	b43_phy_write(dev, B43_NPHY_RFCTL_LUT_TRSW_UP2, 0x301);
 
-	if (sprom->boardflags2_lo & B43_BFL2_SKWRKFEM_BRD &&
-	    dev->dev->board_type == 0x8B) {
-		delays1[0] = 0x1;
-		delays1[5] = 0x14;
-	}
 	b43_nphy_set_rf_sequence(dev, 0, events1, delays1, 7);
 	b43_nphy_set_rf_sequence(dev, 1, events2, delays2, 7);
 
@@ -2055,11 +2067,13 @@ static void b43_nphy_workarounds_rev1_2(struct b43_wldev *dev)
 	b43_phy_write(dev, B43_NPHY_PHASETR_B1, 0xCD);
 	b43_phy_write(dev, B43_NPHY_PHASETR_B2, 0x20);
 
-	b43_phy_mask(dev, B43_NPHY_PIL_DW1,
-			~B43_NPHY_PIL_DW_64QAM & 0xFFFF);
-	b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B1, 0xB5);
-	b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B2, 0xA4);
-	b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B3, 0x00);
+	if (dev->phy.rev < 3) {
+		b43_phy_mask(dev, B43_NPHY_PIL_DW1,
+			     ~B43_NPHY_PIL_DW_64QAM & 0xFFFF);
+		b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B1, 0xB5);
+		b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B2, 0xA4);
+		b43_phy_write(dev, B43_NPHY_TXF_20CO_S2B3, 0x00);
+	}
 
 	if (dev->phy.rev == 2)
 		b43_phy_set(dev, B43_NPHY_FINERX2_CGC,
-- 
1.7.7



From thomas at net.t-labs.tu-berlin.de  Tue Jul 24 16:07:36 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Tue, 24 Jul 2012 22:07:36 +0200
Subject: [ath5k-devel] [PATCH v4] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343141251.4415.39.camel@jlt3.sipsolutions.net>
References: <1343072022-1383-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120723_213356_862232_300A4FC5)
 <1343141251.4415.39.camel@jlt3.sipsolutions.net>
Message-ID: <500F0088.6070408@net.t-labs.tu-berlin.de>

Hi Johannes,

Johannes Berg schrieb:

> On Mon, 2012-07-23 at 21:33 +0200, Thomas Huehn wrote:
> 
>> --- a/net/mac80211/ieee80211_i.h
>> +++ b/net/mac80211/ieee80211_i.h
>> @@ -196,6 +196,8 @@ struct ieee80211_tx_data {
>>  	struct ieee80211_channel *channel;
>>  
>>  	unsigned int flags;
>> +
>> +	struct ieee80211_tx_control control;
> 
> Why is this needed/useful?


I used it just in tx.c to pass the control pointer as function
parameter, but as I like your suggestion below it is gone in v5.

> 
>>  		info->control.vif = vif;
>> -		info->control.sta = sta;
>> +		control->sta = sta;
>>  
>>  		__skb_unlink(skb, skbs);
>> -		drv_tx(local, skb);
>> +		drv_tx(local, control, skb);
> 
> You're assigning to it right before, and I don't see you using it any
> time before, so why not just have the control struct on the stack of
> this function?


Good idea, v5 is coming.

Greetings Thomas



From thomas at net.t-labs.tu-berlin.de  Tue Jul 24 16:18:28 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Tue, 24 Jul 2012 22:18:28 +0200
Subject: [PATCH v5] mac80211: Remove control.sta from struct ieee80211_tx_info
 and restructure tx-path
Message-ID: <1343161108-6941-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

The pointer control.sta is removed from ieee80211_tx_info to free up
sufficient memory in SKB_CB on the tx-path to enable new annotations
per data packet e.g.support of upcoming Transmit Power Control (TPC).
Now the control.sta pointer is put on the stack where passed as
function parameter to the .tx equivalent (ieee80211_ops) of each
affected wireless driver.
Therefore a new structure ieee80211_tx_control is added to mac80211.h
which holds the sta structure instead. The tx-path of all affected
drivers is restructured to respect the chaneges.

Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
Signed-off-by: Alina Friedrichsen <x-alina at gmx.net>
Signed-off-by: Felix Fietkau <nbd at openwrt.org>
---
restructure this patch to respect logical API evolutions. thx to Johannes Berg
add missing drivers that are effected as well. thx to Xose Vazquez Perez
add missing drivers that are effected as well. thx to Johannes Berg
simplified control pointer passing in tx.c - thx to Johannes Berg
---
 drivers/net/wireless/adm8211.c                     |  4 +++-
 drivers/net/wireless/at76c50x-usb.c                |  4 +++-
 drivers/net/wireless/ath/ath5k/mac80211-ops.c      |  3 ++-
 drivers/net/wireless/ath/ath9k/ath9k.h             |  1 +
 drivers/net/wireless/ath/ath9k/htc.h               |  1 +
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c    |  2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |  6 +++--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |  2 +-
 drivers/net/wireless/ath/ath9k/main.c              |  5 ++++-
 drivers/net/wireless/ath/ath9k/xmit.c              |  9 ++++----
 drivers/net/wireless/ath/carl9170/carl9170.h       |  4 +++-
 drivers/net/wireless/ath/carl9170/tx.c             | 16 ++++++-------
 drivers/net/wireless/b43/main.c                    |  3 ++-
 drivers/net/wireless/b43legacy/main.c              |  1 +
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
 drivers/net/wireless/iwlegacy/3945-mac.c           | 12 ++++++----
 drivers/net/wireless/iwlegacy/4965-mac.c           | 26 +++++++++++++---------
 drivers/net/wireless/iwlegacy/4965.h               |  8 +++++--
 drivers/net/wireless/iwlwifi/dvm/agn.h             |  4 +++-
 drivers/net/wireless/iwlwifi/dvm/mac80211.c        |  6 +++--
 drivers/net/wireless/iwlwifi/dvm/tx.c              | 16 +++++++------
 drivers/net/wireless/libertas_tf/main.c            |  4 +++-
 drivers/net/wireless/mac80211_hwsim.c              |  8 ++++---
 drivers/net/wireless/mwl8k.c                       | 17 ++++++++------
 drivers/net/wireless/p54/lmac.h                    |  4 +++-
 drivers/net/wireless/p54/main.c                    |  2 +-
 drivers/net/wireless/p54/txrx.c                    | 15 ++++++++-----
 drivers/net/wireless/rt2x00/rt2x00.h               |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00dev.c            |  2 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c            |  4 +++-
 drivers/net/wireless/rt2x00/rt2x00queue.c          | 20 +++++++++--------
 drivers/net/wireless/rtl818x/rtl8180/dev.c         |  6 +++--
 drivers/net/wireless/rtl818x/rtl8187/dev.c         |  6 +++--
 drivers/net/wireless/rtlwifi/base.c                |  3 +--
 drivers/net/wireless/rtlwifi/core.c                |  8 ++++---
 drivers/net/wireless/rtlwifi/pci.c                 | 16 ++++++-------
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.h       |  4 +++-
 drivers/net/wireless/rtlwifi/rtl8192de/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192de/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/rtl8192se/trx.c       |  5 +++--
 drivers/net/wireless/rtlwifi/rtl8192se/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/usb.c                 | 15 ++++++++-----
 drivers/net/wireless/rtlwifi/wifi.h                | 13 +++++++----
 drivers/net/wireless/ti/wl1251/main.c              |  4 +++-
 drivers/net/wireless/ti/wlcore/main.c              |  6 +++--
 drivers/net/wireless/ti/wlcore/tx.c                | 11 ++++-----
 drivers/net/wireless/zd1211rw/zd_mac.c             |  6 +++--
 drivers/staging/winbond/wbusb.c                    |  4 +++-
 include/net/mac80211.h                             | 20 ++++++++++++-----
 net/mac80211/driver-ops.h                          |  6 +++--
 net/mac80211/tx.c                                  | 12 +++++-----
 54 files changed, 241 insertions(+), 141 deletions(-)

diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 0ac09a2..b661ce2 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1661,7 +1661,9 @@ static void adm8211_tx_raw(struct ieee80211_hw *dev, struct sk_buff *skb,
 }
 
 /* Put adm8211_tx_hdr on skb and transmit */
-static void adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void adm8211_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct adm8211_tx_hdr *txhdr;
 	size_t payload_len, hdrlen;
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index efc162e..abb520d 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1726,7 +1726,9 @@ static void at76_mac80211_tx_callback(struct urb *urb)
 	ieee80211_wake_queues(priv->hw);
 }
 
-static void at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void at76_mac80211_tx(struct ieee80211_hw *hw,
+			     struct ieee80211_tx_control *control,
+			     struct sk_buff *skb)
 {
 	struct at76_priv *priv = hw->priv;
 	struct at76_tx_buffer *tx_buffer = priv->bulk_out_buffer;
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 260e7dc..934f04c 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -55,7 +55,8 @@
 \********************/
 
 static void
-ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+ath5k_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
+	 struct sk_buff *skb)
 {
 	struct ath5k_hw *ah = hw->priv;
 	u16 qnum = skb_get_queue_mapping(skb);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index b09285c..7373e4b 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -280,6 +280,7 @@ struct ath_tx_control {
 	struct ath_txq *txq;
 	struct ath_node *an;
 	u8 paprd;
+	struct ieee80211_sta *sta;
 };
 
 #define ATH_TX_ERROR        0x01
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 936e920..b30596f 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -542,6 +542,7 @@ void ath9k_htc_stop_ani(struct ath9k_htc_priv *priv);
 
 int ath9k_tx_init(struct ath9k_htc_priv *priv);
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb, u8 slot, bool is_cab);
 void ath9k_tx_cleanup(struct ath9k_htc_priv *priv);
 bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index 77d541f..f42d2eb 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -326,7 +326,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv,
 			goto next;
 		}
 
-		ret = ath9k_htc_tx_start(priv, skb, tx_slot, true);
+		ret = ath9k_htc_tx_start(priv, NULL, skb, tx_slot, true);
 		if (ret != 0) {
 			ath9k_htc_tx_clear_slot(priv, tx_slot);
 			dev_kfree_skb_any(skb);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index c785129..8a0ccf7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -856,7 +856,9 @@ set_timer:
 /* mac80211 Callbacks */
 /**********************/
 
-static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_htc_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct ath9k_htc_priv *priv = hw->priv;
@@ -883,7 +885,7 @@ static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto fail_tx;
 	}
 
-	ret = ath9k_htc_tx_start(priv, skb, slot, false);
+	ret = ath9k_htc_tx_start(priv, control->sta, skb, slot, false);
 	if (ret != 0) {
 		ath_dbg(common, XMIT, "Tx failed\n");
 		goto clear_slot;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 47e61d0..06cdcb7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -333,12 +333,12 @@ static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,
 }
 
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb,
 		       u8 slot, bool is_cab)
 {
 	struct ieee80211_hdr *hdr;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_vif *vif = tx_info->control.vif;
 	struct ath9k_htc_sta *ista;
 	struct ath9k_htc_vif *avp = NULL;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 6049d8b..4d8dc9f 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -694,7 +694,9 @@ mutex_unlock:
 	return r;
 }
 
-static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct ath_softc *sc = hw->priv;
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
@@ -754,6 +756,7 @@ static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	memset(&txctl, 0, sizeof(struct ath_tx_control));
 	txctl.txq = sc->tx.txq_map[skb_get_queue_mapping(skb)];
+	txctl.sta = control->sta;
 
 	ath_dbg(common, XMIT, "transmitting packet, skb: %p\n", skb);
 
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 2c9da6b..ef91f6c 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1773,11 +1773,12 @@ static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
 	TX_STAT_INC(txq->axq_qnum, queued);
 }
 
-static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb,
+static void setup_frame_info(struct ieee80211_hw *hw,
+			     struct ieee80211_sta *sta,
+			     struct sk_buff *skb,
 			     int framelen)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	const struct ieee80211_rate *rate;
@@ -1935,7 +1936,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
+	struct ieee80211_sta *sta = txctl->sta;
 	struct ieee80211_vif *vif = info->control.vif;
 	struct ath_softc *sc = hw->priv;
 	struct ath_txq *txq = txctl->txq;
@@ -1979,7 +1980,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	    !ieee80211_is_data(hdr->frame_control))
 		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
 
-	setup_frame_info(hw, skb, frmlen);
+	setup_frame_info(hw, sta, skb, frmlen);
 
 	/*
 	 * At this point, the vif, hw_key and sta pointers in the tx control
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index 376be11..8f0cbc3 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -577,7 +577,9 @@ void carl9170_rx(struct ar9170 *ar, void *buf, unsigned int len);
 void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len);
 
 /* TX */
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb);
 void carl9170_tx_janitor(struct work_struct *work);
 void carl9170_tx_process_status(struct ar9170 *ar,
 				const struct carl9170_rsp *cmd);
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 6a86814..84377cf 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -867,14 +867,15 @@ static bool carl9170_tx_cts_check(struct ar9170 *ar,
 	return false;
 }
 
-static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
+static int carl9170_tx_prepare(struct ar9170 *ar,
+			       struct ieee80211_sta *sta,
+			       struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct _carl9170_tx_superframe *txc;
 	struct carl9170_vif_info *cvif;
 	struct ieee80211_tx_info *info;
 	struct ieee80211_tx_rate *txrate;
-	struct ieee80211_sta *sta;
 	struct carl9170_tx_info *arinfo;
 	unsigned int hw_queue;
 	int i;
@@ -910,8 +911,6 @@ static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
 	else
 		cvif = NULL;
 
-	sta = info->control.sta;
-
 	txc = (void *)skb_push(skb, sizeof(*txc));
 	memset(txc, 0, sizeof(*txc));
 
@@ -1457,20 +1456,21 @@ err_unlock_rcu:
 	return false;
 }
 
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb)
 {
 	struct ar9170 *ar = hw->priv;
 	struct ieee80211_tx_info *info;
-	struct ieee80211_sta *sta;
+	struct ieee80211_sta *sta = control->sta;
 	bool run;
 
 	if (unlikely(!IS_STARTED(ar)))
 		goto err_free;
 
 	info = IEEE80211_SKB_CB(skb);
-	sta = info->control.sta;
 
-	if (unlikely(carl9170_tx_prepare(ar, skb)))
+	if (unlikely(carl9170_tx_prepare(ar, sta, skb)))
 		goto err_free;
 
 	carl9170_tx_accounting(ar, skb);
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index b80352b..2ca4e88 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3407,7 +3407,8 @@ static void b43_tx_work(struct work_struct *work)
 }
 
 static void b43_op_tx(struct ieee80211_hw *hw,
-		     struct sk_buff *skb)
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct b43_wl *wl = hw_to_b43_wl(hw);
 
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 8156135..74d4c20 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2492,6 +2492,7 @@ static void b43legacy_tx_work(struct work_struct *work)
 }
 
 static void b43legacy_op_tx(struct ieee80211_hw *hw,
+			    struct ieee80211_tx_control *control,
 			    struct sk_buff *skb)
 {
 	struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 9e79d47..a7be68d 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
 	}
 }
 
-static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void brcms_ops_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct brcms_info *wl = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -276,7 +278,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto done;
 	}
 	brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
-	tx_info->rate_driver_data[0] = tx_info->control.sta;
+	tx_info->rate_driver_data[0] = control->sta;
  done:
 	spin_unlock_bh(&wl->lock);
 }
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index faec404..e252acb 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -460,7 +460,9 @@ il3945_build_tx_cmd_basic(struct il_priv *il, struct il_device_cmd *cmd,
  * start C_TX command process
  */
 static int
-il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il3945_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -512,7 +514,7 @@ il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	hdr_len = ieee80211_hdrlen(fc);
 
 	/* Find idx into station table for destination station */
-	sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+	sta_id = il_sta_id_or_broadcast(il, sta);
 	if (sta_id == IL_INVALID_STATION) {
 		D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
 		goto drop;
@@ -2859,7 +2861,9 @@ il3945_mac_stop(struct ieee80211_hw *hw)
 }
 
 static void
-il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il3945_mac_tx(struct ieee80211_hw *hw,
+	       struct ieee80211_tx_control *control,
+	       struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -2868,7 +2872,7 @@ il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il3945_tx_skb(il, skb))
+	if (il3945_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MAC80211("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 34f61a0..eac4dc8 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -1526,8 +1526,11 @@ il4965_tx_cmd_build_basic(struct il_priv *il, struct sk_buff *skb,
 }
 
 static void
-il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
-			 struct ieee80211_tx_info *info, __le16 fc)
+il4965_tx_cmd_build_rate(struct il_priv *il,
+			 struct il_tx_cmd *tx_cmd,
+			 struct ieee80211_tx_info *info,
+			 struct ieee80211_sta *sta,
+			 __le16 fc)
 {
 	const u8 rts_retry_limit = 60;
 	u32 rate_flags;
@@ -1561,9 +1564,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
 	rate_idx = info->control.rates[0].idx;
 	if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0
 	    || rate_idx > RATE_COUNT_LEGACY)
-		rate_idx =
-		    rate_lowest_index(&il->bands[info->band],
-				      info->control.sta);
+		rate_idx = rate_lowest_index(&il->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IL_FIRST_OFDM_RATE;
@@ -1630,11 +1631,12 @@ il4965_tx_cmd_build_hwcrypto(struct il_priv *il, struct ieee80211_tx_info *info,
  * start C_TX command process
  */
 int
-il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il4965_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct il_station_priv *sta_priv = NULL;
 	struct il_tx_queue *txq;
 	struct il_queue *q;
@@ -1680,7 +1682,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 		sta_id = il->hw_params.bcast_id;
 	else {
 		/* Find idx into station table for destination station */
-		sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+		sta_id = il_sta_id_or_broadcast(il, sta);
 
 		if (sta_id == IL_INVALID_STATION) {
 			D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
@@ -1786,7 +1788,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id);
 
-	il4965_tx_cmd_build_rate(il, tx_cmd, info, fc);
+	il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc);
 
 	il_update_stats(il, true, fc, len);
 	/*
@@ -5828,7 +5830,9 @@ il4965_mac_stop(struct ieee80211_hw *hw)
 }
 
 void
-il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il4965_mac_tx(struct ieee80211_hw *hw,
+	      struct ieee80211_tx_control *control,
+	      struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -5837,7 +5841,7 @@ il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il4965_tx_skb(il, skb))
+	if (il4965_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MACDUMP("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 1db6776..2d092f3 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -78,7 +78,9 @@ int il4965_hw_txq_attach_buf_to_tfd(struct il_priv *il, struct il_tx_queue *txq,
 int il4965_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq);
 void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags,
 				 struct ieee80211_tx_info *info);
-int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb);
+int il4965_tx_skb(struct il_priv *il,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 * ssn);
 int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif,
@@ -163,7 +165,9 @@ void il4965_eeprom_release_semaphore(struct il_priv *il);
 int il4965_eeprom_check_version(struct il_priv *il);
 
 /* mac80211 handlers (for 4965) */
-void il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void il4965_mac_tx(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 int il4965_mac_start(struct ieee80211_hw *hw);
 void il4965_mac_stop(struct ieee80211_hw *hw);
 void il4965_configure_filter(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlwifi/dvm/agn.h b/drivers/net/wireless/iwlwifi/dvm/agn.h
index 9bb16bd..f0b8c1f 100644
--- a/drivers/net/wireless/iwlwifi/dvm/agn.h
+++ b/drivers/net/wireless/iwlwifi/dvm/agn.h
@@ -201,7 +201,9 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success);
 
 
 /* tx */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb);
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 *ssn);
 int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif,
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index a5f7bce..e64af60 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -511,14 +511,16 @@ static void iwlagn_mac_set_wakeup(struct ieee80211_hw *hw, bool enabled)
 }
 #endif
 
-static void iwlagn_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void iwlagn_mac_tx(struct ieee80211_hw *hw,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
 	struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
 
 	IWL_DEBUG_TX(priv, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 		     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (iwlagn_tx_skb(priv, skb))
+	if (iwlagn_tx_skb(priv, control->sta, skb))
 		dev_kfree_skb_any(skb);
 }
 
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
index 5971a23..d17799b 100644
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
@@ -127,6 +127,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
 static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 				     struct iwl_tx_cmd *tx_cmd,
 				     struct ieee80211_tx_info *info,
+				     struct ieee80211_sta *sta,
 				     __le16 fc)
 {
 	u32 rate_flags;
@@ -187,8 +188,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 	if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS ||
 			(rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY))
 		rate_idx = rate_lowest_index(
-				&priv->eeprom_data->bands[info->band],
-				info->control.sta);
+				&priv->eeprom_data->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IWL_FIRST_OFDM_RATE;
@@ -291,7 +291,9 @@ static int iwl_sta_id_or_broadcast(struct iwl_rxon_context *context,
 /*
  * start REPLY_TX command process
  */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -345,7 +347,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 		sta_id = ctx->bcast_sta_id;
 	else {
 		/* Find index into station table for destination station */
-		sta_id = iwl_sta_id_or_broadcast(ctx, info->control.sta);
+		sta_id = iwl_sta_id_or_broadcast(ctx, sta);
 		if (sta_id == IWL_INVALID_STATION) {
 			IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
 				       hdr->addr1);
@@ -355,8 +357,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 
 	IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
 
-	if (info->control.sta)
-		sta_priv = (void *)info->control.sta->drv_priv;
+	if (sta)
+		sta_priv = (void *)sta->drv_priv;
 
 	if (sta_priv && sta_priv->asleep &&
 	    (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) {
@@ -397,7 +399,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	iwlagn_tx_cmd_build_basic(priv, skb, tx_cmd, info, hdr, sta_id);
 
-	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, fc);
+	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, sta, fc);
 
 	memset(&info->status, 0, sizeof(info->status));
 
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index a034572..7001856 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -227,7 +227,9 @@ static void lbtf_free_adapter(struct lbtf_private *priv)
 	lbtf_deb_leave(LBTF_DEB_MAIN);
 }
 
-static void lbtf_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void lbtf_op_tx(struct ieee80211_hw *hw,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct lbtf_private *priv = hw->priv;
 
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 826ac7b..ff20dbb 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -709,7 +709,9 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
 	return ack;
 }
 
-static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
+			      struct ieee80211_tx_control *control,
+			      struct sk_buff *skb)
 {
 	bool ack;
 	struct ieee80211_tx_info *txi;
@@ -741,8 +743,8 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	if (txi->control.vif)
 		hwsim_check_magic(txi->control.vif);
-	if (txi->control.sta)
-		hwsim_check_sta_magic(txi->control.sta);
+	if (control->sta)
+		hwsim_check_sta_magic(control->sta);
 
 	ieee80211_tx_info_clear_status(txi);
 
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 224e03a..5099e53 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1830,12 +1830,14 @@ static inline void mwl8k_tx_count_packet(struct ieee80211_sta *sta, u8 tid)
 }
 
 static void
-mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
+mwl8k_txq_xmit(struct ieee80211_hw *hw,
+	       int index,
+	       struct ieee80211_sta *sta,
+	       struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	struct ieee80211_tx_info *tx_info;
 	struct mwl8k_vif *mwl8k_vif;
-	struct ieee80211_sta *sta;
 	struct ieee80211_hdr *wh;
 	struct mwl8k_tx_queue *txq;
 	struct mwl8k_tx_desc *tx;
@@ -1867,7 +1869,6 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	wh = &((struct mwl8k_dma_data *)skb->data)->wh;
 
 	tx_info = IEEE80211_SKB_CB(skb);
-	sta = tx_info->control.sta;
 	mwl8k_vif = MWL8K_VIF(tx_info->control.vif);
 
 	if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
@@ -2019,8 +2020,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	tx->pkt_phys_addr = cpu_to_le32(dma);
 	tx->pkt_len = cpu_to_le16(skb->len);
 	tx->rate_info = 0;
-	if (!priv->ap_fw && tx_info->control.sta != NULL)
-		tx->peer_id = MWL8K_STA(tx_info->control.sta)->peer_id;
+	if (!priv->ap_fw && sta != NULL)
+		tx->peer_id = MWL8K_STA(sta)->peer_id;
 	else
 		tx->peer_id = 0;
 
@@ -4364,7 +4365,9 @@ static void mwl8k_rx_poll(unsigned long data)
 /*
  * Core driver operations.
  */
-static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mwl8k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	int index = skb_get_queue_mapping(skb);
@@ -4376,7 +4379,7 @@ static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		return;
 	}
 
-	mwl8k_txq_xmit(hw, index, skb);
+	mwl8k_txq_xmit(hw, index, control->sta, skb);
 }
 
 static int mwl8k_start(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/p54/lmac.h b/drivers/net/wireless/p54/lmac.h
index 3d8d622..de1d46b 100644
--- a/drivers/net/wireless/p54/lmac.h
+++ b/drivers/net/wireless/p54/lmac.h
@@ -526,7 +526,9 @@ int p54_init_leds(struct p54_common *priv);
 void p54_unregister_leds(struct p54_common *priv);
 
 /* xmit functions */
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb);
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int p54_tx_cancel(struct p54_common *priv, __le32 req_id);
 void p54_tx(struct p54_common *priv, struct sk_buff *skb);
 
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 7cffea7..5e91ad0 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -158,7 +158,7 @@ static int p54_beacon_update(struct p54_common *priv,
 	 * to cancel the old beacon template by hand, instead the firmware
 	 * will release the previous one through the feedback mechanism.
 	 */
-	p54_tx_80211(priv->hw, beacon);
+	p54_tx_80211(priv->hw, NULL, beacon);
 	priv->tsf_high32 = 0;
 	priv->tsf_low32 = 0;
 
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index f38786e..5861e13 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -676,8 +676,9 @@ int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb)
 EXPORT_SYMBOL_GPL(p54_rx);
 
 static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
-				struct ieee80211_tx_info *info, u8 *queue,
-				u32 *extra_len, u16 *flags, u16 *aid,
+				struct ieee80211_tx_info *info,
+				struct ieee80211_sta *sta,
+				u8 *queue, u32 *extra_len, u16 *flags, u16 *aid,
 				bool *burst_possible)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -746,8 +747,8 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
 			}
 		}
 
-		if (info->control.sta)
-			*aid = info->control.sta->aid;
+		if (sta)
+			*aid = sta->aid;
 		break;
 	}
 }
@@ -767,7 +768,9 @@ static u8 p54_convert_algo(u32 cipher)
 	}
 }
 
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct p54_common *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -784,7 +787,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
 	u8 nrates = 0, nremaining = 8;
 	bool burst_allowed = false;
 
-	p54_tx_80211_header(priv, skb, info, &queue, &extra_len,
+	p54_tx_80211_header(priv, skb, info, control->sta, &queue, &extra_len,
 			    &hdr_flags, &aid, &burst_allowed);
 
 	if (p54_tx_qos_accounting_alloc(priv, skb, queue)) {
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 8afb546..f991e8b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1287,7 +1287,9 @@ void rt2x00lib_rxdone(struct queue_entry *entry, gfp_t gfp);
 /*
  * mac80211 handlers.
  */
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int rt2x00mac_start(struct ieee80211_hw *hw);
 void rt2x00mac_stop(struct ieee80211_hw *hw);
 int rt2x00mac_add_interface(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index a6b88bd..a59048f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -194,7 +194,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
 	 */
 	skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	while (skb) {
-		rt2x00mac_tx(rt2x00dev->hw, skb);
+		rt2x00mac_tx(rt2x00dev->hw, NULL, skb);
 		skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	}
 }
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 4ff26c2..c3d0f2f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -99,7 +99,9 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
 	return retval;
 }
 
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index f7e74a0..e488b94 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -315,6 +315,7 @@ static void rt2x00queue_create_tx_descriptor_plcp(struct rt2x00_dev *rt2x00dev,
 static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 						struct sk_buff *skb,
 						struct txentry_desc *txdesc,
+						struct ieee80211_sta *sta,
 						const struct rt2x00_rate *hwrate)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -322,11 +323,11 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct rt2x00_sta *sta_priv = NULL;
 
-	if (tx_info->control.sta) {
+	if (sta) {
 		txdesc->u.ht.mpdu_density =
-		    tx_info->control.sta->ht_cap.ampdu_density;
+		    sta->ht_cap.ampdu_density;
 
-		sta_priv = sta_to_rt2x00_sta(tx_info->control.sta);
+		sta_priv = sta_to_rt2x00_sta(sta);
 		txdesc->u.ht.wcid = sta_priv->wcid;
 	}
 
@@ -341,8 +342,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 		 * MIMO PS should be set to 1 for STA's using dynamic SM PS
 		 * when using more then one tx stream (>MCS7).
 		 */
-		if (tx_info->control.sta && txdesc->u.ht.mcs > 7 &&
-		    ((tx_info->control.sta->ht_cap.cap &
+		if (sta && txdesc->u.ht.mcs > 7 &&
+		    ((sta->ht_cap.cap &
 		      IEEE80211_HT_CAP_SM_PS) >>
 		     IEEE80211_HT_CAP_SM_PS_SHIFT) ==
 		    WLAN_HT_CAP_SM_PS_DYNAMIC)
@@ -409,7 +410,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 
 static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 					     struct sk_buff *skb,
-					     struct txentry_desc *txdesc)
+					     struct txentry_desc *txdesc,
+					     struct ieee80211_sta *sta)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -503,7 +505,7 @@ static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 
 	if (test_bit(REQUIRE_HT_TX_DESC, &rt2x00dev->cap_flags))
 		rt2x00queue_create_tx_descriptor_ht(rt2x00dev, skb, txdesc,
-						    hwrate);
+						   sta, hwrate);
 	else
 		rt2x00queue_create_tx_descriptor_plcp(rt2x00dev, skb, txdesc,
 						      hwrate);
@@ -595,7 +597,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc, NULL);
 
 	/*
 	 * All information is retrieved from the skb->cb array,
@@ -740,7 +742,7 @@ int rt2x00queue_update_beacon_locked(struct rt2x00_dev *rt2x00dev,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc, NULL);
 
 	/*
 	 * Fill in skb descriptor
diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 3b50539..fd8fcbd 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -244,7 +244,9 @@ static irqreturn_t rtl8180_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static void rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8180_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -710,7 +712,7 @@ static void rtl8180_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8180_tx(dev, skb);
+	rtl8180_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index 4fb1ca1..c7bfcf3 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -228,7 +228,9 @@ static void rtl8187_tx_cb(struct urb *urb)
 	}
 }
 
-static void rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8187_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct rtl8187_priv *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1076,7 +1078,7 @@ static void rtl8187_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8187_tx(dev, skb);
+	rtl8187_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 41f7f12..1b2ffdb 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -1341,9 +1341,8 @@ int rtl_send_smps_action(struct ieee80211_hw *hw,
 		rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
 
 		info->control.rates[0].idx = 0;
-		info->control.sta = sta;
 		info->band = hw->conf.channel->band;
-		rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+		rtlpriv->intf_ops->adapter_tx(hw, sta, skb, &tcb_desc);
 	}
 err_free:
 	return 0;
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 278e9f9..db903fd 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -124,7 +124,9 @@ static void rtl_op_stop(struct ieee80211_hw *hw)
 	mutex_unlock(&rtlpriv->locks.conf_mutex);
 }
 
-static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void rtl_op_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
@@ -138,8 +140,8 @@ static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	if (!test_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status))
 		goto err_free;
 
-	if (!rtlpriv->intf_ops->waitq_insert(hw, skb))
-		rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+	if (!rtlpriv->intf_ops->waitq_insert(hw, control->sta, skb))
+		rtlpriv->intf_ops->adapter_tx(hw, control->sta, skb, &tcb_desc);
 
 	return;
 
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 2c6eb9e..0bde0ce 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -504,7 +504,7 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
 				_rtl_update_earlymode_info(hw, skb,
 							   &tcb_desc, tid);
 
-			rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+			rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, &tcb_desc);
 		}
 	}
 }
@@ -929,7 +929,7 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
 	info = IEEE80211_SKB_CB(pskb);
 	pdesc = &ring->desc[0];
 	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc,
-		info, pskb, BEACON_QUEUE, &tcb_desc);
+		info, NULL, pskb, BEACON_QUEUE, &tcb_desc);
 
 	__skb_queue_tail(&ring->queue, pskb);
 
@@ -1305,11 +1305,10 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw)
 }
 
 static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta,
 					struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct rtl_sta_info *sta_entry = NULL;
 	u8 tid = rtl_get_tid(skb);
 
@@ -1337,13 +1336,14 @@ static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
 	return true;
 }
 
-static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
-		struct rtl_tcb_desc *ptcb_desc)
+static int rtl_pci_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_sta *sta,
+		      struct sk_buff *skb,
+		      struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_sta_info *sta_entry = NULL;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct rtl8192_tx_ring *ring;
 	struct rtl_tx_desc *pdesc;
 	u8 idx;
@@ -1418,7 +1418,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
 
 	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc,
-			info, skb, hw_queue, ptcb_desc);
+			info, sta, skb, hw_queue, ptcb_desc);
 
 	__skb_queue_tail(&ring->queue, skb);
 
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
index 3af874e..1b13001 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
@@ -596,7 +596,9 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
 
 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 hw_queue, struct rtl_tcb_desc *tcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -604,7 +606,6 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	bool defaultadapter = true;
-	struct ieee80211_sta *sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
index c4adb97..a7cdd51 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
@@ -713,6 +713,7 @@ struct rx_desc_92c {
 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
index 21bc827..bb528a7 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
@@ -496,7 +496,9 @@ static void _rtl_tx_desc_checksum(u8 *txdesc)
 
 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 queue_index,
 			  struct rtl_tcb_desc *tcb_desc)
 {
@@ -504,7 +506,6 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	bool defaultadapter = true;
-	struct ieee80211_sta *sta = info->control.sta = info->control.sta;
 	u8 *qc = ieee80211_get_qos_ctl(hdr);
 	u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
 	u16 seq_number;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
index 332b06e..725c53a 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
@@ -420,7 +420,9 @@ struct sk_buff *rtl8192c_tx_aggregate_hdl(struct ieee80211_hw *,
 					   struct sk_buff_head *);
 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 queue_index,
 			  struct rtl_tcb_desc *tcb_desc);
 void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
index 1666ef7..323450e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
@@ -551,7 +551,9 @@ static void _rtl92de_insert_emcontent(struct rtl_tcb_desc *ptcb_desc,
 
 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -559,7 +561,6 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
-	struct ieee80211_sta *sta = info->control.sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
index 057a524..c1b5dfb 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
@@ -730,6 +730,7 @@ struct rx_desc_92d {
 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 bool rtl92de_rx_query_desc(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
index 812b585..55cb73f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
@@ -591,14 +591,15 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
 
 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
 		struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-		struct ieee80211_tx_info *info, struct sk_buff *skb,
+		struct ieee80211_tx_info *info,
+		struct ieee80211_sta *sta,
+		struct sk_buff *skb,
 		u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-	struct ieee80211_sta *sta = info->control.sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
index 011e7b0..64dd66f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
@@ -31,6 +31,7 @@
 
 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, bool firstseg,
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index aa970fc..9140469 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -848,8 +848,10 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
 	_rtl_submit_tx_urb(hw, _urb);
 }
 
-static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
-			    u16 hw_queue)
+static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw,
+				   struct ieee80211_sta *sta,
+				   struct sk_buff *skb,
+				   u16 hw_queue)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
@@ -891,7 +893,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
 		seq_number += 1;
 		seq_number <<= 4;
 	}
-	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, skb,
+	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, sta, skb,
 					hw_queue, &tcb_desc);
 	if (!ieee80211_has_morefrags(hdr->frame_control)) {
 		if (qc)
@@ -901,7 +903,9 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
 		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
 }
 
-static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
+static int rtl_usb_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_sta *sta,
+		      struct sk_buff *skb,
 		      struct rtl_tcb_desc *dummy)
 {
 	struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
@@ -913,7 +917,7 @@ static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 	if (unlikely(is_hal_stop(rtlhal)))
 		goto err_free;
 	hw_queue = rtlusb->usb_mq_to_hwq(fc, skb_get_queue_mapping(skb));
-	_rtl_usb_tx_preprocess(hw, skb, hw_queue);
+	_rtl_usb_tx_preprocess(hw, sta, skb, hw_queue);
 	_rtl_usb_transmit(hw, skb, hw_queue);
 	return NETDEV_TX_OK;
 
@@ -923,6 +927,7 @@ err_free:
 }
 
 static bool rtl_usb_tx_chk_waitq_insert(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta,
 					struct sk_buff *skb)
 {
 	return false;
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index cdaa21f..40153e7 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -122,7 +122,7 @@ enum rt_eeprom_type {
 	EEPROM_BOOT_EFUSE,
 };
 
-enum rtl_status {
+enum ttl_status {
 	RTL_STATUS_INTERFACE_START = 0,
 };
 
@@ -1418,6 +1418,7 @@ struct rtl_hal_ops {
 	void (*fill_tx_desc) (struct ieee80211_hw *hw,
 			      struct ieee80211_hdr *hdr, u8 *pdesc_tx,
 			      struct ieee80211_tx_info *info,
+			      struct ieee80211_sta *sta,
 			      struct sk_buff *skb, u8 hw_queue,
 			      struct rtl_tcb_desc *ptcb_desc);
 	void (*fill_fake_txdesc) (struct ieee80211_hw *hw, u8 *pDesc,
@@ -1475,11 +1476,15 @@ struct rtl_intf_ops {
 	int (*adapter_start) (struct ieee80211_hw *hw);
 	void (*adapter_stop) (struct ieee80211_hw *hw);
 
-	int (*adapter_tx) (struct ieee80211_hw *hw, struct sk_buff *skb,
-			struct rtl_tcb_desc *ptcb_desc);
+	int (*adapter_tx) (struct ieee80211_hw *hw,
+			   struct ieee80211_sta *sta,
+			   struct sk_buff *skb,
+			   struct rtl_tcb_desc *ptcb_desc);
 	void (*flush)(struct ieee80211_hw *hw, bool drop);
 	int (*reset_trx_ring) (struct ieee80211_hw *hw);
-	bool (*waitq_insert) (struct ieee80211_hw *hw, struct sk_buff *skb);
+	bool (*waitq_insert) (struct ieee80211_hw *hw,
+			      struct ieee80211_sta *sta,
+			      struct sk_buff *skb);
 
 	/*pci */
 	void (*disable_aspm) (struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index 3118c42..441cbcc 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -354,7 +354,9 @@ out:
 	return ret;
 }
 
-static void wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1251_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1251 *wl = hw->priv;
 	unsigned long flags;
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 7254860..cdac196 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1181,7 +1181,9 @@ out:
 	return ret;
 }
 
-static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1271_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1271 *wl = hw->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1197,7 +1199,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	mapping = skb_get_queue_mapping(skb);
 	q = wl1271_tx_get_queue(mapping);
 
-	hlid = wl12xx_tx_get_hlid(wl, wlvif, skb);
+	hlid = wl12xx_tx_get_hlid(wl, wlvif, sta, skb);
 
 	spin_lock_irqsave(&wl->wl_lock, flags);
 
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index c1d9320..58510fe 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -131,15 +131,15 @@ bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb)
 EXPORT_SYMBOL(wl12xx_is_dummy_packet);
 
 u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif,
-			 struct sk_buff *skb)
+			 struct ieee80211_sta *sta, struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *control = IEEE80211_SKB_CB(skb);
 
-	if (control->control.sta) {
+	if (sta) {
 		struct wl1271_station *wl_sta;
 
 		wl_sta = (struct wl1271_station *)
-				control->control.sta->drv_priv;
+				sta->drv_priv;
 		return wl_sta->hlid;
 	} else {
 		struct ieee80211_hdr *hdr;
@@ -164,7 +164,7 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		return wl->system_hlid;
 
 	if (wlvif->bss_type == BSS_TYPE_AP_BSS)
-		return wl12xx_tx_get_hlid_ap(wl, wlvif, skb);
+		return wl12xx_tx_get_hlid_ap(wl, wlvif, sta, skb);
 
 	if ((test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) ||
 	     test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags)) &&
@@ -256,7 +256,8 @@ static void wl1271_tx_fill_hdr(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	__le16 frame_control;
 	struct ieee80211_hdr *hdr;
 	u8 *frame_start;
-	bool is_dummy;
+	bool is_dummy;i
+	struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
 
 	desc = (struct wl1271_tx_hw_descr *) skb->data;
 	frame_start = (u8 *)(desc + 1);
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index c9e2660..4598801 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -937,7 +937,9 @@ static int fill_ctrlset(struct zd_mac *mac,
  * control block of the skbuff will be initialized. If necessary the incoming
  * mac80211 queues will be stopped.
  */
-static void zd_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void zd_op_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct zd_mac *mac = zd_hw_mac(hw);
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1176,7 +1178,7 @@ static void zd_beacon_done(struct zd_mac *mac)
 		skb = ieee80211_get_buffered_bc(mac->hw, mac->vif);
 		if (!skb)
 			break;
-		zd_op_tx(mac->hw, skb);
+		zd_op_tx(mac->hw, NULL, skb);
 	}
 
 	/*
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index c3751a7..c6566e5 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -119,7 +119,9 @@ static void wbsoft_configure_filter(struct ieee80211_hw *dev,
 	*total_flags = new_flags;
 }
 
-static void wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void wbsoft_tx(struct ieee80211_hw *dev,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct wbsoft_priv *priv = dev->priv;
 
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index bb86aa6..4309d8a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -522,9 +522,6 @@ struct ieee80211_tx_rate {
  *  (2) driver internal use (if applicable)
  *  (3) TX status information - driver tells mac80211 what happened
  *
- * The TX control's sta pointer is only valid during the ->tx call,
- * it may be NULL.
- *
  * @flags: transmit info flags, defined above
  * @band: the band to transmit on (use for checking for races)
  * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC
@@ -555,6 +552,7 @@ struct ieee80211_tx_info {
 					struct ieee80211_tx_rate rates[
 						IEEE80211_TX_MAX_RATES];
 					s8 rts_cts_rate_idx;
+					/* 3 bytes free */
 				};
 				/* only needed before rate control */
 				unsigned long jiffies;
@@ -562,7 +560,7 @@ struct ieee80211_tx_info {
 			/* NB: vif can be NULL for injected frames */
 			struct ieee80211_vif *vif;
 			struct ieee80211_key_conf *hw_key;
-			struct ieee80211_sta *sta;
+			/* 8 bytes free */
 		} control;
 		struct {
 			struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
@@ -1074,6 +1072,16 @@ enum sta_notify_cmd {
 };
 
 /**
+ * struct ieee80211_tx_control - TX control data
+ *
+ * @sta: station table entry, this sta pointer may be NULL and
+ * 	it is not allowed to copy the pointer, due to RCU.
+ */
+struct ieee80211_tx_control {
+	struct ieee80211_sta *sta;
+};
+
+/**
  * enum ieee80211_hw_flags - hardware flags
  *
  * These flags are used to indicate hardware capabilities to
@@ -2264,7 +2272,9 @@ enum ieee80211_rate_control_changed {
  *	The callback is optional and can (should!) sleep.
  */
 struct ieee80211_ops {
-	void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
+	void (*tx)(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 	int (*start)(struct ieee80211_hw *hw);
 	void (*stop)(struct ieee80211_hw *hw);
 #ifdef CONFIG_PM
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index df92031..a81117a 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -22,9 +22,11 @@ get_bss_sdata(struct ieee80211_sub_if_data *sdata)
 	return sdata;
 }
 
-static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
+static inline void drv_tx(struct ieee80211_local *local,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
-	local->ops->tx(&local->hw, skb);
+	local->ops->tx(&local->hw, control, skb);
 }
 
 static inline void drv_get_et_strings(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index acf712f..dee76d8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1204,6 +1204,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
 			       struct sk_buff_head *skbs,
 			       bool txpending)
 {
+	struct ieee80211_tx_control control;
 	struct sk_buff *skb, *tmp;
 	unsigned long flags;
 
@@ -1240,10 +1241,10 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
 		spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 
 		info->control.vif = vif;
-		info->control.sta = sta;
+		control.sta = sta;
 
 		__skb_unlink(skb, skbs);
-		drv_tx(local, skb);
+		drv_tx(local, &control, skb);
 	}
 
 	return true;
@@ -1301,8 +1302,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
 		break;
 	}
 
-	result = ieee80211_tx_frags(local, vif, pubsta, skbs,
-				    txpending);
+	result = ieee80211_tx_frags(local, vif, pubsta, skbs, txpending);
 
 	ieee80211_tpt_led_trig_tx(local, fc, led_len);
 	ieee80211_led_tx(local, 1);
@@ -1409,8 +1409,8 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
 			sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
 
 	if (!invoke_tx_handlers(&tx))
-		result = __ieee80211_tx(local, &tx.skbs, led_len,
-					tx.sta, txpending);
+		result = __ieee80211_tx(local, &tx.skbs, led_len, tx.sta,
+					txpending);
  out:
 	rcu_read_unlock();
 	return result;
-- 
1.7.11.1



From johannes at sipsolutions.net  Wed Jul 25 05:36:30 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Wed, 25 Jul 2012 11:36:30 +0200
Subject: [PATCH v5] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343161108-6941-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120724_221843_511093_701FFAF2)
References: <1343161108-6941-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120724_221843_511093_701FFAF2)
Message-ID: <1343208990.4463.25.camel@jlt3.sipsolutions.net>

On Tue, 2012-07-24 at 22:18 +0200, Thomas Huehn wrote:
> The pointer control.sta is removed from ieee80211_tx_info to free up
> sufficient memory in SKB_CB on the tx-path to enable new annotations
> per data packet e.g.support of upcoming Transmit Power Control (TPC).
> Now the control.sta pointer is put on the stack where passed as
> function parameter to the .tx equivalent (ieee80211_ops) of each
> affected wireless driver.
> Therefore a new structure ieee80211_tx_control is added to mac80211.h
> which holds the sta structure instead. The tx-path of all affected
> drivers is restructured to respect the chaneges.
> 
> Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
> Signed-off-by: Alina Friedrichsen <x-alina at gmx.net>
> Signed-off-by: Felix Fietkau <nbd at openwrt.org>
> ---
> restructure this patch to respect logical API evolutions. thx to Johannes Berg
> add missing drivers that are effected as well. thx to Xose Vazquez Perez
> add missing drivers that are effected as well. thx to Johannes Berg
> simplified control pointer passing in tx.c - thx to Johannes Berg

Finally applied, but I dropped these spurious changes:

> @@ -1301,8 +1302,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
>  		break;
>  	}
>  
> -	result = ieee80211_tx_frags(local, vif, pubsta, skbs,
> -				    txpending);
> +	result = ieee80211_tx_frags(local, vif, pubsta, skbs, txpending);
>  
>  	ieee80211_tpt_led_trig_tx(local, fc, led_len);
>  	ieee80211_led_tx(local, 1);
> @@ -1409,8 +1409,8 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
>  			sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
>  
>  	if (!invoke_tx_handlers(&tx))
> -		result = __ieee80211_tx(local, &tx.skbs, led_len,
> -					tx.sta, txpending);
> +		result = __ieee80211_tx(local, &tx.skbs, led_len, tx.sta,
> +					txpending);
>   out:
>  	rcu_read_unlock();
>  	return result;

johannes



From johannes at sipsolutions.net  Wed Jul 25 08:50:25 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Wed, 25 Jul 2012 14:50:25 +0200
Subject: [PATCH v5] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343208990.4463.25.camel@jlt3.sipsolutions.net>
 (sfid-20120725_113644_599580_8AC4476F)
References: <1343161108-6941-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120724_221843_511093_701FFAF2)
 <1343208990.4463.25.camel@jlt3.sipsolutions.net>
 (sfid-20120725_113644_599580_8AC4476F)
Message-ID: <1343220625.4463.31.camel@jlt3.sipsolutions.net>

On Wed, 2012-07-25 at 11:36 +0200, Johannes Berg wrote:
> On Tue, 2012-07-24 at 22:18 +0200, Thomas Huehn wrote:
> > The pointer control.sta is removed from ieee80211_tx_info to free up
> > sufficient memory in SKB_CB on the tx-path to enable new annotations
> > per data packet e.g.support of upcoming Transmit Power Control (TPC).
> > Now the control.sta pointer is put on the stack where passed as
> > function parameter to the .tx equivalent (ieee80211_ops) of each
> > affected wireless driver.
> > Therefore a new structure ieee80211_tx_control is added to mac80211.h
> > which holds the sta structure instead. The tx-path of all affected
> > drivers is restructured to respect the chaneges.
> > 
> > Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
> > Signed-off-by: Alina Friedrichsen <x-alina at gmx.net>
> > Signed-off-by: Felix Fietkau <nbd at openwrt.org>
> > ---
> > restructure this patch to respect logical API evolutions. thx to Johannes Berg
> > add missing drivers that are effected as well. thx to Xose Vazquez Perez
> > add missing drivers that are effected as well. thx to Johannes Berg
> > simplified control pointer passing in tx.c - thx to Johannes Berg
> 
> Finally applied, but I dropped these spurious changes:

Never mind, it still doesn't compile, dropped it.

I had to rebase my tree due to that, sorry!

johannes



From thomas at net.t-labs.tu-berlin.de  Wed Jul 25 09:00:13 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Wed, 25 Jul 2012 15:00:13 +0200
Subject: [PATCH v5] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343220625.4463.31.camel@jlt3.sipsolutions.net>
References: <1343161108-6941-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120724_221843_511093_701FFAF2)
 <1343208990.4463.25.camel@jlt3.sipsolutions.net>
 (sfid-20120725_113644_599580_8AC4476F)
 <1343220625.4463.31.camel@jlt3.sipsolutions.net>
Message-ID: <500FEDDD.206@net.t-labs.tu-berlin.de>

Hi Johannes,

Johannes Berg schrieb:


>> Finally applied, but I dropped these spurious changes:
> Never mind, it still doesn't compile, dropped it.
>
> I had to rebase my tree due to that, sorry!
>

My last PATCH included some changes at a TI driver which was adapted in
wireless-testing in John's tree. As I touch that many drivers I would
like to use your tree instead, to provide a proper PATCH that builds at
your tree state...small de-synchronization issues just make it fail.

Can I use your wireless-next for that at:
linux/kernel/git/jberg/mac80211-next.git .. or any other suggestion ?

Greetings Thomas


From zajec5 at gmail.com  Wed Jul 25 10:47:09 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Wed, 25 Jul 2012 16:47:09 +0200
Subject: [PATCH V2] b43: be more user friendly with PHY info
Message-ID: <1343227629-14161-1-git-send-email-zajec5@gmail.com>

First of all, use PHY names instead of magic numbers. It should make
configuring kernel easier in case of not enabled PHY type support.
Secondly, always print info about PHY. This is really basic info about
hardware and quite important for the support level.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
V2: add new PHYTYPEs
---
 drivers/net/wireless/b43/b43.h  |    2 +
 drivers/net/wireless/b43/main.c |   40 ++++++++++++++++++++++++++++++++++----
 2 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index 7c899fc..b0c7f47 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -415,6 +415,8 @@ enum {
 #define B43_PHYTYPE_HT			0x07
 #define B43_PHYTYPE_LCN			0x08
 #define B43_PHYTYPE_LCNXN		0x09
+#define B43_PHYTYPE_LCN40		0x0a
+#define B43_PHYTYPE_AC			0x0b
 
 /* PHYRegisters */
 #define B43_PHY_ILT_A_CTRL		0x0072
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index b80352b..5655c9c 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4277,6 +4277,37 @@ out:
 	return err;
 }
 
+static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
+{
+	switch (phy_type) {
+	case B43_PHYTYPE_A:
+		return "A";
+	case B43_PHYTYPE_B:
+		return "B";
+	case B43_PHYTYPE_G:
+		return "G";
+	case B43_PHYTYPE_N:
+		return "N";
+	case B43_PHYTYPE_LP:
+		return "LP";
+	case B43_PHYTYPE_SSLPN:
+		return "SSLPN";
+	case B43_PHYTYPE_HT:
+		return "HT";
+	case B43_PHYTYPE_LCN:
+		return "LCN";
+	case B43_PHYTYPE_LCNXN:
+		return "LCNXN";
+	case B43_PHYTYPE_LCN40:
+		return "LCN40";
+	case B43_PHYTYPE_AC:
+		return "AC";
+	}
+
+	b43err(dev->wl, "Unknown PHY Type: %d\n", phy_type);
+	return "UNKNOWN";
+}
+
 /* Get PHY and RADIO versioning numbers */
 static int b43_phy_versioning(struct b43_wldev *dev)
 {
@@ -4337,13 +4368,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
 		unsupported = 1;
 	}
 	if (unsupported) {
-		b43err(dev->wl, "FOUND UNSUPPORTED PHY "
-		       "(Analog %u, Type %u, Revision %u)\n",
-		       analog_type, phy_type, phy_rev);
+		b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %s, Revision %u)\n",
+		       analog_type, b43_phy_name(dev, phy_type), phy_rev);
 		return -EOPNOTSUPP;
 	}
-	b43dbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n",
-	       analog_type, phy_type, phy_rev);
+	b43info(dev->wl, "Found PHY: Analog %u, Type %s, Revision %u\n",
+		analog_type, b43_phy_name(dev, phy_type), phy_rev);
 
 	/* Get RADIO versioning */
 	if (dev->dev->core_rev >= 24) {
-- 
1.7.7



From joe at perches.com  Wed Jul 25 10:10:35 2012
From: joe at perches.com (Joe Perches)
Date: Wed, 25 Jul 2012 07:10:35 -0700
Subject: [PATCH V2] b43: be more user friendly with PHY info
In-Reply-To: <1343227629-14161-1-git-send-email-zajec5@gmail.com>
References: <1343227629-14161-1-git-send-email-zajec5@gmail.com>
Message-ID: <1343225435.1693.10.camel@joe2Laptop>

On Wed, 2012-07-25 at 16:47 +0200, Rafa? Mi?ecki wrote:
> use PHY names instead of magic numbers.
[]
> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
[]
> @@ -4277,6 +4277,37 @@ out:
[]
> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
> +{
> +	switch (phy_type) {
> +	case B43_PHYTYPE_A:
> +		return "A";
[]
> +	}
> +
> +	b43err(dev->wl, "Unknown PHY Type: %d\n", phy_type);
> +	return "UNKNOWN";

In general, it's a bad idea to emit error messages
in a generic call like this.

> @@ -4337,13 +4368,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
>  		unsupported = 1;
>  	}
>  	if (unsupported) {
> -		b43err(dev->wl, "FOUND UNSUPPORTED PHY "
> -		       "(Analog %u, Type %u, Revision %u)\n",
> -		       analog_type, phy_type, phy_rev);
> +		b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %s, Revision %u)\n",
> +		       analog_type, b43_phy_name(dev, phy_type), phy_rev);

The extra message doesn't add much useful info
and can also cause errors in continued messages.




From zajec5 at gmail.com  Wed Jul 25 10:58:38 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Wed, 25 Jul 2012 16:58:38 +0200
Subject: [PATCH] b43: rename host flags defines
Message-ID: <1343228318-15445-1-git-send-email-zajec5@gmail.com>

There are more than 3 registers on new hardware. Host flags handling has
to be rewritten, as we can't use u128 type to handle all 5 regs.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 drivers/net/wireless/b43/b43.h        |    8 +++++---
 drivers/net/wireless/b43/main.c       |   12 ++++++------
 drivers/net/wireless/b43/phy_common.c |    2 +-
 3 files changed, 12 insertions(+), 10 deletions(-)

diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index b0c7f47..b298e5d 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -241,16 +241,18 @@ enum {
 #define B43_SHM_SH_PHYVER		0x0050	/* PHY version */
 #define B43_SHM_SH_PHYTYPE		0x0052	/* PHY type */
 #define B43_SHM_SH_ANTSWAP		0x005C	/* Antenna swap threshold */
-#define B43_SHM_SH_HOSTFLO		0x005E	/* Hostflags for ucode options (low) */
-#define B43_SHM_SH_HOSTFMI		0x0060	/* Hostflags for ucode options (middle) */
-#define B43_SHM_SH_HOSTFHI		0x0062	/* Hostflags for ucode options (high) */
+#define B43_SHM_SH_HOSTF1		0x005E	/* Hostflags 1 for ucode options */
+#define B43_SHM_SH_HOSTF2		0x0060	/* Hostflags 2 for ucode options */
+#define B43_SHM_SH_HOSTF3		0x0062	/* Hostflags 3 for ucode options */
 #define B43_SHM_SH_RFATT		0x0064	/* Current radio attenuation value */
 #define B43_SHM_SH_RADAR		0x0066	/* Radar register */
 #define B43_SHM_SH_PHYTXNOI		0x006E	/* PHY noise directly after TX (lower 8bit only) */
 #define B43_SHM_SH_RFRXSP1		0x0072	/* RF RX SP Register 1 */
+#define B43_SHM_SH_HOSTF4		0x0078	/* Hostflags 4 for ucode options */
 #define B43_SHM_SH_CHAN			0x00A0	/* Current channel (low 8bit only) */
 #define  B43_SHM_SH_CHAN_5GHZ		0x0100	/* Bit set, if 5 Ghz channel */
 #define  B43_SHM_SH_CHAN_40MHZ		0x0200	/* Bit set, if 40 Mhz channel width */
+#define B43_SHM_SH_HOSTF5		0x00D4	/* Hostflags 5 for ucode options */
 #define B43_SHM_SH_BCMCFIFOID		0x0108	/* Last posted cookie to the bcast/mcast FIFO */
 /* TSSI information */
 #define B43_SHM_SH_TSSI_CCK		0x0058	/* TSSI for last 4 CCK frames (32bit) */
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index 9b0ce6b..977ac5b 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -533,11 +533,11 @@ u64 b43_hf_read(struct b43_wldev *dev)
 {
 	u64 ret;
 
-	ret = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFHI);
+	ret = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF3);
 	ret <<= 16;
-	ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFMI);
+	ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF2);
 	ret <<= 16;
-	ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFLO);
+	ret |= b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF1);
 
 	return ret;
 }
@@ -550,9 +550,9 @@ void b43_hf_write(struct b43_wldev *dev, u64 value)
 	lo = (value & 0x00000000FFFFULL);
 	mi = (value & 0x0000FFFF0000ULL) >> 16;
 	hi = (value & 0xFFFF00000000ULL) >> 32;
-	b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFLO, lo);
-	b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFMI, mi);
-	b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFHI, hi);
+	b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF1, lo);
+	b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF2, mi);
+	b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF3, hi);
 }
 
 /* Read the firmware capabilities bitmask (Opensource firmware only) */
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index 3f8883b..f627cef 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -428,7 +428,7 @@ int b43_phy_shm_tssi_read(struct b43_wldev *dev, u16 shm_offset)
 	average = (a + b + c + d + 2) / 4;
 	if (is_ofdm) {
 		/* Adjust for CCK-boost */
-		if (b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTFLO)
+		if (b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_HOSTF1)
 		    & B43_HF_CCKBOOST)
 			average = (average >= 13) ? (average - 13) : 0;
 	}
-- 
1.7.7



From zajec5 at gmail.com  Wed Jul 25 10:22:11 2012
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Wed, 25 Jul 2012 16:22:11 +0200
Subject: [PATCH V2] b43: be more user friendly with PHY info
In-Reply-To: <1343225435.1693.10.camel@joe2Laptop>
References: <1343227629-14161-1-git-send-email-zajec5@gmail.com>
 <1343225435.1693.10.camel@joe2Laptop>
Message-ID: <CACna6rwDo=oW42mEwHXT0M5c56tWWtBqqb+Wv+L0iKzSasux8A@mail.gmail.com>

2012/7/25 Joe Perches <joe at perches.com>:
> On Wed, 2012-07-25 at 16:47 +0200, Rafa? Mi?ecki wrote:
>> use PHY names instead of magic numbers.
> []
>> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> []
>> @@ -4277,6 +4277,37 @@ out:
> []
>> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
>> +{
>> +     switch (phy_type) {
>> +     case B43_PHYTYPE_A:
>> +             return "A";
> []
>> +     }
>> +
>> +     b43err(dev->wl, "Unknown PHY Type: %d\n", phy_type);
>> +     return "UNKNOWN";
>
> In general, it's a bad idea to emit error messages
> in a generic call like this.

This function is not supposed to be called anywhere else, it's only
for a single user-friendly message.


>> @@ -4337,13 +4368,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
>>               unsupported = 1;
>>       }
>>       if (unsupported) {
>> -             b43err(dev->wl, "FOUND UNSUPPORTED PHY "
>> -                    "(Analog %u, Type %u, Revision %u)\n",
>> -                    analog_type, phy_type, phy_rev);
>> +             b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %s, Revision %u)\n",
>> +                    analog_type, b43_phy_name(dev, phy_type), phy_rev);
>
> The extra message doesn't add much useful info
> and can also cause errors in continued messages.

By "extra message" do you mean the one from b43_phy_name? I wanted to
print PHY type as digit somewhere (in case it is not recognized). I
can't use simple
return ("UNKNOWN %d", phy_type);
, such a solution would require allocating memory for string and
freeing it. It would complicate the function.

Do you have any suggestion for better handling this?

-- 
Rafa?


From joe at perches.com  Wed Jul 25 11:48:45 2012
From: joe at perches.com (Joe Perches)
Date: Wed, 25 Jul 2012 08:48:45 -0700
Subject: [PATCH V2] b43: be more user friendly with PHY info
In-Reply-To: <CACna6rwDo=oW42mEwHXT0M5c56tWWtBqqb+Wv+L0iKzSasux8A@mail.gmail.com>
References: <1343227629-14161-1-git-send-email-zajec5@gmail.com>
 <1343225435.1693.10.camel@joe2Laptop>
 <CACna6rwDo=oW42mEwHXT0M5c56tWWtBqqb+Wv+L0iKzSasux8A@mail.gmail.com>
Message-ID: <1343231325.1693.13.camel@joe2Laptop>

On Wed, 2012-07-25 at 16:22 +0200, Rafa? Mi?ecki wrote:
> 2012/7/25 Joe Perches <joe at perches.com>:
> > On Wed, 2012-07-25 at 16:47 +0200, Rafa? Mi?ecki wrote:
> >> use PHY names instead of magic numbers.
> > []
> >> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> > []
> >> @@ -4277,6 +4277,37 @@ out:
> > []
> >> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
> >> +{
> >> +     switch (phy_type) {
> >> +     case B43_PHYTYPE_A:
> >> +             return "A";
> > []
> >> +     }
> >> +
> >> +     b43err(dev->wl, "Unknown PHY Type: %d\n", phy_type);
> >> +     return "UNKNOWN";
> >
> > In general, it's a bad idea to emit error messages
> > in a generic call like this.
> 
> This function is not supposed to be called anywhere else, it's only
> for a single user-friendly message.
> 
> 
> >> @@ -4337,13 +4368,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
> >>               unsupported = 1;
> >>       }
> >>       if (unsupported) {
> >> -             b43err(dev->wl, "FOUND UNSUPPORTED PHY "
> >> -                    "(Analog %u, Type %u, Revision %u)\n",
> >> -                    analog_type, phy_type, phy_rev);
> >> +             b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %s, Revision %u)\n",
> >> +                    analog_type, b43_phy_name(dev, phy_type), phy_rev);
> >
> > The extra message doesn't add much useful info
> > and can also cause errors in continued messages.
> 
> By "extra message" do you mean the one from b43_phy_name? I wanted to
> print PHY type as digit somewhere (in case it is not recognized). I
> can't use simple
> return ("UNKNOWN %d", phy_type);
> , such a solution would require allocating memory for string and
> freeing it. It would complicate the function.
> 
> Do you have any suggestion for better handling this?
> 

Change the UNSUPPORTED PHY message to

	"...Type: %d:(%s)...",
	..., phy_type, b43_phy_name(dev, phy_type), ...




From zajec5 at gmail.com  Wed Jul 25 11:55:37 2012
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Wed, 25 Jul 2012 17:55:37 +0200
Subject: [PATCH V2] b43: be more user friendly with PHY info
In-Reply-To: <1343231325.1693.13.camel@joe2Laptop>
References: <1343227629-14161-1-git-send-email-zajec5@gmail.com>
 <1343225435.1693.10.camel@joe2Laptop>
 <CACna6rwDo=oW42mEwHXT0M5c56tWWtBqqb+Wv+L0iKzSasux8A@mail.gmail.com>
 <1343231325.1693.13.camel@joe2Laptop>
Message-ID: <CACna6rzaRpk0ScqfzX4j8p7kJcRGhWtunuycMvmhaimmaiVN3w@mail.gmail.com>

2012/7/25 Joe Perches <joe at perches.com>:
> On Wed, 2012-07-25 at 16:22 +0200, Rafa? Mi?ecki wrote:
>> 2012/7/25 Joe Perches <joe at perches.com>:
>> > On Wed, 2012-07-25 at 16:47 +0200, Rafa? Mi?ecki wrote:
>> >> use PHY names instead of magic numbers.
>> > []
>> >> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
>> > []
>> >> @@ -4277,6 +4277,37 @@ out:
>> > []
>> >> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
>> >> +{
>> >> +     switch (phy_type) {
>> >> +     case B43_PHYTYPE_A:
>> >> +             return "A";
>> > []
>> >> +     }
>> >> +
>> >> +     b43err(dev->wl, "Unknown PHY Type: %d\n", phy_type);
>> >> +     return "UNKNOWN";
>> >
>> > In general, it's a bad idea to emit error messages
>> > in a generic call like this.
>>
>> This function is not supposed to be called anywhere else, it's only
>> for a single user-friendly message.
>>
>>
>> >> @@ -4337,13 +4368,12 @@ static int b43_phy_versioning(struct b43_wldev *dev)
>> >>               unsupported = 1;
>> >>       }
>> >>       if (unsupported) {
>> >> -             b43err(dev->wl, "FOUND UNSUPPORTED PHY "
>> >> -                    "(Analog %u, Type %u, Revision %u)\n",
>> >> -                    analog_type, phy_type, phy_rev);
>> >> +             b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %s, Revision %u)\n",
>> >> +                    analog_type, b43_phy_name(dev, phy_type), phy_rev);
>> >
>> > The extra message doesn't add much useful info
>> > and can also cause errors in continued messages.
>>
>> By "extra message" do you mean the one from b43_phy_name? I wanted to
>> print PHY type as digit somewhere (in case it is not recognized). I
>> can't use simple
>> return ("UNKNOWN %d", phy_type);
>> , such a solution would require allocating memory for string and
>> freeing it. It would complicate the function.
>>
>> Do you have any suggestion for better handling this?
>>
>
> Change the UNSUPPORTED PHY message to
>
>         "...Type: %d:(%s)...",
>         ..., phy_type, b43_phy_name(dev, phy_type), ...

I think it should be fine :)

-- 
Rafa?


From coelho at ti.com  Wed Jul 25 15:25:02 2012
From: coelho at ti.com (Luciano Coelho)
Date: Wed, 25 Jul 2012 22:25:02 +0300
Subject: [PATCH v5] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <500FEDDD.206@net.t-labs.tu-berlin.de>
References: <1343161108-6941-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120724_221843_511093_701FFAF2)
 <1343208990.4463.25.camel@jlt3.sipsolutions.net>
 (sfid-20120725_113644_599580_8AC4476F)
 <1343220625.4463.31.camel@jlt3.sipsolutions.net>
 <500FEDDD.206@net.t-labs.tu-berlin.de>
Message-ID: <1343244302.3750.44.camel@cumari.coelho.fi>

On Wed, 2012-07-25 at 15:00 +0200, Thomas Huehn wrote:
> Hi Johannes,

Hi guys,


> Johannes Berg schrieb:
> >> Finally applied, but I dropped these spurious changes:
> > Never mind, it still doesn't compile, dropped it.
> >
> > I had to rebase my tree due to that, sorry!
> >
> 
> My last PATCH included some changes at a TI driver which was adapted in
> wireless-testing in John's tree. As I touch that many drivers I would
> like to use your tree instead, to provide a proper PATCH that builds at
> your tree state...small de-synchronization issues just make it fail.

Since Johannes has already more or less acked this patch, wouldn't it be
easier to integrate via John's tree? I think it would make syncing with
mac80211 and all the drivers easier.

Just my 2 cents.

--
Luca.



From zajec5 at gmail.com  Wed Jul 25 18:07:37 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 26 Jul 2012 00:07:37 +0200
Subject: [PATCH 1/3] b43: add helper waiting for given value in radio reg
Message-ID: <1343254059-4788-1-git-send-email-zajec5@gmail.com>

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 drivers/net/wireless/b43/phy_common.c |   15 +++++++++++++++
 drivers/net/wireless/b43/phy_common.h |    6 ++++++
 drivers/net/wireless/b43/phy_n.c      |   12 +-----------
 3 files changed, 22 insertions(+), 11 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index f627cef..f01676a 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -240,6 +240,21 @@ void b43_radio_maskset(struct b43_wldev *dev, u16 offset, u16 mask, u16 set)
 			  (b43_radio_read16(dev, offset) & mask) | set);
 }
 
+bool b43_radio_wait_value(struct b43_wldev *dev, u16 offset, u16 mask,
+			  u16 value, int delay, int timeout)
+{
+	u16 val;
+	int i;
+
+	for (i = 0; i < timeout; i += delay) {
+		val = b43_radio_read(dev, offset);
+		if ((val & mask) == value)
+			return true;
+		udelay(delay);
+	}
+	return false;
+}
+
 u16 b43_phy_read(struct b43_wldev *dev, u16 reg)
 {
 	assert_mac_suspended(dev);
diff --git a/drivers/net/wireless/b43/phy_common.h b/drivers/net/wireless/b43/phy_common.h
index 9233b13..f1b9993 100644
--- a/drivers/net/wireless/b43/phy_common.h
+++ b/drivers/net/wireless/b43/phy_common.h
@@ -365,6 +365,12 @@ void b43_radio_set(struct b43_wldev *dev, u16 offset, u16 set);
 void b43_radio_maskset(struct b43_wldev *dev, u16 offset, u16 mask, u16 set);
 
 /**
+ * b43_radio_wait_value - Waits for a given value in masked register read
+ */
+bool b43_radio_wait_value(struct b43_wldev *dev, u16 offset, u16 mask,
+			  u16 value, int delay, int timeout);
+
+/**
  * b43_radio_lock - Lock firmware radio register access
  */
 void b43_radio_lock(struct b43_wldev *dev);
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index e49d847..0963d59 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -753,8 +753,6 @@ static void b43_radio_init2055_post(struct b43_wldev *dev)
 {
 	struct b43_phy_n *nphy = dev->phy.n;
 	struct ssb_sprom *sprom = dev->dev->bus_sprom;
-	int i;
-	u16 val;
 	bool workaround = false;
 
 	if (sprom->revision < 4)
@@ -777,15 +775,7 @@ static void b43_radio_init2055_post(struct b43_wldev *dev)
 	b43_radio_set(dev, B2055_CAL_MISC, 0x1);
 	msleep(1);
 	b43_radio_set(dev, B2055_CAL_MISC, 0x40);
-	for (i = 0; i < 200; i++) {
-		val = b43_radio_read(dev, B2055_CAL_COUT2);
-		if (val & 0x80) {
-			i = 0;
-			break;
-		}
-		udelay(10);
-	}
-	if (i)
+	if (!b43_radio_wait_value(dev, B2055_CAL_COUT2, 0x80, 0x80, 10, 2000))
 		b43err(dev->wl, "radio post init timeout\n");
 	b43_radio_mask(dev, B2055_CAL_LPOCTL, 0xFF7F);
 	b43_switch_channel(dev, dev->phy.channel);
-- 
1.7.7



From zajec5 at gmail.com  Wed Jul 25 18:07:38 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 26 Jul 2012 00:07:38 +0200
Subject: [PATCH 2/3] b43: N-PHY: finish 0x2056 radio setup
In-Reply-To: <1343254059-4788-1-git-send-email-zajec5@gmail.com>
References: <1343254059-4788-1-git-send-email-zajec5@gmail.com>
Message-ID: <1343254059-4788-2-git-send-email-zajec5@gmail.com>

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 drivers/net/wireless/b43/phy_n.c |   95 +++++++++++++++++++++++++++++++++++--
 drivers/net/wireless/b43/phy_n.h |    1 +
 2 files changed, 90 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 0963d59..0e75c35 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -545,7 +545,9 @@ static void b43_radio_2056_setup(struct b43_wldev *dev,
 	enum ieee80211_band band = b43_current_band(dev->wl);
 	u16 offset;
 	u8 i;
-	u16 bias, cbias, pag_boost, pgag_boost, mixg_boost, padg_boost;
+	u16 bias, cbias;
+	u16 pag_boost, padg_boost, pgag_boost, mixg_boost;
+	u16 paa_boost, pada_boost, pgaa_boost, mixa_boost;
 
 	B43_WARN_ON(dev->phy.rev < 3);
 
@@ -630,7 +632,56 @@ static void b43_radio_2056_setup(struct b43_wldev *dev,
 			b43_radio_write(dev, offset | B2056_TX_PA_SPARE1, 0xee);
 		}
 	} else if (dev->phy.n->ipa5g_on && band == IEEE80211_BAND_5GHZ) {
-		/* TODO */
+		u16 freq = dev->phy.channel_freq;
+		if (freq < 5100) {
+			paa_boost = 0xA;
+			pada_boost = 0x77;
+			pgaa_boost = 0xF;
+			mixa_boost = 0xF;
+		} else if (freq < 5340) {
+			paa_boost = 0x8;
+			pada_boost = 0x77;
+			pgaa_boost = 0xFB;
+			mixa_boost = 0xF;
+		} else if (freq < 5650) {
+			paa_boost = 0x0;
+			pada_boost = 0x77;
+			pgaa_boost = 0xB;
+			mixa_boost = 0xF;
+		} else {
+			paa_boost = 0x0;
+			pada_boost = 0x77;
+			if (freq != 5825)
+				pgaa_boost = -(freq - 18) / 36 + 168;
+			else
+				pgaa_boost = 6;
+			mixa_boost = 0xF;
+		}
+
+		for (i = 0; i < 2; i++) {
+			offset = i ? B2056_TX1 : B2056_TX0;
+
+			b43_radio_write(dev,
+				offset | B2056_TX_INTPAA_BOOST_TUNE, paa_boost);
+			b43_radio_write(dev,
+				offset | B2056_TX_PADA_BOOST_TUNE, pada_boost);
+			b43_radio_write(dev,
+				offset | B2056_TX_PGAA_BOOST_TUNE, pgaa_boost);
+			b43_radio_write(dev,
+				offset | B2056_TX_MIXA_BOOST_TUNE, mixa_boost);
+			b43_radio_write(dev,
+				offset | B2056_TX_TXSPARE1, 0x30);
+			b43_radio_write(dev,
+				offset | B2056_TX_PA_SPARE2, 0xee);
+			b43_radio_write(dev,
+				offset | B2056_TX_PADA_CASCBIAS, 0x03);
+			b43_radio_write(dev,
+				offset | B2056_TX_INTPAA_IAUX_STAT, 0x50);
+			b43_radio_write(dev,
+				offset | B2056_TX_INTPAA_IMAIN_STAT, 0x50);
+			b43_radio_write(dev,
+				offset | B2056_TX_INTPAA_CASCBIAS, 0x30);
+		}
 	}
 
 	udelay(50);
@@ -643,6 +694,37 @@ static void b43_radio_2056_setup(struct b43_wldev *dev,
 	udelay(300);
 }
 
+static u8 b43_radio_2056_rcal(struct b43_wldev *dev)
+{
+	struct b43_phy *phy = &dev->phy;
+	u16 mast2, tmp;
+
+	if (phy->rev != 3)
+		return 0;
+
+	mast2 = b43_radio_read(dev, B2056_SYN_PLL_MAST2);
+	b43_radio_write(dev, B2056_SYN_PLL_MAST2, mast2 | 0x7);
+
+	udelay(10);
+	b43_radio_write(dev, B2056_SYN_RCAL_MASTER, 0x01);
+	udelay(10);
+	b43_radio_write(dev, B2056_SYN_RCAL_MASTER, 0x09);
+
+	if (!b43_radio_wait_value(dev, B2056_SYN_RCAL_CODE_OUT, 0x80, 0x80, 100,
+				  1000000)) {
+		b43err(dev->wl, "Radio recalibration timeout\n");
+		return 0;
+	}
+
+	b43_radio_write(dev, B2056_SYN_RCAL_MASTER, 0x01);
+	tmp = b43_radio_read(dev, B2056_SYN_RCAL_CODE_OUT);
+	b43_radio_write(dev, B2056_SYN_RCAL_MASTER, 0x00);
+
+	b43_radio_write(dev, B2056_SYN_PLL_MAST2, mast2);
+
+	return tmp & 0x1f;
+}
+
 static void b43_radio_init2056_pre(struct b43_wldev *dev)
 {
 	b43_phy_mask(dev, B43_NPHY_RFCTL_CMD,
@@ -665,10 +747,8 @@ static void b43_radio_init2056_post(struct b43_wldev *dev)
 	b43_radio_mask(dev, B2056_SYN_COM_RESET, ~0x2);
 	b43_radio_mask(dev, B2056_SYN_PLL_MAST2, ~0xFC);
 	b43_radio_mask(dev, B2056_SYN_RCCAL_CTRL0, ~0x1);
-	/*
-	if (nphy->init_por)
-		Call Radio 2056 Recalibrate
-	*/
+	if (dev->phy.n->init_por)
+		b43_radio_2056_rcal(dev);
 }
 
 /*
@@ -680,6 +760,8 @@ static void b43_radio_init2056(struct b43_wldev *dev)
 	b43_radio_init2056_pre(dev);
 	b2056_upload_inittabs(dev, 0, 0);
 	b43_radio_init2056_post(dev);
+
+	dev->phy.n->init_por = false;
 }
 
 /**************************************************
@@ -5089,6 +5171,7 @@ static void b43_nphy_op_prepare_structs(struct b43_wldev *dev)
 	nphy->hang_avoid = (phy->rev == 3 || phy->rev == 4);
 	nphy->spur_avoid = (phy->rev >= 3) ?
 				B43_SPUR_AVOID_AUTO : B43_SPUR_AVOID_DISABLE;
+	nphy->init_por = true;
 	nphy->gain_boost = true; /* this way we follow wl, assume it is true */
 	nphy->txrx_chain = 2; /* sth different than 0 and 1 for now */
 	nphy->phyrxchain = 3; /* to avoid b43_nphy_set_rx_core_state like wl */
diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h
index fd12b38..092c014 100644
--- a/drivers/net/wireless/b43/phy_n.h
+++ b/drivers/net/wireless/b43/phy_n.h
@@ -785,6 +785,7 @@ struct b43_phy_n {
 	u16 papd_epsilon_offset[2];
 	s32 preamble_override;
 	u32 bb_mult_save;
+	bool init_por;
 
 	bool gain_boost;
 	bool elna_gain_config;
-- 
1.7.7



From zajec5 at gmail.com  Wed Jul 25 18:07:39 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 26 Jul 2012 00:07:39 +0200
Subject: [PATCH 3/3] b43: N-PHY: init 0x2057 radio
In-Reply-To: <1343254059-4788-1-git-send-email-zajec5@gmail.com>
References: <1343254059-4788-1-git-send-email-zajec5@gmail.com>
Message-ID: <1343254059-4788-3-git-send-email-zajec5@gmail.com>

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
 drivers/net/wireless/b43/Makefile     |    1 +
 drivers/net/wireless/b43/phy_n.c      |  142 +++++++++++-
 drivers/net/wireless/b43/radio_2057.c |  141 +++++++++++
 drivers/net/wireless/b43/radio_2057.h |  430 +++++++++++++++++++++++++++++++++
 4 files changed, 712 insertions(+), 2 deletions(-)
 create mode 100644 drivers/net/wireless/b43/radio_2057.c
 create mode 100644 drivers/net/wireless/b43/radio_2057.h

diff --git a/drivers/net/wireless/b43/Makefile b/drivers/net/wireless/b43/Makefile
index 4648bbf..098fe9e 100644
--- a/drivers/net/wireless/b43/Makefile
+++ b/drivers/net/wireless/b43/Makefile
@@ -4,6 +4,7 @@ b43-y				+= tables.o
 b43-$(CONFIG_B43_PHY_N)		+= tables_nphy.o
 b43-$(CONFIG_B43_PHY_N)		+= radio_2055.o
 b43-$(CONFIG_B43_PHY_N)		+= radio_2056.o
+b43-$(CONFIG_B43_PHY_N)		+= radio_2057.o
 b43-y				+= phy_common.o
 b43-y				+= phy_g.o
 b43-y				+= phy_a.o
diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 0e75c35..113d5ca 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -32,6 +32,7 @@
 #include "tables_nphy.h"
 #include "radio_2055.h"
 #include "radio_2056.h"
+#include "radio_2057.h"
 #include "main.h"
 
 struct nphy_txgains {
@@ -459,6 +460,136 @@ static void b43_nphy_set_rf_sequence(struct b43_wldev *dev, u8 cmd,
 }
 
 /**************************************************
+ * Radio 0x2057
+ **************************************************/
+
+/* http://bcm-v4.sipsolutions.net/PHY/radio2057_rcal */
+static u8 b43_radio_2057_rcal(struct b43_wldev *dev)
+{
+	struct b43_phy *phy = &dev->phy;
+	u16 tmp;
+
+	if (phy->radio_rev == 5) {
+		b43_phy_mask(dev, 0x342, ~0x2);
+		udelay(10);
+		b43_radio_set(dev, R2057_IQTEST_SEL_PU, 0x1);
+		b43_radio_maskset(dev, 0x1ca, ~0x2, 0x1);
+	}
+
+	b43_radio_set(dev, R2057_RCAL_CONFIG, 0x1);
+	udelay(10);
+	b43_radio_set(dev, R2057_RCAL_CONFIG, 0x3);
+	if (!b43_radio_wait_value(dev, R2057_RCCAL_N1_1, 1, 1, 100, 1000000)) {
+		b43err(dev->wl, "Radio 0x2057 rcal timeout\n");
+		return 0;
+	}
+	b43_radio_mask(dev, R2057_RCAL_CONFIG, ~0x2);
+	tmp = b43_radio_read(dev, R2057_RCAL_STATUS) & 0x3E;
+	b43_radio_mask(dev, R2057_RCAL_CONFIG, ~0x1);
+
+	if (phy->radio_rev == 5) {
+		b43_radio_mask(dev, R2057_IPA2G_CASCONV_CORE0, ~0x1);
+		b43_radio_mask(dev, 0x1ca, ~0x2);
+	}
+	if (phy->radio_rev <= 4 || phy->radio_rev == 6) {
+		b43_radio_maskset(dev, R2057_TEMPSENSE_CONFIG, ~0x3C, tmp);
+		b43_radio_maskset(dev, R2057_BANDGAP_RCAL_TRIM, ~0xF0,
+				  tmp << 2);
+	}
+
+	return tmp & 0x3e;
+}
+
+/* http://bcm-v4.sipsolutions.net/PHY/radio2057_rccal */
+static u16 b43_radio_2057_rccal(struct b43_wldev *dev)
+{
+	struct b43_phy *phy = &dev->phy;
+	bool special = (phy->radio_rev == 3 || phy->radio_rev == 4 ||
+			phy->radio_rev == 6);
+	u16 tmp;
+
+	if (special) {
+		b43_radio_write(dev, R2057_RCCAL_MASTER, 0x61);
+		b43_radio_write(dev, R2057_RCCAL_TRC0, 0xC0);
+	} else {
+		b43_radio_write(dev, 0x1AE, 0x61);
+		b43_radio_write(dev, R2057_RCCAL_TRC0, 0xE1);
+	}
+	b43_radio_write(dev, R2057_RCCAL_X1, 0x6E);
+	b43_radio_write(dev, R2057_RCCAL_START_R1_Q1_P1, 0x55);
+	if (!b43_radio_wait_value(dev, R2057_RCCAL_DONE_OSCCAP, 1, 1, 500,
+				  5000000))
+		b43dbg(dev->wl, "Radio 0x2057 rccal timeout\n");
+	b43_radio_write(dev, R2057_RCCAL_START_R1_Q1_P1, 0x15);
+	if (special) {
+		b43_radio_write(dev, R2057_RCCAL_MASTER, 0x69);
+		b43_radio_write(dev, R2057_RCCAL_TRC0, 0xB0);
+	} else {
+		b43_radio_write(dev, 0x1AE, 0x69);
+		b43_radio_write(dev, R2057_RCCAL_TRC0, 0xD5);
+	}
+	b43_radio_write(dev, R2057_RCCAL_X1, 0x6E);
+	b43_radio_write(dev, R2057_RCCAL_START_R1_Q1_P1, 0x55);
+	if (!b43_radio_wait_value(dev, R2057_RCCAL_DONE_OSCCAP, 1, 1, 500,
+				  5000000))
+	b43_radio_write(dev, R2057_RCCAL_START_R1_Q1_P1, 0x15);
+	if (special) {
+		b43_radio_write(dev, R2057_RCCAL_MASTER, 0x73);
+		b43_radio_write(dev, R2057_RCCAL_X1, 0x28);
+		b43_radio_write(dev, R2057_RCCAL_TRC0, 0xB0);
+	} else {
+		b43_radio_write(dev, 0x1AE, 0x73);
+		b43_radio_write(dev, R2057_RCCAL_X1, 0x6E);
+		b43_radio_write(dev, R2057_RCCAL_TRC0, 0x99);
+	}
+	b43_radio_write(dev, R2057_RCCAL_START_R1_Q1_P1, 0x55);
+	if (!b43_radio_wait_value(dev, R2057_RCCAL_DONE_OSCCAP, 1, 1, 500,
+				  5000000)) {
+		b43err(dev->wl, "Radio 0x2057 rcal timeout\n");
+		return 0;
+	}
+	tmp = b43_radio_read(dev, R2057_RCCAL_DONE_OSCCAP);
+	b43_radio_write(dev, R2057_RCCAL_START_R1_Q1_P1, 0x15);
+	return tmp;
+}
+
+static void b43_radio_2057_init_pre(struct b43_wldev *dev)
+{
+	b43_phy_mask(dev, B43_NPHY_RFCTL_CMD, ~B43_NPHY_RFCTL_CMD_CHIP0PU);
+	/* Maybe wl meant to reset and set (order?) RFCTL_CMD_OEPORFORCE? */
+	b43_phy_mask(dev, B43_NPHY_RFCTL_CMD, B43_NPHY_RFCTL_CMD_OEPORFORCE);
+	b43_phy_set(dev, B43_NPHY_RFCTL_CMD, ~B43_NPHY_RFCTL_CMD_OEPORFORCE);
+	b43_phy_set(dev, B43_NPHY_RFCTL_CMD, B43_NPHY_RFCTL_CMD_CHIP0PU);
+}
+
+static void b43_radio_2057_init_post(struct b43_wldev *dev)
+{
+	b43_radio_set(dev, R2057_XTALPUOVR_PINCTRL, 0x1);
+
+	b43_radio_set(dev, R2057_RFPLL_MISC_CAL_RESETN, 0x78);
+	b43_radio_set(dev, R2057_XTAL_CONFIG2, 0x80);
+	mdelay(2);
+	b43_radio_mask(dev, R2057_RFPLL_MISC_CAL_RESETN, ~0x78);
+	b43_radio_mask(dev, R2057_XTAL_CONFIG2, ~0x80);
+
+	if (dev->phy.n->init_por) {
+		b43_radio_2057_rcal(dev);
+		b43_radio_2057_rccal(dev);
+	}
+	b43_radio_mask(dev, R2057_RFPLL_MASTER, ~0x8);
+
+	dev->phy.n->init_por = false;
+}
+
+/* http://bcm-v4.sipsolutions.net/802.11/Radio/2057/Init */
+static void b43_radio_2057_init(struct b43_wldev *dev)
+{
+	b43_radio_2057_init_pre(dev);
+	r2057_upload_inittabs(dev);
+	b43_radio_2057_init_post(dev);
+}
+
+/**************************************************
  * Radio 0x2056
  **************************************************/
 
@@ -5212,6 +5343,8 @@ static void b43_nphy_op_prepare_structs(struct b43_wldev *dev)
 		nphy->ipa2g_on = sprom->fem.ghz2.extpa_gain == 2;
 		nphy->ipa5g_on = sprom->fem.ghz5.extpa_gain == 2;
 	}
+
+	nphy->init_por = true;
 }
 
 static void b43_nphy_op_free(struct b43_wldev *dev)
@@ -5298,7 +5431,9 @@ static void b43_nphy_op_software_rfkill(struct b43_wldev *dev,
 	if (blocked) {
 		b43_phy_mask(dev, B43_NPHY_RFCTL_CMD,
 				~B43_NPHY_RFCTL_CMD_CHIP0PU);
-		if (dev->phy.rev >= 3) {
+		if (dev->phy.rev >= 7) {
+			/* TODO */
+		} else if (dev->phy.rev >= 3) {
 			b43_radio_mask(dev, 0x09, ~0x2);
 
 			b43_radio_write(dev, 0x204D, 0);
@@ -5316,7 +5451,10 @@ static void b43_nphy_op_software_rfkill(struct b43_wldev *dev,
 			b43_radio_write(dev, 0x3064, 0);
 		}
 	} else {
-		if (dev->phy.rev >= 3) {
+		if (dev->phy.rev >= 7) {
+			b43_radio_2057_init(dev);
+			b43_switch_channel(dev, dev->phy.channel);
+		} else if (dev->phy.rev >= 3) {
 			b43_radio_init2056(dev);
 			b43_switch_channel(dev, dev->phy.channel);
 		} else {
diff --git a/drivers/net/wireless/b43/radio_2057.c b/drivers/net/wireless/b43/radio_2057.c
new file mode 100644
index 0000000..d61d683
--- /dev/null
+++ b/drivers/net/wireless/b43/radio_2057.c
@@ -0,0 +1,141 @@
+/*
+
+  Broadcom B43 wireless driver
+  IEEE 802.11n 2057 radio device data tables
+
+  Copyright (c) 2010 Rafa? Mi?ecki <zajec5 at gmail.com>
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License
+  along with this program; see the file COPYING.  If not, write to
+  the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
+  Boston, MA 02110-1301, USA.
+
+*/
+
+#include "b43.h"
+#include "radio_2057.h"
+#include "phy_common.h"
+
+static u16 r2057_rev4_init[42][2] = {
+	{ 0x0E, 0x20 }, { 0x31, 0x00 }, { 0x32, 0x00 }, { 0x33, 0x00 },
+	{ 0x35, 0x26 }, { 0x3C, 0xff }, { 0x3D, 0xff }, { 0x3E, 0xff },
+	{ 0x3F, 0xff }, { 0x62, 0x33 }, { 0x8A, 0xf0 }, { 0x8B, 0x10 },
+	{ 0x8C, 0xf0 }, { 0x91, 0x3f }, { 0x92, 0x36 }, { 0xA4, 0x8c },
+	{ 0xA8, 0x55 }, { 0xAF, 0x01 }, { 0x10F, 0xf0 }, { 0x110, 0x10 },
+	{ 0x111, 0xf0 }, { 0x116, 0x3f }, { 0x117, 0x36 }, { 0x129, 0x8c },
+	{ 0x12D, 0x55 }, { 0x134, 0x01 }, { 0x15E, 0x00 }, { 0x15F, 0x00 },
+	{ 0x160, 0x00 }, { 0x161, 0x00 }, { 0x162, 0x00 }, { 0x163, 0x00 },
+	{ 0x169, 0x02 }, { 0x16A, 0x00 }, { 0x16B, 0x00 }, { 0x16C, 0x00 },
+	{ 0x1A4, 0x00 }, { 0x1A5, 0x00 }, { 0x1A6, 0x00 }, { 0x1AA, 0x00 },
+	{ 0x1AB, 0x00 }, { 0x1AC, 0x00 },
+};
+
+static u16 r2057_rev5_init[44][2] = {
+	{ 0x00, 0x00 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x23, 0x6 },
+	{ 0x31, 0x00 }, { 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 },
+	{ 0x59, 0x88 }, { 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f },
+	{ 0x64, 0x0f }, { 0x81, 0x01 }, { 0x91, 0x3f }, { 0x92, 0x36 },
+	{ 0xA1, 0x20 }, { 0xD6, 0x70 }, { 0xDE, 0x88 }, { 0xE1, 0x20 },
+	{ 0xE8, 0x0f }, { 0xE9, 0x0f }, { 0x106, 0x01 }, { 0x116, 0x3f },
+	{ 0x117, 0x36 }, { 0x126, 0x20 }, { 0x15E, 0x00 }, { 0x15F, 0x00 },
+	{ 0x160, 0x00 }, { 0x161, 0x00 }, { 0x162, 0x00 }, { 0x163, 0x00 },
+	{ 0x16A, 0x00 }, { 0x16B, 0x00 }, { 0x16C, 0x00 }, { 0x1A4, 0x00 },
+	{ 0x1A5, 0x00 }, { 0x1A6, 0x00 }, { 0x1AA, 0x00 }, { 0x1AB, 0x00 },
+	{ 0x1AC, 0x00 }, { 0x1B7, 0x0c }, { 0x1C1, 0x01 }, { 0x1C2, 0x80 },
+};
+
+static u16 r2057_rev5a_init[45][2] = {
+	{ 0x00, 0x15 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x23, 0x6 },
+	{ 0x31, 0x00 }, { 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 },
+	{ 0x59, 0x88 }, { 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f },
+	{ 0x64, 0x0f }, { 0x81, 0x01 }, { 0x91, 0x3f }, { 0x92, 0x36 },
+	{ 0xC9, 0x01 }, { 0xD6, 0x70 }, { 0xDE, 0x88 }, { 0xE1, 0x20 },
+	{ 0xE8, 0x0f }, { 0xE9, 0x0f }, { 0x106, 0x01 }, { 0x116, 0x3f },
+	{ 0x117, 0x36 }, { 0x126, 0x20 }, { 0x14E, 0x01 }, { 0x15E, 0x00 },
+	{ 0x15F, 0x00 }, { 0x160, 0x00 }, { 0x161, 0x00 }, { 0x162, 0x00 },
+	{ 0x163, 0x00 }, { 0x16A, 0x00 }, { 0x16B, 0x00 }, { 0x16C, 0x00 },
+	{ 0x1A4, 0x00 }, { 0x1A5, 0x00 }, { 0x1A6, 0x00 }, { 0x1AA, 0x00 },
+	{ 0x1AB, 0x00 }, { 0x1AC, 0x00 }, { 0x1B7, 0x0c }, { 0x1C1, 0x01 },
+	{ 0x1C2, 0x80 },
+};
+
+static u16 r2057_rev7_init[54][2] = {
+	{ 0x00, 0x00 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x31, 0x00 },
+	{ 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 }, { 0x59, 0x88 },
+	{ 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f }, { 0x64, 0x13 },
+	{ 0x66, 0xee }, { 0x6E, 0x58 }, { 0x75, 0x13 }, { 0x7B, 0x13 },
+	{ 0x7C, 0x14 }, { 0x7D, 0xee }, { 0x81, 0x01 }, { 0x91, 0x3f },
+	{ 0x92, 0x36 }, { 0xA1, 0x20 }, { 0xD6, 0x70 }, { 0xDE, 0x88 },
+	{ 0xE1, 0x20 }, { 0xE8, 0x0f }, { 0xE9, 0x13 }, { 0xEB, 0xee },
+	{ 0xF3, 0x58 }, { 0xFA, 0x13 }, { 0x100, 0x13 }, { 0x101, 0x14 },
+	{ 0x102, 0xee }, { 0x106, 0x01 }, { 0x116, 0x3f }, { 0x117, 0x36 },
+	{ 0x126, 0x20 }, { 0x15E, 0x00 }, { 0x15F, 0x00 }, { 0x160, 0x00 },
+	{ 0x161, 0x00 }, { 0x162, 0x00 }, { 0x163, 0x00 }, { 0x16A, 0x00 },
+	{ 0x16B, 0x00 }, { 0x16C, 0x00 }, { 0x1A4, 0x00 }, { 0x1A5, 0x00 },
+	{ 0x1A6, 0x00 }, { 0x1AA, 0x00 }, { 0x1AB, 0x00 }, { 0x1AC, 0x00 },
+	{ 0x1B7, 0x05 }, { 0x1C2, 0xa0 },
+};
+
+static u16 r2057_rev8_init[54][2] = {
+	{ 0x00, 0x08 }, { 0x01, 0x57 }, { 0x02, 0x20 }, { 0x31, 0x00 },
+	{ 0x32, 0x00 }, { 0x33, 0x00 }, { 0x51, 0x70 }, { 0x59, 0x88 },
+	{ 0x5C, 0x20 }, { 0x62, 0x33 }, { 0x63, 0x0f }, { 0x64, 0x0f },
+	{ 0x6E, 0x58 }, { 0x75, 0x13 }, { 0x7B, 0x13 }, { 0x7C, 0x0f },
+	{ 0x7D, 0xee }, { 0x81, 0x01 }, { 0x91, 0x3f }, { 0x92, 0x36 },
+	{ 0xA1, 0x20 }, { 0xC9, 0x01 }, { 0xD6, 0x70 }, { 0xDE, 0x88 },
+	{ 0xE1, 0x20 }, { 0xE8, 0x0f }, { 0xE9, 0x0f }, { 0xF3, 0x58 },
+	{ 0xFA, 0x13 }, { 0x100, 0x13 }, { 0x101, 0x0f }, { 0x102, 0xee },
+	{ 0x106, 0x01 }, { 0x116, 0x3f }, { 0x117, 0x36 }, { 0x126, 0x20 },
+	{ 0x14E, 0x01 }, { 0x15E, 0x00 }, { 0x15F, 0x00 }, { 0x160, 0x00 },
+	{ 0x161, 0x00 }, { 0x162, 0x00 }, { 0x163, 0x00 }, { 0x16A, 0x00 },
+	{ 0x16B, 0x00 }, { 0x16C, 0x00 }, { 0x1A4, 0x00 }, { 0x1A5, 0x00 },
+	{ 0x1A6, 0x00 }, { 0x1AA, 0x00 }, { 0x1AB, 0x00 }, { 0x1AC, 0x00 },
+	{ 0x1B7, 0x05 }, { 0x1C2, 0xa0 },
+};
+
+void r2057_upload_inittabs(struct b43_wldev *dev)
+{
+	struct b43_phy *phy = &dev->phy;
+	u16 *table = NULL;
+	u16 size, i;
+
+	if (phy->rev == 7) {
+		table = r2057_rev4_init[0];
+		size = ARRAY_SIZE(r2057_rev4_init);
+	} else if (phy->rev == 8 || phy->rev == 9) {
+		if (phy->radio_rev == 5) {
+			if (phy->radio_rev == 8) {
+				table = r2057_rev5_init[0];
+				size = ARRAY_SIZE(r2057_rev5_init);
+			} else {
+				table = r2057_rev5a_init[0];
+				size = ARRAY_SIZE(r2057_rev5a_init);
+			}
+		} else if (phy->radio_rev == 7) {
+			table = r2057_rev7_init[0];
+			size = ARRAY_SIZE(r2057_rev7_init);
+		} else if (phy->radio_rev == 9) {
+			table = r2057_rev8_init[0];
+			size = ARRAY_SIZE(r2057_rev8_init);
+		}
+	}
+
+	if (table) {
+		for (i = 0; i < 10; i++) {
+			pr_info("radio_write 0x%X ", *table);
+			table++;
+			pr_info("0x%X\n", *table);
+			table++;
+		}
+	}
+}
diff --git a/drivers/net/wireless/b43/radio_2057.h b/drivers/net/wireless/b43/radio_2057.h
new file mode 100644
index 0000000..eeebd8f
--- /dev/null
+++ b/drivers/net/wireless/b43/radio_2057.h
@@ -0,0 +1,430 @@
+#ifndef B43_RADIO_2057_H_
+#define B43_RADIO_2057_H_
+
+#include <linux/types.h>
+
+#include "tables_nphy.h"
+
+#define R2057_DACBUF_VINCM_CORE0		0x000
+#define R2057_IDCODE				0x001
+#define R2057_RCCAL_MASTER			0x002
+#define R2057_RCCAL_CAP_SIZE			0x003
+#define R2057_RCAL_CONFIG			0x004
+#define R2057_GPAIO_CONFIG			0x005
+#define R2057_GPAIO_SEL1			0x006
+#define R2057_GPAIO_SEL0			0x007
+#define R2057_CLPO_CONFIG			0x008
+#define R2057_BANDGAP_CONFIG			0x009
+#define R2057_BANDGAP_RCAL_TRIM			0x00a
+#define R2057_AFEREG_CONFIG			0x00b
+#define R2057_TEMPSENSE_CONFIG			0x00c
+#define R2057_XTAL_CONFIG1			0x00d
+#define R2057_XTAL_ICORE_SIZE			0x00e
+#define R2057_XTAL_BUF_SIZE			0x00f
+#define R2057_XTAL_PULLCAP_SIZE			0x010
+#define R2057_RFPLL_MASTER			0x011
+#define R2057_VCOMONITOR_VTH_L			0x012
+#define R2057_VCOMONITOR_VTH_H			0x013
+#define R2057_VCOCAL_BIASRESET_RFPLLREG_VOUT	0x014
+#define R2057_VCO_VARCSIZE_IDAC			0x015
+#define R2057_VCOCAL_COUNTVAL0			0x016
+#define R2057_VCOCAL_COUNTVAL1			0x017
+#define R2057_VCOCAL_INTCLK_COUNT		0x018
+#define R2057_VCOCAL_MASTER			0x019
+#define R2057_VCOCAL_NUMCAPCHANGE		0x01a
+#define R2057_VCOCAL_WINSIZE			0x01b
+#define R2057_VCOCAL_DELAY_AFTER_REFRESH	0x01c
+#define R2057_VCOCAL_DELAY_AFTER_CLOSELOOP	0x01d
+#define R2057_VCOCAL_DELAY_AFTER_OPENLOOP	0x01e
+#define R2057_VCOCAL_DELAY_BEFORE_OPENLOOP	0x01f
+#define R2057_VCO_FORCECAPEN_FORCECAP1		0x020
+#define R2057_VCO_FORCECAP0			0x021
+#define R2057_RFPLL_REFMASTER_SPAREXTALSIZE	0x022
+#define R2057_RFPLL_PFD_RESET_PW		0x023
+#define R2057_RFPLL_LOOPFILTER_R2		0x024
+#define R2057_RFPLL_LOOPFILTER_R1		0x025
+#define R2057_RFPLL_LOOPFILTER_C3		0x026
+#define R2057_RFPLL_LOOPFILTER_C2		0x027
+#define R2057_RFPLL_LOOPFILTER_C1		0x028
+#define R2057_CP_KPD_IDAC			0x029
+#define R2057_RFPLL_IDACS			0x02a
+#define R2057_RFPLL_MISC_EN			0x02b
+#define R2057_RFPLL_MMD0			0x02c
+#define R2057_RFPLL_MMD1			0x02d
+#define R2057_RFPLL_MISC_CAL_RESETN		0x02e
+#define R2057_JTAGXTAL_SIZE_CPBIAS_FILTRES	0x02f
+#define R2057_VCO_ALCREF_BBPLLXTAL_SIZE		0x030
+#define R2057_VCOCAL_READCAP0			0x031
+#define R2057_VCOCAL_READCAP1			0x032
+#define R2057_VCOCAL_STATUS			0x033
+#define R2057_LOGEN_PUS				0x034
+#define R2057_LOGEN_PTAT_RESETS			0x035
+#define R2057_VCOBUF_IDACS			0x036
+#define R2057_VCOBUF_TUNE			0x037
+#define R2057_CMOSBUF_TX2GQ_IDACS		0x038
+#define R2057_CMOSBUF_TX2GI_IDACS		0x039
+#define R2057_CMOSBUF_TX5GQ_IDACS		0x03a
+#define R2057_CMOSBUF_TX5GI_IDACS		0x03b
+#define R2057_CMOSBUF_RX2GQ_IDACS		0x03c
+#define R2057_CMOSBUF_RX2GI_IDACS		0x03d
+#define R2057_CMOSBUF_RX5GQ_IDACS		0x03e
+#define R2057_CMOSBUF_RX5GI_IDACS		0x03f
+#define R2057_LOGEN_MX2G_IDACS			0x040
+#define R2057_LOGEN_MX2G_TUNE			0x041
+#define R2057_LOGEN_MX5G_IDACS			0x042
+#define R2057_LOGEN_MX5G_TUNE			0x043
+#define R2057_LOGEN_MX5G_RCCR			0x044
+#define R2057_LOGEN_INDBUF2G_IDAC		0x045
+#define R2057_LOGEN_INDBUF2G_IBOOST		0x046
+#define R2057_LOGEN_INDBUF2G_TUNE		0x047
+#define R2057_LOGEN_INDBUF5G_IDAC		0x048
+#define R2057_LOGEN_INDBUF5G_IBOOST		0x049
+#define R2057_LOGEN_INDBUF5G_TUNE		0x04a
+#define R2057_CMOSBUF_TX_RCCR			0x04b
+#define R2057_CMOSBUF_RX_RCCR			0x04c
+#define R2057_LOGEN_SEL_PKDET			0x04d
+#define R2057_CMOSBUF_SHAREIQ_PTAT		0x04e
+#define R2057_RXTXBIAS_CONFIG_CORE0		0x04f
+#define R2057_TXGM_TXRF_PUS_CORE0		0x050
+#define R2057_TXGM_IDAC_BLEED_CORE0		0x051
+#define R2057_TXGM_GAIN_CORE0			0x056
+#define R2057_TXGM2G_PKDET_PUS_CORE0		0x057
+#define R2057_PAD2G_PTATS_CORE0			0x058
+#define R2057_PAD2G_IDACS_CORE0			0x059
+#define R2057_PAD2G_BOOST_PU_CORE0		0x05a
+#define R2057_PAD2G_CASCV_GAIN_CORE0		0x05b
+#define R2057_TXMIX2G_TUNE_BOOST_PU_CORE0	0x05c
+#define R2057_TXMIX2G_LODC_CORE0		0x05d
+#define R2057_PAD2G_TUNE_PUS_CORE0		0x05e
+#define R2057_IPA2G_GAIN_CORE0			0x05f
+#define R2057_TSSI2G_SPARE1_CORE0		0x060
+#define R2057_TSSI2G_SPARE2_CORE0		0x061
+#define R2057_IPA2G_TUNEV_CASCV_PTAT_CORE0	0x062
+#define R2057_IPA2G_IMAIN_CORE0			0x063
+#define R2057_IPA2G_CASCONV_CORE0		0x064
+#define R2057_IPA2G_CASCOFFV_CORE0		0x065
+#define R2057_IPA2G_BIAS_FILTER_CORE0		0x066
+#define R2057_TX5G_PKDET_CORE0			0x069
+#define R2057_PGA_PTAT_TXGM5G_PU_CORE0		0x06a
+#define R2057_PAD5G_PTATS1_CORE0		0x06b
+#define R2057_PAD5G_CLASS_PTATS2_CORE0		0x06c
+#define R2057_PGA_BOOSTPTAT_IMAIN_CORE0		0x06d
+#define R2057_PAD5G_CASCV_IMAIN_CORE0		0x06e
+#define R2057_TXMIX5G_IBOOST_PAD_IAUX_CORE0	0x06f
+#define R2057_PGA_BOOST_TUNE_CORE0		0x070
+#define R2057_PGA_GAIN_CORE0			0x071
+#define R2057_PAD5G_CASCOFFV_GAIN_PUS_CORE0	0x072
+#define R2057_TXMIX5G_BOOST_TUNE_CORE0		0x073
+#define R2057_PAD5G_TUNE_MISC_PUS_CORE0		0x074
+#define R2057_IPA5G_IAUX_CORE0			0x075
+#define R2057_IPA5G_GAIN_CORE0			0x076
+#define R2057_TSSI5G_SPARE1_CORE0		0x077
+#define R2057_TSSI5G_SPARE2_CORE0		0x078
+#define R2057_IPA5G_CASCOFFV_PU_CORE0		0x079
+#define R2057_IPA5G_PTAT_CORE0			0x07a
+#define R2057_IPA5G_IMAIN_CORE0			0x07b
+#define R2057_IPA5G_CASCONV_CORE0		0x07c
+#define R2057_IPA5G_BIAS_FILTER_CORE0		0x07d
+#define R2057_PAD_BIAS_FILTER_BWS_CORE0		0x080
+#define R2057_TR2G_CONFIG1_CORE0_NU		0x081
+#define R2057_TR2G_CONFIG2_CORE0_NU		0x082
+#define R2057_LNA5G_RFEN_CORE0			0x083
+#define R2057_TR5G_CONFIG2_CORE0_NU		0x084
+#define R2057_RXRFBIAS_IBOOST_PU_CORE0		0x085
+#define R2057_RXRF_IABAND_RXGM_IMAIN_PTAT_CORE0	0x086
+#define R2057_RXGM_CMFBITAIL_AUXPTAT_CORE0	0x087
+#define R2057_RXMIX_ICORE_RXGM_IAUX_CORE0	0x088
+#define R2057_RXMIX_CMFBITAIL_PU_CORE0		0x089
+#define R2057_LNA2_IMAIN_PTAT_PU_CORE0		0x08a
+#define R2057_LNA2_IAUX_PTAT_CORE0		0x08b
+#define R2057_LNA1_IMAIN_PTAT_PU_CORE0		0x08c
+#define R2057_LNA15G_INPUT_MATCH_TUNE_CORE0	0x08d
+#define R2057_RXRFBIAS_BANDSEL_CORE0		0x08e
+#define R2057_TIA_CONFIG_CORE0			0x08f
+#define R2057_TIA_IQGAIN_CORE0			0x090
+#define R2057_TIA_IBIAS2_CORE0			0x091
+#define R2057_TIA_IBIAS1_CORE0			0x092
+#define R2057_TIA_SPARE_Q_CORE0			0x093
+#define R2057_TIA_SPARE_I_CORE0			0x094
+#define R2057_RXMIX2G_PUS_CORE0			0x095
+#define R2057_RXMIX2G_VCMREFS_CORE0		0x096
+#define R2057_RXMIX2G_LODC_QI_CORE0		0x097
+#define R2057_W12G_BW_LNA2G_PUS_CORE0		0x098
+#define R2057_LNA2G_GAIN_CORE0			0x099
+#define R2057_LNA2G_TUNE_CORE0			0x09a
+#define R2057_RXMIX5G_PUS_CORE0			0x09b
+#define R2057_RXMIX5G_VCMREFS_CORE0		0x09c
+#define R2057_RXMIX5G_LODC_QI_CORE0		0x09d
+#define R2057_W15G_BW_LNA5G_PUS_CORE0		0x09e
+#define R2057_LNA5G_GAIN_CORE0			0x09f
+#define R2057_LNA5G_TUNE_CORE0			0x0a0
+#define R2057_LPFSEL_TXRX_RXBB_PUS_CORE0	0x0a1
+#define R2057_RXBB_BIAS_MASTER_CORE0		0x0a2
+#define R2057_RXBB_VGABUF_IDACS_CORE0		0x0a3
+#define R2057_LPF_VCMREF_TXBUF_VCMREF_CORE0	0x0a4
+#define R2057_TXBUF_VINCM_CORE0			0x0a5
+#define R2057_TXBUF_IDACS_CORE0			0x0a6
+#define R2057_LPF_RESP_RXBUF_BW_CORE0		0x0a7
+#define R2057_RXBB_CC_CORE0			0x0a8
+#define R2057_RXBB_SPARE3_CORE0			0x0a9
+#define R2057_RXBB_RCCAL_HPC_CORE0		0x0aa
+#define R2057_LPF_IDACS_CORE0			0x0ab
+#define R2057_LPFBYP_DCLOOP_BYP_IDAC_CORE0	0x0ac
+#define R2057_TXBUF_GAIN_CORE0			0x0ad
+#define R2057_AFELOOPBACK_AACI_RESP_CORE0	0x0ae
+#define R2057_RXBUF_DEGEN_CORE0			0x0af
+#define R2057_RXBB_SPARE2_CORE0			0x0b0
+#define R2057_RXBB_SPARE1_CORE0			0x0b1
+#define R2057_RSSI_MASTER_CORE0			0x0b2
+#define R2057_W2_MASTER_CORE0			0x0b3
+#define R2057_NB_MASTER_CORE0			0x0b4
+#define R2057_W2_IDACS0_Q_CORE0			0x0b5
+#define R2057_W2_IDACS1_Q_CORE0			0x0b6
+#define R2057_W2_IDACS0_I_CORE0			0x0b7
+#define R2057_W2_IDACS1_I_CORE0			0x0b8
+#define R2057_RSSI_GPAIOSEL_W1_IDACS_CORE0	0x0b9
+#define R2057_NB_IDACS_Q_CORE0			0x0ba
+#define R2057_NB_IDACS_I_CORE0			0x0bb
+#define R2057_BACKUP4_CORE0			0x0c1
+#define R2057_BACKUP3_CORE0			0x0c2
+#define R2057_BACKUP2_CORE0			0x0c3
+#define R2057_BACKUP1_CORE0			0x0c4
+#define R2057_SPARE16_CORE0			0x0c5
+#define R2057_SPARE15_CORE0			0x0c6
+#define R2057_SPARE14_CORE0			0x0c7
+#define R2057_SPARE13_CORE0			0x0c8
+#define R2057_SPARE12_CORE0			0x0c9
+#define R2057_SPARE11_CORE0			0x0ca
+#define R2057_TX2G_BIAS_RESETS_CORE0		0x0cb
+#define R2057_TX5G_BIAS_RESETS_CORE0		0x0cc
+#define R2057_IQTEST_SEL_PU			0x0cd
+#define R2057_XTAL_CONFIG2			0x0ce
+#define R2057_BUFS_MISC_LPFBW_CORE0		0x0cf
+#define R2057_TXLPF_RCCAL_CORE0			0x0d0
+#define R2057_RXBB_GPAIOSEL_RXLPF_RCCAL_CORE0	0x0d1
+#define R2057_LPF_GAIN_CORE0			0x0d2
+#define R2057_DACBUF_IDACS_BW_CORE0		0x0d3
+#define R2057_RXTXBIAS_CONFIG_CORE1		0x0d4
+#define R2057_TXGM_TXRF_PUS_CORE1		0x0d5
+#define R2057_TXGM_IDAC_BLEED_CORE1		0x0d6
+#define R2057_TXGM_GAIN_CORE1			0x0db
+#define R2057_TXGM2G_PKDET_PUS_CORE1		0x0dc
+#define R2057_PAD2G_PTATS_CORE1			0x0dd
+#define R2057_PAD2G_IDACS_CORE1			0x0de
+#define R2057_PAD2G_BOOST_PU_CORE1		0x0df
+#define R2057_PAD2G_CASCV_GAIN_CORE1		0x0e0
+#define R2057_TXMIX2G_TUNE_BOOST_PU_CORE1	0x0e1
+#define R2057_TXMIX2G_LODC_CORE1		0x0e2
+#define R2057_PAD2G_TUNE_PUS_CORE1		0x0e3
+#define R2057_IPA2G_GAIN_CORE1			0x0e4
+#define R2057_TSSI2G_SPARE1_CORE1		0x0e5
+#define R2057_TSSI2G_SPARE2_CORE1		0x0e6
+#define R2057_IPA2G_TUNEV_CASCV_PTAT_CORE1	0x0e7
+#define R2057_IPA2G_IMAIN_CORE1			0x0e8
+#define R2057_IPA2G_CASCONV_CORE1		0x0e9
+#define R2057_IPA2G_CASCOFFV_CORE1		0x0ea
+#define R2057_IPA2G_BIAS_FILTER_CORE1		0x0eb
+#define R2057_TX5G_PKDET_CORE1			0x0ee
+#define R2057_PGA_PTAT_TXGM5G_PU_CORE1		0x0ef
+#define R2057_PAD5G_PTATS1_CORE1		0x0f0
+#define R2057_PAD5G_CLASS_PTATS2_CORE1		0x0f1
+#define R2057_PGA_BOOSTPTAT_IMAIN_CORE1		0x0f2
+#define R2057_PAD5G_CASCV_IMAIN_CORE1		0x0f3
+#define R2057_TXMIX5G_IBOOST_PAD_IAUX_CORE1	0x0f4
+#define R2057_PGA_BOOST_TUNE_CORE1		0x0f5
+#define R2057_PGA_GAIN_CORE1			0x0f6
+#define R2057_PAD5G_CASCOFFV_GAIN_PUS_CORE1	0x0f7
+#define R2057_TXMIX5G_BOOST_TUNE_CORE1		0x0f8
+#define R2057_PAD5G_TUNE_MISC_PUS_CORE1		0x0f9
+#define R2057_IPA5G_IAUX_CORE1			0x0fa
+#define R2057_IPA5G_GAIN_CORE1			0x0fb
+#define R2057_TSSI5G_SPARE1_CORE1		0x0fc
+#define R2057_TSSI5G_SPARE2_CORE1		0x0fd
+#define R2057_IPA5G_CASCOFFV_PU_CORE1		0x0fe
+#define R2057_IPA5G_PTAT_CORE1			0x0ff
+#define R2057_IPA5G_IMAIN_CORE1			0x100
+#define R2057_IPA5G_CASCONV_CORE1		0x101
+#define R2057_IPA5G_BIAS_FILTER_CORE1		0x102
+#define R2057_PAD_BIAS_FILTER_BWS_CORE1		0x105
+#define R2057_TR2G_CONFIG1_CORE1_NU		0x106
+#define R2057_TR2G_CONFIG2_CORE1_NU		0x107
+#define R2057_LNA5G_RFEN_CORE1			0x108
+#define R2057_TR5G_CONFIG2_CORE1_NU		0x109
+#define R2057_RXRFBIAS_IBOOST_PU_CORE1		0x10a
+#define R2057_RXRF_IABAND_RXGM_IMAIN_PTAT_CORE1	0x10b
+#define R2057_RXGM_CMFBITAIL_AUXPTAT_CORE1	0x10c
+#define R2057_RXMIX_ICORE_RXGM_IAUX_CORE1	0x10d
+#define R2057_RXMIX_CMFBITAIL_PU_CORE1		0x10e
+#define R2057_LNA2_IMAIN_PTAT_PU_CORE1		0x10f
+#define R2057_LNA2_IAUX_PTAT_CORE1		0x110
+#define R2057_LNA1_IMAIN_PTAT_PU_CORE1		0x111
+#define R2057_LNA15G_INPUT_MATCH_TUNE_CORE1	0x112
+#define R2057_RXRFBIAS_BANDSEL_CORE1		0x113
+#define R2057_TIA_CONFIG_CORE1			0x114
+#define R2057_TIA_IQGAIN_CORE1			0x115
+#define R2057_TIA_IBIAS2_CORE1			0x116
+#define R2057_TIA_IBIAS1_CORE1			0x117
+#define R2057_TIA_SPARE_Q_CORE1			0x118
+#define R2057_TIA_SPARE_I_CORE1			0x119
+#define R2057_RXMIX2G_PUS_CORE1			0x11a
+#define R2057_RXMIX2G_VCMREFS_CORE1		0x11b
+#define R2057_RXMIX2G_LODC_QI_CORE1		0x11c
+#define R2057_W12G_BW_LNA2G_PUS_CORE1		0x11d
+#define R2057_LNA2G_GAIN_CORE1			0x11e
+#define R2057_LNA2G_TUNE_CORE1			0x11f
+#define R2057_RXMIX5G_PUS_CORE1			0x120
+#define R2057_RXMIX5G_VCMREFS_CORE1		0x121
+#define R2057_RXMIX5G_LODC_QI_CORE1		0x122
+#define R2057_W15G_BW_LNA5G_PUS_CORE1		0x123
+#define R2057_LNA5G_GAIN_CORE1			0x124
+#define R2057_LNA5G_TUNE_CORE1			0x125
+#define R2057_LPFSEL_TXRX_RXBB_PUS_CORE1	0x126
+#define R2057_RXBB_BIAS_MASTER_CORE1		0x127
+#define R2057_RXBB_VGABUF_IDACS_CORE1		0x128
+#define R2057_LPF_VCMREF_TXBUF_VCMREF_CORE1	0x129
+#define R2057_TXBUF_VINCM_CORE1			0x12a
+#define R2057_TXBUF_IDACS_CORE1			0x12b
+#define R2057_LPF_RESP_RXBUF_BW_CORE1		0x12c
+#define R2057_RXBB_CC_CORE1			0x12d
+#define R2057_RXBB_SPARE3_CORE1			0x12e
+#define R2057_RXBB_RCCAL_HPC_CORE1		0x12f
+#define R2057_LPF_IDACS_CORE1			0x130
+#define R2057_LPFBYP_DCLOOP_BYP_IDAC_CORE1	0x131
+#define R2057_TXBUF_GAIN_CORE1			0x132
+#define R2057_AFELOOPBACK_AACI_RESP_CORE1	0x133
+#define R2057_RXBUF_DEGEN_CORE1			0x134
+#define R2057_RXBB_SPARE2_CORE1			0x135
+#define R2057_RXBB_SPARE1_CORE1			0x136
+#define R2057_RSSI_MASTER_CORE1			0x137
+#define R2057_W2_MASTER_CORE1			0x138
+#define R2057_NB_MASTER_CORE1			0x139
+#define R2057_W2_IDACS0_Q_CORE1			0x13a
+#define R2057_W2_IDACS1_Q_CORE1			0x13b
+#define R2057_W2_IDACS0_I_CORE1			0x13c
+#define R2057_W2_IDACS1_I_CORE1			0x13d
+#define R2057_RSSI_GPAIOSEL_W1_IDACS_CORE1	0x13e
+#define R2057_NB_IDACS_Q_CORE1			0x13f
+#define R2057_NB_IDACS_I_CORE1			0x140
+#define R2057_BACKUP4_CORE1			0x146
+#define R2057_BACKUP3_CORE1			0x147
+#define R2057_BACKUP2_CORE1			0x148
+#define R2057_BACKUP1_CORE1			0x149
+#define R2057_SPARE16_CORE1			0x14a
+#define R2057_SPARE15_CORE1			0x14b
+#define R2057_SPARE14_CORE1			0x14c
+#define R2057_SPARE13_CORE1			0x14d
+#define R2057_SPARE12_CORE1			0x14e
+#define R2057_SPARE11_CORE1			0x14f
+#define R2057_TX2G_BIAS_RESETS_CORE1		0x150
+#define R2057_TX5G_BIAS_RESETS_CORE1		0x151
+#define R2057_SPARE8_CORE1			0x152
+#define R2057_SPARE7_CORE1			0x153
+#define R2057_BUFS_MISC_LPFBW_CORE1		0x154
+#define R2057_TXLPF_RCCAL_CORE1			0x155
+#define R2057_RXBB_GPAIOSEL_RXLPF_RCCAL_CORE1	0x156
+#define R2057_LPF_GAIN_CORE1			0x157
+#define R2057_DACBUF_IDACS_BW_CORE1		0x158
+#define R2057_DACBUF_VINCM_CORE1		0x159
+#define R2057_RCCAL_START_R1_Q1_P1		0x15a
+#define R2057_RCCAL_X1				0x15b
+#define R2057_RCCAL_TRC0			0x15c
+#define R2057_RCCAL_TRC1			0x15d
+#define R2057_RCCAL_DONE_OSCCAP			0x15e
+#define R2057_RCCAL_N0_0			0x15f
+#define R2057_RCCAL_N0_1			0x160
+#define R2057_RCCAL_N1_0			0x161
+#define R2057_RCCAL_N1_1			0x162
+#define R2057_RCAL_STATUS			0x163
+#define R2057_XTALPUOVR_PINCTRL			0x164
+#define R2057_OVR_REG0				0x165
+#define R2057_OVR_REG1				0x166
+#define R2057_OVR_REG2				0x167
+#define R2057_OVR_REG3				0x168
+#define R2057_OVR_REG4				0x169
+#define R2057_RCCAL_SCAP_VAL			0x16a
+#define R2057_RCCAL_BCAP_VAL			0x16b
+#define R2057_RCCAL_HPC_VAL			0x16c
+#define R2057_RCCAL_OVERRIDES			0x16d
+#define R2057_TX0_IQCAL_GAIN_BW			0x170
+#define R2057_TX0_LOFT_FINE_I			0x171
+#define R2057_TX0_LOFT_FINE_Q			0x172
+#define R2057_TX0_LOFT_COARSE_I			0x173
+#define R2057_TX0_LOFT_COARSE_Q			0x174
+#define R2057_TX0_TX_SSI_MASTER			0x175
+#define R2057_TX0_IQCAL_VCM_HG			0x176
+#define R2057_TX0_IQCAL_IDAC			0x177
+#define R2057_TX0_TSSI_VCM			0x178
+#define R2057_TX0_TX_SSI_MUX			0x179
+#define R2057_TX0_TSSIA				0x17a
+#define R2057_TX0_TSSIG				0x17b
+#define R2057_TX0_TSSI_MISC1			0x17c
+#define R2057_TX0_TXRXCOUPLE_2G_ATTEN		0x17d
+#define R2057_TX0_TXRXCOUPLE_2G_PWRUP		0x17e
+#define R2057_TX0_TXRXCOUPLE_5G_ATTEN		0x17f
+#define R2057_TX0_TXRXCOUPLE_5G_PWRUP		0x180
+#define R2057_TX1_IQCAL_GAIN_BW			0x190
+#define R2057_TX1_LOFT_FINE_I			0x191
+#define R2057_TX1_LOFT_FINE_Q			0x192
+#define R2057_TX1_LOFT_COARSE_I			0x193
+#define R2057_TX1_LOFT_COARSE_Q			0x194
+#define R2057_TX1_TX_SSI_MASTER			0x195
+#define R2057_TX1_IQCAL_VCM_HG			0x196
+#define R2057_TX1_IQCAL_IDAC			0x197
+#define R2057_TX1_TSSI_VCM			0x198
+#define R2057_TX1_TX_SSI_MUX			0x199
+#define R2057_TX1_TSSIA				0x19a
+#define R2057_TX1_TSSIG				0x19b
+#define R2057_TX1_TSSI_MISC1			0x19c
+#define R2057_TX1_TXRXCOUPLE_2G_ATTEN		0x19d
+#define R2057_TX1_TXRXCOUPLE_2G_PWRUP		0x19e
+#define R2057_TX1_TXRXCOUPLE_5G_ATTEN		0x19f
+#define R2057_TX1_TXRXCOUPLE_5G_PWRUP		0x1a0
+#define R2057_AFE_VCM_CAL_MASTER_CORE0		0x1a1
+#define R2057_AFE_SET_VCM_I_CORE0		0x1a2
+#define R2057_AFE_SET_VCM_Q_CORE0		0x1a3
+#define R2057_AFE_STATUS_VCM_IQADC_CORE0	0x1a4
+#define R2057_AFE_STATUS_VCM_I_CORE0		0x1a5
+#define R2057_AFE_STATUS_VCM_Q_CORE0		0x1a6
+#define R2057_AFE_VCM_CAL_MASTER_CORE1		0x1a7
+#define R2057_AFE_SET_VCM_I_CORE1		0x1a8
+#define R2057_AFE_SET_VCM_Q_CORE1		0x1a9
+#define R2057_AFE_STATUS_VCM_IQADC_CORE1	0x1aa
+#define R2057_AFE_STATUS_VCM_I_CORE1		0x1ab
+#define R2057_AFE_STATUS_VCM_Q_CORE1		0x1ac
+
+#define R2057v7_DACBUF_VINCM_CORE0		0x1ad
+#define R2057v7_RCCAL_MASTER			0x1ae
+#define R2057v7_TR2G_CONFIG3_CORE0_NU		0x1af
+#define R2057v7_TR2G_CONFIG3_CORE1_NU		0x1b0
+#define R2057v7_LOGEN_PUS1			0x1b1
+#define R2057v7_OVR_REG5			0x1b2
+#define R2057v7_OVR_REG6			0x1b3
+#define R2057v7_OVR_REG7			0x1b4
+#define R2057v7_OVR_REG8			0x1b5
+#define R2057v7_OVR_REG9			0x1b6
+#define R2057v7_OVR_REG10			0x1b7
+#define R2057v7_OVR_REG11			0x1b8
+#define R2057v7_OVR_REG12			0x1b9
+#define R2057v7_OVR_REG13			0x1ba
+#define R2057v7_OVR_REG14			0x1bb
+#define R2057v7_OVR_REG15			0x1bc
+#define R2057v7_OVR_REG16			0x1bd
+#define R2057v7_OVR_REG1			0x1be
+#define R2057v7_OVR_REG18			0x1bf
+#define R2057v7_OVR_REG19			0x1c0
+#define R2057v7_OVR_REG20			0x1c1
+#define R2057v7_OVR_REG21			0x1c2
+#define R2057v7_OVR_REG2			0x1c3
+#define R2057v7_OVR_REG23			0x1c4
+#define R2057v7_OVR_REG24			0x1c5
+#define R2057v7_OVR_REG25			0x1c6
+#define R2057v7_OVR_REG26			0x1c7
+#define R2057v7_OVR_REG27			0x1c8
+#define R2057v7_OVR_REG28			0x1c9
+#define R2057v7_IQTEST_SEL_PU2			0x1ca
+
+#define R2057_VCM_MASK				0x7
+
+void r2057_upload_inittabs(struct b43_wldev *dev);
+
+#endif /* B43_RADIO_2057_H_ */
-- 
1.7.7



From zajec5 at gmail.com  Thu Jul 26 02:16:01 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 26 Jul 2012 08:16:01 +0200
Subject: [PATCH V3] b43: be more user friendly with PHY info
Message-ID: <1343283361-4050-1-git-send-email-zajec5@gmail.com>

First of all, use PHY names instead of magic numbers. It should make
configuring kernel easier in case of not enabled PHY type support.
Secondly, always print info about PHY. This is really basic info about
hardware and quite important for the support level.

Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
V2: add new PHYTYPEs
V3: don't printk error in b43_phy_name, just return "UNKNOWN". We still
    can know PHY type thanks to change in caller, which prints both:
    %d and %s. Thanks Joe!
---
 drivers/net/wireless/b43/b43.h  |    2 ++
 drivers/net/wireless/b43/main.c |   39 ++++++++++++++++++++++++++++++++++-----
 2 files changed, 36 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
index 7c899fc..b0c7f47 100644
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -415,6 +415,8 @@ enum {
 #define B43_PHYTYPE_HT			0x07
 #define B43_PHYTYPE_LCN			0x08
 #define B43_PHYTYPE_LCNXN		0x09
+#define B43_PHYTYPE_LCN40		0x0a
+#define B43_PHYTYPE_AC			0x0b
 
 /* PHYRegisters */
 #define B43_PHY_ILT_A_CTRL		0x0072
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index b80352b..a8f812b 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -4277,6 +4277,35 @@ out:
 	return err;
 }
 
+static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
+{
+	switch (phy_type) {
+	case B43_PHYTYPE_A:
+		return "A";
+	case B43_PHYTYPE_B:
+		return "B";
+	case B43_PHYTYPE_G:
+		return "G";
+	case B43_PHYTYPE_N:
+		return "N";
+	case B43_PHYTYPE_LP:
+		return "LP";
+	case B43_PHYTYPE_SSLPN:
+		return "SSLPN";
+	case B43_PHYTYPE_HT:
+		return "HT";
+	case B43_PHYTYPE_LCN:
+		return "LCN";
+	case B43_PHYTYPE_LCNXN:
+		return "LCNXN";
+	case B43_PHYTYPE_LCN40:
+		return "LCN40";
+	case B43_PHYTYPE_AC:
+		return "AC";
+	}
+	return "UNKNOWN";
+}
+
 /* Get PHY and RADIO versioning numbers */
 static int b43_phy_versioning(struct b43_wldev *dev)
 {
@@ -4337,13 +4366,13 @@ static int b43_phy_versioning(struct b43_wldev *dev)
 		unsupported = 1;
 	}
 	if (unsupported) {
-		b43err(dev->wl, "FOUND UNSUPPORTED PHY "
-		       "(Analog %u, Type %u, Revision %u)\n",
-		       analog_type, phy_type, phy_rev);
+		b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %d (%s), Revision %u)\n",
+		       analog_type, phy_type, b43_phy_name(dev, phy_type),
+		       phy_rev);
 		return -EOPNOTSUPP;
 	}
-	b43dbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n",
-	       analog_type, phy_type, phy_rev);
+	b43info(dev->wl, "Found PHY: Analog %u, Type %d (%s), Revision %u\n",
+		analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev);
 
 	/* Get RADIO versioning */
 	if (dev->dev->core_rev >= 24) {
-- 
1.7.7



From netrolller.3d at gmail.com  Thu Jul 26 02:01:57 2012
From: netrolller.3d at gmail.com (=?ISO-8859-1?Q?G=E1bor_Stefanik?=)
Date: Thu, 26 Jul 2012 08:01:57 +0200
Subject: [PATCH V3] b43: be more user friendly with PHY info
In-Reply-To: <1343283361-4050-1-git-send-email-zajec5@gmail.com>
References: <1343283361-4050-1-git-send-email-zajec5@gmail.com>
Message-ID: <CA+XFjiofydQef-7GaUvZKXrH8Wx1sb1mh5j2jTHxh5bvd6NK5w@mail.gmail.com>

On Thu, Jul 26, 2012 at 8:16 AM, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
> First of all, use PHY names instead of magic numbers. It should make
> configuring kernel easier in case of not enabled PHY type support.
> Secondly, always print info about PHY. This is really basic info about
> hardware and quite important for the support level.
>
> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
> ---
> V2: add new PHYTYPEs
> V3: don't printk error in b43_phy_name, just return "UNKNOWN". We still
>     can know PHY type thanks to change in caller, which prints both:
>     %d and %s. Thanks Joe!
> ---
>  drivers/net/wireless/b43/b43.h  |    2 ++
>  drivers/net/wireless/b43/main.c |   39 ++++++++++++++++++++++++++++++++++-----
>  2 files changed, 36 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
> index 7c899fc..b0c7f47 100644
> --- a/drivers/net/wireless/b43/b43.h
> +++ b/drivers/net/wireless/b43/b43.h
> @@ -415,6 +415,8 @@ enum {
>  #define B43_PHYTYPE_HT                 0x07
>  #define B43_PHYTYPE_LCN                        0x08
>  #define B43_PHYTYPE_LCNXN              0x09
> +#define B43_PHYTYPE_LCN40              0x0a
> +#define B43_PHYTYPE_AC                 0x0b
>
>  /* PHYRegisters */
>  #define B43_PHY_ILT_A_CTRL             0x0072
> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
> index b80352b..a8f812b 100644
> --- a/drivers/net/wireless/b43/main.c
> +++ b/drivers/net/wireless/b43/main.c
> @@ -4277,6 +4277,35 @@ out:
>         return err;
>  }
>
> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
> +{
> +       switch (phy_type) {
> +       case B43_PHYTYPE_A:
> +               return "A";
> +       case B43_PHYTYPE_B:
> +               return "B";
> +       case B43_PHYTYPE_G:
> +               return "G";
> +       case B43_PHYTYPE_N:
> +               return "N";
> +       case B43_PHYTYPE_LP:
> +               return "LP";
> +       case B43_PHYTYPE_SSLPN:
> +               return "SSLPN";
> +       case B43_PHYTYPE_HT:
> +               return "HT";
> +       case B43_PHYTYPE_LCN:
> +               return "LCN";
> +       case B43_PHYTYPE_LCNXN:
> +               return "LCNXN";
> +       case B43_PHYTYPE_LCN40:
> +               return "LCN40";
> +       case B43_PHYTYPE_AC:
> +               return "AC";
> +       }
> +       return "UNKNOWN";

How about putting the PHY type ID into the string in the Unknown case?
Or will it be printed somewhere else?

> +}
> +
>  /* Get PHY and RADIO versioning numbers */
>  static int b43_phy_versioning(struct b43_wldev *dev)
>  {
> @@ -4337,13 +4366,13 @@ static int b43_phy_versioning(struct b43_wldev *dev)
>                 unsupported = 1;
>         }
>         if (unsupported) {
> -               b43err(dev->wl, "FOUND UNSUPPORTED PHY "
> -                      "(Analog %u, Type %u, Revision %u)\n",
> -                      analog_type, phy_type, phy_rev);
> +               b43err(dev->wl, "FOUND UNSUPPORTED PHY (Analog %u, Type %d (%s), Revision %u)\n",
> +                      analog_type, phy_type, b43_phy_name(dev, phy_type),
> +                      phy_rev);
>                 return -EOPNOTSUPP;
>         }
> -       b43dbg(dev->wl, "Found PHY: Analog %u, Type %u, Revision %u\n",
> -              analog_type, phy_type, phy_rev);
> +       b43info(dev->wl, "Found PHY: Analog %u, Type %d (%s), Revision %u\n",
> +               analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev);
>
>         /* Get RADIO versioning */
>         if (dev->dev->core_rev >= 24) {
> --
> 1.7.7
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Vista: [V]iruses, [I]ntruders, [S]pyware, [T]rojans and [A]dware. :-)


From zajec5 at gmail.com  Thu Jul 26 02:10:34 2012
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Thu, 26 Jul 2012 08:10:34 +0200
Subject: [PATCH V3] b43: be more user friendly with PHY info
In-Reply-To: <CA+XFjiofydQef-7GaUvZKXrH8Wx1sb1mh5j2jTHxh5bvd6NK5w@mail.gmail.com>
References: <1343283361-4050-1-git-send-email-zajec5@gmail.com>
 <CA+XFjiofydQef-7GaUvZKXrH8Wx1sb1mh5j2jTHxh5bvd6NK5w@mail.gmail.com>
Message-ID: <CACna6ryQ4eV62Fsjn6jBOVasu2BX4C=CxRz_TacVVQ4MVJUxrA@mail.gmail.com>

2012/7/26 G?bor Stefanik <netrolller.3d at gmail.com>:
> On Thu, Jul 26, 2012 at 8:16 AM, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
>> First of all, use PHY names instead of magic numbers. It should make
>> configuring kernel easier in case of not enabled PHY type support.
>> Secondly, always print info about PHY. This is really basic info about
>> hardware and quite important for the support level.
>>
>> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
>> ---
>> V2: add new PHYTYPEs
>> V3: don't printk error in b43_phy_name, just return "UNKNOWN". We still
>>     can know PHY type thanks to change in caller, which prints both:
>>     %d and %s. Thanks Joe!
>> ---
>>  drivers/net/wireless/b43/b43.h  |    2 ++
>>  drivers/net/wireless/b43/main.c |   39 ++++++++++++++++++++++++++++++++++-----
>>  2 files changed, 36 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
>> index 7c899fc..b0c7f47 100644
>> --- a/drivers/net/wireless/b43/b43.h
>> +++ b/drivers/net/wireless/b43/b43.h
>> @@ -415,6 +415,8 @@ enum {
>>  #define B43_PHYTYPE_HT                 0x07
>>  #define B43_PHYTYPE_LCN                        0x08
>>  #define B43_PHYTYPE_LCNXN              0x09
>> +#define B43_PHYTYPE_LCN40              0x0a
>> +#define B43_PHYTYPE_AC                 0x0b
>>
>>  /* PHYRegisters */
>>  #define B43_PHY_ILT_A_CTRL             0x0072
>> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
>> index b80352b..a8f812b 100644
>> --- a/drivers/net/wireless/b43/main.c
>> +++ b/drivers/net/wireless/b43/main.c
>> @@ -4277,6 +4277,35 @@ out:
>>         return err;
>>  }
>>
>> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
>> +{
>> +       switch (phy_type) {
>> +       case B43_PHYTYPE_A:
>> +               return "A";
>> +       case B43_PHYTYPE_B:
>> +               return "B";
>> +       case B43_PHYTYPE_G:
>> +               return "G";
>> +       case B43_PHYTYPE_N:
>> +               return "N";
>> +       case B43_PHYTYPE_LP:
>> +               return "LP";
>> +       case B43_PHYTYPE_SSLPN:
>> +               return "SSLPN";
>> +       case B43_PHYTYPE_HT:
>> +               return "HT";
>> +       case B43_PHYTYPE_LCN:
>> +               return "LCN";
>> +       case B43_PHYTYPE_LCNXN:
>> +               return "LCNXN";
>> +       case B43_PHYTYPE_LCN40:
>> +               return "LCN40";
>> +       case B43_PHYTYPE_AC:
>> +               return "AC";
>> +       }
>> +       return "UNKNOWN";
>
> How about putting the PHY type ID into the string in the Unknown case?
> Or will it be printed somewhere else?

Hm, maybe I don't see something obvious. How would you do that? Using
which function?

-- 
Rafa?


From bug-track at fisher-privat.net  Thu Jul 26 02:22:59 2012
From: bug-track at fisher-privat.net (Oleksij Rempel)
Date: Thu, 26 Jul 2012 08:22:59 +0200
Subject: [PATCH V3] b43: be more user friendly with PHY info
In-Reply-To: <CACna6ryQ4eV62Fsjn6jBOVasu2BX4C=CxRz_TacVVQ4MVJUxrA@mail.gmail.com>
References: <1343283361-4050-1-git-send-email-zajec5@gmail.com>
 <CA+XFjiofydQef-7GaUvZKXrH8Wx1sb1mh5j2jTHxh5bvd6NK5w@mail.gmail.com>
 <CACna6ryQ4eV62Fsjn6jBOVasu2BX4C=CxRz_TacVVQ4MVJUxrA@mail.gmail.com>
Message-ID: <5010E243.6000807@fisher-privat.net>

Am 26.07.2012 08:10, schrieb Rafa? Mi?ecki:
> 2012/7/26 G?bor Stefanik <netrolller.3d at gmail.com>:
>> On Thu, Jul 26, 2012 at 8:16 AM, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
>>> First of all, use PHY names instead of magic numbers. It should make
>>> configuring kernel easier in case of not enabled PHY type support.
>>> Secondly, always print info about PHY. This is really basic info about
>>> hardware and quite important for the support level.
>>>
>>> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
>>> ---
>>> V2: add new PHYTYPEs
>>> V3: don't printk error in b43_phy_name, just return "UNKNOWN". We still
>>>     can know PHY type thanks to change in caller, which prints both:
>>>     %d and %s. Thanks Joe!
>>> ---
>>>  drivers/net/wireless/b43/b43.h  |    2 ++
>>>  drivers/net/wireless/b43/main.c |   39 ++++++++++++++++++++++++++++++++++-----
>>>  2 files changed, 36 insertions(+), 5 deletions(-)
>>>
>>> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
>>> index 7c899fc..b0c7f47 100644
>>> --- a/drivers/net/wireless/b43/b43.h
>>> +++ b/drivers/net/wireless/b43/b43.h
>>> @@ -415,6 +415,8 @@ enum {
>>>  #define B43_PHYTYPE_HT                 0x07
>>>  #define B43_PHYTYPE_LCN                        0x08
>>>  #define B43_PHYTYPE_LCNXN              0x09
>>> +#define B43_PHYTYPE_LCN40              0x0a
>>> +#define B43_PHYTYPE_AC                 0x0b
>>>
>>>  /* PHYRegisters */
>>>  #define B43_PHY_ILT_A_CTRL             0x0072
>>> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
>>> index b80352b..a8f812b 100644
>>> --- a/drivers/net/wireless/b43/main.c
>>> +++ b/drivers/net/wireless/b43/main.c
>>> @@ -4277,6 +4277,35 @@ out:
>>>         return err;
>>>  }
>>>
>>> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
>>> +{
>>> +       switch (phy_type) {
>>> +       case B43_PHYTYPE_A:
>>> +               return "A";
>>> +       case B43_PHYTYPE_B:
>>> +               return "B";
>>> +       case B43_PHYTYPE_G:
>>> +               return "G";
>>> +       case B43_PHYTYPE_N:
>>> +               return "N";
>>> +       case B43_PHYTYPE_LP:
>>> +               return "LP";
>>> +       case B43_PHYTYPE_SSLPN:
>>> +               return "SSLPN";
>>> +       case B43_PHYTYPE_HT:
>>> +               return "HT";
>>> +       case B43_PHYTYPE_LCN:
>>> +               return "LCN";
>>> +       case B43_PHYTYPE_LCNXN:
>>> +               return "LCNXN";
>>> +       case B43_PHYTYPE_LCN40:
>>> +               return "LCN40";
>>> +       case B43_PHYTYPE_AC:
>>> +               return "AC";
>>> +       }
>>> +       return "UNKNOWN";
>>
>> How about putting the PHY type ID into the string in the Unknown case?
>> Or will it be printed somewhere else?
> 
> Hm, maybe I don't see something obvious. How would you do that? Using
> which function?
> 

No need to, it is done here:
b43info(dev->wl, "Found PHY: Analog %u, Type %d (%s), Revision %u\n",
	analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev);

-- 
Regards,
Oleksij


From johannes at sipsolutions.net  Thu Jul 26 02:24:16 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Thu, 26 Jul 2012 08:24:16 +0200
Subject: [PATCH v5] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343244302.3750.44.camel@cumari.coelho.fi>
References: <1343161108-6941-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120724_221843_511093_701FFAF2)
 <1343208990.4463.25.camel@jlt3.sipsolutions.net>
 (sfid-20120725_113644_599580_8AC4476F)
 <1343220625.4463.31.camel@jlt3.sipsolutions.net>
 <500FEDDD.206@net.t-labs.tu-berlin.de>
 <1343244302.3750.44.camel@cumari.coelho.fi>
Message-ID: <1343283856.4611.1.camel@jlt3.sipsolutions.net>

On Wed, 2012-07-25 at 22:25 +0300, Luciano Coelho wrote:

> > My last PATCH included some changes at a TI driver which was adapted in
> > wireless-testing in John's tree. As I touch that many drivers I would
> > like to use your tree instead, to provide a proper PATCH that builds at
> > your tree state...small de-synchronization issues just make it fail.
> 
> Since Johannes has already more or less acked this patch, wouldn't it be
> easier to integrate via John's tree? I think it would make syncing with
> mac80211 and all the drivers easier.

That wouldn't have helped, I actually merged wireless-next and wireless
before applying the patch, so it just overlapped with other changes
between Thomas's testing and applying it.

johannes



From zajec5 at gmail.com  Thu Jul 26 02:50:59 2012
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Thu, 26 Jul 2012 08:50:59 +0200
Subject: [PATCH V3] b43: be more user friendly with PHY info
In-Reply-To: <5010E243.6000807@fisher-privat.net>
References: <1343283361-4050-1-git-send-email-zajec5@gmail.com>
 <CA+XFjiofydQef-7GaUvZKXrH8Wx1sb1mh5j2jTHxh5bvd6NK5w@mail.gmail.com>
 <CACna6ryQ4eV62Fsjn6jBOVasu2BX4C=CxRz_TacVVQ4MVJUxrA@mail.gmail.com>
 <5010E243.6000807@fisher-privat.net>
Message-ID: <CACna6ry-god2wr60t0c9WvaOBA_X=DK7j5xDU7r7R6mUFYKV3Q@mail.gmail.com>

2012/7/26 Oleksij Rempel <bug-track at fisher-privat.net>:
> Am 26.07.2012 08:10, schrieb Rafa? Mi?ecki:
>> 2012/7/26 G?bor Stefanik <netrolller.3d at gmail.com>:
>>> On Thu, Jul 26, 2012 at 8:16 AM, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
>>>> First of all, use PHY names instead of magic numbers. It should make
>>>> configuring kernel easier in case of not enabled PHY type support.
>>>> Secondly, always print info about PHY. This is really basic info about
>>>> hardware and quite important for the support level.
>>>>
>>>> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
>>>> ---
>>>> V2: add new PHYTYPEs
>>>> V3: don't printk error in b43_phy_name, just return "UNKNOWN". We still
>>>>     can know PHY type thanks to change in caller, which prints both:
>>>>     %d and %s. Thanks Joe!
>>>> ---
>>>>  drivers/net/wireless/b43/b43.h  |    2 ++
>>>>  drivers/net/wireless/b43/main.c |   39 ++++++++++++++++++++++++++++++++++-----
>>>>  2 files changed, 36 insertions(+), 5 deletions(-)
>>>>
>>>> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
>>>> index 7c899fc..b0c7f47 100644
>>>> --- a/drivers/net/wireless/b43/b43.h
>>>> +++ b/drivers/net/wireless/b43/b43.h
>>>> @@ -415,6 +415,8 @@ enum {
>>>>  #define B43_PHYTYPE_HT                 0x07
>>>>  #define B43_PHYTYPE_LCN                        0x08
>>>>  #define B43_PHYTYPE_LCNXN              0x09
>>>> +#define B43_PHYTYPE_LCN40              0x0a
>>>> +#define B43_PHYTYPE_AC                 0x0b
>>>>
>>>>  /* PHYRegisters */
>>>>  #define B43_PHY_ILT_A_CTRL             0x0072
>>>> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
>>>> index b80352b..a8f812b 100644
>>>> --- a/drivers/net/wireless/b43/main.c
>>>> +++ b/drivers/net/wireless/b43/main.c
>>>> @@ -4277,6 +4277,35 @@ out:
>>>>         return err;
>>>>  }
>>>>
>>>> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
>>>> +{
>>>> +       switch (phy_type) {
>>>> +       case B43_PHYTYPE_A:
>>>> +               return "A";
>>>> +       case B43_PHYTYPE_B:
>>>> +               return "B";
>>>> +       case B43_PHYTYPE_G:
>>>> +               return "G";
>>>> +       case B43_PHYTYPE_N:
>>>> +               return "N";
>>>> +       case B43_PHYTYPE_LP:
>>>> +               return "LP";
>>>> +       case B43_PHYTYPE_SSLPN:
>>>> +               return "SSLPN";
>>>> +       case B43_PHYTYPE_HT:
>>>> +               return "HT";
>>>> +       case B43_PHYTYPE_LCN:
>>>> +               return "LCN";
>>>> +       case B43_PHYTYPE_LCNXN:
>>>> +               return "LCNXN";
>>>> +       case B43_PHYTYPE_LCN40:
>>>> +               return "LCN40";
>>>> +       case B43_PHYTYPE_AC:
>>>> +               return "AC";
>>>> +       }
>>>> +       return "UNKNOWN";
>>>
>>> How about putting the PHY type ID into the string in the Unknown case?
>>> Or will it be printed somewhere else?
>>
>> Hm, maybe I don't see something obvious. How would you do that? Using
>> which function?
>>
>
> No need to, it is done here:
> b43info(dev->wl, "Found PHY: Analog %u, Type %d (%s), Revision %u\n",
>         analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev);

Still, at least for my curiosity, is there a way to achieve what Gabor
suggested? Can we return dynamically-filled string in a function?

-- 
Rafa?


From bug-track at fisher-privat.net  Thu Jul 26 03:32:20 2012
From: bug-track at fisher-privat.net (Oleksij Rempel)
Date: Thu, 26 Jul 2012 09:32:20 +0200
Subject: [PATCH V3] b43: be more user friendly with PHY info
In-Reply-To: <CACna6ry-god2wr60t0c9WvaOBA_X=DK7j5xDU7r7R6mUFYKV3Q@mail.gmail.com>
References: <1343283361-4050-1-git-send-email-zajec5@gmail.com>
 <CA+XFjiofydQef-7GaUvZKXrH8Wx1sb1mh5j2jTHxh5bvd6NK5w@mail.gmail.com>
 <CACna6ryQ4eV62Fsjn6jBOVasu2BX4C=CxRz_TacVVQ4MVJUxrA@mail.gmail.com>
 <5010E243.6000807@fisher-privat.net>
 <CACna6ry-god2wr60t0c9WvaOBA_X=DK7j5xDU7r7R6mUFYKV3Q@mail.gmail.com>
Message-ID: <5010F284.1040808@fisher-privat.net>

Am 26.07.2012 08:50, schrieb Rafa? Mi?ecki:
> 2012/7/26 Oleksij Rempel <bug-track at fisher-privat.net>:
>> Am 26.07.2012 08:10, schrieb Rafa? Mi?ecki:
>>> 2012/7/26 G?bor Stefanik <netrolller.3d at gmail.com>:
>>>> On Thu, Jul 26, 2012 at 8:16 AM, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
>>>>> First of all, use PHY names instead of magic numbers. It should make
>>>>> configuring kernel easier in case of not enabled PHY type support.
>>>>> Secondly, always print info about PHY. This is really basic info about
>>>>> hardware and quite important for the support level.
>>>>>
>>>>> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
>>>>> ---
>>>>> V2: add new PHYTYPEs
>>>>> V3: don't printk error in b43_phy_name, just return "UNKNOWN". We still
>>>>>     can know PHY type thanks to change in caller, which prints both:
>>>>>     %d and %s. Thanks Joe!
>>>>> ---
>>>>>  drivers/net/wireless/b43/b43.h  |    2 ++
>>>>>  drivers/net/wireless/b43/main.c |   39 ++++++++++++++++++++++++++++++++++-----
>>>>>  2 files changed, 36 insertions(+), 5 deletions(-)
>>>>>
>>>>> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
>>>>> index 7c899fc..b0c7f47 100644
>>>>> --- a/drivers/net/wireless/b43/b43.h
>>>>> +++ b/drivers/net/wireless/b43/b43.h
>>>>> @@ -415,6 +415,8 @@ enum {
>>>>>  #define B43_PHYTYPE_HT                 0x07
>>>>>  #define B43_PHYTYPE_LCN                        0x08
>>>>>  #define B43_PHYTYPE_LCNXN              0x09
>>>>> +#define B43_PHYTYPE_LCN40              0x0a
>>>>> +#define B43_PHYTYPE_AC                 0x0b
>>>>>
>>>>>  /* PHYRegisters */
>>>>>  #define B43_PHY_ILT_A_CTRL             0x0072
>>>>> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
>>>>> index b80352b..a8f812b 100644
>>>>> --- a/drivers/net/wireless/b43/main.c
>>>>> +++ b/drivers/net/wireless/b43/main.c
>>>>> @@ -4277,6 +4277,35 @@ out:
>>>>>         return err;
>>>>>  }
>>>>>
>>>>> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
>>>>> +{
>>>>> +       switch (phy_type) {
>>>>> +       case B43_PHYTYPE_A:
>>>>> +               return "A";
>>>>> +       case B43_PHYTYPE_B:
>>>>> +               return "B";
>>>>> +       case B43_PHYTYPE_G:
>>>>> +               return "G";
>>>>> +       case B43_PHYTYPE_N:
>>>>> +               return "N";
>>>>> +       case B43_PHYTYPE_LP:
>>>>> +               return "LP";
>>>>> +       case B43_PHYTYPE_SSLPN:
>>>>> +               return "SSLPN";
>>>>> +       case B43_PHYTYPE_HT:
>>>>> +               return "HT";
>>>>> +       case B43_PHYTYPE_LCN:
>>>>> +               return "LCN";
>>>>> +       case B43_PHYTYPE_LCNXN:
>>>>> +               return "LCNXN";
>>>>> +       case B43_PHYTYPE_LCN40:
>>>>> +               return "LCN40";
>>>>> +       case B43_PHYTYPE_AC:
>>>>> +               return "AC";
>>>>> +       }
>>>>> +       return "UNKNOWN";
>>>>
>>>> How about putting the PHY type ID into the string in the Unknown case?
>>>> Or will it be printed somewhere else?
>>>
>>> Hm, maybe I don't see something obvious. How would you do that? Using
>>> which function?
>>>
>>
>> No need to, it is done here:
>> b43info(dev->wl, "Found PHY: Analog %u, Type %d (%s), Revision %u\n",
>>         analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev);
> 
> Still, at least for my curiosity, is there a way to achieve what Gabor
> suggested? Can we return dynamically-filled string in a function?
> 

int sprintf(char *str, const char *format, ...);
int snprintf(char *str, size_t size, const char *format, ...);

-- 
Regards,
Oleksij


From zajec5 at gmail.com  Thu Jul 26 03:37:11 2012
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Thu, 26 Jul 2012 09:37:11 +0200
Subject: [PATCH V3] b43: be more user friendly with PHY info
In-Reply-To: <5010F284.1040808@fisher-privat.net>
References: <1343283361-4050-1-git-send-email-zajec5@gmail.com>
 <CA+XFjiofydQef-7GaUvZKXrH8Wx1sb1mh5j2jTHxh5bvd6NK5w@mail.gmail.com>
 <CACna6ryQ4eV62Fsjn6jBOVasu2BX4C=CxRz_TacVVQ4MVJUxrA@mail.gmail.com>
 <5010E243.6000807@fisher-privat.net>
 <CACna6ry-god2wr60t0c9WvaOBA_X=DK7j5xDU7r7R6mUFYKV3Q@mail.gmail.com>
 <5010F284.1040808@fisher-privat.net>
Message-ID: <CACna6rwNcC38OtKmOC-dAU6BZgrTHoLrf9Ezav5CFUJRRXVUTw@mail.gmail.com>

2012/7/26 Oleksij Rempel <bug-track at fisher-privat.net>:
> Am 26.07.2012 08:50, schrieb Rafa? Mi?ecki:
>> 2012/7/26 Oleksij Rempel <bug-track at fisher-privat.net>:
>>> Am 26.07.2012 08:10, schrieb Rafa? Mi?ecki:
>>>> 2012/7/26 G?bor Stefanik <netrolller.3d at gmail.com>:
>>>>> On Thu, Jul 26, 2012 at 8:16 AM, Rafa? Mi?ecki <zajec5 at gmail.com> wrote:
>>>>>> First of all, use PHY names instead of magic numbers. It should make
>>>>>> configuring kernel easier in case of not enabled PHY type support.
>>>>>> Secondly, always print info about PHY. This is really basic info about
>>>>>> hardware and quite important for the support level.
>>>>>>
>>>>>> Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
>>>>>> ---
>>>>>> V2: add new PHYTYPEs
>>>>>> V3: don't printk error in b43_phy_name, just return "UNKNOWN". We still
>>>>>>     can know PHY type thanks to change in caller, which prints both:
>>>>>>     %d and %s. Thanks Joe!
>>>>>> ---
>>>>>>  drivers/net/wireless/b43/b43.h  |    2 ++
>>>>>>  drivers/net/wireless/b43/main.c |   39 ++++++++++++++++++++++++++++++++++-----
>>>>>>  2 files changed, 36 insertions(+), 5 deletions(-)
>>>>>>
>>>>>> diff --git a/drivers/net/wireless/b43/b43.h b/drivers/net/wireless/b43/b43.h
>>>>>> index 7c899fc..b0c7f47 100644
>>>>>> --- a/drivers/net/wireless/b43/b43.h
>>>>>> +++ b/drivers/net/wireless/b43/b43.h
>>>>>> @@ -415,6 +415,8 @@ enum {
>>>>>>  #define B43_PHYTYPE_HT                 0x07
>>>>>>  #define B43_PHYTYPE_LCN                        0x08
>>>>>>  #define B43_PHYTYPE_LCNXN              0x09
>>>>>> +#define B43_PHYTYPE_LCN40              0x0a
>>>>>> +#define B43_PHYTYPE_AC                 0x0b
>>>>>>
>>>>>>  /* PHYRegisters */
>>>>>>  #define B43_PHY_ILT_A_CTRL             0x0072
>>>>>> diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
>>>>>> index b80352b..a8f812b 100644
>>>>>> --- a/drivers/net/wireless/b43/main.c
>>>>>> +++ b/drivers/net/wireless/b43/main.c
>>>>>> @@ -4277,6 +4277,35 @@ out:
>>>>>>         return err;
>>>>>>  }
>>>>>>
>>>>>> +static char *b43_phy_name(struct b43_wldev *dev, u8 phy_type)
>>>>>> +{
>>>>>> +       switch (phy_type) {
>>>>>> +       case B43_PHYTYPE_A:
>>>>>> +               return "A";
>>>>>> +       case B43_PHYTYPE_B:
>>>>>> +               return "B";
>>>>>> +       case B43_PHYTYPE_G:
>>>>>> +               return "G";
>>>>>> +       case B43_PHYTYPE_N:
>>>>>> +               return "N";
>>>>>> +       case B43_PHYTYPE_LP:
>>>>>> +               return "LP";
>>>>>> +       case B43_PHYTYPE_SSLPN:
>>>>>> +               return "SSLPN";
>>>>>> +       case B43_PHYTYPE_HT:
>>>>>> +               return "HT";
>>>>>> +       case B43_PHYTYPE_LCN:
>>>>>> +               return "LCN";
>>>>>> +       case B43_PHYTYPE_LCNXN:
>>>>>> +               return "LCNXN";
>>>>>> +       case B43_PHYTYPE_LCN40:
>>>>>> +               return "LCN40";
>>>>>> +       case B43_PHYTYPE_AC:
>>>>>> +               return "AC";
>>>>>> +       }
>>>>>> +       return "UNKNOWN";
>>>>>
>>>>> How about putting the PHY type ID into the string in the Unknown case?
>>>>> Or will it be printed somewhere else?
>>>>
>>>> Hm, maybe I don't see something obvious. How would you do that? Using
>>>> which function?
>>>>
>>>
>>> No need to, it is done here:
>>> b43info(dev->wl, "Found PHY: Analog %u, Type %d (%s), Revision %u\n",
>>>         analog_type, phy_type, b43_phy_name(dev, phy_type), phy_rev);
>>
>> Still, at least for my curiosity, is there a way to achieve what Gabor
>> suggested? Can we return dynamically-filled string in a function?
>>
>
> int sprintf(char *str, const char *format, ...);
> int snprintf(char *str, size_t size, const char *format, ...);

Yeah, but I can't use sprintf on locally-declared (inside function)
char array. Well, I can, but I can't result such an array.

So the solution is to declare char array in called, and pass that
array (and it's size) to the b43_phy_name.

Well, I really prefer Joe's solution implemented in V3 :)

-- 
Rafa?


From zajec5 at gmail.com  Thu Jul 26 03:37:55 2012
From: zajec5 at gmail.com (=?UTF-8?B?UmFmYcWCIE1pxYJlY2tp?=)
Date: Thu, 26 Jul 2012 09:37:55 +0200
Subject: [PATCH V3] b43: be more user friendly with PHY info
In-Reply-To: <CACna6rwNcC38OtKmOC-dAU6BZgrTHoLrf9Ezav5CFUJRRXVUTw@mail.gmail.com>
References: <1343283361-4050-1-git-send-email-zajec5@gmail.com>
 <CA+XFjiofydQef-7GaUvZKXrH8Wx1sb1mh5j2jTHxh5bvd6NK5w@mail.gmail.com>
 <CACna6ryQ4eV62Fsjn6jBOVasu2BX4C=CxRz_TacVVQ4MVJUxrA@mail.gmail.com>
 <5010E243.6000807@fisher-privat.net>
 <CACna6ry-god2wr60t0c9WvaOBA_X=DK7j5xDU7r7R6mUFYKV3Q@mail.gmail.com>
 <5010F284.1040808@fisher-privat.net>
 <CACna6rwNcC38OtKmOC-dAU6BZgrTHoLrf9Ezav5CFUJRRXVUTw@mail.gmail.com>
Message-ID: <CACna6rzpuAuOTq6j6fma0PRM-GB4nA5Hb=vmtynNdbin3LjOkg@mail.gmail.com>

2012/7/26 Rafa? Mi?ecki <zajec5 at gmail.com>:
> Yeah, but I can't use sprintf on locally-declared (inside function)
> char array. Well, I can, but I can't result such an array.

s/result/return/


> So the solution is to declare char array in called, and pass that
> array (and it's size) to the b43_phy_name.

s/called/caller/

-- 
Rafa?


From zajec5 at gmail.com  Thu Jul 26 04:25:09 2012
From: zajec5 at gmail.com (=?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?=)
Date: Thu, 26 Jul 2012 10:25:09 +0200
Subject: [PATCH] b43: N-PHY: add overriding RF control for rev7+
Message-ID: <1343291109-9224-1-git-send-email-zajec5@gmail.com>


Signed-off-by: Rafa? Mi?ecki <zajec5 at gmail.com>
---
This depends on
b43: N-PHY: add PHY rev7+ workarounds
---
 drivers/net/wireless/b43/phy_n.c       |   48 +++++++++++++++++++--
 drivers/net/wireless/b43/tables_nphy.c |   75 ++++++++++++++++++++++++++++++++
 drivers/net/wireless/b43/tables_nphy.h |   10 ++++
 3 files changed, 129 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/b43/phy_n.c b/drivers/net/wireless/b43/phy_n.c
index 113d5ca..5c90741 100644
--- a/drivers/net/wireless/b43/phy_n.c
+++ b/drivers/net/wireless/b43/phy_n.c
@@ -127,6 +127,46 @@ ok:
 	b43_phy_write(dev, B43_NPHY_RFSEQMODE, seq_mode);
 }
 
+/* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlOverrideRev7 */
+static void b43_nphy_rf_control_override_rev7(struct b43_wldev *dev, u16 field,
+					      u16 value, u8 core, bool off,
+					      u8 override)
+{
+	const struct nphy_rf_control_override_rev7 *e;
+	u16 en_addrs[3][2] = {
+		{ 0x0E7, 0x0EC }, { 0x342, 0x343 }, { 0x346, 0x347 }
+	};
+	u16 en_addr;
+	u16 en_mask = field;
+	u16 val_addr;
+	u8 i;
+
+	/* Remember: we can get NULL! */
+	e = b43_nphy_get_rf_ctl_over_rev7(dev, field, override);
+
+	for (i = 0; i < 2; i++) {
+		if (override >= ARRAY_SIZE(en_addrs)) {
+			b43err(dev->wl, "Invalid override value %d\n", override);
+			return;
+		}
+		en_addr = en_addrs[override][i];
+
+		val_addr = (i == 0) ? e->val_addr_core0 : e->val_addr_core1;
+
+		if (off) {
+			b43_phy_mask(dev, en_addr, ~en_mask);
+			if (e) /* Do it safer, better than wl */
+				b43_phy_mask(dev, val_addr, ~e->val_mask);
+		} else {
+			if (!core || (core & (1 << i))) {
+				b43_phy_set(dev, en_addr, en_mask);
+				if (e)
+					b43_phy_maskset(dev, val_addr, ~e->val_mask, (value << e->val_shift));
+			}
+		}
+	}
+}
+
 /* http://bcm-v4.sipsolutions.net/802.11/PHY/N/RFCtrlOverride */
 static void b43_nphy_rf_control_override(struct b43_wldev *dev, u16 field,
 						u16 value, u8 core, bool off)
@@ -2219,11 +2259,11 @@ static void b43_nphy_workarounds_rev7plus(struct b43_wldev *dev)
 			b43_ntab_write(dev, B43_NTAB16(7, 0x159 + core * 16),
 				       rx2tx_lut_40_11n);
 		}
-		/* b43_nphy_rf_control_override_rev7(dev, 16, 1, 3, 0, 2); */
+		b43_nphy_rf_control_override_rev7(dev, 16, 1, 3, false, 2);
 	}
 	b43_phy_write(dev, 0x32F, 0x3);
 	if (phy->radio_rev == 4 || phy->radio_rev == 6)
-		; /* b43_nphy_rf_control_override_rev7(dev, 4, 1, 3, 0, 0); */
+		b43_nphy_rf_control_override_rev7(dev, 4, 1, 3, false, 0);
 
 	if (phy->radio_rev == 3 || phy->radio_rev == 4 || phy->radio_rev == 6) {
 		if (sprom->revision &&
@@ -3083,7 +3123,7 @@ static void b43_nphy_tx_power_ctl_idle_tssi(struct b43_wldev *dev)
 		b43_nphy_ipa_internal_tssi_setup(dev);
 
 	if (phy->rev >= 7)
-		; /* TODO: Override Rev7 with 0x2000, 0, 3, 0, 0 as arguments */
+		b43_nphy_rf_control_override_rev7(dev, 0x2000, 0, 3, false, 0);
 	else if (phy->rev >= 3)
 		b43_nphy_rf_control_override(dev, 0x2000, 0, 3, false);
 
@@ -3095,7 +3135,7 @@ static void b43_nphy_tx_power_ctl_idle_tssi(struct b43_wldev *dev)
 	b43_nphy_rssi_select(dev, 0, 0);
 
 	if (phy->rev >= 7)
-		; /* TODO: Override Rev7 with 0x2000, 0, 3, 1, 0 as arguments */
+		b43_nphy_rf_control_override_rev7(dev, 0x2000, 0, 3, true, 0);
 	else if (phy->rev >= 3)
 		b43_nphy_rf_control_override(dev, 0x2000, 0, 3, true);
 
diff --git a/drivers/net/wireless/b43/tables_nphy.c b/drivers/net/wireless/b43/tables_nphy.c
index f0d8377..97d4e27 100644
--- a/drivers/net/wireless/b43/tables_nphy.c
+++ b/drivers/net/wireless/b43/tables_nphy.c
@@ -2757,6 +2757,49 @@ const struct nphy_rf_control_override_rev3 tbl_rf_control_override_rev3[] = {
 	{ 0x00C0,  6, 0xE7, 0xF9, 0xEC, 0xFB }  /* field == 0x4000 (fls 15) */
 };
 
+/* field, val_addr_core0, val_addr_core1, val_mask, val_shift */
+static const struct nphy_rf_control_override_rev7
+			tbl_rf_control_override_rev7_over0[] = {
+	{ 0x0004, 0x07A, 0x07D, 0x0002, 1 },
+	{ 0x0008, 0x07A, 0x07D, 0x0004, 2 },
+	{ 0x0010, 0x07A, 0x07D, 0x0010, 4 },
+	{ 0x0020, 0x07A, 0x07D, 0x0020, 5 },
+	{ 0x0040, 0x07A, 0x07D, 0x0040, 6 },
+	{ 0x0080, 0x0F8, 0x0FA, 0x0080, 7 },
+	{ 0x0400, 0x0F8, 0x0FA, 0x0070, 4 },
+	{ 0x0800, 0x07B, 0x07E, 0xFFFF, 0 },
+	{ 0x1000, 0x07C, 0x07F, 0xFFFF, 0 },
+	{ 0x6000, 0x348, 0x349, 0xFFFF, 0 },
+	{ 0x2000, 0x348, 0x349, 0x000F, 0 },
+};
+
+/* field, val_addr_core0, val_addr_core1, val_mask, val_shift */
+static const struct nphy_rf_control_override_rev7
+			tbl_rf_control_override_rev7_over1[] = {
+	{ 0x0002, 0x340, 0x341, 0x0002, 1 },
+	{ 0x0008, 0x340, 0x341, 0x0008, 3 },
+	{ 0x0020, 0x340, 0x341, 0x0020, 5 },
+	{ 0x0010, 0x340, 0x341, 0x0010, 4 },
+	{ 0x0004, 0x340, 0x341, 0x0004, 2 },
+	{ 0x0080, 0x340, 0x341, 0x0700, 8 },
+	{ 0x0800, 0x340, 0x341, 0x4000, 14 },
+	{ 0x0400, 0x340, 0x341, 0x2000, 13 },
+	{ 0x0200, 0x340, 0x341, 0x0800, 12 },
+	{ 0x0100, 0x340, 0x341, 0x0100, 11 },
+	{ 0x0040, 0x340, 0x341, 0x0040, 6 },
+	{ 0x0001, 0x340, 0x341, 0x0001, 0 },
+};
+
+/* field, val_addr_core0, val_addr_core1, val_mask, val_shift */
+static const struct nphy_rf_control_override_rev7
+			tbl_rf_control_override_rev7_over2[] = {
+	{ 0x0008, 0x344, 0x345, 0x0008, 3 },
+	{ 0x0002, 0x344, 0x345, 0x0002, 1 },
+	{ 0x0001, 0x344, 0x345, 0x0001, 0 },
+	{ 0x0004, 0x344, 0x345, 0x0004, 2 },
+	{ 0x0010, 0x344, 0x345, 0x0010, 4 },
+};
+
 struct nphy_gain_ctl_workaround_entry nphy_gain_ctl_wa_phy6_radio11_ghz2 = {
 	{ 10, 14, 19, 27 },
 	{ -5, 6, 10, 15 },
@@ -3248,3 +3291,35 @@ struct nphy_gain_ctl_workaround_entry *b43_nphy_get_gain_ctl_workaround_ent(
 
 	return e;
 }
+
+const struct nphy_rf_control_override_rev7 *b43_nphy_get_rf_ctl_over_rev7(
+	struct b43_wldev *dev, u16 field, u8 override)
+{
+	const struct nphy_rf_control_override_rev7 *e;
+	u8 size, i;
+
+	switch (override) {
+	case 0:
+		e = tbl_rf_control_override_rev7_over0;
+		size = ARRAY_SIZE(tbl_rf_control_override_rev7_over0);
+		break;
+	case 1:
+		e = tbl_rf_control_override_rev7_over1;
+		size = ARRAY_SIZE(tbl_rf_control_override_rev7_over1);
+		break;
+	case 2:
+		e = tbl_rf_control_override_rev7_over2;
+		size = ARRAY_SIZE(tbl_rf_control_override_rev7_over2);
+		break;
+	default:
+		b43err(dev->wl, "Invalid override value %d\n", override);
+		return NULL;
+	}
+
+	for (i = 0; i < size; i++) {
+		if (e[i].field == field)
+			return &e[i];
+	}
+
+	return NULL;
+}
diff --git a/drivers/net/wireless/b43/tables_nphy.h b/drivers/net/wireless/b43/tables_nphy.h
index f348953..c600700 100644
--- a/drivers/net/wireless/b43/tables_nphy.h
+++ b/drivers/net/wireless/b43/tables_nphy.h
@@ -35,6 +35,14 @@ struct nphy_rf_control_override_rev3 {
 	u8 val_addr1;
 };
 
+struct nphy_rf_control_override_rev7 {
+	u16 field;
+	u16 val_addr_core0;
+	u16 val_addr_core1;
+	u16 val_mask;
+	u8 val_shift;
+};
+
 struct nphy_gain_ctl_workaround_entry {
 	s8 lna1_gain[4];
 	s8 lna2_gain[4];
@@ -202,5 +210,7 @@ extern const struct nphy_rf_control_override_rev2
 	tbl_rf_control_override_rev2[];
 extern const struct nphy_rf_control_override_rev3
 	tbl_rf_control_override_rev3[];
+const struct nphy_rf_control_override_rev7 *b43_nphy_get_rf_ctl_over_rev7(
+	struct b43_wldev *dev, u16 field, u8 override);
 
 #endif /* B43_TABLES_NPHY_H_ */
-- 
1.7.7



From thomas at net.t-labs.tu-berlin.de  Thu Jul 26 05:27:40 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Thu, 26 Jul 2012 11:27:40 +0200
Subject: [PATCH v5] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343283856.4611.1.camel@jlt3.sipsolutions.net>
References: <1343161108-6941-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120724_221843_511093_701FFAF2)
 <1343208990.4463.25.camel@jlt3.sipsolutions.net>
 (sfid-20120725_113644_599580_8AC4476F)
 <1343220625.4463.31.camel@jlt3.sipsolutions.net>
 <500FEDDD.206@net.t-labs.tu-berlin.de>
 <1343244302.3750.44.camel@cumari.coelho.fi>
 <1343283856.4611.1.camel@jlt3.sipsolutions.net>
Message-ID: <50110D8C.3010705@net.t-labs.tu-berlin.de>

Hi Johannes,

On my Linux box I applied and compiled the current v5 version of the
patch successfully. On top of the following freshly checked out git
repos I put the remove-sta patch:

(1)
url =
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-testing.git

last commit 80f3bc801e351ee7f71de67a3939dd7628cdb195


(2)
url = git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git

last commit e4cbd6542efdab97ed6d38e706b7cac51c68ced7

Did you had anything different when you tried to compile it as I can not
reproduce the compile error here on my side.

Greetings Thomas


From johannes at sipsolutions.net  Thu Jul 26 07:57:38 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Thu, 26 Jul 2012 13:57:38 +0200
Subject: [PATCH v5] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <50110D8C.3010705@net.t-labs.tu-berlin.de>
References: <1343161108-6941-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120724_221843_511093_701FFAF2)
 <1343208990.4463.25.camel@jlt3.sipsolutions.net>
 (sfid-20120725_113644_599580_8AC4476F)
 <1343220625.4463.31.camel@jlt3.sipsolutions.net>
 <500FEDDD.206@net.t-labs.tu-berlin.de>
 <1343244302.3750.44.camel@cumari.coelho.fi>
 <1343283856.4611.1.camel@jlt3.sipsolutions.net>
 <50110D8C.3010705@net.t-labs.tu-berlin.de>
Message-ID: <1343303858.4477.1.camel@jlt3.sipsolutions.net>

On Thu, 2012-07-26 at 11:27 +0200, Thomas Huehn wrote:

> (2)
> url = git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
> 
> last commit e4cbd6542efdab97ed6d38e706b7cac51c68ced7

I'm on this commit + your patch.

  CC [M]  drivers/net/wireless/ti/wlcore/main.o
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/main.c: In function ?wl1271_op_tx?:
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/main.c:1202:39: error: ?sta? undeclared (first use in this function)
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/main.c:1202:39: note: each undeclared identifier is reported only once for each function it appears in
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/main.c:1202:2: error: too many arguments to function ?wl12xx_tx_get_hlid?
In file included from /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/main.c:43:0:
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.h:248:4: note: declared here


johannes



From thomas at net.t-labs.tu-berlin.de  Thu Jul 26 09:36:19 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Thu, 26 Jul 2012 15:36:19 +0200
Subject: [PATCH v5] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343303858.4477.1.camel@jlt3.sipsolutions.net>
References: <1343161108-6941-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120724_221843_511093_701FFAF2)
 <1343208990.4463.25.camel@jlt3.sipsolutions.net>
 (sfid-20120725_113644_599580_8AC4476F)
 <1343220625.4463.31.camel@jlt3.sipsolutions.net>
 <500FEDDD.206@net.t-labs.tu-berlin.de>
 <1343244302.3750.44.camel@cumari.coelho.fi>
 <1343283856.4611.1.camel@jlt3.sipsolutions.net>
 <50110D8C.3010705@net.t-labs.tu-berlin.de>
 <1343303858.4477.1.camel@jlt3.sipsolutions.net>
Message-ID: <501147D3.2080606@net.t-labs.tu-berlin.de>

Hi Johannes,

Johannes Berg schrieb:
> On Thu, 2012-07-26 at 11:27 +0200, Thomas Huehn wrote:
>
>> (2)
>> url =
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
>>
>> last commit e4cbd6542efdab97ed6d38e706b7cac51c68ced7
>
> I'm on this commit + your patch.
>
>   CC [M]  drivers/net/wireless/ti/wlcore/main.o
> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/main.c: In
function ?wl1271_op_tx?:
>
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/main.c:1202:39:
error: ?sta? undeclared (first use in this function)
>
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/main.c:1202:39:
note: each undeclared identifier is reported only once for each function
it appears in
>
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/main.c:1202:2: error:
too many arguments to function ?wl12xx_tx_get_hlid?
> In file included from
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/main.c:43:0:
> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.h:248:4:
note: declared here
>

In my build env I missed the wl12xx tick under the TI submenu ... I will
fix that bug and send a v6.

Greetings Thomas


From thomas at net.t-labs.tu-berlin.de  Thu Jul 26 12:09:21 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Thu, 26 Jul 2012 18:09:21 +0200
Subject: [PATCH v6] mac80211: Remove control.sta from struct ieee80211_tx_info
 and restructure tx-path
Message-ID: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>

The pointer control.sta is removed from ieee80211_tx_info to free up
sufficient memory in SKB_CB on the tx-path to enable new annotations
per data packet e.g.support of upcoming Transmit Power Control (TPC).
Now the control.sta pointer is put on the stack where passed as
function parameter to the .tx equivalent (ieee80211_ops) of each
affected wireless driver.
Therefore a new structure ieee80211_tx_control is added to mac80211.h
which holds the sta structure instead. The tx-path of all affected
drivers is restructured to respect the chaneges.

Signed-off-by: Thomas Huehn <thomas at net.t-labs.tu-berlin.de>
Signed-off-by: Alina Friedrichsen <x-alina at gmx.net>
Signed-off-by: Felix Fietkau <nbd at openwrt.org>
---
restructure this patch to respect logical API evolutions. thx to Johannes Berg
add missing drivers that are effected as well. thx to Xose Vazquez Perez
add missing drivers that are effected as well. thx to Johannes Berg
simplified control pointer passing in tx.c - thx to Johannes Berg
add missing TI driver. thx to Johannes Berg
---
 drivers/net/wireless/adm8211.c                     |  4 ++-
 drivers/net/wireless/at76c50x-usb.c                |  4 ++-
 drivers/net/wireless/ath/ath5k/mac80211-ops.c      |  3 ++-
 drivers/net/wireless/ath/ath9k/ath9k.h             |  1 +
 drivers/net/wireless/ath/ath9k/htc.h               |  1 +
 drivers/net/wireless/ath/ath9k/htc_drv_beacon.c    |  2 +-
 drivers/net/wireless/ath/ath9k/htc_drv_main.c      |  6 +++--
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c      |  2 +-
 drivers/net/wireless/ath/ath9k/main.c              |  5 +++-
 drivers/net/wireless/ath/ath9k/xmit.c              |  9 ++++---
 drivers/net/wireless/ath/carl9170/carl9170.h       |  4 ++-
 drivers/net/wireless/ath/carl9170/tx.c             | 16 ++++++------
 drivers/net/wireless/b43/main.c                    |  3 ++-
 drivers/net/wireless/b43legacy/main.c              |  1 +
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  6 +++--
 drivers/net/wireless/iwlegacy/3945-mac.c           | 12 ++++++---
 drivers/net/wireless/iwlegacy/4965-mac.c           | 26 +++++++++++--------
 drivers/net/wireless/iwlegacy/4965.h               |  8 ++++--
 drivers/net/wireless/iwlwifi/dvm/agn.h             |  4 ++-
 drivers/net/wireless/iwlwifi/dvm/mac80211.c        |  6 +++--
 drivers/net/wireless/iwlwifi/dvm/tx.c              | 16 ++++++------
 drivers/net/wireless/libertas_tf/main.c            |  4 ++-
 drivers/net/wireless/mac80211_hwsim.c              |  8 +++---
 drivers/net/wireless/mwl8k.c                       | 17 +++++++------
 drivers/net/wireless/p54/lmac.h                    |  4 ++-
 drivers/net/wireless/p54/main.c                    |  2 +-
 drivers/net/wireless/p54/txrx.c                    | 15 ++++++-----
 drivers/net/wireless/rt2x00/rt2x00.h               |  4 ++-
 drivers/net/wireless/rt2x00/rt2x00dev.c            |  2 +-
 drivers/net/wireless/rt2x00/rt2x00mac.c            |  4 ++-
 drivers/net/wireless/rt2x00/rt2x00queue.c          | 20 ++++++++-------
 drivers/net/wireless/rtl818x/rtl8180/dev.c         |  6 +++--
 drivers/net/wireless/rtl818x/rtl8187/dev.c         |  6 +++--
 drivers/net/wireless/rtlwifi/base.c                |  3 +--
 drivers/net/wireless/rtlwifi/core.c                |  8 +++---
 drivers/net/wireless/rtlwifi/pci.c                 | 16 ++++++------
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.c       |  5 ++--
 drivers/net/wireless/rtlwifi/rtl8192ce/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.c       |  5 ++--
 drivers/net/wireless/rtlwifi/rtl8192cu/trx.h       |  4 ++-
 drivers/net/wireless/rtlwifi/rtl8192de/trx.c       |  5 ++--
 drivers/net/wireless/rtlwifi/rtl8192de/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/rtl8192se/trx.c       |  5 ++--
 drivers/net/wireless/rtlwifi/rtl8192se/trx.h       |  1 +
 drivers/net/wireless/rtlwifi/usb.c                 | 15 +++++++----
 drivers/net/wireless/rtlwifi/wifi.h                | 13 +++++++---
 drivers/net/wireless/ti/wl1251/main.c              |  4 ++-
 drivers/net/wireless/ti/wlcore/main.c              |  6 +++--
 drivers/net/wireless/ti/wlcore/tx.c                | 29 +++++++++++++++-------
 drivers/net/wireless/ti/wlcore/tx.h                |  4 +--
 drivers/net/wireless/zd1211rw/zd_mac.c             |  6 +++--
 drivers/staging/winbond/wbusb.c                    |  4 ++-
 include/net/mac80211.h                             | 20 +++++++++++----
 net/mac80211/driver-ops.h                          |  6 +++--
 net/mac80211/tx.c                                  | 12 ++++-----
 55 files changed, 257 insertions(+), 147 deletions(-)

diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index 0ac09a2..b661ce2 100644
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
@@ -1661,7 +1661,9 @@ static void adm8211_tx_raw(struct ieee80211_hw *dev, struct sk_buff *skb,
 }
 
 /* Put adm8211_tx_hdr on skb and transmit */
-static void adm8211_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void adm8211_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct adm8211_tx_hdr *txhdr;
 	size_t payload_len, hdrlen;
diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index efc162e..abb520d 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -1726,7 +1726,9 @@ static void at76_mac80211_tx_callback(struct urb *urb)
 	ieee80211_wake_queues(priv->hw);
 }
 
-static void at76_mac80211_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void at76_mac80211_tx(struct ieee80211_hw *hw,
+			     struct ieee80211_tx_control *control,
+			     struct sk_buff *skb)
 {
 	struct at76_priv *priv = hw->priv;
 	struct at76_tx_buffer *tx_buffer = priv->bulk_out_buffer;
diff --git a/drivers/net/wireless/ath/ath5k/mac80211-ops.c b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
index 260e7dc..934f04c 100644
--- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
+++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
@@ -55,7 +55,8 @@
 \********************/
 
 static void
-ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+ath5k_tx(struct ieee80211_hw *hw, struct ieee80211_tx_control *control,
+	 struct sk_buff *skb)
 {
 	struct ath5k_hw *ah = hw->priv;
 	u16 qnum = skb_get_queue_mapping(skb);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index b09285c..7373e4b 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -280,6 +280,7 @@ struct ath_tx_control {
 	struct ath_txq *txq;
 	struct ath_node *an;
 	u8 paprd;
+	struct ieee80211_sta *sta;
 };
 
 #define ATH_TX_ERROR        0x01
diff --git a/drivers/net/wireless/ath/ath9k/htc.h b/drivers/net/wireless/ath/ath9k/htc.h
index 936e920..b30596f 100644
--- a/drivers/net/wireless/ath/ath9k/htc.h
+++ b/drivers/net/wireless/ath/ath9k/htc.h
@@ -542,6 +542,7 @@ void ath9k_htc_stop_ani(struct ath9k_htc_priv *priv);
 
 int ath9k_tx_init(struct ath9k_htc_priv *priv);
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb, u8 slot, bool is_cab);
 void ath9k_tx_cleanup(struct ath9k_htc_priv *priv);
 bool ath9k_htc_txq_setup(struct ath9k_htc_priv *priv, int subtype);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
index 77d541f..f42d2eb 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_beacon.c
@@ -326,7 +326,7 @@ static void ath9k_htc_send_buffered(struct ath9k_htc_priv *priv,
 			goto next;
 		}
 
-		ret = ath9k_htc_tx_start(priv, skb, tx_slot, true);
+		ret = ath9k_htc_tx_start(priv, NULL, skb, tx_slot, true);
 		if (ret != 0) {
 			ath9k_htc_tx_clear_slot(priv, tx_slot);
 			dev_kfree_skb_any(skb);
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index c785129..8a0ccf7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -856,7 +856,9 @@ set_timer:
 /* mac80211 Callbacks */
 /**********************/
 
-static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_htc_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct ath9k_htc_priv *priv = hw->priv;
@@ -883,7 +885,7 @@ static void ath9k_htc_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto fail_tx;
 	}
 
-	ret = ath9k_htc_tx_start(priv, skb, slot, false);
+	ret = ath9k_htc_tx_start(priv, control->sta, skb, slot, false);
 	if (ret != 0) {
 		ath_dbg(common, XMIT, "Tx failed\n");
 		goto clear_slot;
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 47e61d0..06cdcb7 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -333,12 +333,12 @@ static void ath9k_htc_tx_data(struct ath9k_htc_priv *priv,
 }
 
 int ath9k_htc_tx_start(struct ath9k_htc_priv *priv,
+		       struct ieee80211_sta *sta,
 		       struct sk_buff *skb,
 		       u8 slot, bool is_cab)
 {
 	struct ieee80211_hdr *hdr;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_vif *vif = tx_info->control.vif;
 	struct ath9k_htc_sta *ista;
 	struct ath9k_htc_vif *avp = NULL;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 6049d8b..4d8dc9f 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -694,7 +694,9 @@ mutex_unlock:
 	return r;
 }
 
-static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void ath9k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct ath_softc *sc = hw->priv;
 	struct ath_common *common = ath9k_hw_common(sc->sc_ah);
@@ -754,6 +756,7 @@ static void ath9k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	memset(&txctl, 0, sizeof(struct ath_tx_control));
 	txctl.txq = sc->tx.txq_map[skb_get_queue_mapping(skb)];
+	txctl.sta = control->sta;
 
 	ath_dbg(common, XMIT, "transmitting packet, skb: %p\n", skb);
 
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 2c9da6b..ef91f6c 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1773,11 +1773,12 @@ static void ath_tx_send_normal(struct ath_softc *sc, struct ath_txq *txq,
 	TX_STAT_INC(txq->axq_qnum, queued);
 }
 
-static void setup_frame_info(struct ieee80211_hw *hw, struct sk_buff *skb,
+static void setup_frame_info(struct ieee80211_hw *hw,
+			     struct ieee80211_sta *sta,
+			     struct sk_buff *skb,
 			     int framelen)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = tx_info->control.sta;
 	struct ieee80211_key_conf *hw_key = tx_info->control.hw_key;
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	const struct ieee80211_rate *rate;
@@ -1935,7 +1936,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
+	struct ieee80211_sta *sta = txctl->sta;
 	struct ieee80211_vif *vif = info->control.vif;
 	struct ath_softc *sc = hw->priv;
 	struct ath_txq *txq = txctl->txq;
@@ -1979,7 +1980,7 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb,
 	    !ieee80211_is_data(hdr->frame_control))
 		info->flags |= IEEE80211_TX_CTL_CLEAR_PS_FILT;
 
-	setup_frame_info(hw, skb, frmlen);
+	setup_frame_info(hw, sta, skb, frmlen);
 
 	/*
 	 * At this point, the vif, hw_key and sta pointers in the tx control
diff --git a/drivers/net/wireless/ath/carl9170/carl9170.h b/drivers/net/wireless/ath/carl9170/carl9170.h
index 376be11..8f0cbc3 100644
--- a/drivers/net/wireless/ath/carl9170/carl9170.h
+++ b/drivers/net/wireless/ath/carl9170/carl9170.h
@@ -577,7 +577,9 @@ void carl9170_rx(struct ar9170 *ar, void *buf, unsigned int len);
 void carl9170_handle_command_response(struct ar9170 *ar, void *buf, u32 len);
 
 /* TX */
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb);
 void carl9170_tx_janitor(struct work_struct *work);
 void carl9170_tx_process_status(struct ar9170 *ar,
 				const struct carl9170_rsp *cmd);
diff --git a/drivers/net/wireless/ath/carl9170/tx.c b/drivers/net/wireless/ath/carl9170/tx.c
index 6a86814..84377cf 100644
--- a/drivers/net/wireless/ath/carl9170/tx.c
+++ b/drivers/net/wireless/ath/carl9170/tx.c
@@ -867,14 +867,15 @@ static bool carl9170_tx_cts_check(struct ar9170 *ar,
 	return false;
 }
 
-static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
+static int carl9170_tx_prepare(struct ar9170 *ar,
+			       struct ieee80211_sta *sta,
+			       struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr;
 	struct _carl9170_tx_superframe *txc;
 	struct carl9170_vif_info *cvif;
 	struct ieee80211_tx_info *info;
 	struct ieee80211_tx_rate *txrate;
-	struct ieee80211_sta *sta;
 	struct carl9170_tx_info *arinfo;
 	unsigned int hw_queue;
 	int i;
@@ -910,8 +911,6 @@ static int carl9170_tx_prepare(struct ar9170 *ar, struct sk_buff *skb)
 	else
 		cvif = NULL;
 
-	sta = info->control.sta;
-
 	txc = (void *)skb_push(skb, sizeof(*txc));
 	memset(txc, 0, sizeof(*txc));
 
@@ -1457,20 +1456,21 @@ err_unlock_rcu:
 	return false;
 }
 
-void carl9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void carl9170_op_tx(struct ieee80211_hw *hw,
+		    struct ieee80211_tx_control *control,
+		    struct sk_buff *skb)
 {
 	struct ar9170 *ar = hw->priv;
 	struct ieee80211_tx_info *info;
-	struct ieee80211_sta *sta;
+	struct ieee80211_sta *sta = control->sta;
 	bool run;
 
 	if (unlikely(!IS_STARTED(ar)))
 		goto err_free;
 
 	info = IEEE80211_SKB_CB(skb);
-	sta = info->control.sta;
 
-	if (unlikely(carl9170_tx_prepare(ar, skb)))
+	if (unlikely(carl9170_tx_prepare(ar, sta, skb)))
 		goto err_free;
 
 	carl9170_tx_accounting(ar, skb);
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index b80352b..2ca4e88 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -3407,7 +3407,8 @@ static void b43_tx_work(struct work_struct *work)
 }
 
 static void b43_op_tx(struct ieee80211_hw *hw,
-		     struct sk_buff *skb)
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct b43_wl *wl = hw_to_b43_wl(hw);
 
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 8156135..74d4c20 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -2492,6 +2492,7 @@ static void b43legacy_tx_work(struct work_struct *work)
 }
 
 static void b43legacy_op_tx(struct ieee80211_hw *hw,
+			    struct ieee80211_tx_control *control,
 			    struct sk_buff *skb)
 {
 	struct b43legacy_wl *wl = hw_to_b43legacy_wl(hw);
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 9e79d47..a7be68d 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -264,7 +264,9 @@ static void brcms_set_basic_rate(struct brcm_rateset *rs, u16 rate, bool is_br)
 	}
 }
 
-static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void brcms_ops_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct brcms_info *wl = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -276,7 +278,7 @@ static void brcms_ops_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		goto done;
 	}
 	brcms_c_sendpkt_mac80211(wl->wlc, skb, hw);
-	tx_info->rate_driver_data[0] = tx_info->control.sta;
+	tx_info->rate_driver_data[0] = control->sta;
  done:
 	spin_unlock_bh(&wl->lock);
 }
diff --git a/drivers/net/wireless/iwlegacy/3945-mac.c b/drivers/net/wireless/iwlegacy/3945-mac.c
index faec404..e252acb 100644
--- a/drivers/net/wireless/iwlegacy/3945-mac.c
+++ b/drivers/net/wireless/iwlegacy/3945-mac.c
@@ -460,7 +460,9 @@ il3945_build_tx_cmd_basic(struct il_priv *il, struct il_device_cmd *cmd,
  * start C_TX command process
  */
 static int
-il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il3945_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -512,7 +514,7 @@ il3945_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	hdr_len = ieee80211_hdrlen(fc);
 
 	/* Find idx into station table for destination station */
-	sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+	sta_id = il_sta_id_or_broadcast(il, sta);
 	if (sta_id == IL_INVALID_STATION) {
 		D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
 		goto drop;
@@ -2859,7 +2861,9 @@ il3945_mac_stop(struct ieee80211_hw *hw)
 }
 
 static void
-il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il3945_mac_tx(struct ieee80211_hw *hw,
+	       struct ieee80211_tx_control *control,
+	       struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -2868,7 +2872,7 @@ il3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il3945_tx_skb(il, skb))
+	if (il3945_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MAC80211("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965-mac.c b/drivers/net/wireless/iwlegacy/4965-mac.c
index 34f61a0..eac4dc8 100644
--- a/drivers/net/wireless/iwlegacy/4965-mac.c
+++ b/drivers/net/wireless/iwlegacy/4965-mac.c
@@ -1526,8 +1526,11 @@ il4965_tx_cmd_build_basic(struct il_priv *il, struct sk_buff *skb,
 }
 
 static void
-il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
-			 struct ieee80211_tx_info *info, __le16 fc)
+il4965_tx_cmd_build_rate(struct il_priv *il,
+			 struct il_tx_cmd *tx_cmd,
+			 struct ieee80211_tx_info *info,
+			 struct ieee80211_sta *sta,
+			 __le16 fc)
 {
 	const u8 rts_retry_limit = 60;
 	u32 rate_flags;
@@ -1561,9 +1564,7 @@ il4965_tx_cmd_build_rate(struct il_priv *il, struct il_tx_cmd *tx_cmd,
 	rate_idx = info->control.rates[0].idx;
 	if ((info->control.rates[0].flags & IEEE80211_TX_RC_MCS) || rate_idx < 0
 	    || rate_idx > RATE_COUNT_LEGACY)
-		rate_idx =
-		    rate_lowest_index(&il->bands[info->band],
-				      info->control.sta);
+		rate_idx = rate_lowest_index(&il->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IL_FIRST_OFDM_RATE;
@@ -1630,11 +1631,12 @@ il4965_tx_cmd_build_hwcrypto(struct il_priv *il, struct ieee80211_tx_info *info,
  * start C_TX command process
  */
 int
-il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
+il4965_tx_skb(struct il_priv *il,
+	      struct ieee80211_sta *sta,
+	      struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct il_station_priv *sta_priv = NULL;
 	struct il_tx_queue *txq;
 	struct il_queue *q;
@@ -1680,7 +1682,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 		sta_id = il->hw_params.bcast_id;
 	else {
 		/* Find idx into station table for destination station */
-		sta_id = il_sta_id_or_broadcast(il, info->control.sta);
+		sta_id = il_sta_id_or_broadcast(il, sta);
 
 		if (sta_id == IL_INVALID_STATION) {
 			D_DROP("Dropping - INVALID STATION: %pM\n", hdr->addr1);
@@ -1786,7 +1788,7 @@ il4965_tx_skb(struct il_priv *il, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	il4965_tx_cmd_build_basic(il, skb, tx_cmd, info, hdr, sta_id);
 
-	il4965_tx_cmd_build_rate(il, tx_cmd, info, fc);
+	il4965_tx_cmd_build_rate(il, tx_cmd, info, sta, fc);
 
 	il_update_stats(il, true, fc, len);
 	/*
@@ -5828,7 +5830,9 @@ il4965_mac_stop(struct ieee80211_hw *hw)
 }
 
 void
-il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+il4965_mac_tx(struct ieee80211_hw *hw,
+	      struct ieee80211_tx_control *control,
+	      struct sk_buff *skb)
 {
 	struct il_priv *il = hw->priv;
 
@@ -5837,7 +5841,7 @@ il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	D_TX("dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 	     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (il4965_tx_skb(il, skb))
+	if (il4965_tx_skb(il, control->sta, skb))
 		dev_kfree_skb_any(skb);
 
 	D_MACDUMP("leave\n");
diff --git a/drivers/net/wireless/iwlegacy/4965.h b/drivers/net/wireless/iwlegacy/4965.h
index 1db6776..2d092f3 100644
--- a/drivers/net/wireless/iwlegacy/4965.h
+++ b/drivers/net/wireless/iwlegacy/4965.h
@@ -78,7 +78,9 @@ int il4965_hw_txq_attach_buf_to_tfd(struct il_priv *il, struct il_tx_queue *txq,
 int il4965_hw_tx_queue_init(struct il_priv *il, struct il_tx_queue *txq);
 void il4965_hwrate_to_tx_control(struct il_priv *il, u32 rate_n_flags,
 				 struct ieee80211_tx_info *info);
-int il4965_tx_skb(struct il_priv *il, struct sk_buff *skb);
+int il4965_tx_skb(struct il_priv *il,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int il4965_tx_agg_start(struct il_priv *il, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 * ssn);
 int il4965_tx_agg_stop(struct il_priv *il, struct ieee80211_vif *vif,
@@ -163,7 +165,9 @@ void il4965_eeprom_release_semaphore(struct il_priv *il);
 int il4965_eeprom_check_version(struct il_priv *il);
 
 /* mac80211 handlers (for 4965) */
-void il4965_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void il4965_mac_tx(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 int il4965_mac_start(struct ieee80211_hw *hw);
 void il4965_mac_stop(struct ieee80211_hw *hw);
 void il4965_configure_filter(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/iwlwifi/dvm/agn.h b/drivers/net/wireless/iwlwifi/dvm/agn.h
index 9bb16bd..f0b8c1f 100644
--- a/drivers/net/wireless/iwlwifi/dvm/agn.h
+++ b/drivers/net/wireless/iwlwifi/dvm/agn.h
@@ -201,7 +201,9 @@ void iwl_chswitch_done(struct iwl_priv *priv, bool is_success);
 
 
 /* tx */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb);
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb);
 int iwlagn_tx_agg_start(struct iwl_priv *priv, struct ieee80211_vif *vif,
 			struct ieee80211_sta *sta, u16 tid, u16 *ssn);
 int iwlagn_tx_agg_oper(struct iwl_priv *priv, struct ieee80211_vif *vif,
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index a5f7bce..e64af60 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -511,14 +511,16 @@ static void iwlagn_mac_set_wakeup(struct ieee80211_hw *hw, bool enabled)
 }
 #endif
 
-static void iwlagn_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void iwlagn_mac_tx(struct ieee80211_hw *hw,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
 	struct iwl_priv *priv = IWL_MAC80211_GET_DVM(hw);
 
 	IWL_DEBUG_TX(priv, "dev->xmit(%d bytes) at rate 0x%02x\n", skb->len,
 		     ieee80211_get_tx_rate(hw, IEEE80211_SKB_CB(skb))->bitrate);
 
-	if (iwlagn_tx_skb(priv, skb))
+	if (iwlagn_tx_skb(priv, control->sta, skb))
 		dev_kfree_skb_any(skb);
 }
 
diff --git a/drivers/net/wireless/iwlwifi/dvm/tx.c b/drivers/net/wireless/iwlwifi/dvm/tx.c
index 5971a23..d17799b 100644
--- a/drivers/net/wireless/iwlwifi/dvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/dvm/tx.c
@@ -127,6 +127,7 @@ static void iwlagn_tx_cmd_build_basic(struct iwl_priv *priv,
 static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 				     struct iwl_tx_cmd *tx_cmd,
 				     struct ieee80211_tx_info *info,
+				     struct ieee80211_sta *sta,
 				     __le16 fc)
 {
 	u32 rate_flags;
@@ -187,8 +188,7 @@ static void iwlagn_tx_cmd_build_rate(struct iwl_priv *priv,
 	if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS ||
 			(rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY))
 		rate_idx = rate_lowest_index(
-				&priv->eeprom_data->bands[info->band],
-				info->control.sta);
+				&priv->eeprom_data->bands[info->band], sta);
 	/* For 5 GHZ band, remap mac80211 rate indices into driver indices */
 	if (info->band == IEEE80211_BAND_5GHZ)
 		rate_idx += IWL_FIRST_OFDM_RATE;
@@ -291,7 +291,9 @@ static int iwl_sta_id_or_broadcast(struct iwl_rxon_context *context,
 /*
  * start REPLY_TX command process
  */
-int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
+int iwlagn_tx_skb(struct iwl_priv *priv,
+		  struct ieee80211_sta *sta,
+		  struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -345,7 +347,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 		sta_id = ctx->bcast_sta_id;
 	else {
 		/* Find index into station table for destination station */
-		sta_id = iwl_sta_id_or_broadcast(ctx, info->control.sta);
+		sta_id = iwl_sta_id_or_broadcast(ctx, sta);
 		if (sta_id == IWL_INVALID_STATION) {
 			IWL_DEBUG_DROP(priv, "Dropping - INVALID STATION: %pM\n",
 				       hdr->addr1);
@@ -355,8 +357,8 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 
 	IWL_DEBUG_TX(priv, "station Id %d\n", sta_id);
 
-	if (info->control.sta)
-		sta_priv = (void *)info->control.sta->drv_priv;
+	if (sta)
+		sta_priv = (void *)sta->drv_priv;
 
 	if (sta_priv && sta_priv->asleep &&
 	    (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)) {
@@ -397,7 +399,7 @@ int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	/* TODO need this for burst mode later on */
 	iwlagn_tx_cmd_build_basic(priv, skb, tx_cmd, info, hdr, sta_id);
 
-	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, fc);
+	iwlagn_tx_cmd_build_rate(priv, tx_cmd, info, sta, fc);
 
 	memset(&info->status, 0, sizeof(info->status));
 
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index a034572..7001856 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -227,7 +227,9 @@ static void lbtf_free_adapter(struct lbtf_private *priv)
 	lbtf_deb_leave(LBTF_DEB_MAIN);
 }
 
-static void lbtf_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void lbtf_op_tx(struct ieee80211_hw *hw,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct lbtf_private *priv = hw->priv;
 
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 826ac7b..ff20dbb 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -709,7 +709,9 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
 	return ack;
 }
 
-static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mac80211_hwsim_tx(struct ieee80211_hw *hw,
+			      struct ieee80211_tx_control *control,
+			      struct sk_buff *skb)
 {
 	bool ack;
 	struct ieee80211_tx_info *txi;
@@ -741,8 +743,8 @@ static void mac80211_hwsim_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 
 	if (txi->control.vif)
 		hwsim_check_magic(txi->control.vif);
-	if (txi->control.sta)
-		hwsim_check_sta_magic(txi->control.sta);
+	if (control->sta)
+		hwsim_check_sta_magic(control->sta);
 
 	ieee80211_tx_info_clear_status(txi);
 
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c
index 224e03a..5099e53 100644
--- a/drivers/net/wireless/mwl8k.c
+++ b/drivers/net/wireless/mwl8k.c
@@ -1830,12 +1830,14 @@ static inline void mwl8k_tx_count_packet(struct ieee80211_sta *sta, u8 tid)
 }
 
 static void
-mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
+mwl8k_txq_xmit(struct ieee80211_hw *hw,
+	       int index,
+	       struct ieee80211_sta *sta,
+	       struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	struct ieee80211_tx_info *tx_info;
 	struct mwl8k_vif *mwl8k_vif;
-	struct ieee80211_sta *sta;
 	struct ieee80211_hdr *wh;
 	struct mwl8k_tx_queue *txq;
 	struct mwl8k_tx_desc *tx;
@@ -1867,7 +1869,6 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	wh = &((struct mwl8k_dma_data *)skb->data)->wh;
 
 	tx_info = IEEE80211_SKB_CB(skb);
-	sta = tx_info->control.sta;
 	mwl8k_vif = MWL8K_VIF(tx_info->control.vif);
 
 	if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
@@ -2019,8 +2020,8 @@ mwl8k_txq_xmit(struct ieee80211_hw *hw, int index, struct sk_buff *skb)
 	tx->pkt_phys_addr = cpu_to_le32(dma);
 	tx->pkt_len = cpu_to_le16(skb->len);
 	tx->rate_info = 0;
-	if (!priv->ap_fw && tx_info->control.sta != NULL)
-		tx->peer_id = MWL8K_STA(tx_info->control.sta)->peer_id;
+	if (!priv->ap_fw && sta != NULL)
+		tx->peer_id = MWL8K_STA(sta)->peer_id;
 	else
 		tx->peer_id = 0;
 
@@ -4364,7 +4365,9 @@ static void mwl8k_rx_poll(unsigned long data)
 /*
  * Core driver operations.
  */
-static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void mwl8k_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct mwl8k_priv *priv = hw->priv;
 	int index = skb_get_queue_mapping(skb);
@@ -4376,7 +4379,7 @@ static void mwl8k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 		return;
 	}
 
-	mwl8k_txq_xmit(hw, index, skb);
+	mwl8k_txq_xmit(hw, index, control->sta, skb);
 }
 
 static int mwl8k_start(struct ieee80211_hw *hw)
diff --git a/drivers/net/wireless/p54/lmac.h b/drivers/net/wireless/p54/lmac.h
index 3d8d622..de1d46b 100644
--- a/drivers/net/wireless/p54/lmac.h
+++ b/drivers/net/wireless/p54/lmac.h
@@ -526,7 +526,9 @@ int p54_init_leds(struct p54_common *priv);
 void p54_unregister_leds(struct p54_common *priv);
 
 /* xmit functions */
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb);
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int p54_tx_cancel(struct p54_common *priv, __le32 req_id);
 void p54_tx(struct p54_common *priv, struct sk_buff *skb);
 
diff --git a/drivers/net/wireless/p54/main.c b/drivers/net/wireless/p54/main.c
index 7cffea7..5e91ad0 100644
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
@@ -158,7 +158,7 @@ static int p54_beacon_update(struct p54_common *priv,
 	 * to cancel the old beacon template by hand, instead the firmware
 	 * will release the previous one through the feedback mechanism.
 	 */
-	p54_tx_80211(priv->hw, beacon);
+	p54_tx_80211(priv->hw, NULL, beacon);
 	priv->tsf_high32 = 0;
 	priv->tsf_low32 = 0;
 
diff --git a/drivers/net/wireless/p54/txrx.c b/drivers/net/wireless/p54/txrx.c
index f38786e..5861e13 100644
--- a/drivers/net/wireless/p54/txrx.c
+++ b/drivers/net/wireless/p54/txrx.c
@@ -676,8 +676,9 @@ int p54_rx(struct ieee80211_hw *dev, struct sk_buff *skb)
 EXPORT_SYMBOL_GPL(p54_rx);
 
 static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
-				struct ieee80211_tx_info *info, u8 *queue,
-				u32 *extra_len, u16 *flags, u16 *aid,
+				struct ieee80211_tx_info *info,
+				struct ieee80211_sta *sta,
+				u8 *queue, u32 *extra_len, u16 *flags, u16 *aid,
 				bool *burst_possible)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -746,8 +747,8 @@ static void p54_tx_80211_header(struct p54_common *priv, struct sk_buff *skb,
 			}
 		}
 
-		if (info->control.sta)
-			*aid = info->control.sta->aid;
+		if (sta)
+			*aid = sta->aid;
 		break;
 	}
 }
@@ -767,7 +768,9 @@ static u8 p54_convert_algo(u32 cipher)
 	}
 }
 
-void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
+void p54_tx_80211(struct ieee80211_hw *dev,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct p54_common *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -784,7 +787,7 @@ void p54_tx_80211(struct ieee80211_hw *dev, struct sk_buff *skb)
 	u8 nrates = 0, nremaining = 8;
 	bool burst_allowed = false;
 
-	p54_tx_80211_header(priv, skb, info, &queue, &extra_len,
+	p54_tx_80211_header(priv, skb, info, control->sta, &queue, &extra_len,
 			    &hdr_flags, &aid, &burst_allowed);
 
 	if (p54_tx_qos_accounting_alloc(priv, skb, queue)) {
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 8afb546..f991e8b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -1287,7 +1287,9 @@ void rt2x00lib_rxdone(struct queue_entry *entry, gfp_t gfp);
 /*
  * mac80211 handlers.
  */
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb);
 int rt2x00mac_start(struct ieee80211_hw *hw);
 void rt2x00mac_stop(struct ieee80211_hw *hw);
 int rt2x00mac_add_interface(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index a6b88bd..a59048f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -194,7 +194,7 @@ static void rt2x00lib_bc_buffer_iter(void *data, u8 *mac,
 	 */
 	skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	while (skb) {
-		rt2x00mac_tx(rt2x00dev->hw, skb);
+		rt2x00mac_tx(rt2x00dev->hw, NULL, skb);
 		skb = ieee80211_get_buffered_bc(rt2x00dev->hw, vif);
 	}
 }
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 4ff26c2..c3d0f2f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -99,7 +99,9 @@ static int rt2x00mac_tx_rts_cts(struct rt2x00_dev *rt2x00dev,
 	return retval;
 }
 
-void rt2x00mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+void rt2x00mac_tx(struct ieee80211_hw *hw,
+		  struct ieee80211_tx_control *control,
+		  struct sk_buff *skb)
 {
 	struct rt2x00_dev *rt2x00dev = hw->priv;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index f7e74a0..e488b94 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -315,6 +315,7 @@ static void rt2x00queue_create_tx_descriptor_plcp(struct rt2x00_dev *rt2x00dev,
 static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 						struct sk_buff *skb,
 						struct txentry_desc *txdesc,
+						struct ieee80211_sta *sta,
 						const struct rt2x00_rate *hwrate)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -322,11 +323,11 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 	struct rt2x00_sta *sta_priv = NULL;
 
-	if (tx_info->control.sta) {
+	if (sta) {
 		txdesc->u.ht.mpdu_density =
-		    tx_info->control.sta->ht_cap.ampdu_density;
+		    sta->ht_cap.ampdu_density;
 
-		sta_priv = sta_to_rt2x00_sta(tx_info->control.sta);
+		sta_priv = sta_to_rt2x00_sta(sta);
 		txdesc->u.ht.wcid = sta_priv->wcid;
 	}
 
@@ -341,8 +342,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 		 * MIMO PS should be set to 1 for STA's using dynamic SM PS
 		 * when using more then one tx stream (>MCS7).
 		 */
-		if (tx_info->control.sta && txdesc->u.ht.mcs > 7 &&
-		    ((tx_info->control.sta->ht_cap.cap &
+		if (sta && txdesc->u.ht.mcs > 7 &&
+		    ((sta->ht_cap.cap &
 		      IEEE80211_HT_CAP_SM_PS) >>
 		     IEEE80211_HT_CAP_SM_PS_SHIFT) ==
 		    WLAN_HT_CAP_SM_PS_DYNAMIC)
@@ -409,7 +410,8 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
 
 static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 					     struct sk_buff *skb,
-					     struct txentry_desc *txdesc)
+					     struct txentry_desc *txdesc,
+					     struct ieee80211_sta *sta)
 {
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -503,7 +505,7 @@ static void rt2x00queue_create_tx_descriptor(struct rt2x00_dev *rt2x00dev,
 
 	if (test_bit(REQUIRE_HT_TX_DESC, &rt2x00dev->cap_flags))
 		rt2x00queue_create_tx_descriptor_ht(rt2x00dev, skb, txdesc,
-						    hwrate);
+						   sta, hwrate);
 	else
 		rt2x00queue_create_tx_descriptor_plcp(rt2x00dev, skb, txdesc,
 						      hwrate);
@@ -595,7 +597,7 @@ int rt2x00queue_write_tx_frame(struct data_queue *queue, struct sk_buff *skb,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(queue->rt2x00dev, skb, &txdesc, NULL);
 
 	/*
 	 * All information is retrieved from the skb->cb array,
@@ -740,7 +742,7 @@ int rt2x00queue_update_beacon_locked(struct rt2x00_dev *rt2x00dev,
 	 * after that we are free to use the skb->cb array
 	 * for our information.
 	 */
-	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc);
+	rt2x00queue_create_tx_descriptor(rt2x00dev, intf->beacon->skb, &txdesc, NULL);
 
 	/*
 	 * Fill in skb descriptor
diff --git a/drivers/net/wireless/rtl818x/rtl8180/dev.c b/drivers/net/wireless/rtl818x/rtl8180/dev.c
index 3b50539..fd8fcbd 100644
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
@@ -244,7 +244,9 @@ static irqreturn_t rtl8180_interrupt(int irq, void *dev_id)
 	return IRQ_HANDLED;
 }
 
-static void rtl8180_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8180_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -710,7 +712,7 @@ static void rtl8180_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8180_tx(dev, skb);
+	rtl8180_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtl818x/rtl8187/dev.c b/drivers/net/wireless/rtl818x/rtl8187/dev.c
index 4fb1ca1..c7bfcf3 100644
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
@@ -228,7 +228,9 @@ static void rtl8187_tx_cb(struct urb *urb)
 	}
 }
 
-static void rtl8187_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void rtl8187_tx(struct ieee80211_hw *dev,
+		       struct ieee80211_tx_control *control,
+		       struct sk_buff *skb)
 {
 	struct rtl8187_priv *priv = dev->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1076,7 +1078,7 @@ static void rtl8187_beacon_work(struct work_struct *work)
 	/* TODO: use actual beacon queue */
 	skb_set_queue_mapping(skb, 0);
 
-	rtl8187_tx(dev, skb);
+	rtl8187_tx(dev, NULL, skb);
 
 resched:
 	/*
diff --git a/drivers/net/wireless/rtlwifi/base.c b/drivers/net/wireless/rtlwifi/base.c
index 41f7f12..1b2ffdb 100644
--- a/drivers/net/wireless/rtlwifi/base.c
+++ b/drivers/net/wireless/rtlwifi/base.c
@@ -1341,9 +1341,8 @@ int rtl_send_smps_action(struct ieee80211_hw *hw,
 		rtlpriv->cfg->ops->update_rate_tbl(hw, sta, 0);
 
 		info->control.rates[0].idx = 0;
-		info->control.sta = sta;
 		info->band = hw->conf.channel->band;
-		rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+		rtlpriv->intf_ops->adapter_tx(hw, sta, skb, &tcb_desc);
 	}
 err_free:
 	return 0;
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 278e9f9..db903fd 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -124,7 +124,9 @@ static void rtl_op_stop(struct ieee80211_hw *hw)
 	mutex_unlock(&rtlpriv->locks.conf_mutex);
 }
 
-static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void rtl_op_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
@@ -138,8 +140,8 @@ static void rtl_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	if (!test_bit(RTL_STATUS_INTERFACE_START, &rtlpriv->status))
 		goto err_free;
 
-	if (!rtlpriv->intf_ops->waitq_insert(hw, skb))
-		rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+	if (!rtlpriv->intf_ops->waitq_insert(hw, control->sta, skb))
+		rtlpriv->intf_ops->adapter_tx(hw, control->sta, skb, &tcb_desc);
 
 	return;
 
diff --git a/drivers/net/wireless/rtlwifi/pci.c b/drivers/net/wireless/rtlwifi/pci.c
index 2c6eb9e..0bde0ce 100644
--- a/drivers/net/wireless/rtlwifi/pci.c
+++ b/drivers/net/wireless/rtlwifi/pci.c
@@ -504,7 +504,7 @@ static void _rtl_pci_tx_chk_waitq(struct ieee80211_hw *hw)
 				_rtl_update_earlymode_info(hw, skb,
 							   &tcb_desc, tid);
 
-			rtlpriv->intf_ops->adapter_tx(hw, skb, &tcb_desc);
+			rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, &tcb_desc);
 		}
 	}
 }
@@ -929,7 +929,7 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)
 	info = IEEE80211_SKB_CB(pskb);
 	pdesc = &ring->desc[0];
 	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *) pdesc,
-		info, pskb, BEACON_QUEUE, &tcb_desc);
+		info, NULL, pskb, BEACON_QUEUE, &tcb_desc);
 
 	__skb_queue_tail(&ring->queue, pskb);
 
@@ -1305,11 +1305,10 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw)
 }
 
 static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta,
 					struct sk_buff *skb)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct rtl_sta_info *sta_entry = NULL;
 	u8 tid = rtl_get_tid(skb);
 
@@ -1337,13 +1336,14 @@ static bool rtl_pci_tx_chk_waitq_insert(struct ieee80211_hw *hw,
 	return true;
 }
 
-static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
-		struct rtl_tcb_desc *ptcb_desc)
+static int rtl_pci_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_sta *sta,
+		      struct sk_buff *skb,
+		      struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_sta_info *sta_entry = NULL;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_sta *sta = info->control.sta;
 	struct rtl8192_tx_ring *ring;
 	struct rtl_tx_desc *pdesc;
 	u8 idx;
@@ -1418,7 +1418,7 @@ static int rtl_pci_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
 
 	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc,
-			info, skb, hw_queue, ptcb_desc);
+			info, sta, skb, hw_queue, ptcb_desc);
 
 	__skb_queue_tail(&ring->queue, skb);
 
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
index 3af874e..1b13001 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.c
@@ -596,7 +596,9 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
 
 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 hw_queue, struct rtl_tcb_desc *tcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -604,7 +606,6 @@ void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	bool defaultadapter = true;
-	struct ieee80211_sta *sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
index c4adb97..a7cdd51 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/trx.h
@@ -713,6 +713,7 @@ struct rx_desc_92c {
 void rtl92ce_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
index 21bc827..bb528a7 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.c
@@ -496,7 +496,9 @@ static void _rtl_tx_desc_checksum(u8 *txdesc)
 
 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 queue_index,
 			  struct rtl_tcb_desc *tcb_desc)
 {
@@ -504,7 +506,6 @@ void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
 	bool defaultadapter = true;
-	struct ieee80211_sta *sta = info->control.sta = info->control.sta;
 	u8 *qc = ieee80211_get_qos_ctl(hdr);
 	u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
 	u16 seq_number;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
index 332b06e..725c53a 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/trx.h
@@ -420,7 +420,9 @@ struct sk_buff *rtl8192c_tx_aggregate_hdl(struct ieee80211_hw *,
 					   struct sk_buff_head *);
 void rtl92cu_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 queue_index,
 			  struct rtl_tcb_desc *tcb_desc);
 void rtl92cu_fill_fake_txdesc(struct ieee80211_hw *hw, u8 * pDesc,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
index 1666ef7..323450e 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.c
@@ -551,7 +551,9 @@ static void _rtl92de_insert_emcontent(struct rtl_tcb_desc *ptcb_desc,
 
 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-			  struct ieee80211_tx_info *info, struct sk_buff *skb,
+			  struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
+			  struct sk_buff *skb,
 			  u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
@@ -559,7 +561,6 @@ void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
 	struct rtl_ps_ctl *ppsc = rtl_psc(rtl_priv(hw));
-	struct ieee80211_sta *sta = info->control.sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
index 057a524..c1b5dfb 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/trx.h
@@ -730,6 +730,7 @@ struct rx_desc_92d {
 void rtl92de_tx_fill_desc(struct ieee80211_hw *hw,
 			  struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 bool rtl92de_rx_query_desc(struct ieee80211_hw *hw,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
index 812b585..55cb73f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
@@ -591,14 +591,15 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats,
 
 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw,
 		struct ieee80211_hdr *hdr, u8 *pdesc_tx,
-		struct ieee80211_tx_info *info, struct sk_buff *skb,
+		struct ieee80211_tx_info *info,
+		struct ieee80211_sta *sta,
+		struct sk_buff *skb,
 		u8 hw_queue, struct rtl_tcb_desc *ptcb_desc)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
 	struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
 	struct rtl_hal *rtlhal = rtl_hal(rtl_priv(hw));
-	struct ieee80211_sta *sta = info->control.sta;
 	u8 *pdesc = (u8 *) pdesc_tx;
 	u16 seq_number;
 	__le16 fc = hdr->frame_control;
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
index 011e7b0..64dd66f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/trx.h
@@ -31,6 +31,7 @@
 
 void rtl92se_tx_fill_desc(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
 			  u8 *pdesc, struct ieee80211_tx_info *info,
+			  struct ieee80211_sta *sta,
 			  struct sk_buff *skb, u8 hw_queue,
 			  struct rtl_tcb_desc *ptcb_desc);
 void rtl92se_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc, bool firstseg,
diff --git a/drivers/net/wireless/rtlwifi/usb.c b/drivers/net/wireless/rtlwifi/usb.c
index aa970fc..9140469 100644
--- a/drivers/net/wireless/rtlwifi/usb.c
+++ b/drivers/net/wireless/rtlwifi/usb.c
@@ -848,8 +848,10 @@ static void _rtl_usb_transmit(struct ieee80211_hw *hw, struct sk_buff *skb,
 	_rtl_submit_tx_urb(hw, _urb);
 }
 
-static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
-			    u16 hw_queue)
+static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw,
+				   struct ieee80211_sta *sta,
+				   struct sk_buff *skb,
+				   u16 hw_queue)
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
@@ -891,7 +893,7 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
 		seq_number += 1;
 		seq_number <<= 4;
 	}
-	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, skb,
+	rtlpriv->cfg->ops->fill_tx_desc(hw, hdr, (u8 *)pdesc, info, sta, skb,
 					hw_queue, &tcb_desc);
 	if (!ieee80211_has_morefrags(hdr->frame_control)) {
 		if (qc)
@@ -901,7 +903,9 @@ static void _rtl_usb_tx_preprocess(struct ieee80211_hw *hw, struct sk_buff *skb,
 		rtlpriv->cfg->ops->led_control(hw, LED_CTL_TX);
 }
 
-static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
+static int rtl_usb_tx(struct ieee80211_hw *hw,
+		      struct ieee80211_sta *sta,
+		      struct sk_buff *skb,
 		      struct rtl_tcb_desc *dummy)
 {
 	struct rtl_usb *rtlusb = rtl_usbdev(rtl_usbpriv(hw));
@@ -913,7 +917,7 @@ static int rtl_usb_tx(struct ieee80211_hw *hw, struct sk_buff *skb,
 	if (unlikely(is_hal_stop(rtlhal)))
 		goto err_free;
 	hw_queue = rtlusb->usb_mq_to_hwq(fc, skb_get_queue_mapping(skb));
-	_rtl_usb_tx_preprocess(hw, skb, hw_queue);
+	_rtl_usb_tx_preprocess(hw, sta, skb, hw_queue);
 	_rtl_usb_transmit(hw, skb, hw_queue);
 	return NETDEV_TX_OK;
 
@@ -923,6 +927,7 @@ err_free:
 }
 
 static bool rtl_usb_tx_chk_waitq_insert(struct ieee80211_hw *hw,
+					struct ieee80211_sta *sta,
 					struct sk_buff *skb)
 {
 	return false;
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index cdaa21f..40153e7 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -122,7 +122,7 @@ enum rt_eeprom_type {
 	EEPROM_BOOT_EFUSE,
 };
 
-enum rtl_status {
+enum ttl_status {
 	RTL_STATUS_INTERFACE_START = 0,
 };
 
@@ -1418,6 +1418,7 @@ struct rtl_hal_ops {
 	void (*fill_tx_desc) (struct ieee80211_hw *hw,
 			      struct ieee80211_hdr *hdr, u8 *pdesc_tx,
 			      struct ieee80211_tx_info *info,
+			      struct ieee80211_sta *sta,
 			      struct sk_buff *skb, u8 hw_queue,
 			      struct rtl_tcb_desc *ptcb_desc);
 	void (*fill_fake_txdesc) (struct ieee80211_hw *hw, u8 *pDesc,
@@ -1475,11 +1476,15 @@ struct rtl_intf_ops {
 	int (*adapter_start) (struct ieee80211_hw *hw);
 	void (*adapter_stop) (struct ieee80211_hw *hw);
 
-	int (*adapter_tx) (struct ieee80211_hw *hw, struct sk_buff *skb,
-			struct rtl_tcb_desc *ptcb_desc);
+	int (*adapter_tx) (struct ieee80211_hw *hw,
+			   struct ieee80211_sta *sta,
+			   struct sk_buff *skb,
+			   struct rtl_tcb_desc *ptcb_desc);
 	void (*flush)(struct ieee80211_hw *hw, bool drop);
 	int (*reset_trx_ring) (struct ieee80211_hw *hw);
-	bool (*waitq_insert) (struct ieee80211_hw *hw, struct sk_buff *skb);
+	bool (*waitq_insert) (struct ieee80211_hw *hw,
+			      struct ieee80211_sta *sta,
+			      struct sk_buff *skb);
 
 	/*pci */
 	void (*disable_aspm) (struct ieee80211_hw *hw);
diff --git a/drivers/net/wireless/ti/wl1251/main.c b/drivers/net/wireless/ti/wl1251/main.c
index 3118c42..441cbcc 100644
--- a/drivers/net/wireless/ti/wl1251/main.c
+++ b/drivers/net/wireless/ti/wl1251/main.c
@@ -354,7 +354,9 @@ out:
 	return ret;
 }
 
-static void wl1251_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1251_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1251 *wl = hw->priv;
 	unsigned long flags;
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 7254860..957efce 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -1181,7 +1181,9 @@ out:
 	return ret;
 }
 
-static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void wl1271_op_tx(struct ieee80211_hw *hw,
+			 struct ieee80211_tx_control *control,
+			 struct sk_buff *skb)
 {
 	struct wl1271 *wl = hw->priv;
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1197,7 +1199,7 @@ static void wl1271_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
 	mapping = skb_get_queue_mapping(skb);
 	q = wl1271_tx_get_queue(mapping);
 
-	hlid = wl12xx_tx_get_hlid(wl, wlvif, skb);
+	hlid = wl12xx_tx_get_hlid(wl, wlvif, control->sta, skb);
 
 	spin_lock_irqsave(&wl->wl_lock, flags);
 
diff --git a/drivers/net/wireless/ti/wlcore/tx.c b/drivers/net/wireless/ti/wlcore/tx.c
index c1d9320..97bf14c 100644
--- a/drivers/net/wireless/ti/wlcore/tx.c
+++ b/drivers/net/wireless/ti/wlcore/tx.c
@@ -131,15 +131,13 @@ bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb)
 EXPORT_SYMBOL(wl12xx_is_dummy_packet);
 
 u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif,
-			 struct sk_buff *skb)
+			 struct ieee80211_sta *sta, struct sk_buff *skb)
 {
-	struct ieee80211_tx_info *control = IEEE80211_SKB_CB(skb);
-
-	if (control->control.sta) {
+	if (sta) {
 		struct wl1271_station *wl_sta;
 
 		wl_sta = (struct wl1271_station *)
-				control->control.sta->drv_priv;
+				sta->drv_priv;
 		return wl_sta->hlid;
 	} else {
 		struct ieee80211_hdr *hdr;
@@ -156,7 +154,7 @@ u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 }
 
 u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
-		      struct sk_buff *skb)
+		      struct ieee80211_sta *sta, struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
 
@@ -164,7 +162,7 @@ u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 		return wl->system_hlid;
 
 	if (wlvif->bss_type == BSS_TYPE_AP_BSS)
-		return wl12xx_tx_get_hlid_ap(wl, wlvif, skb);
+		return wl12xx_tx_get_hlid_ap(wl, wlvif, sta, skb);
 
 	if ((test_bit(WLVIF_FLAG_STA_ASSOCIATED, &wlvif->flags) ||
 	     test_bit(WLVIF_FLAG_IBSS_JOINED, &wlvif->flags)) &&
@@ -353,6 +351,8 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 	u8 hlid;
 	bool is_dummy;
 	bool is_gem = false;
+	struct ieee80211_sta *sta;
+	struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
 
 	if (!skb) {
 		wl1271_error("discarding null skb");
@@ -386,7 +386,12 @@ static int wl1271_prepare_tx_frame(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 
 		is_gem = (cipher == WL1271_CIPHER_SUITE_GEM);
 	}
-	hlid = wl12xx_tx_get_hlid(wl, wlvif, skb);
+
+	rcu_read_lock();
+	sta = ieee80211_find_sta(vif, wl->links[hlid].addr);
+	hlid = wl12xx_tx_get_hlid(wl, wlvif, sta, skb);
+	rcu_read_unlock();
+
 	if (hlid == WL12XX_INVALID_LINK_ID) {
 		wl1271_error("invalid hlid. dropping skb 0x%p", skb);
 		return -EINVAL;
@@ -606,11 +611,17 @@ static void wl1271_skb_queue_head(struct wl1271 *wl, struct wl12xx_vif *wlvif,
 {
 	unsigned long flags;
 	int q = wl1271_tx_get_queue(skb_get_queue_mapping(skb));
+	struct ieee80211_sta *sta;
+	struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif);
+	u8 hlid;
 
 	if (wl12xx_is_dummy_packet(wl, skb)) {
 		set_bit(WL1271_FLAG_DUMMY_PACKET_PENDING, &wl->flags);
 	} else {
-		u8 hlid = wl12xx_tx_get_hlid(wl, wlvif, skb);
+		rcu_read_lock();
+		sta = ieee80211_find_sta(vif, wl->links[hlid].addr);
+		hlid = wl12xx_tx_get_hlid(wl, wlvif, sta, skb);
+		rcu_read_unlock();
 		skb_queue_head(&wl->links[hlid].tx_queue[q], skb);
 
 		/* make sure we dequeue the same packet next time */
diff --git a/drivers/net/wireless/ti/wlcore/tx.h b/drivers/net/wireless/ti/wlcore/tx.h
index 1e939b0..4385b0d 100644
--- a/drivers/net/wireless/ti/wlcore/tx.h
+++ b/drivers/net/wireless/ti/wlcore/tx.h
@@ -244,9 +244,9 @@ u32 wl1271_tx_enabled_rates_get(struct wl1271 *wl, u32 rate_set,
 				enum ieee80211_band rate_band);
 u32 wl1271_tx_min_rate_get(struct wl1271 *wl, u32 rate_set);
 u8 wl12xx_tx_get_hlid_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif,
-			 struct sk_buff *skb);
+			 struct ieee80211_sta *sta, struct sk_buff *skb);
 u8 wl12xx_tx_get_hlid(struct wl1271 *wl, struct wl12xx_vif *wlvif,
-		      struct sk_buff *skb);
+		      struct ieee80211_sta *sta, struct sk_buff *skb);
 void wl1271_tx_reset_link_queues(struct wl1271 *wl, u8 hlid);
 void wl1271_handle_tx_low_watermark(struct wl1271 *wl);
 bool wl12xx_is_dummy_packet(struct wl1271 *wl, struct sk_buff *skb);
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index c9e2660..4598801 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -937,7 +937,9 @@ static int fill_ctrlset(struct zd_mac *mac,
  * control block of the skbuff will be initialized. If necessary the incoming
  * mac80211 queues will be stopped.
  */
-static void zd_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
+static void zd_op_tx(struct ieee80211_hw *hw,
+		     struct ieee80211_tx_control *control,
+		     struct sk_buff *skb)
 {
 	struct zd_mac *mac = zd_hw_mac(hw);
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
@@ -1176,7 +1178,7 @@ static void zd_beacon_done(struct zd_mac *mac)
 		skb = ieee80211_get_buffered_bc(mac->hw, mac->vif);
 		if (!skb)
 			break;
-		zd_op_tx(mac->hw, skb);
+		zd_op_tx(mac->hw, NULL, skb);
 	}
 
 	/*
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
index c3751a7..c6566e5 100644
--- a/drivers/staging/winbond/wbusb.c
+++ b/drivers/staging/winbond/wbusb.c
@@ -119,7 +119,9 @@ static void wbsoft_configure_filter(struct ieee80211_hw *dev,
 	*total_flags = new_flags;
 }
 
-static void wbsoft_tx(struct ieee80211_hw *dev, struct sk_buff *skb)
+static void wbsoft_tx(struct ieee80211_hw *dev,
+		      struct ieee80211_tx_control *control,
+		      struct sk_buff *skb)
 {
 	struct wbsoft_priv *priv = dev->priv;
 
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index bb86aa6..4309d8a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -522,9 +522,6 @@ struct ieee80211_tx_rate {
  *  (2) driver internal use (if applicable)
  *  (3) TX status information - driver tells mac80211 what happened
  *
- * The TX control's sta pointer is only valid during the ->tx call,
- * it may be NULL.
- *
  * @flags: transmit info flags, defined above
  * @band: the band to transmit on (use for checking for races)
  * @hw_queue: HW queue to put the frame on, skb_get_queue_mapping() gives the AC
@@ -555,6 +552,7 @@ struct ieee80211_tx_info {
 					struct ieee80211_tx_rate rates[
 						IEEE80211_TX_MAX_RATES];
 					s8 rts_cts_rate_idx;
+					/* 3 bytes free */
 				};
 				/* only needed before rate control */
 				unsigned long jiffies;
@@ -562,7 +560,7 @@ struct ieee80211_tx_info {
 			/* NB: vif can be NULL for injected frames */
 			struct ieee80211_vif *vif;
 			struct ieee80211_key_conf *hw_key;
-			struct ieee80211_sta *sta;
+			/* 8 bytes free */
 		} control;
 		struct {
 			struct ieee80211_tx_rate rates[IEEE80211_TX_MAX_RATES];
@@ -1074,6 +1072,16 @@ enum sta_notify_cmd {
 };
 
 /**
+ * struct ieee80211_tx_control - TX control data
+ *
+ * @sta: station table entry, this sta pointer may be NULL and
+ * 	it is not allowed to copy the pointer, due to RCU.
+ */
+struct ieee80211_tx_control {
+	struct ieee80211_sta *sta;
+};
+
+/**
  * enum ieee80211_hw_flags - hardware flags
  *
  * These flags are used to indicate hardware capabilities to
@@ -2264,7 +2272,9 @@ enum ieee80211_rate_control_changed {
  *	The callback is optional and can (should!) sleep.
  */
 struct ieee80211_ops {
-	void (*tx)(struct ieee80211_hw *hw, struct sk_buff *skb);
+	void (*tx)(struct ieee80211_hw *hw,
+		   struct ieee80211_tx_control *control,
+		   struct sk_buff *skb);
 	int (*start)(struct ieee80211_hw *hw);
 	void (*stop)(struct ieee80211_hw *hw);
 #ifdef CONFIG_PM
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index df92031..a81117a 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -22,9 +22,11 @@ get_bss_sdata(struct ieee80211_sub_if_data *sdata)
 	return sdata;
 }
 
-static inline void drv_tx(struct ieee80211_local *local, struct sk_buff *skb)
+static inline void drv_tx(struct ieee80211_local *local,
+			  struct ieee80211_tx_control *control,
+			  struct sk_buff *skb)
 {
-	local->ops->tx(&local->hw, skb);
+	local->ops->tx(&local->hw, control, skb);
 }
 
 static inline void drv_get_et_strings(struct ieee80211_sub_if_data *sdata,
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index acf712f..dee76d8 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1204,6 +1204,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
 			       struct sk_buff_head *skbs,
 			       bool txpending)
 {
+	struct ieee80211_tx_control control;
 	struct sk_buff *skb, *tmp;
 	unsigned long flags;
 
@@ -1240,10 +1241,10 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
 		spin_unlock_irqrestore(&local->queue_stop_reason_lock, flags);
 
 		info->control.vif = vif;
-		info->control.sta = sta;
+		control.sta = sta;
 
 		__skb_unlink(skb, skbs);
-		drv_tx(local, skb);
+		drv_tx(local, &control, skb);
 	}
 
 	return true;
@@ -1301,8 +1302,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
 		break;
 	}
 
-	result = ieee80211_tx_frags(local, vif, pubsta, skbs,
-				    txpending);
+	result = ieee80211_tx_frags(local, vif, pubsta, skbs, txpending);
 
 	ieee80211_tpt_led_trig_tx(local, fc, led_len);
 	ieee80211_led_tx(local, 1);
@@ -1409,8 +1409,8 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
 			sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
 
 	if (!invoke_tx_handlers(&tx))
-		result = __ieee80211_tx(local, &tx.skbs, led_len,
-					tx.sta, txpending);
+		result = __ieee80211_tx(local, &tx.skbs, led_len, tx.sta,
+					txpending);
  out:
 	rcu_read_unlock();
 	return result;
-- 
1.7.11.1



From johannes at sipsolutions.net  Thu Jul 26 12:19:39 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Thu, 26 Jul 2012 18:19:39 +0200
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 (sfid-20120726_181745_936314_D74A954D)
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120726_180930_993025_AB3D0B96)
 <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 (sfid-20120726_181745_936314_D74A954D)
Message-ID: <1343319579.4477.3.camel@jlt3.sipsolutions.net>

On Thu, 2012-07-26 at 18:17 +0200, Johannes Berg wrote:
> On Thu, 2012-07-26 at 18:09 +0200, Thomas Huehn wrote:
> > The pointer control.sta is removed from ieee80211_tx_info to free up
> > sufficient memory in SKB_CB on the tx-path to enable new annotations
> > per data packet e.g.support of upcoming Transmit Power Control (TPC).
> > Now the control.sta pointer is put on the stack where passed as
> > function parameter to the .tx equivalent (ieee80211_ops) of each
> > affected wireless driver.
> > Therefore a new structure ieee80211_tx_control is added to mac80211.h
> > which holds the sta structure instead. The tx-path of all affected
> > drivers is restructured to respect the chaneges.
> 
> *sigh*
> 
> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c: In
> function ?wl1271_skb_queue_head?:
> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c:622:48:
> warning: ?hlid? may be used uninitialized in this function
> [-Wuninitialized]

Those changes make no sense anyway -- you should be able to pass the
station pointer through if it previously used info->control.sta, instead
of doing an (expensive) lookup.

johannes



From johannes at sipsolutions.net  Thu Jul 26 12:17:33 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Thu, 26 Jul 2012 18:17:33 +0200
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120726_180930_993025_AB3D0B96)
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120726_180930_993025_AB3D0B96)
Message-ID: <1343319453.4477.2.camel@jlt3.sipsolutions.net>

On Thu, 2012-07-26 at 18:09 +0200, Thomas Huehn wrote:
> The pointer control.sta is removed from ieee80211_tx_info to free up
> sufficient memory in SKB_CB on the tx-path to enable new annotations
> per data packet e.g.support of upcoming Transmit Power Control (TPC).
> Now the control.sta pointer is put on the stack where passed as
> function parameter to the .tx equivalent (ieee80211_ops) of each
> affected wireless driver.
> Therefore a new structure ieee80211_tx_control is added to mac80211.h
> which holds the sta structure instead. The tx-path of all affected
> drivers is restructured to respect the chaneges.

*sigh*

/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c: In
function ?wl1271_skb_queue_head?:
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c:622:48:
warning: ?hlid? may be used uninitialized in this function
[-Wuninitialized]
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c: In
function ?wlcore_tx_work_locked?:
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c:391:47:
warning: ?hlid? may be used uninitialized in this function
[-Wuninitialized]
/home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c:351:5:
note: ?hlid? was declared here


johannes



From thomas at net.t-labs.tu-berlin.de  Thu Jul 26 12:31:46 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Thu, 26 Jul 2012 18:31:46 +0200
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343319579.4477.3.camel@jlt3.sipsolutions.net>
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 (sfid-20120726_180930_993025_AB3D0B96)
 <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 (sfid-20120726_181745_936314_D74A954D)
 <1343319579.4477.3.camel@jlt3.sipsolutions.net>
Message-ID: <501170F2.3050300@net.t-labs.tu-berlin.de>

Hi Johannes,

Johannes Berg schrieb:

>>
>> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c: In
>> function ?wl1271_skb_queue_head?:
>> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c:622:48:
>> warning: ?hlid? may be used uninitialized in this function
>> [-Wuninitialized]
> 
> Those changes make no sense anyway -- you should be able to pass the
> station pointer through if it previously used info->control.sta, instead
> of doing an (expensive) lookup.


This is the call path

in main.c ... INIT_WORK(&wl->tx_work, wl1271_tx_work);
 jumps to tx.c...wl1271_tx_work(struct work_struct *work)
  calls wl1271_tx_work(struct work_struct *work)
   calls wlcore_tx_work_locked(struct wl1271 *wl)
    calls wl1271_skb_queue_head()
     calls wl12xx_tx_get_hlid()
      calls wl12xx_tx_get_hlid_ap() .... where sta is needed.

But I could not find any point in the call path where I could grab the
sta pointer and pass it through. I will move the rcu into
wl12xx_tx_get_hlid_ap(), but I do not see any cheaper way here as using rcu.

Greetings Thomas




From arik at wizery.com  Thu Jul 26 12:57:14 2012
From: arik at wizery.com (Arik Nemtsov)
Date: Thu, 26 Jul 2012 19:57:14 +0300
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <501170F2.3050300@net.t-labs.tu-berlin.de>
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 <1343319579.4477.3.camel@jlt3.sipsolutions.net>
 <501170F2.3050300@net.t-labs.tu-berlin.de>
Message-ID: <CA+XVXfegYYwc=esyZmJHu1tEqQKcq+h+MnSyp9dXiiwqroG3tw@mail.gmail.com>

On Thu, Jul 26, 2012 at 7:31 PM, Thomas Huehn
<thomas at net.t-labs.tu-berlin.de> wrote:
> Hi Johannes,
>
> Johannes Berg schrieb:
>
>>>
>>> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c: In
>>> function ?wl1271_skb_queue_head?:
>>> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c:622:48:
>>> warning: ?hlid? may be used uninitialized in this function
>>> [-Wuninitialized]
>>
>> Those changes make no sense anyway -- you should be able to pass the
>> station pointer through if it previously used info->control.sta, instead
>> of doing an (expensive) lookup.
>
>
> This is the call path
>
> in main.c ... INIT_WORK(&wl->tx_work, wl1271_tx_work);
>  jumps to tx.c...wl1271_tx_work(struct work_struct *work)
>   calls wl1271_tx_work(struct work_struct *work)
>    calls wlcore_tx_work_locked(struct wl1271 *wl)
>     calls wl1271_skb_queue_head()
>      calls wl12xx_tx_get_hlid()
>       calls wl12xx_tx_get_hlid_ap() .... where sta is needed.
>
> But I could not find any point in the call path where I could grab the
> sta pointer and pass it through. I will move the rcu into
> wl12xx_tx_get_hlid_ap(), but I do not see any cheaper way here as using rcu.

I agree with Johannes. The find_sta() in the Tx path is unacceptable.

A relatively simple change here would be to put the sta pointer in the
portion of the struct reserved for rate control during op_tx(). wlcore
doesn't use software rate control anyway.
This would avoid from changing the code too much.


From arik at wizery.com  Thu Jul 26 13:04:42 2012
From: arik at wizery.com (Arik Nemtsov)
Date: Thu, 26 Jul 2012 20:04:42 +0300
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <CA+XVXfegYYwc=esyZmJHu1tEqQKcq+h+MnSyp9dXiiwqroG3tw@mail.gmail.com>
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 <1343319579.4477.3.camel@jlt3.sipsolutions.net>
 <501170F2.3050300@net.t-labs.tu-berlin.de>
 <CA+XVXfegYYwc=esyZmJHu1tEqQKcq+h+MnSyp9dXiiwqroG3tw@mail.gmail.com>
Message-ID: <CA+XVXfcrb9=XQauvbPzw2t_jMoQisrh5aSB1qwpLxXsKJKy2Yg@mail.gmail.com>

On Thu, Jul 26, 2012 at 7:57 PM, Arik Nemtsov <arik at wizery.com> wrote:
> On Thu, Jul 26, 2012 at 7:31 PM, Thomas Huehn
> <thomas at net.t-labs.tu-berlin.de> wrote:
>> Hi Johannes,
>>
>> Johannes Berg schrieb:
>>
>>>>
>>>> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c: In
>>>> function ?wl1271_skb_queue_head?:
>>>> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c:622:48:
>>>> warning: ?hlid? may be used uninitialized in this function
>>>> [-Wuninitialized]
>>>
>>> Those changes make no sense anyway -- you should be able to pass the
>>> station pointer through if it previously used info->control.sta, instead
>>> of doing an (expensive) lookup.
>>
>>
>> This is the call path
>>
>> in main.c ... INIT_WORK(&wl->tx_work, wl1271_tx_work);
>>  jumps to tx.c...wl1271_tx_work(struct work_struct *work)
>>   calls wl1271_tx_work(struct work_struct *work)
>>    calls wlcore_tx_work_locked(struct wl1271 *wl)
>>     calls wl1271_skb_queue_head()
>>      calls wl12xx_tx_get_hlid()
>>       calls wl12xx_tx_get_hlid_ap() .... where sta is needed.
>>
>> But I could not find any point in the call path where I could grab the
>> sta pointer and pass it through. I will move the rcu into
>> wl12xx_tx_get_hlid_ap(), but I do not see any cheaper way here as using rcu.
>
> I agree with Johannes. The find_sta() in the Tx path is unacceptable.
>
> A relatively simple change here would be to put the sta pointer in the
> portion of the struct reserved for rate control during op_tx(). wlcore
> doesn't use software rate control anyway.
> This would avoid from changing the code too much.

Johannes correctly pointed out that the sta may no longer be valid
when the skb is dequeued (which is a bug today as well). It's best to
just store the hlid in the rate control portion.


From arik at wizery.com  Thu Jul 26 14:41:25 2012
From: arik at wizery.com (Arik Nemtsov)
Date: Thu, 26 Jul 2012 21:41:25 +0300
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <CA+XVXfcrb9=XQauvbPzw2t_jMoQisrh5aSB1qwpLxXsKJKy2Yg@mail.gmail.com>
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 <1343319579.4477.3.camel@jlt3.sipsolutions.net>
 <501170F2.3050300@net.t-labs.tu-berlin.de>
 <CA+XVXfegYYwc=esyZmJHu1tEqQKcq+h+MnSyp9dXiiwqroG3tw@mail.gmail.com>
 <CA+XVXfcrb9=XQauvbPzw2t_jMoQisrh5aSB1qwpLxXsKJKy2Yg@mail.gmail.com>
Message-ID: <CA+XVXfe1uomu4XYD33==bFFozbo9k4mkqC1PE1ORnvVN_1PeTg@mail.gmail.com>

On Thu, Jul 26, 2012 at 8:04 PM, Arik Nemtsov <arik at wizery.com> wrote:
> On Thu, Jul 26, 2012 at 7:57 PM, Arik Nemtsov <arik at wizery.com> wrote:
>> On Thu, Jul 26, 2012 at 7:31 PM, Thomas Huehn
>> <thomas at net.t-labs.tu-berlin.de> wrote:
>>> Hi Johannes,
>>>
>>> Johannes Berg schrieb:
>>>
>>>>>
>>>>> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c: In
>>>>> function ?wl1271_skb_queue_head?:
>>>>> /home/johannes/sys/wireless/drivers/net/wireless/ti/wlcore/tx.c:622:48:
>>>>> warning: ?hlid? may be used uninitialized in this function
>>>>> [-Wuninitialized]
>>>>
>>>> Those changes make no sense anyway -- you should be able to pass the
>>>> station pointer through if it previously used info->control.sta, instead
>>>> of doing an (expensive) lookup.
>>>
>>>
>>> This is the call path
>>>
>>> in main.c ... INIT_WORK(&wl->tx_work, wl1271_tx_work);
>>>  jumps to tx.c...wl1271_tx_work(struct work_struct *work)
>>>   calls wl1271_tx_work(struct work_struct *work)
>>>    calls wlcore_tx_work_locked(struct wl1271 *wl)
>>>     calls wl1271_skb_queue_head()
>>>      calls wl12xx_tx_get_hlid()
>>>       calls wl12xx_tx_get_hlid_ap() .... where sta is needed.
>>>
>>> But I could not find any point in the call path where I could grab the
>>> sta pointer and pass it through. I will move the rcu into
>>> wl12xx_tx_get_hlid_ap(), but I do not see any cheaper way here as using rcu.
>>
>> I agree with Johannes. The find_sta() in the Tx path is unacceptable.
>>
>> A relatively simple change here would be to put the sta pointer in the
>> portion of the struct reserved for rate control during op_tx(). wlcore
>> doesn't use software rate control anyway.
>> This would avoid from changing the code too much.
>
> Johannes correctly pointed out that the sta may no longer be valid
> when the skb is dequeued (which is a bug today as well). It's best to
> just store the hlid in the rate control portion.

Better to just wait some time. I wrote up something to make it much
easier for you. Waiting for some internal review before sending it up.

Arik


From thomas at net.t-labs.tu-berlin.de  Thu Jul 26 16:02:24 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Thu, 26 Jul 2012 22:02:24 +0200
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <CA+XVXfe1uomu4XYD33==bFFozbo9k4mkqC1PE1ORnvVN_1PeTg@mail.gmail.com>
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 <1343319579.4477.3.camel@jlt3.sipsolutions.net>
 <501170F2.3050300@net.t-labs.tu-berlin.de>
 <CA+XVXfegYYwc=esyZmJHu1tEqQKcq+h+MnSyp9dXiiwqroG3tw@mail.gmail.com>
 <CA+XVXfcrb9=XQauvbPzw2t_jMoQisrh5aSB1qwpLxXsKJKy2Yg@mail.gmail.com>
 <CA+XVXfe1uomu4XYD33==bFFozbo9k4mkqC1PE1ORnvVN_1PeTg@mail.gmail.com>
Message-ID: <5011A250.4010500@net.t-labs.tu-berlin.de>

Hi Arik,

Arik Nemtsov schrieb:


> Better to just wait some time. I wrote up something to make it much
> easier for you. Waiting for some internal review before sending it up.
> 

Thx for helping out here, I ws allready checking into what kind of
struct I can put the sta pointer. But if you have a better solution in
mind, I wait until my v7.


Greetings Thomas


From johannes at sipsolutions.net  Fri Jul 27 03:26:57 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Fri, 27 Jul 2012 09:26:57 +0200
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <5011A250.4010500@net.t-labs.tu-berlin.de>
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 <1343319579.4477.3.camel@jlt3.sipsolutions.net>
 <501170F2.3050300@net.t-labs.tu-berlin.de>
 <CA+XVXfegYYwc=esyZmJHu1tEqQKcq+h+MnSyp9dXiiwqroG3tw@mail.gmail.com>
 <CA+XVXfcrb9=XQauvbPzw2t_jMoQisrh5aSB1qwpLxXsKJKy2Yg@mail.gmail.com>
 <CA+XVXfe1uomu4XYD33==bFFozbo9k4mkqC1PE1ORnvVN_1PeTg@mail.gmail.com>
 <5011A250.4010500@net.t-labs.tu-berlin.de>
Message-ID: <1343374017.4449.0.camel@jlt3.sipsolutions.net>

On Thu, 2012-07-26 at 22:02 +0200, Thomas Huehn wrote:

> > Better to just wait some time. I wrote up something to make it much
> > easier for you. Waiting for some internal review before sending it up.
> > 
> 
> Thx for helping out here, I ws allready checking into what kind of
> struct I can put the sta pointer. But if you have a better solution in
> mind, I wait until my v7.

When you do, please remove the last two hunks from your patch that are
spurious indentation changes in tx.c

johannes



From thomas at net.t-labs.tu-berlin.de  Fri Jul 27 05:35:23 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Fri, 27 Jul 2012 11:35:23 +0200
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343374017.4449.0.camel@jlt3.sipsolutions.net>
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 <1343319579.4477.3.camel@jlt3.sipsolutions.net>
 <501170F2.3050300@net.t-labs.tu-berlin.de>
 <CA+XVXfegYYwc=esyZmJHu1tEqQKcq+h+MnSyp9dXiiwqroG3tw@mail.gmail.com>
 <CA+XVXfcrb9=XQauvbPzw2t_jMoQisrh5aSB1qwpLxXsKJKy2Yg@mail.gmail.com>
 <CA+XVXfe1uomu4XYD33==bFFozbo9k4mkqC1PE1ORnvVN_1PeTg@mail.gmail.com>
 <5011A250.4010500@net.t-labs.tu-berlin.de>
 <1343374017.4449.0.camel@jlt3.sipsolutions.net>
Message-ID: <501260DB.1020606@net.t-labs.tu-berlin.de>

Hi Johannes,

Johannes Berg schrieb:


> When you do, please remove the last two hunks from your patch that are
> spurious indentation changes in tx.c


When Ariks two TI driver patches make it in your tree I will clean up
this two hunks... no prob.

Greetings Thomas


From johannes at sipsolutions.net  Fri Jul 27 07:52:40 2012
From: johannes at sipsolutions.net (Johannes Berg)
Date: Fri, 27 Jul 2012 13:52:40 +0200
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <501260DB.1020606@net.t-labs.tu-berlin.de>
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 <1343319579.4477.3.camel@jlt3.sipsolutions.net>
 <501170F2.3050300@net.t-labs.tu-berlin.de>
 <CA+XVXfegYYwc=esyZmJHu1tEqQKcq+h+MnSyp9dXiiwqroG3tw@mail.gmail.com>
 <CA+XVXfcrb9=XQauvbPzw2t_jMoQisrh5aSB1qwpLxXsKJKy2Yg@mail.gmail.com>
 <CA+XVXfe1uomu4XYD33==bFFozbo9k4mkqC1PE1ORnvVN_1PeTg@mail.gmail.com>
 <5011A250.4010500@net.t-labs.tu-berlin.de>
 <1343374017.4449.0.camel@jlt3.sipsolutions.net>
 <501260DB.1020606@net.t-labs.tu-berlin.de>
Message-ID: <1343389960.4449.6.camel@jlt3.sipsolutions.net>

On Fri, 2012-07-27 at 11:35 +0200, Thomas Huehn wrote:
> Hi Johannes,
> 
> Johannes Berg schrieb:
> 
> 
> > When you do, please remove the last two hunks from your patch that are
> > spurious indentation changes in tx.c
> 
> 
> When Ariks two TI driver patches make it in your tree I will clean up
> this two hunks... no prob.

I did it myself now, all applied.

johannes



From thomas at net.t-labs.tu-berlin.de  Fri Jul 27 09:28:24 2012
From: thomas at net.t-labs.tu-berlin.de (Thomas Huehn)
Date: Fri, 27 Jul 2012 15:28:24 +0200
Subject: [PATCH v6] mac80211: Remove control.sta from struct
 ieee80211_tx_info and restructure tx-path
In-Reply-To: <1343389960.4449.6.camel@jlt3.sipsolutions.net>
References: <1343318961-46933-1-git-send-email-thomas@net.t-labs.tu-berlin.de>
 <1343319453.4477.2.camel@jlt3.sipsolutions.net>
 <1343319579.4477.3.camel@jlt3.sipsolutions.net>
 <501170F2.3050300@net.t-labs.tu-berlin.de>
 <CA+XVXfegYYwc=esyZmJHu1tEqQKcq+h+MnSyp9dXiiwqroG3tw@mail.gmail.com>
 <CA+XVXfcrb9=XQauvbPzw2t_jMoQisrh5aSB1qwpLxXsKJKy2Yg@mail.gmail.com>
 <CA+XVXfe1uomu4XYD33==bFFozbo9k4mkqC1PE1ORnvVN_1PeTg@mail.gmail.com>
 <5011A250.4010500@net.t-labs.tu-berlin.de>
 <1343374017.4449.0.camel@jlt3.sipsolutions.net>
 <501260DB.1020606@net.t-labs.tu-berlin.de>
 <1343389960.4449.6.camel@jlt3.sipsolutions.net>
Message-ID: <50129778.3000000@net.t-labs.tu-berlin.de>

Hi Johannes,

Johannes Berg schrieb:


> I did it myself now, all applied.
> 


Awesome !

I am going to prepare the TPC patches now.

Greetings Thomas


From charlespreese at gmail.com  Sat Jul 28 12:49:29 2012
From: charlespreese at gmail.com (Charles Reese)
Date: Sat, 28 Jul 2012 09:49:29 -0700
Subject: Help with Broadocm 4322 Wireless
Message-ID: <CAA_94OTBy6xXNiQtdP1A3-R2pRt+yXb0RMm7RNjL4OOFHE-7JQ@mail.gmail.com>

I have a Macbook5,1 (Late 2008, Unibody) with Broadcom BCM 4322
(14e4:432b). I'm trying to get the wireless up.


Steps to reproduce:

Get the latest iso from http://www.archlinux.org/download/ .
Boot from the CD.
At the prompt, type
ip link set dev eth0 up
dhcpcd eth0
pacman -Syy
pacman -S base-devel
choose option 3
wget https://aur.archlinux.org/packages/b4/b43-firmware/PKGBUILD
makepkg --asroot
cd /usr/lib/firmware
ln -s /root/pkg/usr/lib/firmware/b43
rmmod b43


At this point, I get a bunch of lines to stderr. It's the output of
dmesg, starting with

[  391.239096] BUG: unable to handle kernel NULL pointer dereference
at 0000000000000098


uname -a

Linux archiso 3.4.5-1-ARCH #1 SMP PREEMPT Mon Jul 16 21:35:54 CEST
2012 x86_64 GNU/Linux


lspci -vvn | grep 43 -A7

03:00.0 0280: 14e4:432b (rev 01)
	Subsystem: 106b:008d
	Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B- DisINTx-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 256 bytes
	Interrupt: pin A routed to IRQ 23
	Region 0: Memory at d3100000 (64-bit, non-prefetchable) [size=16K]
	Capabilities: [40] Power Management version 3
--
	Kernel driver in use: b43-pci-bridge


ls -al /usr/lib/firmware/b43

total 1060
drwxr-x--- 2 root root  4096 Jul 24 02:21 .
drwxr-xr-x 3 root root  4096 Jul 24 02:21 ..
-rw-r--r-- 1 root root   178 Jul 24 02:21 a0g0bsinitvals5.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 a0g0bsinitvals9.fw
-rw-r--r-- 1 root root  1836 Jul 24 02:21 a0g0initvals5.fw
-rw-r--r-- 1 root root  1992 Jul 24 02:21 a0g0initvals9.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 a0g1bsinitvals13.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 a0g1bsinitvals5.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 a0g1bsinitvals9.fw
-rw-r--r-- 1 root root  2126 Jul 24 02:21 a0g1initvals13.fw
-rw-r--r-- 1 root root  1836 Jul 24 02:21 a0g1initvals5.fw
-rw-r--r-- 1 root root  1992 Jul 24 02:21 a0g1initvals9.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 b0g0bsinitvals13.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 b0g0bsinitvals5.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 b0g0bsinitvals9.fw
-rw-r--r-- 1 root root  2126 Jul 24 02:21 b0g0initvals13.fw
-rw-r--r-- 1 root root  1836 Jul 24 02:21 b0g0initvals5.fw
-rw-r--r-- 1 root root  1992 Jul 24 02:21 b0g0initvals9.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 ht0bsinitvals26.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 ht0bsinitvals29.fw
-rw-r--r-- 1 root root  2678 Jul 24 02:21 ht0initvals26.fw
-rw-r--r-- 1 root root  2720 Jul 24 02:21 ht0initvals29.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lcn0bsinitvals24.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lcn0bsinitvals25.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lcn0bsinitvals26.fw
-rw-r--r-- 1 root root  2976 Jul 24 02:21 lcn0initvals24.fw
-rw-r--r-- 1 root root  2958 Jul 24 02:21 lcn0initvals25.fw
-rw-r--r-- 1 root root  2678 Jul 24 02:21 lcn0initvals26.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lcn1bsinitvals24.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lcn1bsinitvals25.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lcn1bsinitvals26.fw
-rw-r--r-- 1 root root  2976 Jul 24 02:21 lcn1initvals24.fw
-rw-r--r-- 1 root root  2958 Jul 24 02:21 lcn1initvals25.fw
-rw-r--r-- 1 root root  2678 Jul 24 02:21 lcn1initvals26.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lcn2bsinitvals24.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lcn2bsinitvals25.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lcn2bsinitvals26.fw
-rw-r--r-- 1 root root  2976 Jul 24 02:21 lcn2initvals24.fw
-rw-r--r-- 1 root root  2958 Jul 24 02:21 lcn2initvals25.fw
-rw-r--r-- 1 root root  2678 Jul 24 02:21 lcn2initvals26.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 lcn400bsinitvals33.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 lcn400initvals33.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lp0bsinitvals13.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 lp0bsinitvals14.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lp0bsinitvals15.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 lp0bsinitvals16.fw
-rw-r--r-- 1 root root  3664 Jul 24 02:21 lp0initvals13.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 lp0initvals14.fw
-rw-r--r-- 1 root root  2598 Jul 24 02:21 lp0initvals15.fw
-rw-r--r-- 1 root root  2738 Jul 24 02:21 lp0initvals16.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 lp1bsinitvals20.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 lp1bsinitvals22.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 lp1initvals20.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 lp1initvals22.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 lp2bsinitvals19.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 lp2initvals19.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 n0absinitvals11.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 n0bsinitvals11.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 n0bsinitvals16.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 n0bsinitvals17.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 n0bsinitvals22.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 n0bsinitvals24.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 n0bsinitvals25.fw
-rw-r--r-- 1 root root  2152 Jul 24 02:21 n0initvals11.fw
-rw-r--r-- 1 root root  2738 Jul 24 02:21 n0initvals16.fw
-rw-r--r-- 1 root root  2408 Jul 24 02:21 n0initvals17.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 n0initvals22.fw
-rw-r--r-- 1 root root  2976 Jul 24 02:21 n0initvals24.fw
-rw-r--r-- 1 root root  2958 Jul 24 02:21 n0initvals25.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 n16bsinitvals30.fw
-rw-r--r-- 1 root root  2634 Jul 24 02:21 n16initvals30.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 n18bsinitvals32.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 n18initvals32.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 n1bsinitvals20.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 n1initvals20.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 n2bsinitvals19.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 n2initvals19.fw
-rw-r--r-- 1 root root  1320 Jul 24 02:21 pcm5.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 sslpn0bsinitvals16.fw
-rw-r--r-- 1 root root  2738 Jul 24 02:21 sslpn0initvals16.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 sslpn1bsinitvals20.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 sslpn1bsinitvals27.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 sslpn1initvals20.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 sslpn1initvals27.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 sslpn2bsinitvals19.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 sslpn2initvals19.fw
-rw-r--r-- 1 root root   178 Jul 24 02:21 sslpn3bsinitvals21.fw
-rw-r--r-- 1 root root  2552 Jul 24 02:21 sslpn3initvals21.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 sslpn4bsinitvals22.fw
-rw-r--r-- 1 root root     8 Jul 24 02:21 sslpn4initvals22.fw
-rw-r--r-- 1 root root 31176 Jul 24 02:21 ucode11.fw
-rw-r--r-- 1 root root 28216 Jul 24 02:21 ucode13.fw
-rw-r--r-- 1 root root    12 Jul 24 02:21 ucode14.fw
-rw-r--r-- 1 root root 35512 Jul 24 02:21 ucode15.fw
-rw-r--r-- 1 root root 33712 Jul 24 02:21 ucode16_lp.fw
-rw-r--r-- 1 root root 39296 Jul 24 02:21 ucode16_mimo.fw
-rw-r--r-- 1 root root 34448 Jul 24 02:21 ucode16_sslpn.fw
-rw-r--r-- 1 root root 28589 Jul 24 02:21 ucode16_sslpn_nobt.fw
-rw-r--r-- 1 root root 36216 Jul 24 02:21 ucode17_mimo.fw
-rw-r--r-- 1 root root     9 Jul 24 02:21 ucode19_sslpn.fw
-rw-r--r-- 1 root root     9 Jul 24 02:21 ucode19_sslpn_nobt.fw
-rw-r--r-- 1 root root     9 Jul 24 02:21 ucode20_sslpn.fw
-rw-r--r-- 1 root root     9 Jul 24 02:21 ucode20_sslpn_nobt.fw
-rw-r--r-- 1 root root 34735 Jul 24 02:21 ucode21_sslpn.fw
-rw-r--r-- 1 root root 28988 Jul 24 02:21 ucode21_sslpn_nobt.fw
-rw-r--r-- 1 root root    12 Jul 24 02:21 ucode22_mimo.fw
-rw-r--r-- 1 root root     9 Jul 24 02:21 ucode22_sslpn.fw
-rw-r--r-- 1 root root 35267 Jul 24 02:21 ucode24_lcn.fw
-rw-r--r-- 1 root root 39760 Jul 24 02:21 ucode24_mimo.fw
-rw-r--r-- 1 root root 34847 Jul 24 02:21 ucode25_lcn.fw
-rw-r--r-- 1 root root 39128 Jul 24 02:21 ucode25_mimo.fw
-rw-r--r-- 1 root root 39728 Jul 24 02:21 ucode26_mimo.fw
-rw-r--r-- 1 root root     9 Jul 24 02:21 ucode27_sslpn.fw
-rw-r--r-- 1 root root 39760 Jul 24 02:21 ucode29_mimo.fw
-rw-r--r-- 1 root root 39632 Jul 24 02:21 ucode30_mimo.fw
-rw-r--r-- 1 root root    12 Jul 24 02:21 ucode32_mimo.fw
-rw-r--r-- 1 root root     9 Jul 24 02:21 ucode33_lcn40.fw
-rw-r--r-- 1 root root 21328 Jul 24 02:21 ucode5.fw
-rw-r--r-- 1 root root 23256 Jul 24 02:21 ucode9.fw


dmesg

[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.4.5-1-ARCH (tobias at T-POWA-LX) (gcc
version 4.7.1 (GCC) ) #1 SMP PREEMPT Mon Jul 16 21:35:54 CEST 2012
[    0.000000] Command line: archisobasedir=arch
archisolabel=ARCH_201207 initrd=boot/x86_64/archiso.img
BOOT_IMAGE=boot/x86_64/vmlinuz
[    0.000000] BIOS-provided physical RAM map:
[    0.000000]  BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
[    0.000000]  BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
[    0.000000]  BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
[    0.000000]  BIOS-e820: 0000000000100000 - 0000000080000000 (usable)
[    0.000000]  BIOS-e820: 0000000080000000 - 0000000090000000 (reserved)
[    0.000000]  BIOS-e820: 0000000090000000 - 00000000be86e000 (usable)
[    0.000000]  BIOS-e820: 00000000be86e000 - 00000000be870000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000be870000 - 00000000be871000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000be871000 - 00000000be873000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000be873000 - 00000000be88e000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000be88e000 - 00000000bea8f000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000bea8f000 - 00000000bfec6000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000bfec6000 - 00000000bfec8000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000bfec8000 - 00000000bfec9000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000bfec9000 - 00000000bfecb000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000bfecb000 - 00000000bfecd000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000bfecd000 - 00000000bfedf000 (ACPI NVS)
[    0.000000]  BIOS-e820: 00000000bfedf000 - 00000000bfef9000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000bfef9000 - 00000000bfeff000 (reserved)
[    0.000000]  BIOS-e820: 00000000bfeff000 - 00000000bff00000 (ACPI data)
[    0.000000]  BIOS-e820: 00000000d3300000 - 00000000d3301000 (reserved)
[    0.000000]  BIOS-e820: 00000000f0000000 - 00000000f4000000 (reserved)
[    0.000000]  BIOS-e820: 00000000fec00000 - 00000000fec01000 (reserved)
[    0.000000]  BIOS-e820: 00000000fee00000 - 00000000fee01000 (reserved)
[    0.000000]  BIOS-e820: 00000000ffc00000 - 0000000100000000 (reserved)
[    0.000000]  BIOS-e820: 0000000100000000 - 0000000140000000 (usable)
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] DMI 2.4 present.
[    0.000000] DMI: Apple Inc. MacBook5,1/Mac-F42D89C8, BIOS
MB51.88Z.007D.B03.0904271443 04/27/09
[    0.000000] e820 update range: 0000000000000000 - 0000000000010000
(usable) ==> (reserved)
[    0.000000] e820 remove range: 00000000000a0000 - 0000000000100000 (usable)
[    0.000000] No AGP bridge found
[    0.000000] last_pfn = 0x140000 max_arch_pfn = 0x400000000
[    0.000000] MTRR default type: uncachable
[    0.000000] MTRR fixed ranges enabled:
[    0.000000]   00000-9FFFF write-back
[    0.000000]   A0000-FFFFF uncachable
[    0.000000] MTRR variable ranges enabled:
[    0.000000]   0 disabled
[    0.000000]   1 base 000000000 mask F80000000 write-back
[    0.000000]   2 base 080000000 mask FC0000000 write-back
[    0.000000]   3 base 100000000 mask FC0000000 write-back
[    0.000000]   4 base 0BFF00000 mask FFFF00000 uncachable
[    0.000000]   5 disabled
[    0.000000]   6 disabled
[    0.000000]   7 disabled
[    0.000000] x86 PAT enabled: cpu 0, old 0x7040600070406, new 0x7010600070106
[    0.000000] e820 update range: 00000000bff00000 - 0000000100000000
(usable) ==> (reserved)
[    0.000000] last_pfn = 0xbe86e max_arch_pfn = 0x400000000
[    0.000000] initial memory mapped : 0 - 20000000
[    0.000000] Base memory trampoline at [ffff88000009a000] 9a000 size 20480
[    0.000000] init_memory_mapping: 0000000000000000-00000000be86e000
[    0.000000]  0000000000 - 00be800000 page 2M
[    0.000000]  00be800000 - 00be86e000 page 4k
[    0.000000] kernel direct mapping tables up to be86e000 @ 1fffb000-20000000
[    0.000000] init_memory_mapping: 0000000100000000-0000000140000000
[    0.000000]  0100000000 - 0140000000 page 2M
[    0.000000] kernel direct mapping tables up to 140000000 @ be868000-be86e000
[    0.000000] RAMDISK: 7f194000 - 7ffdf000
[    0.000000] ACPI: RSDP 00000000000fe020 00024 (v02 APPLE )
[    0.000000] ACPI: XSDT 00000000bfeee1c0 00074 (v01 APPLE   Apple00
0000007D      01000013)
[    0.000000] ACPI: FACP 00000000bfeec000 000F4 (v03 APPLE   Apple00
0000007D Loki 0000005F)
[    0.000000] ACPI: DSDT 00000000bfee0000 058CA (v01 APPLE   MacBook
00050001 INTL 20061109)
[    0.000000] ACPI: FACS 00000000bfecd000 00040
[    0.000000] ACPI: HPET 00000000bfeeb000 00038 (v01 APPLE   Apple00
00000001 Loki 0000005F)
[    0.000000] ACPI: APIC 00000000bfeea000 00068 (v01 APPLE   Apple00
00000001 Loki 0000005F)
[    0.000000] ACPI: MCFG 00000000bfee9000 0003C (v01 APPLE   Apple00
00000001 Loki 0000005F)
[    0.000000] ACPI: ASF! 00000000bfee8000 000A5 (v32 APPLE   Apple00
00000001 Loki 0000005F)
[    0.000000] ACPI: SBST 00000000bfee7000 00030 (v01 APPLE   Apple00
00000001 Loki 0000005F)
[    0.000000] ACPI: ECDT 00000000bfee6000 00053 (v01 APPLE   Apple00
00000001 Loki 0000005F)
[    0.000000] ACPI: SSDT 00000000bfec8000 004DC (v01  APPLE    CpuPm
00003000 INTL 20061109)
[    0.000000] ACPI: SSDT 00000000bfedf000 000A5 (v01 SataRe  SataPri
00001000 INTL 20061109)
[    0.000000] ACPI: SSDT 00000000bfecc000 0009F (v01 SataRe  SataSec
00001000 INTL 20061109)
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] No NUMA configuration found
[    0.000000] Faking a node at 0000000000000000-0000000140000000
[    0.000000] Initmem setup node 0 0000000000000000-0000000140000000
[    0.000000]   NODE_DATA [000000013fffc000 - 000000013fffffff]
[    0.000000]  [ffffea0000000000-ffffea0004ffffff] PMD ->
[ffff88013ba00000-ffff88013f5fffff] on node 0
[    0.000000] Zone PFN ranges:
[    0.000000]   DMA      0x00000010 -> 0x00001000
[    0.000000]   DMA32    0x00001000 -> 0x00100000
[    0.000000]   Normal   0x00100000 -> 0x00140000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000010 -> 0x0000009f
[    0.000000]     0: 0x00000100 -> 0x00080000
[    0.000000]     0: 0x00090000 -> 0x000be86e
[    0.000000]     0: 0x00100000 -> 0x00140000
[    0.000000] On node 0 totalpages: 976893
[    0.000000]   DMA zone: 64 pages used for memmap
[    0.000000]   DMA zone: 5 pages reserved
[    0.000000]   DMA zone: 3914 pages, LIFO batch:0
[    0.000000]   DMA32 zone: 16320 pages used for memmap
[    0.000000]   DMA32 zone: 694446 pages, LIFO batch:31
[    0.000000]   Normal zone: 4096 pages used for memmap
[    0.000000]   Normal zone: 258048 pages, LIFO batch:31
[    0.000000] ACPI: PM-Timer IO Port: 0x408
[    0.000000] ACPI: Local APIC address 0xfee00000
[    0.000000] ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
[    0.000000] ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
[    0.000000] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.000000] ACPI: IOAPIC (id[0x01] address[0xfec00000] gsi_base[0])
[    0.000000] IOAPIC[0]: apic_id 1, version 17, address 0xfec00000, GSI 0-23
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.000000] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.000000] ACPI: IRQ0 used by override.
[    0.000000] ACPI: IRQ2 used by override.
[    0.000000] ACPI: IRQ9 used by override.
[    0.000000] Using ACPI (MADT) for SMP configuration information
[    0.000000] ACPI: HPET id: 0x10de8201 base: 0xfed00000
[    0.000000] SMP: Allowing 2 CPUs, 0 hotplug CPUs
[    0.000000] nr_irqs_gsi: 40
[    0.000000] PM: Registered nosave memory: 000000000009f000 - 00000000000a0000
[    0.000000] PM: Registered nosave memory: 00000000000a0000 - 00000000000e0000
[    0.000000] PM: Registered nosave memory: 00000000000e0000 - 0000000000100000
[    0.000000] PM: Registered nosave memory: 0000000080000000 - 0000000090000000
[    0.000000] PM: Registered nosave memory: 00000000be86e000 - 00000000be870000
[    0.000000] PM: Registered nosave memory: 00000000be870000 - 00000000be871000
[    0.000000] PM: Registered nosave memory: 00000000be871000 - 00000000be873000
[    0.000000] PM: Registered nosave memory: 00000000be873000 - 00000000be88e000
[    0.000000] PM: Registered nosave memory: 00000000be88e000 - 00000000bea8f000
[    0.000000] PM: Registered nosave memory: 00000000bea8f000 - 00000000bfec6000
[    0.000000] PM: Registered nosave memory: 00000000bfec6000 - 00000000bfec8000
[    0.000000] PM: Registered nosave memory: 00000000bfec8000 - 00000000bfec9000
[    0.000000] PM: Registered nosave memory: 00000000bfec9000 - 00000000bfecb000
[    0.000000] PM: Registered nosave memory: 00000000bfecb000 - 00000000bfecd000
[    0.000000] PM: Registered nosave memory: 00000000bfecd000 - 00000000bfedf000
[    0.000000] PM: Registered nosave memory: 00000000bfedf000 - 00000000bfef9000
[    0.000000] PM: Registered nosave memory: 00000000bfef9000 - 00000000bfeff000
[    0.000000] PM: Registered nosave memory: 00000000bfeff000 - 00000000bff00000
[    0.000000] PM: Registered nosave memory: 00000000bff00000 - 00000000d3300000
[    0.000000] PM: Registered nosave memory: 00000000d3300000 - 00000000d3301000
[    0.000000] PM: Registered nosave memory: 00000000d3301000 - 00000000f0000000
[    0.000000] PM: Registered nosave memory: 00000000f0000000 - 00000000f4000000
[    0.000000] PM: Registered nosave memory: 00000000f4000000 - 00000000fec00000
[    0.000000] PM: Registered nosave memory: 00000000fec00000 - 00000000fec01000
[    0.000000] PM: Registered nosave memory: 00000000fec01000 - 00000000fee00000
[    0.000000] PM: Registered nosave memory: 00000000fee00000 - 00000000fee01000
[    0.000000] PM: Registered nosave memory: 00000000fee01000 - 00000000ffc00000
[    0.000000] PM: Registered nosave memory: 00000000ffc00000 - 0000000100000000
[    0.000000] Allocating PCI resources starting at d3301000 (gap:
d3301000:1ccff000)
[    0.000000] Booting paravirtualized kernel on bare hardware
[    0.000000] setup_percpu: NR_CPUS:64 nr_cpumask_bits:64
nr_cpu_ids:2 nr_node_ids:1
[    0.000000] PERCPU: Embedded 28 pages/cpu @ffff88013fc00000 s82880
r8192 d23616 u1048576
[    0.000000] pcpu-alloc: s82880 r8192 d23616 u1048576 alloc=1*2097152
[    0.000000] pcpu-alloc: [0] 0 1
[    0.000000] Built 1 zonelists in Node order, mobility grouping on.
Total pages: 956408
[    0.000000] Policy zone: Normal
[    0.000000] Kernel command line: archisobasedir=arch
archisolabel=ARCH_201207 initrd=boot/x86_64/archiso.img
BOOT_IMAGE=boot/x86_64/vmlinuz
[    0.000000] PID hash table entries: 4096 (order: 3, 32768 bytes)
[    0.000000] Checking aperture...
[    0.000000] No AGP bridge found
[    0.000000] Calgary: detecting Calgary via BIOS EBDA area
[    0.000000] Calgary: Unable to locate Rio Grande table in EBDA - bailing!
[    0.000000] Memory: 3754016k/5242880k available (4538k kernel code,
1335308k absent, 153556k reserved, 4308k data, 740k init)
[    0.000000] SLUB: Genslabs=15, HWalign=64, Order=0-3, MinObjects=0,
CPUs=2, Nodes=1
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] 	RCU dyntick-idle grace-period acceleration is enabled.
[    0.000000] 	Dump stacks of tasks blocking RCU-preempt GP.
[    0.000000] NR_IRQS:4352 nr_irqs:512 16
[    0.000000] Extended CMOS year: 2000
[    0.000000] spurious 8259A interrupt: IRQ7.
[    0.000000] Console: colour VGA+ 80x25
[    0.000000] console [tty0] enabled
[    0.000000] allocated 15728640 bytes of page_cgroup
[    0.000000] please try 'cgroup_disable=memory' option if you don't
want memory cgroups
[    0.000000] hpet clockevent registered
[    0.000000] Fast TSC calibration using PIT
[    0.000000] Detected 1989.954 MHz processor.
[    0.003338] Calibrating delay loop (skipped), value calculated
using timer frequency.. 3981.73 BogoMIPS (lpj=6633180)
[    0.003344] pid_max: default: 32768 minimum: 301
[    0.003381] Security Framework initialized
[    0.003389] AppArmor: AppArmor disabled by boot time parameter
[    0.003852] Dentry cache hash table entries: 524288 (order: 10,
4194304 bytes)
[    0.007533] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes)
[    0.008607] Mount-cache hash table entries: 256
[    0.008916] Initializing cgroup subsys cpuacct
[    0.008920] Initializing cgroup subsys memory
[    0.008933] Initializing cgroup subsys devices
[    0.008936] Initializing cgroup subsys freezer
[    0.008938] Initializing cgroup subsys net_cls
[    0.008941] Initializing cgroup subsys blkio
[    0.008985] CPU: Physical Processor ID: 0
[    0.008987] CPU: Processor Core ID: 0
[    0.008991] mce: CPU supports 6 MCE banks
[    0.009002] CPU0: Thermal monitoring enabled (TM2)
[    0.009007] using mwait in idle threads.
[    0.010854] ACPI: Core revision 20120320
[    0.016310] ftrace: allocating 17824 entries in 70 pages
[    0.023863] ..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
[    0.058435] CPU0: Intel(R) Core(TM)2 Duo CPU     P7350  @ 2.00GHz stepping 06
[    0.059996] Performance Events: PEBS fmt0+, 4-deep LBR, Core2
events, Intel PMU driver.
[    0.059996] ... version:                2
[    0.059996] ... bit width:              40
[    0.059996] ... generic registers:      2
[    0.059996] ... value mask:             000000ffffffffff
[    0.059996] ... max period:             000000007fffffff
[    0.059996] ... fixed-purpose events:   3
[    0.059996] ... event mask:             0000000700000003
[    0.076766] NMI watchdog: enabled, takes one hw-pmu counter.
[    0.096678] Booting Node   0, Processors  #1 Ok.
[    0.109834] NMI watchdog: enabled, takes one hw-pmu counter.
[    0.109892] Brought up 2 CPUs
[    0.109895] Total of 2 processors activated (7963.47 BogoMIPS).
[    0.110103] devtmpfs: initialized
[    0.113348] PM: Registering ACPI NVS region [mem
0xbe86e000-0xbe86ffff] (8192 bytes)
[    0.113352] PM: Registering ACPI NVS region [mem
0xbe871000-0xbe872fff] (8192 bytes)
[    0.113355] PM: Registering ACPI NVS region [mem
0xbe88e000-0xbea8efff] (2101248 bytes)
[    0.113399] PM: Registering ACPI NVS region [mem
0xbfec6000-0xbfec7fff] (8192 bytes)
[    0.113402] PM: Registering ACPI NVS region [mem
0xbfec9000-0xbfecafff] (8192 bytes)
[    0.113405] PM: Registering ACPI NVS region [mem
0xbfecd000-0xbfedefff] (73728 bytes)
[    0.113410] Apple MacBook5 series board detected. Selecting
PCI-method for reboots.
[    0.114414] NET: Registered protocol family 16
[    0.114593] ACPI: bus type pci registered
[    0.116690] PCI: MMCONFIG for domain 0000 [bus 00-ff] at [mem
0xf0000000-0xffffffff] (base 0xf0000000)
[    0.116696] PCI: MMCONFIG at [mem 0xf0000000-0xffffffff] reserved in E820
[    0.116700] PCI: MMCONFIG for 0000 [bus00-3f] at [mem
0xf0000000-0xf3ffffff] (base 0xf0000000) (size reduced!)
[    0.145837] PCI: Using configuration type 1 for base access
[    0.146529] bio: create slab <bio-0> at 0
[    0.146711] ACPI: Added _OSI(Module Device)
[    0.146715] ACPI: Added _OSI(Processor Device)
[    0.146717] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.146720] ACPI: Added _OSI(Processor Aggregator Device)
[    0.148508] ACPI: EC: EC description table is found, configuring boot EC
[    0.152116] [Firmware Bug]: ACPI: BIOS _OSI(Linux) query ignored
[    0.152516] ACPI: SSDT 00000000bfecac98 001F6 (v01  APPLE  Cpu0Ist
00003000 INTL 20061109)
[    0.152932] ACPI: Dynamic OEM Table Load:
[    0.152936] ACPI: SSDT           (null) 001F6 (v01  APPLE  Cpu0Ist
00003000 INTL 20061109)
[    0.153068] ACPI: SSDT 00000000bfec9c18 002AD (v01  APPLE  Cpu0Cst
00003001 INTL 20061109)
[    0.153478] ACPI: Dynamic OEM Table Load:
[    0.153482] ACPI: SSDT           (null) 002AD (v01  APPLE  Cpu0Cst
00003001 INTL 20061109)
[    0.153574] ACPI: SSDT 00000000bfecaf18 000C8 (v01  APPLE  Cpu1Ist
00003000 INTL 20061109)
[    0.153981] ACPI: Dynamic OEM Table Load:
[    0.153985] ACPI: SSDT           (null) 000C8 (v01  APPLE  Cpu1Ist
00003000 INTL 20061109)
[    0.154093] ACPI: SSDT 00000000bfec9f18 00085 (v01  APPLE  Cpu1Cst
00003000 INTL 20061109)
[    0.154491] ACPI: Dynamic OEM Table Load:
[    0.154495] ACPI: SSDT           (null) 00085 (v01  APPLE  Cpu1Cst
00003000 INTL 20061109)
[    0.154514] ACPI: Interpreter enabled
[    0.154514] ACPI: (supports S0 S3 S4 S5)
[    0.154514] ACPI: Using IOAPIC for interrupt routing
[    0.166974] ACPI: EC: GPE = 0x3f, I/O: command/status = 0x66, data = 0x62
[    0.167226] ACPI: No dock devices found.
[    0.167231] PCI: Using host bridge windows from ACPI; if necessary,
use "pci=nocrs" and report a bug
[    0.167412] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
[    0.167521] pci_root PNP0A08:00: host bridge window [io  0x0000-0x0cf7]
[    0.167525] pci_root PNP0A08:00: host bridge window [io  0x0d00-0xffff]
[    0.167528] pci_root PNP0A08:00: host bridge window [mem
0x000a0000-0x000bffff]
[    0.167532] pci_root PNP0A08:00: host bridge window [mem
0x000c0000-0x000c3fff]
[    0.167535] pci_root PNP0A08:00: host bridge window [mem
0x000c4000-0x000c7fff]
[    0.167538] pci_root PNP0A08:00: host bridge window [mem
0x000c8000-0x000cbfff]
[    0.167541] pci_root PNP0A08:00: host bridge window [mem
0x000cc000-0x000cffff]
[    0.167544] pci_root PNP0A08:00: host bridge window [mem
0x000d0000-0x000d3fff]
[    0.167548] pci_root PNP0A08:00: host bridge window [mem
0x000d4000-0x000d7fff]
[    0.167551] pci_root PNP0A08:00: host bridge window [mem
0x000d8000-0x000dbfff]
[    0.167554] pci_root PNP0A08:00: host bridge window [mem
0x000dc000-0x000dffff]
[    0.167557] pci_root PNP0A08:00: host bridge window [mem
0x000e0000-0x000e3fff]
[    0.167560] pci_root PNP0A08:00: host bridge window [mem
0x000e4000-0x000e7fff]
[    0.167564] pci_root PNP0A08:00: host bridge window [mem
0x000e8000-0x000ebfff]
[    0.167567] pci_root PNP0A08:00: host bridge window [mem
0x000ec000-0x000effff]
[    0.167570] pci_root PNP0A08:00: host bridge window [mem
0x000f0000-0x000fffff]
[    0.167574] pci_root PNP0A08:00: host bridge window [mem
0xc0000000-0xfebfffff]
[    0.167583] pci_root PNP0A08:00: ignoring host bridge window [mem
0x000cc000-0x000cffff] (conflicts with Video ROM [mem
0x000c0000-0x000ce3ff])
[    0.167632] PCI host bridge to bus 0000:00
[    0.167636] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7]
[    0.167639] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff]
[    0.167642] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff]
[    0.167645] pci_bus 0000:00: root bus resource [mem 0x000c0000-0x000c3fff]
[    0.167648] pci_bus 0000:00: root bus resource [mem 0x000c4000-0x000c7fff]
[    0.167651] pci_bus 0000:00: root bus resource [mem 0x000c8000-0x000cbfff]
[    0.167654] pci_bus 0000:00: root bus resource [mem 0x000d0000-0x000d3fff]
[    0.167657] pci_bus 0000:00: root bus resource [mem 0x000d4000-0x000d7fff]
[    0.167660] pci_bus 0000:00: root bus resource [mem 0x000d8000-0x000dbfff]
[    0.167663] pci_bus 0000:00: root bus resource [mem 0x000dc000-0x000dffff]
[    0.167666] pci_bus 0000:00: root bus resource [mem 0x000e0000-0x000e3fff]
[    0.167669] pci_bus 0000:00: root bus resource [mem 0x000e4000-0x000e7fff]
[    0.167672] pci_bus 0000:00: root bus resource [mem 0x000e8000-0x000ebfff]
[    0.167675] pci_bus 0000:00: root bus resource [mem 0x000ec000-0x000effff]
[    0.167678] pci_bus 0000:00: root bus resource [mem 0x000f0000-0x000fffff]
[    0.167681] pci_bus 0000:00: root bus resource [mem 0xc0000000-0xfebfffff]
[    0.167699] pci 0000:00:00.0: [10de:0a82] type 00 class 0x060000
[    0.167807] pci 0000:00:00.1: [10de:0a88] type 00 class 0x050000
[    0.167962] pci 0000:00:03.0: [10de:0aae] type 00 class 0x060100
[    0.167974] pci 0000:00:03.0: reg 10: [io  0x2000-0x20ff]
[    0.168026] pci 0000:00:03.1: [10de:0aa4] type 00 class 0x050000
[    0.168117] pci 0000:00:03.2: [10de:0aa2] type 00 class 0x0c0500
[    0.168133] pci 0000:00:03.2: reg 10: [io  0x2180-0x21bf]
[    0.168158] pci 0000:00:03.2: reg 20: [io  0x2140-0x217f]
[    0.168166] pci 0000:00:03.2: reg 24: [io  0x2100-0x213f]
[    0.168206] pci 0000:00:03.2: PME# supported from D3hot D3cold
[    0.168231] pci 0000:00:03.3: [10de:0a89] type 00 class 0x050000
[    0.168382] pci 0000:00:03.4: [10de:0a98] type 00 class 0x050000
[    0.168450] pci 0000:00:03.5: [10de:0aa3] type 00 class 0x0b4000
[    0.168471] pci 0000:00:03.5: reg 10: [mem 0xd3300000-0xd337ffff]
[    0.168603] pci 0000:00:04.0: [10de:0aa5] type 00 class 0x0c0310
[    0.168617] pci 0000:00:04.0: reg 10: [mem 0xd3388000-0xd3388fff]
[    0.168673] pci 0000:00:04.0: supports D1 D2
[    0.168676] pci 0000:00:04.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.168695] pci 0000:00:04.1: [10de:0aa6] type 00 class 0x0c0320
[    0.168711] pci 0000:00:04.1: reg 10: [mem 0xd3389200-0xd33892ff]
[    0.168777] pci 0000:00:04.1: supports D1 D2
[    0.168779] pci 0000:00:04.1: PME# supported from D0 D1 D2 D3hot D3cold
[    0.168808] pci 0000:00:06.0: [10de:0aa7] type 00 class 0x0c0310
[    0.168822] pci 0000:00:06.0: reg 10: [mem 0xd3387000-0xd3387fff]
[    0.168877] pci 0000:00:06.0: supports D1 D2
[    0.168880] pci 0000:00:06.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.168899] pci 0000:00:06.1: [10de:0aa9] type 00 class 0x0c0320
[    0.168915] pci 0000:00:06.1: reg 10: [mem 0xd3389100-0xd33891ff]
[    0.168980] pci 0000:00:06.1: supports D1 D2
[    0.168983] pci 0000:00:06.1: PME# supported from D0 D1 D2 D3hot D3cold
[    0.169012] pci 0000:00:08.0: [10de:0ac0] type 00 class 0x040300
[    0.169026] pci 0000:00:08.0: reg 10: [mem 0xd3380000-0xd3383fff]
[    0.169082] pci 0000:00:08.0: PME# supported from D3hot D3cold
[    0.169098] pci 0000:00:09.0: [10de:0aab] type 01 class 0x060401
[    0.169156] pci 0000:00:0a.0: [10de:0ab0] type 00 class 0x020000
[    0.169171] pci 0000:00:0a.0: reg 10: [mem 0xd3386000-0xd3386fff]
[    0.169179] pci 0000:00:0a.0: reg 14: [io  0x21e0-0x21e7]
[    0.169186] pci 0000:00:0a.0: reg 18: [mem 0xd3389000-0xd33890ff]
[    0.169194] pci 0000:00:0a.0: reg 1c: [mem 0xd3389300-0xd338930f]
[    0.169239] pci 0000:00:0a.0: supports D1 D2
[    0.169242] pci 0000:00:0a.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.169264] pci 0000:00:0b.0: [10de:0ab5] type 00 class 0x010185
[    0.169997] pci 0000:00:0b.0: reg 10: [io  0x21d8-0x21df]
[    0.170004] pci 0000:00:0b.0: reg 14: [io  0x21ec-0x21ef]
[    0.170012] pci 0000:00:0b.0: reg 18: [io  0x21d0-0x21d7]
[    0.170019] pci 0000:00:0b.0: reg 1c: [io  0x21e8-0x21eb]
[    0.170027] pci 0000:00:0b.0: reg 20: [io  0x21c0-0x21cf]
[    0.170035] pci 0000:00:0b.0: reg 24: [mem 0xd3384000-0xd3385fff]
[    0.170092] pci 0000:00:10.0: [10de:0aa0] type 01 class 0x060400
[    0.170141] pci 0000:00:10.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.170203] pci 0000:00:15.0: [10de:0ac6] type 01 class 0x060400
[    0.170435] pci 0000:00:15.0: PME# supported from D0 D1 D2 D3hot D3cold
[    0.170549] pci 0000:00:09.0: PCI bridge to [bus 01-01] (subtractive decode)
[    0.170556] pci 0000:00:09.0:   bridge window [mem 0xd3200000-0xd32fffff]
[    0.170560] pci 0000:00:09.0:   bridge window [io  0x0000-0x0cf7]
(subtractive decode)
[    0.170564] pci 0000:00:09.0:   bridge window [io  0x0d00-0xffff]
(subtractive decode)
[    0.170567] pci 0000:00:09.0:   bridge window [mem
0x000a0000-0x000bffff] (subtractive decode)
[    0.170571] pci 0000:00:09.0:   bridge window [mem
0x000c0000-0x000c3fff] (subtractive decode)
[    0.170575] pci 0000:00:09.0:   bridge window [mem
0x000c4000-0x000c7fff] (subtractive decode)
[    0.170578] pci 0000:00:09.0:   bridge window [mem
0x000c8000-0x000cbfff] (subtractive decode)
[    0.170582] pci 0000:00:09.0:   bridge window [mem
0x000d0000-0x000d3fff] (subtractive decode)
[    0.170585] pci 0000:00:09.0:   bridge window [mem
0x000d4000-0x000d7fff] (subtractive decode)
[    0.170588] pci 0000:00:09.0:   bridge window [mem
0x000d8000-0x000dbfff] (subtractive decode)
[    0.170592] pci 0000:00:09.0:   bridge window [mem
0x000dc000-0x000dffff] (subtractive decode)
[    0.170595] pci 0000:00:09.0:   bridge window [mem
0x000e0000-0x000e3fff] (subtractive decode)
[    0.170599] pci 0000:00:09.0:   bridge window [mem
0x000e4000-0x000e7fff] (subtractive decode)
[    0.170602] pci 0000:00:09.0:   bridge window [mem
0x000e8000-0x000ebfff] (subtractive decode)
[    0.170606] pci 0000:00:09.0:   bridge window [mem
0x000ec000-0x000effff] (subtractive decode)
[    0.170609] pci 0000:00:09.0:   bridge window [mem
0x000f0000-0x000fffff] (subtractive decode)
[    0.170613] pci 0000:00:09.0:   bridge window [mem
0xc0000000-0xfebfffff] (subtractive decode)
[    0.170652] pci 0000:02:00.0: [10de:0863] type 00 class 0x030000
[    0.170671] pci 0000:02:00.0: reg 10: [mem 0xd2000000-0xd2ffffff]
[    0.170686] pci 0000:02:00.0: reg 14: [mem 0xc0000000-0xcfffffff 64bit pref]
[    0.170700] pci 0000:02:00.0: reg 1c: [mem 0xd0000000-0xd1ffffff 64bit pref]
[    0.170710] pci 0000:02:00.0: reg 24: [io  0x1000-0x107f]
[    0.170720] pci 0000:02:00.0: reg 30: [mem 0xd3000000-0xd301ffff pref]
[    0.170797] pci 0000:00:10.0: PCI bridge to [bus 02-02]
[    0.170802] pci 0000:00:10.0:   bridge window [io  0x1000-0x1fff]
[    0.170806] pci 0000:00:10.0:   bridge window [mem 0xd2000000-0xd30fffff]
[    0.170812] pci 0000:00:10.0:   bridge window [mem
0xc0000000-0xd1ffffff 64bit pref]
[    0.171129] pci 0000:03:00.0: [14e4:432b] type 00 class 0x028000
[    0.171151] pci 0000:03:00.0: reg 10: [mem 0xd3100000-0xd3103fff 64bit]
[    0.171261] pci 0000:03:00.0: supports D1 D2
[    0.171264] pci 0000:03:00.0: PME# supported from D0 D3hot D3cold
[    0.176835] pci 0000:00:15.0: PCI bridge to [bus 03-03]
[    0.176857] pci 0000:00:15.0:   bridge window [mem 0xd3100000-0xd31fffff]
[    0.176895] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT]
[    0.177082] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.IXVE._PRT]
[    0.177219]  pci0000:00: Requesting ACPI _OSC control (0x1d)
[    0.177405]  pci0000:00: ACPI _OSC control (0x1d) granted
[    0.201264] ACPI: PCI Interrupt Link [LNK1] (IRQs 5 7 10 11 14 15)
*0, disabled.
[    0.201377] ACPI: PCI Interrupt Link [LNK2] (IRQs 5 7 10 11 14 15)
*0, disabled.
[    0.201482] ACPI: PCI Interrupt Link [LNK3] (IRQs 5 7 10 11 14 15)
*0, disabled.
[    0.201586] ACPI: PCI Interrupt Link [LNK4] (IRQs 5 7 10 11 14 15)
*0, disabled.
[    0.201689] ACPI: PCI Interrupt Link [Z003] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.201793] ACPI: PCI Interrupt Link [Z004] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.201898] ACPI: PCI Interrupt Link [Z005] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.202009] ACPI: PCI Interrupt Link [Z006] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.202119] ACPI: PCI Interrupt Link [Z007] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.202230] ACPI: PCI Interrupt Link [Z008] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.202335] ACPI: PCI Interrupt Link [Z009] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.202439] ACPI: PCI Interrupt Link [Z00A] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.202544] ACPI: PCI Interrupt Link [Z00B] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.202649] ACPI: PCI Interrupt Link [Z00C] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.202754] ACPI: PCI Interrupt Link [Z00D] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.202858] ACPI: PCI Interrupt Link [Z00E] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.202963] ACPI: PCI Interrupt Link [Z00F] (IRQs 16 17 18 19 20 21
22 23) *10
[    0.203067] ACPI: PCI Interrupt Link [Z00G] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.203171] ACPI: PCI Interrupt Link [Z00H] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.203276] ACPI: PCI Interrupt Link [Z00I] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.203391] ACPI: PCI Interrupt Link [Z00J] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.203497] ACPI: PCI Interrupt Link [Z00K] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.203606] ACPI: PCI Interrupt Link [Z00L] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.203712] ACPI: PCI Interrupt Link [Z00M] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.203817] ACPI: PCI Interrupt Link [Z00N] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.203926] ACPI: PCI Interrupt Link [Z00O] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.204031] ACPI: PCI Interrupt Link [Z00P] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.204136] ACPI: PCI Interrupt Link [Z00Q] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.204241] ACPI: PCI Interrupt Link [Z00R] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.204346] ACPI: PCI Interrupt Link [Z00S] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.204450] ACPI: PCI Interrupt Link [Z00T] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.204555] ACPI: PCI Interrupt Link [Z00U] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.204660] ACPI: PCI Interrupt Link [LSMB] (IRQs 16 17 18 19 20 21
22 23) *15
[    0.204763] ACPI: PCI Interrupt Link [LUS0] (IRQs 16 17 18 19 20 21
22 23) *11
[    0.204866] ACPI: PCI Interrupt Link [LUS2] (IRQs 16 17 18 19 20 21
22 23) *10
[    0.204975] ACPI: PCI Interrupt Link [LMAC] (IRQs 16 17 18 19 20 21
22 23) *14
[    0.205079] ACPI: PCI Interrupt Link [LAZA] (IRQs 16 17 18 19 20 21
22 23) *15
[    0.205188] ACPI: PCI Interrupt Link [LGPU] (IRQs 16 17 18 19 20 21
22 23) *11
[    0.205291] ACPI: PCI Interrupt Link [LPID] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.205395] ACPI: PCI Interrupt Link [LSI0] (IRQs 16 17 18 19 20 21
22 23) *11
[    0.205504] ACPI: PCI Interrupt Link [LSI1] (IRQs 16 17 18 19 20 21
22 23) *0, disabled.
[    0.205607] ACPI: PCI Interrupt Link [Z000] (IRQs 16 17 18 19 20 21 22 23) *7
[    0.205716] ACPI: PCI Interrupt Link [Z001] (IRQs 16 17 18 19 20 21 22 23) *5
[    0.205829] ACPI: PCI Interrupt Link [LPMU] (IRQs 16 17 18 19 20 21
22 23) *14
[    0.205934] vgaarb: device added:
PCI:0000:02:00.0,decodes=io+mem,owns=io+mem,locks=none
[    0.205934] vgaarb: loaded
[    0.205934] vgaarb: bridge control possible 0000:02:00.0
[    0.205934] PCI: Using ACPI for IRQ routing
[    0.208052] PCI: pci_cache_line_size set to 64 bytes
[    0.208307] reserve RAM buffer: 000000000009fc00 - 000000000009ffff
[    0.208310] reserve RAM buffer: 00000000be86e000 - 00000000bfffffff
[    0.208439] NetLabel: Initializing
[    0.208442] NetLabel:  domain hash size = 128
[    0.208444] NetLabel:  protocols = UNLABELED CIPSOv4
[    0.208461] NetLabel:  unlabeled traffic allowed by default
[    0.208480] HPET: 4 timers in total, 0 timers will be used for per-cpu timer
[    0.208488] hpet0: at MMIO 0xfed00000, IRQs 2, 8, 31, 31
[    0.208495] hpet0: 4 comparators, 64-bit 25.000000 MHz counter
[    0.220005] Switching to clocksource hpet
[    0.229543] pnp: PnP ACPI init
[    0.229568] ACPI: bus type pnp registered
[    0.229702] pnp 00:00: [bus 00-ff]
[    0.229706] pnp 00:00: [io  0x0cf8-0x0cff]
[    0.229709] pnp 00:00: [io  0x0000-0x0cf7 window]
[    0.229712] pnp 00:00: [io  0x0d00-0xffff window]
[    0.229715] pnp 00:00: [mem 0x000a0000-0x000bffff window]
[    0.229718] pnp 00:00: [mem 0x000c0000-0x000c3fff window]
[    0.229721] pnp 00:00: [mem 0x000c4000-0x000c7fff window]
[    0.229724] pnp 00:00: [mem 0x000c8000-0x000cbfff window]
[    0.229727] pnp 00:00: [mem 0x000cc000-0x000cffff window]
[    0.229730] pnp 00:00: [mem 0x000d0000-0x000d3fff window]
[    0.229733] pnp 00:00: [mem 0x000d4000-0x000d7fff window]
[    0.229736] pnp 00:00: [mem 0x000d8000-0x000dbfff window]
[    0.229739] pnp 00:00: [mem 0x000dc000-0x000dffff window]
[    0.229742] pnp 00:00: [mem 0x000e0000-0x000e3fff window]
[    0.229744] pnp 00:00: [mem 0x000e4000-0x000e7fff window]
[    0.229747] pnp 00:00: [mem 0x000e8000-0x000ebfff window]
[    0.229750] pnp 00:00: [mem 0x000ec000-0x000effff window]
[    0.229753] pnp 00:00: [mem 0x000f0000-0x000fffff window]
[    0.229756] pnp 00:00: [mem 0xc0000000-0xfebfffff window]
[    0.229865] pnp 00:00: Plug and Play ACPI device, IDs PNP0a08
PNP0a03 (active)
[    0.229890] pnp 00:01: [mem 0x00000000-0xffffffffffffffff disabled]
[    0.229893] pnp 00:01: [mem 0xf0000000-0xf3ffffff]
[    0.229967] system 00:01: [mem 0xf0000000-0xf3ffffff] has been reserved
[    0.229973] system 00:01: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.229989] pnp 00:02: [io  0x0300-0x031f]
[    0.230024] pnp 00:02: [irq 6]
[    0.230057] pnp 00:02: Plug and Play ACPI device, IDs APP0001 (active)
[    0.230109] pnp 00:03: [io  0x0000-0x0008]
[    0.230112] pnp 00:03: [io  0x000a-0x000f]
[    0.230115] pnp 00:03: [io  0x0081-0x0083]
[    0.230117] pnp 00:03: [io  0x0087]
[    0.230120] pnp 00:03: [io  0x0089-0x008b]
[    0.230122] pnp 00:03: [io  0x008f]
[    0.230124] pnp 00:03: [io  0x00c0-0x00d1]
[    0.230127] pnp 00:03: [io  0x00d4-0x00df]
[    0.230130] pnp 00:03: [dma 4]
[    0.230168] pnp 00:03: Plug and Play ACPI device, IDs PNP0200 (active)
[    0.230249] pnp 00:04: [irq 0 disabled]
[    0.230257] pnp 00:04: [irq 8]
[    0.230264] pnp 00:04: [mem 0xfed00000-0xfed003ff]
[    0.230321] system 00:04: [mem 0xfed00000-0xfed003ff] has been reserved
[    0.230326] system 00:04: Plug and Play ACPI device, IDs PNP0103
PNP0c01 (active)
[    0.230341] pnp 00:05: [io  0x00f0-0x00f1]
[    0.230348] pnp 00:05: [irq 13]
[    0.230387] pnp 00:05: Plug and Play ACPI device, IDs PNP0c04 (active)
[    0.230533] pnp 00:06: [io  0x0400-0x047f]
[    0.230536] pnp 00:06: [io  0x0480-0x04ff]
[    0.230539] pnp 00:06: [io  0x0500-0x057f]
[    0.230541] pnp 00:06: [io  0x0580-0x05ff]
[    0.230544] pnp 00:06: [io  0x0800-0x087f]
[    0.230546] pnp 00:06: [io  0x0880-0x08ff]
[    0.230549] pnp 00:06: [io  0x2140-0x217f]
[    0.230551] pnp 00:06: [io  0x2100-0x213f]
[    0.230553] pnp 00:06: [io  0x0010-0x001f]
[    0.230556] pnp 00:06: [io  0x0022-0x003f]
[    0.230558] pnp 00:06: [io  0x0044-0x005f]
[    0.230561] pnp 00:06: [io  0x0062-0x0063]
[    0.230563] pnp 00:06: [io  0x0065-0x006f]
[    0.230565] pnp 00:06: [io  0x0072-0x0073]
[    0.230568] pnp 00:06: [io  0x0074-0x007f]
[    0.230570] pnp 00:06: [io  0x0091-0x0093]
[    0.230573] pnp 00:06: [io  0x0097-0x009f]
[    0.230575] pnp 00:06: [io  0x00a2-0x00bf]
[    0.230577] pnp 00:06: [io  0x00e0-0x00ef]
[    0.230580] pnp 00:06: [io  0x04d0-0x04d1]
[    0.230582] pnp 00:06: [io  0x0080]
[    0.230585] pnp 00:06: [io  0x0295-0x0296]
[    0.230656] system 00:06: [io  0x0400-0x047f] has been reserved
[    0.230659] system 00:06: [io  0x0480-0x04ff] has been reserved
[    0.230663] system 00:06: [io  0x0500-0x057f] has been reserved
[    0.230666] system 00:06: [io  0x0580-0x05ff] has been reserved
[    0.230669] system 00:06: [io  0x0800-0x087f] has been reserved
[    0.230673] system 00:06: [io  0x0880-0x08ff] has been reserved
[    0.230676] system 00:06: [io  0x2140-0x217f] has been reserved
[    0.230679] system 00:06: [io  0x2100-0x213f] has been reserved
[    0.230683] system 00:06: [io  0x04d0-0x04d1] has been reserved
[    0.230687] system 00:06: [io  0x0295-0x0296] has been reserved
[    0.230692] system 00:06: Plug and Play ACPI device, IDs PNP0c02 (active)
[    0.230704] pnp 00:07: [io  0x0070-0x0077]
[    0.230744] pnp 00:07: Plug and Play ACPI device, IDs PNP0b00 (active)
[    0.238464] pnp: PnP ACPI: found 8 devices
[    0.238467] ACPI: ACPI bus type pnp unregistered
[    0.246251] pci 0000:00:09.0: PCI bridge to [bus 01-01]
[    0.246258] pci 0000:00:09.0:   bridge window [mem 0xd3200000-0xd32fffff]
[    0.246267] pci 0000:00:10.0: PCI bridge to [bus 02-02]
[    0.246271] pci 0000:00:10.0:   bridge window [io  0x1000-0x1fff]
[    0.246276] pci 0000:00:10.0:   bridge window [mem 0xd2000000-0xd30fffff]
[    0.246282] pci 0000:00:10.0:   bridge window [mem
0xc0000000-0xd1ffffff 64bit pref]
[    0.246288] pci 0000:00:15.0: PCI bridge to [bus 03-03]
[    0.246300] pci 0000:00:15.0:   bridge window [mem 0xd3100000-0xd31fffff]
[    0.246324] pci 0000:00:09.0: enabling device (0000 -> 0002)
[    0.246332] pci 0000:00:09.0: setting latency timer to 64
[    0.246339] pci 0000:00:10.0: setting latency timer to 64
[    0.246521] ACPI: PCI Interrupt Link [Z00F] enabled at IRQ 23
[    0.246538] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7]
[    0.246542] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff]
[    0.246545] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff]
[    0.246548] pci_bus 0000:00: resource 7 [mem 0x000c0000-0x000c3fff]
[    0.246551] pci_bus 0000:00: resource 8 [mem 0x000c4000-0x000c7fff]
[    0.246554] pci_bus 0000:00: resource 9 [mem 0x000c8000-0x000cbfff]
[    0.246557] pci_bus 0000:00: resource 10 [mem 0x000d0000-0x000d3fff]
[    0.246560] pci_bus 0000:00: resource 11 [mem 0x000d4000-0x000d7fff]
[    0.246563] pci_bus 0000:00: resource 12 [mem 0x000d8000-0x000dbfff]
[    0.246566] pci_bus 0000:00: resource 13 [mem 0x000dc000-0x000dffff]
[    0.246569] pci_bus 0000:00: resource 14 [mem 0x000e0000-0x000e3fff]
[    0.246572] pci_bus 0000:00: resource 15 [mem 0x000e4000-0x000e7fff]
[    0.246575] pci_bus 0000:00: resource 16 [mem 0x000e8000-0x000ebfff]
[    0.246579] pci_bus 0000:00: resource 17 [mem 0x000ec000-0x000effff]
[    0.246582] pci_bus 0000:00: resource 18 [mem 0x000f0000-0x000fffff]
[    0.246585] pci_bus 0000:00: resource 19 [mem 0xc0000000-0xfebfffff]
[    0.246588] pci_bus 0000:01: resource 1 [mem 0xd3200000-0xd32fffff]
[    0.246592] pci_bus 0000:01: resource 4 [io  0x0000-0x0cf7]
[    0.246595] pci_bus 0000:01: resource 5 [io  0x0d00-0xffff]
[    0.246598] pci_bus 0000:01: resource 6 [mem 0x000a0000-0x000bffff]
[    0.246601] pci_bus 0000:01: resource 7 [mem 0x000c0000-0x000c3fff]
[    0.246604] pci_bus 0000:01: resource 8 [mem 0x000c4000-0x000c7fff]
[    0.246607] pci_bus 0000:01: resource 9 [mem 0x000c8000-0x000cbfff]
[    0.246610] pci_bus 0000:01: resource 10 [mem 0x000d0000-0x000d3fff]
[    0.246613] pci_bus 0000:01: resource 11 [mem 0x000d4000-0x000d7fff]
[    0.246616] pci_bus 0000:01: resource 12 [mem 0x000d8000-0x000dbfff]
[    0.246619] pci_bus 0000:01: resource 13 [mem 0x000dc000-0x000dffff]
[    0.246622] pci_bus 0000:01: resource 14 [mem 0x000e0000-0x000e3fff]
[    0.246625] pci_bus 0000:01: resource 15 [mem 0x000e4000-0x000e7fff]
[    0.246628] pci_bus 0000:01: resource 16 [mem 0x000e8000-0x000ebfff]
[    0.246631] pci_bus 0000:01: resource 17 [mem 0x000ec000-0x000effff]
[    0.246634] pci_bus 0000:01: resource 18 [mem 0x000f0000-0x000fffff]
[    0.246637] pci_bus 0000:01: resource 19 [mem 0xc0000000-0xfebfffff]
[    0.246641] pci_bus 0000:02: resource 0 [io  0x1000-0x1fff]
[    0.246644] pci_bus 0000:02: resource 1 [mem 0xd2000000-0xd30fffff]
[    0.246647] pci_bus 0000:02: resource 2 [mem 0xc0000000-0xd1ffffff
64bit pref]
[    0.246651] pci_bus 0000:03: resource 1 [mem 0xd3100000-0xd31fffff]
[    0.246724] NET: Registered protocol family 2
[    0.246896] IP route cache hash table entries: 131072 (order: 8,
1048576 bytes)
[    0.248159] TCP established hash table entries: 524288 (order: 11,
8388608 bytes)
[    0.252368] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes)
[    0.252913] TCP: Hash tables configured (established 524288 bind 65536)
[    0.252916] TCP: reno registered
[    0.252930] UDP hash table entries: 2048 (order: 4, 65536 bytes)
[    0.252974] UDP-Lite hash table entries: 2048 (order: 4, 65536 bytes)
[    0.253132] NET: Registered protocol family 1
[    0.253466] ACPI: PCI Interrupt Link [LUS0] enabled at IRQ 22
[    0.320198] ACPI: PCI Interrupt Link [LUS2] enabled at IRQ 21
[    0.320398] ACPI: PCI Interrupt Link [Z000] enabled at IRQ 20
[    0.373530] ACPI: PCI Interrupt Link [Z001] enabled at IRQ 19
[    0.373644] pci 0000:02:00.0: Boot video device
[    0.373808] PCI: CLS 256 bytes, default 64
[    0.373885] Unpacking initramfs...
[    3.068177] Freeing initrd memory: 14636k freed
[    3.074440] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    3.074446] Placing 64MB software IO TLB between ffff8800ba868000 -
ffff8800be868000
[    3.074449] software IO TLB at phys 0xba868000 - 0xbe868000
[    3.075079] audit: initializing netlink socket (disabled)
[    3.075100] type=2000 audit(1343490925.073:1): initialized
[    3.075754] HugeTLB registered 2 MB page size, pre-allocated 0 pages
[    3.078539] VFS: Disk quotas dquot_6.5.2
[    3.078602] Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    3.078729] msgmni has been set to 7360
[    3.078989] Block layer SCSI generic (bsg) driver version 0.4
loaded (major 253)
[    3.079030] io scheduler noop registered
[    3.079033] io scheduler deadline registered
[    3.079111] io scheduler cfq registered (default)
[    3.079404] pcieport 0000:00:15.0: irq 40 for MSI/MSI-X
[    3.079611] pcieport 0000:00:15.0: Signaling PME through PCIe PME interrupt
[    3.079615] pci 0000:03:00.0: Signaling PME through PCIe PME interrupt
[    3.079624] pcie_pme 0000:00:15.0:pcie01: service driver pcie_pme loaded
[    3.079762] intel_idle: does not run on family 6 model 23
[    3.079835] GHES: HEST is not enabled!
[    3.079910] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    3.080518] Linux agpgart interface v0.103
[    3.080609] i8042: PNP: No PS/2 controller found. Probing ports directly.
[    3.081476] i8042: No controller found
[    3.081618] mousedev: PS/2 mouse device common for all mice
[    3.081940] rtc_cmos 00:07: rtc core: registered rtc_cmos as rtc0
[    3.081992] rtc0: alarms up to one year, y3k, 242 bytes nvram, hpet irqs
[    3.082002] cpuidle: using governor ladder
[    3.082004] cpuidle: using governor menu
[    3.082186] TCP: cubic registered
[    3.082325] NET: Registered protocol family 10
[    3.082586] NET: Registered protocol family 17
[    3.082592] Registering the dns_resolver key type
[    3.082763] PM: Hibernation image not present or could not be loaded.
[    3.082771] registered taskstats version 1
[    3.083800] rtc_cmos 00:07: setting system clock to 2012-07-28
15:55:25 UTC (1343490925)
[    3.083906] Initializing network drop monitor service
[    3.085546] Freeing unused kernel memory: 740k freed
[    3.085814] Write protecting the kernel read-only data: 8192k
[    3.092656] Freeing unused kernel memory: 1588k freed
[    3.095926] Freeing unused kernel memory: 640k freed
[    3.106329] systemd-udevd[40]: starting version 186
[    3.131730] input: Lid Switch as
/devices/LNXSYSTM:00/device:00/PNP0C0D:00/input/input0
[    3.131780] ACPI: Lid Switch [LID0]
[    3.131891] input: Power Button as
/devices/LNXSYSTM:00/device:00/PNP0C0C:00/input/input1
[    3.131897] ACPI: Power Button [PWRB]
[    3.132019] input: Sleep Button as
/devices/LNXSYSTM:00/device:00/PNP0C0E:00/input/input2
[    3.132025] ACPI: Sleep Button [SLPB]
[    3.132148] input: Power Button as
/devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
[    3.132154] ACPI: Power Button [PWRF]
[    3.181401] usbcore: registered new interface driver usbfs
[    3.181433] usbcore: registered new interface driver hub
[    3.182142] forcedeth: Reverse Engineered nForce ethernet driver.
Version 0.64.
[    3.182371] ACPI: PCI Interrupt Link [LMAC] enabled at IRQ 18
[    3.182391] forcedeth 0000:00:0a.0: setting latency timer to 64
[    3.183273] usbcore: registered new device driver usb
[    3.183798] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    3.185744] SCSI subsystem initialized
[    3.190143] libata version 3.00 loaded.
[    3.191082] [drm] Initialized drm 1.1.0 20060810
[    3.193180] wmi: Mapper loaded
[    3.193942] b43-pci-bridge 0000:03:00.0: power state changed by ACPI to D0
[    3.193950] b43-pci-bridge 0000:03:00.0: power state changed by ACPI to D0
[    3.197744] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    3.200667] ACPI: PCI Interrupt Link [LGPU] enabled at IRQ 17
[    3.201238] nouveau 0000:02:00.0: setting latency timer to 64
[    3.201282] [drm] nouveau 0000:02:00.0: Detected an NV50 generation
card (0x0ac180b1)
[    3.210261] ssb: Found chip with id 0x4322, rev 0x01 and package 0x0A
[    3.210270] ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x17, vendor 0x4243)
[    3.210278] ssb: Core 1 found: IEEE 802.11 (cc 0x812, rev 0x10,
vendor 0x4243)
[    3.210286] ssb: Core 2 found: PCI-E (cc 0x820, rev 0x0B, vendor 0x4243)
[    3.210294] ssb: Core 3 found: PCI (cc 0x804, rev 0x0E, vendor 0x4243)
[    3.210301] ssb: Core 4 found: USB 2.0 Device (cc 0x81A, rev 0x05,
vendor 0x4243)
[    3.210308] ssb: Core 5 found: UNKNOWN (cc 0x8FF, rev 0x00, vendor 0x4243)
[    3.210316] ssb: Core 6 found: Internal Memory (cc 0x80E, rev 0x03,
vendor 0x4243)
[    3.229043] [drm] nouveau 0000:02:00.0: Checking PRAMIN for VBIOS
[    3.241045] forcedeth 0000:00:0a.0: ifname eth0, PHY OUI 0x732 @ 1,
addr 00:23:32:bf:22:d4
[    3.241051] forcedeth 0000:00:0a.0: highdma csum pwrctl gbit lnktim
msi desc-v3
[    3.241266] ehci_hcd 0000:00:04.1: setting latency timer to 64
[    3.241272] ehci_hcd 0000:00:04.1: EHCI Host Controller
[    3.241302] ehci_hcd 0000:00:04.1: new USB bus registered, assigned
bus number 1
[    3.241341] ehci_hcd 0000:00:04.1: debug port 1
[    3.241356] ehci_hcd 0000:00:04.1: cache line size of 256 is not supported
[    3.241378] ehci_hcd 0000:00:04.1: irq 21, io mem 0xd3389200
[    3.250054] ehci_hcd 0000:00:04.1: USB 2.0 started, EHCI 1.00
[    3.250241] hub 1-0:1.0: USB hub found
[    3.250247] hub 1-0:1.0: 7 ports detected
[    3.250403] ehci_hcd 0000:00:06.1: setting latency timer to 64
[    3.250409] ehci_hcd 0000:00:06.1: EHCI Host Controller
[    3.250420] ehci_hcd 0000:00:06.1: new USB bus registered, assigned
bus number 2
[    3.250451] ehci_hcd 0000:00:06.1: debug port 1
[    3.250466] ehci_hcd 0000:00:06.1: cache line size of 256 is not supported
[    3.250488] ehci_hcd 0000:00:06.1: irq 19, io mem 0xd3389100
[    3.260030] ehci_hcd 0000:00:06.1: USB 2.0 started, EHCI 1.00
[    3.260321] hub 2-0:1.0: USB hub found
[    3.260327] hub 2-0:1.0: 5 ports detected
[    3.260446] ahci 0000:00:0b.0: version 3.0
[    3.260662] ACPI: PCI Interrupt Link [LSI0] enabled at IRQ 16
[    3.260731] ahci 0000:00:0b.0: irq 41 for MSI/MSI-X
[    3.260751] ahci 0000:00:0b.0: controller can't do PMP, turning off CAP_PMP
[    3.260807] ahci 0000:00:0b.0: AHCI 0001.0200 32 slots 6 ports 3
Gbps 0x3 impl IDE mode
[    3.260813] ahci 0000:00:0b.0: flags: 64bit ncq sntf pm led pio
slum part boh
[    3.260817] ahci 0000:00:0b.0: setting latency timer to 64
[    3.262116] scsi0 : ahci
[    3.263369] scsi1 : ahci
[    3.263477] scsi2 : ahci
[    3.263590] scsi3 : ahci
[    3.266880] scsi4 : ahci
[    3.266998] scsi5 : ahci
[    3.267176] ata1: SATA max UDMA/133 abar m8192 at 0xd3384000 port
0xd3384100 irq 41
[    3.267180] ata2: SATA max UDMA/133 abar m8192 at 0xd3384000 port
0xd3384180 irq 41
[    3.267183] ata3: DUMMY
[    3.267185] ata4: DUMMY
[    3.267187] ata5: DUMMY
[    3.267188] ata6: DUMMY
[    3.267248] ohci_hcd 0000:00:04.0: setting latency timer to 64
[    3.267252] ohci_hcd 0000:00:04.0: OHCI Host Controller
[    3.267266] ohci_hcd 0000:00:04.0: new USB bus registered, assigned
bus number 3
[    3.267294] ohci_hcd 0000:00:04.0: irq 22, io mem 0xd3388000
[    3.273652] ssb: Sonics Silicon Backplane found on PCI device 0000:03:00.0
[    3.302931] [drm] nouveau 0000:02:00.0: ... appears to be valid
[    3.302934] [drm] nouveau 0000:02:00.0: Using VBIOS from PRAMIN
[    3.302938] [drm] nouveau 0000:02:00.0: BIT BIOS found
[    3.302942] [drm] nouveau 0000:02:00.0: Bios version 62.79.40.00
[    3.302946] [drm] nouveau 0000:02:00.0: TMDS table version 2.0
[    3.303162] [drm] nouveau 0000:02:00.0: MXM: no VBIOS data, nothing to do
[    3.303165] [drm] nouveau 0000:02:00.0: DCB version 4.0
[    3.303169] [drm] nouveau 0000:02:00.0: DCB outp 00: 01000123 00010014
[    3.303172] [drm] nouveau 0000:02:00.0: DCB outp 01: 02021232 00000010
[    3.303175] [drm] nouveau 0000:02:00.0: DCB outp 02: 02021286 0f220010
[    3.303178] [drm] nouveau 0000:02:00.0: DCB conn 00: 00000040
[    3.303181] [drm] nouveau 0000:02:00.0: DCB conn 01: 0000a146
[    3.303187] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 0
at offset 0xD814
[    3.322180] hub 3-0:1.0: USB hub found
[    3.322188] hub 3-0:1.0: 7 ports detected
[    3.322306] ohci_hcd 0000:00:06.0: setting latency timer to 64
[    3.322311] ohci_hcd 0000:00:06.0: OHCI Host Controller
[    3.322322] ohci_hcd 0000:00:06.0: new USB bus registered, assigned
bus number 4
[    3.322347] ohci_hcd 0000:00:06.0: irq 20, io mem 0xd3387000
[    3.375505] hub 4-0:1.0: USB hub found
[    3.375512] hub 4-0:1.0: 5 ports detected
[    3.387260] [drm] nouveau 0000:02:00.0: Register 0x00004028 not
found in PLL limits table
[    3.388433] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 1
at offset 0xDAC8
[    3.388481] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 2
at offset 0xDACA
[    3.388488] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 3
at offset 0xDBAF
[    3.388497] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table 4
at offset 0xDC74
[    3.388500] [drm] nouveau 0000:02:00.0: Parsing VBIOS init table at
offset 0xDCD9
[    3.408507] [drm] nouveau 0000:02:00.0: 0xDCD9: Condition still not
met after 20ms, skipping following opcodes
[    3.446794] [TTM] Zone  kernel: Available graphics memory: 1885810 kiB
[    3.446797] [TTM] Initializing pool allocator
[    3.446803] [TTM] Initializing DMA pool allocator
[    3.446820] [drm] nouveau 0000:02:00.0: Detected 256MiB VRAM (DDR1)
[    3.446823] [drm] nouveau 0000:02:00.0: Stolen system memory at: 0x0080000000
[    3.449006] [drm] nouveau 0000:02:00.0: 64 MiB GART (aperture)
[    3.474237] [drm] Supports vblank timestamp caching Rev 1 (10.10.2010).
[    3.474240] [drm] No driver support for vblank timestamp query.
[    3.647337] usb 1-4: new high-speed USB device number 2 using ehci_hcd
[    3.647344] [drm] nouveau 0000:02:00.0: 4 available performance level(s)
[    3.647349] [drm] nouveau 0000:02:00.0: 0: core 100MHz shader
200MHz voltage 900mV fanspeed 100%
[    3.647354] [drm] nouveau 0000:02:00.0: 1: core 150MHz shader
300MHz voltage 900mV fanspeed 100%
[    3.647359] [drm] nouveau 0000:02:00.0: 2: core 350MHz shader
800MHz voltage 900mV fanspeed 100%
[    3.647363] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    3.647369] [drm] nouveau 0000:02:00.0: 3: core 450MHz shader
1100MHz voltage 1010mV fanspeed 100%
[    3.647372] [drm] nouveau 0000:02:00.0: c:
[    3.648254] ata1.00: ATA-8: Hitachi HTS543216L9SA02, FB2AC50F, max UDMA/133
[    3.648259] ata1.00: 312581808 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.649314] ata1.00: configured for UDMA/133
[    3.649462] scsi 0:0:0:0: Direct-Access     ATA      Hitachi
HTS54321 FB2A PQ: 0 ANSI: 5
[    3.676702] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    3.678818] ata2.00: ATAPI: MATSHITADVD-R   UJ-868, KA19, max UDMA/66
[    3.681444] ata2.00: configured for UDMA/66
[    3.684901] scsi 1:0:0:0: CD-ROM            MATSHITA DVD-R   UJ-868
  KA19 PQ: 0 ANSI: 5
[    3.692611] sd 0:0:0:0: [sda] 312581808 512-byte logical blocks:
(160 GB/149 GiB)
[    3.692678] sd 0:0:0:0: [sda] Write Protect is off
[    3.692682] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.692711] sd 0:0:0:0: [sda] Write cache: enabled, read cache:
enabled, doesn't support DPO or FUA
[    3.736612]  sda: sda1 sda2 sda3 sda4 sda5 sda6
[    3.737142] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.739127] sr0: scsi3-mmc drive: 62x/62x writer cd/rw xa/form2 cdda tray
[    3.739131] cdrom: Uniform CD-ROM driver Revision: 3.20
[    3.739288] sr 1:0:0:0: Attached scsi CD-ROM sr0
[    4.076694] Refined TSC clocksource calibration: 1990.001 MHz.
[    4.076701] Switching to clocksource tsc
[    4.180025] usb 2-2: new high-speed USB device number 3 using ehci_hcd
[    4.304183] hub 2-2:1.0: USB hub found
[    4.304260] hub 2-2:1.0: 3 ports detected
[    4.583345] usb 4-1: new full-speed USB device number 2 using ohci_hcd
[    4.788423] hub 4-1:1.0: USB hub found
[    4.791372] hub 4-1:1.0: 3 ports detected
[    5.083344] usb 3-5: new low-speed USB device number 2 using ohci_hcd
[    5.106576] [drm] nouveau 0000:02:00.0: allocated 1280x800 fb:
0x2f0000, bo ffff8801330d0400
[    5.106662] fbcon: nouveaufb (fb0) is primary device
[    5.287578] usbcore: registered new interface driver usbhid
[    5.287581] usbhid: USB HID core driver
[    5.299141] apple 0003:05AC:8242.0001: hiddev0,hidraw0: USB HID
v1.11 Device [Apple Computer, Inc. IR Receiver] on
usb-0000:00:04.0-5/input0
[    5.374238] Console: switching to colour frame buffer device 160x50
[    5.376072] fb0: nouveaufb frame buffer device
[    5.376074] drm: registered panic notifier
[    5.376082] [drm] Initialized nouveau 1.0.0 20120316 for
0000:02:00.0 on minor 0
[    5.563348] usb 3-6: new full-speed USB device number 3 using ohci_hcd
[    5.781766] input: Apple, Inc. Apple Internal Keyboard / Trackpad
as /devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.0/input/input4
[    5.781843] apple 0003:05AC:0236.0002: input,hidraw1: USB HID v1.11
Keyboard [Apple, Inc. Apple Internal Keyboard / Trackpad] on
usb-0000:00:04.0-6/input0
[    5.790405] ISO 9660 Extensions: RRIP_1991A
[    5.905252] loop: module loaded
[    6.283120] apple 0003:05AC:0236.0003: hidraw2: USB HID v1.11
Device [Apple, Inc. Apple Internal Keyboard / Trackpad] on
usb-0000:00:04.0-6/input1
[    6.363643] usb 2-2.1: new full-speed USB device number 4 using ehci_hcd
[    6.472122] input: Topre Corporation HHKB Professional as
/devices/pci0000:00/0000:00:06.1/usb2/2-2/2-2.1/2-2.1:1.0/input/input5
[    6.472202] generic-usb 0003:0853:0100.0004: input,hidraw3: USB HID
v1.11 Keyboard [Topre Corporation HHKB Professional] on
usb-0000:00:06.1-2.1/input0
[    6.541377] usb 4-1.1: new full-speed USB device number 3 using ohci_hcd
[    6.731374] usb 4-1.2: new full-speed USB device number 4 using ohci_hcd
[    6.845698] input: HID 05ac:820a as
/devices/pci0000:00/0000:00:06.0/usb4/4-1/4-1.2/4-1.2:1.0/input/input6
[    6.845782] generic-usb 0003:05AC:820A.0005: input,hidraw4: USB HID
v1.11 Keyboard [HID 05ac:820a] on usb-0000:00:06.0-1.2/input0
[    6.914373] usb 4-1.3: new full-speed USB device number 5 using ohci_hcd
[    7.025660] input: HID 05ac:820b as
/devices/pci0000:00/0000:00:06.0/usb4/4-1/4-1.3/4-1.3:1.0/input/input7
[    7.025820] generic-usb 0003:05AC:820B.0006: input,hidraw5: USB HID
v1.11 Mouse [HID 05ac:820b] on usb-0000:00:06.0-1.3/input0
[    7.159156] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    7.177321] device-mapper: uevent: version 1.0.3
[    7.177571] device-mapper: ioctl: 4.22.0-ioctl (2011-10-19)
initialised: dm-devel at redhat.com
[    7.198393] EXT4-fs (dm-0): mounted filesystem without journal. Opts: (null)
[    8.335607] EXT4-fs (dm-1): mounted filesystem without journal. Opts: (null)
[    9.661269] EXT4-fs (dm-2): mounted filesystem without journal. Opts: (null)
[   13.573005] EXT4-fs (dm-0): re-mounted. Opts: (null)
[   15.159168] systemd-udevd[285]: starting version 186
[   18.443686] FS-Cache: Loaded
[   19.714431] RPC: Registered named UNIX socket transport module.
[   19.714435] RPC: Registered udp transport module.
[   19.714437] RPC: Registered tcp transport module.
[   19.714439] RPC: Registered tcp NFSv4.1 backchannel transport module.
[   20.721393] ACPI: Battery Slot [BAT0] (battery present)
[   20.721525] ACPI: AC Adapter [ADP1] (on-line)
[   21.344608] ACPI: Requesting acpi_cpufreq
[   21.346787] input: PC Speaker as /devices/platform/pcspkr/input/input8
[   22.336562] Monitor-Mwait will be used to enter C-1 state
[   22.336601] Monitor-Mwait will be used to enter C-2 state
[   22.336631] Monitor-Mwait will be used to enter C-3 state
[   22.336640] Marking TSC unstable due to TSC halts in idle
[   22.336661] ACPI: acpi_idle registered with cpuidle
[   22.336940] Switching to clocksource hpet
[   22.687459] applesmc: key=271 fan=1 temp=14 acc=1 lux=2 kbd=1
[   22.700874] input: bcm5974 as
/devices/pci0000:00/0000:00:04.0/usb3/3-6/3-6:1.2/input/input9
[   22.701004] usbcore: registered new interface driver bcm5974
[   22.732433] microcode: CPU0 sig=0x10676, pf=0x80, revision=0x60c
[   22.733397] microcode: CPU1 sig=0x10676, pf=0x80, revision=0x60c
[   22.733570] input: applesmc as /devices/platform/applesmc.768/input/input10
[   22.733704] i2c i2c-7: nForce2 SMBus adapter at 0x2140
[   22.733736] i2c i2c-8: nForce2 SMBus adapter at 0x2100
[   22.734101] Registered led device: smc::kbd_backlight
[   22.736287] microcode: Microcode Update Driver: v2.00
<tigran at aivazian.fsnet.co.uk>, Peter Oruba
[   23.585578] Bluetooth: Core ver 2.16
[   23.585616] NET: Registered protocol family 31
[   23.585618] Bluetooth: HCI device and connection manager initialized
[   23.585622] Bluetooth: HCI socket layer initialized
[   23.585625] Bluetooth: L2CAP socket layer initialized
[   23.585635] Bluetooth: SCO socket layer initialized
[   23.839472] pci_hotplug: PCI Hot Plug PCI Core version: 0.5
[   24.136360] Linux media interface: v0.10
[   24.154921] NFS: Registering the id_resolver key type
[   24.154945] FS-Cache: Netfs 'nfs' registered for caching
[   24.156634] systemd-modules-load[288]: Inserted module 'nfs'
[   24.164037] cfg80211: Calling CRDA to update world regulatory domain
[   26.301177] shpchp: Standard Hot Plug PCI Controller Driver version: 0.4
[   26.307644] usbcore: registered new interface driver btusb
[   26.321461] usb 4-1.2: USB disconnect, device number 4
[   26.454397] usb 4-1.3: USB disconnect, device number 5
[   27.864306] Linux video capture interface: v2.00
[   30.891144] cfg80211: World regulatory domain updated:
[   30.891148] cfg80211:   (start_freq - end_freq @ bandwidth),
(max_antenna_gain, max_eirp)
[   30.891151] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz),
(300 mBi, 2000 mBm)
[   30.891154] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz),
(300 mBi, 2000 mBm)
[   30.891157] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz),
(300 mBi, 2000 mBm)
[   30.891160] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz),
(300 mBi, 2000 mBm)
[   30.891162] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz),
(300 mBi, 2000 mBm)
[   31.449002] uvcvideo: Found UVC 1.00 device Built-in iSight (05ac:8507)
[   31.479087] input: Built-in iSight as
/devices/pci0000:00/0000:00:04.1/usb1/1-4/1-4:1.0/input/input11
[   31.479190] usbcore: registered new interface driver uvcvideo
[   31.479192] USB Video Class driver (1.1.1)
[   31.791476] b43-phy0: Broadcom 4322 WLAN found (core revision 16)
[   31.803884] ACPI: PCI Interrupt Link [LAZA] enabled at IRQ 23
[   31.803889] hda_intel: Disabling MSI
[   31.803976] snd_hda_intel 0000:00:08.0: setting latency timer to 64
[   31.847069] Broadcom 43xx driver loaded [ Features: PMNLS ]
[   31.848624] b43-phy0 ERROR: Firmware file "b43/ucode16_mimo.fw" not found
[   31.849178] b43-phy0 ERROR: Firmware file
"b43-open/ucode16_mimo.fw" not found
[   31.849721] b43-phy0 ERROR: You must go to
http://wireless.kernel.org/en/users/Drivers/b43#devicefirmware and
download the correct firmware for this driver version. Please
carefully read all instructions on this website.
[   32.307355] hda_codec: ALC889A: SKU not ready 0x400000f0
[   32.646905] input: HDA Digital PCBeep as
/devices/pci0000:00/0000:00:08.0/input/input12
[   33.370255] input: HDA NVidia Line as
/devices/pci0000:00/0000:00:08.0/sound/card0/input13
[   33.370403] input: HDA NVidia Headphone as
/devices/pci0000:00/0000:00:08.0/sound/card0/input14
[   33.670088] systemd-vconsole-setup[448]: /usr/bin/loadkeys failed
with error code 1.
[   33.670099] systemd-vconsole-setup[448]: /usr/bin/setfont failed
with error code 1.
[   34.136739] EXT4-fs (dm-0): re-mounted. Opts: (null)
[   59.719149] forcedeth 0000:00:0a.0: irq 42 for MSI/MSI-X
[   59.719188] forcedeth 0000:00:0a.0: eth0: MSI enabled
[   69.976772] eth0: no IPv6 routers present
[  391.239096] BUG: unable to handle kernel NULL pointer dereference
at 0000000000000098
[  391.239471] IP: [<ffffffff8106cbb5>] drain_workqueue+0x25/0x1f0
[  391.239974] PGD 138f24067 PUD 138123067 PMD 0
[  391.240621] Oops: 0000 [#1] PREEMPT SMP
[  391.241258] CPU 1
[  391.241265] Modules linked in: snd_hda_codec_realtek snd_hda_intel
b43(-) snd_hda_codec bcma uvcvideo snd_hwdep mac80211 snd_pcm
videobuf2_vmalloc videobuf2_memops snd_page_alloc videobuf2_core
snd_timer videodev snd btusb shpchp cfg80211 nfs media soundcore
pci_hotplug acpi_cpufreq bluetooth mperf joydev i2c_nforce2 microcode
nfs_acl bcm5974 applesmc rfkill lockd pcspkr input_polldev processor
auth_rpcgss evdev coretemp ac battery apple_bl sunrpc fscache ext4
jbd2 mbcache crc16 dm_snapshot dm_mod squashfs loop isofs hid_apple
usbhid hid sr_mod cdrom sd_mod pata_acpi ata_generic nouveau ohci_hcd
video ahci libahci mxm_wmi wmi i2c_algo_bit drm_kms_helper ttm ssb
libata mmc_core drm pcmcia pcmcia_core scsi_mod ehci_hcd i2c_core
forcedeth usbcore usb_common button
[  391.241462]
[  391.241462] Pid: 1195, comm: rmmod Not tainted 3.4.5-1-ARCH #1
Apple Inc. MacBook5,1/Mac-F42D89C8
[  391.241462] RIP: 0010:[<ffffffff8106cbb5>]  [<ffffffff8106cbb5>]
drain_workqueue+0x25/0x1f0
[  391.241462] RSP: 0018:ffff880139e13d28  EFLAGS: 00010246
[  391.241462] RAX: 0000000000002828 RBX: ffff88013228c5c0 RCX: 0000000000000000
[  391.241462] RDX: 0000000000000028 RSI: 0000000000000282 RDI: ffffffff81a21880
[  391.241462] RBP: ffff880139e13d68 R08: ffffffff8189d180 R09: 0000000000000040
[  391.241462] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  391.241462] R13: ffff880134a5e300 R14: 0000000001915010 R15: 0000000000000002
[  391.241462] FS:  00007f5acfab1700(0000) GS:ffff88013fd00000(0000)
knlGS:0000000000000000
[  391.241462] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[  391.241462] CR2: 0000000000000098 CR3: 000000013803c000 CR4: 00000000000007e0
[  391.241462] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[  391.241462] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[  391.241462] Process rmmod (pid: 1195, threadinfo ffff880139e12000,
task ffff880134a78000)
[  391.241462] Stack:
[  391.241462]  ffff880139e13d58 ffffffff81361104 0000000000000000
ffff88013228c5c0
[  391.241462]  0000000000000000 ffff880134a5e300 0000000001915010
0000000000000002
[  391.241462]  ffff880139e13d98 ffffffff8106cd98 ffff88013228c5c0
ffff880133245000
[  391.241462] Call Trace:
[  391.241462]  [<ffffffff81361104>] ? skb_dequeue+0x64/0x80
[  391.241462]  [<ffffffff8106cd98>] destroy_workqueue+0x18/0x190
[  391.241462]  [<ffffffffa06ba1c9>]
ieee80211_unregister_hw+0xe9/0x120 [mac80211]
[  391.241462]  [<ffffffffa078af6d>] b43_ssb_remove+0xad/0xb0 [b43]
[  391.241462]  [<ffffffffa01e05e0>] ssb_device_remove+0x30/0x50 [ssb]
[  391.241462]  [<ffffffff8130f70c>] __device_release_driver+0x7c/0xe0
[  391.241462]  [<ffffffff81310018>] driver_detach+0xc8/0xd0
[  391.241462]  [<ffffffff8130f4c1>] bus_remove_driver+0x81/0xe0
[  391.241462]  [<ffffffff81310502>] driver_unregister+0x62/0xa0
[  391.241462]  [<ffffffffa01e0922>] ssb_driver_unregister+0x12/0x20 [ssb]
[  391.241462]  [<ffffffffa07b3638>] b43_exit+0x10/0x32 [b43]
[  391.241462]  [<ffffffff810b0532>] sys_delete_module+0x152/0x2a0
[  391.241462]  [<ffffffff8146a8e9>] system_call_fastpath+0x16/0x1b
[  391.241462] Code: 0f 0b 0f 1f 40 00 55 48 89 e5 41 57 41 56 41 55
41 54 53 48 83 ec 18 66 66 66 66 90 49 89 fc 48 c7 c7 80 18 a2 81 e8
eb ca 3f 00 <41> 8b 84 24 98 00 00 00 8d 50 01 85 c0 41 89 94 24 98 00
00 00
[  391.241462] RIP  [<ffffffff8106cbb5>] drain_workqueue+0x25/0x1f0
[  391.241462]  RSP <ffff880139e13d28>
[  391.241462] CR2: 0000000000000098
[  391.274880] ---[ end trace a9f41ab5fae1b4a2 ]---
[  391.275584] note: rmmod[1195] exited with preempt_count 1
[  391.276323] BUG: scheduling while atomic: rmmod/1195/0x10000002
[  391.277053] Modules linked in: snd_hda_codec_realtek snd_hda_intel
b43(-) snd_hda_codec bcma uvcvideo snd_hwdep mac80211 snd_pcm
videobuf2_vmalloc videobuf2_memops snd_page_alloc videobuf2_core
snd_timer videodev snd btusb shpchp cfg80211 nfs media soundcore
pci_hotplug acpi_cpufreq bluetooth mperf joydev i2c_nforce2 microcode
nfs_acl bcm5974 applesmc rfkill lockd pcspkr input_polldev processor
auth_rpcgss evdev coretemp ac battery apple_bl sunrpc fscache ext4
jbd2 mbcache crc16 dm_snapshot dm_mod squashfs loop isofs hid_apple
usbhid hid sr_mod cdrom sd_mod pata_acpi ata_generic nouveau ohci_hcd
video ahci libahci mxm_wmi wmi i2c_algo_bit drm_kms_helper ttm ssb
libata mmc_core drm pcmcia pcmcia_core scsi_mod ehci_hcd i2c_core
forcedeth usbcore usb_common button
[  391.281099] Pid: 1195, comm: rmmod Tainted: G      D      3.4.5-1-ARCH #1
[  391.281904] Call Trace:
[  391.282668]  [<ffffffff81460d6f>] __schedule_bug+0x4d/0x4f
[  391.283432]  [<ffffffff814689d8>] __schedule+0x8c8/0x900
[  391.284149]  [<ffffffff8128f726>] ? fbcon_scroll+0x206/0xd00
[  391.284864]  [<ffffffff8128d250>] ? get_color.isra.14+0x40/0x150
[  391.285574]  [<ffffffff81081bba>] __cond_resched+0x2a/0x40
[  391.286274]  [<ffffffff81468a90>] _cond_resched+0x30/0x40
[  391.286985]  [<ffffffff81131601>] unmap_single_vma+0x431/0x820
[  391.287666]  [<ffffffff811194cf>] ? release_pages+0x1cf/0x220
[  391.288355]  [<ffffffff8113224e>] unmap_vmas+0x5e/0xb0
[  391.289043]  [<ffffffff8113a11f>] exit_mmap+0x9f/0x150
[  391.289733]  [<ffffffff8104e919>] mmput+0x59/0x130
[  391.290429]  [<ffffffff810558d8>] exit_mm+0x108/0x130
[  391.291092]  [<ffffffff81469a15>] ? _raw_spin_unlock_irq+0x35/0x40
[  391.291762]  [<ffffffff81055a5f>] do_exit+0x15f/0x940
[  391.292441]  [<ffffffff81053834>] ? kmsg_dump+0xc4/0x110
[  391.293123]  [<ffffffff81017f3d>] oops_end+0x9d/0xe0
[  391.293805]  [<ffffffff8146016e>] no_context+0x264/0x290
[  391.294457]  [<ffffffff8146054e>] __bad_area_nosemaphore+0x1cf/0x1ee
[  391.295110]  [<ffffffff81460580>] bad_area_nosemaphore+0x13/0x15
[  391.295763]  [<ffffffff81042c2a>] do_page_fault+0x3aa/0x480
[  391.296414]  [<ffffffff81086e05>] ? cpuacct_charge+0x75/0xb0
[  391.297069]  [<ffffffff810135c3>] ? __switch_to+0x163/0x410
[  391.297698]  [<ffffffff8107f109>] ? finish_task_switch+0x49/0xd0
[  391.298337]  [<ffffffff8146a265>] page_fault+0x25/0x30
[  391.298976]  [<ffffffff8106cbb5>] ? drain_workqueue+0x25/0x1f0
[  391.299610]  [<ffffffff8106cbb5>] ? drain_workqueue+0x25/0x1f0
[  391.300256]  [<ffffffff81361104>] ? skb_dequeue+0x64/0x80
[  391.300872]  [<ffffffff8106cd98>] destroy_workqueue+0x18/0x190
[  391.301510]  [<ffffffffa06ba1c9>]
ieee80211_unregister_hw+0xe9/0x120 [mac80211]
[  391.302146]  [<ffffffffa078af6d>] b43_ssb_remove+0xad/0xb0 [b43]
[  391.302790]  [<ffffffffa01e05e0>] ssb_device_remove+0x30/0x50 [ssb]
[  391.303445]  [<ffffffff8130f70c>] __device_release_driver+0x7c/0xe0
[  391.304080]  [<ffffffff81310018>] driver_detach+0xc8/0xd0
[  391.304728]  [<ffffffff8130f4c1>] bus_remove_driver+0x81/0xe0
[  391.305367]  [<ffffffff81310502>] driver_unregister+0x62/0xa0
[  391.305996]  [<ffffffffa01e0922>] ssb_driver_unregister+0x12/0x20 [ssb]
[  391.306605]  [<ffffffffa07b3638>] b43_exit+0x10/0x32 [b43]
[  391.307224]  [<ffffffff810b0532>] sys_delete_module+0x152/0x2a0
[  391.307813]  [<ffffffff8146a8e9>] system_call_fastpath+0x16/0x1b


