[PATCH 06/26] MBO: Add non preferred channel configuration

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: David Spinadel <david.spinadel@xxxxxxxxx>

Add non preferred channel configuration to wpa_config for MBO.

Signed-off-by: David Spinadel <david.spinadel@xxxxxxxxx>
---
 wpa_supplicant/Makefile            |  5 +++++
 wpa_supplicant/config.c            |  6 ++++++
 wpa_supplicant/config.h            | 11 +++++++++++
 wpa_supplicant/config_file.c       |  6 ++++++
 wpa_supplicant/defconfig           |  3 +++
 wpa_supplicant/wpa_supplicant.conf |  9 +++++++++
 6 files changed, 40 insertions(+)

diff --git a/wpa_supplicant/Makefile b/wpa_supplicant/Makefile
index 234a0bf..99b2901 100644
--- a/wpa_supplicant/Makefile
+++ b/wpa_supplicant/Makefile
@@ -1634,6 +1634,11 @@ ifndef LDO
 LDO=$(CC)
 endif
 
+
+ifdef CONFIG_MBO
+CFLAGS += -DCONFIG_MBO
+endif
+
 Q=@
 E=echo
 ifeq ($(V), 1)
diff --git a/wpa_supplicant/config.c b/wpa_supplicant/config.c
index e345895..c14dd91 100644
--- a/wpa_supplicant/config.c
+++ b/wpa_supplicant/config.c
@@ -2286,6 +2286,9 @@ void wpa_config_free(struct wpa_config *config)
 	os_free(config->wowlan_triggers);
 	os_free(config->fst_group_id);
 	os_free(config->sched_scan_plans);
+#ifdef CONFIG_MBO
+	os_free(config->np_chan);
+#endif /* CONFIG_MBO */
 
 	os_free(config);
 }
@@ -4265,6 +4268,9 @@ static const struct global_parse_data global_fields[] = {
 #endif /* CONFIG_FST */
 	{ INT_RANGE(wpa_rsc_relaxation, 0, 1), 0 },
 	{ STR(sched_scan_plans), CFG_CHANGED_SCHED_SCAN_PLANS },
+#ifdef CONFIG_MBO
+	{ STR(np_chan), 0 },
+#endif /*CONFIG_MBO */
 };
 
 #undef FUNC
diff --git a/wpa_supplicant/config.h b/wpa_supplicant/config.h
index 86f940d..8afa37b 100644
--- a/wpa_supplicant/config.h
+++ b/wpa_supplicant/config.h
@@ -1275,6 +1275,17 @@ struct wpa_config {
 	 * format: <interval:iterations> <interval2:iterations2> ... <interval>
 	 */
 	 char *sched_scan_plans;
+
+#ifdef CONFIG_MBO
+	/**
+	 * np_chan - non preferred channels list, separated by spaces.
+	 *
+	 * format: op_class:chan:preference:reason<:detail>
+	 * Detail is optional.
+	 */
+	char *np_chan;
+#endif /* CONFIG_MBO */
+
 };
 
 
diff --git a/wpa_supplicant/config_file.c b/wpa_supplicant/config_file.c
index a1eb691..8a0045a 100644
--- a/wpa_supplicant/config_file.c
+++ b/wpa_supplicant/config_file.c
@@ -1327,6 +1327,12 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
 
 	if (config->sched_scan_plans)
 		fprintf(f, "sched_scan_plans=%s\n", config->sched_scan_plans);
+
+#ifdef CONFIG_MBO
+	if (config->np_chan)
+		fprintf(f, "np_chan=%s\n", config->np_chan);
+#endif /* CONFIG_MBO */
+
 }
 
 #endif /* CONFIG_NO_CONFIG_WRITE */
diff --git a/wpa_supplicant/defconfig b/wpa_supplicant/defconfig
index 8b1d121..6477934 100644
--- a/wpa_supplicant/defconfig
+++ b/wpa_supplicant/defconfig
@@ -539,3 +539,6 @@ CONFIG_PEERKEY=y
 # For more details refer to:
 # http://wireless.kernel.org/en/users/Documentation/acs
 #CONFIG_ACS=y
+
+# Support Multi Band Operation
+#CONFIG_MBO=y
diff --git a/wpa_supplicant/wpa_supplicant.conf b/wpa_supplicant/wpa_supplicant.conf
index 478cb82..3021d78 100644
--- a/wpa_supplicant/wpa_supplicant.conf
+++ b/wpa_supplicant/wpa_supplicant.conf
@@ -641,6 +641,15 @@ fast_reauth=1
 # Example:
 # sched_scan_plans=10:100 20:200 30
 
+# Multi Band Operation (MBO) non preferred channel
+# A space delimited list of non preferred channels, each channel is colon
+# delimited list of values. Reason detail is optional.
+# Format:
+# np_chan=<oper_class>:<chan>:<preference>:<reason>[:reason_detail]
+# Example:
+# np_chan="81:5:10:2:0 81:1:0:2:0 81:9:0:2"
+
+
 # network block
 #
 # Each network (usually AP's sharing the same SSID) is configured as a separate
-- 
1.9.1


_______________________________________________
Hostap mailing list
Hostap@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/hostap



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux