2014-06-05 09:03:24

by Gaurav Kumar Chauhan

[permalink] [raw]
Subject: Physical carrier sensing (CCA)

Hi,

I am working on measuring channel load which requires knowledge of
carrier sensing.

I am comfortable with virtual carrier sensing but not with physical
carrier sensing.
I tried to google it but didn't get more than basics. I want to know
about physical carrier
sensing in detail and where code for physical sensing is present.

Is it in driver or in firmware?
I am using atheros pci-express card and ath9k driver.

Please help me. Thanks in advance.

Regards,
Gaurav


2014-06-07 07:32:59

by Fred Chou

[permalink] [raw]
Subject: Re: Physical carrier sensing (CCA)

On 06/05/2014 04:57 PM, Gaurav Kumar Chauhan wrote:

> I tried to google it but didn't get more than basics. I want to know
> about physical carrier
> sensing in detail and where code for physical sensing is present.
>
> Is it in driver or in firmware?

Had similar question before, and after some survey, my understanding is
physical carrier sensing is done by hardware, and in firmware you only
need to read some status register find out sensing result.
Correct me if I am wrong.

2014-06-10 08:48:28

by Sergey Ryazanov

[permalink] [raw]
Subject: Re: Physical carrier sensing (CCA)

Hi,

2014-06-05 12:57 GMT+04:00 Gaurav Kumar Chauhan <[email protected]>:
> I am working on measuring channel load which requires knowledge of carrier
> sensing.
>
> I am comfortable with virtual carrier sensing but not with physical carrier
> sensing.
> I tried to google it but didn't get more than basics. I want to know about
> physical carrier
> sensing in detail and where code for physical sensing is present.
>
> Is it in driver or in firmware?
> I am using atheros pci-express card and ath9k driver.

Physical and virtual carrier sensing are both realized in hardware at
least in AR9xxx chips. Chip provides some knobs to control both of
them (on/off, setup levels, etc.) and allows retrieve some statistics
(see channel survey code of ath9k driver for example).

--
BR,
Sergey

2014-06-12 15:15:47

by Sergey Ryazanov

[permalink] [raw]
Subject: Re: Physical carrier sensing (CCA)

2014-06-12 15:44 GMT+04:00 Gaurav Kumar Chauhan <[email protected]>:
>> On Tuesday 10 June 2014 02:18 PM, Sergey Ryazanov wrote:
>>> 2014-06-05 12:57 GMT+04:00 Gaurav Kumar Chauhan
>>> <[email protected]>:
>>>
>>> I am working on measuring channel load which requires knowledge of carrier
>>> sensing.
>>>
>>> I am comfortable with virtual carrier sensing but not with physical carrier
>>> sensing.
>>> I tried to google it but didn't get more than basics. I want to know about
>>> physical carrier
>>> sensing in detail and where code for physical sensing is present.
>>>
>>> Is it in driver or in firmware?
>>> I am using atheros pci-express card and ath9k driver.
>>
>> Physical and virtual carrier sensing are both realized in hardware at
>> least in AR9xxx chips. Chip provides some knobs to control both of
>> them (on/off, setup levels, etc.) and allows retrieve some statistics
>> (see channel survey code of ath9k driver for example).
>>
>
> Hi Sergey,
>
> Thanks for replying. Your information really helped me a lot.
>
> In ath9k/main.c there is one function called ath9k_get_survey() which inter
> calls ath_update_survey_stats() function.
> In ath_update_survey_stats() , struct survey_info members a getting
> initialized.
>
> One of the member is channel_time_busy: amount of time the primary channel
> was sensed busy.
> I want to confirm if this member holds the channel busy time value returned
> by physical carrier sensing mechanism.
>

AR9xxx measure four values and export them via appropriate registers:
- Tx time
- Rx time
- Channel busy time
- Total measurement period time

And I don't know is Tx/Rx time accounted by the busy time counter or
not. Seems that busy time counter considers whole busy time, but you
need to investigate this by yourself or ask somebody who know.

And please don't mail me privately.

--
BR,
Sergey