All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH v2 2/2] ath10k: fix rssi and rate reporting
Date: Thu, 15 May 2014 10:24:30 -0700	[thread overview]
Message-ID: <5374F84E.1090208@candelatech.com> (raw)
In-Reply-To: <1395692698-4745-2-git-send-email-janusz.dziedzic@tieto.com>

I have a few questions on this patch (long since accepted upstream).

First, why do you only memset the rx_status if START_VALID is set,
and why do you not set:

rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL

in an else clause if START_VALID is not set?

The patch definitely helps, but I'm still getting less accuracy than expected
(as compared to ath9k going through a similar rate vs range test).

Thanks,
Ben


> diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
> index be25e16..f7ecc10 100644
> --- a/drivers/net/wireless/ath/ath10k/htt_rx.c
> +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
> @@ -1154,8 +1154,6 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
>  
>  	lockdep_assert_held(&htt->rx_ring.lock);
>  
> -	memset(rx_status, 0, sizeof(*rx_status));
> -
>  	fw_desc_len = __le16_to_cpu(rx->prefix.fw_rx_desc_bytes);
>  	fw_desc = (u8 *)&rx->fw_desc;
>  
> @@ -1164,8 +1162,11 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
>  	mpdu_ranges = htt_rx_ind_get_mpdu_ranges(rx);
>  
>  	/* Fill this once, while this is per-ppdu */
> -	rx_status->signal  = ATH10K_DEFAULT_NOISE_FLOOR;
> -	rx_status->signal += rx->ppdu.combined_rssi;
> +	if (rx->ppdu.info0 & HTT_RX_INDICATION_INFO0_START_VALID) {
> +		memset(rx_status, 0, sizeof(*rx_status));
> +		rx_status->signal  = ATH10K_DEFAULT_NOISE_FLOOR +
> +				     rx->ppdu.combined_rssi;
> +	}
>  
>  	if (rx->ppdu.info0 & HTT_RX_INDICATION_INFO0_END_VALID) {
>  		/* TSF available only in 32-bit */
> 


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

WARNING: multiple messages have this Message-ID (diff)
From: Ben Greear <greearb@candelatech.com>
To: Janusz Dziedzic <janusz.dziedzic@tieto.com>
Cc: ath10k@lists.infradead.org, linux-wireless@vger.kernel.org
Subject: Re: [PATCH v2 2/2] ath10k: fix rssi and rate reporting
Date: Thu, 15 May 2014 10:24:30 -0700	[thread overview]
Message-ID: <5374F84E.1090208@candelatech.com> (raw)
In-Reply-To: <1395692698-4745-2-git-send-email-janusz.dziedzic@tieto.com>

I have a few questions on this patch (long since accepted upstream).

First, why do you only memset the rx_status if START_VALID is set,
and why do you not set:

rx_status->flag |= RX_FLAG_NO_SIGNAL_VAL

in an else clause if START_VALID is not set?

The patch definitely helps, but I'm still getting less accuracy than expected
(as compared to ath9k going through a similar rate vs range test).

Thanks,
Ben


> diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c
> index be25e16..f7ecc10 100644
> --- a/drivers/net/wireless/ath/ath10k/htt_rx.c
> +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
> @@ -1154,8 +1154,6 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
>  
>  	lockdep_assert_held(&htt->rx_ring.lock);
>  
> -	memset(rx_status, 0, sizeof(*rx_status));
> -
>  	fw_desc_len = __le16_to_cpu(rx->prefix.fw_rx_desc_bytes);
>  	fw_desc = (u8 *)&rx->fw_desc;
>  
> @@ -1164,8 +1162,11 @@ static void ath10k_htt_rx_handler(struct ath10k_htt *htt,
>  	mpdu_ranges = htt_rx_ind_get_mpdu_ranges(rx);
>  
>  	/* Fill this once, while this is per-ppdu */
> -	rx_status->signal  = ATH10K_DEFAULT_NOISE_FLOOR;
> -	rx_status->signal += rx->ppdu.combined_rssi;
> +	if (rx->ppdu.info0 & HTT_RX_INDICATION_INFO0_START_VALID) {
> +		memset(rx_status, 0, sizeof(*rx_status));
> +		rx_status->signal  = ATH10K_DEFAULT_NOISE_FLOOR +
> +				     rx->ppdu.combined_rssi;
> +	}
>  
>  	if (rx->ppdu.info0 & HTT_RX_INDICATION_INFO0_END_VALID) {
>  		/* TSF available only in 32-bit */
> 


-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  parent reply	other threads:[~2014-05-15 17:24 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24 20:24 [PATCH v2 1/2] ath10k: introduce rx_status htt template Janusz Dziedzic
2014-03-24 20:24 ` Janusz Dziedzic
2014-03-24 20:24 ` [PATCH v2 2/2] ath10k: fix rssi and rate reporting Janusz Dziedzic
2014-03-24 20:24   ` Janusz Dziedzic
2014-03-24 22:20   ` Ben Greear
2014-03-24 22:20     ` Ben Greear
2014-05-15 17:24   ` Ben Greear [this message]
2014-05-15 17:24     ` Ben Greear
2014-05-16  6:45     ` Janusz Dziedzic
2014-05-16  6:45       ` Janusz Dziedzic
2014-03-25 12:16 ` [PATCH v2 1/2] ath10k: introduce rx_status htt template Kalle Valo
2014-03-25 12:16   ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5374F84E.1090208@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=ath10k@lists.infradead.org \
    --cc=janusz.dziedzic@tieto.com \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.