瀏覽代碼

ath5k: discard 11g caps if reported by an ar5211 eeprom

At least one ar5211 card (GIGABYTE GN-WLMA101, 168c:0012 subsystem
1458:e800) reports itself as 11g capable which seems to be a bug in the
eeprom. initvals.c assumes that ar5211 is only 11b capable and thus refuses
to initialize this card. Hence this patch changes the probing for 11g
capabilities to discard 11g capabilities for ar5211 cards which allows this
specific card to work fine in 11b and 11a modes.

Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Helmut Schaa 16 年之前
父節點
當前提交
81094888bf
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      drivers/net/wireless/ath5k/caps.c

+ 4 - 2
drivers/net/wireless/ath5k/caps.c

@@ -85,7 +85,8 @@ int ath5k_hw_set_capabilities(struct ath5k_hw *ah)
 		/* Enable  802.11b if a 2GHz capable radio (2111/5112) is
 		 * connected */
 		if (AR5K_EEPROM_HDR_11B(ee_header) ||
-				AR5K_EEPROM_HDR_11G(ee_header)) {
+		    (AR5K_EEPROM_HDR_11G(ee_header) &&
+		     ah->ah_version != AR5K_AR5211)) {
 			/* 2312 */
 			ah->ah_capabilities.cap_range.range_2ghz_min = 2412;
 			ah->ah_capabilities.cap_range.range_2ghz_max = 2732;
@@ -94,7 +95,8 @@ int ath5k_hw_set_capabilities(struct ath5k_hw *ah)
 				__set_bit(AR5K_MODE_11B,
 						ah->ah_capabilities.cap_mode);
 
-			if (AR5K_EEPROM_HDR_11G(ee_header))
+			if (AR5K_EEPROM_HDR_11G(ee_header) &&
+			    ah->ah_version != AR5K_AR5211)
 				__set_bit(AR5K_MODE_11G,
 						ah->ah_capabilities.cap_mode);
 		}