Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c4b0325 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "nl80211: Add per peer statistics to compute FCS error rate"

parents 9a219e2f 12b4947f
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1164,6 +1164,10 @@ struct cfg80211_tid_stats {
 * @rx_duration: aggregate PPDU duration(usecs) for all the frames from a peer
 * @pertid: per-TID statistics, see &struct cfg80211_tid_stats, using the last
 *	(IEEE80211_NUM_TIDS) index for MSDUs not encapsulated in QoS-MPDUs.
 * @rx_mpdu_count: number of MPDUs received from this station
 * @fcs_err_count: number of packets (MPDUs) received from this station with
 *	an FCS error. This counter should be incremented only when TA of the
 *	received packet with an FCS error matches the peer MAC address.
 */
struct station_info {
	u64 filled;
@@ -1208,6 +1212,9 @@ struct station_info {
	u64 rx_duration;
	u8 rx_beacon_signal_avg;
	struct cfg80211_tid_stats pertid[IEEE80211_NUM_TIDS + 1];

	u32 rx_mpdu_count;
	u32 fcs_err_count;
};

#if IS_ENABLED(CONFIG_CFG80211)
+8 −0
Original line number Diff line number Diff line
@@ -2940,6 +2940,12 @@ enum nl80211_sta_bss_param {
 * @NL80211_STA_INFO_RX_DURATION: aggregate PPDU duration for all frames
 *	received from the station (u64, usec)
 * @NL80211_STA_INFO_PAD: attribute used for padding for 64-bit alignment
 * @NL80211_STA_INFO_RX_MPDUS: total number of received packets (MPDUs)
 *	(u32, from this station)
 * @NL80211_STA_INFO_FCS_ERROR_COUNT: total number of packets (MPDUs) received
 *	with an FCS error (u32, from this station). This count may not include
 *	some packets with an FCS error due to TA corruption. Hence this counter
 *	might not be fully accurate.
 * @__NL80211_STA_INFO_AFTER_LAST: internal
 * @NL80211_STA_INFO_MAX: highest possible station info attribute
 */
@@ -2978,6 +2984,8 @@ enum nl80211_sta_info {
	NL80211_STA_INFO_TID_STATS,
	NL80211_STA_INFO_RX_DURATION,
	NL80211_STA_INFO_PAD,
	NL80211_STA_INFO_RX_MPDUS,
	NL80211_STA_INFO_FCS_ERROR_COUNT,

	/* keep last */
	__NL80211_STA_INFO_AFTER_LAST,
+2 −0
Original line number Diff line number Diff line
@@ -4431,6 +4431,8 @@ 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(RX_MPDUS, rx_mpdu_count, u32);
	PUT_SINFO(FCS_ERROR_COUNT, fcs_err_count, u32);

#undef PUT_SINFO
#undef PUT_SINFO_U64