ath6kl: Fix disconnect event reporting
Driver does not report disconnect event properly when in connecting state, this leads to issues failures in starting reconnection. Send a disconnect command to target when a disconnect event is received with reason code other than 3 (DISCONNECT_CMD - disconnect request from host) to make the frimware stop trying to connect even after giving disconnect event. There will be one more disconnect event for this disconnect command with reason code DISCONNECT_CMD which will be notified to cfg80211. Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
5694f96296
commit
1de547d6dc
|
@ -602,22 +602,20 @@ void ath6kl_cfg80211_disconnect_event(struct ath6kl *ar, u8 reason,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!test_bit(CONNECT_PEND, &ar->flag)) {
|
/*
|
||||||
if (reason != DISCONNECT_CMD)
|
* Send a disconnect command to target when a disconnect event is
|
||||||
ath6kl_wmi_disconnect_cmd(ar->wmi);
|
* received with reason code other than 3 (DISCONNECT_CMD - disconnect
|
||||||
|
* request from host) to make the firmware stop trying to connect even
|
||||||
|
* after giving disconnect event. There will be one more disconnect
|
||||||
|
* event for this disconnect command with reason code DISCONNECT_CMD
|
||||||
|
* which will be notified to cfg80211.
|
||||||
|
*/
|
||||||
|
|
||||||
return;
|
if (reason != DISCONNECT_CMD) {
|
||||||
}
|
|
||||||
|
|
||||||
if (reason == NO_NETWORK_AVAIL) {
|
|
||||||
/* connect cmd failed */
|
|
||||||
ath6kl_wmi_disconnect_cmd(ar->wmi);
|
ath6kl_wmi_disconnect_cmd(ar->wmi);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (reason != DISCONNECT_CMD)
|
|
||||||
return;
|
|
||||||
|
|
||||||
clear_bit(CONNECT_PEND, &ar->flag);
|
clear_bit(CONNECT_PEND, &ar->flag);
|
||||||
|
|
||||||
if (ar->sme_state == SME_CONNECTING) {
|
if (ar->sme_state == SME_CONNECTING) {
|
||||||
|
|
Loading…
Reference in New Issue