Search Linux Wireless

Re: [PATCH wireless-next v8 06/10] wifi: mac80211: add support to accumulate removed link statistics

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 2025-05-15 at 11:19 +0530, Sarika Sharma wrote:
> 
> +void sta_set_accumulated_removed_links_sinfo(struct sta_info *sta,
> +					     struct station_info *sinfo)
> +{
> +	/* Resetting the MLO statistics for accumulated fields, to
> +	 * avoid duplication.
> +	 */
> +	sinfo->tx_packets = 0;
> +	sinfo->rx_packets = 0;
> +	sinfo->tx_bytes = 0;
> +	sinfo->rx_bytes = 0;
> +	sinfo->tx_retries = 0;
> +	sinfo->tx_failed = 0;
> +	sinfo->rx_dropped_misc = 0;
> +	sinfo->beacon_loss_count = 0;
> +	sinfo->expected_throughput = 0;
> +	sinfo->rx_mpdu_count = 0;
> +	sinfo->fcs_err_count = 0;
> +	sinfo->rx_beacon = 0;
> +	sinfo->rx_duration = 0;
> +	sinfo->tx_duration = 0;
> +
> +	/* Accumulating the removed link statistics. */
> +	sinfo->tx_packets += sta->rem_link_stats.tx_packets;
> +	sinfo->rx_packets += sta->rem_link_stats.rx_packets;
> +	sinfo->tx_bytes += sta->rem_link_stats.tx_bytes;
> +	sinfo->rx_bytes += sta->rem_link_stats.rx_bytes;
> +	sinfo->tx_retries += sta->rem_link_stats.tx_retries;
> +	sinfo->tx_failed += sta->rem_link_stats.tx_failed;
> +	sinfo->rx_dropped_misc += sta->rem_link_stats.rx_dropped_misc;

Setting something to 0 just to += it seems silly?

However I think it also needs a bit more explanation - it's sinfo, so
it's zeroed at allocation, where would non-zero numbers come from?

johannes






[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux