Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp2554950pxf; Sun, 4 Apr 2021 05:57:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgmAwQj816wjuAkKbA5blMfzatrA1osW9ntJPOdynWqmhm/CsySmG38CfjNCl0NRWdsJQq X-Received: by 2002:a02:c985:: with SMTP id b5mr20705376jap.86.1617541024485; Sun, 04 Apr 2021 05:57:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617541024; cv=none; d=google.com; s=arc-20160816; b=Audw8ElVMBOxfEngnVMcgBxAvfM4wIk04lnWLYcAHnoR75AN8InZw8Meufm5qLopW2 5OSbAgtZjgOQhtEvu0BbOYmVfVirbmXK9GI2emJCPpZ/cv5QdnU8pqfSGaK2oHzC5hGE fTt4gXVilwQEF3WSlV0zvpZu7GAhpmRtv9ta9gzeEmOg6g4bWLUDYP8aEeeJWoBHHu8L F7RRKbjYRGXZXywyGmN3VtkO+leI5XD/BPolsKzCGAUe0CCwPTSZZ8HXwqAmEo70Dhko Npac9KgjqJ27TS/IeCmRG/Un7pnM56PNmUWcfZ3vGK3VLzAHb/D2tkuWFGRFo7NKwIZR drEA== 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=/GXnwqptt6p6CF8Ju3RWi0Vi/H9CAhjNh6c9swux4qw=; b=SKRhWS6svBXZMv1IO8JslfMx+hkhk5drp7i1UkodBXhPnXgjvlZB005hxN+/AaefVC ePMBLQzqXEy/mrBTiYD27uKMT3aVTUrqvnUwuJLi0y/U758RHihfHdbf1DwR/vT6xkl4 K197zS8vD41q4ksmdtZ/+9HaycbfkDRVWViBj+5qaGugEjEqHylfOnFslCbKs5znvYwz 23pxxbROjll56yr/hmGsDfbvRJdx5LDe2MsgPUtKIlZOLd9e1F3dQ/dNBvRVpLtC7KDu q0KRm29EmcNJPZDampoQuUnJ4xrCOD1nP9UcnbfCfk6qAKR133JES/vH+3wkLcMyGk/J XDyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=tGeZoN0f; 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 z6si12497499ilb.14.2021.04.04.05.56.47; Sun, 04 Apr 2021 05:57:04 -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=tGeZoN0f; 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 S229983AbhDDMw7 (ORCPT + 99 others); Sun, 4 Apr 2021 08:52:59 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:17051 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229483AbhDDMw6 (ORCPT ); Sun, 4 Apr 2021 08:52:58 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1617540774; h=References: In-Reply-To: Message-Id: Date: Subject: Cc: To: From: Sender; bh=/GXnwqptt6p6CF8Ju3RWi0Vi/H9CAhjNh6c9swux4qw=; b=tGeZoN0fcpg6Yz7zhTvx3F8v6K2l45+2zEn+LVCMOnofEU6UylvRzwgYQscWV2SyAdcdXAJl YXfiqu86NFyKeSOy0HwUljtRSv5W0TsrnwrhcTPepD+mqig74O7HV9ApkX70bWbxQ5SFsEcs Q8AizUlCnS3Z8p8yj23M+tyFRtg= X-Mailgun-Sending-Ip: 198.61.254.9 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-n01.prod.us-west-2.postgun.com with SMTP id 6069b69cf34440a9d4cbfce8 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Sun, 04 Apr 2021 12:52:44 GMT Sender: pradeepc=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id 26F3CC43462; Sun, 4 Apr 2021 12:52:44 +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 autolearn=no autolearn_force=no version=3.4.0 Received: from pradeepc2-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: pradeepc) by smtp.codeaurora.org (Postfix) with ESMTPSA id B5E48C433C6; Sun, 4 Apr 2021 12:52:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org B5E48C433C6 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 v9 1/3] ath11k: switch to using ieee80211_tx_status_ext() Date: Sun, 4 Apr 2021 05:52:33 -0700 Message-Id: <20210404125235.5589-2-pradeepc@codeaurora.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210404125235.5589-1-pradeepc@codeaurora.org> References: <20210404125235.5589-1-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 | 31 ++++++++++++++++++++----- 1 file changed, 25 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..f0a2e87b2454 100644 --- a/drivers/net/wireless/ath/ath11k/dp_tx.c +++ b/drivers/net/wireless/ath/ath11k/dp_tx.c @@ -417,9 +417,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 */ @@ -483,13 +487,28 @@ 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 || !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; + + spin_unlock_bh(&ab->base_lock); + rcu_read_unlock(); + ieee80211_tx_status_ext(ar->hw, &status); + return; exit: rcu_read_unlock(); } -- 2.17.1