From patchwork Mon Sep 29 00:36:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karl Beldan X-Patchwork-Id: 4992871 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BED129F2BA for ; Mon, 29 Sep 2014 00:37:21 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0172A20256 for ; Mon, 29 Sep 2014 00:37:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C3E8A201BC for ; Mon, 29 Sep 2014 00:37:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753010AbaI2AhJ (ORCPT ); Sun, 28 Sep 2014 20:37:09 -0400 Received: from mail-we0-f179.google.com ([74.125.82.179]:40581 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752741AbaI2AhI (ORCPT ); Sun, 28 Sep 2014 20:37:08 -0400 Received: by mail-we0-f179.google.com with SMTP id u56so4160169wes.38 for ; Sun, 28 Sep 2014 17:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=5kmEW9PM72Y7We/hyNJCLDv8vSE8jmJSyR03hcDPjbs=; b=c5lXo14D3ehahnsoGXKgxvhC4HbErRYL5GScnq15u0DgaFe0u8GfVC/BzxztviNCLA LyiwDVdDQ11AEuP+Js3zeolFUVOrtapn3ddmpmlhgAZQvgL+5O59VnMszdRGgng0hW9G TnbJiRnZpvnae30KGuu4idB3tiI7Klb00QUuE/Uu0Xdd8g3TUYIPHBFNrxFHjNOZsMF3 72hhVUUN18/b4jwRlU8tE6/ivWl/vpU3nFhAtguMTzWROTJzQgffl56Apy4quYtwp7A/ ELCKDzddJ2uMjIc9BVZeq5ZAFicy09f4/FcpySEaaE/tENX+6CCOCXcGWeJB/mQw0Jcm +/ug== X-Received: by 10.194.24.169 with SMTP id v9mr124722wjf.114.1411951026025; Sun, 28 Sep 2014 17:37:06 -0700 (PDT) Received: from magnum.frso.rivierawaves.com (ppp-seco11pa2-46-193-143-43.wb.wifirst.net. [46.193.143.43]) by mx.google.com with ESMTPSA id hk8sm9989376wib.18.2014.09.28.17.37.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Sep 2014 17:37:05 -0700 (PDT) From: Karl Beldan To: Johannes Berg Cc: linux-wireless , Karl Beldan , Karl Beldan , Thomas Huehn Subject: [PATCH] mac80211: minstrel_ht: fix MCS_GROUP_RATES usage Date: Mon, 29 Sep 2014 02:36:30 +0200 Message-Id: <1411950990-24365-1-git-send-email-karl.beldan@gmail.com> X-Mailer: git-send-email 2.0.1 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Karl Beldan Commit 4441e8e9 ("mac80211: improve minstrel_ht rate sorting by throughput & probability") replaced the constant 8 with MCS_GROUP_RATES when getting the number of streams of an HT MCS. See commit 7a5e3fa2 ("mac80211: minstrel_ht: replace some occurences of MCS_GROUP_RATES"). Signed-off-by: Karl Beldan --- net/mac80211/rc80211_minstrel_ht.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index df90ce2..17ef54a 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -135,7 +135,7 @@ minstrel_ht_update_rates(struct minstrel_priv *mp, struct minstrel_ht_sta *mi); static int minstrel_ht_get_group_idx(struct ieee80211_tx_rate *rate) { - return GROUP_IDX((rate->idx / MCS_GROUP_RATES) + 1, + return GROUP_IDX((rate->idx / 8) + 1, !!(rate->flags & IEEE80211_TX_RC_SHORT_GI), !!(rate->flags & IEEE80211_TX_RC_40_MHZ_WIDTH)); }