From: RISCi_ATOM Date: Tue, 28 Jan 2020 05:33:55 +0000 (-0500) Subject: mac80211: Update to version 4.19.98 X-Git-Tag: v1.5.1~36 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fae41b2ed34efb39592d53bc7b5d7841eb74d1bf;p=librecmc%2Flibrecmc.git mac80211: Update to version 4.19.98 The removed patches are all integrated in the upstream version now. Signed-off-by: Hauke Mehrtens Cherry-Picked from upstream : f84981f6f8a404f6d0261b8250bc3875d6518ad0 --- diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile index da7b62a7a2..841abf38f0 100644 --- a/package/kernel/mac80211/Makefile +++ b/package/kernel/mac80211/Makefile @@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=mac80211 -PKG_VERSION:=4.19.85-1 +PKG_VERSION:=4.19.98-1 PKG_RELEASE:=1 -PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.85/ -PKG_HASH:=6a92df43e8c3e2410638d84dfd18773d667757532dd0a911227c9b7d65aee34d +PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v4.19.98/ +PKG_HASH:=256d77e9cd3918d6a361e029850aba4568e8a00167ab3ed55495a359511c5bd2 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION) @@ -25,7 +25,7 @@ PKG_DRIVERS = \ adm8211 \ lib80211 \ mac80211-hwsim - + PKG_CONFIG_DEPENDS:= \ CONFIG_PACKAGE_kmod-mac80211 \ diff --git a/package/kernel/mac80211/patches/rt2x00/020-cfg80211-add-ratelimited-variants-of-err-and-warn.patch b/package/kernel/mac80211/patches/rt2x00/020-cfg80211-add-ratelimited-variants-of-err-and-warn.patch index d06f502f5e..8411f00cca 100644 --- a/package/kernel/mac80211/patches/rt2x00/020-cfg80211-add-ratelimited-variants-of-err-and-warn.patch +++ b/package/kernel/mac80211/patches/rt2x00/020-cfg80211-add-ratelimited-variants-of-err-and-warn.patch @@ -25,7 +25,7 @@ Signed-off-by: Stanislaw Gruszka --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -6612,6 +6612,11 @@ bool cfg80211_iftype_allowed(struct wiph +@@ -6627,6 +6627,11 @@ bool cfg80211_iftype_allowed(struct wiph #define wiphy_info(wiphy, format, args...) \ dev_info(&(wiphy)->dev, format, ##args) 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 697d8188f0..0cd6f17828 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 -@@ -305,6 +305,7 @@ RT2X00_LIB_FIRMWARE= +@@ -303,6 +303,7 @@ RT2X00_LIB_FIRMWARE= RT2X00_LIB_CRYPTO= RT2X00_LIB_LEDS= RT2X00_LIB_DEBUGFS= diff --git a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch index d7b322e0aa..6775884a34 100644 --- a/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch +++ b/package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch @@ -1,4 +1,4 @@ -Used for AP+STA support in libreCMC - preserve AP mode keys across STA reconnects +Used for AP+STA support in OpenWrt - preserve AP mode keys across STA reconnects --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c diff --git a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch index ca5fb40483..214ec05539 100644 --- a/package/kernel/mac80211/patches/subsys/210-ap_scan.patch +++ b/package/kernel/mac80211/patches/subsys/210-ap_scan.patch @@ -1,6 +1,6 @@ --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2238,7 +2238,7 @@ static int ieee80211_scan(struct wiphy * +@@ -2188,7 +2188,7 @@ static int ieee80211_scan(struct wiphy * * the frames sent while scanning on other channel will be * lost) */ diff --git a/package/kernel/mac80211/patches/subsys/303-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch b/package/kernel/mac80211/patches/subsys/303-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch index 661fb46ea4..5cce4936e1 100644 --- a/package/kernel/mac80211/patches/subsys/303-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch +++ b/package/kernel/mac80211/patches/subsys/303-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch @@ -20,16 +20,15 @@ Signed-off-by: Chaitanya TK #define IEEE80211_VHT_CAP_BEAMFORMEE_STS_SHIFT 13 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -1130,7 +1130,7 @@ minstrel_ht_update_caps(void *priv, stru +@@ -1136,13 +1136,14 @@ minstrel_ht_update_caps(void *priv, stru struct minstrel_ht_sta_priv *msp = priv_sta; struct minstrel_ht_sta *mi = &msp->ht; struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; - u16 sta_cap = sta->ht_cap.cap; + u16 ht_cap = sta->ht_cap.cap; struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; - struct sta_info *sinfo = container_of(sta, struct sta_info, sta); int use_vht; -@@ -1138,6 +1138,7 @@ minstrel_ht_update_caps(void *priv, stru + int n_supported = 0; int ack_dur; int stbc; int i; @@ -37,7 +36,7 @@ Signed-off-by: Chaitanya TK /* fall back to the old minstrel for legacy stations */ if (!sta->ht_cap.ht_supported) -@@ -1175,16 +1176,24 @@ minstrel_ht_update_caps(void *priv, stru +@@ -1180,16 +1181,24 @@ minstrel_ht_update_caps(void *priv, stru } mi->sample_tries = 4; @@ -67,7 +66,7 @@ Signed-off-by: Chaitanya TK for (i = 0; i < ARRAY_SIZE(mi->groups); i++) { u32 gflags = minstrel_mcs_groups[i].flags; int bw, nss; -@@ -1197,10 +1206,10 @@ minstrel_ht_update_caps(void *priv, stru +@@ -1202,10 +1211,10 @@ minstrel_ht_update_caps(void *priv, stru if (gflags & IEEE80211_TX_RC_SHORT_GI) { if (gflags & IEEE80211_TX_RC_40_MHZ_WIDTH) { diff --git a/package/kernel/mac80211/patches/subsys/304-mac80211-minstrel-remove-unnecessary-debugfs-cleanup.patch b/package/kernel/mac80211/patches/subsys/304-mac80211-minstrel-remove-unnecessary-debugfs-cleanup.patch index 95d4f294aa..855babeccb 100644 --- a/package/kernel/mac80211/patches/subsys/304-mac80211-minstrel-remove-unnecessary-debugfs-cleanup.patch +++ b/package/kernel/mac80211/patches/subsys/304-mac80211-minstrel-remove-unnecessary-debugfs-cleanup.patch @@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau } --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -1393,7 +1393,6 @@ static const struct rate_control_ops mac +@@ -1397,7 +1397,6 @@ static const struct rate_control_ops mac .free = minstrel_ht_free, #ifdef CPTCFG_MAC80211_DEBUGFS .add_sta_debugfs = minstrel_ht_add_sta_debugfs, diff --git a/package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch b/package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch index 9a233753ad..fca3189e6d 100644 --- a/package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch +++ b/package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch @@ -388,7 +388,7 @@ Signed-off-by: Felix Fietkau }; static u8 sample_table[SAMPLE_COLUMNS][MCS_GROUP_RATES] __read_mostly; -@@ -1146,12 +1142,10 @@ minstrel_ht_update_caps(void *priv, stru +@@ -1151,12 +1147,10 @@ minstrel_ht_update_caps(void *priv, stru BUILD_BUG_ON(ARRAY_SIZE(minstrel_mcs_groups) != MINSTREL_GROUPS_NB); @@ -402,7 +402,7 @@ Signed-off-by: Felix Fietkau msp->is_ht = true; memset(mi, 0, sizeof(*mi)); -@@ -1226,10 +1220,9 @@ minstrel_ht_update_caps(void *priv, stru +@@ -1231,10 +1225,9 @@ minstrel_ht_update_caps(void *priv, stru /* HT rate */ if (gflags & IEEE80211_TX_RC_MCS) { @@ -414,7 +414,7 @@ Signed-off-by: Felix Fietkau mi->supported[i] = mcs->rx_mask[nss - 1]; if (mi->supported[i]) n_supported++; -@@ -1349,16 +1342,88 @@ minstrel_ht_free_sta(void *priv, struct +@@ -1353,16 +1346,88 @@ minstrel_ht_free_sta(void *priv, struct kfree(msp); } @@ -505,7 +505,7 @@ Signed-off-by: Felix Fietkau } static u32 minstrel_ht_get_expected_throughput(void *priv_sta) -@@ -1417,14 +1482,14 @@ static void __init init_sample_table(voi +@@ -1421,14 +1486,14 @@ static void __init init_sample_table(voi } int __init diff --git a/package/kernel/mac80211/patches/subsys/306-mac80211-minstrel-reduce-minstrel_mcs_groups-size.patch b/package/kernel/mac80211/patches/subsys/306-mac80211-minstrel-reduce-minstrel_mcs_groups-size.patch index 02a0ca0a52..019fb77d18 100644 --- a/package/kernel/mac80211/patches/subsys/306-mac80211-minstrel-reduce-minstrel_mcs_groups-size.patch +++ b/package/kernel/mac80211/patches/subsys/306-mac80211-minstrel-reduce-minstrel_mcs_groups-size.patch @@ -118,7 +118,7 @@ Signed-off-by: Felix Fietkau -#define CCK_GROUP \ +#define CCK_GROUP(_s) \ [MINSTREL_CCK_GROUP] = { \ - .streams = 0, \ + .streams = 1, \ .flags = 0, \ + .shift = _s, \ .duration = { \ @@ -218,7 +218,7 @@ Signed-off-by: Felix Fietkau }; static u8 sample_table[SAMPLE_COLUMNS][MCS_GROUP_RATES] __read_mostly; -@@ -307,7 +310,8 @@ minstrel_ht_get_tp_avg(struct minstrel_h +@@ -308,7 +311,8 @@ minstrel_ht_get_tp_avg(struct minstrel_h if (group != MINSTREL_CCK_GROUP) nsecs = 1000 * mi->overhead / MINSTREL_TRUNC(mi->avg_ampdu_len); @@ -228,7 +228,7 @@ Signed-off-by: Felix Fietkau /* * For the throughput calculation, limit the probability value to 90% to -@@ -755,12 +759,19 @@ minstrel_ht_tx_status(void *priv, struct +@@ -756,12 +760,19 @@ minstrel_ht_tx_status(void *priv, struct minstrel_ht_update_rates(mp, mi); } @@ -249,7 +249,7 @@ Signed-off-by: Felix Fietkau unsigned int tx_time, tx_time_rtscts, tx_time_data; unsigned int cw = mp->cw_min; unsigned int ctime = 0; -@@ -779,8 +790,7 @@ minstrel_calc_retransmit(struct minstrel +@@ -780,8 +791,7 @@ minstrel_calc_retransmit(struct minstrel mrs->retry_count_rtscts = 2; mrs->retry_updated = true; @@ -259,7 +259,7 @@ Signed-off-by: Felix Fietkau /* Contention time for first 2 tries */ ctime = (t_slot * cw) >> 1; -@@ -874,20 +884,24 @@ minstrel_ht_get_max_amsdu_len(struct min +@@ -875,20 +885,24 @@ minstrel_ht_get_max_amsdu_len(struct min int group = mi->max_prob_rate / MCS_GROUP_RATES; const struct mcs_group *g = &minstrel_mcs_groups[group]; int rate = mi->max_prob_rate % MCS_GROUP_RATES; @@ -286,7 +286,7 @@ Signed-off-by: Felix Fietkau return 1600; /* -@@ -895,7 +909,7 @@ minstrel_ht_get_max_amsdu_len(struct min +@@ -896,7 +910,7 @@ minstrel_ht_get_max_amsdu_len(struct min * rate success probability is less than 75%, limit A-MSDU to twice the usual * data packet size */ @@ -295,7 +295,7 @@ Signed-off-by: Felix Fietkau (minstrel_ht_get_prob_ewma(mi, mi->max_tp_rate[0]) < MINSTREL_FRAC(75, 100))) return 3200; -@@ -942,13 +956,6 @@ minstrel_ht_update_rates(struct minstrel +@@ -943,13 +957,6 @@ minstrel_ht_update_rates(struct minstrel rate_control_set_rates(mp->hw, mi->sta, rates); } diff --git a/package/kernel/mac80211/patches/subsys/307-mac80211-minstrel-fix-using-short-preamble-CCK-rates.patch b/package/kernel/mac80211/patches/subsys/307-mac80211-minstrel-fix-using-short-preamble-CCK-rates.patch deleted file mode 100644 index 502d8c7768..0000000000 --- a/package/kernel/mac80211/patches/subsys/307-mac80211-minstrel-fix-using-short-preamble-CCK-rates.patch +++ /dev/null @@ -1,31 +0,0 @@ -From: Felix Fietkau -Date: Sat, 10 Feb 2018 13:43:07 +0100 -Subject: [PATCH] mac80211: minstrel: fix using short preamble CCK rates on - HT clients - -mi->supported[MINSTREL_CCK_GROUP] needs to be updated - -Fixes: 782dda00ab8e ("mac80211: minstrel_ht: move short preamble check out of get_rate") -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel_ht.c -+++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -1135,7 +1135,6 @@ minstrel_ht_update_caps(void *priv, stru - struct ieee80211_mcs_info *mcs = &sta->ht_cap.mcs; - u16 ht_cap = sta->ht_cap.cap; - struct ieee80211_sta_vht_cap *vht_cap = &sta->vht_cap; -- struct sta_info *sinfo = container_of(sta, struct sta_info, sta); - int use_vht; - int n_supported = 0; - int ack_dur; -@@ -1267,8 +1266,7 @@ minstrel_ht_update_caps(void *priv, stru - if (!n_supported) - goto use_legacy; - -- if (test_sta_flag(sinfo, WLAN_STA_SHORT_PREAMBLE)) -- mi->cck_supported_short |= mi->cck_supported_short << 4; -+ mi->supported[MINSTREL_CCK_GROUP] |= mi->cck_supported_short << 4; - - /* create an initial rate table with the lowest supported rates */ - minstrel_ht_update_stats(mp, mi); diff --git a/package/kernel/mac80211/patches/subsys/308-mac80211-minstrel-fix-CCK-rate-group-streams-value.patch b/package/kernel/mac80211/patches/subsys/308-mac80211-minstrel-fix-CCK-rate-group-streams-value.patch deleted file mode 100644 index f0ffcd9655..0000000000 --- a/package/kernel/mac80211/patches/subsys/308-mac80211-minstrel-fix-CCK-rate-group-streams-value.patch +++ /dev/null @@ -1,20 +0,0 @@ -From: Felix Fietkau -Date: Thu, 1 Mar 2018 13:27:54 +0100 -Subject: [PATCH] mac80211: minstrel: fix CCK rate group streams value - -Fixes a harmless underflow issue when CCK rates are actively being used - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel_ht.c -+++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -131,7 +131,7 @@ - - #define CCK_GROUP(_s) \ - [MINSTREL_CCK_GROUP] = { \ -- .streams = 0, \ -+ .streams = 1, \ - .flags = 0, \ - .shift = _s, \ - .duration = { \ diff --git a/package/kernel/mac80211/patches/subsys/309-mac80211-minstrel-fix-sampling-reporting-of-CCK-rate.patch b/package/kernel/mac80211/patches/subsys/309-mac80211-minstrel-fix-sampling-reporting-of-CCK-rate.patch deleted file mode 100644 index e0049c36eb..0000000000 --- a/package/kernel/mac80211/patches/subsys/309-mac80211-minstrel-fix-sampling-reporting-of-CCK-rate.patch +++ /dev/null @@ -1,58 +0,0 @@ -From: Felix Fietkau -Date: Thu, 1 Mar 2018 13:28:48 +0100 -Subject: [PATCH] mac80211: minstrel: fix sampling/reporting of CCK rates - in HT mode - -Long/short preamble selection cannot be sampled separately, since it -depends on the BSS state. Because of that, sampling attempts to -currently not used preamble modes are not counted in the statistics, -which leads to CCK rates being sampled too often. - -Fix statistics accounting for long/short preamble by increasing the -index where necessary. -Fix excessive CCK rate sampling by dropping unsupported sample attempts. - -This improves throughput on 2.4 GHz channels - -Signed-off-by: Felix Fietkau ---- - ---- a/net/mac80211/rc80211_minstrel_ht.c -+++ b/net/mac80211/rc80211_minstrel_ht.c -@@ -281,7 +281,8 @@ minstrel_ht_get_stats(struct minstrel_pr - break; - - /* short preamble */ -- if (!(mi->supported[group] & BIT(idx))) -+ if ((mi->supported[group] & BIT(idx + 4)) && -+ (rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)) - idx += 4; - } - return &mi->groups[group].rates[idx]; -@@ -1080,18 +1081,23 @@ minstrel_ht_get_rate(void *priv, struct - return; - - sample_group = &minstrel_mcs_groups[sample_idx / MCS_GROUP_RATES]; -+ sample_idx %= MCS_GROUP_RATES; -+ -+ if (sample_group == &minstrel_mcs_groups[MINSTREL_CCK_GROUP] && -+ (sample_idx >= 4) != txrc->short_preamble) -+ return; -+ - info->flags |= IEEE80211_TX_CTL_RATE_CTRL_PROBE; - rate->count = 1; - -- if (sample_idx / MCS_GROUP_RATES == MINSTREL_CCK_GROUP) { -+ if (sample_group == &minstrel_mcs_groups[MINSTREL_CCK_GROUP]) { - int idx = sample_idx % ARRAY_SIZE(mp->cck_rates); - rate->idx = mp->cck_rates[idx]; - } else if (sample_group->flags & IEEE80211_TX_RC_VHT_MCS) { - ieee80211_rate_set_vht(rate, sample_idx % MCS_GROUP_RATES, - sample_group->streams); - } else { -- rate->idx = sample_idx % MCS_GROUP_RATES + -- (sample_group->streams - 1) * 8; -+ rate->idx = sample_idx + (sample_group->streams - 1) * 8; - } - - rate->flags = sample_group->flags; diff --git a/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch b/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch index c8decd2f08..955ae2a337 100644 --- a/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch +++ b/package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch @@ -125,7 +125,7 @@ Signed-off-by: Johannes Berg * The values are not guaranteed to be coherent with regard to each other, i.e. --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -1434,6 +1434,9 @@ static int sta_apply_parameters(struct i +@@ -1390,6 +1390,9 @@ static int sta_apply_parameters(struct i if (ieee80211_vif_is_mesh(&sdata->vif)) sta_apply_mesh_params(local, sta, params); @@ -330,7 +330,7 @@ Signed-off-by: Johannes Berg int sta_info_move_state(struct sta_info *sta, enum ieee80211_sta_state new_state) { -@@ -2183,6 +2204,23 @@ void sta_set_sinfo(struct sta_info *sta, +@@ -2187,6 +2208,23 @@ void sta_set_sinfo(struct sta_info *sta, sinfo->filled |= BIT_ULL(NL80211_STA_INFO_TX_FAILED); } diff --git a/package/kernel/mac80211/patches/subsys/368-cfg80211-add-local-BSS-receive-time-to-survey-inform.patch b/package/kernel/mac80211/patches/subsys/368-cfg80211-add-local-BSS-receive-time-to-survey-inform.patch new file mode 100644 index 0000000000..e6d384784e --- /dev/null +++ b/package/kernel/mac80211/patches/subsys/368-cfg80211-add-local-BSS-receive-time-to-survey-inform.patch @@ -0,0 +1,77 @@ +From: Felix Fietkau +Date: Wed, 28 Aug 2019 12:13:55 +0200 +Subject: [PATCH] cfg80211: add local BSS receive time to survey information + +This is useful for checking how much airtime is being used up by other +transmissions on the channel, e.g. by calculating (time_rx - time_bss_rx) +or (time_busy - time_bss_rx - time_tx) + +Signed-off-by: Felix Fietkau +--- + +--- a/include/net/cfg80211.h ++++ b/include/net/cfg80211.h +@@ -668,6 +668,7 @@ ieee80211_chandef_max_power(struct cfg80 + * @SURVEY_INFO_TIME_RX: receive time was filled in + * @SURVEY_INFO_TIME_TX: transmit time was filled in + * @SURVEY_INFO_TIME_SCAN: scan time was filled in ++ * @SURVEY_INFO_TIME_BSS_RX: local BSS receive time was filled in + * + * Used by the driver to indicate which info in &struct survey_info + * it has filled in during the get_survey(). +@@ -681,6 +682,7 @@ enum survey_info_flags { + SURVEY_INFO_TIME_RX = BIT(5), + SURVEY_INFO_TIME_TX = BIT(6), + SURVEY_INFO_TIME_SCAN = BIT(7), ++ SURVEY_INFO_TIME_BSS_RX = BIT(8), + }; + + /** +@@ -697,6 +699,7 @@ enum survey_info_flags { + * @time_rx: amount of time the radio spent receiving data + * @time_tx: amount of time the radio spent transmitting data + * @time_scan: amount of time the radio spent for scanning ++ * @time_bss_rx: amount of time the radio spent receiving data on a local BSS + * + * Used by dump_survey() to report back per-channel survey information. + * +@@ -711,6 +714,7 @@ struct survey_info { + u64 time_rx; + u64 time_tx; + u64 time_scan; ++ u64 time_bss_rx; + u32 filled; + s8 noise; + }; +--- a/include/uapi/linux/nl80211.h ++++ b/include/uapi/linux/nl80211.h +@@ -3693,6 +3693,8 @@ enum nl80211_user_reg_hint_type { + * @NL80211_SURVEY_INFO_TIME_SCAN: time the radio spent for scan + * (on this channel or globally) + * @NL80211_SURVEY_INFO_PAD: attribute used for padding for 64-bit alignment ++ * @NL80211_SURVEY_INFO_TIME_BSS_RX: amount of time the radio spent ++ * receiving local BSS data + * @NL80211_SURVEY_INFO_MAX: highest survey info attribute number + * currently defined + * @__NL80211_SURVEY_INFO_AFTER_LAST: internal use +@@ -3709,6 +3711,7 @@ enum nl80211_survey_info { + NL80211_SURVEY_INFO_TIME_TX, + NL80211_SURVEY_INFO_TIME_SCAN, + NL80211_SURVEY_INFO_PAD, ++ NL80211_SURVEY_INFO_TIME_BSS_RX, + + /* keep last */ + __NL80211_SURVEY_INFO_AFTER_LAST, +--- a/net/wireless/nl80211.c ++++ b/net/wireless/nl80211.c +@@ -8367,6 +8367,10 @@ static int nl80211_send_survey(struct sk + nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_SCAN, + survey->time_scan, NL80211_SURVEY_INFO_PAD)) + goto nla_put_failure; ++ if ((survey->filled & SURVEY_INFO_TIME_BSS_RX) && ++ nla_put_u64_64bit(msg, NL80211_SURVEY_INFO_TIME_BSS_RX, ++ survey->time_bss_rx, NL80211_SURVEY_INFO_PAD)) ++ goto nla_put_failure; + + nla_nest_end(msg, infoattr); + diff --git a/package/kernel/mac80211/patches/subsys/369-cfg80211-fix-memory-leak-in-cfg80211_cqm_rssi_update.patch b/package/kernel/mac80211/patches/subsys/369-cfg80211-fix-memory-leak-in-cfg80211_cqm_rssi_update.patch deleted file mode 100644 index d205140783..0000000000 --- a/package/kernel/mac80211/patches/subsys/369-cfg80211-fix-memory-leak-in-cfg80211_cqm_rssi_update.patch +++ /dev/null @@ -1,21 +0,0 @@ -From: Felix Fietkau -Date: Wed, 8 Jan 2020 18:03:04 +0100 -Subject: [PATCH] cfg80211: fix memory leak in cfg80211_cqm_rssi_update - -The per-tid statistics need to be released after the call to rdev_get_station - -Cc: stable@vger.kernel.org -Fixes: 8689c051a201 ("cfg80211: dynamically allocate per-tid stats for station info") -Signed-off-by: Felix Fietkau ---- - ---- a/net/wireless/nl80211.c -+++ b/net/wireless/nl80211.c -@@ -10346,6 +10346,7 @@ static int cfg80211_cqm_rssi_update(stru - if (err) - return err; - -+ cfg80211_sinfo_release_content(&sinfo); - if (sinfo.filled & BIT_ULL(NL80211_STA_INFO_BEACON_SIGNAL_AVG)) - wdev->cqm_config->last_rssi_event_value = - (s8) sinfo.rx_beacon_signal_avg; diff --git a/package/kernel/mac80211/patches/subsys/370-cfg80211-fix-page-refcount-issue-in-A-MSDU-decap.patch b/package/kernel/mac80211/patches/subsys/370-cfg80211-fix-page-refcount-issue-in-A-MSDU-decap.patch deleted file mode 100644 index 9dba58023d..0000000000 --- a/package/kernel/mac80211/patches/subsys/370-cfg80211-fix-page-refcount-issue-in-A-MSDU-decap.patch +++ /dev/null @@ -1,25 +0,0 @@ -From: Felix Fietkau -Date: Mon, 13 Jan 2020 18:34:31 +0100 -Subject: [PATCH] cfg80211: fix page refcount issue in A-MSDU decap - -The fragments attached to a skb can be part of a compound page. In that case, -page_ref_inc will increment the refcount for the wrong page. Fix this by -using get_page instead, which calls page_ref_inc on the compound head and -also checks for overflow. - -Fixes: 2b67f944f88c ("cfg80211: reuse existing page fragments in A-MSDU rx") -Cc: stable@vger.kernel.org -Signed-off-by: Felix Fietkau ---- - ---- a/net/wireless/util.c -+++ b/net/wireless/util.c -@@ -537,7 +537,7 @@ __frame_add_frag(struct sk_buff *skb, st - struct skb_shared_info *sh = skb_shinfo(skb); - int page_offset; - -- page_ref_inc(page); -+ get_page(page); - page_offset = ptr - page_address(page); - skb_add_rx_frag(skb, sh->nr_frags, page, page_offset, len, size); - } diff --git a/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch index 4c4eb7917e..cf4fdc13e9 100644 --- a/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch +++ b/package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch @@ -1,6 +1,6 @@ --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h -@@ -2968,6 +2968,7 @@ struct cfg80211_external_auth_params { +@@ -2972,6 +2972,7 @@ struct cfg80211_external_auth_params { * (as advertised by the nl80211 feature flag.) * @get_tx_power: store the current TX power into the dbm variable; * return 0 if successful @@ -8,7 +8,7 @@ * * @set_wds_peer: set the WDS peer for a WDS interface * -@@ -3268,6 +3269,7 @@ struct cfg80211_ops { +@@ -3272,6 +3273,7 @@ struct cfg80211_ops { enum nl80211_tx_power_setting type, int mbm); int (*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev, int *dbm); @@ -57,7 +57,7 @@ __NL80211_ATTR_AFTER_LAST, --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c -@@ -2506,6 +2506,19 @@ static int ieee80211_get_tx_power(struct +@@ -2456,6 +2456,19 @@ static int ieee80211_get_tx_power(struct return 0; } @@ -77,7 +77,7 @@ static int ieee80211_set_wds_peer(struct wiphy *wiphy, struct net_device *dev, const u8 *addr) { -@@ -3873,6 +3886,7 @@ const struct cfg80211_ops mac80211_confi +@@ -3823,6 +3836,7 @@ const struct cfg80211_ops mac80211_confi .set_wiphy_params = ieee80211_set_wiphy_params, .set_tx_power = ieee80211_set_tx_power, .get_tx_power = ieee80211_get_tx_power,