From mboxrd@z Thu Jan 1 00:00:00 1970 From: Luis R. Rodriguez Date: Tue, 26 May 2009 09:46:48 -0700 Subject: [ath9k-devel] [PATCH 1/2] ath9k combined rcstat In-Reply-To: References: Message-ID: <20090526164648.GB7072@tesla> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ath9k-devel@lists.ath9k.org On Mon, May 25, 2009 at 06:32:31AM -0700, Jeff Hansen wrote: > 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 > Index: compat-wireless-2009-05-20/drivers/net/wireless/ath/ath9k/debug.h > =================================================================== > --- compat-wireless-2009-05-20.orig/drivers/net/wireless/ath/ath9k/debug.h 2009-05-25 13:15:11.000000000 +0000 > +++ compat-wireless-2009-05-20/drivers/net/wireless/ath/ath9k/debug.h 2009-05-25 13:15:44.000000000 +0000 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 > @@ -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); > 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