]> git.ipfire.org Git - thirdparty/hostap.git/blobdiff - wpa_supplicant/ctrl_iface.c
WNM: Collocated Interference Reporting
[thirdparty/hostap.git] / wpa_supplicant / ctrl_iface.c
index 945ab9c4dd6b7071c376c8e274527e7ae6da6eb5..77a3133d8d5605e35e5c7fe5da72aca33dd0c7d4 100644 (file)
@@ -750,6 +750,15 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
                ret = wpas_ctrl_iface_set_ric_ies(wpa_s, value);
        } else if (os_strcasecmp(cmd, "roaming") == 0) {
                ret = wpa_drv_roaming(wpa_s, atoi(value), NULL);
+#ifdef CONFIG_WNM
+       } else if (os_strcasecmp(cmd, "coloc_intf_elems") == 0) {
+               struct wpabuf *elems;
+
+               elems = wpabuf_parse_bin(value);
+               if (!elems)
+                       return -1;
+               wnm_set_coloc_intf_elems(wpa_s, elems);
+#endif /* CONFIG_WNM */
        } else {
                value[-1] = '=';
                ret = wpa_config_process_global(wpa_s->conf, cmd, -1);
@@ -7437,6 +7446,22 @@ static int wpas_ctrl_iface_wnm_bss_query(struct wpa_supplicant *wpa_s, char *cmd
                                                  list);
 }
 
+
+static int wpas_ctrl_iface_coloc_intf_report(struct wpa_supplicant *wpa_s,
+                                            char *cmd)
+{
+       struct wpabuf *elems;
+       int ret;
+
+       elems = wpabuf_parse_bin(cmd);
+       if (!elems)
+               return -1;
+
+       ret = wnm_send_coloc_intf_report(wpa_s, 0, elems);
+       wpabuf_free(elems);
+       return ret;
+}
+
 #endif /* CONFIG_WNM */
 
 
@@ -10423,6 +10448,9 @@ char * wpa_supplicant_ctrl_iface_process(struct wpa_supplicant *wpa_s,
        } else if (os_strncmp(buf, "WNM_BSS_QUERY ", 14) == 0) {
                if (wpas_ctrl_iface_wnm_bss_query(wpa_s, buf + 14))
                                reply_len = -1;
+       } else if (os_strncmp(buf, "COLOC_INTF_REPORT ", 18) == 0) {
+               if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
+                       reply_len = -1;
 #endif /* CONFIG_WNM */
        } else if (os_strcmp(buf, "FLUSH") == 0) {
                wpa_supplicant_ctrl_iface_flush(wpa_s);