From patchwork Tue Aug 7 01:13:59 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sujith Manoharan X-Patchwork-Id: 1282281 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id ED5E23FC23 for ; Tue, 7 Aug 2012 01:15:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757096Ab2HGBPU (ORCPT ); Mon, 6 Aug 2012 21:15:20 -0400 Received: from wolverine01.qualcomm.com ([199.106.114.254]:7909 "EHLO wolverine01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757080Ab2HGBPT (ORCPT ); Mon, 6 Aug 2012 21:15:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=qca.qualcomm.com; i=@qca.qualcomm.com; q=dns/txt; s=qcdkim; t=1344302120; x=1375838120; h=from:mime-version:content-transfer-encoding:message-id: date:to:cc:subject; bh=u65abBlcbQ4t4owuOuiImuYB0CsBJmc/XcBABMtXAlA=; b=otIZ3sVc23WBav7ESceMZrRvAMSBoQSk2+QRMz56M6tPPUpWxeTyz+FE +e5bREFFZJhKY6BGlhvGJUhmcDgMYQ6ujs/RT6pLjKjWEgzEdmP6ckcLS GTyb90ge7DMBEqQMterMan6NQCe4foVGO/iydFF/nxDCrUWDp4bDdUcqm w=; X-IronPort-AV: E=McAfee;i="5400,1158,6795"; a="221455413" Received: from ironmsg04-r.qualcomm.com ([172.30.46.18]) by wolverine01.qualcomm.com with ESMTP; 06 Aug 2012 18:15:20 -0700 X-IronPort-AV: E=Sophos;i="4.77,723,1336374000"; d="scan'208";a="362750983" Received: from nasanexhc14.na.qualcomm.com ([172.30.48.23]) by Ironmsg04-R.qualcomm.com with ESMTP/TLS/RC4-SHA; 06 Aug 2012 18:15:20 -0700 Received: from nasanexhc05.na.qualcomm.com (172.30.48.2) by nasanexhc14.na.qualcomm.com (172.30.48.23) with Microsoft SMTP Server (TLS) id 14.2.309.2; Mon, 6 Aug 2012 18:15:19 -0700 Received: from sarge (172.30.48.1) by qcmail1.qualcomm.com (172.30.48.2) with Microsoft SMTP Server (TLS) id 14.2.309.2; Mon, 6 Aug 2012 18:15:18 -0700 From: Sujith Manoharan MIME-Version: 1.0 Message-ID: <20512.27607.352426.424546@gargle.gargle.HOWL> Date: Tue, 7 Aug 2012 06:43:59 +0530 To: X-Mailer: VM 8.2.0b under 24.1.1 (x86_64-unknown-linux-gnu) CC: Subject: [RFC 06/14] ath9k: Change rateset calculation X-Originating-IP: [172.30.48.1] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Commit "ath9k: Change rate control to use legacy rate as last MRR" resulted in the mixing of HT/legacy rates in a single rateset, which is undesirable. Revert this behavior. Signed-off-by: Sujith Manoharan --- drivers/net/wireless/ath/ath9k/rc.c | 35 +++++++++-------------------------- 1 file changed, 9 insertions(+), 26 deletions(-) diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c index 2e517c0..e8f8e3d 100644 --- a/drivers/net/wireless/ath/ath9k/rc.c +++ b/drivers/net/wireless/ath/ath9k/rc.c @@ -582,8 +582,7 @@ static u8 ath_rc_setvalid_htrates(struct ath_rate_priv *ath_rc_priv) } static u8 ath_rc_get_highest_rix(struct ath_rate_priv *ath_rc_priv, - int *is_probing, - bool legacy) + int *is_probing) { const struct ath_rate_table *rate_table = ath_rc_priv->rate_table; u32 best_thruput, this_thruput, now_msec; @@ -605,8 +604,6 @@ static u8 ath_rc_get_highest_rix(struct ath_rate_priv *ath_rc_priv, u8 per_thres; rate = ath_rc_priv->valid_rate_index[index]; - if (legacy && !(rate_table->info[rate].rate_flags & RC_LEGACY)) - continue; if (rate > ath_rc_priv->rate_max_phy) continue; @@ -770,7 +767,7 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, try_per_rate = 4; rate_table = ath_rc_priv->rate_table; - rix = ath_rc_get_highest_rix(ath_rc_priv, &is_probe, false); + rix = ath_rc_get_highest_rix(ath_rc_priv, &is_probe); if (conf_is_ht(&sc->hw->conf) && (sta->ht_cap.cap & IEEE80211_HT_CAP_LDPC_CODING)) @@ -804,7 +801,13 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, try_per_rate, rix, 0); } - for ( ; i < 3; i++) { + for ( ; i < 4; i++) { + /* + * Use twice the number of tries for the last MRR segment. + */ + if (i + 1 == 4) + try_per_rate = 8; + ath_rc_get_lower_rix(ath_rc_priv, rix, &rix); /* @@ -815,26 +818,6 @@ static void ath_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, } /* - * Use twice the number of tries for the last MRR segment. - */ - try_per_rate = 8; - - /* - * If the last rate in the rate series is MCS and has - * more than 80% of per thresh, then use a legacy rate - * as last retry to ensure that the frame is tried in both - * MCS and legacy rate. - */ - ath_rc_get_lower_rix(ath_rc_priv, rix, &rix); - - if (WLAN_RC_PHY_HT(rate_table->info[rix].phy) && - (ath_rc_priv->per[rix] > 45)) - rix = ath_rc_get_highest_rix(ath_rc_priv, &is_probe, true); - - /* All other rates in the series have RTS enabled */ - ath_rc_rate_set_series(rate_table, &rates[i], txrc, - try_per_rate, rix, 1); - /* * NB:Change rate series to enable aggregation when operating * at lower MCS rates. When first rate in series is MCS2 * in HT40 @ 2.4GHz, series should look like: