Allow driver wrappers to indicate maximum remain-on-channel duration
This commit is contained in:
parent
de12717a56
commit
814782b9fe
5 changed files with 20 additions and 9 deletions
|
@ -505,6 +505,11 @@ struct wpa_driver_capa {
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
|
|
||||||
int max_scan_ssids;
|
int max_scan_ssids;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* max_remain_on_chan - Maximum remain-on-channel duration in msec
|
||||||
|
*/
|
||||||
|
unsigned int max_remain_on_chan;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1157,6 +1157,7 @@ static int wpa_driver_nl80211_capa(struct wpa_driver_nl80211_data *drv)
|
||||||
}
|
}
|
||||||
|
|
||||||
drv->capa.flags |= WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE;
|
drv->capa.flags |= WPA_DRIVER_FLAGS_SET_KEYS_AFTER_ASSOC_DONE;
|
||||||
|
drv->capa.max_remain_on_chan = 5000;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2386,6 +2386,7 @@ static int wpa_driver_test_get_capa(void *priv, struct wpa_driver_capa *capa)
|
||||||
capa->flags |= WPA_DRIVER_FLAGS_USER_SPACE_MLME;
|
capa->flags |= WPA_DRIVER_FLAGS_USER_SPACE_MLME;
|
||||||
capa->flags |= WPA_DRIVER_FLAGS_AP;
|
capa->flags |= WPA_DRIVER_FLAGS_AP;
|
||||||
capa->max_scan_ssids = 2;
|
capa->max_scan_ssids = 2;
|
||||||
|
capa->max_remain_on_chan = 60000;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2015,6 +2015,18 @@ next_driver:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (wpa_drv_get_capa(wpa_s, &capa) == 0) {
|
||||||
|
wpa_s->drv_flags = capa.flags;
|
||||||
|
if (capa.flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME) {
|
||||||
|
if (ieee80211_sta_init(wpa_s))
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
wpa_s->max_scan_ssids = capa.max_scan_ssids;
|
||||||
|
wpa_s->max_remain_on_chan = capa.max_remain_on_chan;
|
||||||
|
}
|
||||||
|
if (wpa_s->max_remain_on_chan == 0)
|
||||||
|
wpa_s->max_remain_on_chan = 1000;
|
||||||
|
|
||||||
if (wpa_supplicant_driver_init(wpa_s) < 0)
|
if (wpa_supplicant_driver_init(wpa_s) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
|
@ -2047,15 +2059,6 @@ next_driver:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wpa_drv_get_capa(wpa_s, &capa) == 0) {
|
|
||||||
wpa_s->drv_flags = capa.flags;
|
|
||||||
if (capa.flags & WPA_DRIVER_FLAGS_USER_SPACE_MLME) {
|
|
||||||
if (ieee80211_sta_init(wpa_s))
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
wpa_s->max_scan_ssids = capa.max_scan_ssids;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_IBSS_RSN
|
#ifdef CONFIG_IBSS_RSN
|
||||||
wpa_s->ibss_rsn = ibss_rsn_init(wpa_s);
|
wpa_s->ibss_rsn = ibss_rsn_init(wpa_s);
|
||||||
if (!wpa_s->ibss_rsn) {
|
if (!wpa_s->ibss_rsn) {
|
||||||
|
|
|
@ -384,6 +384,7 @@ struct wpa_supplicant {
|
||||||
struct wpa_client_mlme mlme;
|
struct wpa_client_mlme mlme;
|
||||||
unsigned int drv_flags;
|
unsigned int drv_flags;
|
||||||
int max_scan_ssids;
|
int max_scan_ssids;
|
||||||
|
unsigned int max_remain_on_chan;
|
||||||
|
|
||||||
int pending_mic_error_report;
|
int pending_mic_error_report;
|
||||||
int pending_mic_error_pairwise;
|
int pending_mic_error_pairwise;
|
||||||
|
|
Loading…
Reference in a new issue