Message ID | 1312191173-23963-2-git-send-email-helmut.schaa@googlemail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On 2011-08-01 11:32 AM, Helmut Schaa wrote: > Signed-off-by: Helmut Schaa<helmut.schaa@googlemail.com> > --- > > 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 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Aug 1, 2011 at 11:38 AM, Felix Fietkau <nbd@openwrt.org> wrote: > On 2011-08-01 11:32 AM, Helmut Schaa wrote: >> >> Signed-off-by: Helmut Schaa<helmut.schaa@googlemail.com> >> --- >> >> 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. The mp->hw->max_rates == 2 case is sample_rate -> max_prob_rate and max_tp_rate -> max_prob_rate at the moment. So, these devices should be fine already. Helmut -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 2011-08-01 11:43 AM, Helmut Schaa wrote: > On Mon, Aug 1, 2011 at 11:38 AM, Felix Fietkau<nbd@openwrt.org> wrote: >> On 2011-08-01 11:32 AM, Helmut Schaa wrote: >>> >>> Signed-off-by: Helmut Schaa<helmut.schaa@googlemail.com> >>> --- >>> >>> 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. > > The mp->hw->max_rates == 2 case is sample_rate -> max_prob_rate and > max_tp_rate -> max_prob_rate at the moment. So, these devices should be fine > already. Yeah, you're right. Acked-by: Felix Fietkau <nbd@openwrt.org> -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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 */
Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> --- 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(-)