History

cfg80211: Pass new RSSI level in CQM RSSI notification

Update the drivers to pass the RSSI level as a cfg80211_cqm_rssi_notify parameter and pass this value to userspace in a new nl80211 attribute. This helps both userspace and also helps in the implementation of the multiple RSSI thresholds CQM mechanism. Note for marvell/mwifiex I pass 0 for the RSSI value because the new RSSI value is not available to the driver at the time of the cfg80211_cqm_rssi_notify call, but the driver queries the new value immediately after that, so it is actually available just a moment later if we wanted to defer caling cfg80211_cqm_rssi_notify until that moment. Without this, the new cfg80211 code (patch 3) will call .get_station which will send a duplicate HostCmd_CMD_RSSI_INFO command to the hardware.

Andrzej Zaborowski committed 9 years ago

Commit bee427b1 parent 769f07d7 files · +23 −11Browse files

Showing the changes to include/uapi/linux (1 of 7 files). Show all

Unified · Split

include/uapi/linux/nl80211.h+3−0
@@ -3952,6 +3952,8 @@ enum nl80211_ps_state { · 3951 unmodified lines
39523952 * %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting.
39533953 * @NL80211_ATTR_CQM_BEACON_LOSS_EVENT: flag attribute that's set in a beacon
39543954 * loss event
3955+ * @NL80211_ATTR_CQM_RSSI_LEVEL: the RSSI value in dBm that triggered the
3956+ * RSSI threshold event.
39553957 * @__NL80211_ATTR_CQM_AFTER_LAST: internal
39563958 * @NL80211_ATTR_CQM_MAX: highest key attribute
39573959 */
@@ -3965,6 +3967,7 @@ enum nl80211_attr_cqm { · 7 unmodified lines
39653967 NL80211_ATTR_CQM_TXE_PKTS,
39663968 NL80211_ATTR_CQM_TXE_INTVL,
39673969 NL80211_ATTR_CQM_BEACON_LOSS_EVENT,
3970+ NL80211_ATTR_CQM_RSSI_LEVEL,
39683971
39693972 /* keep last */
39703973 __NL80211_ATTR_CQM_AFTER_LAST,