mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-02-17 17:43:06 -05:00
Add possibility to set the setband parameter
Commit faf9a8585d3e187074c7991e1cd7fb3792baf53e added mechanism for selecting 2.4 or 5 GHz band for scan operation. However, no mechanism for setting the setband value was added at that time. This commit adds a new SET ctrl_iface parameter to allow the setband functionality to be used. "SET setband <AUTO/5G/2G>" can be used to select all bands, 5 GHz band only, or 2.4 GHz band only. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
7749b1c982
commit
209702d4c9
@ -441,6 +441,15 @@ static int wpa_supplicant_ctrl_iface_set(struct wpa_supplicant *wpa_s,
|
|||||||
} else if (os_strcmp(cmd, "blob") == 0) {
|
} else if (os_strcmp(cmd, "blob") == 0) {
|
||||||
ret = wpas_ctrl_set_blob(wpa_s, value);
|
ret = wpas_ctrl_set_blob(wpa_s, value);
|
||||||
#endif /* CONFIG_NO_CONFIG_BLOBS */
|
#endif /* CONFIG_NO_CONFIG_BLOBS */
|
||||||
|
} else if (os_strcasecmp(cmd, "setband") == 0) {
|
||||||
|
if (os_strcmp(value, "AUTO") == 0)
|
||||||
|
wpa_s->setband = WPA_SETBAND_AUTO;
|
||||||
|
else if (os_strcmp(value, "5G") == 0)
|
||||||
|
wpa_s->setband = WPA_SETBAND_5G;
|
||||||
|
else if (os_strcmp(value, "2G") == 0)
|
||||||
|
wpa_s->setband = WPA_SETBAND_2G;
|
||||||
|
else
|
||||||
|
ret = -1;
|
||||||
} else {
|
} else {
|
||||||
value[-1] = '=';
|
value[-1] = '=';
|
||||||
ret = wpa_config_process_global(wpa_s->conf, cmd, -1);
|
ret = wpa_config_process_global(wpa_s->conf, cmd, -1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user