Change version number to v2.6 for the release
[mech_eap.git] / wpa_supplicant / ctrl_iface.c
index 231464f..d814fdf 100644 (file)
@@ -515,6 +515,8 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
                wpa_s->ignore_auth_resp = !!atoi(value);
        } else if (os_strcasecmp(cmd, "ignore_assoc_disallow") == 0) {
                wpa_s->ignore_assoc_disallow = !!atoi(value);
+       } else if (os_strcasecmp(cmd, "reject_btm_req_reason") == 0) {
+               wpa_s->reject_btm_req_reason = atoi(value);
 #endif /* CONFIG_TESTING_OPTIONS */
 #ifndef CONFIG_NO_CONFIG_BLOBS
        } else if (os_strcmp(cmd, "blob") == 0) {
@@ -6381,6 +6383,7 @@ static int get_anqp(struct wpa_supplicant *wpa_s, char *dst)
        u16 id[MAX_ANQP_INFO_ID];
        size_t num_id = 0;
        u32 subtypes = 0;
+       int get_cell_pref = 0;
 
        used = hwaddr_aton2(dst, dst_addr);
        if (used < 0)
@@ -6398,6 +6401,15 @@ static int get_anqp(struct wpa_supplicant *wpa_s, char *dst)
 #else /* CONFIG_HS20 */
                        return -1;
 #endif /* CONFIG_HS20 */
+               } else if (os_strncmp(pos, "mbo:", 4) == 0) {
+#ifdef CONFIG_MBO
+                       int num = atoi(pos + 4);
+                       if (num != MBO_ANQP_SUBTYPE_CELL_CONN_PREF)
+                               return -1;
+                       get_cell_pref = 1;
+#else /* CONFIG_MBO */
+                       return -1;
+#endif /* CONFIG_MBO */
                } else {
                        id[num_id] = atoi(pos);
                        if (id[num_id])
@@ -6412,7 +6424,8 @@ static int get_anqp(struct wpa_supplicant *wpa_s, char *dst)
        if (num_id == 0)
                return -1;
 
-       return anqp_send_req(wpa_s, dst_addr, id, num_id, subtypes);
+       return anqp_send_req(wpa_s, dst_addr, id, num_id, subtypes,
+                            get_cell_pref);
 }
 
 
@@ -7205,6 +7218,7 @@ static void wpa_supplicant_ctrl_iface_flush(struct wpa_supplicant *wpa_s)
        wpa_s->p2p_go_csa_on_inv = 0;
        wpa_s->ignore_auth_resp = 0;
        wpa_s->ignore_assoc_disallow = 0;
+       wpa_s->reject_btm_req_reason = 0;
        wpa_sm_set_test_assoc_ie(wpa_s->wpa, NULL);
 #endif /* CONFIG_TESTING_OPTIONS */
 
@@ -8561,10 +8575,7 @@ static int wpas_ctrl_iface_mac_rand_scan(struct wpa_supplicant *wpa_s,
                        }
                } else if (wpa_s->sched_scanning &&
                           (type & MAC_ADDR_RAND_SCHED_SCAN)) {
-                       /* simulate timeout to restart the sched scan */
-                       wpa_s->sched_scan_timed_out = 1;
-                       wpa_s->prev_sched_ssid = NULL;
-                       wpa_supplicant_cancel_sched_scan(wpa_s);
+                       wpas_scan_restart_sched_scan(wpa_s);
                }
                return 0;
        }
@@ -8590,12 +8601,8 @@ static int wpas_ctrl_iface_mac_rand_scan(struct wpa_supplicant *wpa_s,
                wpas_mac_addr_rand_scan_set(wpa_s, MAC_ADDR_RAND_SCHED_SCAN,
                                            addr, mask);
 
-               if (wpa_s->sched_scanning && !wpa_s->pno) {
-                       /* simulate timeout to restart the sched scan */
-                       wpa_s->sched_scan_timed_out = 1;
-                       wpa_s->prev_sched_ssid = NULL;
-                       wpa_supplicant_cancel_sched_scan(wpa_s);
-               }
+               if (wpa_s->sched_scanning && !wpa_s->pno)
+                       wpas_scan_restart_sched_scan(wpa_s);
        }
 
        if (type & MAC_ADDR_RAND_PNO) {