Merge Official Source

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen 2021-06-17 20:51:30 +08:00
commit 4c46b256d1
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
7 changed files with 67 additions and 17 deletions

View File

@ -43,7 +43,7 @@ endef
# 1: package name
define GetABISuffix
$(call FormatABISuffix,$(1),$(if $(ABIV_$(1)),$(ABIV_$(1)),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
$(if $(ABIV_$(1)),$(ABIV_$(1)),$(call FormatABISuffix,$(1),$(foreach v,$(wildcard $(STAGING_DIR)/pkginfo/$(1).version),$(shell cat $(v)))))
endef
# 1: package name

View File

@ -114,9 +114,17 @@ generate_network() {
add network device
set network.@device[-1].name='br-$1'
set network.@device[-1].type='bridge'
set network.@device[-1].macaddr='$macaddr'
EOF
for port in $ports; do uci add_list network.@device[-1].ports="$port"; done
[ -n "$macaddr" ] && {
for port in $ports; do
uci -q batch <<-EOF
add network device
set network.@device[-1].name='$port'
set network.@device[-1].macaddr='$macaddr'
EOF
done
}
device=br-$1
type=
macaddr=""

View File

@ -98,7 +98,7 @@ PKG_CONFIG_DEPENDS += \
define KernelPackage/cfg80211
$(call KernelPackage/mac80211/Default)
TITLE:=cfg80211 - wireless configuration API
DEPENDS+= +iw +wireless-regdb
DEPENDS+= +iw +iwinfo +wireless-regdb
ABI_VERSION:=$(PKG_VERSION)-$(PKG_RELEASE)
FILES:= \
$(PKG_BUILD_DIR)/compat/compat.ko \

View File

@ -116,7 +116,7 @@ mac80211_add_he_capabilities() {
set -- $capab
[ "$(($4))" -gt 0 ] || continue
[ "$(((0x$2) & $3))" -gt 0 ] || {
eval "$4=0"
eval "$1=0"
continue
}
append base_cfg "$1=1" "$N"

View File

@ -0,0 +1,23 @@
From: Felix Fietkau <nbd@nbd.name>
Date: Thu, 17 Jun 2021 12:05:54 +0200
Subject: [PATCH] mac80211: minstrel_ht: fix sample time check
We need to skip sampling if the next sample time is after jiffies, not before.
This patch fixes an issue where in some cases only very little sampling (or none
at all) is performed, leading to really bad data rates
Fixes: 80d55154b2f8 ("mac80211: minstrel_ht: significantly redesign the rate probing strategy")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -1498,7 +1498,7 @@ minstrel_ht_get_rate(void *priv, struct
(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO))
return;
- if (time_is_before_jiffies(mi->sample_time))
+ if (time_is_after_jiffies(mi->sample_time))
return;
mi->sample_time = jiffies + MINSTREL_SAMPLE_INTERVAL;

View File

@ -16,11 +16,16 @@ start_service() {
local disabled="$(uci get gps.@gps[-1].disabled || echo 0)"
[ "$disabled" == "0" ] || return
[ "$tty" ] || return
[ -c "$tty" ] || {
tty="/dev/$tty"
[ -c "$tty" ] || return
}
case "$tty" in
"/"*)
true
;;
*)
tty="/dev/$tty"
;;
esac
procd_open_instance
procd_set_param command "$PROG"

View File

@ -18,19 +18,33 @@ work_dir = Path(getenv("WORK_DIR"))
output = {}
def get_initial_output(image_info):
# preserve existing profiles.json
if output_path.is_file():
profiles = json.loads(output_path.read_text())
if profiles["version_code"] == image_info["version_code"]:
return profiles
return image_info
for json_file in work_dir.glob("*.json"):
image_info = json.loads(json_file.read_text())
if not output:
output.update(image_info)
output = get_initial_output(image_info)
# get first and only profile in json file
device_id, profile = next(iter(image_info["profiles"].items()))
if device_id not in output["profiles"]:
output["profiles"][device_id] = profile
else:
# get first (and only) profile in json file
device_id = next(iter(image_info["profiles"].keys()))
if device_id not in output["profiles"]:
output["profiles"].update(image_info["profiles"])
else:
output["profiles"][device_id]["images"].append(
image_info["profiles"][device_id]["images"][0]
)
output["profiles"][device_id]["images"].extend(profile["images"])
# make image lists unique by name, keep last/latest
for device_id, profile in output["profiles"].items():
profile["images"] = list({e["name"]: e for e in profile["images"]}.values())
if output:
default_packages, output["arch_packages"] = run(