mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 21:22:09 -04:00
wil6210: notify cfg80211_new_sta upon connection before init tx ring
In AP mode upon client connection, sometimes Rx data packet (e.g EAPOL) arrives before driver notify cfg80211_new_sta to kernel. This causes the Rx packet to get lost. To fix this, as part of connect event handling, call cfg80211_new_sta() earlier, before initializing Tx ring. Change-Id: Ife5fd7a5c79da4c0dd094c2b9cbc3785a165331d Signed-off-by: Alexei Avshalom Lazar <ailizaro@codeaurora.org>
This commit is contained in:
parent
9c6eb35345
commit
b5eee425b4
1 changed files with 20 additions and 20 deletions
|
|
@ -1069,6 +1069,24 @@ static void wmi_evt_connect(struct wil6210_vif *vif, int id, void *d, int len)
|
|||
mutex_unlock(&wil->mutex);
|
||||
return;
|
||||
}
|
||||
|
||||
sinfo = kzalloc(sizeof(*sinfo), GFP_KERNEL);
|
||||
if (!sinfo) {
|
||||
wmi_disconnect_sta(vif, wil->sta[evt->cid].addr,
|
||||
WLAN_REASON_UNSPECIFIED, false);
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
sinfo->generation = wil->sinfo_gen++;
|
||||
|
||||
if (assoc_req_ie) {
|
||||
sinfo->assoc_req_ies = assoc_req_ie;
|
||||
sinfo->assoc_req_ies_len = assoc_req_ielen;
|
||||
}
|
||||
|
||||
cfg80211_new_sta(ndev, evt->bssid, sinfo, GFP_KERNEL);
|
||||
kfree(sinfo);
|
||||
}
|
||||
|
||||
ether_addr_copy(wil->sta[evt->cid].addr, evt->bssid);
|
||||
|
|
@ -1111,28 +1129,10 @@ static void wmi_evt_connect(struct wil6210_vif *vif, int id, void *d, int len)
|
|||
(wdev->iftype == NL80211_IFTYPE_P2P_GO)) {
|
||||
|
||||
if (rc) {
|
||||
if (disable_ap_sme)
|
||||
/* notify new_sta has failed */
|
||||
cfg80211_del_sta(ndev, evt->bssid, GFP_KERNEL);
|
||||
/* notify new_sta has failed */
|
||||
cfg80211_del_sta(ndev, evt->bssid, GFP_KERNEL);
|
||||
goto out;
|
||||
}
|
||||
|
||||
sinfo = kzalloc(sizeof(*sinfo), GFP_KERNEL);
|
||||
if (!sinfo) {
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
sinfo->generation = wil->sinfo_gen++;
|
||||
|
||||
if (assoc_req_ie) {
|
||||
sinfo->assoc_req_ies = assoc_req_ie;
|
||||
sinfo->assoc_req_ies_len = assoc_req_ielen;
|
||||
}
|
||||
|
||||
cfg80211_new_sta(ndev, evt->bssid, sinfo, GFP_KERNEL);
|
||||
|
||||
kfree(sinfo);
|
||||
} else {
|
||||
wil_err(wil, "unhandled iftype %d for CID %d\n", wdev->iftype,
|
||||
evt->cid);
|
||||
|
|
|
|||
Loading…
Reference in a new issue