From 072937888e133f5e97fd05a7496eaf7eeae04079 Mon Sep 17 00:00:00 2001 From: Jonas Gorski Date: Thu, 21 May 2015 19:32:16 +0000 Subject: [PATCH] mac80211: make it work with 3.18.12+ 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 SVN-Revision: 45710 --- .../patches/090-linux_3_18_12_compat.patch | 29 +++++++++++++++++++ ...intermediate-software-queue-implemen.patch | 2 +- .../305-ath5k-channel-change-fix.patch | 4 +-- .../patches/306-ath5k-fix-reset-race.patch | 6 ++-- ...ac80211-remove-drop_unencrypted-code.patch | 6 ++-- ...oid-duplicate-TX-path-station-lookup.patch | 2 +- ...tc-add-new-WMI_REG_RMW_CMDID-command.patch | 14 ++++----- ...read-to-be-compatible-with-ath9k_htc.patch | 2 +- ...add-new-function-ath9k_hw_read_array.patch | 4 +-- ...hot-read-in-ath9k_hw_update_mibstats.patch | 2 +- ...W-and-rmw-buffer-in-ath9k_hw_4k_set_.patch | 4 +-- .../patches/406-ath_relax_default_regd.patch | 2 +- .../411-ath5k_allow_adhoc_and_ap.patch | 2 +- ...add_platform_eeprom_support_to_ath5k.patch | 2 +- .../440-ath5k_channel_bw_debugfs.patch | 2 +- .../510-ath9k_intr_mitigation_tweak.patch | 2 +- .../522-mac80211_configure_antenna_gain.patch | 8 ++--- .../patches/530-ath9k_extra_leds.patch | 10 +++---- .../patches/541-ath9k_rx_dma_stop_check.patch | 4 +-- .../patches/543-ath9k_entropy_from_adc.patch | 6 ++-- ...t2800-serialize-shared-memory-access.patch | 8 ++--- ...-add-hw_beacon_count-field-to-struct.patch | 2 +- ...-init-additional-beacon-offset-regis.patch | 2 +- ...-add-MAC-register-initialization-for.patch | 6 ++-- ...-add-BBP-register-initialization-for.patch | 2 +- ...-add-channel-configuration-code-for-.patch | 18 ++++++------ ...0-rt2800lib-fix-VGC-setup-for-RT3883.patch | 2 +- .../patches/616-rt2x00-support-rt5350.patch | 8 ++--- .../802-libertas-set-wireless-macaddr.patch | 2 +- .../910-01-add-support-for-mt7620.patch | 4 +-- 30 files changed, 98 insertions(+), 69 deletions(-) create mode 100644 package/kernel/mac80211/patches/090-linux_3_18_12_compat.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 index 0000000000..85c52807fe --- /dev/null +++ b/package/kernel/mac80211/patches/090-linux_3_18_12_compat.patch @@ -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 + #include + ++#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]; diff --git a/package/kernel/mac80211/patches/300-mac80211-add-an-intermediate-software-queue-implemen.patch b/package/kernel/mac80211/patches/300-mac80211-add-an-intermediate-software-queue-implemen.patch index d8ea82269b..237121ba27 100644 --- a/package/kernel/mac80211/patches/300-mac80211-add-an-intermediate-software-queue-implemen.patch +++ b/package/kernel/mac80211/patches/300-mac80211-add-an-intermediate-software-queue-implemen.patch @@ -331,7 +331,7 @@ Signed-off-by: Felix Fietkau 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); } diff --git a/package/kernel/mac80211/patches/305-ath5k-channel-change-fix.patch b/package/kernel/mac80211/patches/305-ath5k-channel-change-fix.patch index afed7b42ff..4cfa53f6c0 100644 --- a/package/kernel/mac80211/patches/305-ath5k-channel-change-fix.patch +++ b/package/kernel/mac80211/patches/305-ath5k-channel-change-fix.patch @@ -61,7 +61,7 @@ Signed-off-by: Sergey Ryazanov --- 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 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); diff --git a/package/kernel/mac80211/patches/306-ath5k-fix-reset-race.patch b/package/kernel/mac80211/patches/306-ath5k-fix-reset-race.patch index 399076524d..85a190481b 100644 --- a/package/kernel/mac80211/patches/306-ath5k-fix-reset-race.patch +++ b/package/kernel/mac80211/patches/306-ath5k-fix-reset-race.patch @@ -66,7 +66,7 @@ Signed-off-by: Sergey Ryazanov 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 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 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); */ diff --git a/package/kernel/mac80211/patches/311-mac80211-remove-drop_unencrypted-code.patch b/package/kernel/mac80211/patches/311-mac80211-remove-drop_unencrypted-code.patch index d6bc082f35..b2475b9106 100644 --- a/package/kernel/mac80211/patches/311-mac80211-remove-drop_unencrypted-code.patch +++ b/package/kernel/mac80211/patches/311-mac80211-remove-drop_unencrypted-code.patch @@ -108,7 +108,8 @@ Signed-off-by: Johannes Berg (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 - 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; diff --git a/package/kernel/mac80211/patches/315-mac80211-avoid-duplicate-TX-path-station-lookup.patch b/package/kernel/mac80211/patches/315-mac80211-avoid-duplicate-TX-path-station-lookup.patch index b02cdafd55..d143025f0f 100644 --- a/package/kernel/mac80211/patches/315-mac80211-avoid-duplicate-TX-path-station-lookup.patch +++ b/package/kernel/mac80211/patches/315-mac80211-avoid-duplicate-TX-path-station-lookup.patch @@ -257,7 +257,7 @@ Signed-off-by: Johannes Berg 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; diff --git a/package/kernel/mac80211/patches/319-ath9k_htc-add-new-WMI_REG_RMW_CMDID-command.patch b/package/kernel/mac80211/patches/319-ath9k_htc-add-new-WMI_REG_RMW_CMDID-command.patch index c3942cecf3..6af69ebd2a 100644 --- a/package/kernel/mac80211/patches/319-ath9k_htc-add-new-WMI_REG_RMW_CMDID-command.patch +++ b/package/kernel/mac80211/patches/319-ath9k_htc-add-new-WMI_REG_RMW_CMDID-command.patch @@ -121,7 +121,11 @@ Signed-off-by: Kalle Valo + } + 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 + + 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 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"; diff --git a/package/kernel/mac80211/patches/323-ath9k-add-multi_read-to-be-compatible-with-ath9k_htc.patch b/package/kernel/mac80211/patches/323-ath9k-add-multi_read-to-be-compatible-with-ath9k_htc.patch index 4cd0ea3c79..246bb9d295 100644 --- a/package/kernel/mac80211/patches/323-ath9k-add-multi_read-to-be-compatible-with-ath9k_htc.patch +++ b/package/kernel/mac80211/patches/323-ath9k-add-multi_read-to-be-compatible-with-ath9k_htc.patch @@ -8,7 +8,7 @@ Signed-off-by: Kalle Valo --- 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; } diff --git a/package/kernel/mac80211/patches/324-ath9k-add-new-function-ath9k_hw_read_array.patch b/package/kernel/mac80211/patches/324-ath9k-add-new-function-ath9k_hw_read_array.patch index 41c6ff57a8..2eda1c9d25 100644 --- a/package/kernel/mac80211/patches/324-ath9k-add-new-function-ath9k_hw_read_array.patch +++ b/package/kernel/mac80211/patches/324-ath9k-add-new-function-ath9k_hw_read_array.patch @@ -11,7 +11,7 @@ Signed-off-by: Kalle Valo --- 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 #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); diff --git a/package/kernel/mac80211/patches/326-ath9k-use-one-shot-read-in-ath9k_hw_update_mibstats.patch b/package/kernel/mac80211/patches/326-ath9k-use-one-shot-read-in-ath9k_hw_update_mibstats.patch index 6420eeddcf..a22cd1d490 100644 --- a/package/kernel/mac80211/patches/326-ath9k-use-one-shot-read-in-ath9k_hw_update_mibstats.patch +++ b/package/kernel/mac80211/patches/326-ath9k-use-one-shot-read-in-ath9k_hw_update_mibstats.patch @@ -10,7 +10,7 @@ Signed-off-by: Kalle Valo --- 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) { diff --git a/package/kernel/mac80211/patches/333-ath9k-use-REG_RMW-and-rmw-buffer-in-ath9k_hw_4k_set_.patch b/package/kernel/mac80211/patches/333-ath9k-use-REG_RMW-and-rmw-buffer-in-ath9k_hw_4k_set_.patch index 053df8428d..8f12b36454 100644 --- a/package/kernel/mac80211/patches/333-ath9k-use-REG_RMW-and-rmw-buffer-in-ath9k_hw_4k_set_.patch +++ b/package/kernel/mac80211/patches/333-ath9k-use-REG_RMW-and-rmw-buffer-in-ath9k_hw_4k_set_.patch @@ -13,7 +13,7 @@ Signed-off-by: Kalle Valo --- 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 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]); diff --git a/package/kernel/mac80211/patches/406-ath_relax_default_regd.patch b/package/kernel/mac80211/patches/406-ath_relax_default_regd.patch index 83ec441b86..6336f1f375 100644 --- a/package/kernel/mac80211/patches/406-ath_relax_default_regd.patch +++ b/package/kernel/mac80211/patches/406-ath_relax_default_regd.patch @@ -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 ) }; diff --git a/package/kernel/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch b/package/kernel/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch index 58dd26f260..2a5ab3d428 100644 --- a/package/kernel/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch +++ b/package/kernel/mac80211/patches/411-ath5k_allow_adhoc_and_ap.patch @@ -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; } diff --git a/package/kernel/mac80211/patches/431-add_platform_eeprom_support_to_ath5k.patch b/package/kernel/mac80211/patches/431-add_platform_eeprom_support_to_ath5k.patch index 5cb4b513fa..cdc9315cd6 100644 --- a/package/kernel/mac80211/patches/431-add_platform_eeprom_support_to_ath5k.patch +++ b/package/kernel/mac80211/patches/431-add_platform_eeprom_support_to_ath5k.patch @@ -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; diff --git a/package/kernel/mac80211/patches/440-ath5k_channel_bw_debugfs.patch b/package/kernel/mac80211/patches/440-ath5k_channel_bw_debugfs.patch index 9b12d77a8a..aa521d2abb 100644 --- a/package/kernel/mac80211/patches/440-ath5k_channel_bw_debugfs.patch +++ b/package/kernel/mac80211/patches/440-ath5k_channel_bw_debugfs.patch @@ -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); diff --git a/package/kernel/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch b/package/kernel/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch index dec6eaf6ab..c18fd9b834 100644 --- a/package/kernel/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch +++ b/package/kernel/mac80211/patches/510-ath9k_intr_mitigation_tweak.patch @@ -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; diff --git a/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch index 52dad0bda1..0c50a0bbba 100644 --- a/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/522-mac80211_configure_antenna_gain.patch @@ -137,10 +137,11 @@ }; /* 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; + @@ -154,7 +155,6 @@ + if (result) + return result; + } -+ + if (info->attrs[NL80211_ATTR_WIPHY_ANTENNA_TX] && info->attrs[NL80211_ATTR_WIPHY_ANTENNA_RX]) { - u32 tx_ant, rx_ant; diff --git a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch index 60b638212e..b0fb9fea46 100644 --- a/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch +++ b/package/kernel/mac80211/patches/530-ath9k_extra_leds.patch @@ -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) +{ @@ -165,7 +165,7 @@ 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 */ diff --git a/package/kernel/mac80211/patches/541-ath9k_rx_dma_stop_check.patch b/package/kernel/mac80211/patches/541-ath9k_rx_dma_stop_check.patch index b01555c321..57a894d802 100644 --- a/package/kernel/mac80211/patches/541-ath9k_rx_dma_stop_check.patch +++ b/package/kernel/mac80211/patches/541-ath9k_rx_dma_stop_check.patch @@ -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) { diff --git a/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch b/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch index 3c0a260351..a8f1999453 100644 --- a/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch +++ b/package/kernel/mac80211/patches/543-ath9k_entropy_from_adc.patch @@ -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 @@ -110,7 +110,7 @@ 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 } } diff --git a/package/kernel/mac80211/patches/600-0003-rt2x00-rt2800-serialize-shared-memory-access.patch b/package/kernel/mac80211/patches/600-0003-rt2x00-rt2800-serialize-shared-memory-access.patch index f29e250b11..9f8dfcc467 100644 --- a/package/kernel/mac80211/patches/600-0003-rt2x00-rt2800-serialize-shared-memory-access.patch +++ b/package/kernel/mac80211/patches/600-0003-rt2x00-rt2800-serialize-shared-memory-access.patch @@ -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"); diff --git a/package/kernel/mac80211/patches/600-0005-rt2x00-rt2800lib-add-hw_beacon_count-field-to-struct.patch b/package/kernel/mac80211/patches/600-0005-rt2x00-rt2800lib-add-hw_beacon_count-field-to-struct.patch index 9f7db0834e..e7eb630d48 100644 --- a/package/kernel/mac80211/patches/600-0005-rt2x00-rt2800lib-add-hw_beacon_count-field-to-struct.patch +++ b/package/kernel/mac80211/patches/600-0005-rt2x00-rt2800lib-add-hw_beacon_count-field-to-struct.patch @@ -32,7 +32,7 @@ Signed-off-by: Gabor Juhos 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 */ diff --git a/package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch b/package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch index 00f80b0472..b79b4bea1a 100644 --- a/package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch +++ b/package/kernel/mac80211/patches/600-0006-rt2x00-rt2800lib-init-additional-beacon-offset-regis.patch @@ -34,7 +34,7 @@ Signed-off-by: Gabor Juhos */ --- 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; diff --git a/package/kernel/mac80211/patches/600-0014-rt2x00-rt2800lib-add-MAC-register-initialization-for.patch b/package/kernel/mac80211/patches/600-0014-rt2x00-rt2800lib-add-MAC-register-initialization-for.patch index 66040b14cf..4dfb068e2f 100644 --- a/package/kernel/mac80211/patches/600-0014-rt2x00-rt2800lib-add-MAC-register-initialization-for.patch +++ b/package/kernel/mac80211/patches/600-0014-rt2x00-rt2800lib-add-MAC-register-initialization-for.patch @@ -35,7 +35,7 @@ Signed-off-by: Gabor Juhos #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 } 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, ®); rt2x00_set_field32(®, MAX_LEN_CFG_MAX_MPDU, AGGREGATION_SIZE); @@ -63,7 +63,7 @@ Signed-off-by: Gabor Juhos rt2x00_set_field32(®, MAX_LEN_CFG_MAX_PSDU, 2); else rt2x00_set_field32(®, 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); diff --git a/package/kernel/mac80211/patches/600-0016-rt2x00-rt2800lib-add-BBP-register-initialization-for.patch b/package/kernel/mac80211/patches/600-0016-rt2x00-rt2800lib-add-BBP-register-initialization-for.patch index 47dad6edae..6663b785d8 100644 --- a/package/kernel/mac80211/patches/600-0016-rt2x00-rt2800lib-add-BBP-register-initialization-for.patch +++ b/package/kernel/mac80211/patches/600-0016-rt2x00-rt2800lib-add-BBP-register-initialization-for.patch @@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos --- 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); } diff --git a/package/kernel/mac80211/patches/600-0020-rt2x00-rt2800lib-add-channel-configuration-code-for-.patch b/package/kernel/mac80211/patches/600-0020-rt2x00-rt2800lib-add-channel-configuration-code-for-.patch index 9f98cab60e..1cba4f68c1 100644 --- a/package/kernel/mac80211/patches/600-0020-rt2x00-rt2800lib-add-channel-configuration-code-for-.patch +++ b/package/kernel/mac80211/patches/600-0020-rt2x00-rt2800lib-add-channel-configuration-code-for-.patch @@ -110,10 +110,13 @@ Signed-off-by: Gabor Juhos 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 + + 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); + } + diff --git a/package/kernel/mac80211/patches/600-0029-rt2x00-rt2800lib-fix-VGC-setup-for-RT3883.patch b/package/kernel/mac80211/patches/600-0029-rt2x00-rt2800lib-fix-VGC-setup-for-RT3883.patch index bc04df8b23..beadea88b7 100644 --- a/package/kernel/mac80211/patches/600-0029-rt2x00-rt2800lib-fix-VGC-setup-for-RT3883.patch +++ b/package/kernel/mac80211/patches/600-0029-rt2x00-rt2800lib-fix-VGC-setup-for-RT3883.patch @@ -10,7 +10,7 @@ Signed-off-by: Gabor Juhos --- 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 */ diff --git a/package/kernel/mac80211/patches/616-rt2x00-support-rt5350.patch b/package/kernel/mac80211/patches/616-rt2x00-support-rt5350.patch index 7b11e5ce7b..840b3bc964 100644 --- a/package/kernel/mac80211/patches/616-rt2x00-support-rt5350.patch +++ b/package/kernel/mac80211/patches/616-rt2x00-support-rt5350.patch @@ -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); @@ -101,7 +101,7 @@ 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); diff --git a/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch b/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch index 337242b844..252fa810b0 100644 --- a/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch +++ b/package/kernel/mac80211/patches/802-libertas-set-wireless-macaddr.patch @@ -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; diff --git a/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch b/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch index 37df5d766d..501910fe82 100644 --- a/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch +++ b/package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch @@ -583,7 +583,7 @@ 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)) { @@ -629,7 +629,7 @@ } 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); }