} else
search_delay = wpas_p2p_search_delay(wpa_s);
+ pos = os_strstr(cmd, "freq=");
+ if (pos) {
+ pos += 5;
+ freq = atoi(pos);
+ if (freq <= 0)
+ return -1;
+ }
+
/* Must be searched for last, because it adds nul termination */
pos = os_strstr(cmd, " seek=");
if (pos)
seek_count = 1;
}
- pos = os_strstr(cmd, "freq=");
- if (pos) {
- pos += 5;
- freq = atoi(pos);
- if (freq <= 0)
- return -1;
- }
-
return wpas_p2p_find(wpa_s, timeout, type, _dev_type != NULL, _dev_type,
_dev_id, search_delay, seek_count, seek, freq);
}