Skip to contentSkip to conversation

ath9k combined rcstat

PATCH New Jeff Hansen 2 participants 2 messages May 25, 2009 – May 26, 2009 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ath9k combined rcstat

This patch combines the legacy and 11n rcstats into one, using the normal rate table indices instead of two separate indices for each mode. Legacy rates also get all of the PER information, now, too.

-Jeff

---------------------------------------------------
"If someone's gotta do it, it might as well be me."
x at jeffhansen.com
-------------- next part --------------

drivers/net/wireless/ath/ath9k/debug.h +2 -7
Index: compat-wireless-2009-05-20/drivers/net/wireless/ath/ath9k/debug.h
===================================================================
@@ -80,11 +80,7 @@
 	u32 dtim;
 };
 
-struct ath_legacy_rc_stats {
-	u32 success;
-};
-
-struct ath_11n_rc_stats {
+struct ath_rc_stats {
 	u32 success;
 	u32 retries;
 	u32 xretries;
@@ -93,8 +89,7 @@
 
 struct ath_stats {
 	struct ath_interrupt_stats istats;
-	struct ath_legacy_rc_stats legacy_rcstats[12];	/* max(11a,11b,11g) */
-	struct ath_11n_rc_stats n_rcstats[16];		/* 0..15 MCS rates */
+	struct ath_rc_stats rcstats[RATE_TABLE_SIZE];
 };
 
 struct ath9k_debug {
drivers/net/wireless/ath/ath9k/debug.c +32 -80

149 lines not on this page · raw message

#1 lore raw

PATCH 1/2 ath9k combined rcstat

Quoted 9 lines · Jeff Hansen

This patch combines the legacy and 11n rcstats into one, using the normal rate table indices instead of two separate indices for each mode. Legacy rates also get all of the PER information, now, too.

-Jeff

---------------------------------------------------
"If someone's gotta do it, it might as well be me."
x at jeffhansen.com

Content-Description: 001-combined-rcstat.patch

drivers/net/wireless/ath/ath9k/debug.h

Quoted 4 lines

Index: compat-wireless-2009-05-20/drivers/net/wireless/ath/ath9k/debug.h
===================================================================

drivers/net/wireless/ath/ath9k/debug.h +0 -0

Thanks for the patch, can you please address the considerations below but also format the patch using git on wireless-testing and also abide by the usual patch format for upstream?

http://wireless.kernel.org/en/developers/Documentation/SubmittingPatches

Quoted 23 lines
drivers/net/wireless/ath/ath9k/debug.h +1 -15
@@ -224,111 +225,62 @@
 	.owner = THIS_MODULE
 };
 
-static void ath_debug_stat_11n_rc(struct ath_softc *sc, struct sk_buff *skb)
-{
-	struct ath_tx_info_priv *tx_info_priv = NULL;
-	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
-	struct ieee80211_tx_rate *rates = tx_info->status.rates;
-	int final_ts_idx, idx;
-
-	tx_info_priv = ATH_TX_INFO_PRIV(tx_info);
-	final_ts_idx = tx_info_priv->tx.ts_rateindex;
-	idx = sc->cur_rate_table->info[rates[final_ts_idx].idx].dot11rate;
-
-	sc->debug.stats.n_rcstats[idx].success++;
-}
-
-static void ath_debug_stat_legacy_rc(struct ath_softc *sc, struct sk_buff *skb)
+void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb)
 {
 	struct ath_tx_info_priv *tx_info_priv = NULL;
 	struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);

drivers/net/wireless/ath/ath9k/debug.h line 237

Quoted 10 lines
drivers/net/wireless/ath/ath9k/debug.h +2 -4
 	struct ieee80211_tx_rate *rates = tx_info->status.rates;
-	int final_ts_idx, idx;
+	int final_ts_idx;
 
 	tx_info_priv = ATH_TX_INFO_PRIV(tx_info);
 	final_ts_idx = tx_info_priv->tx.ts_rateindex;
-	idx = rates[final_ts_idx].idx;
-
-	sc->debug.stats.legacy_rcstats[idx].success++;
+	sc->debug.stats.rcstats[rates[final_ts_idx].idx].success++;

This seems a bit hard to read can you add a pointer for the rcstats[foo] and then access it.

Luis