Hi Frank, On Mon 29.10.07 12:14, Frank de Lange wrote: > On Sat, Oct 27, 2007 at 03:01:22PM +0200, Evgeni Golov wrote: > > So I decided to test ath5k, got wireles-2.6 git, fetched "everything" > > and compiled the kernel. After a reboot the ath5k module gets loaded > > and says: > > phy1: Selected rate control algorithm 'simple' > > ath5k_pci 0000:03:00.0: AR5212 chip found: mac 5.6 phy 4.1 > > Everything looks okay, and I get two new devices, wlan0 and wmaster0. > > However, I can't bring it up. ifconfig wlan0 up and ip link set wlan0 > > up comlain: "SIOCSIFFLAGS: Invalid argument" > > And in dmesg I can see: > > unable to reset hardware: -22 > > Same here but with different card (Askey AR5BMB5 , based on AR2413A): > [snip] > What does -22 mean? Where to start debugging this?
I'm not an expert here, but the debug message indicates that ath5k_hw_reset failed with -EINVAL==-22. There are a couple of possibilities where it failed exactly, you should uncomment the following line in ath5k.h: /* #define AR5K_DEBUG 1 */ If you still don't see more messages before the "unable to reset", you can try merging the patch below(patch is against wireless-2.6 plus nicks 7/7 patchset + nicks remove fill_... patch). With that you should see an error message and that will hopefully help the developers to help you. Uli diff --git a/drivers/net/wireless/ath5k/hw.c b/drivers/net/wireless/ath5k/hw.c index 7b9920c..4576a1c 100644 --- a/drivers/net/wireless/ath5k/hw.c +++ b/drivers/net/wireless/ath5k/hw.c @@ -651,8 +651,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode, * This should work for both 5111/5112 */ ret = ath5k_hw_rfgain(ah, freq); - if (ret) + if (ret) { + AR5K_PRINTF("ath5k_hw_rfgain failed"); return ret; + } mdelay(1); @@ -667,8 +669,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode, /*Get rate table for this operation mode*/ rt = ath5k_hw_get_rate_table(ah, MODE_IEEE80211B); - if (!rt) + if (!rt) { + AR5K_PRINTF("ath5k_hw_get_rate_table failed"); return -EINVAL; + } /*Write rate duration table*/ for (i = 0; i < rt->rate_count; i++) { @@ -733,8 +737,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode, * TODO:Does this work on 5211 (5111) ? */ ret = ath5k_hw_rfregs(ah, channel, mode); - if (ret) + if (ret) { + AR5K_PRINTF("ath5k_hw_rfregs failed"); return ret; + } /* * Configure additional registers @@ -890,8 +896,10 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode, * Set channel and calibrate the PHY */ ret = ath5k_hw_channel(ah, channel); - if (ret) + if (ret) { + AR5K_PRINTF("ath5k_hw_channel failed"); return ret; + } /* * Enable the PHY and wait until completion @@ -3641,6 +3649,8 @@ static int ath5k_hw_setup_4word_tx_desc(struct ath5k_hw *ah, if (buff_len & ~AR5K_4W_TX_DESC_CTL1_BUF_LEN) return -EINVAL; + tx_desc->tx_control_1 = buff_len & AR5K_2W_TX_DESC_CTL1_BUF_LEN; + tx_desc->tx_control_0 |= AR5K_REG_SM(tx_power, AR5K_4W_TX_DESC_CTL0_XMIT_POWER) | AR5K_REG_SM(antenna_mode, AR5K_4W_TX_DESC_CTL0_ANT_MODE_XMIT); _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel