Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d82ea6f2 authored by Ahmad Masri's avatar Ahmad Masri Committed by Lior David
Browse files

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.

Change-Id: I5cfa121baa6b98bfd6ac3f5ac0b7b7124006fab2
Signed-off-by: default avatarAhmad Masri <amasri@codeaurora.org>
Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Git-commit: b571e71bcb98d6b629b486b9af027a73fc6da3c3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git


Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
Signed-off-by: default avatarLior David <liord@codeaurora.org>
parent 8902a759
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -1129,6 +1129,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);
}