From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jNPAq-000510-3X for ath10k@lists.infradead.org; Sat, 11 Apr 2020 23:04:33 +0000 From: Sasha Levin Subject: [PATCH AUTOSEL 5.6 032/149] ath10k: fix not registering airtime of 11a station with WMM disable Date: Sat, 11 Apr 2020 19:01:49 -0400 Message-Id: <20200411230347.22371-32-sashal@kernel.org> In-Reply-To: <20200411230347.22371-1-sashal@kernel.org> References: <20200411230347.22371-1-sashal@kernel.org> MIME-Version: 1.0 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "ath10k" Errors-To: ath10k-bounces+kvalo=adurom.com@lists.infradead.org To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Sasha Levin , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, ath10k@lists.infradead.org, Yibo Zhao , Kalle Valo From: Yibo Zhao [ Upstream commit f9680c75d187f2d5b9288c02f7a432041d4447b4 ] The tid of 11a station with WMM disable reported by FW is 0x10 in tx completion. The tid 16 is mapped to a NULL txq since buffer MMPDU capbility is not supported. Then 11a station's airtime will not be registered due to NULL txq check. As a results, airtime of 11a station keeps unchanged in debugfs system. Mask the tid along with IEEE80211_QOS_CTL_TID_MASK to make it in the valid range. Hardwares tested : QCA9984 Firmwares tested : 10.4-3.10-00047 Signed-off-by: Yibo Zhao Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/htt_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 38a5814cf345d..f883f2a724dd9 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -2744,7 +2744,8 @@ static void ath10k_htt_rx_tx_compl_ind(struct ath10k *ar, continue; } - tid = FIELD_GET(HTT_TX_PPDU_DUR_INFO0_TID_MASK, info0); + tid = FIELD_GET(HTT_TX_PPDU_DUR_INFO0_TID_MASK, info0) & + IEEE80211_QOS_CTL_TID_MASK; tx_duration = __le32_to_cpu(ppdu_dur->tx_duration); ieee80211_sta_register_airtime(peer->sta, tid, tx_duration, 0); -- 2.20.1 _______________________________________________ ath10k mailing list ath10k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath10k From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.1 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F140BC2BB86 for ; Sat, 11 Apr 2020 23:49:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CB66C206F7 for ; Sat, 11 Apr 2020 23:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586648961; bh=Bwt6G+LEc6pB7T3aA5OOwdJPfPsV/lVCeaKTk/v1nuY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=AI9gyMKImzEksttIATUFUlNya0wAFyTy2dH3qfRHbgHl+15Dj42Dag+h+SAtZghMM 8IKz/Sy3RX3kdbpaqyBZ86NfuHvf7qBFlW1DliHLH9pY1IJtioMBysFR8zr0MnRG0f bwOLNQl0erdN1TXI99RQhb/B8GZSfTw7E1ipU0LA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727788AbgDKXtO (ORCPT ); Sat, 11 Apr 2020 19:49:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:37822 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727159AbgDKXE1 (ORCPT ); Sat, 11 Apr 2020 19:04:27 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A317321744; Sat, 11 Apr 2020 23:04:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1586646267; bh=Bwt6G+LEc6pB7T3aA5OOwdJPfPsV/lVCeaKTk/v1nuY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lKhCTfydvYi4Cy79qfgOtm/WpLQp2/E8q/WdGrED6COLvMs9RAh5lVgrGcEs628SS px4tmfvkNuLCrD40eKCXRoi+XAv2m1psMxzzZqrJot3fXqyhEedqiPDazLwzneKEld luWiKCaqUEQuwJu7HYmUijQU0ehVgjFGsGjbRAwk= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Yibo Zhao , Kalle Valo , Sasha Levin , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 5.6 032/149] ath10k: fix not registering airtime of 11a station with WMM disable Date: Sat, 11 Apr 2020 19:01:49 -0400 Message-Id: <20200411230347.22371-32-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200411230347.22371-1-sashal@kernel.org> References: <20200411230347.22371-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Yibo Zhao [ Upstream commit f9680c75d187f2d5b9288c02f7a432041d4447b4 ] The tid of 11a station with WMM disable reported by FW is 0x10 in tx completion. The tid 16 is mapped to a NULL txq since buffer MMPDU capbility is not supported. Then 11a station's airtime will not be registered due to NULL txq check. As a results, airtime of 11a station keeps unchanged in debugfs system. Mask the tid along with IEEE80211_QOS_CTL_TID_MASK to make it in the valid range. Hardwares tested : QCA9984 Firmwares tested : 10.4-3.10-00047 Signed-off-by: Yibo Zhao Signed-off-by: Kalle Valo Signed-off-by: Sasha Levin --- drivers/net/wireless/ath/ath10k/htt_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath10k/htt_rx.c b/drivers/net/wireless/ath/ath10k/htt_rx.c index 38a5814cf345d..f883f2a724dd9 100644 --- a/drivers/net/wireless/ath/ath10k/htt_rx.c +++ b/drivers/net/wireless/ath/ath10k/htt_rx.c @@ -2744,7 +2744,8 @@ static void ath10k_htt_rx_tx_compl_ind(struct ath10k *ar, continue; } - tid = FIELD_GET(HTT_TX_PPDU_DUR_INFO0_TID_MASK, info0); + tid = FIELD_GET(HTT_TX_PPDU_DUR_INFO0_TID_MASK, info0) & + IEEE80211_QOS_CTL_TID_MASK; tx_duration = __le32_to_cpu(ppdu_dur->tx_duration); ieee80211_sta_register_airtime(peer->sta, tid, tx_duration, 0); -- 2.20.1