Skip to contentSkip to conversation

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

PATCH In review Helmut Schaa 2 participants 5 messages Jan 12, 2009 Networking drivers (wireless)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

Is anybody aware of 11g-capable ar5211 cards which would be limited by this patch?

drivers/net/wireless/ath5k/caps.c +4 -2
index 150f5ed..367a6c7 100644
@@ -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);
 		}
#1 lore raw

2009/1/12 Helmut Schaa <[email protected]>:

Quoted 29 lines

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.

---

Is anybody aware of 11g-capable ar5211 cards which would be limited by this patch?

drivers/net/wireless/ath5k/caps.c +2 -1
index 150f5ed..367a6c7 100644
@@ -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;

drivers/net/wireless/ath5k/caps.c int ath5k_hw_set_capabilities(struct ath5k_hw *ah) · line 102

Quoted 9 lines
drivers/net/wireless/ath5k/caps.c +2 -1
@@ -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);
               }

This should be O.K. for now but i think AR5211 supports the so called "pureg" mode which means ofdm only g (no cck headers etc). It seems radio (RF5111) supports g mode (it can be found on AR5212 abg cards) but baseband doesn't support dynamic cck/ofdm switching. This bit on your eeprom might indicate the pureg capability. Since we don't handle this yet it's ok to skip it and use only b mode.

Signature · 3 lines
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
#2 lore raw

Am Montag, 12. Januar 2009 schrieb Nick Kossifidis:

Quoted 13 lines

2009/1/12 Helmut Schaa <[email protected]>:

Quoted 12 lines

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.

---

Is anybody aware of 11g-capable ar5211 cards which would be limited by this patch?

[...]

Quoted 2 lines

This should be O.K. for now but i think AR5211 supports the so called "pureg" mode which means ofdm only g (no cck headers etc).

Sounds reasonable, yes.

Quoted 2 lines

It seems
radio (RF5111) supports g mode (it can be found on AR5212 abg cards)

I guess you mean RF2111, right? RF5111 should be 11a.

I've just found a product sheet at [1] that states that the RF2111 supports "802.11g draft standard". I guess that's exactly what you've described as "pureg" mode.

Thanks,
Helmut

[1] ftp://ftp.riss-telecom.ru/pub/wireless/doc/atheros/AR5001X.pdf

#3 lore raw

2009/1/12 Helmut Schaa <[email protected]>:

Quoted 27 lines

Am Montag, 12. Januar 2009 schrieb Nick Kossifidis:

Quoted 13 lines

2009/1/12 Helmut Schaa <[email protected]>:

Quoted 12 lines

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.

---

Is anybody aware of 11g-capable ar5211 cards which would be limited by this patch?

[...]

Quoted 2 lines

This should be O.K. for now but i think AR5211 supports the so called "pureg" mode which means ofdm only g (no cck headers etc).

Sounds reasonable, yes.

Quoted 2 lines

It seems
radio (RF5111) supports g mode (it can be found on AR5212 abg cards)

I guess you mean RF2111, right? RF5111 should be 11a.

Quoted 9 lines

I've just found a product sheet at [1] that states that the RF2111 supports "802.11g draft standard". I guess that's exactly what you've described as "pureg" mode.

Thanks,
Helmut

[1] ftp://ftp.riss-telecom.ru/pub/wireless/doc/atheros/AR5001X.pdf

RF5111 is the RF chip, RF2111 is a frequency converter with cck support, check this out..
http://www.hotchips.org/archives/hc14/3_Tue/16_mcfarland.pdf

Signature · 3 lines
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick