aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/wil6210
diff options
context:
space:
mode:
authorAhmad Masri <amasri@codeaurora.org>2018-10-31 04:52:16 -0400
committerKalle Valo <kvalo@codeaurora.org>2018-11-06 11:03:11 -0500
commitb571e71bcb98d6b629b486b9af027a73fc6da3c3 (patch)
tree8355ab56ffce8f17f6d4538fb43ca53bb16fdec8 /drivers/net/wireless/ath/wil6210
parente1b43407c034650c11bc597bef319f03b8262b6c (diff)
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>
Diffstat (limited to 'drivers/net/wireless/ath/wil6210')
-rw-r--r--drivers/net/wireless/ath/wil6210/wmi.c17
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,
1113 1113
1114 mutex_lock(&wil->mutex); 1114 mutex_lock(&wil->mutex);
1115 wil6210_disconnect_complete(vif, evt->bssid, reason_code); 1115 wil6210_disconnect_complete(vif, evt->bssid, reason_code);
1116 if (disable_ap_sme) {
1117 struct wireless_dev *wdev = vif_to_wdev(vif);
1118 struct net_device *ndev = vif_to_ndev(vif);
1119
1120 /* disconnect event in disable_ap_sme mode means link loss */
1121 switch (wdev->iftype) {
1122 /* AP-like interface */
1123 case NL80211_IFTYPE_AP:
1124 case NL80211_IFTYPE_P2P_GO:
1125 /* notify hostapd about link loss */
1126 cfg80211_cqm_pktloss_notify(ndev, evt->bssid, 0,
1127 GFP_KERNEL);
1128 break;
1129 default:
1130 break;
1131 }
1132 }
1116 mutex_unlock(&wil->mutex); 1133 mutex_unlock(&wil->mutex);
1117} 1134}
1118 1135