Search Linux Wireless

Re: [PATCH v2] ath10k: Fix 10.4 extended peer stats update

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

 



Mohammed Shafi Shajakhan <mohammed@xxxxxxxxxxxxxxxx> writes:

> From: Mohammed Shafi Shajakhan <mohammed@xxxxxxxxxxxxxxxx>
>
> 10.4 'extended peer stats' will be not be appended with normal peer stats
> data and they shall be coming in separate chunks. Fix this by maintaining
> a separate linked list 'extender peer stats' for 10.4 and update
> rx_duration for per station statistics. Also parse through beacon filter
> (if enabled), to make sure we parse the extended peer stats properly.
> This issue was exposed when more than one client is connected and
> extended peer stats for 10.4 is enabled
>
> The order for the stats is as below
> S - standard peer stats, E- extended peer stats, B - beacon filter stats
>
> {S1, S2, S3..} -> {B1, B2, B3..}(if available) -> {E1, E2, E3..}
>
> Fixes: f9575793d44c ("ath10k: enable parsing per station rx duration for 10.4")
> Signed-off-by: Mohammed Shafi Shajakhan <mohammed@xxxxxxxxxxxxxxxx>

[...]

> +void ath10k_sta_update_rx_duration(struct ath10k *ar,
> +				   struct ath10k_fw_stats *stats)
> +{
> +	struct ath10k_fw_file *fw_file = &ar->normal_mode_fw.fw_file;
> +
> +	if (fw_file->wmi_op_version < ATH10K_FW_WMI_OP_VERSION_10_4)
> +		ath10k_sta_update_stats_rx_duration(ar, &stats->peers);
> +	else
> +		ath10k_sta_update_extd_stats_rx_duration(ar,
> +							 &stats->peers_extd);
> +}

_Ideally_ wmi_op_version should be used only in ath10k_wmi_attach() and
nowhere else. Isn't there any other way to detect this scenario? For
example, what if you store stats_id to struct ath10k_fw_stats and do
something like this:

if (stats->stats_id & WMI_10_4_STAT_PEER_EXTD)
	ath10k_sta_update_extd_stats_rx_duration(ar,
						 &stats->peers_extd);
else
	ath10k_sta_update_stats_rx_duration(ar, &stats->peers);

Would that work?

-- 
Kalle Valo--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



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

  Powered by Linux