diff mbox

[2/4] cfg80211: enable setting cqm config for AP mode

Message ID 1516174276-16789-3-git-send-email-tamizhr@codeaurora.org (mailing list archive)
State Changes Requested
Delegated to: Johannes Berg
Headers show

Commit Message

Tamizh chelvam Jan. 17, 2018, 7:31 a.m. UTC
From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>

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

Co-Developed-by: Tamizh Chelvam <tamizhr@codeaurora.org>
Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Signed-off-by: Tamizh chelvam <tamizhr@codeaurora.org>
---
 net/wireless/nl80211.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Johannes Berg Jan. 22, 2018, 12:56 p.m. UTC | #1
On Wed, 2018-01-17 at 13:01 +0530, tamizhr@codeaurora.org wrote:
> From: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
> 
> Enable connection monitoring for AP mode which makes it possible to
> track signal strength of connected stations.

>  	if (wdev->iftype != NL80211_IFTYPE_STATION &&
> -	    wdev->iftype != NL80211_IFTYPE_P2P_CLIENT)
> +	    wdev->iftype != NL80211_IFTYPE_P2P_CLIENT &&
> +	    wdev->iftype != NL80211_IFTYPE_AP &&
> +	    wdev->iftype != NL80211_IFTYPE_P2P_GO &&
> +	    wdev->iftype != NL80211_IFTYPE_AP_VLAN)
>  		return -EOPNOTSUPP;
> 
This seems problematic - you'll probably need a driver support flag for
this. And since clients might want to know whether this works or not,
just make that an nl80211 extended feature bit?

johannes
Johannes Berg Jan. 22, 2018, 1:01 p.m. UTC | #2
In addition to what I said before, you should also document which CQM
modes are actually available per station.

Perhaps the feature bit also needs to be per mode, since in mac80211 at
least you're only implementing signal monitoring, not
nl80211_set_cqm_txe()?

johannes
diff mbox

Patch

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index ce5ee6f..3bb8eaa 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -9884,7 +9884,10 @@  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 &&
+	    wdev->iftype != NL80211_IFTYPE_P2P_GO &&
+	    wdev->iftype != NL80211_IFTYPE_AP_VLAN)
 		return -EOPNOTSUPP;
 
 	wdev_lock(wdev);