linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] cfg80211: enable setting cqm config for AP mode
@ 2017-08-09 23:41 Pradeep Kumar Chitrapu
  2017-08-09 23:41 ` [PATCH 2/2] mac80211: " Pradeep Kumar Chitrapu
  0 siblings, 1 reply; 2+ messages in thread
From: Pradeep Kumar Chitrapu @ 2017-08-09 23:41 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Pradeep Kumar Chitrapu, linux-wireless

Enable connection monitoring for AP mode which makes it possible to track
signal strength of connected stations.

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
---
 net/wireless/nl80211.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index bafab07530d6..beda9c62f74a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -9784,7 +9784,8 @@ static int nl80211_set_cqm_rssi(struct genl_info *info,
 	}
 
 	if (wdev->iftype != NL80211_IFTYPE_STATION &&
-	    wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
+	    wdev->iftype != NL80211_IFTYPE_P2P_CLIENT &&
+	    wdev->iftype != NL80211_IFTYPE_AP)
 		return -EOPNOTSUPP;
 
 	wdev_lock(wdev);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 2/2] mac80211: enable setting cqm config for AP mode
  2017-08-09 23:41 [PATCH 1/2] cfg80211: enable setting cqm config for AP mode Pradeep Kumar Chitrapu
@ 2017-08-09 23:41 ` Pradeep Kumar Chitrapu
  0 siblings, 0 replies; 2+ messages in thread
From: Pradeep Kumar Chitrapu @ 2017-08-09 23:41 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Pradeep Kumar Chitrapu, linux-wireless

Enable connection monitoring for AP mode which makes it possible to track
signal strength of connected stations.

Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
---
 net/mac80211/cfg.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index a354f1939e49..1548fd34961c 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2682,9 +2682,11 @@ static int ieee80211_set_cqm_rssi_config(struct wiphy *wiphy,
 	bss_conf->cqm_rssi_high = 0;
 	sdata->u.mgd.last_cqm_event_signal = 0;
 
-	/* tell the driver upon association, unless already associated */
-	if (sdata->u.mgd.associated &&
-	    sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_CQM_RSSI)
+	/* if STA, tell the driver upon association, unless already associated.
+	 * if AP, always tell the driver.
+	 */
+	if ((sdata->u.mgd.associated || vif->type == NL80211_IFTYPE_AP) &&
+	    (sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_CQM_RSSI))
 		ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_CQM);
 
 	return 0;
@@ -2708,7 +2710,7 @@ static int ieee80211_set_cqm_rssi_range_config(struct wiphy *wiphy,
 	sdata->u.mgd.last_cqm_event_signal = 0;
 
 	/* tell the driver upon association, unless already associated */
-	if (sdata->u.mgd.associated &&
+	if ((sdata->u.mgd.associated  || vif->type == NL80211_IFTYPE_AP) &&
 	    sdata->vif.driver_flags & IEEE80211_VIF_SUPPORTS_CQM_RSSI)
 		ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_CQM);
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-09 23:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-09 23:41 [PATCH 1/2] cfg80211: enable setting cqm config for AP mode Pradeep Kumar Chitrapu
2017-08-09 23:41 ` [PATCH 2/2] mac80211: " Pradeep Kumar Chitrapu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).