Search Linux Wireless

Re: [PATCH v2 3/4] cfg80211: Accept multiple RSSI thresholds for CQM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 4 January 2017 at 10:53, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote:
> Should userspace really just get -EOPNOTSUPP back?

In what circumstance?

>
> 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.

True, I'd assumed that netlink would check for exact attribute length
with NLA_S32.

I'll add the feature bit but I wonder if it's better as a
driver/device feature (enum nl80211_ext_feature_index) so that it can
take into account whether rdev->set_cqm_rssi_range_config is set.

>
>
>> +             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 :)

Ok.

Best regards



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux