Use wpa_radio data for channel list updates
This replaces the now unnecessary iteration of get_radio_name() calls. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
f88f19b465
commit
c67e7e2a23
1 changed files with 4 additions and 18 deletions
|
@ -2653,7 +2653,6 @@ static void wpas_event_deauth(struct wpa_supplicant *wpa_s,
|
||||||
|
|
||||||
static void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s)
|
static void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s)
|
||||||
{
|
{
|
||||||
const char *rn, *rn2;
|
|
||||||
struct wpa_supplicant *ifs;
|
struct wpa_supplicant *ifs;
|
||||||
|
|
||||||
if (wpa_s->drv_priv == NULL)
|
if (wpa_s->drv_priv == NULL)
|
||||||
|
@ -2668,25 +2667,12 @@ static void wpa_supplicant_update_channel_list(struct wpa_supplicant *wpa_s)
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check other interfaces to see if they have the same radio-name. If
|
* Check other interfaces to see if they share the same radio. If
|
||||||
* so, they get updated with this same hw mode info.
|
* so, they get updated with this same hw mode info.
|
||||||
*/
|
*/
|
||||||
if (!wpa_s->driver->get_radio_name)
|
dl_list_for_each(ifs, &wpa_s->radio->ifaces, struct wpa_supplicant,
|
||||||
return;
|
radio_list) {
|
||||||
|
if (ifs != wpa_s) {
|
||||||
rn = wpa_s->driver->get_radio_name(wpa_s->drv_priv);
|
|
||||||
if (rn == NULL || rn[0] == '\0')
|
|
||||||
return;
|
|
||||||
|
|
||||||
wpa_dbg(wpa_s, MSG_DEBUG, "Checking for other virtual interfaces "
|
|
||||||
"sharing same radio (%s) in event_channel_list_change", rn);
|
|
||||||
|
|
||||||
for (ifs = wpa_s->global->ifaces; ifs; ifs = ifs->next) {
|
|
||||||
if (ifs == wpa_s || !ifs->driver->get_radio_name)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
rn2 = ifs->driver->get_radio_name(ifs->drv_priv);
|
|
||||||
if (rn2 && os_strcmp(rn, rn2) == 0) {
|
|
||||||
wpa_printf(MSG_DEBUG, "%s: Updating hw mode",
|
wpa_printf(MSG_DEBUG, "%s: Updating hw mode",
|
||||||
ifs->ifname);
|
ifs->ifname);
|
||||||
free_hw_features(ifs);
|
free_hw_features(ifs);
|
||||||
|
|
Loading…
Reference in a new issue