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