On Sat, Dec 10, 2011 at 7:33 AM, Paul Stewart <pstew@xxxxxxxxxx> wrote: > Hi Rajkumar, > > On Sat, Dec 10, 2011 at 5:29 AM, Rajkumar Manoharan > <rmanohar@xxxxxxxxxxxxxxxx> wrote: >> The stations always chooses 1Mbps for all trasmitting frames, >> whenever the AP is configured to lock the supported rates. >> As the max phy rate is always set with the 4th from highest phy rate, >> this assumption might be wrong if we have less than that. Fix that. >> >> Cc: stable@xxxxxxxxxx >> Cc: Paul Stewart <pstew@xxxxxxxxxx> >> Reported-by: Ajay Gummalla <agummalla@xxxxxxxxxx> >> Signed-off-by: Rajkumar Manoharan <rmanohar@xxxxxxxxxxxxxxxx> >> --- >> drivers/net/wireless/ath/ath9k/rc.c | 4 +++- >> 1 files changed, 3 insertions(+), 1 deletions(-) >> >> diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c >> index 888abc2..528d5f3 100644 >> --- a/drivers/net/wireless/ath/ath9k/rc.c >> +++ b/drivers/net/wireless/ath/ath9k/rc.c >> @@ -1271,7 +1271,9 @@ static void ath_rc_init(struct ath_softc *sc, >> >> ath_rc_priv->max_valid_rate = k; >> ath_rc_sort_validrates(rate_table, ath_rc_priv); >> - ath_rc_priv->rate_max_phy = ath_rc_priv->valid_rate_index[k-4]; >> + ath_rc_priv->rate_max_phy = (k > 4) ? >> + ath_rc_priv->valid_rate_index[k-4] : >> + ath_rc_priv->valid_rate_index[k-1]; > > Is k guaranteed > 1 here? Some test equipment export only one rate so > we lock in to a single rate. I'm not sure how this would factor into > the k value here. Sorry, I get what you're doing here. Carry on as if I didn't say anything. :-) >> ath_rc_priv->rate_table = rate_table; >> >> ath_dbg(common, ATH_DBG_CONFIG, >> -- >> 1.7.8 >> -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html