mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2026-03-20 03:39:54 +00:00
Compare commits
7 Commits
next
...
staging-WI
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08e0f1d6cd | ||
|
|
ec9a4cb6a6 | ||
|
|
258ffd639e | ||
|
|
5bfe686784 | ||
|
|
b47b071ef5 | ||
|
|
29a245e468 | ||
|
|
d303683ace |
@@ -972,8 +972,8 @@ hostapd_set_bss_options() {
|
||||
set_default rrm_beacon_report 0
|
||||
fi
|
||||
|
||||
[ "$rrm_neighbor_report" -eq "1" ] && append bss_conf "rrm_neighbor_report=1" "$N"
|
||||
[ "$rrm_beacon_report" -eq "1" ] && append bss_conf "rrm_beacon_report=1" "$N"
|
||||
append bss_conf "rrm_neighbor_report=$rrm_neighbor_report" "$N"
|
||||
append bss_conf "rrm_beacon_report=$rrm_beacon_report" "$N"
|
||||
|
||||
json_get_vars ftm_responder stationary_ap lci civic
|
||||
set_default ftm_responder 0
|
||||
|
||||
@@ -0,0 +1,139 @@
|
||||
From bc7ad0243307f12fbcb29200e7798b5290175a5f Mon Sep 17 00:00:00 2001
|
||||
From: Venkat Chimata <venkat@nearhop.com>
|
||||
Date: Fri, 6 Feb 2026 01:24:36 +0530
|
||||
Subject: [PATCH] WiFi-6 / hostapd/ubus: Clear bss_mgmt_enable params when they
|
||||
are disabled.
|
||||
|
||||
bss_mgmt_enable params -neighbor_report, beacon_report and bss_transition -
|
||||
once enabled through the ubus, are not disabled.
|
||||
Disable them when they are not set.
|
||||
|
||||
Signed-off-by: Venkat Chimata <venkat@nearhop.com>
|
||||
---
|
||||
src/ap/ubus.c | 87 ++++++++++++++++++++---
|
||||
1 file changed, 79 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/ap/ubus.c b/src/ap/ubus.c
|
||||
index 2f7fdc0..cd8ffc5 100644
|
||||
--- a/src/ap/ubus.c
|
||||
+++ b/src/ap/ubus.c
|
||||
@@ -1016,6 +1016,70 @@ __hostapd_bss_mgmt_enable_f(struct hostapd_data *hapd, int flag)
|
||||
}
|
||||
}
|
||||
|
||||
+static bool
|
||||
+__hostapd_bss_mgmt_disable_f(struct hostapd_data *hapd, int flag)
|
||||
+{
|
||||
+ struct hostapd_bss_config *bss = hapd->conf;
|
||||
+ uint32_t flags;
|
||||
+
|
||||
+ switch (flag) {
|
||||
+ case BSS_MGMT_EN_NEIGHBOR:
|
||||
+ if (bss->radio_measurements[0] &
|
||||
+ WLAN_RRM_CAPS_NEIGHBOR_REPORT) {
|
||||
+ bss->radio_measurements[0] &=
|
||||
+ ~WLAN_RRM_CAPS_NEIGHBOR_REPORT;
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ case BSS_MGMT_EN_BEACON:
|
||||
+ flags = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
|
||||
+ WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
|
||||
+ WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
|
||||
+
|
||||
+ if (bss->radio_measurements[0] & flags == flags) {
|
||||
+ bss->radio_measurements[0] &= ~(u8) flags;
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+#ifdef CONFIG_WNM_AP
|
||||
+ case BSS_MGMT_EN_BSS_TRANSITION:
|
||||
+ if (bss->bss_transition) {
|
||||
+ bss->bss_transition = 0;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ bss->bss_transition = 0;
|
||||
+ return false;
|
||||
+#endif
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+__hostapd_bss_mgmt_get_f(struct hostapd_data *hapd)
|
||||
+{
|
||||
+ struct hostapd_bss_config *bss = hapd->conf;
|
||||
+ uint32_t beacon_flags;
|
||||
+ int flags = 0;
|
||||
+
|
||||
+
|
||||
+ if (bss->radio_measurements[0] &
|
||||
+ WLAN_RRM_CAPS_NEIGHBOR_REPORT) {
|
||||
+ flags |= (1 << BSS_MGMT_EN_NEIGHBOR);
|
||||
+ }
|
||||
+ beacon_flags = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
|
||||
+ WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
|
||||
+ WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
|
||||
+
|
||||
+ if (bss->radio_measurements[0] & beacon_flags == beacon_flags) {
|
||||
+ flags |= (1 << BSS_MGMT_EN_BEACON);
|
||||
+ }
|
||||
+#ifdef CONFIG_WNM_AP
|
||||
+ if (bss->bss_transition) {
|
||||
+ flags |= (1 << BSS_MGMT_EN_BSS_TRANSITION);
|
||||
+ }
|
||||
+#endif
|
||||
+ return flags;
|
||||
+}
|
||||
static void
|
||||
__hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
|
||||
{
|
||||
@@ -1023,10 +1087,11 @@ __hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < __BSS_MGMT_EN_MAX; i++) {
|
||||
- if (!(flags & (1 << i)))
|
||||
- continue;
|
||||
-
|
||||
- update |= __hostapd_bss_mgmt_enable_f(hapd, i);
|
||||
+ if (!(flags & (1 << i))) {
|
||||
+ update |= __hostapd_bss_mgmt_disable_f(hapd, i);
|
||||
+ } else {
|
||||
+ update |= __hostapd_bss_mgmt_enable_f(hapd, i);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (update)
|
||||
@@ -1057,11 +1122,16 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
|
||||
blobmsg_parse(bss_mgmt_enable_policy, __BSS_MGMT_EN_MAX, tb, blob_data(msg), blob_len(msg));
|
||||
|
||||
+ flags = __hostapd_bss_mgmt_get_f(hapd);
|
||||
for (i = 0; i < ARRAY_SIZE(tb); i++) {
|
||||
- if (!tb[i] || !blobmsg_get_bool(tb[i]))
|
||||
+ if (!tb[i]) {
|
||||
continue;
|
||||
-
|
||||
- flags |= (1 << i);
|
||||
+ }
|
||||
+ if (blobmsg_get_bool(tb[i])) {
|
||||
+ flags |= (1 << i);
|
||||
+ } else {
|
||||
+ flags &= ~(1 << i);
|
||||
+ }
|
||||
}
|
||||
|
||||
__hostapd_bss_mgmt_enable(hapd, flags);
|
||||
@@ -1071,7 +1141,8 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
static void
|
||||
hostapd_rrm_nr_enable(struct hostapd_data *hapd)
|
||||
{
|
||||
- __hostapd_bss_mgmt_enable(hapd, 1 << BSS_MGMT_EN_NEIGHBOR);
|
||||
+ int flags = __hostapd_bss_mgmt_get_f(hapd);
|
||||
+ __hostapd_bss_mgmt_enable(hapd, flags | (1 << BSS_MGMT_EN_NEIGHBOR));
|
||||
}
|
||||
|
||||
static int
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -964,8 +964,8 @@ hostapd_set_bss_options() {
|
||||
set_default rrm_beacon_report 0
|
||||
fi
|
||||
|
||||
[ "$rrm_neighbor_report" -eq "1" ] && append bss_conf "rrm_neighbor_report=1" "$N"
|
||||
[ "$rrm_beacon_report" -eq "1" ] && append bss_conf "rrm_beacon_report=1" "$N"
|
||||
append bss_conf "rrm_neighbor_report=$rrm_neighbor_report" "$N"
|
||||
append bss_conf "rrm_beacon_report=$rrm_beacon_report" "$N"
|
||||
[ "$rnr" -eq "1" ] && append bss_conf "rnr=1" "$N"
|
||||
|
||||
json_get_vars ftm_responder stationary_ap lci civic
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
From 7d2f21d50e06755968953093a5d5badc811cbbc1 Mon Sep 17 00:00:00 2001
|
||||
From: Venkat Chimata <venkat@nearhop.com>
|
||||
Date: Thu, 5 Feb 2026 22:13:56 +0530
|
||||
Subject: [PATCH] hostapd/ubus: Clear bss_mgmt_enable params when they are
|
||||
disabled.
|
||||
|
||||
bss_mgmt_enable params -neighbor_report, beacon_report and bss_transition -
|
||||
once enabled through the ubus, are not disabled.
|
||||
Disable them when they are not set.
|
||||
|
||||
Signed-off-by: Venkat Chimata <venkat@nearhop.com>
|
||||
---
|
||||
src/ap/ubus.c | 88 +++++++++++++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 79 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/ap/ubus.c b/src/ap/ubus.c
|
||||
index 4eb5a11..30e8a21 100644
|
||||
--- a/src/ap/ubus.c
|
||||
+++ b/src/ap/ubus.c
|
||||
@@ -947,7 +947,6 @@ __hostapd_bss_mgmt_enable_f(struct hostapd_data *hapd, int flag)
|
||||
if (bss->radio_measurements[0] &
|
||||
WLAN_RRM_CAPS_NEIGHBOR_REPORT)
|
||||
return false;
|
||||
-
|
||||
bss->radio_measurements[0] |=
|
||||
WLAN_RRM_CAPS_NEIGHBOR_REPORT;
|
||||
hostapd_neighbor_set_own_report(hapd);
|
||||
@@ -973,6 +972,70 @@ __hostapd_bss_mgmt_enable_f(struct hostapd_data *hapd, int flag)
|
||||
}
|
||||
}
|
||||
|
||||
+static bool
|
||||
+__hostapd_bss_mgmt_disable_f(struct hostapd_data *hapd, int flag)
|
||||
+{
|
||||
+ struct hostapd_bss_config *bss = hapd->conf;
|
||||
+ uint32_t flags;
|
||||
+
|
||||
+ switch (flag) {
|
||||
+ case BSS_MGMT_EN_NEIGHBOR:
|
||||
+ if (bss->radio_measurements[0] &
|
||||
+ WLAN_RRM_CAPS_NEIGHBOR_REPORT) {
|
||||
+ bss->radio_measurements[0] &=
|
||||
+ ~WLAN_RRM_CAPS_NEIGHBOR_REPORT;
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ case BSS_MGMT_EN_BEACON:
|
||||
+ flags = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
|
||||
+ WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
|
||||
+ WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
|
||||
+
|
||||
+ if (bss->radio_measurements[0] & flags == flags) {
|
||||
+ bss->radio_measurements[0] &= ~(u8) flags;
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+#ifdef CONFIG_WNM_AP
|
||||
+ case BSS_MGMT_EN_BSS_TRANSITION:
|
||||
+ if (bss->bss_transition) {
|
||||
+ bss->bss_transition = 0;
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ bss->bss_transition = 0;
|
||||
+ return false;
|
||||
+#endif
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+__hostapd_bss_mgmt_get_f(struct hostapd_data *hapd)
|
||||
+{
|
||||
+ struct hostapd_bss_config *bss = hapd->conf;
|
||||
+ uint32_t beacon_flags;
|
||||
+ int flags = 0;
|
||||
+
|
||||
+
|
||||
+ if (bss->radio_measurements[0] &
|
||||
+ WLAN_RRM_CAPS_NEIGHBOR_REPORT) {
|
||||
+ flags |= (1 << BSS_MGMT_EN_NEIGHBOR);
|
||||
+ }
|
||||
+ beacon_flags = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
|
||||
+ WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
|
||||
+ WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
|
||||
+
|
||||
+ if (bss->radio_measurements[0] & beacon_flags == beacon_flags) {
|
||||
+ flags |= (1 << BSS_MGMT_EN_BEACON);
|
||||
+ }
|
||||
+#ifdef CONFIG_WNM_AP
|
||||
+ if (bss->bss_transition) {
|
||||
+ flags |= (1 << BSS_MGMT_EN_BSS_TRANSITION);
|
||||
+ }
|
||||
+#endif
|
||||
+ return flags;
|
||||
+}
|
||||
static void
|
||||
__hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
|
||||
{
|
||||
@@ -980,10 +1043,11 @@ __hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < __BSS_MGMT_EN_MAX; i++) {
|
||||
- if (!(flags & (1 << i)))
|
||||
- continue;
|
||||
-
|
||||
- update |= __hostapd_bss_mgmt_enable_f(hapd, i);
|
||||
+ if (!(flags & (1 << i))) {
|
||||
+ update |= __hostapd_bss_mgmt_disable_f(hapd, i);
|
||||
+ } else {
|
||||
+ update |= __hostapd_bss_mgmt_enable_f(hapd, i);
|
||||
+ }
|
||||
}
|
||||
|
||||
if (update)
|
||||
@@ -1014,11 +1078,16 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
|
||||
blobmsg_parse(bss_mgmt_enable_policy, __BSS_MGMT_EN_MAX, tb, blob_data(msg), blob_len(msg));
|
||||
|
||||
+ flags = __hostapd_bss_mgmt_get_f(hapd);
|
||||
for (i = 0; i < ARRAY_SIZE(tb); i++) {
|
||||
- if (!tb[i] || !blobmsg_get_bool(tb[i]))
|
||||
+ if (!tb[i]) {
|
||||
continue;
|
||||
-
|
||||
- flags |= (1 << i);
|
||||
+ }
|
||||
+ if (blobmsg_get_bool(tb[i])) {
|
||||
+ flags |= (1 << i);
|
||||
+ } else {
|
||||
+ flags &= ~(1 << i);
|
||||
+ }
|
||||
}
|
||||
|
||||
__hostapd_bss_mgmt_enable(hapd, flags);
|
||||
@@ -1028,7 +1097,8 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
static void
|
||||
hostapd_rrm_nr_enable(struct hostapd_data *hapd)
|
||||
{
|
||||
- __hostapd_bss_mgmt_enable(hapd, 1 << BSS_MGMT_EN_NEIGHBOR);
|
||||
+ int flags = __hostapd_bss_mgmt_get_f(hapd);
|
||||
+ __hostapd_bss_mgmt_enable(hapd, flags | (1 << BSS_MGMT_EN_NEIGHBOR));
|
||||
}
|
||||
|
||||
static int
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -151,7 +151,6 @@ function interfaces_subunsub(path, sub) {
|
||||
//global.ubus.conn.call(path, 'notify_response', { 'notify_response': 1 });
|
||||
|
||||
/* tell hostapd to enable rrm/roaming */
|
||||
global.ubus.conn.call(path, 'bss_mgmt_enable', { 'neighbor_report': 1, 'beacon_report': 1, 'bss_transition': 1 });
|
||||
|
||||
/* instantiate state */
|
||||
interfaces[name] = { };
|
||||
@@ -165,14 +164,21 @@ function interfaces_subunsub(path, sub) {
|
||||
interfaces[name].virtual_phys = length(split(status.phy, ".")) > 1 ? true : false;
|
||||
interfaces[name].band = freq2band(status?.freq);
|
||||
|
||||
/* ask hostapd for the local neighbourhood report data */
|
||||
let rrm = global.ubus.conn.call(path, 'rrm_nr_get_own');
|
||||
if (rrm && rrm.value) {
|
||||
interfaces[name].rrm_nr = rrm.value;
|
||||
global.neighbor.local_add(name, rrm.value);
|
||||
}
|
||||
uci.load("wireless");
|
||||
let neigh = uci.get('wireless', interfaces[name].uci_section, 'ieee80211k');
|
||||
if (neigh == "1") {
|
||||
global.ubus.conn.call(path, 'bss_mgmt_enable', { 'neighbor_report': true, 'beacon_report': true, 'bss_transition': true});
|
||||
/* ask hostapd for the local neighbourhood report data */
|
||||
let rrm = global.ubus.conn.call(path, 'rrm_nr_get_own');
|
||||
if (rrm && rrm.value) {
|
||||
interfaces[name].rrm_nr = rrm.value;
|
||||
global.neighbor.local_add(name, rrm.value);
|
||||
}
|
||||
|
||||
global.neighbor.update();
|
||||
global.neighbor.update();
|
||||
} else {
|
||||
global.ubus.conn.call(path, 'bss_mgmt_enable', { 'neighbor_report': false, 'beacon_report': true, 'bss_transition': true });
|
||||
}
|
||||
|
||||
/* trigger an initial channel survey */
|
||||
//channel_survey(name);
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
From 66b00bc55ad8b135313af7b4996d1b93e95eb573 Mon Sep 17 00:00:00 2001
|
||||
From: Venkat Chimata <venkat@nearhop.com>
|
||||
Date: Wed, 11 Feb 2026 20:07:00 +0530
|
||||
Subject: [PATCH] hostapd/ubus: Clear bss_mgmt_enable params when they are
|
||||
disabled.
|
||||
|
||||
bss_mgmt_enable params -neighbor_report, beacon_report and bss_transition -
|
||||
once enabled through the ubus, are not disabled.
|
||||
Disable them when they are not set.
|
||||
|
||||
Signed-off-by: Venkat Chimata <venkat@nearhop.com>
|
||||
---
|
||||
...-ubus-Clear-bss_mgmt_enable-params-w.patch | 139 ++++++++++++++++++
|
||||
1 file changed, 139 insertions(+)
|
||||
create mode 100644 package/network/services/hostapd/patches/zzzz-003-Mediatek-hostapd-ubus-Clear-bss_mgmt_enable-params-w.patch
|
||||
|
||||
diff --git a/package/network/services/hostapd/patches/zzzz-003-Mediatek-hostapd-ubus-Clear-bss_mgmt_enable-params-w.patch b/package/network/services/hostapd/patches/zzzz-003-Mediatek-hostapd-ubus-Clear-bss_mgmt_enable-params-w.patch
|
||||
new file mode 100644
|
||||
index 0000000000..828dad2ff8
|
||||
--- /dev/null
|
||||
+++ b/package/network/services/hostapd/patches/zzzz-003-Mediatek-hostapd-ubus-Clear-bss_mgmt_enable-params-w.patch
|
||||
@@ -0,0 +1,139 @@
|
||||
+From 76c7c55020f8ec497642b0e6c8cb0010c86961ff Mon Sep 17 00:00:00 2001
|
||||
+From: Venkat Chimata <venkat@nearhop.com>
|
||||
+Date: Fri, 6 Feb 2026 01:39:21 +0530
|
||||
+Subject: [PATCH] Mediatek / hostapd/ubus: Clear bss_mgmt_enable params when
|
||||
+ they are disabled.
|
||||
+
|
||||
+bss_mgmt_enable params -neighbor_report, beacon_report and bss_transition -
|
||||
+once enabled through the ubus, are not disabled.
|
||||
+Disable them when they are not set.
|
||||
+
|
||||
+Signed-off-by: Venkat Chimata <venkat@nearhop.com>
|
||||
+---
|
||||
+ src/ap/ubus.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++-----
|
||||
+ 1 file changed, 79 insertions(+), 8 deletions(-)
|
||||
+
|
||||
+diff --git a/src/ap/ubus.c b/src/ap/ubus.c
|
||||
+index 0205fa6..76eee03 100644
|
||||
+--- a/src/ap/ubus.c
|
||||
++++ b/src/ap/ubus.c
|
||||
+@@ -994,6 +994,70 @@ __hostapd_bss_mgmt_enable_f(struct hostapd_data *hapd, int flag)
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
++static bool
|
||||
++__hostapd_bss_mgmt_disable_f(struct hostapd_data *hapd, int flag)
|
||||
++{
|
||||
++ struct hostapd_bss_config *bss = hapd->conf;
|
||||
++ uint32_t flags;
|
||||
++
|
||||
++ switch (flag) {
|
||||
++ case BSS_MGMT_EN_NEIGHBOR:
|
||||
++ if (bss->radio_measurements[0] &
|
||||
++ WLAN_RRM_CAPS_NEIGHBOR_REPORT) {
|
||||
++ bss->radio_measurements[0] &=
|
||||
++ ~WLAN_RRM_CAPS_NEIGHBOR_REPORT;
|
||||
++ return true;
|
||||
++ }
|
||||
++ return false;
|
||||
++ case BSS_MGMT_EN_BEACON:
|
||||
++ flags = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
|
||||
++ WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
|
||||
++ WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
|
||||
++
|
||||
++ if (bss->radio_measurements[0] & flags == flags) {
|
||||
++ bss->radio_measurements[0] &= ~(u8) flags;
|
||||
++ return true;
|
||||
++ }
|
||||
++ return false;
|
||||
++#ifdef CONFIG_WNM_AP
|
||||
++ case BSS_MGMT_EN_BSS_TRANSITION:
|
||||
++ if (bss->bss_transition) {
|
||||
++ bss->bss_transition = 0;
|
||||
++ return true;
|
||||
++ }
|
||||
++
|
||||
++ bss->bss_transition = 0;
|
||||
++ return false;
|
||||
++#endif
|
||||
++ }
|
||||
++}
|
||||
++
|
||||
++static int
|
||||
++__hostapd_bss_mgmt_get_f(struct hostapd_data *hapd)
|
||||
++{
|
||||
++ struct hostapd_bss_config *bss = hapd->conf;
|
||||
++ uint32_t beacon_flags;
|
||||
++ int flags = 0;
|
||||
++
|
||||
++
|
||||
++ if (bss->radio_measurements[0] &
|
||||
++ WLAN_RRM_CAPS_NEIGHBOR_REPORT) {
|
||||
++ flags |= (1 << BSS_MGMT_EN_NEIGHBOR);
|
||||
++ }
|
||||
++ beacon_flags = WLAN_RRM_CAPS_BEACON_REPORT_PASSIVE |
|
||||
++ WLAN_RRM_CAPS_BEACON_REPORT_ACTIVE |
|
||||
++ WLAN_RRM_CAPS_BEACON_REPORT_TABLE;
|
||||
++
|
||||
++ if (bss->radio_measurements[0] & beacon_flags == beacon_flags) {
|
||||
++ flags |= (1 << BSS_MGMT_EN_BEACON);
|
||||
++ }
|
||||
++#ifdef CONFIG_WNM_AP
|
||||
++ if (bss->bss_transition) {
|
||||
++ flags |= (1 << BSS_MGMT_EN_BSS_TRANSITION);
|
||||
++ }
|
||||
++#endif
|
||||
++ return flags;
|
||||
++}
|
||||
+ static void
|
||||
+ __hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
|
||||
+ {
|
||||
+@@ -1001,10 +1065,11 @@ __hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
|
||||
+ int i;
|
||||
+
|
||||
+ for (i = 0; i < __BSS_MGMT_EN_MAX; i++) {
|
||||
+- if (!(flags & (1 << i)))
|
||||
+- continue;
|
||||
+-
|
||||
+- update |= __hostapd_bss_mgmt_enable_f(hapd, i);
|
||||
++ if (!(flags & (1 << i))) {
|
||||
++ update |= __hostapd_bss_mgmt_disable_f(hapd, i);
|
||||
++ } else {
|
||||
++ update |= __hostapd_bss_mgmt_enable_f(hapd, i);
|
||||
++ }
|
||||
+ }
|
||||
+
|
||||
+ if (update)
|
||||
+@@ -1035,11 +1100,16 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
+
|
||||
+ blobmsg_parse(bss_mgmt_enable_policy, __BSS_MGMT_EN_MAX, tb, blob_data(msg), blob_len(msg));
|
||||
+
|
||||
++ flags = __hostapd_bss_mgmt_get_f(hapd);
|
||||
+ for (i = 0; i < ARRAY_SIZE(tb); i++) {
|
||||
+- if (!tb[i] || !blobmsg_get_bool(tb[i]))
|
||||
++ if (!tb[i]) {
|
||||
+ continue;
|
||||
+-
|
||||
+- flags |= (1 << i);
|
||||
++ }
|
||||
++ if (blobmsg_get_bool(tb[i])) {
|
||||
++ flags |= (1 << i);
|
||||
++ } else {
|
||||
++ flags &= ~(1 << i);
|
||||
++ }
|
||||
+ }
|
||||
+
|
||||
+ __hostapd_bss_mgmt_enable(hapd, flags);
|
||||
+@@ -1049,7 +1119,8 @@ hostapd_bss_mgmt_enable(struct ubus_context *ctx, struct ubus_object *obj,
|
||||
+ static void
|
||||
+ hostapd_rrm_nr_enable(struct hostapd_data *hapd)
|
||||
+ {
|
||||
+- __hostapd_bss_mgmt_enable(hapd, 1 << BSS_MGMT_EN_NEIGHBOR);
|
||||
++ int flags = __hostapd_bss_mgmt_get_f(hapd);
|
||||
++ __hostapd_bss_mgmt_enable(hapd, flags | (1 << BSS_MGMT_EN_NEIGHBOR));
|
||||
+ }
|
||||
+
|
||||
+ static int
|
||||
+--
|
||||
+2.34.1
|
||||
+
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 777a360767110e276abe9c39264332b6787077d4 Mon Sep 17 00:00:00 2001
|
||||
From: Venkat Chimata <venkat@nearhop.com>
|
||||
Date: Sat, 14 Mar 2026 22:24:59 +0530
|
||||
Subject: [PATCH] hostapd/wifi-7: fix RRM neighbor report value not updating on
|
||||
hot reload
|
||||
|
||||
- Ensure rrm_neighbor_report is always set based on the current configuration during hot reload.
|
||||
- Prevent previously enabled values from being unintentionally preserved.
|
||||
- Allows both enable and disable transitions to take effect correctly without requiring a full restart.
|
||||
|
||||
Signed-off-by: Venkat Chimata <venkat@nearhop.com>
|
||||
---
|
||||
.../network/config/wifi-scripts/files/lib/netifd/hostapd.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
|
||||
index 5ab6088599..cf4a2b79f4 100644
|
||||
--- a/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
|
||||
+++ b/package/network/config/wifi-scripts/files/lib/netifd/hostapd.sh
|
||||
@@ -989,8 +989,8 @@ hostapd_set_bss_options() {
|
||||
set_default rrm_beacon_report 0
|
||||
fi
|
||||
|
||||
- [ "$rrm_neighbor_report" -eq "1" ] && append bss_conf "rrm_neighbor_report=1" "$N"
|
||||
- [ "$rrm_beacon_report" -eq "1" ] && append bss_conf "rrm_beacon_report=1" "$N"
|
||||
+ append bss_conf "rrm_neighbor_report=$rrm_neighbor_report" "$N"
|
||||
+ append bss_conf "rrm_beacon_report=$rrm_beacon_report" "$N"
|
||||
[ "$rnr" -eq "1" ] && append bss_conf "rnr=1" "$N"
|
||||
|
||||
json_get_vars ftm_responder stationary_ap lci civic
|
||||
--
|
||||
2.34.1
|
||||
|
||||
Reference in New Issue
Block a user