From e185080c871a712a41ef02f6b20f1d07d2f1ab87 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Mon, 4 Oct 2021 23:48:20 +0200 Subject: mac80211: Update to version 5.11.22-1 The removed patches were applied upstream. This backports version 5.11.22 and later does not support kernel versions < 4.4, this allows us to remove some patches too. Signed-off-by: Hauke Mehrtens --- ...2x00-define-RF5592-in-init_eeprom-routine.patch | 2 +- .../rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch | 10 +- ...low_disabling_bands_through_platform_data.patch | 4 +- .../607-rt2x00-add_platform_data_mac_addr.patch | 2 +- ...-rt2x00-allow_disabling_bands_through_dts.patch | 2 +- .../610-rt2x00-change-led-polarity-from-OF.patch | 2 +- .../rt2x00/611-rt2x00-add-AP+STA-support.patch | 2 +- .../612-rt2x00-led-tpt-trigger-support.patch | 4 +- ...x00-add-support-for-external-PA-on-MT7620.patch | 6 +- .../982-rt2x00-add-rf-self-txdc-calibration.patch | 4 +- .../rt2x00/983-rt2x00-add-r-calibration.patch | 4 +- .../rt2x00/984-rt2x00-add-rxdcoc-calibration.patch | 4 +- .../rt2x00/985-rt2x00-add-rxiq-calibration.patch | 4 +- .../986-rt2x00-add-TX-LOFT-calibration.patch | 4 +- ...t7620-differentiate-based-on-SoC-CHIP_VER.patch | 16 +- ...x00-save-survey-for-every-channel-visited.patch | 183 --------------------- 16 files changed, 35 insertions(+), 218 deletions(-) delete mode 100644 package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch (limited to 'package/kernel/mac80211/patches/rt2x00') diff --git a/package/kernel/mac80211/patches/rt2x00/002-rt2x00-define-RF5592-in-init_eeprom-routine.patch b/package/kernel/mac80211/patches/rt2x00/002-rt2x00-define-RF5592-in-init_eeprom-routine.patch index a50a195285..96eeb37dc6 100644 --- a/package/kernel/mac80211/patches/rt2x00/002-rt2x00-define-RF5592-in-init_eeprom-routine.patch +++ b/package/kernel/mac80211/patches/rt2x00/002-rt2x00-define-RF5592-in-init_eeprom-routine.patch @@ -40,7 +40,7 @@ Signed-off-by: Tomislav Požega --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -9416,6 +9416,8 @@ static int rt2800_init_eeprom(struct rt2 +@@ -9435,6 +9435,8 @@ static int rt2800_init_eeprom(struct rt2 rf = RF3853; else if (rt2x00_rt(rt2x00dev, RT5350)) rf = RF5350; diff --git a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch index 8628c1063a..1930885ccf 100644 --- a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch +++ b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch @@ -1,6 +1,6 @@ --- a/local-symbols +++ b/local-symbols -@@ -332,6 +332,7 @@ RT2X00_LIB_FIRMWARE= +@@ -323,6 +323,7 @@ RT2X00_LIB_FIRMWARE= RT2X00_LIB_CRYPTO= RT2X00_LIB_LEDS= RT2X00_LIB_DEBUGFS= @@ -105,7 +105,7 @@ .drv_init_registers = rt2800mmio_init_registers, --- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h -@@ -694,6 +694,7 @@ enum rt2x00_capability_flags { +@@ -703,6 +703,7 @@ enum rt2x00_capability_flags { REQUIRE_HT_TX_DESC, REQUIRE_PS_AUTOWAKE, REQUIRE_DELAYED_RFKILL, @@ -113,7 +113,7 @@ /* * Capabilities -@@ -970,6 +971,11 @@ struct rt2x00_dev { +@@ -980,6 +981,11 @@ struct rt2x00_dev { const struct firmware *fw; /* @@ -127,7 +127,7 @@ DECLARE_KFIFO_PTR(txstatus_fifo, u32); --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1402,6 +1402,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de +@@ -1401,6 +1401,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup); INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep); @@ -138,7 +138,7 @@ /* * Let the driver probe the device to detect the capabilities. */ -@@ -1545,6 +1549,11 @@ void rt2x00lib_remove_dev(struct rt2x00_ +@@ -1541,6 +1545,11 @@ void rt2x00lib_remove_dev(struct rt2x00_ * Free the driver data. */ kfree(rt2x00dev->drv_data); diff --git a/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch b/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch index e12f074669..ffee2189d2 100644 --- a/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch +++ b/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch @@ -12,7 +12,7 @@ #endif /* _RT2X00_PLATFORM_H */ --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1008,6 +1008,22 @@ static int rt2x00lib_probe_hw_modes(stru +@@ -1007,6 +1007,22 @@ static int rt2x00lib_probe_hw_modes(stru unsigned int num_rates; unsigned int i; @@ -37,7 +37,7 @@ num_rates += 4; --- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h -@@ -399,6 +399,7 @@ struct hw_mode_spec { +@@ -408,6 +408,7 @@ struct hw_mode_spec { unsigned int supported_bands; #define SUPPORT_BAND_2GHZ 0x00000001 #define SUPPORT_BAND_5GHZ 0x00000002 diff --git a/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch b/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch index 79f99ffdf4..37553bb80a 100644 --- a/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch +++ b/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -990,6 +990,12 @@ static void rt2x00lib_rate(struct ieee80 +@@ -989,6 +989,12 @@ static void rt2x00lib_rate(struct ieee80 void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr) { diff --git a/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch b/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch index 31f2f0261f..6211809c0a 100644 --- a/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch +++ b/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1013,6 +1013,16 @@ static int rt2x00lib_probe_hw_modes(stru +@@ -1012,6 +1012,16 @@ static int rt2x00lib_probe_hw_modes(stru struct ieee80211_rate *rates; unsigned int num_rates; unsigned int i; diff --git a/package/kernel/mac80211/patches/rt2x00/610-rt2x00-change-led-polarity-from-OF.patch b/package/kernel/mac80211/patches/rt2x00/610-rt2x00-change-led-polarity-from-OF.patch index 039c6f6afc..d78b76d7f5 100644 --- a/package/kernel/mac80211/patches/rt2x00/610-rt2x00-change-led-polarity-from-OF.patch +++ b/package/kernel/mac80211/patches/rt2x00/610-rt2x00-change-led-polarity-from-OF.patch @@ -8,7 +8,7 @@ #include "rt2x00.h" #include "rt2800lib.h" -@@ -9530,6 +9531,17 @@ static int rt2800_init_eeprom(struct rt2 +@@ -9549,6 +9550,17 @@ static int rt2800_init_eeprom(struct rt2 rt2800_init_led(rt2x00dev, &rt2x00dev->led_assoc, LED_TYPE_ASSOC); rt2800_init_led(rt2x00dev, &rt2x00dev->led_qual, LED_TYPE_QUALITY); diff --git a/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch index 01a3851fcc..0da9356e0c 100644 --- a/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch +++ b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1341,7 +1341,7 @@ static inline void rt2x00lib_set_if_comb +@@ -1340,7 +1340,7 @@ static inline void rt2x00lib_set_if_comb */ if_limit = &rt2x00dev->if_limits_ap; if_limit->max = rt2x00dev->ops->max_ap_intf; diff --git a/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch b/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch index 079c87e33c..6e6564f870 100644 --- a/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch +++ b/package/kernel/mac80211/patches/rt2x00/612-rt2x00-led-tpt-trigger-support.patch @@ -11,7 +11,7 @@ Tested-by: Christoph Krapp --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1126,6 +1126,19 @@ static void rt2x00lib_remove_hw(struct r +@@ -1125,6 +1125,19 @@ static void rt2x00lib_remove_hw(struct r kfree(rt2x00dev->spec.channels_info); } @@ -31,7 +31,7 @@ Tested-by: Christoph Krapp static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev) { struct hw_mode_spec *spec = &rt2x00dev->spec; -@@ -1207,6 +1220,10 @@ static int rt2x00lib_probe_hw(struct rt2 +@@ -1206,6 +1219,10 @@ static int rt2x00lib_probe_hw(struct rt2 #undef RT2X00_TASKLET_INIT diff --git a/package/kernel/mac80211/patches/rt2x00/650-rt2x00-add-support-for-external-PA-on-MT7620.patch b/package/kernel/mac80211/patches/rt2x00/650-rt2x00-add-support-for-external-PA-on-MT7620.patch index 20452cd8a7..8814c02532 100644 --- a/package/kernel/mac80211/patches/rt2x00/650-rt2x00-add-support-for-external-PA-on-MT7620.patch +++ b/package/kernel/mac80211/patches/rt2x00/650-rt2x00-add-support-for-external-PA-on-MT7620.patch @@ -30,7 +30,7 @@ Signed-off-by: Tomislav Po=C5=BEega * EEPROM LNA --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -4356,6 +4356,45 @@ static void rt2800_config_channel(struct +@@ -4369,6 +4369,45 @@ static void rt2800_config_channel(struct rt2800_iq_calibrate(rt2x00dev, rf->channel); } @@ -76,7 +76,7 @@ Signed-off-by: Tomislav Po=C5=BEega bbp = rt2800_bbp_read(rt2x00dev, 4); rt2x00_set_field8(&bbp, BBP4_BANDWIDTH, 2 * conf_is_ht40(conf)); rt2800_bbp_write(rt2x00dev, 4, bbp); -@@ -9559,7 +9598,8 @@ static int rt2800_init_eeprom(struct rt2 +@@ -9578,7 +9617,8 @@ static int rt2800_init_eeprom(struct rt2 */ eeprom = rt2800_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1); @@ -86,7 +86,7 @@ Signed-off-by: Tomislav Po=C5=BEega if (rt2x00_get_field16(eeprom, EEPROM_NIC_CONF1_EXTERNAL_TX0_PA_3352)) __set_bit(CAPABILITY_EXTERNAL_PA_TX0, -@@ -9570,6 +9610,18 @@ static int rt2800_init_eeprom(struct rt2 +@@ -9589,6 +9629,18 @@ static int rt2800_init_eeprom(struct rt2 &rt2x00dev->cap_flags); } diff --git a/package/kernel/mac80211/patches/rt2x00/982-rt2x00-add-rf-self-txdc-calibration.patch b/package/kernel/mac80211/patches/rt2x00/982-rt2x00-add-rf-self-txdc-calibration.patch index 6be847478e..b798dcc6d8 100644 --- a/package/kernel/mac80211/patches/rt2x00/982-rt2x00-add-rf-self-txdc-calibration.patch +++ b/package/kernel/mac80211/patches/rt2x00/982-rt2x00-add-rf-self-txdc-calibration.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -8419,6 +8419,56 @@ static void rt2800_init_rfcsr_5592(struc +@@ -8438,6 +8438,56 @@ static void rt2800_init_rfcsr_5592(struc rt2800_led_open_drain_enable(rt2x00dev); } @@ -57,7 +57,7 @@ static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev, bool set_bw, bool is_ht40) { -@@ -9026,6 +9076,7 @@ static void rt2800_init_rfcsr_6352(struc +@@ -9045,6 +9095,7 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00); rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C); diff --git a/package/kernel/mac80211/patches/rt2x00/983-rt2x00-add-r-calibration.patch b/package/kernel/mac80211/patches/rt2x00/983-rt2x00-add-r-calibration.patch index 3ed0ff7ef5..cf21c39a6c 100644 --- a/package/kernel/mac80211/patches/rt2x00/983-rt2x00-add-r-calibration.patch +++ b/package/kernel/mac80211/patches/rt2x00/983-rt2x00-add-r-calibration.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -8469,6 +8469,155 @@ static void rt2800_rf_self_txdc_cal(stru +@@ -8488,6 +8488,155 @@ static void rt2800_rf_self_txdc_cal(stru rt2x00_info(rt2x00dev, "RF Tx self calibration end\n"); } @@ -156,7 +156,7 @@ static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev, bool set_bw, bool is_ht40) { -@@ -9076,6 +9225,7 @@ static void rt2800_init_rfcsr_6352(struc +@@ -9095,6 +9244,7 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rfcsr_write_dccal(rt2x00dev, 5, 0x00); rt2800_rfcsr_write_dccal(rt2x00dev, 17, 0x7C); diff --git a/package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch b/package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch index 77be986d18..1f8684b0bf 100644 --- a/package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch +++ b/package/kernel/mac80211/patches/rt2x00/984-rt2x00-add-rxdcoc-calibration.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -8618,6 +8618,70 @@ static void rt2800_r_calibration(struct +@@ -8637,6 +8637,70 @@ static void rt2800_r_calibration(struct rt2800_register_write(rt2x00dev, PWR_PIN_CFG, MAC_PWR_PIN_CFG); } @@ -71,7 +71,7 @@ static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev, bool set_bw, bool is_ht40) { -@@ -9227,6 +9291,7 @@ static void rt2800_init_rfcsr_6352(struc +@@ -9246,6 +9310,7 @@ static void rt2800_init_rfcsr_6352(struc rt2800_r_calibration(rt2x00dev); rt2800_rf_self_txdc_cal(rt2x00dev); diff --git a/package/kernel/mac80211/patches/rt2x00/985-rt2x00-add-rxiq-calibration.patch b/package/kernel/mac80211/patches/rt2x00/985-rt2x00-add-rxiq-calibration.patch index 7352ad036c..98f2e245ce 100644 --- a/package/kernel/mac80211/patches/rt2x00/985-rt2x00-add-rxiq-calibration.patch +++ b/package/kernel/mac80211/patches/rt2x00/985-rt2x00-add-rxiq-calibration.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -8682,6 +8682,384 @@ static void rt2800_rxdcoc_calibration(st +@@ -8701,6 +8701,384 @@ static void rt2800_rxdcoc_calibration(st rt2800_rfcsr_write_bank(rt2x00dev, 0, 2, saverfb0r2); } @@ -385,7 +385,7 @@ static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev, bool set_bw, bool is_ht40) { -@@ -9294,6 +9672,7 @@ static void rt2800_init_rfcsr_6352(struc +@@ -9313,6 +9691,7 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rxdcoc_calibration(rt2x00dev); rt2800_bw_filter_calibration(rt2x00dev, true); rt2800_bw_filter_calibration(rt2x00dev, false); diff --git a/package/kernel/mac80211/patches/rt2x00/986-rt2x00-add-TX-LOFT-calibration.patch b/package/kernel/mac80211/patches/rt2x00/986-rt2x00-add-TX-LOFT-calibration.patch index fe0961baa7..6a685f80ab 100644 --- a/package/kernel/mac80211/patches/rt2x00/986-rt2x00-add-TX-LOFT-calibration.patch +++ b/package/kernel/mac80211/patches/rt2x00/986-rt2x00-add-TX-LOFT-calibration.patch @@ -1,6 +1,6 @@ --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -9060,6 +9060,943 @@ restore_value: +@@ -9079,6 +9079,943 @@ restore_value: rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, savemacsysctrl); } @@ -944,7 +944,7 @@ static void rt2800_bbp_core_soft_reset(struct rt2x00_dev *rt2x00dev, bool set_bw, bool is_ht40) { -@@ -9672,6 +10609,7 @@ static void rt2800_init_rfcsr_6352(struc +@@ -9691,6 +10628,7 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rxdcoc_calibration(rt2x00dev); rt2800_bw_filter_calibration(rt2x00dev, true); rt2800_bw_filter_calibration(rt2x00dev, false); diff --git a/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch b/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch index 3de00b2267..40b20ec594 100644 --- a/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch +++ b/package/kernel/mac80211/patches/rt2x00/991-rt2x00-mt7620-differentiate-based-on-SoC-CHIP_VER.patch @@ -14,7 +14,7 @@ */ --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -3685,14 +3685,16 @@ static void rt2800_config_channel_rf7620 +@@ -3698,14 +3698,16 @@ static void rt2800_config_channel_rf7620 rt2x00_set_field8(&rfcsr, RFCSR19_K, rf->rf4); rt2800_rfcsr_write(rt2x00dev, 19, rfcsr); @@ -39,7 +39,7 @@ rfcsr = rt2800_rfcsr_read(rt2x00dev, 1); rt2x00_set_field8(&rfcsr, RFCSR1_TX2_EN_MT7620, -@@ -3726,18 +3728,23 @@ static void rt2800_config_channel_rf7620 +@@ -3739,18 +3741,23 @@ static void rt2800_config_channel_rf7620 rt2800_rfcsr_write_dccal(rt2x00dev, 59, 0x20); } @@ -73,7 +73,7 @@ if (!test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags)) { if (conf_is_ht40(conf)) { -@@ -3837,25 +3844,29 @@ static void rt2800_config_alc(struct rt2 +@@ -3850,25 +3857,29 @@ static void rt2800_config_alc(struct rt2 if (i == 10000) rt2x00_warn(rt2x00dev, "Wait MAC Status to MAX !!!\n"); @@ -121,7 +121,7 @@ rt2800_register_write(rt2x00dev, MAC_SYS_CTRL, mac_sys_ctrl); rt2800_vco_calibration(rt2x00dev); -@@ -5887,18 +5898,33 @@ static int rt2800_init_registers(struct +@@ -5906,18 +5917,33 @@ static int rt2800_init_registers(struct } else if (rt2x00_rt(rt2x00dev, RT5350)) { rt2800_register_write(rt2x00dev, TX_SW_CFG0, 0x00000404); } else if (rt2x00_rt(rt2x00dev, RT6352)) { @@ -167,7 +167,7 @@ reg = rt2800_register_read(rt2x00dev, TX_ALC_CFG_1); rt2x00_set_field32(®, TX_ALC_CFG_1_ROS_BUSY_EN, 0); rt2800_register_write(rt2x00dev, TX_ALC_CFG_1, reg); -@@ -7042,14 +7068,16 @@ static void rt2800_init_bbp_6352(struct +@@ -7061,14 +7087,16 @@ static void rt2800_init_bbp_6352(struct rt2800_bbp_write(rt2x00dev, 188, 0x00); rt2800_bbp_write(rt2x00dev, 189, 0x00); @@ -192,7 +192,7 @@ /* BBP for G band GLRT function (BBP_128 ~ BBP_221) */ rt2800_bbp_glrt_write(rt2x00dev, 0, 0x00); -@@ -10388,31 +10416,36 @@ static void rt2800_init_rfcsr_6352(struc +@@ -10407,31 +10435,36 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rfcsr_write(rt2x00dev, 42, 0x5B); rt2800_rfcsr_write(rt2x00dev, 43, 0x00); @@ -254,7 +254,7 @@ /* Initialize RF channel register to default value */ rt2800_rfcsr_write_chanreg(rt2x00dev, 0, 0x03); -@@ -10478,63 +10511,71 @@ static void rt2800_init_rfcsr_6352(struc +@@ -10497,63 +10530,71 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rfcsr_write_bank(rt2x00dev, 6, 45, 0xC5); @@ -383,7 +383,7 @@ /* Initialize RF DC calibration register to default value */ rt2800_rfcsr_write_dccal(rt2x00dev, 0, 0x47); -@@ -10597,12 +10638,17 @@ static void rt2800_init_rfcsr_6352(struc +@@ -10616,12 +10657,17 @@ static void rt2800_init_rfcsr_6352(struc rt2800_rfcsr_write_dccal(rt2x00dev, 62, 0x00); rt2800_rfcsr_write_dccal(rt2x00dev, 63, 0x00); diff --git a/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch b/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch deleted file mode 100644 index 80e2a2f6ae..0000000000 --- a/package/kernel/mac80211/patches/rt2x00/992-rt2x00-save-survey-for-every-channel-visited.patch +++ /dev/null @@ -1,183 +0,0 @@ ---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c -@@ -1238,6 +1238,8 @@ void rt2800_watchdog(struct rt2x00_dev * - if (test_bit(DEVICE_STATE_SCANNING, &rt2x00dev->flags)) - return; - -+ rt2800_update_survey(rt2x00dev); -+ - queue_for_each(rt2x00dev, queue) { - switch (queue->qid) { - case QID_AC_VO: -@@ -1274,6 +1276,18 @@ void rt2800_watchdog(struct rt2x00_dev * - } - EXPORT_SYMBOL_GPL(rt2800_watchdog); - -+void rt2800_update_survey(struct rt2x00_dev *rt2x00dev) -+{ -+ struct ieee80211_channel *chan = rt2x00dev->hw->conf.chandef.chan; -+ struct rt2x00_chan_survey *chan_survey = -+ &rt2x00dev->chan_survey[chan->hw_value]; -+ -+ chan_survey->time_idle += rt2800_register_read(rt2x00dev, CH_IDLE_STA); -+ chan_survey->time_busy += rt2800_register_read(rt2x00dev, CH_BUSY_STA); -+ chan_survey->time_ext_busy += rt2800_register_read(rt2x00dev, CH_BUSY_STA_SEC); -+} -+EXPORT_SYMBOL_GPL(rt2800_update_survey); -+ - static unsigned int rt2800_hw_beacon_base(struct rt2x00_dev *rt2x00dev, - unsigned int index) - { -@@ -12199,26 +12213,30 @@ int rt2800_get_survey(struct ieee80211_h - { - struct rt2x00_dev *rt2x00dev = hw->priv; - struct ieee80211_conf *conf = &hw->conf; -- u32 idle, busy, busy_ext; -+ struct rt2x00_chan_survey *chan_survey = -+ &rt2x00dev->chan_survey[idx]; -+ enum nl80211_band band = NL80211_BAND_2GHZ; - -- if (idx != 0) -+ if (idx >= rt2x00dev->bands[band].n_channels) { -+ idx -= rt2x00dev->bands[band].n_channels; -+ band = NL80211_BAND_5GHZ; -+ } -+ -+ if (idx >= rt2x00dev->bands[band].n_channels) - return -ENOENT; - -- survey->channel = conf->chandef.chan; -+ if (idx == 0) -+ rt2800_update_survey(rt2x00dev); - -- idle = rt2800_register_read(rt2x00dev, CH_IDLE_STA); -- busy = rt2800_register_read(rt2x00dev, CH_BUSY_STA); -- busy_ext = rt2800_register_read(rt2x00dev, CH_BUSY_STA_SEC); -- -- if (idle || busy) { -- survey->filled = SURVEY_INFO_TIME | -- SURVEY_INFO_TIME_BUSY | -- SURVEY_INFO_TIME_EXT_BUSY; -- -- survey->time = (idle + busy) / 1000; -- survey->time_busy = busy / 1000; -- survey->time_ext_busy = busy_ext / 1000; -- } -+ survey->channel = &rt2x00dev->bands[band].channels[idx]; -+ -+ survey->filled = SURVEY_INFO_TIME | -+ SURVEY_INFO_TIME_BUSY | -+ SURVEY_INFO_TIME_EXT_BUSY; -+ -+ survey->time = div_u64(chan_survey->time_idle + chan_survey->time_busy, 1000); -+ survey->time_busy = div_u64(chan_survey->time_busy, 1000); -+ survey->time_ext_busy = div_u64(chan_survey->time_ext_busy, 1000); - - if (!(hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)) - survey->filled |= SURVEY_INFO_IN_USE; ---- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.h -+++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.h -@@ -243,6 +243,7 @@ bool rt2800_txstatus_timeout(struct rt2x - bool rt2800_txstatus_pending(struct rt2x00_dev *rt2x00dev); - - void rt2800_watchdog(struct rt2x00_dev *rt2x00dev); -+void rt2800_update_survey(struct rt2x00_dev *rt2x00dev); - - void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc); - void rt2800_clear_beacon(struct queue_entry *entry); ---- a/drivers/net/wireless/ralink/rt2x00/rt2800pci.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2800pci.c -@@ -360,6 +360,7 @@ static const struct rt2x00lib_ops rt2800 - .gain_calibration = rt2800_gain_calibration, - .vco_calibration = rt2800_vco_calibration, - .watchdog = rt2800_watchdog, -+ .update_survey = rt2800_update_survey, - .start_queue = rt2800mmio_start_queue, - .kick_queue = rt2800mmio_kick_queue, - .stop_queue = rt2800mmio_stop_queue, ---- a/drivers/net/wireless/ralink/rt2x00/rt2800soc.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2800soc.c -@@ -214,6 +214,7 @@ static const struct rt2x00lib_ops rt2800 - .gain_calibration = rt2800_gain_calibration, - .vco_calibration = rt2800_vco_calibration, - .watchdog = rt2800_watchdog, -+ .update_survey = rt2800_update_survey, - .start_queue = rt2800mmio_start_queue, - .kick_queue = rt2800mmio_kick_queue, - .stop_queue = rt2800mmio_stop_queue, ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00.h -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00.h -@@ -183,6 +183,15 @@ struct rf_channel { - }; - - /* -+ * Information structure for channel survey. -+ */ -+struct rt2x00_chan_survey { -+ u64 time_idle; -+ u64 time_busy; -+ u64 time_ext_busy; -+}; -+ -+/* - * Channel information structure - */ - struct channel_info { -@@ -567,6 +576,7 @@ struct rt2x00lib_ops { - * Data queue handlers. - */ - void (*watchdog) (struct rt2x00_dev *rt2x00dev); -+ void (*update_survey) (struct rt2x00_dev *rt2x00dev); - void (*start_queue) (struct data_queue *queue); - void (*kick_queue) (struct data_queue *queue); - void (*stop_queue) (struct data_queue *queue); -@@ -755,6 +765,7 @@ struct rt2x00_dev { - */ - struct ieee80211_hw *hw; - struct ieee80211_supported_band bands[NUM_NL80211_BANDS]; -+ struct rt2x00_chan_survey *chan_survey; - enum nl80211_band curr_band; - int curr_freq; - ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c -@@ -1054,6 +1054,12 @@ static int rt2x00lib_probe_hw_modes(stru - if (!rates) - goto exit_free_channels; - -+ rt2x00dev->chan_survey = -+ kcalloc(spec->num_channels, sizeof(struct rt2x00_chan_survey), -+ GFP_KERNEL); -+ if (!rt2x00dev->chan_survey) -+ goto exit_free_rates; -+ - /* - * Initialize Rate list. - */ -@@ -1105,6 +1111,8 @@ static int rt2x00lib_probe_hw_modes(stru - - return 0; - -+ exit_free_rates: -+ kfree(rates); - exit_free_channels: - kfree(channels); - rt2x00_err(rt2x00dev, "Allocation ieee80211 modes failed\n"); ---- a/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c -+++ b/drivers/net/wireless/ralink/rt2x00/rt2x00mac.c -@@ -317,6 +317,15 @@ int rt2x00mac_config(struct ieee80211_hw - return 0; - - /* -+ * To provide correct survey data for survey-based ACS algorithm -+ * we have to save survey data for current channel before switching. -+ */ -+ if (rt2x00dev->ops->lib->update_survey && -+ (changed & IEEE80211_CONF_CHANGE_CHANNEL)) { -+ rt2x00dev->ops->lib->update_survey(rt2x00dev); -+ } -+ -+ /* - * Some configuration parameters (e.g. channel and antenna values) can - * only be set when the radio is enabled, but do require the RX to - * be off. During this period we should keep link tuning enabled, -- cgit v1.2.3