From: Johannes Berg <johannes@sipsolutions.net>
To: Tamizh chelvam <tamizhr@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 2/7] cfg80211: Add new NL command to configure peer specific rssi threshold
Date: Fri, 29 Jun 2018 11:29:38 +0200 [thread overview]
Message-ID: <1530264578.3481.34.camel@sipsolutions.net> (raw)
In-Reply-To: <1528886747-26342-3-git-send-email-tamizhr@codeaurora.org>
On Wed, 2018-06-13 at 16:15 +0530, Tamizh chelvam wrote:
>
> + * @NL80211_ATTR_STA_MON: Station's connection monitor configuration in a
> + * nested attribute with %NL80211_ATTR_STA_MON_* sub-attributes.
Can't we reuse the existing attributes in this nesting?
> +/**
> + * enum nl80211_sta_mon_rssi_threshold_event - RSSI threshold event
> + * @NL80211_STA_MON_RSSI_THRESHOLD_EVENT_LOW: The RSSI level is lower than the
> + * configured threshold
> + * @NL80211_STA_MON_RSSI_THRESHOLD_EVENT_HIGH: The RSSI is higher than the
> + * configured threshold
> + */
> +enum nl80211_sta_mon_rssi_threshold_event {
> + NL80211_STA_MON_RSSI_THRESHOLD_EVENT_LOW,
> + NL80211_STA_MON_RSSI_THRESHOLD_EVENT_HIGH,
> +};
It seems like this should already exist also for the CQM? Can we not
reuse it?
> +static int nl80211_set_sta_mon_rssi(struct genl_info *info,
> + const u8 *peer, s32 threshold,
> + u32 hysteresis)
> +{
> + struct cfg80211_registered_device *rdev = info->user_ptr[0];
> + struct net_device *dev = info->user_ptr[1];
> + struct wireless_dev *wdev = dev->ieee80211_ptr;
> +
> + if (threshold > 0)
> + return -EINVAL;
> +
> + if (threshold == 0)
> + hysteresis = 0;
> +
> + if (!rdev->ops->set_sta_mon_rssi_config)
> + return -EOPNOTSUPP;
> +
> + if ((wdev->iftype != NL80211_IFTYPE_AP &&
> + wdev->iftype != NL80211_IFTYPE_P2P_GO &&
> + wdev->iftype != NL80211_IFTYPE_AP_VLAN) ||
> + !wiphy_ext_feature_isset(&rdev->wiphy,
> + NL80211_EXT_FEATURE_STA_MON_RSSI_CONFIG))
> + return -EOPNOTSUPP;
> +
> + return rdev_set_sta_mon_rssi_config(rdev, dev, peer,
> + threshold, hysteresis);
> +}
Wait, you went to all this effort in the first patch and now you don't
add this to the list?
johannes
next prev parent reply other threads:[~2018-06-29 9:29 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-13 10:45 [PATCH 0/7] cfg80211/mac80211: Add support to configure and monitor rssi threshold Tamizh chelvam
2018-06-13 10:45 ` [PATCH 1/7] wireless: Change single cqm_config to rssi config list Tamizh chelvam
2018-06-29 9:26 ` Johannes Berg
2018-07-04 18:16 ` Tamizh chelvam
2018-07-06 11:46 ` Johannes Berg
2018-07-11 6:54 ` Tamizh chelvam
2018-08-28 9:02 ` Johannes Berg
2018-06-13 10:45 ` [PATCH 2/7] cfg80211: Add new NL command to configure peer specific rssi threshold Tamizh chelvam
2018-06-29 9:29 ` Johannes Berg [this message]
2018-07-04 6:09 ` Tamizh chelvam
2018-07-06 11:40 ` Johannes Berg
2018-07-11 7:04 ` Tamizh chelvam
2018-08-28 9:01 ` Johannes Berg
2018-06-13 10:45 ` [PATCH 3/7] mac80211: Add api to support configuring station " Tamizh chelvam
2018-06-29 9:31 ` Johannes Berg
2018-07-04 5:13 ` Tamizh chelvam
2018-06-13 10:45 ` [PATCH 4/7] cfg80211: Add support to notify station's rssi level crossing Tamizh chelvam
2018-06-29 9:35 ` Johannes Berg
2018-07-04 6:13 ` Tamizh chelvam
2018-07-06 11:39 ` Johannes Berg
2018-07-11 5:55 ` Tamizh chelvam
2018-06-13 10:45 ` [PATCH 5/7] mac80211: Implement functionality to monitor station's rssi cross event Tamizh chelvam
2018-06-29 9:36 ` Johannes Berg
2018-07-04 9:36 ` Tamizh chelvam
2018-06-13 10:45 ` [PATCH 6/7] cfg80211: Accept multiple RSSI threholds for STA_MON command Tamizh chelvam
2018-06-29 9:39 ` Johannes Berg
2018-07-05 7:37 ` Tamizh chelvam
2018-07-06 11:38 ` Johannes Berg
2018-06-13 10:45 ` [PATCH 7/7] mac80211: Add api to configure low and high RSSI threshold Tamizh chelvam
2018-06-29 9:39 ` Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1530264578.3481.34.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=tamizhr@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).