From: John Crispin <john@phrozen.org> To: Johannes Berg <johannes@sipsolutions.net>, Kalle Valo <kvalo@codeaurora.org> Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, John Crispin <john@phrozen.org> Subject: [PATCH 4/6] ath11k: drop tx_info from ath11k_sta Date: Sun, 14 Jul 2019 17:44:17 +0200 [thread overview] Message-ID: <20190714154419.11854-5-john@phrozen.org> (raw) In-Reply-To: <20190714154419.11854-1-john@phrozen.org> 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 <john@phrozen.org> --- 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; -- 2.20.1
WARNING: multiple messages have this Message-ID (diff)
From: John Crispin <john@phrozen.org> To: Johannes Berg <johannes@sipsolutions.net>, Kalle Valo <kvalo@codeaurora.org> Cc: linux-wireless@vger.kernel.org, ath11k@lists.infradead.org, John Crispin <john@phrozen.org> Subject: [PATCH 4/6] ath11k: drop tx_info from ath11k_sta Date: Sun, 14 Jul 2019 17:44:17 +0200 [thread overview] Message-ID: <20190714154419.11854-5-john@phrozen.org> (raw) In-Reply-To: <20190714154419.11854-1-john@phrozen.org> 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 <john@phrozen.org> --- 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; -- 2.20.1 _______________________________________________ ath11k mailing list ath11k@lists.infradead.org http://lists.infradead.org/mailman/listinfo/ath11k
next prev parent reply other threads:[~2019-07-14 15:44 UTC|newest] Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-07-14 15:44 [PATCH 0/6] mac80211: add HE TX rate reporting to radiotap John Crispin 2019-07-14 15:44 ` John Crispin 2019-07-14 15:44 ` [PATCH 1/6] mac80211: add xmit rate to struct ieee80211_tx_status John Crispin 2019-07-14 15:44 ` John Crispin 2019-07-14 15:44 ` [PATCH 2/6] mac80211: propagate struct ieee80211_tx_status into ieee80211_tx_monitor() John Crispin 2019-07-14 15:44 ` John Crispin 2019-07-14 15:44 ` [PATCH 3/6] mac80211: add struct ieee80211_tx_status support to ieee80211_add_tx_radiotap_header John Crispin 2019-07-14 15:44 ` John Crispin 2019-07-14 15:44 ` John Crispin [this message] 2019-07-14 15:44 ` [PATCH 4/6] ath11k: drop tx_info from ath11k_sta John Crispin 2019-07-14 15:44 ` [PATCH 5/6] ath11k: add HE rate accounting to driver John Crispin 2019-07-14 15:44 ` John Crispin 2019-07-14 15:44 ` [PATCH 6/6] ath11k: switch to using ieee80211_tx_status_ext() John Crispin 2019-07-14 15:44 ` John Crispin 2019-08-09 23:23 ` Pradeep Kumar Chitrapu 2019-08-09 23:23 ` Pradeep Kumar Chitrapu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20190714154419.11854-5-john@phrozen.org \ --to=john@phrozen.org \ --cc=ath11k@lists.infradead.org \ --cc=johannes@sipsolutions.net \ --cc=kvalo@codeaurora.org \ --cc=linux-wireless@vger.kernel.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.