MBO: Add non-preferred channel configuration in wpa_supplicant
authorDavid Spinadel <david.spinadel@intel.com>
Mon, 15 Feb 2016 14:53:22 +0000 (16:53 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 21 Feb 2016 15:55:16 +0000 (17:55 +0200)
Add non-preferred channel configuration to wpa_config for MBO.

Signed-off-by: David Spinadel <david.spinadel@intel.com>
wpa_supplicant/Android.mk
wpa_supplicant/Makefile
wpa_supplicant/android.config
wpa_supplicant/config.c
wpa_supplicant/config.h
wpa_supplicant/config_file.c
wpa_supplicant/defconfig
wpa_supplicant/wpa_supplicant.conf

index 72af838..ac62f41 100644 (file)
@@ -822,6 +822,10 @@ L_CFLAGS += -DCONFIG_IEEE80211AC
 endif
 endif
 
+ifdef CONFIG_MBO
+L_CFLAGS += -DCONFIG_MBO
+endif
+
 ifdef NEED_AP_MLME
 OBJS += src/ap/wmm.c
 OBJS += src/ap/ap_list.c
index 234a0bf..bf2c0aa 100644 (file)
@@ -864,6 +864,10 @@ CFLAGS += -DCONFIG_IEEE80211AC
 endif
 endif
 
+ifdef CONFIG_MBO
+CFLAGS += -DCONFIG_MBO
+endif
+
 ifdef NEED_AP_MLME
 OBJS += ../src/ap/wmm.o
 OBJS += ../src/ap/ap_list.o
index e9c0a01..190bc5a 100644 (file)
@@ -482,4 +482,7 @@ CONFIG_WIFI_DISPLAY=y
 # Enable Fast Session Transfer (FST)
 #CONFIG_FST=y
 
+# Support Multi Band Operation
+#CONFIG_MBO=y
+
 include $(wildcard $(LOCAL_PATH)/android_config_*.inc)
index e345895..3319ed1 100644 (file)
@@ -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->non_pref_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(non_pref_chan), 0 },
+#endif /*CONFIG_MBO */
 };
 
 #undef FUNC
index 86f940d..27e9b98 100644 (file)
@@ -1275,6 +1275,16 @@ struct wpa_config {
         * format: <interval:iterations> <interval2:iterations2> ... <interval>
         */
         char *sched_scan_plans;
+
+#ifdef CONFIG_MBO
+       /**
+        * non_pref_chan - Non-preferred channels list, separated by spaces.
+        *
+        * format: op_class:chan:preference:reason<:detail>
+        * Detail is optional.
+        */
+       char *non_pref_chan;
+#endif /* CONFIG_MBO */
 };
 
 
index a1eb691..07822ef 100644 (file)
@@ -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->non_pref_chan)
+               fprintf(f, "non_pref_chan=%s\n", config->non_pref_chan);
+#endif /* CONFIG_MBO */
+
 }
 
 #endif /* CONFIG_NO_CONFIG_WRITE */
index a615c7c..79632e6 100644 (file)
@@ -542,3 +542,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
index 478cb82..a6e7bb9 100644 (file)
@@ -641,6 +641,14 @@ fast_reauth=1
 # Example:
 # sched_scan_plans=10:100 20:200 30
 
+# Multi Band Operation (MBO) non-preferred channels
+# A space delimited list of non-preferred channels where each channel is a colon
+# delimited list of values. Reason detail is optional.
+# Format:
+# non_pref_chan=<oper_class>:<chan>:<preference>:<reason>[:reason_detail]
+# Example:
+# non_pref_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