On Tue, 2010-04-27 at 02:02 +0300, Nicolas Barati wrote:
> Hello,
> I 'm using ath5k witha a TP-LINK PCI card. What I need is to sample
> some Atheros registers and particularly AR_SLOT_TIME = 0x8010 for my
> school project. First, I tried to read it whithin if_ath.c and printk
> the result, but I get always 0. Then I tried ath_info. Same thing
> there! 

You are asking in the list for ath5k, but you are referring to the code
in MadWifi.  If you look for the equivalent of AR_SLOT_TIME in ath5k,
you'll see that it's called AR5K_SLOT_TIME.

By looking at the ath5k code, you can see that AR5K_SLOT_TIME is only
used for AR5210, whereas newer chipsets use AR5K_DCU_GBL_IFS_SLOT.  That
probably explains why you are getting zero.

> I saw a thread about a similar problem at
> http://kerneltrap.org/mailarchive/linux-ath5k-devel/2010/4/20/6884576/thread. 
> Mr Roskin said that the right way to access hardware is from the kernel code. 
> And Mr Papillault suggested another way using a debugfs file called &quot.

I guess you misquoted the later message :-)

>  I couldn' t understand how to use any of them. Please could anyone
> (perhaps the aforementioned gentlemen) give some more details or
> perhaps a walk-through to solve my problem? 

You didn't tell what the problem is and what you have tried so far.  You
may want to see this:
http://catb.org/~esr/faqs/smart-questions.html#explicit

I'm definitely not in the position to provide any walk-through.

> P.S I need the value of this register to estimate the load on a
> network based on Backoff window's value. In AR5210 there's a register
> called AR_BACKOFF_CW wich - I guess - keeps this info, but not in
> ar5212 chipsets! Instead there is the SLOT_TIME register which I
> assume does the same job! Please tell me If I 'm wrong or any other
> way to get the Backoff window's value.

AR_BACKOFF_CW is not a register, AR_BACKOFF is, and it's called
AR5K_BACKOFF in ath5k.  You can see that it's never used on MadWifi or
ath5k at all.

-- 
Regards,
Pavel Roskin
_______________________________________________
ath5k-devel mailing list
ath5k-devel@lists.ath5k.org
https://lists.ath5k.org/mailman/listinfo/ath5k-devel

Reply via email to