linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tamizh Chelvam Raja <tamizhr@qti.qualcomm.com>
To: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>,
	Tamizh chelvam <tamizhr@codeaurora.org>
Cc: "johannes@sipsolutions.net" <johannes@sipsolutions.net>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Subject: RE: [EXTERNAL] Re: [PATCH 1/3] cfg80211: Add support to configure station specific RSSI threshold for AP mode
Date: Tue, 16 Oct 2018 12:47:33 +0000	[thread overview]
Message-ID: <da28e67ec88a488ab62a88d0899657f3@aphydexm01f.ap.qualcomm.com> (raw)
In-Reply-To: <20181016112831.bglm53ydrktjy7i5@bars>

>> +static int nl80211_set_sta_mon(struct sk_buff *skb, struct genl_info 
>> +*info) {
>> +       struct cfg80211_registered_device *rdev = info->user_ptr[0];
>> +       struct net_device *dev = info->user_ptr[1];
>> +       struct nlattr *attrs[NL80211_ATTR_CQM_MAX + 1];
>> +       bool fixed_thold = false;
>> +       struct nlattr *sta_mon;
>> +       u8 *addr = NULL;
>> +       int err;
>> +
>> +       if (!wiphy_ext_feature_isset(&rdev->wiphy,
>> +                                    NL80211_EXT_FEATURE_STA_MON_RSSI_CONFIG))
>> +               return -EOPNOTSUPP;
>> +
>> +       sta_mon = info->attrs[NL80211_ATTR_CQM];
>> +       if (!sta_mon || !(info->attrs[NL80211_ATTR_MAC]))
>> +               return -EINVAL;
>> +
>> +       err = nla_parse_nested(attrs, NL80211_ATTR_CQM_MAX, sta_mon,
>> +                              nl80211_attr_cqm_policy, info->extack);
>> +       if (err)
>> +               return err;
>> +
>> +       addr = nla_data(info->attrs[NL80211_ATTR_MAC]);
>> +       fixed_thold =
>> +               
>> + nla_get_flag(info->attrs[NL80211_ATTR_STA_MON_FIXED_THOLD]);
>> +
>> +       if (attrs[NL80211_ATTR_CQM_RSSI_THOLD] &&
>> +           attrs[NL80211_ATTR_CQM_RSSI_HYST]) {
>> +               const s32 *thresholds =
>> +                       nla_data(attrs[NL80211_ATTR_CQM_RSSI_THOLD]);
>> +               int len = nla_len(attrs[NL80211_ATTR_CQM_RSSI_THOLD]);
>> +               u32 hysteresis = 
>> + nla_get_u32(attrs[NL80211_ATTR_CQM_RSSI_HYST]);
>> +
>> +               if (len % 4)
>> +                       return -EINVAL;
>> +
>> +               err = nl80211_validate_rssi_tholds(thresholds, len / 4);
>> +               if (err)
>> +                       return err;
>> +
>> +               return rdev_set_sta_mon_rssi_config(rdev, dev, addr, thresholds,
>> +                                                   hysteresis, len / 4,
>> +                                                   fixed_thold);
>> +       }
>> +
>> +       return -EINVAL;
>> +}

>IIUC there is a noticeable overlap between this new command and existing nl80211_set_cqm_rssi command. Is there any reason why >nl80211_set_cqm_rss can not be adapted for AP case ?

[Tamizh] This new command for AP mode introduced as per the previous discussion. 

>If there is a reason to handle AP case separately, then it looks like it makes sense to add explicit check for supported iftype in this new command. >Besides, it looks like there is no generic way to handle disabling of RSSI monitoring in the new command.
>As a result, we may end up in multiple driver specific implementations.

[Tamizh] thanks for pointing me out. I'll add the ifmode check in the next patchset version.

Thanks,
Tamizh.

  reply	other threads:[~2018-10-16 12:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-15 17:57 [PATCH 0/3] cfg80211/mac80211: Add support to configure and monitor station's rssi threshold Tamizh chelvam
2018-10-15 17:57 ` [PATCH 1/3] cfg80211: Add support to configure station specific RSSI threshold for AP mode Tamizh chelvam
2018-10-16 11:28   ` Sergey Matyukevich
2018-10-16 12:47     ` Tamizh Chelvam Raja [this message]
2018-11-09 11:44   ` Johannes Berg
2018-11-11 13:34     ` Tamizh chelvam
2018-10-15 17:57 ` [PATCH 2/3] mac80211: Implement API to configure station specific rssi threshold Tamizh chelvam
2018-11-09 11:49   ` Johannes Berg
2018-11-11 13:57     ` Tamizh chelvam
2018-10-15 17:57 ` [PATCH 3/3] mac80211: Implement functionality to monitor station's signal stregnth Tamizh chelvam
2018-10-16 11:49   ` Sergey Matyukevich
2018-11-09 11:55   ` Johannes Berg
2018-11-11 14:03     ` Tamizh chelvam

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=da28e67ec88a488ab62a88d0899657f3@aphydexm01f.ap.qualcomm.com \
    --to=tamizhr@qti.qualcomm.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=sergey.matyukevich.os@quantenna.com \
    --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).