From patchwork Mon Aug 1 09:32:53 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Helmut Schaa X-Patchwork-Id: 1025162 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p719XBKR014499 for ; Mon, 1 Aug 2011 09:33:11 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752595Ab1HAJdJ (ORCPT ); Mon, 1 Aug 2011 05:33:09 -0400 Received: from mail-fx0-f46.google.com ([209.85.161.46]:38914 "EHLO mail-fx0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752874Ab1HAJdH (ORCPT ); Mon, 1 Aug 2011 05:33:07 -0400 Received: by mail-fx0-f46.google.com with SMTP id 19so4380927fxh.19 for ; Mon, 01 Aug 2011 02:33:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=+TIN633s0pnL6k01rLPb/pJ+2jm2mqq9b6qbc/qTgC0=; b=k2AcyLAYykDFViUfzCmAmsLOhdqw47I22GutBa59JQVbXycVznwXKbkeHPOB5VKcd4 NtOBuY4pxkgFbqR+09odsLHeKA2/6ogv6hFuYOYv7gQf9swyCFnGw43XPErbC/P18hOE 3KXCMs+4HfbLtSkPCe0Qjxza7XB+o18uW2+yw= Received: by 10.223.47.89 with SMTP id m25mr844794faf.121.1312191186898; Mon, 01 Aug 2011 02:33:06 -0700 (PDT) Received: from localhost.localdomain (p5495D245.dip.t-dialin.net [84.149.210.69]) by mx.google.com with ESMTPS id f27sm595832fak.7.2011.08.01.02.33.04 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 01 Aug 2011 02:33:05 -0700 (PDT) From: Helmut Schaa To: John Linville , Felix Fietkau Cc: linux-wireless@vger.kernel.org, Johannes Berg , Helmut Schaa Subject: [PATCHv2 2/2] mac80211: Don't use EAPOL frames for rate sampling Date: Mon, 1 Aug 2011 11:32:53 +0200 Message-Id: <1312191173-23963-2-git-send-email-helmut.schaa@googlemail.com> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1312191173-23963-1-git-send-email-helmut.schaa@googlemail.com> References: <1312191173-23963-1-git-send-email-helmut.schaa@googlemail.com> Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Mon, 01 Aug 2011 09:33:11 +0000 (UTC) Signed-off-by: Helmut Schaa Acked-by: Felix Fietkau --- Haven't done much testing yet but this looks safe to me. Helmut net/mac80211/rc80211_minstrel_ht.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index 66a1eeb..2158838 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c @@ -608,7 +608,13 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta, return mac80211_minstrel.get_rate(priv, sta, &msp->legacy, txrc); info->flags |= mi->tx_flags; - sample_idx = minstrel_get_sample_rate(mp, mi); + + /* Don't use EAPOL frames for sampling on non-mrr hw */ + if (mp->hw->max_rates == 1 && + txrc->skb->protocol == cpu_to_be16(ETH_P_PAE)) + sample_idx = -1; + else + sample_idx = minstrel_get_sample_rate(mp, mi); #ifdef CONFIG_MAC80211_DEBUGFS /* use fixed index if set */