Compare commits

...

6 commits

Author SHA1 Message Date
Caleb James DeLisle
75915e3580 econet: fix wrong board name for Zyxel PMG5617GA
Some checks are pending
Build Kernel / Build all affected Kernels (push) Waiting to run
Build all core packages / Build all core packages for selected target (push) Waiting to run
Board name was specified incorrectly in the DT, fix.
This bug was introduced in #20580 (31f5fc8fea8931f5) which was
merged last week, and econet is still a mostly experimental target,
so it is considered unnecessary to update SUPPORTED_DEVICES.

Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
Link: https://github.com/openwrt/openwrt/pull/21023
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-08 17:30:27 +01:00
Caleb James DeLisle
4e0dfa6e27 econet: update en75_chboot to use OpenWrt board_name
Instead of using the name from /proc/cpuinfo, use board_name from
/lib/functions.sh

Signed-off-by: Caleb James DeLisle <cjd@cjdns.fr>
Link: https://github.com/openwrt/openwrt/pull/21023
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-08 17:30:27 +01:00
Rosen Penev
72f43ac220 bmips: huawei-hg556a-c: use nvmem for wifi eeprom
The ralink custom property is deprecated and only kept around for
byteswap capability.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21058
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-08 17:28:40 +01:00
Rosen Penev
5ba9354fc5 bmips: use led-sources for ath9k
Avoids having to create a custom LED for wifi.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/21058
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-08 17:28:40 +01:00
Rany Hany
7f05a9af9a hostapd: allow ubus ban client address to be a broadcast address
This will allow del_client with ban_time on a broadcast address
to also ban all clients temporarily.

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/18670
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-08 17:26:07 +01:00
Rany Hany
5d7107ef63 hostapd: add ubus support to disasoc/deauth all wireless STAs
Similar to the hostapd control interface, treat ff:ff:ff:ff:ff:ff
as a stand in for "all clients".

Signed-off-by: Rany Hany <rany_hany@riseup.net>
Link: https://github.com/openwrt/openwrt/pull/18670
Signed-off-by: Robert Marko <robimarko@gmail.com>
2025-12-08 17:26:07 +01:00
7 changed files with 57 additions and 60 deletions

View file

@ -476,6 +476,7 @@ hostapd_bss_del_client(struct ubus_context *ctx, struct ubus_object *obj,
struct blob_attr *msg)
{
struct blob_attr *tb[__DEL_CLIENT_MAX];
const u8 bcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
struct hostapd_data *hapd = container_of(obj, struct hostapd_data, ubus.obj);
struct sta_info *sta;
bool deauth = false;
@ -496,15 +497,19 @@ hostapd_bss_del_client(struct ubus_context *ctx, struct ubus_object *obj,
if (tb[DEL_CLIENT_DEAUTH])
deauth = blobmsg_get_bool(tb[DEL_CLIENT_DEAUTH]);
if (deauth)
hostapd_drv_sta_deauth(hapd, addr, reason);
else
hostapd_drv_sta_disassoc(hapd, addr, reason);
sta = ap_get_sta(hapd, addr);
if (sta) {
if (deauth) {
hostapd_drv_sta_deauth(hapd, addr, reason);
if (deauth)
ap_sta_deauthenticate(hapd, sta, reason);
} else {
hostapd_drv_sta_disassoc(hapd, addr, reason);
else
ap_sta_disassociate(hapd, sta, reason);
}
} else if (memcmp(addr, bcast, ETH_ALEN) == 0) {
hostapd_free_stas(hapd);
}
if (tb[DEL_CLIENT_BAN_TIME])
@ -1844,6 +1849,7 @@ ubus_event_cb(struct ubus_notify_request *req, int idx, int ret)
int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct hostapd_ubus_request *req)
{
struct ubus_banned_client *ban;
const u8 bcast[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff };
const char *types[HOSTAPD_UBUS_TYPE_MAX] = {
[HOSTAPD_UBUS_PROBE_REQ] = "probe",
[HOSTAPD_UBUS_AUTH_REQ] = "auth",
@ -1862,6 +1868,10 @@ int hostapd_ubus_handle_event(struct hostapd_data *hapd, struct hostapd_ubus_req
if (ban)
return WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
ban = avl_find_element(&hapd->ubus.banned, bcast, ban, avl);
if (ban)
return WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
if (!hapd->ubus.obj.has_subscribers)
return WLAN_STATUS_SUCCESS;

View file

@ -48,17 +48,6 @@
linux,default-trigger = "usbport";
};
};
ath9k-leds {
compatible = "gpio-leds";
led-8 {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_GREEN>;
gpios = <&ath9k 8 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
};
};
&leds {
@ -205,15 +194,16 @@
device_type = "pci";
ranges;
ath9k: wifi@0,0 {
wifi@0,0 {
compatible = "pci168c,002e";
reg = <0 0 0 0 0>;
nvmem-cells = <&macaddr_cfe_6a0 1>, <&cal_data_1000>;
nvmem-cell-names = "mac-address", "calibration";
#gpio-cells = <2>;
gpio-controller;
led {
led-sources = <8>;
};
};
};
};

View file

@ -5,17 +5,6 @@
/ {
model = "Huawei EchoLife HG556a (version A)";
compatible = "huawei,hg556a-a", "brcm,bcm6358";
ath9k-leds {
compatible = "gpio-leds";
led-2 {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_RED>;
gpios = <&ath9k 2 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
};
};
&gpio_keys {
@ -58,7 +47,7 @@
&pci {
status = "okay";
ath9k: wifi@1,0 {
wifi@1,0 {
compatible = "pci168c,ff1d";
reg = <0x0800 0 0 0 0>;
@ -67,7 +56,8 @@
nvmem-cells = <&macaddr_cfe_6a0 1>;
nvmem-cell-names = "mac-address";
#gpio-cells = <2>;
gpio-controller;
led {
led-sources = <2>;
};
};
};

View file

@ -5,17 +5,6 @@
/ {
model = "Huawei EchoLife HG556a (version B)";
compatible = "huawei,hg556a-b", "brcm,bcm6358";
ath9k-leds {
compatible = "gpio-leds";
led-2 {
function = LED_FUNCTION_WLAN;
color = <LED_COLOR_ID_RED>;
gpios = <&ath9k 2 GPIO_ACTIVE_HIGH>;
linux,default-trigger = "phy0tpt";
};
};
};
&gpio_keys {
@ -58,7 +47,7 @@
&pci {
status = "okay";
ath9k: wifi@1,0 {
wifi@1,0 {
compatible = "pci168c,0029";
reg = <0x0800 0 0 0 0>;
@ -67,7 +56,8 @@
nvmem-cells = <&macaddr_cfe_6a0 1>;
nvmem-cell-names = "mac-address";
#gpio-cells = <2>;
gpio-controller;
led {
led-sources = <2>;
};
};
};

View file

@ -38,16 +38,26 @@
};
};
&cal_data {
nvmem-layout {
compatible = "fixed-layout";
#address-cells = <1>;
#size-cells = <1>;
cal_data_1fe00: calibration@1fe00 {
reg = <0x1fe00 0x200>;
};
};
};
&pci {
status = "okay";
wifi@1,0 {
compatible = "pci0,0";
compatible = "pci1814,3062";
reg = <0x0800 0 0 0 0>;
ralink,mtd-eeprom = <&cal_data 0x1fe00>;
nvmem-cells = <&macaddr_cfe_6a0 1>;
nvmem-cell-names = "mac-address";
nvmem-cells = <&cal_data_1fe00>, <&macaddr_cfe_6a0 1>;
nvmem-cell-names = "calibration", "mac-address";
};
};

View file

@ -3,6 +3,8 @@
set -e
. /lib/functions.sh
part=
offset_blocks=
block_size=
@ -99,8 +101,8 @@ switch() {
}
main() {
machine=$(sed -n -e 's/^machine\s\+:\s\+//p' < /proc/cpuinfo)
if [ "$machine" = "TP-Link Archer VR1200v (v2)" ]; then
case "$(board_name)" in
tplink,archer-vr1200v-v2)
# 03fe0000
part=$(part_named '"reserve"')
offset_blocks=0
@ -108,7 +110,8 @@ main() {
code_offset=0
code_openwrt=0000000101000002
code_factory=0000000101010003
elif [ "$machine" = "Nokia G-240G-E" ]; then
;;
nokia,g240g-e)
part=$(part_named '"flag"')
offset_blocks=0
block_size=$((1024 * 128))
@ -116,7 +119,8 @@ main() {
code_openwrt=000000000000000000000001000000010000000000000000
code_factory=000000000000000100000001000000010000000000000000
read_mask=000000000000000X00000000000000000000000000000000
elif [ "$machine" = "SmartFiber XP8421-B" ]; then
;;
smartfiber,xp8421-b)
# 0dfc0000
part=$(part_named '"reservearea"')
offset_blocks=12
@ -124,7 +128,8 @@ main() {
code_offset=0
code_openwrt=30000000
code_factory=31000000
elif [ "$machine" = "Zyxel PMG5617GA" ]; then
;;
zyxel,pmg5617ga)
# 00060fff
part=$(part_named '"reservearea"')
offset_blocks=3
@ -132,10 +137,12 @@ main() {
code_offset=4095
code_openwrt=30
code_factory=31
else
;;
*)
echo "Unsupported machine: $machine"
exit 1
fi
;;
esac
if [ "$1" = "factory" ]; then
switch factory

View file

@ -5,7 +5,7 @@
/ {
model = "Zyxel PMG5617GA";
compatible = "tplink,zyxel-pmg5617ga", "econet,en751221";
compatible = "zyxel,pmg5617ga", "econet,en751221";
memory@0 {
device_type = "memory";