linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ath5k: discard 11g caps if reported by an ar5211 eeprom
@ 2009-01-12 12:04 Helmut Schaa
  2009-01-12 16:25 ` Nick Kossifidis
  0 siblings, 1 reply; 5+ messages in thread
From: Helmut Schaa @ 2009-01-12 12:04 UTC (permalink / raw)
  To: linville; +Cc: ath5k-devel, linux-wireless, jirislaby, mickflemm

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>
---

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

diff --git a/drivers/net/wireless/ath5k/caps.c b/drivers/net/wireless/ath5k/caps.c
index 150f5ed..367a6c7 100644
--- a/drivers/net/wireless/ath5k/caps.c
+++ b/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);
 		}

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-01-12 18:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-12 12:04 [PATCH] ath5k: discard 11g caps if reported by an ar5211 eeprom Helmut Schaa
2009-01-12 16:25 ` Nick Kossifidis
2009-01-12 16:46   ` Helmut Schaa
2009-01-12 16:57     ` Nick Kossifidis
2009-01-12 18:35       ` Helmut Schaa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).