aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services
diff options
context:
space:
mode:
authorDavid Bauer <mail@david-bauer.net>2022-03-31 18:06:02 +0200
committerDavid Bauer <mail@david-bauer.net>2022-04-17 01:16:37 +0200
commit04bc07ab846eb9d713b73cd48978a316067fdff9 (patch)
tree24947f536c19c6cc5532a9e7826ea0e0c2775374 /package/network/services
parentd76b25938cafac8c77042334f7975e880404c448 (diff)
downloadupstream-04bc07ab846eb9d713b73cd48978a316067fdff9.tar.gz
upstream-04bc07ab846eb9d713b73cd48978a316067fdff9.tar.bz2
upstream-04bc07ab846eb9d713b73cd48978a316067fdff9.zip
hostapd: add support for enabling link measurements
Allow external processes to enable advertisement of link-measurement RRM capability. Signed-off-by: David Bauer <mail@david-bauer.net> (cherry picked from commit 2ca5c3da04c3f05a7477ae484768e03d4ca30711)
Diffstat (limited to 'package/network/services')
-rw-r--r--package/network/services/hostapd/src/src/ap/ubus.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index bdab8fa7b8..83de03b05b 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -995,6 +995,7 @@ hostapd_rrm_print_nr(struct hostapd_neighbor_entry *nr)
enum {
BSS_MGMT_EN_NEIGHBOR,
BSS_MGMT_EN_BEACON,
+ BSS_MGMT_EN_LINK_MEASUREMENT,
#ifdef CONFIG_WNM_AP
BSS_MGMT_EN_BSS_TRANSITION,
#endif
@@ -1027,6 +1028,14 @@ __hostapd_bss_mgmt_enable_f(struct hostapd_data *hapd, int flag)
bss->radio_measurements[0] |= (u8) flags;
return true;
+ case BSS_MGMT_EN_LINK_MEASUREMENT:
+ flags = WLAN_RRM_CAPS_LINK_MEASUREMENT;
+
+ if (bss->radio_measurements[0] & flags == flags)
+ return false;
+
+ bss->radio_measurements[0] |= (u8) flags;
+ return true;
#ifdef CONFIG_WNM_AP
case BSS_MGMT_EN_BSS_TRANSITION:
if (bss->bss_transition)
@@ -1059,6 +1068,7 @@ __hostapd_bss_mgmt_enable(struct hostapd_data *hapd, uint32_t flags)
static const struct blobmsg_policy bss_mgmt_enable_policy[__BSS_MGMT_EN_MAX] = {
[BSS_MGMT_EN_NEIGHBOR] = { "neighbor_report", BLOBMSG_TYPE_BOOL },
[BSS_MGMT_EN_BEACON] = { "beacon_report", BLOBMSG_TYPE_BOOL },
+ [BSS_MGMT_EN_LINK_MEASUREMENT] = { "link_measurement", BLOBMSG_TYPE_BOOL },
#ifdef CONFIG_WNM_AP
[BSS_MGMT_EN_BSS_TRANSITION] = { "bss_transition", BLOBMSG_TYPE_BOOL },
#endif