Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp926549pxf; Thu, 18 Mar 2021 15:17:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw6CDDgnBVUFXn8+UDRotn3wermj6wcChNeAL182cXs+HlSvRPNhN/OCVz6ilYQWoIExotZ X-Received: by 2002:aa7:da97:: with SMTP id q23mr6171038eds.180.1616105820122; Thu, 18 Mar 2021 15:17:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616105820; cv=none; d=google.com; s=arc-20160816; b=WUteTBjiJ4sTtJqQAJh2pqLtC8+ASWVv78TtER7lz4TXDfiYb2DQ5j6BcBDMg9nRV6 ZkXOW/uTQ/v9Yze3Tb8lT4OI1ZxY6Ds8dbxMmOJclyuA9+V4X8UZinSYPeZHcLK3JPXX 047UpRyvg3uCVP7fv3ExdvVeKwAIN+HTT1AprFMCm1390LLdhmEhXsBe3TzOQab7E+t5 4/QdUfs2eYSfrraF+i8txxSVDYvsEun1972SaD+Y1ggj1EoVFkRyr2Z5wTzh2PlOoP16 v5nPrZ8tMpfx7BCtzQ5J248VGpILuR/x4L0SPb+hum4JeSfyo6lY0Z/vW+InBbfZ1H8I pC7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dmarc-filter:sender:dkim-signature; bh=YsoJ4yAAbS2CMjSA6qjntVx9JJnbMWjZKmuNW8/Fl5s=; b=PlEcHbSNqn7OYmDw8nNH+YsIJ4yx/NLEyBqag+faPEMcnWBBFR0j302ism5bm8m5xt JS6xxUUw1rwmC0V2xm4tG5fexHnORzC+VEqO52oSRtGdicpyBHLJY3IaPqKUeP9A0beK TGR/uj3b7ZLU7tWd8S2Obtonrl+ax019OjDKQRwk45FdYlfM52nGC7SfmFI6dEizoWfL ehXBznroPY3wsZ8QpRdoryIV8a7YSqKK5BTqDFqRhvutJJhHkILvvFVbbRMUl5AEVusK DMj3HDbkVMpGRGV9NztH/OI1GYyVvnzcnHB63WVciAKDDe+Nd32zoW2tjJLW7sTxsMUR A8mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=aOvGTDms; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qh20si2383654ejb.749.2021.03.18.15.16.37; Thu, 18 Mar 2021 15:17:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=aOvGTDms; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231904AbhCRWPo (ORCPT + 99 others); Thu, 18 Mar 2021 18:15:44 -0400 Received: from m43-7.mailgun.net ([69.72.43.7]:26373 "EHLO m43-7.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230368AbhCRWPU (ORCPT ); Thu, 18 Mar 2021 18:15:20 -0400 X-Greylist: delayed 301 seconds by postgrey-1.27 at vger.kernel.org; Thu, 18 Mar 2021 18:15:11 EDT DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1616105720; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=YsoJ4yAAbS2CMjSA6qjntVx9JJnbMWjZKmuNW8/Fl5s=; b=aOvGTDmsXIeQmzo/ZOVSvm614boPOBB3eJ34PKlm5F64+pAxcEmg1DVpKNJYB3DKGOimrgeP T1nCCcz0shaed89+8uxnbiMM6c382JBtthiMxSG58uGxd06NsYqImHKwvxrv+FK8RwzBOk1+ JsegvMnjWwG/Qito3iX5mh22yqw= X-Mailgun-Sending-Ip: 69.72.43.7 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n07.prod.us-west-2.postgun.com with SMTP id 6053cfbfe2200c0a0d678042 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 18 Mar 2021 22:10:07 GMT Sender: pradeepc=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 26593C43461; Thu, 18 Mar 2021 22:10:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00,SPF_FAIL, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from pradeepc-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pradeepc) by smtp.codeaurora.org (Postfix) with ESMTPSA id 03D6EC433ED; Thu, 18 Mar 2021 22:10:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 03D6EC433ED Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=fail smtp.mailfrom=pradeepc@codeaurora.org From: Pradeep Kumar Chitrapu To: ath11k@lists.infradead.org Cc: linux-wireless@vger.kernel.org, Pradeep Kumar Chitrapu , Miles Hu , John Crispin Subject: [PATCH V8 1/3] ath11k: switch to using ieee80211_tx_status_ext() Date: Thu, 18 Mar 2021 15:09:55 -0700 Message-Id: <1616105397-1482-2-git-send-email-pradeepc@codeaurora.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1616105397-1482-1-git-send-email-pradeepc@codeaurora.org> References: <1616105397-1482-1-git-send-email-pradeepc@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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 | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/dp_tx.c b/drivers/net/wireless/ath/ath11k/dp_tx.c index 8bba5234f81f..99fc54ee6a78 100644 --- a/drivers/net/wireless/ath/ath11k/dp_tx.c +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c @@ -417,9 +417,12 @@ 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; if (WARN_ON_ONCE(ts->buf_rel_source != HAL_WBM_REL_SRC_MODULE_TQM)) { /* Must not happen */ @@ -483,13 +486,23 @@ 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. - */ - - ieee80211_tx_status(ar->hw, msdu); + spin_lock_bh(&ab->base_lock); + peer = ath11k_peer_find_by_id(ab, ts->peer_id); + if (peer) { + arsta = (struct ath11k_sta *)peer->sta->drv_priv; + status.sta = peer->sta; + status.skb = msdu; + status.info = info; + status.rate = &arsta->last_txrate; + } + spin_unlock_bh(&ab->base_lock); + rcu_read_unlock(); + if (peer) + ieee80211_tx_status_ext(ar->hw, &status); + else + dev_kfree_skb_any(msdu); + return; exit: rcu_read_unlock(); } -- 2.17.1