iwmc3200wifi: Set wireless mode correctly
authorZhu Yi <yi.zhu@intel.com>
Tue, 24 Nov 2009 03:33:30 +0000 (11:33 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Sat, 28 Nov 2009 20:04:43 +0000 (15:04 -0500)
Set the wireless mode with regard to both the driver's configuration
and the device's EEPROM result.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwmc3200wifi/main.c

index e61265af92cd00459a6f38b5459adec75cfba747..92e4eaf32ff2b761de1ed289a2889424ac55e6ba 100644 (file)
@@ -701,12 +701,12 @@ static int __iwm_up(struct iwm_priv *iwm)
 
        /*
         * Read our SKU capabilities.
-        * If it's valid, we overwrite the wireless mode conf entry and the
-        * current profile one.
+        * If it's valid, we AND the configured wireless mode with the
+        * device EEPROM value as the current profile wireless mode.
         */
        wireless_mode = iwm_eeprom_wireless_mode(iwm);
        if (wireless_mode) {
-               iwm->conf.wireless_mode = wireless_mode;
+               iwm->conf.wireless_mode &= wireless_mode;
                if (iwm->umac_profile)
                        iwm->umac_profile->wireless_mode =
                                        iwm->conf.wireless_mode;