From patchwork Sun Jul 14 15:44:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Crispin X-Patchwork-Id: 11043259 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 67A5413A4 for ; Sun, 14 Jul 2019 15:44:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5485827968 for ; Sun, 14 Jul 2019 15:44:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48F7627C05; Sun, 14 Jul 2019 15:44:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E4F6D27968 for ; Sun, 14 Jul 2019 15:44:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=9egLG5V7LglTUR0275FFjUpfI14uYv4OoAAvXnNBpnU=; b=k1kqqoP9V0eVV2 S9PxoOfBPBD8sTi0gwIYONVtoYBCMvSs+PKSQ7dlhhhYZbPl9T4eOi79PSNcP9oouZwBaI9B79b8l p7RVRX+9I59W4UF3bWlTE9kSo9T7KQOZ8hGSdLaZ7O9FgagijTnP+Kf8/L8VtaAo8iptwRVInVA3f cK7C2n3u/OUXFGf2ptzyFJIK29zQggWa6mlIQNcrQzGU7LsYmJ9Bl/Y86ah3BqKj7HTxZtRqvknGS 4ts3YR2Jum3w6J/QYOd9jzuK/pGuR3aeseAHnMVoQPEg7MleQpVVlUtv40atEjBk42Ocfjw8QYz0l rdWqecZR6S2IwW0d4AdQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hmgg7-0006gf-88; Sun, 14 Jul 2019 15:44:43 +0000 Received: from nbd.name ([2a01:4f8:221:3d45::2]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hmgg2-0006bw-VF for ath11k@lists.infradead.org; Sun, 14 Jul 2019 15:44:40 +0000 Received: from p5dcfb359.dip0.t-ipconnect.de ([93.207.179.89] helo=bertha.fritz.box) by ds12 with esmtpa (Exim 4.89) (envelope-from ) id 1hmgfz-0007cJ-8c; Sun, 14 Jul 2019 17:44:35 +0200 From: John Crispin To: Johannes Berg , Kalle Valo Subject: [PATCH 4/6] ath11k: drop tx_info from ath11k_sta Date: Sun, 14 Jul 2019 17:44:17 +0200 Message-Id: <20190714154419.11854-5-john@phrozen.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190714154419.11854-1-john@phrozen.org> References: <20190714154419.11854-1-john@phrozen.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190714_084439_171295_3B2EA5BE X-CRM114-Status: GOOD ( 11.03 ) X-BeenThere: ath11k@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, John Crispin Sender: "ath11k" Errors-To: ath11k-bounces+patchwork-ath11k=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP We will start using ieee80211_tx_status_ext() so we do not need to track tx rates inside a struct ieee80211_tx_info. It is currently not possible to populate that struct with HE rate info anyhow. Signed-off-by: John Crispin --- drivers/net/wireless/ath/ath11k/core.h | 1 - drivers/net/wireless/ath/ath11k/dp_rx.c | 52 +------------------------ 2 files changed, 2 insertions(+), 51 deletions(-) diff --git a/drivers/net/wireless/ath/ath11k/core.h b/drivers/net/wireless/ath/ath11k/core.h index 2375a5b9ec42..1255eb417e58 100644 --- a/drivers/net/wireless/ath/ath11k/core.h +++ b/drivers/net/wireless/ath/ath11k/core.h @@ -331,7 +331,6 @@ struct ath11k_sta { u32 smps; struct work_struct update_wk; - struct ieee80211_tx_info tx_info; struct rate_info txrate; struct rate_info last_txrate; u64 rx_duration; diff --git a/drivers/net/wireless/ath/ath11k/dp_rx.c b/drivers/net/wireless/ath/ath11k/dp_rx.c index fdf8311e12ae..01080de7d919 100644 --- a/drivers/net/wireless/ath/ath11k/dp_rx.c +++ b/drivers/net/wireless/ath/ath11k/dp_rx.c @@ -1009,25 +1009,6 @@ static u8 ath11k_bw_to_mac80211_bw(u8 bw) return ret; } -static u32 ath11k_bw_to_mac80211_bwflags(u8 bw) -{ - u32 bwflags = 0; - - switch (bw) { - case ATH11K_BW_40: - bwflags = IEEE80211_TX_RC_40_MHZ_WIDTH; - break; - case ATH11K_BW_80: - bwflags = IEEE80211_TX_RC_80_MHZ_WIDTH; - break; - case ATH11K_BW_160: - bwflags = IEEE80211_TX_RC_160_MHZ_WIDTH; - break; - } - - return bwflags; -} - static void ath11k_update_per_peer_tx_stats(struct ath11k *ar, struct htt_ppdu_user_stats *usr_stats) @@ -1037,7 +1018,6 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, struct ieee80211_sta *sta; struct ath11k_sta *arsta; struct htt_ppdu_stats_user_rate *user_rate; - 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; @@ -1108,62 +1088,34 @@ ath11k_update_per_peer_tx_stats(struct ath11k *ar, arsta = (struct ath11k_sta *)sta->drv_priv; memset(&arsta->txrate, 0, sizeof(arsta->txrate)); - memset(&arsta->tx_info.status, 0, sizeof(arsta->tx_info.status)); switch (flags) { case WMI_RATE_PREAMBLE_OFDM: arsta->txrate.legacy = rate; - if (arsta->arvif && arsta->arvif->vif) - conf = rcu_dereference(arsta->arvif->vif->chanctx_conf); - if (conf && conf->def.chan->band == NL80211_BAND_5GHZ) - arsta->tx_info.status.rates[0].idx = rate_idx - 4; break; case WMI_RATE_PREAMBLE_CCK: arsta->txrate.legacy = rate; - arsta->tx_info.status.rates[0].idx = rate_idx; - if (mcs > ATH11K_HW_RATE_CCK_LP_1M && - mcs <= ATH11K_HW_RATE_CCK_SP_2M) - arsta->tx_info.status.rates[0].flags |= - IEEE80211_TX_RC_USE_SHORT_PREAMBLE; break; case WMI_RATE_PREAMBLE_HT: arsta->txrate.mcs = mcs + 8 * (nss - 1); - arsta->tx_info.status.rates[0].idx = arsta->txrate.mcs; arsta->txrate.flags = RATE_INFO_FLAGS_MCS; - arsta->tx_info.status.rates[0].flags |= IEEE80211_TX_RC_MCS; - if (sgi) { + if (sgi) arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI; - arsta->tx_info.status.rates[0].flags |= - IEEE80211_TX_RC_SHORT_GI; - } break; case WMI_RATE_PREAMBLE_VHT: arsta->txrate.mcs = mcs; - ieee80211_rate_set_vht(&arsta->tx_info.status.rates[0], mcs, nss); arsta->txrate.flags = RATE_INFO_FLAGS_VHT_MCS; - arsta->tx_info.status.rates[0].flags |= IEEE80211_TX_RC_VHT_MCS; - if (sgi) { + if (sgi) arsta->txrate.flags |= RATE_INFO_FLAGS_SHORT_GI; - arsta->tx_info.status.rates[0].flags |= - IEEE80211_TX_RC_SHORT_GI; - } break; } arsta->txrate.nss = nss; arsta->txrate.bw = ath11k_bw_to_mac80211_bw(bw); - arsta->tx_info.status.rates[0].flags |= ath11k_bw_to_mac80211_bwflags(bw); memcpy(&arsta->last_txrate, &arsta->txrate, sizeof(struct rate_info)); - if (succ_pkts) { - arsta->tx_info.flags = IEEE80211_TX_STAT_ACK; - arsta->tx_info.status.rates[0].count = 1; - ieee80211_tx_rate_update(ar->hw, sta, &arsta->tx_info); - } - memset(peer_stats, 0, sizeof(*peer_stats)); - peer_stats->succ_pkts = succ_pkts; peer_stats->succ_bytes = succ_bytes; peer_stats->is_ampdu = is_ampdu;