2008/5/8 Frédéric Weisbecker <[EMAIL PROTECTED]>: > Hello, > > Nothing serious but I found a small difference with the 2425 in > ath5k_hw_post() > _The value of two registers are replaced inside a counter but their initial > value is not restored at the end. I checked on a madwifi dump and it is > restored. > > Example in a trace: > 0.001450 read32 #1 0xfa008000 -> 0x75441600 (AR5K_STA_ID0) > 0.001455 write32 #1 0xfa008000 <- 0x00000000 (AR5K_STA_ID0) > 0.001459 read32 #1 0xfa008000 -> 0x00000000 (AR5K_STA_ID0) > [...] > 0.003719 write32 #1 0xfa008000 <- 0x99999999 (AR5K_STA_ID0) > 0.003722 read32 #1 0xfa008000 -> 0x99999999 (AR5K_STA_ID0) > 0.003728 write32 #1 0xfa008000 <- 0x75441600 (AR5K_STA_ID0) > > _Second point: the constants values that come from an ndiswrapper dump > doesn't exist with a madwifi dump. > I quoted a patch at the end of this mail, not really to fix but to explain > the problem. The AR2425 will not work really better with it :-) > Concerning the EEPROM, I compared a trace from madwifi with another from > ath5k. And during the EEPROM init, it's clear that the registers are read in > the wrong place as Pavel said. > But it's hard to find how works the version 5.3 of the EEPROM... I'm a bit > lost inside it... > > The patch (refers to ath5k_hw_post): > > --- a/hw.c 2008-04-12 21:51:00.000000000 +0200 > +++ b/hw.c 2008-05-08 06:36:11.000000000 +0200 > @@ -151,9 +151,11 @@ > return -EAGAIN; > } > > - /* Found on ndiswrapper dumps */ > - var_pattern = 0x0039080f; > - ath5k_hw_reg_write(ah, var_pattern, cur_reg); > + if (ah->->ah_mac_srev != AR5K_SREV_VER_AR2425) { > + /* Found on ndiswrapper dumps */ > + var_pattern = 0x0039080f; > + ath5k_hw_reg_write(ah, var_pattern, > cur_reg); > + } > > } > > @@ -168,11 +170,15 @@ > return -EAGAIN; > } > > - /* Found on ndiswrapper dumps */ > - var_pattern = 0x003b080f; > - ath5k_hw_reg_write(ah, var_pattern, cur_reg); > + if (ah->->ah_mac_srev != AR5K_SREV_VER_AR2425) { > + /* Found on ndiswrapper dumps */ > + var_pattern = 0x003b080f; > + ath5k_hw_reg_write(ah, var_pattern, > cur_reg); > + } > > } > + //Restore the initial value > + ath5k_hw_reg_write(ah, init_val, cur_reg); > } > > return 0; > >
Hmm, i should sleep more :P I stored init_val but forgot to write it at the end of the for loop ! Static values found on ndiswrapper dumps don't show up in madwifi traces, that's why i put the comment there, i also see them in RF2425 ndiswrapper dumps so there is no need to remove them. ndiswrapper dump from 2425... (variable pattern) R: 0x8000 = 0x757e1900 - AR5K_STA_ID0 .111.1.1.111111....11..1........ (unknown) W: 0x8000 = 0x00000000 - AR5K_STA_ID0 ................................ (unknown) W: 0x8000 = 0x0039080f - AR5K_STA_ID0 ..........111..1....1.......1111 (unknown) W: 0x8000 = 0x00010001 - AR5K_STA_ID0 ...............1...............1 (unknown) W: 0x8000 = 0x0039080f - AR5K_STA_ID0 ..........111..1....1.......1111 (unknown) W: 0x8000 = 0x00020002 - AR5K_STA_ID0 ..............1...............1. (unknown) W: 0x8000 = 0x0039080f - AR5K_STA_ID0 ..........111..1....1.......1111 (unknown) ... (static pattern) W: 0x8000 = 0x55555555 - AR5K_STA_ID0 .1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1 (unknown) W: 0x8000 = 0x003b080f - AR5K_STA_ID0 ..........111.11....1.......1111 (unknown) W: 0x8000 = 0xaaaaaaaa - AR5K_STA_ID0 1.1.1.1.1.1.1.1.1.1.1.1.1.1.1.1. (unknown) W: 0x8000 = 0x003b080f - AR5K_STA_ID0 ..........111.11....1.......1111 (unknown) ... hw_post doesn't have that much impact on card's operation, even when we didn't have hw_post and STA_ID0 had init_val all the time during attach, 2425 didn't work. Did you see any change when you restored init_val ? Did the card wok ? About the eeprom, what do you mean the registers are read in the wrong place ? All header information is simmilar with older eeprom versions, mac address is still in the right place and other cards with EEPROM version > 5 are working fine (2413/5413 for example). We still miss tx power calibration data, if you have anything plz feel free to expand ath_info tool (most development related to eeprom rev. engineering is going on there), have in mind that power mask has changed i think from 0x3f to 0x7f. -- GPG ID: 0xD21DB2DB As you read this post global entropy rises. Have Fun ;-) Nick _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel