Compare commits

..

1 Commits

Author SHA1 Message Date
jaspreetsachdev
a00dbfa6e4 Merge pull request #985 from Telecominfraproject/main
merge for 4.2.0 RC2
2025-12-12 18:42:38 -05:00
22 changed files with 66 additions and 239 deletions

View File

@@ -184,15 +184,10 @@ const phy_proto = {
addr[0] ^= idx << 2;
break;
case "b5":
if (mbssid) {
let b5 = addr[5];
addr[5] = addr[3];
addr[3] = b5;
addr[5] &= ~0xf;
addr[0] |= 2;
}
addr[5] ^= idx;
break;
if (mbssid)
addr[0] |= 2;
addr[5] ^= idx;
break;
default:
for (let i = 5; i > 0; i--) {
addr[i] += idx;

View File

@@ -230,17 +230,6 @@ function iface_pending_init(phydev, config)
pending.next();
}
function iface_macaddr_init(phydev, config, macaddr_list)
{
let macaddr_data = {
num_global: config.num_global_macaddr ?? 1,
macaddr_base: config.macaddr_base,
mbssid: config.mbssid ?? 0,
};
return phydev.macaddr_init(macaddr_list, macaddr_data);
}
function iface_restart(phydev, config, old_config)
{
let phy = phydev.name;
@@ -258,7 +247,7 @@ function iface_restart(phydev, config, old_config)
return;
}
iface_macaddr_init(phydev, config, iface_config_macaddr_list(config));
phydev.macaddr_init(iface_config_macaddr_list(config));
for (let i = 0; i < length(config.bss); i++) {
let bss = config.bss[i];
if (bss.default_macaddr)
@@ -516,7 +505,7 @@ function iface_reload_config(phydev, config, old_config)
num_global: config.num_global_macaddr ?? 1,
mbssid: config.mbssid ?? 0,
};
macaddr_list = iface_macaddr_init(phydev, config, macaddr_list);
macaddr_list = phydev.macaddr_init(macaddr_list, macaddr_data);
for (let i = 0; i < length(config.bss); i++) {
if (bss_list[i])
continue;
@@ -685,10 +674,9 @@ function iface_load_config(filename)
continue;
}
if (val[0] == "#num_global_macaddr")
config[substr(val[0], 1)] = int(val[1]);
else if (val[0] == "multiple_bssid")
config.mbssid = int(val[1]);
if (val[0] == "#num_global_macaddr" ||
val[0] == "mbssid")
config[val[0]] = int(val[1]);
push(config.radio.data, line);
}

View File

@@ -121,13 +121,10 @@ qcom_setup_macs()
lan_mac=$(macaddr_add "$wan_mac" 2)
;;
sonicfi,rap630e)
mtd=$(find_mtd_chardev "0:APPSBLENV")
[ -z "$mtd" ] && return;
mac=$(grep BaseMacAddress= $mtd | cut -d '=' -f2)
mac=$(fw_printenv -n BaseMacAddress)
[ -z "$mac" ] && return;
wan_mac=$(macaddr_canonicalize $mac)
lan_mac=$(macaddr_add "$wan_mac" 1)
lan_mac=$(macaddr_canonicalize $mac)
wan_mac=$(macaddr_add "$wan_mac" 1)
ucidef_set_network_device_mac eth1 $wan_mac
ucidef_set_network_device_mac eth0 $lan_mac
ip link set eth1 address $wan_mac

View File

@@ -6,9 +6,8 @@ boot() {
case "$(board_name)" in
hfcl,ion4xi_w)
fw_setenv boot_count 0
;;
;;
edgecore,oap101|\
edgecore,oap101e|\
edgecore,eap104)
avail=$(fw_printenv -n upgrade_available)
[ "${avail}" -eq 0 ] && fw_setenv upgrade_available 1

View File

@@ -114,7 +114,12 @@ platform_do_upgrade() {
indio,um-325ax-v2|\
indio,um-335ax|\
indio,um-525axp|\
indio,um-525axm)
indio,um-525axm|\
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
edgecore,oap101e-6e|\
edgecore,eap104)
if [ "$(find_mtd_chardev rootfs)" ]; then
CI_UBIPART="rootfs"
else
@@ -128,43 +133,6 @@ platform_do_upgrade() {
fi
nand_upgrade_tar "$1"
;;
edgecore,oap101|\
edgecore,oap101-6e|\
edgecore,oap101e|\
edgecore,oap101e-6e|\
edgecore,eap104)
if [ "$(find_mtd_chardev rootfs)" ]; then
CI_UBIPART="rootfs"
else
if [ -e /tmp/downgrade ]; then
CI_UBIPART="rootfs1"
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
CI_FWSETENV="-s /tmp/fw_setenv.txt"
else
local CI_UBIPART_B=""
if grep -q rootfs1 /proc/cmdline; then
CI_UBIPART="rootfs2"
CI_UBIPART_B="rootfs1"
CI_FWSETENV="active 2"
elif grep -q rootfs2 /proc/cmdline; then
CI_UBIPART="rootfs1"
CI_UBIPART_B="rootfs2"
CI_FWSETENV="active 1"
else
CI_UBIPART="rootfs1"
CI_UBIPART_B=""
CI_FWSETENV="active 1"
fi
if [ "$(fw_printenv -n upgrade_available 2>/dev/null)" = "0" ]; then
if [ -n "$CI_UBIPART_B" ]; then
CI_UBIPART="$CI_UBIPART_B"
CI_FWSETENV=""
fi
fi
fi
fi
nand_upgrade_tar "$1"
;;
glinet,b3000)
CI_UBIPART="rootfs1"
[ "$(find_mtd_chardev rootfs)" ] && CI_UBIPART="rootfs"

View File

@@ -182,31 +182,12 @@ platform_do_upgrade() {
if [ "$(find_mtd_chardev rootfs)" ]; then
CI_UBIPART="rootfs"
else
if [ -e /tmp/downgrade ]; then
CI_UBIPART="rootfs1"
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
CI_FWSETENV="-s /tmp/fw_setenv.txt"
if grep -q rootfs1 /proc/cmdline; then
CI_UBIPART="rootfs2"
CI_FWSETENV="active 2"
else
local CI_UBIPART_B=""
if grep -q rootfs1 /proc/cmdline; then
CI_UBIPART="rootfs2"
CI_UBIPART_B="rootfs1"
CI_FWSETENV="active 2"
elif grep -q rootfs2 /proc/cmdline; then
CI_UBIPART="rootfs1"
CI_UBIPART_B="rootfs2"
CI_FWSETENV="active 1"
else
CI_UBIPART="rootfs1"
CI_UBIPART_B=""
CI_FWSETENV="active 1"
fi
if [ "$(fw_printenv -n upgrade_available 2>/dev/null)" = "0" ]; then
if [ -n "$CI_UBIPART_B" ]; then
CI_UBIPART="$CI_UBIPART_B"
CI_FWSETENV=""
fi
fi
CI_UBIPART="rootfs1"
CI_FWSETENV="active 1"
fi
fi
nand_upgrade_tar "$1"

View File

@@ -7,7 +7,7 @@ boot() {
hfcl,ion4xe|\
hfcl,ion4xi)
fw_setenv boot_count 0
;;
;;
edgecore,eap101|\
edgecore,eap102|\
edgecore,oap102|\

View File

@@ -78,27 +78,12 @@ platform_do_upgrade() {
CI_UBIPART="rootfs1"
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
CI_FWSETENV="-s /tmp/fw_setenv.txt"
elif grep -q rootfs1 /proc/cmdline; then
CI_UBIPART="rootfs2"
CI_FWSETENV="active 2"
else
local CI_UBIPART_B=""
if grep -q rootfs1 /proc/cmdline; then
CI_UBIPART="rootfs2"
CI_UBIPART_B="rootfs1"
CI_FWSETENV="active 2"
elif grep -q rootfs2 /proc/cmdline; then
CI_UBIPART="rootfs1"
CI_UBIPART_B="rootfs2"
CI_FWSETENV="active 1"
else
CI_UBIPART="rootfs1"
CI_UBIPART_B=""
CI_FWSETENV="active 1"
fi
if [ "$(fw_printenv -n upgrade_available 2>/dev/null)" = "0" ]; then
if [ -n "$CI_UBIPART_B" ]; then
CI_UBIPART="$CI_UBIPART_B"
CI_FWSETENV=""
fi
fi
CI_UBIPART="rootfs1"
CI_FWSETENV="active 1"
fi
fi
nand_upgrade_tar "$1"

View File

@@ -1,13 +0,0 @@
Index: backports-6.12.6/net/mac80211/vht.c
===================================================================
--- backports-6.12.6.orig/net/mac80211/vht.c
+++ backports-6.12.6/net/mac80211/vht.c
@@ -365,7 +365,7 @@ _ieee80211_sta_cap_rx_bw(struct link_sta
enum nl80211_band band;
u8 info;
- if (chandef) {
+ if (chandef && chandef->chan) {
band = chandef->chan->band;
} else {
struct ieee80211_bss_conf *link_conf;

View File

@@ -1057,7 +1057,8 @@ return {
bss_event("add", name);
},
bss_reload: function(phy, name, obj, reconf) {
bss_event("reload", name, { reconf: reconf != 0 });
//bss_event("reload", name, { reconf: reconf != 0 });
bss_event("reload", name, { reconf: false });
},
bss_remove: function(phy, name, obj) {
bss_event("remove", name);

View File

@@ -1,34 +0,0 @@
From 406807b134f88ec038ee120a0a0085e140e96313 Mon Sep 17 00:00:00 2001
From: Venkat Chimata <venkat@nearhop.com>
Date: Fri, 23 Jan 2026 00:31:13 +0530
Subject: [PATCH] hostapd: fix 6 GHz center frequency adjustment condition
Ensure that the center frequency segment 0 index adjustment for
320 MHz bandwidth is applied only for valid 6 GHz frequencies.
Previously, the bandwidth check alone could trigger the adjustment
even when the operating center index did not correspond to a 6 GHz
frequency. Add an explicit is_6ghz_freq() check to avoid incorrect
center frequency offset calculations.
Signed-off-by: Venkat Chimata <venkat@nearhop.com>
---
src/ap/ap_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ap/ap_config.h b/src/ap/ap_config.h
index dfd895e..b6c2a4a 100644
--- a/src/ap/ap_config.h
+++ b/src/ap/ap_config.h
@@ -1306,7 +1306,7 @@ hostapd_set_oper_centr_freq_seg0_idx(struct hostapd_config *conf,
#ifdef CONFIG_IEEE80211BE
if (conf->ieee80211be)
conf->eht_oper_centr_freq_seg0_idx = oper_centr_freq_seg0_idx;
- if (center_idx_to_bw_6ghz(oper_centr_freq_seg0_idx) == 4)
+ if (is_6ghz_freq(conf->channel) && (center_idx_to_bw_6ghz(oper_centr_freq_seg0_idx) == 4))
oper_centr_freq_seg0_idx +=
conf->channel > oper_centr_freq_seg0_idx ? 16 : -16;
--
2.34.1

View File

@@ -151,32 +151,17 @@ platform_do_upgrade() {
spi_nor_emmc_do_upgrade_bootconfig $1
;;
edgecore,eap105)
if [ -e /tmp/downgrade ]; then
CI_UBIPART="rootfs1"
{ echo 'active 1'; echo 'upgrade_available 0'; } > /tmp/fw_setenv.txt || exit 1
CI_FWSETENV="-s /tmp/fw_setenv.txt"
if [ "$(find_mtd_chardev rootfs)" ]; then
CI_UBIPART="rootfs"
else
if grep -q rootfs1 /proc/cmdline; then
CI_UBIPART="rootfs2"
CI_FWSETENV="active 2"
else
local CI_UBIPART_B=""
if grep -q rootfs1 /proc/cmdline; then
CI_UBIPART="rootfs2"
CI_UBIPART_B="rootfs1"
CI_FWSETENV="active 2"
elif grep -q rootfs2 /proc/cmdline; then
CI_UBIPART="rootfs1"
CI_UBIPART_B="rootfs2"
CI_FWSETENV="active 1"
else
CI_UBIPART="rootfs1"
CI_UBIPART_B=""
CI_FWSETENV="active 1"
fi
if [ "$(fw_printenv -n upgrade_available 2>/dev/null)" = "0" ]; then
if [ -n "$CI_UBIPART_B" ]; then
CI_UBIPART="$CI_UBIPART_B"
CI_FWSETENV=""
fi
fi
CI_UBIPART="rootfs1"
CI_FWSETENV="active 1"
fi
fi
nand_upgrade_tar "$1"
;;
sonicfi,rap7110c-341x)

View File

@@ -23,14 +23,14 @@
#size-cells = <2>;
ranges;
ramoops@49a00000 {
compatible = "ramoops";
no-map;
reg = <0x0 0x49a00000 0x0 0x100000>;
record-size = <0x50000>;
console-size = <0x50000>;
pmsg-size = <0x50000>;
};
ramoops@49c00000 {
compatible = "ramoops";
no-map;
reg = <0x0 0x49c00000 0x0 0x50000>;
record-size = <0x20000>;
console-size = <0x8000>;
pmsg-size = <0x8000>;
};
};
aliases {

View File

@@ -96,7 +96,6 @@ function wiphy_detect() {
let info = {
antenna_rx: phy.wiphy_antenna_avail_rx,
antenna_tx: phy.wiphy_antenna_avail_tx,
reconf: true,
bands: {},
radios: []
};

View File

@@ -1,12 +1,10 @@
#!/bin/sh
check_certificates() {
[ -f /certificates/cert.pem -a -f /certificates/key.pem ] || return 1
[ -n "$1" ] && [ ! -f /certificates/operational.pem ] && return 1
exit 0
[ -f /certificates/cert.pem -a -f /certificates/key.pem ] && exit 0
}
check_certificates 1
check_certificates
tar_part_lookup() {
part="$(fw_printenv -n cert_part)"
@@ -78,9 +76,9 @@ yuncore,ax820)
fi
esac
check_certificates 1
check_certificates
# if we get here no valid operational certificates were found
# if we get here no valid certificates were found
PART_NAME=
@@ -146,7 +144,6 @@ senao,jeap6500)
PART_NAME=ubi
;;
*)
check_certificates
return 1
;;
esac
@@ -158,7 +155,4 @@ MTD=$(find_mtd_index $PART_NAME)
ubiattach -m $MTD -d 3
[ -e /dev/ubi3 ] && mount -t ubifs ubi3:certificates /certificates
check_certificates || {
umount /certificates
check_certificates
}
check_certificates

View File

@@ -400,7 +400,7 @@ function expiry_handler() {
if (!stat)
return;
let ret = system(`openssl x509 -checkend ${timeouts.expiry_threshold} -noout -in /etc/ucentral/operational.pem`);
let ret = system(`openssl x509 -checkend ${timeouts.expiry_threshold} -noout -in /certificates/operational.pem`);
if (!ret) {
ulog(LOG_INFO, 'checked certificate expiry - all ok\n');
return;

View File

@@ -29,9 +29,6 @@ Build/Compile = $(Build/Compile/Default)
define Package/ratelimit/install
$(CP) ./files/* $(1)
ifeq ($(CONFIG_TARGET_mediatek),y)
$(SED) 's|qdisc replace dev $$$${iface} parent 1:$$$${id} handle $$$${id}: fq_codel flows 128 limit 800 quantum 300 noecn|qdisc add dev $$$${iface} parent 1:$$$${id} sfq perturb 10 limit 2000 quantum 1514|' $(1)/usr/bin/ratelimit
endif
endef
$(eval $(call BuildPackage,ratelimit))

View File

@@ -42,12 +42,7 @@ const actions = {
tx_power: function(msg) {
if (!global.phy.txpower(msg))
return result(1, msg.event, 'BSS ' + msg.bssid + ' failed to set TX power', { action: 'tx_power', bssid: msg.bssid });
// iw dev gives updated value
// But fetching it immediately failed once.
// Could n't reprouce it though
// Give few milliseconds to settle
sleep(10);
let level = global.local.txpower(msg.bssid) / 100;
return result(0, msg.event, 'BSS ' + msg.bssid + ' changed TX power', { action: 'tx_power', bssid: msg.bssid, level });
},

View File

@@ -293,15 +293,6 @@ return {
return -1;
},
bssid_to_ifname: function(bssid) {
for (let bss, v in interfaces) {
if (v.bssid == lc(bssid)) {
return bss;
}
}
return null;
},
txpower: function(bssid) {
for (let bss, v in interfaces) {
if (v.bssid != lc(bssid))

View File

@@ -163,11 +163,10 @@ return {
txpower: function(msg) {
if (!msg.bssid || !msg.level)
return false;
let dev = global.local.bssid_to_ifname(msg.bssid);
if (dev == null) {
return false;
}
global.nl80211.request(global.nl80211.const.NL80211_CMD_SET_WIPHY, 0, { dev, wiphy_tx_power_setting: 2, wiphy_tx_power_level: msg.level * 100});
let wiphy = global.local.bssid_to_phy(msg.bssid);
if (wiphy < 0)
return false;
global.nl80211.request(global.nl80211.const.NL80211_CMD_SET_WIPHY, 0, { wiphy, wiphy_tx_power_setting: 2, wiphy_tx_power_level: msg.level * 100});
return true;
},
};

View File

@@ -4,10 +4,10 @@ PKG_NAME:=ucentral-schema
PKG_RELEASE:=1
PKG_SOURCE_URL=https://github.com/Telecominfraproject/wlan-ucentral-schema.git
PKG_MIRROR_HASH:=ac2a5b026cfc0cdc893cf2ed8dd5aff31c5c56feaffa6bf3489d5c260f2ed724
PKG_MIRROR_HASH:=6d3b8e342ce8e7aeef908acfcbefc989523f0de9cac215d8be4f148746c4e0ce
PKG_SOURCE_PROTO:=git
PKG_SOURCE_DATE:=2026-01-24
PKG_SOURCE_VERSION:=9af6661616c5428509dac11357fbc54e9365db57
PKG_SOURCE_DATE:=2025-12-12
PKG_SOURCE_VERSION:=d26c4b0a1e38d331deeef89c5ccf669ce9044791
PKG_MAINTAINER:=John Crispin <john@phrozen.org>
PKG_LICENSE:=BSD-3-Clause

View File

@@ -1,12 +1,12 @@
---
profile: edgecore_eap111
target: mediatek
subtarget: filogic
subtarget: mt7981
description: Build image for the EdgeCore EAP111
image: bin/targets/mediatek/filogic/openwrt-mediatek-filogic-edgecore_eap111-squashfs-sysupgrade.bin
image: bin/targets/mediatek/mt7981/openwrt-mediatek-mt7981-edgecore_eap111-squashfs-sysupgrade.bin
feeds:
- name: mediatek
path: ../../feeds/mediatek
path: ../../feeds/mediatek-sdk
packages:
- mediatek
include: