Renamed the 'alpha2' variable to 'country' to match with config string
This commit is contained in:
parent
814e925dc4
commit
315ce40a00
3 changed files with 9 additions and 9 deletions
|
@ -254,12 +254,12 @@ struct wpa_config {
|
||||||
u8 uuid[16];
|
u8 uuid[16];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* alpha2 - Country code
|
* country - Country code
|
||||||
*
|
*
|
||||||
* This is the ISO/IEC alpha2 country code for which we are operating
|
* This is the ISO/IEC alpha2 country code for which we are operating
|
||||||
* in
|
* in
|
||||||
*/
|
*/
|
||||||
char alpha2[2];
|
char country[2];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -276,10 +276,10 @@ static int wpa_config_process_country(struct wpa_config *config, char *pos)
|
||||||
wpa_printf(MSG_DEBUG, "Invalid country set");
|
wpa_printf(MSG_DEBUG, "Invalid country set");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
config->alpha2[0] = pos[0];
|
config->country[0] = pos[0];
|
||||||
config->alpha2[1] = pos[1];
|
config->country[1] = pos[1];
|
||||||
wpa_printf(MSG_DEBUG, "country='%c%c'",
|
wpa_printf(MSG_DEBUG, "country='%c%c'",
|
||||||
config->alpha2[0], config->alpha2[1]);
|
config->country[0], config->country[1]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -891,9 +891,9 @@ static void wpa_config_write_global(FILE *f, struct wpa_config *config)
|
||||||
fprintf(f, "uuid=%s\n", buf);
|
fprintf(f, "uuid=%s\n", buf);
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_WPS */
|
#endif /* CONFIG_WPS */
|
||||||
if (config->alpha2[0] && config->alpha2[1]) {
|
if (config->country[0] && config->country[1]) {
|
||||||
fprintf(f, "country=%c%c\n",
|
fprintf(f, "country=%c%c\n",
|
||||||
config->alpha2[0], config->alpha2[1]);
|
config->country[0], config->country[1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1790,8 +1790,8 @@ static int wpa_supplicant_init_iface2(struct wpa_supplicant *wpa_s)
|
||||||
if (wpa_supplicant_driver_init(wpa_s) < 0)
|
if (wpa_supplicant_driver_init(wpa_s) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
if (wpa_s->conf->alpha2[0] && wpa_s->conf->alpha2[1] &&
|
if (wpa_s->conf->country[0] && wpa_s->conf->country[1] &&
|
||||||
wpa_drv_set_country(wpa_s, wpa_s->conf->alpha2)) {
|
wpa_drv_set_country(wpa_s, wpa_s->conf->country)) {
|
||||||
wpa_printf(MSG_DEBUG, "Failed to set country");
|
wpa_printf(MSG_DEBUG, "Failed to set country");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue