Search Linux Wireless

ath5k: reset for 5424-based card

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I have the following device (0x168c:001c) which comes with certain MacBooks:

02:00.0 Ethernet controller: Atheros Communications, Inc. AR5006EG 802.11 b/g
Wireless PCI Express Adapter (rev 01)

The current driver from merged-upstream of a few days ago doesn't seem to 
work for this card.  In ath5k_hw_nic_wakeup, it dies after the nic reset
and any MMIO accesses from then on return -1 (needs a hard reboot to fix).

I dumped a trace of the working madwifi driver using mmio-trace and saw that
it only sets the bottom two bits when doing AR5K_RESET_CTL.  So, the patch 
below indeed makes probe work for the card.  

It isn't perfect after that; it can associate with an AP but appears to reset
constantly so it's not really usable.

I'd love to get this working generally; if needed I can try out patches,
supply traces, or, given enough direction, contribute some code...

diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c
index 3a4bf40..3fa0621 100644
--- a/drivers/net/wireless/ath5k/hw.c
+++ b/drivers/net/wireless/ath5k/hw.c
@@ -359,7 +359,7 @@ static int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial)
 
 	/* ...reset chipset and PCI device */
 	if (ah->ah_single_chip == false && ath5k_hw_nic_reset(ah,
-				AR5K_RESET_CTL_CHIP | AR5K_RESET_CTL_PCI)) {
+				AR5K_RESET_CTL_BASEBAND | AR5K_RESET_CTL_PCU)) {
 		ATH5K_ERR(ah->ah_sc, "failed to reset the MAC Chip + PCI\n");
 		return -EIO;
 	}

-- 
Bob Copeland %% www.bobcopeland.com 

-
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux