mac80211: Fix low bit rate in IBSS
authorTomas Winkler <tomas.winkler@intel.com>
Wed, 3 Sep 2008 20:42:19 +0000 (23:42 +0300)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 8 Sep 2008 18:00:18 +0000 (14:00 -0400)
This patch fixes regression in iwlwifi IBSS rate scaling caused by patch:

    commit 6bc37c06bc424bcf3f944e6a79e2d5bb537e02ed
    Author: Vladimir Koutny <vlado@work.ksp.sk>
    Date:   Fri Jun 13 16:50:44 2008 +0200

        mac80211: eliminate IBSS warning in rate_lowest_index()

An IBSS station is added in prepare_for_handlers where the rate scaling was
initialized only with single rate matching the received packet.
The correct rate scale information should be updated only in
ieee80211_rx_bss_info function where beacon is parsed. Because
of coding error the rate info was left untouched.
If a beacon has triggered the connection the rate remined 1Mbps.
This patch fixes this coding error

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Vladimir Koutny <vlado@work.ksp.sk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/mac80211/mlme.c

index 7d53382f1a5b17a856ddbd9869695061e9e57db3..75510a9f3f1d1e3fc2882b6de09e459d682f212e 100644 (file)
@@ -2595,7 +2595,7 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
                                                        rx_status->band);
 
                prev_rates = sta->supp_rates[rx_status->band];
-               sta->supp_rates[rx_status->band] &= supp_rates;
+               sta->supp_rates[rx_status->band] = supp_rates;
                if (sta->supp_rates[rx_status->band] == 0) {
                        /* No matching rates - this should not really happen.
                         * Make sure that at least one rate is marked