Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4271071pxb; Mon, 21 Feb 2022 16:33:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJzGhkC1xwOoD1+coexCIaomMXV0cONN3EIloZ3NBez3cUsGRxseyyZYu1CUpcXTNuW3IFqm X-Received: by 2002:a17:902:9008:b0:14f:b1f9:5271 with SMTP id a8-20020a170902900800b0014fb1f95271mr7790314plp.86.1645489983551; Mon, 21 Feb 2022 16:33:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645489983; cv=none; d=google.com; s=arc-20160816; b=XyNFp/IyWHSW7jgcm9Y/HBG1KMh8txNA89OE7uYDQlcW33YSjuXiOyCXYydRNNnAww bPwNuK4sphq7dRWElZJ1t100vlNOIGJNKKC3kryB6xnYBd/nrlWw+EDtK9ankIjPEN35 zb288pFD7hXVK+berwxG82f1Jzlx7urcI3Vi4/9eswincgKSvdfEbFo6NRXZv2Atr+jD o7a9SbvcCysL0775hz9dER1vOBfXQtum0YKHrFXLoHx0xslOA0UDCtUVxyOESuXr6iNX KoHdusnqlqReFqFXJ7C96TCVPHJkj/4b8d6rqHKZLDOlshnGrnOldGxG7RrQXr8SlRSi sURw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=+HhBH9f+JeyYvL97OLxDMuZO100s5DgggERs1PamS1Q=; b=DhqE0tYeK7PpGY6CNHnBtbAf1/3rrHaDt5Dq7DyFa14VjeZJ/GQAddaIrUwYUqqyHG tnbVZQ9RR/losWfgUkDCX+2GKgQv9EGuWQv0ZDKma6Tx1pBkyLEZpWGmlGVKEBuERliY /yqf656QhXKXke9JYGS5VG0IbJnwFpucG577JNsio4RzKdltCkR8iDgj3iEFiWhDgX0/ 5FxM7RzclXL8PxjfPn5vXwviUZ+ySljl3i0C1GPhHJIsygX8XUWGqozCc6GaMSQRzNRa OxKPzP1ixHOEkd7QXNDofAir7z3baeBQytydRFlD5aGwai2cFC+WsqwK8kyf3qQcd0Sf iC5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T5Zf17Dz; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id rm12si788465pjb.48.2022.02.21.16.32.52; Mon, 21 Feb 2022 16:33:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=T5Zf17Dz; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355453AbiBULRD (ORCPT + 72 others); Mon, 21 Feb 2022 06:17:03 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47442 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355832AbiBULPP (ORCPT ); Mon, 21 Feb 2022 06:15:15 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4963D13D for ; Mon, 21 Feb 2022 02:52:58 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DB5D261140 for ; Mon, 21 Feb 2022 10:52:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1D59DC340E9; Mon, 21 Feb 2022 10:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645440777; bh=HIwMS/QNmvIMrz2nkQTGWNzTOiKAHN4AXscIkZ5Atok=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=T5Zf17Dz54lD0Rf+lQjYJQI+6ZQ2+2KyoGb/fBLlV+Ed+qifsoexD3HImjmet6S1N aGrvk0LE52G2zPN6Hck0OFR8ewBnJRdFOEzpPXmzM+J7LEbMeXMGrxd96uW9oWUT3i IOY1C0oBK/JGPq7/EuS3kZeGbUAMzh3+1TSxUh65ksmLHnd1jcJcI0CRhjEXthnsC8 i/Fw5BNRQ0H9ajSiZNcPOH0drAjDvttuvyKaNvBrwm4UmdXsCLOhrPz4ha93Ow5gfp Cognp3cQ4Q3zIhFA99zHBS80z68YUj9kAn7f96KtLxmjmUKydUwoALndFuwb5tuZWO lVRMDNt2/BSfw== From: Kalle Valo To: Pradeep Kumar Chitrapu Cc: ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, Miles Hu , John Crispin Subject: Re: [PATCH v10 1/3] ath11k: switch to using ieee80211_tx_status_ext() References: <20220217012112.31211-1-pradeepc@codeaurora.org> <20220217012112.31211-2-pradeepc@codeaurora.org> Date: Mon, 21 Feb 2022 12:52:50 +0200 In-Reply-To: <20220217012112.31211-2-pradeepc@codeaurora.org> (Pradeep Kumar Chitrapu's message of "Wed, 16 Feb 2022 17:21:10 -0800") Message-ID: <87ley4wkxp.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Pradeep Kumar Chitrapu writes: > This allows us to pass HE rates down into the stack. > > Co-developed-by: Miles Hu > Signed-off-by: Miles Hu > Signed-off-by: John Crispin > Signed-off-by: Pradeep Kumar Chitrapu > --- > drivers/net/wireless/ath/ath11k/dp_tx.c | 32 +++++++++++++++++++++---- > 1 file changed, 27 insertions(+), 5 deletions(-) > > diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c > index c7d7631efa5a..6f553a870e70 100644 > --- a/drivers/net/wireless/ath/ath11k/dp_tx.c > +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c > @@ -519,9 +519,13 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar, > struct sk_buff *msdu, > struct hal_tx_status *ts) > { > + struct ieee80211_tx_status status = { 0 }; > struct ath11k_base *ab = ar->ab; > struct ieee80211_tx_info *info; > struct ath11k_skb_cb *skb_cb; > + struct ath11k_peer *peer; > + struct ath11k_sta *arsta; > + struct rate_info rate; > > if (WARN_ON_ONCE(ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_TQM)) { > /* Must not happen */ > @@ -584,12 +588,30 @@ static void ath11k_dp_tx_complete_msdu(struct ath11k *ar, > ath11k_dp_tx_cache_peer_stats(ar, msdu, ts); > } > > - /* NOTE: Tx rate status reporting. Tx completion status does not have > - * necessary information (for example nss) to build the tx rate. > - * Might end up reporting it out-of-band from HTT stats. > - */ > + spin_lock_bh(&ab->base_lock); > + peer = ath11k_peer_find_by_id(ab, ts->peer_id); > + if (!peer || !peer->sta) { > + ath11k_dbg(ab, ATH11K_DBG_DATA, > + "dp_tx: failed to find the peer with peer_id %d\n", > + ts->peer_id); > + spin_unlock_bh(&ab->base_lock); > + dev_kfree_skb_any(msdu); > + goto exit; > + } > + arsta = (struct ath11k_sta *)peer->sta->drv_priv; > + status.sta = peer->sta; > + status.skb = msdu; > + status.info = info; > + rate = arsta->last_txrate; > + status.rate = &rate; > > - ieee80211_tx_status(ar->hw, msdu); > + spin_unlock_bh(&ab->base_lock); > + rcu_read_unlock(); > + > + ieee80211_tx_status_ext(ar->hw, &status); > + return; > +exit: > + rcu_read_unlock(); > } This patch gives a warning: drivers/net/wireless/ath/ath11k/dp_tx.c:600:9: warning: context imbalance in 'ath11k_dp_tx_complete_msdu' - unexpected unlock I don't understand why there's rcu_read_unlock() so in the pending branch I removed both of the calls and also the exit label. https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git/commit/?h=pending&id=cb63b88dca170d9de9ff30a546e08917e91c6f05 Please check my changes. -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches