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 via email to