ATH11K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
Cc: ath11k@lists.infradead.org
Subject: Re: [PATCH] ath11k: fetch and report DCM and RU stats from ppdu stats
Date: Thu, 20 Jun 2019 17:23:48 +0300	[thread overview]
Message-ID: <878stw49or.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1560872506-21217-1-git-send-email-pradeepc@codeaurora.org> (Pradeep Kumar Chitrapu's message of "Tue, 18 Jun 2019 21:11:46 +0530")

Pradeep Kumar Chitrapu <pradeepc@codeaurora.org> writes:

> HE DCM and RU allocation info is reported out of bound data path
> by firmware in ppdu stats. These are reported to mac80211 using
> sta_statistics() api.
>
> Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>

[...]

> --- a/drivers/net/wireless/ath/ath11k/dp_rx.c
> +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c
> @@ -1093,7 +1093,7 @@ static u32 ath11k_bw_to_mac80211_bwflags(u8 bw)
>  	struct ieee80211_chanctx_conf *conf = NULL;
>  	struct ath11k_per_peer_tx_stats *peer_stats = &ar->peer_tx_stats;
>  	int ret;
> -	u8 flags, mcs, nss, bw, sgi, rate_idx = 0;
> +	u8 flags, mcs, nss, bw, sgi, dcm, rate_idx = 0;
>  	u32 succ_bytes = 0;
>  	u16 rate = 0, succ_pkts = 0;
>  	bool is_ampdu = false;
> @@ -1127,12 +1127,17 @@ static u32 ath11k_bw_to_mac80211_bwflags(u8 bw)
>  	 * Firmare rate's control to be skipped for this?
>           */
>  
> -	if (flags == WMI_RATE_PREAMBLE_VHT && mcs > 9) {
> +	if (flags == WMI_RATE_PREAMBLE_HE && mcs > ATH11K_HE_MCS_MAX) {
> +		ath11k_warn(ab, "Invalid HE mcs %hhd peer stats",  mcs);
> +		return;
> +	}
> +
> +	if (flags == WMI_RATE_PREAMBLE_VHT && mcs > ATH11K_VHT_MCS_MAX) {
>  		ath11k_warn(ab, "Invalid VHT mcs %hhd peer stats",  mcs);
>  		return;
>  	}
>  
> -	if (flags == WMI_RATE_PREAMBLE_HT && (mcs > 7 || nss < 1)) {
> +	if (flags == WMI_RATE_PREAMBLE_HT && (mcs > ATH11K_HT_MCS_MAX || nss < 1)) {
>  		ath11k_warn(ab, "Invalid HT mcs %hhd nss %hhd peer stats",
>  			    mcs, nss);
>  		return;
> @@ -1201,6 +1206,12 @@ static u32 ath11k_bw_to_mac80211_bwflags(u8 bw)
>  						IEEE80211_TX_RC_SHORT_GI;
>  		}
>  		break;
> +	case WMI_RATE_PREAMBLE_HE:
> +		arsta->txrate.he_dcm = dcm;

This causes a new warning:

drivers/net/wireless/ath/ath11k/dp_rx.c:1159:24: warning: 'dcm' may be used uninitialized in this function [-Wmaybe-uninitialized]

Looks valid warning to me. How is this supposed to work, I don't see you
assigning to dcm anywhere?

-- 
Kalle Valo

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

  reply	other threads:[~2019-06-20 14:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-18 15:41 [PATCH] ath11k: fetch and report DCM and RU stats from ppdu stats Pradeep Kumar Chitrapu
2019-06-20 14:23 ` Kalle Valo [this message]
2019-06-20 17:55   ` John Crispin
2019-06-21 23:06     ` Pradeep Kumar Chitrapu

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=878stw49or.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@codeaurora.org \
    --cc=ath11k@lists.infradead.org \
    --cc=pradeepc@codeaurora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox