mac80211: make it work with 3.18.12+
authorJonas Gorski <jogo@openwrt.org>
Thu, 21 May 2015 19:32:16 +0000 (19:32 +0000)
committerJonas Gorski <jogo@openwrt.org>
Thu, 21 May 2015 19:32:16 +0000 (19:32 +0000)
3.18.12 backported 61ada528dea028331e99e8ceaed87c683ad25de2 ("sched/wait:
Provide infrastructure to deal with nested blocking") from 3.19, causing
the following error on load:

[   13.588000] compat: exports duplicate symbol woken_wake_function (owned by kernel)

Fix this by guarding it with a check for 3.18.11 or earlier instead of
3.19.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 45710

30 files changed:
package/kernel/mac80211/patches/090-linux_3_18_12_compat.patch [new file with mode: 0644]
package/kernel/mac80211/patches/300-mac80211-add-an-intermediate-software-queue-implemen.patch
package/kernel/mac80211/patches/305-ath5k-channel-change-fix.patch
package/kernel/mac80211/patches/306-ath5k-fix-reset-race.patch
package/kernel/mac80211/patches/311-mac80211-remove-drop_unencrypted-code.patch
package/kernel/mac80211/patches/315-mac80211-avoid-duplicate-TX-path-station-lookup.patch
package/kernel/mac80211/patches/319-ath9k_htc-add-new-WMI_REG_RMW_CMDID-command.patch
package/kernel/mac80211/patches/323-ath9k-add-multi_read-to-be-compatible-with-ath9k_htc.patch
package/kernel/mac80211/patches/324-ath9k-add-new-function-ath9k_hw_read_array.patch
package/kernel/mac80211/patches/326-ath9k-use-one-shot-read-in-ath9k_hw_update_mibstats.patch
package/kernel/mac80211/patches/333-ath9k-use-REG_RMW-and-rmw-buffer-in-ath9k_hw_4k_set_.patch
package/kernel/mac80211/patches/406-ath_relax_default_regd.patch
package/kernel/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch
package/kernel/mac80211/patches/431-add_platform_eeprom_support_to_ath5k.patch
package/kernel/mac80211/patches/440-ath5k_channel_bw_debugfs.patch
package/kernel/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch
package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch
package/kernel/mac80211/patches/530-ath9k_extra_leds.patch
package/kernel/mac80211/patches/541-ath9k_rx_dma_stop_check.patch
package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch
package/kernel/mac80211/patches/600-0003-rt2x00-rt2800-serialize-shared-memory-access.patch
package/kernel/mac80211/patches/600-0005-rt2x00-rt2800lib-add-hw_beacon_count-field-to-struct.patch
package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch
package/kernel/mac80211/patches/600-0014-rt2x00-rt2800lib-add-MAC-register-initialization-for.patch
package/kernel/mac80211/patches/600-0016-rt2x00-rt2800lib-add-BBP-register-initialization-for.patch
package/kernel/mac80211/patches/600-0020-rt2x00-rt2800lib-add-channel-configuration-code-for-.patch
package/kernel/mac80211/patches/600-0029-rt2x00-rt2800lib-fix-VGC-setup-for-RT3883.patch
package/kernel/mac80211/patches/616-rt2x00-support-rt5350.patch
package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch
package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch

diff --git a/package/kernel/mac80211/patches/090-linux_3_18_12_compat.patch b/package/kernel/mac80211/patches/090-linux_3_18_12_compat.patch
new file mode 100644 (file)
index 0000000..85c5280
--- /dev/null
@@ -0,0 +1,29 @@
+--- a/backport-include/linux/wait.h
++++ b/backport-include/linux/wait.h
+@@ -23,7 +23,7 @@ backport_wait_on_bit_io(void *word, int
+ #endif
+-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,12)
+ #define WQ_FLAG_WOKEN         0x02
+ #define wait_woken LINUX_BACKPORT(wait_woken)
+--- a/compat/backport-3.19.c
++++ b/compat/backport-3.19.c
+@@ -15,6 +15,7 @@
+ #include <linux/netdevice.h>
+ #include <linux/debugfs.h>
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3,18,12)
+ static inline bool is_kthread_should_stop(void)
+ {
+       return (current->flags & PF_KTHREAD) && kthread_should_stop();
+@@ -79,6 +80,7 @@ int woken_wake_function(wait_queue_t *wa
+       return default_wake_function(wait, mode, sync, key);
+ }
+ EXPORT_SYMBOL(woken_wake_function);
++#endif
+ #ifdef __BACKPORT_NETDEV_RSS_KEY_FILL
+ u8 netdev_rss_key[NETDEV_RSS_KEY_LEN];
index d8ea82269bcf123994b18822f5e0bdecf62b0c86..237121ba2772da754b8f7bb29e4552adb052d411 100644 (file)
@@ -331,7 +331,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
                wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n",
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -118,6 +118,16 @@ static void __cleanup_single_sta(struct 
+@@ -118,6 +118,16 @@ static void __cleanup_single_sta(struct
                atomic_dec(&ps->num_sta_ps);
        }
  
index afed7b42ff4736ef0fc9e5e78a289fb2fc13e4c3..4cfa53f6c05329abc56ecb83dd3bb3ced643dda9 100644 (file)
@@ -61,7 +61,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
 
 --- a/drivers/net/wireless/ath/ath5k/base.c
 +++ b/drivers/net/wireless/ath/ath5k/base.c
-@@ -2858,7 +2858,7 @@ ath5k_reset(struct ath5k_hw *ah, struct 
+@@ -2858,7 +2858,7 @@ ath5k_reset(struct ath5k_hw *ah, struct
  {
        struct ath_common *common = ath5k_hw_common(ah);
        int ret, ani_mode;
@@ -70,7 +70,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
  
        ATH5K_DBG(ah, ATH5K_DEBUG_RESET, "resetting\n");
  
-@@ -2876,11 +2876,29 @@ ath5k_reset(struct ath5k_hw *ah, struct 
+@@ -2876,11 +2876,29 @@ ath5k_reset(struct ath5k_hw *ah, struct
         * so we should also free any remaining
         * tx buffers */
        ath5k_drain_tx_buffs(ah);
index 399076524d5a3852aebbc3443c3953430cc4610b..85a190481bc594da37eebb8ec6f9674043c7b435 100644 (file)
@@ -66,7 +66,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
        unsigned int            fif_filter_flags; /* Current FIF_* filter flags */
 --- a/drivers/net/wireless/ath/ath5k/base.c
 +++ b/drivers/net/wireless/ath/ath5k/base.c
-@@ -1523,6 +1523,9 @@ ath5k_set_current_imask(struct ath5k_hw 
+@@ -1523,6 +1523,9 @@ ath5k_set_current_imask(struct ath5k_hw
        enum ath5k_int imask;
        unsigned long flags;
  
@@ -76,7 +76,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
        spin_lock_irqsave(&ah->irqlock, flags);
        imask = ah->imask;
        if (ah->rx_pending)
-@@ -2862,6 +2865,8 @@ ath5k_reset(struct ath5k_hw *ah, struct 
+@@ -2862,6 +2865,8 @@ ath5k_reset(struct ath5k_hw *ah, struct
  
        ATH5K_DBG(ah, ATH5K_DEBUG_RESET, "resetting\n");
  
@@ -85,7 +85,7 @@ Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
        ath5k_hw_set_imr(ah, 0);
        synchronize_irq(ah->irq);
        ath5k_stop_tasklets(ah);
-@@ -2952,6 +2957,8 @@ ath5k_reset(struct ath5k_hw *ah, struct 
+@@ -2952,6 +2957,8 @@ ath5k_reset(struct ath5k_hw *ah, struct
         */
  /*    ath5k_chan_change(ah, c); */
  
index d6bc082f35e7504fed6319f0c839bc337ebc81b2..b2475b910683671d1d52489be80d535a8518e27b 100644 (file)
@@ -108,7 +108,8 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
                 (key = rcu_dereference(tx->sdata->default_unicast_key)))
                tx->key = key;
 -      else if (info->flags & IEEE80211_TX_CTL_INJECTED)
--              tx->key = NULL;
++      else
+               tx->key = NULL;
 -      else if (!tx->sdata->drop_unencrypted)
 -              tx->key = NULL;
 -      else if (tx->skb->protocol == tx->sdata->control_port_protocol)
@@ -119,8 +120,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
 -              tx->key = NULL;
 -      else if (ieee80211_is_mgmt(hdr->frame_control) &&
 -               !ieee80211_is_robust_mgmt_frame(tx->skb))
-+      else
-               tx->key = NULL;
+-              tx->key = NULL;
 -      else {
 -              I802_DEBUG_INC(tx->local->tx_handlers_drop_unencrypted);
 -              return TX_DROP;
index b02cdafd5546bee397ba4c357db5072edd62816f..d143025f0f923f9a5e5bf7416210222d0da91361 100644 (file)
@@ -257,7 +257,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
                        break;
                dev_kfree_skb_any(skb);
        }
-@@ -3295,6 +3314,6 @@ void __ieee80211_tx_skb_tid_band(struct 
+@@ -3295,6 +3314,6 @@ void __ieee80211_tx_skb_tid_band(struct
         */
        local_bh_disable();
        IEEE80211_SKB_CB(skb)->band = band;
index c3942cecf3d277d0be5966b1e7cb330cd1bec69a..6af69ebd2afa42e878697d56ff1f87a4c2136d99 100644 (file)
@@ -121,7 +121,11 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
 +              }
 +              priv->wmi->multi_rmw_idx = 0;
 +      }
-+
+-      val = ath9k_regread(hw_priv, reg_offset);
+-      val &= ~clr;
+-      val |= set;
+-      ath9k_regwrite(hw_priv, val, reg_offset);
 +      mutex_unlock(&priv->wmi->multi_rmw_mutex);
 +}
 +
@@ -133,11 +137,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
 +
 +      if (test_bit(HTC_FWFLAG_NO_RMW, &priv->fw_flags))
 +              return;
--      val = ath9k_regread(hw_priv, reg_offset);
--      val &= ~clr;
--      val |= set;
--      ath9k_regwrite(hw_priv, val, reg_offset);
++
 +      atomic_inc(&priv->wmi->m_rmw_cnt);
 +}
 +
@@ -239,7 +239,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
                len += scnprintf(buf + len, size - len, "%20s : %10d\n",\
 --- a/drivers/net/wireless/ath/ath9k/wmi.c
 +++ b/drivers/net/wireless/ath/ath9k/wmi.c
-@@ -61,6 +61,8 @@ static const char *wmi_cmd_to_name(enum 
+@@ -61,6 +61,8 @@ static const char *wmi_cmd_to_name(enum
                return "WMI_REG_READ_CMDID";
        case WMI_REG_WRITE_CMDID:
                return "WMI_REG_WRITE_CMDID";
index 4cd0ea3c79f622db45bdb69b2779d88840638d5a..246bb9d2951db955d8ec5dec3d2bc9548da871ff 100644 (file)
@@ -8,7 +8,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
 
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -141,6 +141,16 @@ static unsigned int ath9k_ioread32(void 
+@@ -141,6 +141,16 @@ static unsigned int ath9k_ioread32(void
        return val;
  }
  
index 41c6ff57a81012debcc3732fb81a5826e48d7cd3..2eda1c9d25f5faff8f5a264f6106d22c4f093193 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
 
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -121,6 +121,36 @@ void ath9k_hw_write_array(struct ath_hw 
+@@ -121,6 +121,36 @@ void ath9k_hw_write_array(struct ath_hw
        REGWRITE_BUFFER_FLUSH(ah);
  }
  
@@ -59,7 +59,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  
  #define AR_GPIO_OUTPUT_MUX_AS_OUTPUT             0
  #define AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED 1
-@@ -1020,6 +1022,7 @@ void ath9k_hw_synth_delay(struct ath_hw 
+@@ -1020,6 +1022,7 @@ void ath9k_hw_synth_delay(struct ath_hw
  bool ath9k_hw_wait(struct ath_hw *ah, u32 reg, u32 mask, u32 val, u32 timeout);
  void ath9k_hw_write_array(struct ath_hw *ah, const struct ar5416IniArray *array,
                          int column, unsigned int *writecnt);
index 6420eeddcf59e2f650a224820b0c41b94447c2e2..a22cd1d490a8311ccac9679ff7a0749eb95526f5 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
 
 --- a/drivers/net/wireless/ath/ath9k/ani.c
 +++ b/drivers/net/wireless/ath/ath9k/ani.c
-@@ -107,11 +107,21 @@ static const struct ani_cck_level_entry 
+@@ -107,11 +107,21 @@ static const struct ani_cck_level_entry
  static void ath9k_hw_update_mibstats(struct ath_hw *ah,
                                     struct ath9k_mib_stats *stats)
  {
index 053df8428db7070dbe5a99a5bf1cf32ba92ba324..8f12b364548a2809187d34e1d3fec9097ea1008b 100644 (file)
@@ -13,7 +13,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
 
 --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
 +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
-@@ -772,15 +772,14 @@ static void ath9k_hw_4k_set_gain(struct 
+@@ -772,15 +772,14 @@ static void ath9k_hw_4k_set_gain(struct
                                 struct ar5416_eeprom_4k *eep,
                                 u8 txRxAttenLocal)
  {
@@ -37,7 +37,7 @@ Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
  
        if ((eep->baseEepHeader.version & AR5416_EEP_VER_MINOR_MASK) >=
            AR5416_EEP_MINOR_VER_3) {
-@@ -819,6 +818,7 @@ static void ath9k_hw_4k_set_gain(struct 
+@@ -819,6 +818,7 @@ static void ath9k_hw_4k_set_gain(struct
                      AR9280_PHY_RXGAIN_TXRX_ATTEN, txRxAttenLocal);
        REG_RMW_FIELD(ah, AR_PHY_RXGAIN + 0x1000,
                      AR9280_PHY_RXGAIN_TXRX_MARGIN, pModal->rxTxMarginCh[0]);
index 83ec441b86cc95bb28fd56acbe410be99d715bb8..6336f1f375febf66b50fdede27f2d76e11e6bfab 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/regd.c
 +++ b/drivers/net/wireless/ath/regd.c
-@@ -114,10 +114,22 @@ static const struct ieee80211_regdomain 
+@@ -114,10 +114,22 @@ static const struct ieee80211_regdomain
        )
  };
  
index 58dd26f2604dfb9b428dc9ae9eddafba8e947921..2a5ab3d4280390d75e14475f1cb525ef9432061a 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath5k/mac80211-ops.c
 +++ b/drivers/net/wireless/ath/ath5k/mac80211-ops.c
-@@ -86,13 +86,8 @@ ath5k_add_interface(struct ieee80211_hw 
+@@ -86,13 +86,8 @@ ath5k_add_interface(struct ieee80211_hw
                goto end;
        }
  
index 5cb4b513fa635cfe692db486ea4736d9839c7a88..cdc9315cd671e1263dcb1448f5099fa36d572636 100644 (file)
@@ -17,7 +17,7 @@
   */
  static bool
  ath5k_pci_eeprom_read(struct ath_common *common, u32 offset, u16 *data)
-@@ -80,6 +81,19 @@ ath5k_pci_eeprom_read(struct ath_common 
+@@ -80,6 +81,19 @@ ath5k_pci_eeprom_read(struct ath_common
        struct ath5k_hw *ah = (struct ath5k_hw *) common->ah;
        u32 status, timeout;
  
index 9b12d77a8aa04e81c17927e92d75057c3f66a410..aa521d2abbb193c1d14c37ae1bf1aa88f0ab045a 100644 (file)
@@ -109,7 +109,7 @@ drivers/net/wireless/ath/ath5k/debug.c |   86 ++++++++++++++++++++++++++++++++
  
  /* debugfs: queues etc */
  
-@@ -1010,6 +1101,9 @@ ath5k_debug_init_device(struct ath5k_hw 
+@@ -1010,6 +1101,9 @@ ath5k_debug_init_device(struct ath5k_hw
        debugfs_create_file("beacon", S_IWUSR | S_IRUSR, phydir, ah,
                            &fops_beacon);
  
index dec6eaf6abc3838246f4e0167a1eb05d2bbbd28b..c18fd9b8343a73a09db8c75c0a22996e71d3faf4 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/hw.c
 +++ b/drivers/net/wireless/ath/ath9k/hw.c
-@@ -388,13 +388,8 @@ static void ath9k_hw_init_config(struct 
+@@ -388,13 +388,8 @@ static void ath9k_hw_init_config(struct
  
        ah->config.rx_intr_mitigation = true;
  
index 52dad0bda122d03e323f79a9a1f8d53fddc07a86..0c50a0bbbaeaeac7f01087759ee9bee98b24bd3a 100644 (file)
  };
  
  /* policy for the key attributes */
-@@ -2207,6 +2208,20 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -2206,6 +2207,20 @@ static int nl80211_set_wiphy(struct sk_b
+               if (result)
                        return result;
        }
++
 +      if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_GAIN]) {
 +              int idx, dbi = 0;
 +
 +              if (result)
 +                      return result;
 +      }
-+
        if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_TX] &&
            info->attrs[NL80211_ATTR_WIPHY_ANTENNA_RX]) {
-               u32 tx_ant, rx_ant;
index 60b638212eac80644712046f07a021f62ab254a9..b0fb9fea46230748e4a6636f71af4c9d24c00dae 100644 (file)
@@ -10,7 +10,7 @@
  #else
  static inline void ath_init_leds(struct ath_softc *sc)
  {
-@@ -953,6 +956,13 @@ void ath_ant_comb_scan(struct ath_softc 
+@@ -953,6 +956,13 @@ void ath_ant_comb_scan(struct ath_softc
  
  #define ATH9K_NUM_CHANCTX  2 /* supports 2 operating channels */
  
@@ -63,7 +63,8 @@
 +      led->cdev.name = gpio->name;
 +      led->cdev.default_trigger = gpio->default_trigger;
 +      led->cdev.brightness_set = ath_led_brightness;
-+
+-      ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
 +      ret = led_classdev_register(wiphy_dev(sc->hw->wiphy), &led->cdev);
 +      if (ret < 0)
 +              return ret;
@@ -80,8 +81,7 @@
 +
 +      return 0;
 +}
--      ath9k_hw_set_gpio(sc->sc_ah, sc->sc_ah->led_pin, val);
++
 +int ath_create_gpio_led(struct ath_softc *sc, int gpio_num, const char *name,
 +                      const char *trigger, bool active_low)
 +{
  void ath_fill_led_pin(struct ath_softc *sc)
 --- a/drivers/net/wireless/ath/ath9k/init.c
 +++ b/drivers/net/wireless/ath/ath9k/init.c
-@@ -935,7 +935,7 @@ int ath9k_init_device(u16 devid, struct 
+@@ -935,7 +935,7 @@ int ath9k_init_device(u16 devid, struct
  
  #ifdef CPTCFG_MAC80211_LEDS
        /* must be initialized before ieee80211_register_hw */
index b01555c3216edef47aabc04023f8c7d8c254d0a2..57a894d802a8711503b7dd547c05d9e090fcb556 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ath/ath9k/mac.c
 +++ b/drivers/net/wireless/ath/ath9k/mac.c
-@@ -693,7 +693,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw 
+@@ -693,7 +693,7 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
  {
  #define AH_RX_STOP_DMA_TIMEOUT 10000   /* usec */
        struct ath_common *common = ath9k_hw_common(ah);
@@ -9,7 +9,7 @@
        int i;
  
        /* Enable access to the DMA observation bus */
-@@ -723,6 +723,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw 
+@@ -723,6 +723,16 @@ bool ath9k_hw_stopdmarecv(struct ath_hw
        }
  
        if (i == 0) {
index 3c0a26035190c754ace2b04518228d5e1553baff..a8f19994534d7d0f16122120cba38d74554e6005 100644 (file)
@@ -18,7 +18,7 @@
        void (*spectral_scan_trigger)(struct ath_hw *ah);
 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
 +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
-@@ -1999,6 +1999,26 @@ void ar9003_hw_init_rate_txpower(struct 
+@@ -1999,6 +1999,26 @@ void ar9003_hw_init_rate_txpower(struct
        }
  }
  
@@ -84,7 +84,7 @@
  int ath9k_init_device(u16 devid, struct ath_softc *sc,
                    const struct ath_bus_ops *bus_ops)
  {
-@@ -940,6 +953,8 @@ int ath9k_init_device(u16 devid, struct 
+@@ -940,6 +953,8 @@ int ath9k_init_device(u16 devid, struct
                ARRAY_SIZE(ath9k_tpt_blink));
  #endif
  
  static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
 --- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
 +++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
-@@ -1316,9 +1316,30 @@ void ar5008_hw_init_rate_txpower(struct 
+@@ -1316,9 +1316,30 @@ void ar5008_hw_init_rate_txpower(struct
        }
  }
  
index f29e250b116bae1a4f0ee53a1754767cfcb9000b..9f8dfcc46754d80e6549110aab0be8f3326b83d5 100644 (file)
@@ -187,7 +187,7 @@ Changes since v1: ---
        }
  
        /*
-@@ -4908,14 +4941,19 @@ static int rt2800_init_registers(struct 
+@@ -4908,14 +4941,19 @@ static int rt2800_init_registers(struct
        /*
         * ASIC will keep garbage value after boot, clear encryption keys.
         */
@@ -207,7 +207,7 @@ Changes since v1: ---
        }
  
        /*
-@@ -5041,8 +5079,10 @@ static int rt2800_wait_bbp_ready(struct 
+@@ -5041,8 +5079,10 @@ static int rt2800_wait_bbp_ready(struct
         * BBP was enabled after firmware was loaded,
         * but we need to reactivate it now.
         */
@@ -372,7 +372,7 @@ Changes since v1: ---
  #endif /* RT2800MMIO_H */
 --- a/drivers/net/wireless/rt2x00/rt2800pci.c
 +++ b/drivers/net/wireless/rt2x00/rt2800pci.c
-@@ -69,7 +69,9 @@ static void rt2800pci_mcu_status(struct 
+@@ -69,7 +69,9 @@ static void rt2800pci_mcu_status(struct
                return;
  
        for (i = 0; i < 200; i++) {
@@ -382,7 +382,7 @@ Changes since v1: ---
  
                if ((rt2x00_get_field32(reg, H2M_MAILBOX_CID_CMD0) == token) ||
                    (rt2x00_get_field32(reg, H2M_MAILBOX_CID_CMD1) == token) ||
-@@ -83,8 +85,10 @@ static void rt2800pci_mcu_status(struct 
+@@ -83,8 +85,10 @@ static void rt2800pci_mcu_status(struct
        if (i == 200)
                rt2x00_err(rt2x00dev, "MCU request failed, no response from hardware\n");
  
index 9f7db0834ec27984f7c6dd6e007982c099b982ca..e7eb630d484f5d952c52ff2fc2d8f9581a97e314 100644 (file)
@@ -32,7 +32,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
        u32 reg;
        u16 eeprom;
        unsigned int i;
-@@ -5003,7 +5004,7 @@ static int rt2800_init_registers(struct 
+@@ -5003,7 +5004,7 @@ static int rt2800_init_registers(struct
        /*
         * Clear all beacons
         */
index 00f80b0472d576a84902dda17a294f8dd3d18b36..b79b4bea1a2a7a927234234378293a5028734148 100644 (file)
@@ -34,7 +34,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
   */
 --- a/drivers/net/wireless/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
-@@ -4650,6 +4650,30 @@ static int rt2800_init_registers(struct 
+@@ -4650,6 +4650,30 @@ static int rt2800_init_registers(struct
        if (ret)
                return ret;
  
index 66040b14cf99518f1e8714a635c6e2cf65650bf8..4dfb068e2f5b6ed456c53c636827ded72f81fd60 100644 (file)
@@ -35,7 +35,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
  #define RX_FILTER_CFG                 0x1400
 --- a/drivers/net/wireless/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
-@@ -5005,6 +5005,12 @@ static int rt2800_init_registers(struct 
+@@ -5005,6 +5005,12 @@ static int rt2800_init_registers(struct
                        rt2800_register_write(rt2x00dev, TX_SW_CFG2,
                                              0x00000000);
                }
@@ -48,7 +48,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
        } else if (rt2x00_rt(rt2x00dev, RT5390) ||
                   rt2x00_rt(rt2x00dev, RT5392) ||
                   rt2x00_rt(rt2x00dev, RT5592)) {
-@@ -5035,9 +5041,11 @@ static int rt2800_init_registers(struct 
+@@ -5035,9 +5041,11 @@ static int rt2800_init_registers(struct
  
        rt2800_register_read(rt2x00dev, MAX_LEN_CFG, &reg);
        rt2x00_set_field32(&reg, MAX_LEN_CFG_MAX_MPDU, AGGREGATION_SIZE);
@@ -63,7 +63,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
                rt2x00_set_field32(&reg, MAX_LEN_CFG_MAX_PSDU, 2);
        else
                rt2x00_set_field32(&reg, MAX_LEN_CFG_MAX_PSDU, 1);
-@@ -5190,6 +5198,11 @@ static int rt2800_init_registers(struct 
+@@ -5190,6 +5198,11 @@ static int rt2800_init_registers(struct
        reg = rt2x00_rt(rt2x00dev, RT5592) ? 0x00000082 : 0x00000002;
        rt2800_register_write(rt2x00dev, TXOP_HLDR_ET, reg);
  
index 47dad6edae7aff8f5b9c76e7e211abdb5f8d676c..6663b785d8b93a4fe8b95587d25826956ada0873 100644 (file)
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/net/wireless/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
-@@ -5808,6 +5808,47 @@ static void rt2800_init_bbp_3593(struct 
+@@ -5808,6 +5808,47 @@ static void rt2800_init_bbp_3593(struct
                rt2800_bbp_write(rt2x00dev, 103, 0xc0);
  }
  
index 9f98cab60e5fa22ed037761b5b242708d2893da2..1cba4f68c1a8c48599414ba42a0a2951889110ef 100644 (file)
@@ -110,10 +110,13 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
                        rt2800_bbp_write(rt2x00dev, 83, 0x9a);
  
                if (rt2x00_has_cap_external_lna_a(rt2x00dev))
-@@ -3687,6 +3736,23 @@ static void rt2800_config_channel(struct
-               usleep_range(1000, 1500);
-       }
+@@ -3684,6 +3733,23 @@ static void rt2800_config_channel(struct
+               rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
  
++              usleep_range(1000, 1500);
++      }
++
 +      if (rt2x00_rt(rt2x00dev, RT3883)) {
 +              if (!conf_is_ht40(conf))
 +                      rt2800_bbp_write(rt2x00dev, 105, 0x34);
@@ -128,9 +131,6 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 +
 +              rt2800_bbp_write_with_rx_chain(rt2x00dev, 66, reg);
 +
-+              usleep_range(1000, 1500);
-+      }
-+
-       if (rt2x00_rt(rt2x00dev, RT5592)) {
-               rt2800_bbp_write(rt2x00dev, 195, 141);
-               rt2800_bbp_write(rt2x00dev, 196, conf_is_ht40(conf) ? 0x10 : 0x1a);
+               usleep_range(1000, 1500);
+       }
index bc04df8b2326462ed7f025d2ff1fe8855dffb96f..beadea88b70d41cde65488fcb914ca7601d72f16 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/net/wireless/rt2x00/rt2800lib.c
 +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
-@@ -4835,7 +4835,8 @@ static u8 rt2800_get_default_vgc(struct 
+@@ -4835,7 +4835,8 @@ static u8 rt2800_get_default_vgc(struct
                else
                        vgc = 0x2e + rt2x00dev->lna_gain;
        } else { /* 5GHZ band */
index 7b11e5ce7beada361652947d740f3ea03c9f3085..840b3bc96408af64eedfca8f2d58f94a9db7b5f8 100644 (file)
@@ -58,7 +58,7 @@
        case RF5360:
        case RF5362:
        case RF5370:
-@@ -5111,6 +5122,8 @@ static int rt2800_init_registers(struct 
+@@ -5111,6 +5122,8 @@ static int rt2800_init_registers(struct
                rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
                rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
                rt2800_register_write(rt2x00dev, TX_SW_CFG2, 0x00000000);
@@ -67,7 +67,7 @@
        } else {
                rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000000);
                rt2800_register_write(rt2x00dev, TX_SW_CFG1, 0x00080606);
-@@ -5766,9 +5779,13 @@ static void rt2800_init_bbp_3352(struct 
+@@ -5766,9 +5779,13 @@ static void rt2800_init_bbp_3352(struct
  
        rt2800_bbp_write(rt2x00dev, 82, 0x62);
  
@@ -84,7 +84,7 @@
  
        rt2800_bbp_write(rt2x00dev, 86, 0x38);
  
-@@ -5782,9 +5799,13 @@ static void rt2800_init_bbp_3352(struct 
+@@ -5782,9 +5799,13 @@ static void rt2800_init_bbp_3352(struct
  
        rt2800_bbp_write(rt2x00dev, 104, 0x92);
  
  
        rt2800_bbp_write(rt2x00dev, 120, 0x50);
  
-@@ -5809,6 +5830,13 @@ static void rt2800_init_bbp_3352(struct 
+@@ -5809,6 +5830,13 @@ static void rt2800_init_bbp_3352(struct
        rt2800_bbp_write(rt2x00dev, 143, 0xa2);
  
        rt2800_bbp_write(rt2x00dev, 148, 0xc8);
index 337242b844caa26f4bd6b72ec6d4c7030679c6a9..252fa810b06cdda6e34820c503668c46abde2b47 100644 (file)
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/libertas/cfg.c
 +++ b/drivers/net/wireless/libertas/cfg.c
-@@ -2174,6 +2174,8 @@ int lbs_cfg_register(struct lbs_private 
+@@ -2174,6 +2174,8 @@ int lbs_cfg_register(struct lbs_private
        wdev->wiphy->n_cipher_suites = ARRAY_SIZE(cipher_suites);
        wdev->wiphy->reg_notifier = lbs_reg_notifier;
  
index 37df5d766d535d6691083da788bdab9d08d808bb..501910fe822691bb1af16dab704c6c9824fa66d4 100644 (file)
        default:
                return;
        }
-@@ -5125,9 +5516,42 @@ static int rt2800_init_registers(struct 
+@@ -5125,9 +5516,42 @@ static int rt2800_init_registers(struct
        } else if (rt2x00_rt(rt2x00dev, RT5390) ||
                   rt2x00_rt(rt2x00dev, RT5392) ||
                   rt2x00_rt(rt2x00dev, RT5592)) {
        } else if (rt2x00_rt(rt2x00dev, RT5350)) {
                rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404);
        } else {
-@@ -6159,6 +6583,225 @@ static void rt2800_init_bbp_5592(struct 
+@@ -6159,6 +6583,225 @@ static void rt2800_init_bbp_5592(struct
                rt2800_bbp_write(rt2x00dev, 103, 0xc0);
  }