]> rtime.felk.cvut.cz Git - lisovros/linux_canprio.git/commitdiff
[PATCH] bcm43xx: output proper link quality with scans
authorLarry Finger <Larry.Finger@lwfinger.net>
Mon, 25 Sep 2006 20:33:20 +0000 (15:33 -0500)
committerJeff Garzik <jeff@garzik.org>
Sat, 2 Dec 2006 05:11:56 +0000 (00:11 -0500)
The bcm43xx-softmac driver fails to set two quantities needed for
iwlist to compute wireless quality when scanning. As a result, userland
programs using the quality to determine the best connection fail.

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

index d6a8bf09878e8716ec8a0d2c053979b841b1e450..5f43d7f42af1c572e2835c682e805bc5603070e4 100644 (file)
 #define BCM43xx_DEFAULT_SHORT_RETRY_LIMIT      7
 #define BCM43xx_DEFAULT_LONG_RETRY_LIMIT       4
 
+/* FIXME: the next line is a guess as to what the maximum RSSI value might be */
+#define RX_RSSI_MAX                            60
+
 /* Max size of a security key */
 #define BCM43xx_SEC_KEYSIZE                    16
 /* Security algorithms. */
index a1b783813d8e2fb4029bcd2c883c29d2de1de621..2ffc0d5b54eec4918f963db43ac9ee5b495eb1af 100644 (file)
@@ -3688,6 +3688,8 @@ static int bcm43xx_read_phyinfo(struct bcm43xx_private *bcm)
                       phy_type);
                return -ENODEV;
        };
+       bcm->ieee->perfect_rssi = RX_RSSI_MAX;
+       bcm->ieee->worst_rssi = 0;
        if (!phy_rev_ok) {
                printk(KERN_WARNING PFX "Invalid PHY Revision %x\n",
                       phy_rev);
index d27016f8c736bb77def6401028716808d870bdaa..12043f8be1bfeab11bee2097d793da27d5e3d940 100644 (file)
@@ -47,9 +47,6 @@
 #define BCM43xx_WX_VERSION     18
 
 #define MAX_WX_STRING          80
-/* FIXME: the next line is a guess as to what the maximum RSSI value might be */
-#define RX_RSSI_MAX            60
-
 
 static int bcm43xx_wx_get_name(struct net_device *net_dev,
                                struct iw_request_info *info,