From: Johannes Berg <johannes@sipsolutions.net>
To: Andrew Zaborowski <andrew.zaborowski@intel.com>,
linux-wireless@vger.kernel.org
Subject: Re: [PATCH v3 3/4] cfg80211: Accept multiple RSSI thresholds for CQM
Date: Tue, 24 Jan 2017 16:15:14 +0100 [thread overview]
Message-ID: <1485270914.1236.1.camel@sipsolutions.net> (raw)
In-Reply-To: <20170120085509.13222-3-andrew.zaborowski@intel.com> (sfid-20170120_095526_118299_B7F54C3F)
> + if (n_thresholds <= 1 && rdev->ops->set_cqm_rssi_config) {
> + const s32 disable = 0;
> +
> + if (n_thresholds == 0) {
> + n_thresholds = 1;
> + thresholds = &disable;
> + }
This doesn't really make sense,
> + return rdev_set_cqm_rssi_config(rdev, dev,
> + thresholds[0],
> hysteresis);
> + }
since you return immediately afterwards anyway, and don't even use the
n_thresholds?
Perhaps also removing the earlier "hysteresis = 0" part and
distinguishing here directly to call the function with different
arguments based on enable/disable would make sense.
> + s32 *thresholds =
> nla_data(attrs[NL80211_ATTR_CQM_RSSI_THOLD]);
const?
johannes
next prev parent reply other threads:[~2017-01-24 15:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-20 8:55 [PATCH v3 1/4] mac80211: Pass new RSSI level in CQM RSSI notification Andrew Zaborowski
2017-01-20 8:55 ` [PATCH v3 2/4] cfg80211: " Andrew Zaborowski
2017-01-20 8:55 ` [PATCH v3 3/4] cfg80211: Accept multiple RSSI thresholds for CQM Andrew Zaborowski
2017-01-24 15:15 ` Johannes Berg [this message]
2017-01-20 8:55 ` [PATCH v3 4/4] mac80211: Add set_cqm_rssi_range_config Andrew Zaborowski
2017-01-24 15:18 ` Johannes Berg
2017-01-25 6:01 ` Andrew Zaborowski
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=1485270914.1236.1.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=andrew.zaborowski@intel.com \
--cc=linux-wireless@vger.kernel.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).