Historical ath9k-devel archives
 help / color / mirror / Atom feed
From: Oleksij Rempel <linux@rempel-privat.de>
To: ath9k-devel@lists.ath9k.org
Subject: [ath9k-devel] [PATCH 07/13] ath9k_htc: use ath9k_cmn_process_rate
Date: Wed, 29 Jan 2014 20:06:58 +0100	[thread overview]
Message-ID: <1391022424-21087-6-git-send-email-linux@rempel-privat.de> (raw)
In-Reply-To: <1391022424-21087-1-git-send-email-linux@rempel-privat.de>

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
---
 drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 40 ++-------------------------
 1 file changed, 2 insertions(+), 38 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
index 99d5118..de75224 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -929,42 +929,6 @@ void ath9k_host_rx_init(struct ath9k_htc_priv *priv)
 	ath9k_hw_startpcureceive(priv->ah, test_bit(OP_SCANNING, &priv->op_flags));
 }
 
-static void ath9k_process_rate(struct ieee80211_hw *hw,
-			       struct ieee80211_rx_status *rxs,
-			       u8 rx_rate, u8 rs_flags)
-{
-	struct ieee80211_supported_band *sband;
-	enum ieee80211_band band;
-	unsigned int i = 0;
-
-	if (rx_rate & 0x80) {
-		/* HT rate */
-		rxs->flag |= RX_FLAG_HT;
-		if (rs_flags & ATH9K_RX_2040)
-			rxs->flag |= RX_FLAG_40MHZ;
-		if (rs_flags & ATH9K_RX_GI)
-			rxs->flag |= RX_FLAG_SHORT_GI;
-		rxs->rate_idx = rx_rate & 0x7f;
-		return;
-	}
-
-	band = hw->conf.chandef.chan->band;
-	sband = hw->wiphy->bands[band];
-
-	for (i = 0; i < sband->n_bitrates; i++) {
-		if (sband->bitrates[i].hw_value == rx_rate) {
-			rxs->rate_idx = i;
-			return;
-		}
-		if (sband->bitrates[i].hw_value_short == rx_rate) {
-			rxs->rate_idx = i;
-			rxs->flag |= RX_FLAG_SHORTPRE;
-			return;
-		}
-	}
-
-}
-
 static inline void conver_htc_flag(struct ath_rx_status *rx_stats,
 				   struct ath_htc_rx_status *rxstatus)
 {
@@ -1103,9 +1067,9 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
 		}
 	}
 
-	ath9k_process_rate(hw, rx_status, rxbuf->rxstatus.rs_rate,
-			   rxbuf->rxstatus.rs_flags);
 
+	if (ath9k_cmn_process_rate(common, hw, rx_stats, rx_status))
+		goto rx_next;
 
 	rx_stats->is_mybeacon = ath_is_mybeacon(common, hdr);
 	ath9k_cmn_process_rssi(common, hw, rx_stats, rx_status);
-- 
1.8.5.3

  parent reply	other threads:[~2014-01-29 19:06 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-29 19:05 [ath9k-devel] [PATCH 00/13] eliminate some ath9k_htc code Oleksij Rempel
2014-01-29 19:05 ` [ath9k-devel] [PATCH 01/13] ath: add last_rssi to ath_common Oleksij Rempel
2014-01-29 19:06 ` [ath9k-devel] [PATCH 02/13] ath9k: move ath9k_process_rssi to common.c Oleksij Rempel
2014-01-29 19:06   ` [ath9k-devel] [PATCH 03/13] ath9k: move ath9k_process_rate " Oleksij Rempel
2014-01-29 19:06   ` [ath9k-devel] [PATCH 04/13] ath9k: move ath9k_rx_accept " Oleksij Rempel
2014-01-29 19:06   ` [ath9k-devel] [PATCH 05/13] ath9k_htc: add rx header converter to make it usable by ath9k Oleksij Rempel
2014-02-03  2:09     ` Sujith Manoharan
2014-02-03 11:22       ` Oleksij Rempel
2014-02-03 12:07         ` Felix Fietkau
2014-02-03 13:11           ` Oleksij Rempel
2014-01-29 19:06   ` [ath9k-devel] [PATCH 06/13] ath9k_htc: use ath9k_cmn_process_rssi Oleksij Rempel
2014-01-29 19:06   ` Oleksij Rempel [this message]
2014-01-29 19:06   ` [ath9k-devel] [PATCH 08/13] ath9k_htc: use ath9k_cmn_rx_accept Oleksij Rempel
2014-01-29 19:07   ` [ath9k-devel] [PATCH 09/13] ath9k_htc: sync rx_status-> related code with ath9k Oleksij Rempel
2014-01-29 19:07   ` [ath9k-devel] [PATCH 10/13] ath9k: move ath9k_rx_skb_postprocess to common.c Oleksij Rempel
2014-01-29 19:07   ` [ath9k-devel] [PATCH 11/13] ath9k_htc: use ath9k_cmn_rx_skb_postprocess Oleksij Rempel
2014-01-29 19:07   ` [ath9k-devel] [PATCH 12/13] ath9k_htc: remove useless memcpy Oleksij Rempel
2014-01-29 19:07   ` [ath9k-devel] [PATCH 13/13] ath9k_htc: catch fw panic pattern Oleksij Rempel

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=1391022424-21087-6-git-send-email-linux@rempel-privat.de \
    --to=linux@rempel-privat.de \
    --cc=ath9k-devel@lists.ath9k.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox