Browse Source

Merge branch 'v1.5' into LTS with v1.5.0a changes.

RISCi_ATOM 4 years ago
parent
commit
4205f8e099
45 changed files with 899 additions and 244 deletions
  1. 2 2
      include/kernel-version.mk
  2. 4 4
      package/kernel/mac80211/Makefile
  3. 1 1
      package/kernel/mac80211/patches/rt2x00/020-cfg80211-add-ratelimited-variants-of-err-and-warn.patch
  4. 1 1
      package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch
  5. 1 1
      package/kernel/mac80211/patches/subsys/110-mac80211_keep_keys_on_stop_ap.patch
  6. 1 1
      package/kernel/mac80211/patches/subsys/210-ap_scan.patch
  7. 4 5
      package/kernel/mac80211/patches/subsys/303-mac80211-minstrel-Enable-STBC-and-LDPC-for-VHT-Rates.patch
  8. 1 1
      package/kernel/mac80211/patches/subsys/304-mac80211-minstrel-remove-unnecessary-debugfs-cleanup.patch
  9. 4 4
      package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch
  10. 7 7
      package/kernel/mac80211/patches/subsys/306-mac80211-minstrel-reduce-minstrel_mcs_groups-size.patch
  11. 0 31
      package/kernel/mac80211/patches/subsys/307-mac80211-minstrel-fix-using-short-preamble-CCK-rates.patch
  12. 0 20
      package/kernel/mac80211/patches/subsys/308-mac80211-minstrel-fix-CCK-rate-group-streams-value.patch
  13. 0 58
      package/kernel/mac80211/patches/subsys/309-mac80211-minstrel-fix-sampling-reporting-of-CCK-rate.patch
  14. 2 2
      package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch
  15. 77 0
      package/kernel/mac80211/patches/subsys/368-cfg80211-add-local-BSS-receive-time-to-survey-inform.patch
  16. 0 21
      package/kernel/mac80211/patches/subsys/369-cfg80211-fix-memory-leak-in-cfg80211_cqm_rssi_update.patch
  17. 0 25
      package/kernel/mac80211/patches/subsys/370-cfg80211-fix-page-refcount-issue-in-A-MSDU-decap.patch
  18. 4 4
      package/kernel/mac80211/patches/subsys/522-mac80211_configure_antenna_gain.patch
  19. 3 3
      package/libs/libubox/Makefile
  20. 2 2
      package/libs/mbedtls/Makefile
  21. 22 22
      package/libs/mbedtls/patches/200-config.patch
  22. 47 0
      package/network/config/sqm-scripts-extra/Makefile
  23. 102 0
      package/network/config/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos
  24. 12 0
      package/network/config/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos.help
  25. 102 0
      package/network/config/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos
  26. 12 0
      package/network/config/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos.help
  27. 89 0
      package/network/config/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos
  28. 10 0
      package/network/config/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos.help
  29. 89 0
      package/network/config/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos
  30. 10 0
      package/network/config/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos.help
  31. 82 0
      package/network/config/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos
  32. 3 0
      package/network/config/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos.help
  33. 88 0
      package/network/config/sqm-scripts/Makefile
  34. 41 0
      package/network/services/hostapd/patches/070-driver_nl80211-fix-WMM-queue-mapping-for-regulatory-.patch
  35. 47 0
      package/network/services/hostapd/patches/071-driver_nl80211-fix-regulatory-limits-for-wmm-cwmin-c.patch
  36. 3 3
      package/network/services/tor/Makefile
  37. 3 3
      package/system/fstools/Makefile
  38. 3 3
      package/system/opkg/Makefile
  39. 4 4
      package/system/procd/Makefile
  40. 4 4
      package/system/urngd/Makefile
  41. 1 1
      target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch
  42. 1 1
      target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch
  43. 1 1
      target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch
  44. 8 8
      target/linux/generic/pending-4.14/630-packet_socket_type.patch
  45. 1 1
      target/linux/generic/pending-4.14/703-phy-add-detach-callback-to-struct-phy_driver.patch

+ 2 - 2
include/kernel-version.mk

@@ -6,9 +6,9 @@ ifdef CONFIG_TESTING_KERNEL
   KERNEL_PATCHVER:=$(KERNEL_TESTING_PATCHVER)
 endif
 
-LINUX_VERSION-4.14 = .165
+LINUX_VERSION-4.14 = .168
 
-LINUX_KERNEL_HASH-4.14.165 = ca362003caa7f865abca5162f01b58a564ff8a107f6c5f61c5e181e9a4b62817
+LINUX_KERNEL_HASH-4.14.168 = eb09704731aea2111fc738585691f42295a35f107bd5bc9bb46d35f317a98261
 
 remove_uri_prefix=$(subst git://,,$(subst http://,,$(subst https://,,$(1))))
 sanitize_uri=$(call qstrip,$(subst @,_,$(subst :,_,$(subst .,_,$(subst -,_,$(subst /,_,$(1)))))))

+ 4 - 4
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 \

+ 1 - 1
package/kernel/mac80211/patches/rt2x00/020-cfg80211-add-ratelimited-variants-of-err-and-warn.patch

@@ -25,7 +25,7 @@ Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
 
 --- 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)
  

+ 1 - 1
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=

+ 1 - 1
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

+ 1 - 1
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)
  		 */

+ 4 - 5
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 <chaitanya.mgit@gmail.com>
  #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 <chaitanya.mgit@gmail.com>
  
  	/* 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 <chaitanya.mgit@gmail.com>
  	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) {

+ 1 - 1
package/kernel/mac80211/patches/subsys/304-mac80211-minstrel-remove-unnecessary-debugfs-cleanup.patch

@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  }
 --- 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,

+ 4 - 4
package/kernel/mac80211/patches/subsys/305-mac80211-minstrel-merge-with-minstrel_ht-always-enab.patch

@@ -388,7 +388,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  };
  
  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 <nbd@nbd.name>
  
  	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 <nbd@nbd.name>
  			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 <nbd@nbd.name>
  }
  
  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

+ 7 - 7
package/kernel/mac80211/patches/subsys/306-mac80211-minstrel-reduce-minstrel_mcs_groups-size.patch

@@ -118,7 +118,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 -#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 <nbd@nbd.name>
  };
  
  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 <nbd@nbd.name>
  
  	/*
  	 * 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 <nbd@nbd.name>
  	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 <nbd@nbd.name>
  
  	/* 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 <nbd@nbd.name>
  		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 <nbd@nbd.name>
  	    (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);
  }
  

+ 0 - 31
package/kernel/mac80211/patches/subsys/307-mac80211-minstrel-fix-using-short-preamble-CCK-rates.patch

@@ -1,31 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-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 <nbd@nbd.name>
----
-
---- 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);

+ 0 - 20
package/kernel/mac80211/patches/subsys/308-mac80211-minstrel-fix-CCK-rate-group-streams-value.patch

@@ -1,20 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-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 <nbd@nbd.name>
----
-
---- 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 = {				\

+ 0 - 58
package/kernel/mac80211/patches/subsys/309-mac80211-minstrel-fix-sampling-reporting-of-CCK-rate.patch

@@ -1,58 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-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 <nbd@nbd.name>
----
-
---- 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;

+ 2 - 2
package/kernel/mac80211/patches/subsys/322-mac80211-Add-airtime-accounting-and-scheduling-to-TX.patch

@@ -125,7 +125,7 @@ Signed-off-by: Johannes Berg <johannes.berg@intel.com>
   * 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 <johannes.berg@intel.com>
  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);
  	}
  

+ 77 - 0
package/kernel/mac80211/patches/subsys/368-cfg80211-add-local-BSS-receive-time-to-survey-inform.patch

@@ -0,0 +1,77 @@
+From: Felix Fietkau <nbd@nbd.name>
+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 <nbd@nbd.name>
+---
+
+--- 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);
+ 

+ 0 - 21
package/kernel/mac80211/patches/subsys/369-cfg80211-fix-memory-leak-in-cfg80211_cqm_rssi_update.patch

@@ -1,21 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-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 <nbd@nbd.name>
----
-
---- 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;

+ 0 - 25
package/kernel/mac80211/patches/subsys/370-cfg80211-fix-page-refcount-issue-in-A-MSDU-decap.patch

@@ -1,25 +0,0 @@
-From: Felix Fietkau <nbd@nbd.name>
-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 <nbd@nbd.name>
----
-
---- 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);
- }

+ 4 - 4
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,

+ 3 - 3
package/libs/libubox/Makefile

@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/libubox.git
-PKG_MIRROR_HASH:=90511058f49a178a816d520944cddba421f9eb50c319ef1623bed7aa22f94a3a
-PKG_SOURCE_DATE:=2019-12-28
-PKG_SOURCE_VERSION:=cd75136b1342e1e9dabf921be13240c6653640ed
+PKG_MIRROR_HASH:=c53aae4b8d5ec15625a4cbf7f37e6b62a6cb258ef0310c0f620064ba94589377
+PKG_SOURCE_DATE:=2020-01-20
+PKG_SOURCE_VERSION:=43a103ff17ee5872669f8712606578c90c14591d
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=ISC

+ 2 - 2
package/libs/mbedtls/Makefile

@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mbedtls
-PKG_VERSION:=2.16.3
+PKG_VERSION:=2.16.4
 PKG_RELEASE:=1
 PKG_USE_MIPS16:=0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-gpl.tgz
 PKG_SOURCE_URL:=https://tls.mbed.org/download/
-PKG_HASH:=fd01fe4b289116df7781d05e1ef712b6c98823c5334f4a27404f13a8d066ef6a
+PKG_HASH:=5fdb9c43ab43fd9bcc3631508170b089ede7b86dd655253a93cb0ffeb42309f3
 
 PKG_BUILD_PARALLEL:=1
 PKG_LICENSE:=GPL-2.0+

+ 22 - 22
package/libs/mbedtls/patches/200-config.patch

@@ -17,7 +17,7 @@
  
  /**
   * \def MBEDTLS_CIPHER_NULL_CIPHER
-@@ -750,19 +750,19 @@
+@@ -757,19 +757,19 @@
   *
   * Comment macros to disable the curve and functions for it
   */
@@ -46,7 +46,7 @@
  
  /**
   * \def MBEDTLS_ECP_NIST_OPTIM
-@@ -864,7 +864,7 @@
+@@ -871,7 +871,7 @@
   *             See dhm.h for more details.
   *
   */
@@ -55,7 +55,7 @@
  
  /**
   * \def MBEDTLS_KEY_EXCHANGE_ECDHE_PSK_ENABLED
-@@ -884,7 +884,7 @@
+@@ -891,7 +891,7 @@
   *      MBEDTLS_TLS_ECDHE_PSK_WITH_3DES_EDE_CBC_SHA
   *      MBEDTLS_TLS_ECDHE_PSK_WITH_RC4_128_SHA
   */
@@ -64,7 +64,7 @@
  
  /**
   * \def MBEDTLS_KEY_EXCHANGE_RSA_PSK_ENABLED
-@@ -909,7 +909,7 @@
+@@ -916,7 +916,7 @@
   *      MBEDTLS_TLS_RSA_PSK_WITH_3DES_EDE_CBC_SHA
   *      MBEDTLS_TLS_RSA_PSK_WITH_RC4_128_SHA
   */
@@ -73,7 +73,7 @@
  
  /**
   * \def MBEDTLS_KEY_EXCHANGE_RSA_ENABLED
-@@ -1043,7 +1043,7 @@
+@@ -1050,7 +1050,7 @@
   *      MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_128_GCM_SHA256
   *      MBEDTLS_TLS_ECDH_ECDSA_WITH_CAMELLIA_256_GCM_SHA384
   */
@@ -82,7 +82,7 @@
  
  /**
   * \def MBEDTLS_KEY_EXCHANGE_ECDH_RSA_ENABLED
-@@ -1067,7 +1067,7 @@
+@@ -1074,7 +1074,7 @@
   *      MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_128_GCM_SHA256
   *      MBEDTLS_TLS_ECDH_RSA_WITH_CAMELLIA_256_GCM_SHA384
   */
@@ -91,7 +91,7 @@
  
  /**
   * \def MBEDTLS_KEY_EXCHANGE_ECJPAKE_ENABLED
-@@ -1171,7 +1171,7 @@
+@@ -1178,7 +1178,7 @@
   * This option is only useful if both MBEDTLS_SHA256_C and
   * MBEDTLS_SHA512_C are defined. Otherwise the available hash module is used.
   */
@@ -100,7 +100,7 @@
  
  /**
   * \def MBEDTLS_ENTROPY_NV_SEED
-@@ -1266,14 +1266,14 @@
+@@ -1273,14 +1273,14 @@
   * Uncomment this macro to disable the use of CRT in RSA.
   *
   */
@@ -117,7 +117,7 @@
  
  /**
   * \def MBEDTLS_SHA256_SMALLER
-@@ -1427,7 +1427,7 @@
+@@ -1434,7 +1434,7 @@
   *          configuration of this extension).
   *
   */
@@ -126,7 +126,7 @@
  
  /**
   * \def MBEDTLS_SSL_SRV_SUPPORT_SSLV2_CLIENT_HELLO
-@@ -1602,7 +1602,7 @@
+@@ -1609,7 +1609,7 @@
   *
   * Comment this macro to disable support for SSL session tickets
   */
@@ -135,7 +135,7 @@
  
  /**
   * \def MBEDTLS_SSL_EXPORT_KEYS
-@@ -1632,7 +1632,7 @@
+@@ -1639,7 +1639,7 @@
   *
   * Comment this macro to disable support for truncated HMAC in SSL
   */
@@ -144,7 +144,7 @@
  
  /**
   * \def MBEDTLS_SSL_TRUNCATED_HMAC_COMPAT
-@@ -1691,7 +1691,7 @@
+@@ -1698,7 +1698,7 @@
   *
   * Comment this to disable run-time checking and save ROM space
   */
@@ -153,7 +153,7 @@
  
  /**
   * \def MBEDTLS_X509_ALLOW_EXTENSIONS_NON_V3
-@@ -2021,7 +2021,7 @@
+@@ -2028,7 +2028,7 @@
   *      MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_GCM_SHA256
   *      MBEDTLS_TLS_PSK_WITH_CAMELLIA_128_CBC_SHA256
   */
@@ -162,7 +162,7 @@
  
  /**
   * \def MBEDTLS_ARIA_C
-@@ -2087,7 +2087,7 @@
+@@ -2094,7 +2094,7 @@
   * This module enables the AES-CCM ciphersuites, if other requisites are
   * enabled as well.
   */
@@ -171,7 +171,7 @@
  
  /**
   * \def MBEDTLS_CERTS_C
-@@ -2099,7 +2099,7 @@
+@@ -2106,7 +2106,7 @@
   *
   * This module is used for testing (ssl_client/server).
   */
@@ -180,7 +180,7 @@
  
  /**
   * \def MBEDTLS_CHACHA20_C
-@@ -2203,7 +2203,7 @@
+@@ -2214,7 +2214,7 @@
   * \warning   DES is considered a weak cipher and its use constitutes a
   *            security risk. We recommend considering stronger ciphers instead.
   */
@@ -189,7 +189,7 @@
  
  /**
   * \def MBEDTLS_DHM_C
-@@ -2366,7 +2366,7 @@
+@@ -2377,7 +2377,7 @@
   * This module adds support for the Hashed Message Authentication Code
   * (HMAC)-based key derivation function (HKDF).
   */
@@ -198,7 +198,7 @@
  
  /**
   * \def MBEDTLS_HMAC_DRBG_C
-@@ -2676,7 +2676,7 @@
+@@ -2687,7 +2687,7 @@
   *
   * This module enables abstraction of common (libc) functions.
   */
@@ -207,7 +207,7 @@
  
  /**
   * \def MBEDTLS_POLY1305_C
-@@ -2697,7 +2697,7 @@
+@@ -2708,7 +2708,7 @@
   * Caller:  library/md.c
   *
   */
@@ -216,7 +216,7 @@
  
  /**
   * \def MBEDTLS_RSA_C
-@@ -2804,7 +2804,7 @@
+@@ -2815,7 +2815,7 @@
   *
   * Requires: MBEDTLS_CIPHER_C
   */
@@ -225,7 +225,7 @@
  
  /**
   * \def MBEDTLS_SSL_CLI_C
-@@ -2904,7 +2904,7 @@
+@@ -2915,7 +2915,7 @@
   *
   * This module provides run-time version information.
   */
@@ -234,7 +234,7 @@
  
  /**
   * \def MBEDTLS_X509_USE_C
-@@ -3014,7 +3014,7 @@
+@@ -3025,7 +3025,7 @@
   * Module:  library/xtea.c
   * Caller:
   */

+ 47 - 0
package/network/config/sqm-scripts-extra/Makefile

@@ -0,0 +1,47 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=sqm-scripts-extra
+PKG_VERSION:=2016-06-08
+PKG_RELEASE:=1
+PKG_LICENSE:=GPLv2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/sqm-scripts-extra
+  SECTION:=net
+  CATEGORY:=Base system
+  DEPENDS:=+sqm-scripts
+  TITLE:=SQM Scripts - additional experimental scripts for testing
+  PKGARCH:=all
+  MAINTAINER:=Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>, \
+	Sebastian Moeller <moeller0@gmx.de>
+endef
+
+define Package/sqm-scripts-extra/description
+  A set of experimental scripts for sqm-scripts QoS package. The contents of this package may
+  change as new qdiscs like 'cake' are developed and tested.
+endef
+
+define Package/sqm-scripts-extra/download
+endef
+
+define Build/Prepare
+endef
+
+define Build/Compile
+endef
+
+define Package/sqm-scripts-extra/install
+	$(INSTALL_DIR) $(1)/usr/lib/sqm
+	$(INSTALL_DATA) ./src/* $(1)/usr/lib/sqm/
+endef
+
+$(eval $(call BuildPackage,sqm-scripts-extra))
+

+ 102 - 0
package/network/config/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos

@@ -0,0 +1,102 @@
+#!/bin/sh
+################################################################################
+# test_LAN_triple-isolate__piece_of_cake.qos (Cero3 Shaper)
+#
+# Abstract:
+# This is a one band cake and ipv6 enabled shaping script for Ethernet
+# gateways. This exists for the purpose of testing cake's different isolation
+# options, specifically the non-directional triple-isolate feature that promises
+# to finally tackle the bit-torrent hole in simple.qos.
+# This specific version is supposed to be used on LAN interfaces:
+# 	the script's ingress direction equals the internet/WAN upload direction
+# 	the script's egress direction equals the internet/WAN download direction
+#
+# NOTE: Shaping on a LAN interface only affects machines connected via that
+#	LAN interface, so typically WIFI/WLAN traffic will not be shaped!
+#
+################################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#  Copyright (C) 2012-2016
+#    Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
+#
+################################################################################
+
+. ${SQM_LIB_DIR}/defaults.sh
+
+################################################################################
+
+
+# this will only work with cake as qdisc...
+QDISC=cake
+
+
+# to keep this as simple as possible we ignore the *_CAKE_OPTS from defaults.sh
+INGRESS_CAKE_OPTS="besteffort dual-srchost"
+EGRESS_CAKE_OPTS="besteffort dual-dsthost"
+
+
+egress() {
+    sqm_debug "egress"
+    $TC qdisc del dev $IFACE root 2>/dev/null
+    $TC qdisc add dev $IFACE root $( get_stab_string ) cake bandwidth ${UPLINK}kbit $( get_cake_lla_string ) ${EGRESS_CAKE_OPTS} ${EQDISC_OPTS}
+}
+
+
+ingress() {
+    sqm_debug "ingress"
+    $TC qdisc del dev $IFACE handle ffff: ingress 2>/dev/null
+    $TC qdisc add dev $IFACE handle ffff: ingress
+    $TC qdisc del dev $DEV root 2>/dev/null
+    $TC qdisc add dev $DEV root $( get_stab_string ) cake bandwidth ${DOWNLINK}kbit $( get_cake_lla_string ) ${INGRESS_CAKE_OPTS} ${IQDISC_OPTS}
+
+    $IP link set dev $DEV up
+
+    # redirect all IP packets arriving in $IFACE to ifb0
+
+    $TC filter add dev $IFACE parent ffff: protocol all prio 10 u32 \
+	match u32 0 0 flowid 1:1 action mirred egress redirect dev $DEV
+}
+
+sqm_start() {
+
+    #sm: flip upload and download bandwith so that the GUI values reflect directionality in regard to the ISP
+    #sm: NOTE this is ugly and should be performed in defaults.sh or functions.sh if at all
+    #sm: but for quick and dirty testing this should do
+    local ORIG_UPLINK=${UPLINK}
+    local ORIG_DOWNLINK=${DOWNLINK}
+    UPLINK=${ORIG_DOWNLINK}
+    DOWNLINK=${ORIG_UPLINK}
+
+
+    [ -n "$IFACE" ] || return 1
+    do_modules
+    verify_qdisc $QDISC "cake" || return 1
+    sqm_debug "Starting ${SCRIPT}"
+
+    [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} )
+
+
+    if [ "${UPLINK}" -ne 0 ];
+    then
+        egress
+        sqm_debug "egress shaping activated"
+    else
+        sqm_debug "egress shaping deactivated"
+        $TC qdisc del dev ${IFACE} root 2> /dev/null
+    fi
+    if [ "${DOWNLINK}" -ne 0 ];
+    then
+	verify_qdisc ingress "ingress" || return 1
+        ingress
+        sqm_debug "ingress shaping activated"
+    else
+        sqm_debug "ingress shaping deactivated"
+        $TC qdisc del dev ${DEV} root 2> /dev/null
+        $TC qdisc del dev ${IFACE} ingress 2> /dev/null
+    fi
+    return 0
+}

+ 12 - 0
package/network/config/sqm-scripts-extra/src/test_LAN_dual-isolate__piece_of_cake.qos.help

@@ -0,0 +1,12 @@
+test_LAN_dual-isolate__piece_of_cake.qos (Cero3 Shaper)
+
+Abstract:
+This is a one band cake and ipv6 enabled shaping script for Ethernet gateways. 
+This exists for the purpose of testing cake's different isolation options, 
+specifically the non-directional dual-[src|dst]host feature that promises to finally 
+tackle the bit-torrent hole in simple.qos. 
+This specific version is supposed to be used on LAN interfaces: 
+ the script's ingress direction equals the internet/WAN upload direction 
+ the script's egress direction equals the internet/WAN download direction
+NOTE: Shaping on a LAN interface only affects machines connected via that 
+LAN interface, so typically WIFI/WLAN traffic will not be shaped!

+ 102 - 0
package/network/config/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos

@@ -0,0 +1,102 @@
+#!/bin/sh
+################################################################################
+# test_LAN_triple-isolate__piece_of_cake.qos (Cero3 Shaper)
+#
+# Abstract:
+# This is a one band cake and ipv6 enabled shaping script for Ethernet
+# gateways. This exists for the purpose of testing cake's different isolation
+# options, specifically the non-directional triple-isolate feature that promises
+# to finally tackle the bit-torrent hole in simple.qos.
+# This specific version is supposed to be used on LAN interfaces:
+# 	the script's ingress direction equals the internet/WAN upload direction
+# 	the script's egress direction equals the internet/WAN download direction
+#
+# NOTE: Shaping on a LAN interface only affects machines connected via that
+#	LAN interface, so typically WIFI/WLAN traffic will not be shaped!
+#
+################################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#  Copyright (C) 2012-2016
+#    Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
+#
+################################################################################
+
+. ${SQM_LIB_DIR}/defaults.sh
+
+################################################################################
+
+
+# this will only work with cake as qdisc...
+QDISC=cake
+
+
+# to keep this as simple as possible we ignore the *_CAKE_OPTS from defaults.sh
+INGRESS_CAKE_OPTS="besteffort triple-isolate"
+EGRESS_CAKE_OPTS="besteffort triple-isolate"
+
+
+egress() {
+    sqm_debug "egress"
+    $TC qdisc del dev $IFACE root 2>/dev/null
+    $TC qdisc add dev $IFACE root $( get_stab_string ) cake bandwidth ${UPLINK}kbit $( get_cake_lla_string ) ${EGRESS_CAKE_OPTS} ${EQDISC_OPTS}
+}
+
+
+ingress() {
+    sqm_debug "ingress"
+    $TC qdisc del dev $IFACE handle ffff: ingress 2>/dev/null
+    $TC qdisc add dev $IFACE handle ffff: ingress
+    $TC qdisc del dev $DEV root 2>/dev/null
+    $TC qdisc add dev $DEV root $( get_stab_string ) cake bandwidth ${DOWNLINK}kbit $( get_cake_lla_string ) ${INGRESS_CAKE_OPTS} ${IQDISC_OPTS}
+
+    $IP link set dev $DEV up
+
+    # redirect all IP packets arriving in $IFACE to ifb0
+
+    $TC filter add dev $IFACE parent ffff: protocol all prio 10 u32 \
+	match u32 0 0 flowid 1:1 action mirred egress redirect dev $DEV
+}
+
+sqm_start() {
+
+    #sm: flip upload and download bandwith so that the GUI values reflect directionality in regard to the ISP
+    #sm: NOTE this is ugly and should be performed in defaults.sh or functions.sh if at all
+    #sm: but for quick and dirty testing this should do
+    local ORIG_UPLINK=${UPLINK}
+    local ORIG_DOWNLINK=${DOWNLINK}
+    UPLINK=${ORIG_DOWNLINK}
+    DOWNLINK=${ORIG_UPLINK}
+
+
+    [ -n "$IFACE" ] || return 1
+    do_modules
+    verify_qdisc $QDISC "cake" || return 1
+    sqm_debug "Starting ${SCRIPT}"
+
+    [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} )
+
+
+    if [ "${UPLINK}" -ne 0 ];
+    then
+        egress
+        sqm_debug "egress shaping activated"
+    else
+        sqm_debug "egress shaping deactivated"
+        $TC qdisc del dev ${IFACE} root 2> /dev/null
+    fi
+    if [ "${DOWNLINK}" -ne 0 ];
+    then
+	verify_qdisc ingress "ingress" || return 1
+        ingress
+        sqm_debug "ingress shaping activated"
+    else
+        sqm_debug "ingress shaping deactivated"
+        $TC qdisc del dev ${DEV} root 2> /dev/null
+        $TC qdisc del dev ${IFACE} ingress 2> /dev/null
+    fi
+    return 0
+}

+ 12 - 0
package/network/config/sqm-scripts-extra/src/test_LAN_triple-isolate__piece_of_cake.qos.help

@@ -0,0 +1,12 @@
+test_LAN_triple-isolate__piece_of_cake.qos (Cero3 Shaper)
+
+Abstract:
+This is a one band cake and ipv6 enabled shaping script for Ethernet gateways. 
+This exists for the purpose of testing cake's different isolation options, 
+specifically the non-directional triple-isolate feature that promises to finally 
+tackle the bit-torrent hole in simple.qos. 
+This specific version is supposed to be used on LAN interfaces: 
+ the script's ingress direction equals the internet/WAN upload direction 
+ the script's egress direction equals the internet/WAN download direction
+NOTE: Shaping on a LAN interface only affects machines connected via that 
+LAN interface, so typically WIFI/WLAN traffic will not be shaped!

+ 89 - 0
package/network/config/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos

@@ -0,0 +1,89 @@
+#!/bin/sh
+################################################################################
+# test_WAN_dual-isolate__piece_of_cake.qos (Cero3 Shaper)
+#
+# Abstract:
+# This is a one band cake and ipv6 enabled shaping script for Ethernet
+# gateways. This exists for the purpose of testing cake's different isolation
+# options, specifically the directional dual-[src|dst]host feature that promises
+# to finally tackle the bit-torrent hole in simple.qos.
+# This specific version is supposed to be used on WAN interfaces:
+# 	the script's ingress direction equals the internet/WAN download direction
+# 	the script's egress direction equals the internet/WAN upload direction
+#
+################################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#  Copyright (C) 2012-2016
+#    Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
+#
+################################################################################
+
+. ${SQM_LIB_DIR}/defaults.sh
+
+################################################################################
+
+
+# this will only work with cake as qdisc...
+QDISC=cake
+
+
+# to keep this as simple as possible we ignore the *_CAKE_OPTS from defaults.sh
+INGRESS_CAKE_OPTS="besteffort dual-dsthost"
+EGRESS_CAKE_OPTS="besteffort dual-srchost"
+
+
+egress() {
+    sqm_debug "egress"
+    $TC qdisc del dev $IFACE root 2>/dev/null
+    $TC qdisc add dev $IFACE root $( get_stab_string ) cake bandwidth ${UPLINK}kbit $( get_cake_lla_string ) ${EGRESS_CAKE_OPTS} ${EQDISC_OPTS}
+}
+
+
+ingress() {
+    sqm_debug "ingress"
+    $TC qdisc del dev $IFACE handle ffff: ingress 2>/dev/null
+    $TC qdisc add dev $IFACE handle ffff: ingress
+    $TC qdisc del dev $DEV root 2>/dev/null
+    $TC qdisc add dev $DEV root $( get_stab_string ) cake bandwidth ${DOWNLINK}kbit $( get_cake_lla_string ) ${INGRESS_CAKE_OPTS} ${IQDISC_OPTS}
+
+    $IP link set dev $DEV up
+
+    # redirect all IP packets arriving in $IFACE to ifb0
+
+    $TC filter add dev $IFACE parent ffff: protocol all prio 10 u32 \
+	match u32 0 0 flowid 1:1 action mirred egress redirect dev $DEV
+}
+
+sqm_start() {
+    [ -n "$IFACE" ] || return 1
+    do_modules
+    verify_qdisc $QDISC "cake" || return 1
+    sqm_debug "Starting ${SCRIPT}"
+
+    [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} )
+
+
+    if [ "${UPLINK}" -ne 0 ];
+    then
+        egress
+        sqm_debug "egress shaping activated"
+    else
+        sqm_debug "egress shaping deactivated"
+        $TC qdisc del dev ${IFACE} root 2> /dev/null
+    fi
+    if [ "${DOWNLINK}" -ne 0 ];
+    then
+	verify_qdisc ingress "ingress" || return 1
+        ingress
+        sqm_debug "ingress shaping activated"
+    else
+        sqm_debug "ingress shaping deactivated"
+        $TC qdisc del dev ${DEV} root 2> /dev/null
+        $TC qdisc del dev ${IFACE} ingress 2> /dev/null
+    fi
+    return 0
+}

+ 10 - 0
package/network/config/sqm-scripts-extra/src/test_WAN_dual-isolate__piece_of_cake.qos.help

@@ -0,0 +1,10 @@
+test_WAN_dual-isolate__piece_of_cake.qos (Cero3 Shaper)
+
+Abstract:
+This is a one band cake and ipv6 enabled shaping script for Ethernet gateways. 
+This exists for the purpose of testing cake's different isolation options, 
+specifically the directional dual-[src|dst]host feature that promises to finally 
+tackle the bit-torrent hole in simple.qos. 
+This specific version is supposed to be used on WAN interfaces: 
+ the script's ingress direction equals the internet/WAN download direction 
+ the script's egress direction equals the internet/WAN upload direction

+ 89 - 0
package/network/config/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos

@@ -0,0 +1,89 @@
+#!/bin/sh
+################################################################################
+# test_WAN_triple-isolate__piece_of_cake.qos (Cero3 Shaper)
+#
+# Abstract:
+# This is a one band cake and ipv6 enabled shaping script for Ethernet
+# gateways. This exists for the purpose of testing cake's different isolation
+# options, specifically the non-directional triple-isolate feature that promises
+# to finally tackle the bit-torrent hole in simple.qos.
+# This specific version is supposed to be used on WAN interfaces:
+# 	the script's ingress direction equals the internet/WAN download direction
+# 	the script's egress direction equals the internet/WAN upload direction
+#
+################################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#  Copyright (C) 2012-2016
+#    Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
+#
+################################################################################
+
+. ${SQM_LIB_DIR}/defaults.sh
+
+################################################################################
+
+
+# this will only work with cake as qdisc...
+QDISC=cake
+
+
+# to keep this as simple as possible we ignore the *_CAKE_OPTS from defaults.sh
+INGRESS_CAKE_OPTS="besteffort triple-isolate"
+EGRESS_CAKE_OPTS="besteffort triple-isolate"
+
+
+egress() {
+    sqm_debug "egress"
+    $TC qdisc del dev $IFACE root 2>/dev/null
+    $TC qdisc add dev $IFACE root $( get_stab_string ) cake bandwidth ${UPLINK}kbit $( get_cake_lla_string ) ${EGRESS_CAKE_OPTS} ${EQDISC_OPTS}
+}
+
+
+ingress() {
+    sqm_debug "ingress"
+    $TC qdisc del dev $IFACE handle ffff: ingress 2>/dev/null
+    $TC qdisc add dev $IFACE handle ffff: ingress
+    $TC qdisc del dev $DEV root 2>/dev/null
+    $TC qdisc add dev $DEV root $( get_stab_string ) cake bandwidth ${DOWNLINK}kbit $( get_cake_lla_string ) ${INGRESS_CAKE_OPTS} ${IQDISC_OPTS}
+
+    $IP link set dev $DEV up
+
+    # redirect all IP packets arriving in $IFACE to ifb0
+
+    $TC filter add dev $IFACE parent ffff: protocol all prio 10 u32 \
+	match u32 0 0 flowid 1:1 action mirred egress redirect dev $DEV
+}
+
+sqm_start() {
+    [ -n "$IFACE" ] || return 1
+    do_modules
+    verify_qdisc $QDISC "cake" || return 1
+    sqm_debug "Starting ${SCRIPT}"
+
+    [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} )
+
+
+    if [ "${UPLINK}" -ne 0 ];
+    then
+        egress
+        sqm_debug "egress shaping activated"
+    else
+        sqm_debug "egress shaping deactivated"
+        $TC qdisc del dev ${IFACE} root 2> /dev/null
+    fi
+    if [ "${DOWNLINK}" -ne 0 ];
+    then
+	verify_qdisc ingress "ingress" || return 1
+        ingress
+        sqm_debug "ingress shaping activated"
+    else
+        sqm_debug "ingress shaping deactivated"
+        $TC qdisc del dev ${DEV} root 2> /dev/null
+        $TC qdisc del dev ${IFACE} ingress 2> /dev/null
+    fi
+    return 0
+}

+ 10 - 0
package/network/config/sqm-scripts-extra/src/test_WAN_triple-isolate__piece_of_cake.qos.help

@@ -0,0 +1,10 @@
+test_WAN_triple-isolate__piece_of_cake.qos (Cero3 Shaper)
+
+Abstract:
+This is a one band cake and ipv6 enabled shaping script for Ethernet gateways. 
+This exists for the purpose of testing cake's different isolation options, 
+specifically the non-directional triple-isolate feature that promises to finally 
+tackle the bit-torrent hole in simple.qos. 
+This specific version is supposed to be used on WAN interfaces: 
+ the script's ingress direction equals the internet/WAN download direction 
+ the script's egress direction equals the internet/WAN upload direction

+ 82 - 0
package/network/config/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos

@@ -0,0 +1,82 @@
+#!/bin/sh
+################################################################################
+# test_triple_isolated_llt_cake.qos
+# One bin cake shaper for ethernet gateways 
+# using cake qdisc with triple-isolate and diffserv-llt (Latency-Loss-Tradeoff)
+#
+################################################################################
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+#  Copyright (C) 2012-2016
+#    Michael D. Taht, Toke Høiland-Jørgensen, Sebastian Moeller
+#
+################################################################################
+
+. ${SQM_LIB_DIR}/defaults.sh
+
+################################################################################
+
+
+# this will only work with cake as qdisc...
+QDISC=cake
+
+
+# to keep this as simple as possible we ignore the *_CAKE_OPTS from defaults.sh
+INGRESS_CAKE_OPTS="diffserv-llt triple-isolate"
+EGRESS_CAKE_OPTS="diffserv-llt triple-isolate"
+
+
+egress() {
+    sqm_debug "egress"
+    $TC qdisc del dev $IFACE root 2>/dev/null
+    $TC qdisc add dev $IFACE root $( get_stab_string ) cake bandwidth ${UPLINK}kbit $( get_cake_lla_string ) ${EGRESS_CAKE_OPTS} ${EQDISC_OPTS}
+}
+
+
+ingress() {
+    sqm_debug "ingress"
+    $TC qdisc del dev $IFACE handle ffff: ingress 2>/dev/null
+    $TC qdisc add dev $IFACE handle ffff: ingress
+    $TC qdisc del dev $DEV root 2>/dev/null
+    $TC qdisc add dev $DEV root $( get_stab_string ) cake bandwidth ${DOWNLINK}kbit $( get_cake_lla_string ) ${INGRESS_CAKE_OPTS} ${IQDISC_OPTS}
+
+    $IP link set dev $DEV up
+
+    # redirect all IP packets arriving in $IFACE to ifb0
+
+    $TC filter add dev $IFACE parent ffff: protocol all prio 10 u32 \
+	match u32 0 0 flowid 1:1 action mirred egress redirect dev $DEV
+}
+
+sqm_start() {
+    [ -n "$IFACE" ] || return 1
+    do_modules
+    verify_qdisc $QDISC "cake" || return 1
+    sqm_debug "Starting ${SCRIPT}"
+
+    [ -z "$DEV" ] && DEV=$( get_ifb_for_if ${IFACE} )
+
+
+    if [ "${UPLINK}" -ne 0 ];
+    then
+        egress
+        sqm_debug "egress shaping activated"
+    else
+        sqm_debug "egress shaping deactivated"
+        $TC qdisc del dev ${IFACE} root 2> /dev/null
+    fi
+    if [ "${DOWNLINK}" -ne 0 ];
+    then
+	verify_qdisc ingress "ingress" || return 1
+        ingress
+        sqm_debug "ingress shaping activated"
+    else
+        sqm_debug "ingress shaping deactivated"
+        $TC qdisc del dev ${DEV} root 2> /dev/null
+        $TC qdisc del dev ${IFACE} ingress 2> /dev/null
+    fi
+    return 0
+}

+ 3 - 0
package/network/config/sqm-scripts-extra/src/test_triple_isolated_llt_cake.qos.help

@@ -0,0 +1,3 @@
+Cake qdisc with triple-isolate and diffserv-llt (Latency-Loss-Tradeoff)
+options as the shaper and fq_codel as leaf qdisc. This script requires
+that cake is selected as qdisc.

+ 88 - 0
package/network/config/sqm-scripts/Makefile

@@ -0,0 +1,88 @@
+# 
+# Copyright (C) 2014 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=sqm-scripts
+PKG_SOURCE_VERSION:=ab763cba8b1516b3afa99760e0ca884f8b8d93b8
+PKG_VERSION:=1.4.0
+PKG_RELEASE:=3
+PKG_LICENSE:=GPLv2
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.xz
+PKG_MIRROR_HASH:=00bc93f667ad417d4ba9bea4a01d87e3c670a294f61de13348a0f71e7700241f
+PKG_SOURCE_URL:=https://github.com/tohojo/sqm-scripts.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
+PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/sqm-scripts
+  SECTION:=net
+  CATEGORY:=Base system
+  DEPENDS:=+tc +kmod-sched-core +kmod-sched-cake +kmod-ifb +iptables \
+	+iptables-mod-ipopt +iptables-mod-conntrack-extra
+  TITLE:=SQM Scripts (QoS)
+  PKGARCH:=all
+  MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
+endef
+
+define Package/sqm-scripts/description
+ A set of scripts that does simple SQM configuration.
+endef
+
+define Package/sqm-scripts/conffiles
+/etc/config/sqm
+/etc/sqm/sqm.conf
+endef
+
+define Package/sqm-scripts/install
+	make -C $(PKG_BUILD_DIR) DESTDIR=$(1) PLATFORM=openwrt install
+endef
+
+define Package/luci-app-sqm
+  SECTION:=luci
+  CATEGORY:=LuCI
+  TITLE:=SQM Scripts - LuCI interface
+  MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
+  PKGARCH:=all
+  DEPENDS:=+lua +luci-base +sqm-scripts
+  SUBMENU:=3. Applications
+endef
+
+define Package/luci-app-sqm/description
+	Luci interface for the SQM scripts queue management configuration package.
+endef
+
+define Package/luci-app-sqm/install
+	make -C $(PKG_BUILD_DIR) DESTDIR=$(1) PLATFORM=openwrt install-luci
+endef
+
+define Package/luci-app-sqm/postinst
+#!/bin/sh
+which uci > /dev/null || exit 0
+uci -q get ucitrack.@sqm[0] > /dev/null || {
+  uci add ucitrack sqm > /dev/null
+  uci set ucitrack.@sqm[0].init=sqm
+  uci add_list ucitrack.@firewall[0].affects=sqm
+  uci commit
+}
+endef
+
+define Package/luci-app-sqm/postrm
+#!/bin/sh
+which uci > /dev/null || exit 0
+uci -q get ucitrack.@sqm[0] > /dev/null && {
+  uci delete ucitrack.@sqm[0]
+  uci del_list ucitrack.@firewall[0].affects=sqm
+  uci commit
+} || exit 0
+endef
+
+$(eval $(call BuildPackage,sqm-scripts))
+$(eval $(call BuildPackage,luci-app-sqm))

+ 41 - 0
package/network/services/hostapd/patches/070-driver_nl80211-fix-WMM-queue-mapping-for-regulatory-.patch

@@ -0,0 +1,41 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Thu, 23 Jan 2020 13:50:47 +0100
+Subject: [PATCH] driver_nl80211: fix WMM queue mapping for regulatory
+ limit
+
+nl80211 uses a different queue mapping from hostap, so AC indexes need to
+be converted.
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/src/drivers/driver_nl80211_capa.c
++++ b/src/drivers/driver_nl80211_capa.c
+@@ -1403,6 +1403,12 @@ static void phy_info_freq(struct hostapd
+ 			[NL80211_WMMR_AIFSN] = { .type = NLA_U8 },
+ 			[NL80211_WMMR_TXOP] = { .type = NLA_U16 },
+ 		};
++		static const u8 wmm_map[4] = {
++			[NL80211_AC_BE] = WMM_AC_BE,
++			[NL80211_AC_BK] = WMM_AC_BK,
++			[NL80211_AC_VI] = WMM_AC_VI,
++			[NL80211_AC_VO] = WMM_AC_VO,
++		};
+ 		struct nlattr *nl_wmm;
+ 		struct nlattr *tb_wmm[NL80211_WMMR_MAX + 1];
+ 		int rem_wmm, ac, count = 0;
+@@ -1424,12 +1430,13 @@ static void phy_info_freq(struct hostapd
+ 				return;
+ 			}
+ 			ac = nl_wmm->nla_type;
+-			if (ac < 0 || ac >= WMM_AC_NUM) {
++			if (ac >= ARRAY_SIZE(wmm_map)) {
+ 				wpa_printf(MSG_DEBUG,
+ 					   "nl80211: Invalid AC value %d", ac);
+ 				return;
+ 			}
+ 
++			ac = wmm_map[ac];
+ 			chan->wmm_rules[ac].min_cwmin =
+ 				nla_get_u16(tb_wmm[NL80211_WMMR_CW_MIN]);
+ 			chan->wmm_rules[ac].min_cwmax =

+ 47 - 0
package/network/services/hostapd/patches/071-driver_nl80211-fix-regulatory-limits-for-wmm-cwmin-c.patch

@@ -0,0 +1,47 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Thu, 23 Jan 2020 14:10:20 +0100
+Subject: [PATCH] driver_nl80211: fix regulatory limits for wmm cwmin/cwmax
+ values
+
+The internal WMM AC parameters use just the exponent of the CW value, while
+nl80211 reports the full CW value.
+This led to completely bogus CWmin/CWmax values in the WMM IE when a regulatory
+limit was present. Fix this by converting the value to the exponent before
+passing it on
+
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/src/drivers/driver_nl80211_capa.c
++++ b/src/drivers/driver_nl80211_capa.c
+@@ -1336,6 +1336,18 @@ static void phy_info_vht_capa(struct hos
+ 	}
+ }
+ 
++static inline int cw2ecw(unsigned int cw)
++{
++	int bit;
++
++	if (cw == 0)
++		return 0;
++
++	for (bit = 1; cw != 1; bit++)
++		cw >>= 1;
++
++	return bit;
++}
+ 
+ static void phy_info_freq(struct hostapd_hw_modes *mode,
+ 			  struct hostapd_channel_data *chan,
+@@ -1438,9 +1450,9 @@ static void phy_info_freq(struct hostapd
+ 
+ 			ac = wmm_map[ac];
+ 			chan->wmm_rules[ac].min_cwmin =
+-				nla_get_u16(tb_wmm[NL80211_WMMR_CW_MIN]);
++				cw2ecw(nla_get_u16(tb_wmm[NL80211_WMMR_CW_MIN]));
+ 			chan->wmm_rules[ac].min_cwmax =
+-				nla_get_u16(tb_wmm[NL80211_WMMR_CW_MAX]);
++				cw2ecw(nla_get_u16(tb_wmm[NL80211_WMMR_CW_MAX]));
+ 			chan->wmm_rules[ac].min_aifs =
+ 				nla_get_u8(tb_wmm[NL80211_WMMR_AIFSN]);
+ 			chan->wmm_rules[ac].max_txop =

+ 3 - 3
package/network/services/tor/Makefile

@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=tor
-PKG_VERSION:=0.4.2.5
-PKG_RELEASE:=2
+PKG_VERSION:=0.4.2.6
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://dist.torproject.org/ \
 	https://archive.torproject.org/tor-package-archive
-PKG_HASH:=4d5975862e7808faebe9960def6235669fafeeac844cb76965501fa7af79d8c2
+PKG_HASH:=0500102433849bbe3231c590973d126c2d2d6b3943b4b9f9962bdb108436e6c4
 PKG_MAINTAINER:=Hauke Mehrtens <hauke@hauke-m.de> \
 		Peter Wagner <tripolar@gmx.at>
 PKG_LICENSE_FILES:=LICENSE

+ 3 - 3
package/system/fstools/Makefile

@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/fstools.git
-PKG_MIRROR_HASH:=7077c90f3938c7316ff7c8c353a178c4de61ef107b08b79209b93916a67c951d
-PKG_SOURCE_DATE:=2020-01-05
-PKG_SOURCE_VERSION:=823faa0f3edb93fac528bc35588cea81f0a77146
+PKG_MIRROR_HASH:=ca3cc1d4a2de3014e63ec1fa223c5250116c6ae5cdc4e41b2053ca7b3c0a3d96
+PKG_SOURCE_DATE:=2020-01-18
+PKG_SOURCE_VERSION:=189b41b6b48786a51eb2b8bc450cb7d560f030f0
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0

+ 3 - 3
package/system/opkg/Makefile

@@ -14,9 +14,9 @@ PKG_FLAGS:=essential
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.openwrt.org/project/opkg-lede.git
-PKG_SOURCE_DATE:=2019-06-14
-PKG_SOURCE_VERSION:=dcbc142e51f5f5f2fb9e4e44657e013d3c36a52b
-PKG_MIRROR_HASH:=fca7e71dd06f0d5ee0af0d0a493d641d4d5d7e403d64c67879a462a020aa2299
+PKG_SOURCE_DATE:=2020-01-25
+PKG_SOURCE_VERSION:=c09fe2098718807ddbca13ee36e3e38801822946
+PKG_MIRROR_HASH:=b2fba519fb3bf2da2e325a33eee951b85c7c1886e48ebaac3892435a71ae33d5
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING

+ 4 - 4
package/system/procd/Makefile

@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=procd
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/procd.git
-PKG_MIRROR_HASH:=036a42aa87741fa5e587195255c01b6b561bcb7b3858be12e8781949ecb1bda0
-PKG_SOURCE_DATE:=2020-01-04
-PKG_SOURCE_VERSION:=a5af33ce9a16f6aa599f19cc7161e067fab9495d
+PKG_MIRROR_HASH:=fe1329f2320f70249727763739da50555e8b02665ecfc8adb15fb25cd954de5b
+PKG_SOURCE_DATE:=2020-01-24
+PKG_SOURCE_VERSION:=31e4b2dfdbd74f7451abf876dd5d9a674af7adfd
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0

+ 4 - 4
package/system/urngd/Makefile

@@ -4,10 +4,10 @@ PKG_NAME:=urngd
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=https://git.openwrt.org/project/urngd.git
-PKG_SOURCE_DATE:=2019-06-17
-PKG_SOURCE_VERSION:=c057e177ace7704a3d4e2e1272baaf2e2d21cbed
-PKG_MIRROR_HASH:=6ef24be5da227b36fc63098767cf3de8dccbe5578487ffdbd69c7beeeb76bccd
+PKG_SOURCE_URL=$(PROJECT_GIT)/urngd.git
+PKG_SOURCE_DATE:=2020-01-21
+PKG_SOURCE_VERSION:=c7f7b6b65b82eda4675b42d8cd28d76ea7aebf1a
+PKG_MIRROR_HASH:=2d31025b79fe130c579d6c3f4bf4dc12abc43a7319b20a5cdca24ae363ec70f3
 
 PKG_LICENSE:=GPL-2.0 BSD-3-Clause
 PKG_LICENSE_FILES:=

+ 1 - 1
target/linux/ath79/patches-4.14/910-unaligned_access_hacks.patch

@@ -737,7 +737,7 @@
  EXPORT_SYMBOL(xfrm_parse_spi);
 --- a/net/ipv4/tcp_input.c
 +++ b/net/ipv4/tcp_input.c
-@@ -3877,14 +3877,16 @@ static bool tcp_parse_aligned_timestamp(
+@@ -3878,14 +3878,16 @@ static bool tcp_parse_aligned_timestamp(
  {
  	const __be32 *ptr = (const __be32 *)(th + 1);
  

+ 1 - 1
target/linux/generic/backport-4.14/030-USB-serial-option-fix-dwm-158-3g-modem-interface.patch

@@ -30,7 +30,7 @@ Signed-off-by: Johan Hovold <johan@kernel.org>
 
 --- a/drivers/usb/serial/option.c
 +++ b/drivers/usb/serial/option.c
-@@ -1975,7 +1975,8 @@ static const struct usb_device_id option
+@@ -1981,7 +1981,8 @@ static const struct usb_device_id option
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d01, 0xff) },			/* D-Link DWM-156 (variant) */
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d02, 0xff) },
  	{ USB_DEVICE_INTERFACE_CLASS(0x2001, 0x7d03, 0xff) },

+ 1 - 1
target/linux/generic/hack-4.14/702-phy_add_aneg_done_function.patch

@@ -15,7 +15,7 @@
  
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1461,6 +1461,9 @@ int genphy_update_link(struct phy_device
+@@ -1462,6 +1462,9 @@ int genphy_update_link(struct phy_device
  {
  	int status;
  

+ 8 - 8
target/linux/generic/pending-4.14/630-packet_socket_type.patch

@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  #define PACKET_FANOUT_LB		1
 --- a/net/packet/af_packet.c
 +++ b/net/packet/af_packet.c
-@@ -1830,6 +1830,7 @@ static int packet_rcv_spkt(struct sk_buf
+@@ -1836,6 +1836,7 @@ static int packet_rcv_spkt(struct sk_buf
  {
  	struct sock *sk;
  	struct sockaddr_pkt *spkt;
@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  	/*
  	 *	When we registered the protocol we saved the socket in the data
-@@ -1837,6 +1838,7 @@ static int packet_rcv_spkt(struct sk_buf
+@@ -1843,6 +1844,7 @@ static int packet_rcv_spkt(struct sk_buf
  	 */
  
  	sk = pt->af_packet_priv;
@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  	/*
  	 *	Yank back the headers [hope the device set this
-@@ -1849,7 +1851,7 @@ static int packet_rcv_spkt(struct sk_buf
+@@ -1855,7 +1857,7 @@ static int packet_rcv_spkt(struct sk_buf
  	 *	so that this procedure is noop.
  	 */
  
@@ -55,7 +55,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  		goto out;
  
  	if (!net_eq(dev_net(dev), sock_net(sk)))
-@@ -2076,12 +2078,12 @@ static int packet_rcv(struct sk_buff *sk
+@@ -2082,12 +2084,12 @@ static int packet_rcv(struct sk_buff *sk
  	unsigned int snaplen, res;
  	bool is_drop_n_account = false;
  
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -2207,12 +2209,12 @@ static int tpacket_rcv(struct sk_buff *s
+@@ -2213,12 +2215,12 @@ static int tpacket_rcv(struct sk_buff *s
  	BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h2)) != 32);
  	BUILD_BUG_ON(TPACKET_ALIGN(sizeof(*h.h3)) != 48);
  
@@ -87,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	if (!net_eq(dev_net(dev), sock_net(sk)))
  		goto drop;
  
-@@ -3295,6 +3297,7 @@ static int packet_create(struct net *net
+@@ -3301,6 +3303,7 @@ static int packet_create(struct net *net
  	mutex_init(&po->pg_vec_lock);
  	po->rollover = NULL;
  	po->prot_hook.func = packet_rcv;
@@ -95,7 +95,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
  	if (sock->type == SOCK_PACKET)
  		po->prot_hook.func = packet_rcv_spkt;
-@@ -3908,6 +3911,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -3923,6 +3926,16 @@ packet_setsockopt(struct socket *sock, i
  		po->xmit = val ? packet_direct_xmit : dev_queue_xmit;
  		return 0;
  	}
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  	default:
  		return -ENOPROTOOPT;
  	}
-@@ -3960,6 +3973,13 @@ static int packet_getsockopt(struct sock
+@@ -3975,6 +3988,13 @@ static int packet_getsockopt(struct sock
  	case PACKET_VNET_HDR:
  		val = po->has_vnet_hdr;
  		break;

+ 1 - 1
target/linux/generic/pending-4.14/703-phy-add-detach-callback-to-struct-phy_driver.patch

@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
 
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1105,6 +1105,9 @@ void phy_detach(struct phy_device *phyde
+@@ -1106,6 +1106,9 @@ void phy_detach(struct phy_device *phyde
  	struct module *ndev_owner = dev->dev.parent->driver->owner;
  	struct mii_bus *bus;