[PATCH] ath10k: fix the peer mac address in getting stats

Michal Kazior michal.kazior at tieto.com
Fri Mar 21 02:51:22 EDT 2014


On 21 March 2014 06:34, Chun-Yeow Yeoh <yeohchunyeow at gmail.com> wrote:
> Using the macro to convert the MAC address from WMI word
> format to char array has lead to the wrong peer mac
> address printed out while retrieving the peer stats from
> FW. Fix this.
>
> Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow at gmail.com>
> ---
>  drivers/net/wireless/ath/ath10k/debug.c |    4 ++--
>  drivers/net/wireless/ath/ath10k/wmi.h   |   10 ----------
>  2 files changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
> index 6debd28..f95defa 100644
> --- a/drivers/net/wireless/ath/ath10k/debug.c
> +++ b/drivers/net/wireless/ath/ath10k/debug.c
> @@ -252,8 +252,8 @@ void ath10k_debug_read_target_stats(struct ath10k *ar,
>                         peer_stats = (struct wmi_peer_stats *)tmp;
>                         s = &stats->peer_stat[i];
>
> -                       WMI_MAC_ADDR_TO_CHAR_ARRAY(&peer_stats->peer_macaddr,
> -                                                  s->peer_macaddr);
> +                       memcpy(s->peer_macaddr, &peer_stats->peer_macaddr.addr,
> +                              ETH_ALEN);

I noticed checkpatch started suggesting to prefer ether_addr_copy()
over memcpy(). Not a big deal though.

Other than that the patch looks good.

Reviewed-By: Michał Kazior <michal.kazior at tieto.com>


Michał



More information about the ath10k mailing list