AA: mac80211: sync with trunk r41181
authorFelix Fietkau <nbd@openwrt.org>
Fri, 13 Jun 2014 13:33:39 +0000 (13:33 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 13 Jun 2014 13:33:39 +0000 (13:33 +0000)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
SVN-Revision: 41182

package/mac80211/patches/080-disable_clk_backport.patch [new file with mode: 0644]
package/mac80211/patches/300-pending_work.patch
package/mac80211/patches/566-ath9k_nfcal_xor_percal.patch [new file with mode: 0644]
package/mac80211/patches/567-ath9k_fix_init_nfcal.patch [new file with mode: 0644]
package/mac80211/patches/820-b43-add-antenna-control.patch
package/mac80211/patches/a00-ath9k_platform_h_backup.patch

diff --git a/package/mac80211/patches/080-disable_clk_backport.patch b/package/mac80211/patches/080-disable_clk_backport.patch
new file mode 100644 (file)
index 0000000..3765591
--- /dev/null
@@ -0,0 +1,20 @@
+--- a/compat/compat-3.6.c
++++ b/compat/compat-3.6.c
+@@ -147,17 +147,3 @@ int sg_alloc_table_from_pages(struct sg_
+       return 0;
+ }
+ EXPORT_SYMBOL_GPL(sg_alloc_table_from_pages);
+-
+-/* whoopsie ! */
+-#ifndef CONFIG_COMMON_CLK
+-int clk_enable(struct clk *clk)
+-{
+-      return 0;
+-}
+-EXPORT_SYMBOL_GPL(clk_enable);
+-
+-void clk_disable(struct clk *clk)
+-{
+-}
+-EXPORT_SYMBOL_GPL(clk_disable);
+-#endif
index 33053884eccea12b2eb265cff27b8c3e832707f9..25a34b3ebdb49a2abec164685ae81cc6a8d4acba 100644 (file)
@@ -1,3 +1,70 @@
+commit 6e7341074823d2a45b81f2742cbf75f1da790031
+Author: Rafał Miłecki <zajec5@gmail.com>
+Date:   Sat May 31 19:40:45 2014 +0200
+
+    b43: disable 5 GHz on G-PHY
+    
+    This fixes regression introduced by adding some G-PHY devices to the
+    list of dual band devices. There is simply no support for 5 GHz on
+    G-PHY devices in b43. It results in:
+    WARNING: CPU: 0 PID: 79 at drivers/net/wireless/b43/phy_g.c:75 b43_gphy_channel_switch+0x125/0x130 [b43]()
+    b43-phy1 ERROR: PHY init: Channel switch to default failed
+    
+    Regression was introduced by the following commit:
+    
+    commit 773cfc508f4d64c14547ff8751b5cbd473124364
+    Author: Rafał Miłecki <zajec5@gmail.com>
+    Date:   Mon May 19 23:18:55 2014 +0200
+    
+        b43: add more devices to the bands database
+    
+    Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
+    Signed-off-by: John W. Linville <linville@tuxdriver.com>
+
+commit 1186edbef91f15722e5bdf56326ce0abc2935ce7
+Author: Stanislaw Gruszka <sgruszka@redhat.com>
+Date:   Tue Jun 10 12:51:06 2014 +0200
+
+    rt2x00: disable TKIP on USB
+    
+    On USB we can not get atomically TKIP key. We have to disable support
+    for TKIP acceleration on USB hardware to avoid bug as showed bellow.
+    
+    [  860.827243] BUG: scheduling while atomic: hostapd/3397/0x00000002
+    <snip>
+    [  860.827280] Call Trace:
+    [  860.827282]  [<ffffffff81682ea6>] dump_stack+0x4d/0x66
+    [  860.827284]  [<ffffffff8167eb9b>] __schedule_bug+0x47/0x55
+    [  860.827285]  [<ffffffff81685bb3>] __schedule+0x733/0x7b0
+    [  860.827287]  [<ffffffff81685c59>] schedule+0x29/0x70
+    [  860.827289]  [<ffffffff81684f8a>] schedule_timeout+0x15a/0x2b0
+    [  860.827291]  [<ffffffff8105ac50>] ? ftrace_raw_event_tick_stop+0xc0/0xc0
+    [  860.827294]  [<ffffffff810c13c2>] ? __module_text_address+0x12/0x70
+    [  860.827296]  [<ffffffff81686823>] wait_for_completion_timeout+0xb3/0x140
+    [  860.827298]  [<ffffffff81080fc0>] ? wake_up_state+0x20/0x20
+    [  860.827301]  [<ffffffff814d5b3d>] usb_start_wait_urb+0x7d/0x150
+    [  860.827303]  [<ffffffff814d5cd5>] usb_control_msg+0xc5/0x110
+    [  860.827305]  [<ffffffffa02fb0c6>] rt2x00usb_vendor_request+0xc6/0x160  [rt2x00usb]
+    [  860.827307]  [<ffffffffa02fb215>] rt2x00usb_vendor_req_buff_lock+0x75/0x150 [rt2x00usb]
+    [  860.827309]  [<ffffffffa02fb393>] rt2x00usb_vendor_request_buff+0xa3/0xe0 [rt2x00usb]
+    [  860.827311]  [<ffffffffa023d1a3>] rt2x00usb_register_multiread+0x33/0x40 [rt2800usb]
+    [  860.827314]  [<ffffffffa05805f9>] rt2800_get_tkip_seq+0x39/0x50  [rt2800lib]
+    [  860.827321]  [<ffffffffa0480f88>] ieee80211_get_key+0x218/0x2a0  [mac80211]
+    [  860.827322]  [<ffffffff815cc68c>] ? __nlmsg_put+0x6c/0x80
+    [  860.827329]  [<ffffffffa051b02e>] nl80211_get_key+0x22e/0x360 [cfg80211]
+    
+    Cc: stable@vger.kernel.org
+    Reported-and-tested-by: Peter Wu <lekensteyn@gmail.com>
+    Reported-and-tested-by: Pontus Fuchs <pontus.fuchs@gmail.com>
+    Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
+    Signed-off-by: John W. Linville <linville@tuxdriver.com>
+
+commit 5f313a15da92dda80ac4c9a137bc42d7d0b49adf
+Author: Rafał Miłecki <zajec5@gmail.com>
+Date:   Thu Jun 12 09:28:38 2014 +0200
+
+    b43: fix frequency reported on G-PHY with /new/ firmware
+
 commit d3a58df87a2e4c2301ac843604202d290a48440b
 Author: Avraham Stern <avraham.stern@intel.com>
 Date:   Thu May 22 12:17:47 2014 +0300
@@ -1237,7 +1304,16 @@ Date:   Mon May 19 21:20:49 2014 +0200
  void rt2x00lib_beacondone(struct rt2x00_dev *rt2x00dev)
 --- a/drivers/net/wireless/rt2x00/rt2x00mac.c
 +++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
-@@ -624,25 +624,24 @@ void rt2x00mac_bss_info_changed(struct i
+@@ -487,6 +487,8 @@ int rt2x00mac_set_key(struct ieee80211_h
+       crypto.cipher = rt2x00crypto_key_to_cipher(key);
+       if (crypto.cipher == CIPHER_NONE)
+               return -EOPNOTSUPP;
++      if (crypto.cipher == CIPHER_TKIP && rt2x00_is_usb(rt2x00dev))
++              return -EOPNOTSUPP;
+       crypto.cmd = cmd;
+@@ -624,25 +626,24 @@ void rt2x00mac_bss_info_changed(struct i
         * Start/stop beaconing.
         */
        if (changes & BSS_CHANGED_BEACON_ENABLED) {
@@ -1270,7 +1346,7 @@ Date:   Mon May 19 21:20:49 2014 +0200
                } else if (bss_conf->enable_beacon && !intf->enable_beacon) {
                        rt2x00dev->intf_beaconing++;
                        intf->enable_beacon = true;
-@@ -658,11 +657,10 @@ void rt2x00mac_bss_info_changed(struct i
+@@ -658,11 +659,10 @@ void rt2x00mac_bss_info_changed(struct i
                                 * First beaconing interface enabled
                                 * -> start beacon queue.
                                 */
@@ -2750,3 +2826,32 @@ Date:   Mon May 19 21:20:49 2014 +0200
        rtnl_unlock();
  
        return ret;
+--- a/drivers/net/wireless/b43/xmit.c
++++ b/drivers/net/wireless/b43/xmit.c
+@@ -811,9 +811,13 @@ void b43_rx(struct b43_wldev *dev, struc
+               break;
+       case B43_PHYTYPE_G:
+               status.band = IEEE80211_BAND_2GHZ;
+-              /* chanid is the radio channel cookie value as used
+-               * to tune the radio. */
+-              status.freq = chanid + 2400;
++              /* Somewhere between 478.104 and 508.1084 firmware for G-PHY
++               * has been modified to be compatible with N-PHY and others.
++               */
++              if (dev->fw.rev >= 508)
++                      status.freq = ieee80211_channel_to_frequency(chanid, status.band);
++              else
++                      status.freq = chanid + 2400;
+               break;
+       case B43_PHYTYPE_N:
+       case B43_PHYTYPE_LP:
+--- a/drivers/net/wireless/b43/main.c
++++ b/drivers/net/wireless/b43/main.c
+@@ -5216,6 +5216,7 @@ static int b43_wireless_core_attach(stru
+       /* We don't support 5 GHz on some PHYs yet */
+       switch (dev->phy.type) {
+       case B43_PHYTYPE_A:
++      case B43_PHYTYPE_G:
+       case B43_PHYTYPE_N:
+       case B43_PHYTYPE_LP:
+       case B43_PHYTYPE_HT:
diff --git a/package/mac80211/patches/566-ath9k_nfcal_xor_percal.patch b/package/mac80211/patches/566-ath9k_nfcal_xor_percal.patch
new file mode 100644 (file)
index 0000000..917bc2d
--- /dev/null
@@ -0,0 +1,42 @@
+--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
++++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
+@@ -660,7 +660,6 @@ static void ar9002_hw_olc_temp_compensat
+ static int ar9002_hw_calibrate(struct ath_hw *ah, struct ath9k_channel *chan,
+                              u8 rxchainmask, bool longcal)
+ {
+-      bool iscaldone = true;
+       struct ath9k_cal_list *currCal = ah->cal_list_curr;
+       bool nfcal, nfcal_pending = false;
+       int ret;
+@@ -672,15 +671,13 @@ static int ar9002_hw_calibrate(struct at
+       if (currCal && !nfcal &&
+           (currCal->calState == CAL_RUNNING ||
+            currCal->calState == CAL_WAITING)) {
+-              iscaldone = ar9002_hw_per_calibration(ah, chan,
+-                                                    rxchainmask, currCal);
+-              if (iscaldone) {
+-                      ah->cal_list_curr = currCal = currCal->calNext;
+-
+-                      if (currCal->calState == CAL_WAITING) {
+-                              iscaldone = false;
+-                              ath9k_hw_reset_calibration(ah, currCal);
+-                      }
++              if (!ar9002_hw_per_calibration(ah, chan, rxchainmask, currCal))
++                      return 0;
++
++              ah->cal_list_curr = currCal = currCal->calNext;
++              if (currCal->calState == CAL_WAITING) {
++                      ath9k_hw_reset_calibration(ah, currCal);
++                      return 0;
+               }
+       }
+@@ -710,7 +707,7 @@ static int ar9002_hw_calibrate(struct at
+               }
+       }
+-      return iscaldone;
++      return 1;
+ }
+ /* Carrier leakage Calibration fix */
diff --git a/package/mac80211/patches/567-ath9k_fix_init_nfcal.patch b/package/mac80211/patches/567-ath9k_fix_init_nfcal.patch
new file mode 100644 (file)
index 0000000..8a4be73
--- /dev/null
@@ -0,0 +1,25 @@
+--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
++++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
+@@ -854,6 +854,7 @@ static bool ar9002_hw_init_cal(struct at
+       /* Do PA Calibration */
+       ar9002_hw_pa_cal(ah, true);
++      ath9k_hw_start_nfcal(ah, true);
+       if (ah->caldata)
+               set_bit(NFCAL_PENDING, &ah->caldata->cal_flags);
+--- a/drivers/net/wireless/ath/ath9k/hw.c
++++ b/drivers/net/wireless/ath/ath9k/hw.c
+@@ -1969,8 +1969,10 @@ int ath9k_hw_reset(struct ath_hw *ah, st
+       if (ath9k_hw_mci_is_enabled(ah))
+               ar9003_mci_check_bt(ah);
+-      ath9k_hw_loadnf(ah, chan);
+-      ath9k_hw_start_nfcal(ah, true);
++      if (AR_SREV_9300_20_OR_LATER(ah)) {
++              ath9k_hw_loadnf(ah, chan);
++              ath9k_hw_start_nfcal(ah, true);
++      }
+       if (AR_SREV_9300_20_OR_LATER(ah))
+               ar9003_hw_bb_watchdog_config(ah);
index 5a239674d2fd1c28768c81d9265beb08ede3803b..bb81bb8fd48d3c1476a912888cf775249ca9577b 100644 (file)
@@ -99,7 +99,7 @@
  };
  
  /* Hard-reset the chip. Do not call this directly.
-@@ -5295,6 +5335,8 @@ static int b43_one_core_attach(struct b4
+@@ -5296,6 +5336,8 @@ static int b43_one_core_attach(struct b4
        if (!wldev)
                goto out;
  
        wldev->use_pio = b43_modparam_pio;
        wldev->dev = dev;
        wldev->wl = wl;
-@@ -5385,6 +5427,9 @@ static struct b43_wl *b43_wireless_init(
+@@ -5386,6 +5428,9 @@ static struct b43_wl *b43_wireless_init(
  
        hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
  
index fb870ceacfb644353a5f1e5870a279dc7f336254..02080a60d2128ce2042d722f7c65ac8e1436582d 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -474,8 +474,7 @@ static int ath9k_init_soc_platform(struc
+@@ -477,8 +477,7 @@ static int ath9k_init_soc_platform(struc
                        return ret;
        }
  
@@ -10,7 +10,7 @@
  
        return ret;
  }
-@@ -508,7 +507,7 @@ static int ath9k_init_softc(u16 devid, s
+@@ -511,7 +510,7 @@ static int ath9k_init_softc(u16 devid, s
        sc->tx99_power = MAX_RATE_POWER + 1;
        init_waitqueue_head(&sc->tx_wait);
  
@@ -39,7 +39,7 @@
  };
 --- a/drivers/net/wireless/ath/ath9k/pci.c
 +++ b/drivers/net/wireless/ath/ath9k/pci.c
-@@ -687,7 +687,7 @@ static bool ath_pci_eeprom_read(struct a
+@@ -693,7 +693,7 @@ static bool ath_pci_eeprom_read(struct a
        struct ath_softc *sc = (struct ath_softc *) common->priv;
        struct ath9k_platform_data *pdata = sc->dev->platform_data;