diff options
author | Ahmad Masri <amasri@codeaurora.org> | 2018-10-31 10:52:16 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-11-06 18:03:11 +0200 |
commit | b571e71bcb98d6b629b486b9af027a73fc6da3c3 (patch) | |
tree | 8355ab56ffce8f17f6d4538fb43ca53bb16fdec8 | |
parent | e1b43407c034650c11bc597bef319f03b8262b6c (diff) | |
download | linux-b571e71bcb98d6b629b486b9af027a73fc6da3c3.tar.gz linux-b571e71bcb98d6b629b486b9af027a73fc6da3c3.tar.bz2 linux-b571e71bcb98d6b629b486b9af027a73fc6da3c3.zip |
wil6210: notify cqm packet loss on disable_ap_sme
wil6210 used to notify cfg80211_del_sta on every fw disconnect event.
In disable_ap_sme mode the userspace manages the protocol SME and
FW sends disconnect event only due to link loss.
In disable_ap_sme mode, indicate CQM packet loss to let the host
control the connection and disconnect the link if needed.
Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/ath/wil6210/wmi.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/wil6210/wmi.c b/drivers/net/wireless/ath/wil6210/wmi.c index 5ff1862460f0..fa08a9637f44 100644 --- a/drivers/net/wireless/ath/wil6210/wmi.c +++ b/drivers/net/wireless/ath/wil6210/wmi.c @@ -1113,6 +1113,23 @@ static void wmi_evt_disconnect(struct wil6210_vif *vif, int id, mutex_lock(&wil->mutex); wil6210_disconnect_complete(vif, evt->bssid, reason_code); + if (disable_ap_sme) { + struct wireless_dev *wdev = vif_to_wdev(vif); + struct net_device *ndev = vif_to_ndev(vif); + + /* disconnect event in disable_ap_sme mode means link loss */ + switch (wdev->iftype) { + /* AP-like interface */ + case NL80211_IFTYPE_AP: + case NL80211_IFTYPE_P2P_GO: + /* notify hostapd about link loss */ + cfg80211_cqm_pktloss_notify(ndev, evt->bssid, 0, + GFP_KERNEL); + break; + default: + break; + } + } mutex_unlock(&wil->mutex); } |