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.
Showing the changes to include/uapi/linux (1 of 7 files). Show all
Unified · Split
| @@ -3952,6 +3952,8 @@ enum nl80211_ps_state { · 3951 unmodified lines | ||
| 3952 | 3952 | * %NL80211_CMD_NOTIFY_CQM. Set to 0 to turn off TX error reporting. |
| 3953 | 3953 | * @NL80211_ATTR_CQM_BEACON_LOSS_EVENT: flag attribute that's set in a beacon |
| 3954 | 3954 | * loss event |
| 3955 | + * @NL80211_ATTR_CQM_RSSI_LEVEL: the RSSI value in dBm that triggered the | |
| 3956 | + * RSSI threshold event. | |
| 3955 | 3957 | * @__NL80211_ATTR_CQM_AFTER_LAST: internal |
| 3956 | 3958 | * @NL80211_ATTR_CQM_MAX: highest key attribute |
| 3957 | 3959 | */ |
| @@ -3965,6 +3967,7 @@ enum nl80211_attr_cqm { · 7 unmodified lines | ||
| 3965 | 3967 | NL80211_ATTR_CQM_TXE_PKTS, |
| 3966 | 3968 | NL80211_ATTR_CQM_TXE_INTVL, |
| 3967 | 3969 | NL80211_ATTR_CQM_BEACON_LOSS_EVENT, |
| 3970 | + NL80211_ATTR_CQM_RSSI_LEVEL, | |
| 3968 | 3971 | |
| 3969 | 3972 | /* keep last */ |
| 3970 | 3973 | __NL80211_ATTR_CQM_AFTER_LAST, |