All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Andrew Zaborowski <andrew.zaborowski@intel.com>,
	linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 3/4] cfg80211: Accept multiple RSSI thresholds for CQM
Date: Wed, 04 Jan 2017 16:53:30 +0100	[thread overview]
Message-ID: <1483545210.7312.17.camel@sipsolutions.net> (raw)
In-Reply-To: <20161212015213.21323-3-andrew.zaborowski@intel.com> (sfid-20161212_025242_049227_EF1C6F2B)

Should userspace really just get -EOPNOTSUPP back?

Also, this whole business with using an array in the existing
NL80211_ATTR_CQM_RSSI_THOLD is not very backward compatible, because an
old kernel would interpret this as just a single value (the first one
in your array) - ignoring entirely the fact that you requested
multiple.

Thus, you either need an nl80211 protocol feature bit (enum
nl80211_protocol_features) or a new attribute, or so, I think.


> +		cqm_config = kzalloc(sizeof(struct
> cfg80211_cqm_config) +
> +				     n_thresholds * sizeof(s32),
> GFP_KERNEL);
> +		cqm_config->rssi_hyst = hysteresis;

You definitely need error checking here :)

johannes

  reply	other threads:[~2017-01-04 15:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12  1:52 [PATCH v2 2/4] cfg80211: Pass new RSSI level in CQM RSSI notification Andrew Zaborowski
2016-12-12  1:52 ` [PATCH v2 3/4] cfg80211: Accept multiple RSSI thresholds for CQM Andrew Zaborowski
2017-01-04 15:53   ` Johannes Berg [this message]
2017-01-04 20:19     ` Andrew Zaborowski
2017-01-05 11:49       ` Johannes Berg
2017-01-07  9:43         ` Andrew Zaborowski
2017-01-24  9:44           ` Johannes Berg
2016-12-12  1:52 ` [PATCH v2 4/4] mac80211: Add set_cqm_rssi_range_config 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=1483545210.7312.17.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.