Return-path: Received: from nbd.name ([46.4.11.11]:54190 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753327Ab1HAJjG (ORCPT ); Mon, 1 Aug 2011 05:39:06 -0400 Message-ID: <4E367432.60601@openwrt.org> (sfid-20110801_113911_260178_4586D532) Date: Mon, 01 Aug 2011 11:38:58 +0200 From: Felix Fietkau MIME-Version: 1.0 To: Helmut Schaa CC: John Linville , linux-wireless@vger.kernel.org, Johannes Berg Subject: Re: [PATCHv2 2/2] mac80211: Don't use EAPOL frames for rate sampling References: <1312191173-23963-1-git-send-email-helmut.schaa@googlemail.com> <1312191173-23963-2-git-send-email-helmut.schaa@googlemail.com> In-Reply-To: <1312191173-23963-2-git-send-email-helmut.schaa@googlemail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 2011-08-01 11:32 AM, Helmut Schaa wrote: > Signed-off-by: Helmut Schaa > --- > > 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)) I think checking for mp->hw->max_rates < 3 would be better here, because then it also covers the primary rate + fallback rate case (as being used by b43), which also doesn't include the max_prob_rate in the mrr series. - Felix