linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Tamizh chelvam <tamizhr@codeaurora.org>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/3] cfg80211: Add support to configure station specific RSSI threshold for AP mode
Date: Fri, 09 Nov 2018 12:44:51 +0100	[thread overview]
Message-ID: <ca4bf715537f910af0ee6fa34f6be69b9e24b630.camel@sipsolutions.net> (raw)
In-Reply-To: <1539626250-769-2-git-send-email-tamizhr@codeaurora.org>

Hi,

Sorry for the delay in reviewing this.

> +	int	(*set_sta_mon_rssi_config)(struct wiphy *wiphy,
> +					  struct net_device *dev,
> +					  const u8 *addr,
> +					  const s32 *rssi_tholds,
> +					  u32 rssi_hyst, int rssi_n_tholds,
> +					  bool fixed_thold);
>  };

I think it might be better to pass all the last 4 arguments (rssi
related ones) as a struct? That's a pattern we typically have elsewhere
too, and it makes things easier to extend and also easier to pass
around.

> + * @NL80211_CMD_SET_STA_MON: This command is used to configure station's
> + *     connection monitoring notification trigger levels.
> + * @NL80211_CMD_NOTIFY_STA_MON: This is used as an event to notify
> + *     the user space that a trigger level was reached for a station.

Please describe the attributes to use with this.


> + * @NL80211_ATTR_STA_MON_FIXED_THOLD: Flag attribute is used with
> + *	%NL80211_CMD_SET_STA_MON to indicate driver that the monitoring
> + *	configuration is fixed limit or a moving range threshold.

This isn't really clear to me, what does it mean?

> +	if (!sta_mon || !(info->attrs[NL80211_ATTR_MAC]))

Don't really need the parentheses in !(info->...)

> +	err = nla_parse_nested(attrs, NL80211_ATTR_CQM_MAX, sta_mon,
> +			       nl80211_attr_cqm_policy, info->extack);

I *think* I made that a proper nested policy, check and then you can
remove passing it here.

> +void
> +cfg80211_sta_mon_rssi_notify(struct net_device *dev, const u8 *peer,
> +			     enum nl80211_cqm_rssi_threshold_event rssi_event,
> +			     s32 rssi_level, gfp_t gfp)
> +{
> +	struct sk_buff *msg;
> +
> +	if (WARN_ON(!peer))
> +		return;

Tracing for this might be nice too?

johannes


  parent reply	other threads:[~2018-11-09 11:44 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     ` [EXTERNAL] " Tamizh Chelvam Raja
2018-11-09 11:44   ` Johannes Berg [this message]
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=ca4bf715537f910af0ee6fa34f6be69b9e24b630.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).