Always process pending QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH data
Commit 74818ca63f
("Process
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH after NL80211_CMD_ROAM")
added workaround to hold the pending
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event data for up to 100 ms
in case NL80211_CMD_ROAM is not received first. The 100 ms wait period
was sufficient for most of the cases but it's observed that some times
kernel is taking more than 100 ms to process and send NL80211_CMD_ROAM
to userspace.
If NL80211_CMD_ROAM takes more than 100 ms
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event data getting ignored
though wpa_supplicant has it. To avoid this remove timeout for
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH event data since driver
always indicates NL80211_CMD_ROAM along with
QCA_NL80211_VENDOR_SUBCMD_KEY_MGMT_ROAM_AUTH.
In addition, clear the pending event data when marking the interface
disconnected since the roaming information is supposed to be used only
when reassociating without a disconnection.
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
This commit is contained in:
parent
ef4cd8e33c
commit
b9cd5a82f4
3 changed files with 8 additions and 13 deletions
|
@ -270,6 +270,10 @@ void nl80211_mark_disconnected(struct wpa_driver_nl80211_data *drv)
|
||||||
drv->associated = 0;
|
drv->associated = 0;
|
||||||
os_memset(drv->bssid, 0, ETH_ALEN);
|
os_memset(drv->bssid, 0, ETH_ALEN);
|
||||||
drv->first_bss->freq = 0;
|
drv->first_bss->freq = 0;
|
||||||
|
#ifdef CONFIG_DRIVER_NL80211_QCA
|
||||||
|
os_free(drv->pending_roam_data);
|
||||||
|
drv->pending_roam_data = NULL;
|
||||||
|
#endif /* CONFIG_DRIVER_NL80211_QCA */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,6 @@ struct wpa_driver_nl80211_data {
|
||||||
bool roam_indication_done;
|
bool roam_indication_done;
|
||||||
u8 *pending_roam_data;
|
u8 *pending_roam_data;
|
||||||
size_t pending_roam_data_len;
|
size_t pending_roam_data_len;
|
||||||
struct os_reltime pending_roam_ind_time;
|
|
||||||
#endif /* CONFIG_DRIVER_NL80211_QCA */
|
#endif /* CONFIG_DRIVER_NL80211_QCA */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -2120,7 +2120,6 @@ qca_nl80211_key_mgmt_auth_handler(struct wpa_driver_nl80211_data *drv,
|
||||||
if (!drv->roam_indication_done) {
|
if (!drv->roam_indication_done) {
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
"nl80211: Pending roam indication, delay processing roam+auth vendor event");
|
"nl80211: Pending roam indication, delay processing roam+auth vendor event");
|
||||||
os_get_reltime(&drv->pending_roam_ind_time);
|
|
||||||
|
|
||||||
os_free(drv->pending_roam_data);
|
os_free(drv->pending_roam_data);
|
||||||
drv->pending_roam_data = os_memdup(data, len);
|
drv->pending_roam_data = os_memdup(data, len);
|
||||||
|
@ -2987,17 +2986,10 @@ static void do_process_drv_event(struct i802_bss *bss, int cmd,
|
||||||
if (cmd == NL80211_CMD_ROAM &&
|
if (cmd == NL80211_CMD_ROAM &&
|
||||||
(drv->capa.flags & WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD)) {
|
(drv->capa.flags & WPA_DRIVER_FLAGS_KEY_MGMT_OFFLOAD)) {
|
||||||
if (drv->pending_roam_data) {
|
if (drv->pending_roam_data) {
|
||||||
struct os_reltime now, age;
|
|
||||||
|
|
||||||
os_get_reltime(&now);
|
|
||||||
os_reltime_sub(&now, &drv->pending_roam_ind_time, &age);
|
|
||||||
if (age.sec == 0 && age.usec < 100000) {
|
|
||||||
wpa_printf(MSG_DEBUG,
|
wpa_printf(MSG_DEBUG,
|
||||||
"nl80211: Process pending roam+auth vendor event");
|
"nl80211: Process pending roam+auth vendor event");
|
||||||
qca_nl80211_key_mgmt_auth(
|
qca_nl80211_key_mgmt_auth(drv, drv->pending_roam_data,
|
||||||
drv, drv->pending_roam_data,
|
|
||||||
drv->pending_roam_data_len);
|
drv->pending_roam_data_len);
|
||||||
}
|
|
||||||
os_free(drv->pending_roam_data);
|
os_free(drv->pending_roam_data);
|
||||||
drv->pending_roam_data = NULL;
|
drv->pending_roam_data = NULL;
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue