forked from luck/tmp_suning_uos_patched
cfg80211: clarify frames covered by average ACK signal report
Modify the API to include all ACK frames in average ACK signal strength reporting, not just ACKs for data frames. Make exposing the data conditional on implementing the extended feature flag. This is how it was really implemented in mac80211, update the code there to use the new defines and clean up some of the setting code. Keep nl80211.h source compatibility by keeping the old names. Signed-off-by: Balaji Pothunoori <bpothuno@codeaurora.org> [rewrite commit log, change compatibility to be old=new instead of the other way around, update kernel-doc, roll in mac80211 changes, make mac80211 depend on valid bit instead of HW flag] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
parent
1ecef20cf1
commit
9c06602b1b
|
@ -3050,8 +3050,7 @@ enum nl80211_sta_bss_param {
|
|||
* received from the station (u64, usec)
|
||||
* @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment
|
||||
* @NL80211_STA_INFO_ACK_SIGNAL: signal strength of the last ACK frame(u8, dBm)
|
||||
* @NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG: avg signal strength of (data)
|
||||
* ACK frame (s8, dBm)
|
||||
* @NL80211_STA_INFO_ACK_SIGNAL_AVG: avg signal strength of ACK frames (s8, dBm)
|
||||
* @__NL80211_STA_INFO_AFTER_LAST: internal
|
||||
* @NL80211_STA_INFO_MAX: highest possible station info attribute
|
||||
*/
|
||||
|
@ -3091,13 +3090,17 @@ enum nl80211_sta_info {
|
|||
NL80211_STA_INFO_RX_DURATION,
|
||||
NL80211_STA_INFO_PAD,
|
||||
NL80211_STA_INFO_ACK_SIGNAL,
|
||||
NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG,
|
||||
NL80211_STA_INFO_ACK_SIGNAL_AVG,
|
||||
|
||||
/* keep last */
|
||||
__NL80211_STA_INFO_AFTER_LAST,
|
||||
NL80211_STA_INFO_MAX = __NL80211_STA_INFO_AFTER_LAST - 1
|
||||
};
|
||||
|
||||
/* we renamed this - stay compatible */
|
||||
#define NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG NL80211_STA_INFO_ACK_SIGNAL_AVG
|
||||
|
||||
|
||||
/**
|
||||
* enum nl80211_tid_stats - per TID statistics attributes
|
||||
* @__NL80211_TID_STATS_INVALID: attribute number 0 is reserved
|
||||
|
@ -5213,9 +5216,8 @@ enum nl80211_feature_flags {
|
|||
* "radar detected" event.
|
||||
* @NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211: Driver supports sending and
|
||||
* receiving control port frames over nl80211 instead of the netdevice.
|
||||
* @NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT: This Driver support data ack
|
||||
* rssi if firmware support, this flag is to intimate about ack rssi
|
||||
* support to nl80211.
|
||||
* @NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT: This driver/device supports
|
||||
* (average) ACK signal strength reporting.
|
||||
* @NL80211_EXT_FEATURE_TXQS: Driver supports FQ-CoDel-enabled intermediate
|
||||
* TXQs.
|
||||
* @NL80211_EXT_FEATURE_SCAN_RANDOM_SN: Driver/device supports randomizing the
|
||||
|
@ -5255,7 +5257,9 @@ enum nl80211_ext_feature_index {
|
|||
NL80211_EXT_FEATURE_HIGH_ACCURACY_SCAN,
|
||||
NL80211_EXT_FEATURE_DFS_OFFLOAD,
|
||||
NL80211_EXT_FEATURE_CONTROL_PORT_OVER_NL80211,
|
||||
NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT,
|
||||
NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT,
|
||||
/* we renamed this - stay compatible */
|
||||
NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT = NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT,
|
||||
NL80211_EXT_FEATURE_TXQS,
|
||||
NL80211_EXT_FEATURE_SCAN_RANDOM_SN,
|
||||
NL80211_EXT_FEATURE_SCAN_MIN_PREQ_CONTENT,
|
||||
|
|
|
@ -2323,13 +2323,13 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo,
|
|||
sinfo->filled |= BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL);
|
||||
}
|
||||
|
||||
if (ieee80211_hw_check(&sta->local->hw, REPORTS_TX_ACK_STATUS) &&
|
||||
!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG))) {
|
||||
if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL_AVG)) &&
|
||||
sta->status_stats.ack_signal_filled) {
|
||||
sinfo->avg_ack_signal =
|
||||
-(s8)ewma_avg_signal_read(
|
||||
&sta->status_stats.avg_ack_signal);
|
||||
sinfo->filled |=
|
||||
BIT_ULL(NL80211_STA_INFO_DATA_ACK_SIGNAL_AVG);
|
||||
BIT_ULL(NL80211_STA_INFO_ACK_SIGNAL_AVG);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -4724,10 +4724,11 @@ static int nl80211_send_station(struct sk_buff *msg, u32 cmd, u32 portid,
|
|||
PUT_SINFO_U64(RX_DROP_MISC, rx_dropped_misc);
|
||||
PUT_SINFO_U64(BEACON_RX, rx_beacon);
|
||||
PUT_SINFO(BEACON_SIGNAL_AVG, rx_beacon_signal_avg, u8);
|
||||
PUT_SINFO(ACK_SIGNAL, ack_signal, u8);
|
||||
if (wiphy_ext_feature_isset(&rdev->wiphy,
|
||||
NL80211_EXT_FEATURE_DATA_ACK_SIGNAL_SUPPORT))
|
||||
PUT_SINFO(DATA_ACK_SIGNAL_AVG, avg_ack_signal, s8);
|
||||
NL80211_EXT_FEATURE_ACK_SIGNAL_SUPPORT)) {
|
||||
PUT_SINFO(ACK_SIGNAL, ack_signal, u8);
|
||||
PUT_SINFO(ACK_SIGNAL_AVG, avg_ack_signal, s8);
|
||||
}
|
||||
|
||||
#undef PUT_SINFO
|
||||
#undef PUT_SINFO_U64
|
||||
|
|
Loading…
Reference in New Issue
Block a user