[PATCH] bcm43xx: Fix scaling error for 'iwlist rate' information
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 23 Jan 2007 20:26:35 +0000 (14:26 -0600)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 7 Feb 2007 20:23:54 +0000 (15:23 -0500)
The bcm43xx scales the rate information supplied to a WE iwlist rate
call incorrectly.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/bcm43xx/bcm43xx_wx.c

index a659442b9c15e09e978f1c2c0264536df51cc884..5b1885268a74a9825bcad18f8d629a67d4a925a5 100644 (file)
@@ -261,22 +261,22 @@ static int bcm43xx_wx_get_rangeparams(struct net_device *net_dev,
        if (phy->type == BCM43xx_PHYTYPE_A ||
            phy->type == BCM43xx_PHYTYPE_G) {
                range->num_bitrates = 8;
-               range->bitrate[i++] = IEEE80211_OFDM_RATE_6MB;
-               range->bitrate[i++] = IEEE80211_OFDM_RATE_9MB;
-               range->bitrate[i++] = IEEE80211_OFDM_RATE_12MB;
-               range->bitrate[i++] = IEEE80211_OFDM_RATE_18MB;
-               range->bitrate[i++] = IEEE80211_OFDM_RATE_24MB;
-               range->bitrate[i++] = IEEE80211_OFDM_RATE_36MB;
-               range->bitrate[i++] = IEEE80211_OFDM_RATE_48MB;
-               range->bitrate[i++] = IEEE80211_OFDM_RATE_54MB;
+               range->bitrate[i++] = IEEE80211_OFDM_RATE_6MB * 500000;
+               range->bitrate[i++] = IEEE80211_OFDM_RATE_9MB * 500000;
+               range->bitrate[i++] = IEEE80211_OFDM_RATE_12MB * 500000;
+               range->bitrate[i++] = IEEE80211_OFDM_RATE_18MB * 500000;
+               range->bitrate[i++] = IEEE80211_OFDM_RATE_24MB * 500000;
+               range->bitrate[i++] = IEEE80211_OFDM_RATE_36MB * 500000;
+               range->bitrate[i++] = IEEE80211_OFDM_RATE_48MB * 500000;
+               range->bitrate[i++] = IEEE80211_OFDM_RATE_54MB * 500000;
        }
        if (phy->type == BCM43xx_PHYTYPE_B ||
            phy->type == BCM43xx_PHYTYPE_G) {
                range->num_bitrates += 4;
-               range->bitrate[i++] = IEEE80211_CCK_RATE_1MB;
-               range->bitrate[i++] = IEEE80211_CCK_RATE_2MB;
-               range->bitrate[i++] = IEEE80211_CCK_RATE_5MB;
-               range->bitrate[i++] = IEEE80211_CCK_RATE_11MB;
+               range->bitrate[i++] = IEEE80211_CCK_RATE_1MB * 500000;
+               range->bitrate[i++] = IEEE80211_CCK_RATE_2MB * 500000;
+               range->bitrate[i++] = IEEE80211_CCK_RATE_5MB * 500000;
+               range->bitrate[i++] = IEEE80211_CCK_RATE_11MB * 500000;
        }
 
        geo = ieee80211_get_geo(bcm->ieee);