Skip to contentSkip to conversation

AR9285 antenna diversity algorithm and behaviour?

ath9k-devel Adrian Chadd 3 participants 5 messages May 9, 2011 – May 10, 2011

lore
Share & tools
lore
#0 lore raw

Hi all,

I'm debugging some strange behaviour with the AR9285 on FreeBSD. I've traced down my particular issue to the diversity code which I ported verbatim from ath9k.

Has anyone seen the AR9285 diversity code make poor decisions about which LNA configurations to use?

Here's an example:

Here's the end of the sampling run just after initial interface reset, with good iperf performance (~ 25-27mbit on 11g TX):

ar9285_ant_comb_scan: main: 58, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 58, alt: 22, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 0
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 58, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3

.. then the sampling run concludes, and it decides to switch over the LNA config:

ar9285_ant_comb_scan: total_pkt_count=512
ar9285_ant_comb_scan: main_total_rssi=29420
ar9285_ant_comb_scan: alt_total_rssi=11264
ar9285_ant_comb_scan: main_rssi_avg=57
ar9285_ant_comb_scan: alt_alt_rssi_avg=22

.. notice here that it thinks most of the packets were received on the alt chain (rx_ant_conf != main_ant_conf):

ar9285_ant_comb_scan: main_recv_cnt=31
ar9285_ant_comb_scan: alt_recv_cnt=481

.. so it adjusts the LNA configuration:

ar9285_ant_comb_scan: lna_conf: 2 -> 1
ar9285_ant_comb_scan: main_lna_conf: 1 -> 2
ar9285_ant_comb_scan: fast_div_bias: 2 -> 0

.. and at this point, the main/alt RSSIs change and iperf throughput drops from 25mbit to 10mbit:

ar9285_ant_comb_scan: main: 47, alt: 41, rx_ant_conf: 0, main_ant_conf: 1
ar9285_ant_comb_scan: main: 45, alt: 41, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 45, alt: 41, rx_ant_conf: 0, main_ant_conf: 0
ar9285_ant_comb_scan: main: 47, alt: 41, rx_ant_conf: 0, main_ant_conf: 1
ar9285_ant_comb_scan: main: 47, alt: 41, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 46, alt: 41, rx_ant_conf: 0, main_ant_conf: 1
ar9285_ant_comb_scan: main: 46, alt: 41, rx_ant_conf: 0, main_ant_conf: 3

Would someone clueful in the ways of Kite software antenna diversity care to give me a hand figuring out what's going on?

Thanks,

Adrian

#1 lore raw
Quoted 57 lines · Adrian Chadd

Hi all,

I'm debugging some strange behaviour with the AR9285 on FreeBSD. I've traced down my particular issue to the diversity code which I ported verbatim from ath9k.

Has anyone seen the AR9285 diversity code make poor decisions about which LNA configurations to use?

Here's an example:

Here's the end of the sampling run just after initial interface reset, with good iperf performance (~ 25-27mbit on 11g TX):

ar9285_ant_comb_scan: main: 58, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 58, alt: 22, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 0
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 58, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3

.. then the sampling run concludes, and it decides to switch over the LNA config:

ar9285_ant_comb_scan: total_pkt_count=512
ar9285_ant_comb_scan: main_total_rssi=29420
ar9285_ant_comb_scan: alt_total_rssi=11264
ar9285_ant_comb_scan: main_rssi_avg=57
ar9285_ant_comb_scan: alt_alt_rssi_avg=22

.. notice here that it thinks most of the packets were received on the alt chain (rx_ant_conf != main_ant_conf):

ar9285_ant_comb_scan: main_recv_cnt=31
ar9285_ant_comb_scan: alt_recv_cnt=481

.. so it adjusts the LNA configuration:

ar9285_ant_comb_scan: lna_conf: 2 -> 1
ar9285_ant_comb_scan: main_lna_conf: 1 -> 2
ar9285_ant_comb_scan: fast_div_bias: 2 -> 0

.. and at this point, the main/alt RSSIs change and iperf throughput drops from 25mbit to 10mbit:

ar9285_ant_comb_scan: main: 47, alt: 41, rx_ant_conf: 0, main_ant_conf: 1
ar9285_ant_comb_scan: main: 45, alt: 41, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 45, alt: 41, rx_ant_conf: 0, main_ant_conf: 0
ar9285_ant_comb_scan: main: 47, alt: 41, rx_ant_conf: 0, main_ant_conf: 1
ar9285_ant_comb_scan: main: 47, alt: 41, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 46, alt: 41, rx_ant_conf: 0, main_ant_conf: 1
ar9285_ant_comb_scan: main: 46, alt: 41, rx_ant_conf: 0, main_ant_conf: 3

Quoted 2 lines

Would someone clueful in the ways of Kite software antenna diversity care to give me a hand figuring out what's going on?

Adrian, we will check it out and we are porting diversity for AR9485(we are at the end of testing). hopefully we can debug this too and help you. Senthil also told that there was some problem which he found recently.
thanks a lot for reporting.

Quoted 10 lines

Thanks,

Adrian
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

#2 lore raw
In reply to Adrian Chadd
Quoted 57 lines · Adrian Chadd

Hi all,

I'm debugging some strange behaviour with the AR9285 on FreeBSD. I've traced down my particular issue to the diversity code which I ported verbatim from ath9k.

Has anyone seen the AR9285 diversity code make poor decisions about which LNA configurations to use?

Here's an example:

Here's the end of the sampling run just after initial interface reset, with good iperf performance (~ 25-27mbit on 11g TX):

ar9285_ant_comb_scan: main: 58, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 58, alt: 22, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 0
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 58, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3
ar9285_ant_comb_scan: main: 57, alt: 22, rx_ant_conf: 0, main_ant_conf: 3

.. then the sampling run concludes, and it decides to switch over the LNA config:

ar9285_ant_comb_scan: total_pkt_count=512
ar9285_ant_comb_scan: main_total_rssi=29420
ar9285_ant_comb_scan: alt_total_rssi=11264
ar9285_ant_comb_scan: main_rssi_avg=57
ar9285_ant_comb_scan: alt_alt_rssi_avg=22

.. notice here that it thinks most of the packets were received on the alt chain (rx_ant_conf != main_ant_conf):

ar9285_ant_comb_scan: main_recv_cnt=31
ar9285_ant_comb_scan: alt_recv_cnt=481

.. so it adjusts the LNA configuration:

ar9285_ant_comb_scan: lna_conf: 2 -> 1
ar9285_ant_comb_scan: main_lna_conf: 1 -> 2
ar9285_ant_comb_scan: fast_div_bias: 2 -> 0

.. and at this point, the main/alt RSSIs change and iperf throughput drops from 25mbit to 10mbit:

ar9285_ant_comb_scan: main: 47, alt: 41, rx_ant_conf: 0, main_ant_conf: 1
ar9285_ant_comb_scan: main: 45, alt: 41, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 45, alt: 41, rx_ant_conf: 0, main_ant_conf: 0
ar9285_ant_comb_scan: main: 47, alt: 41, rx_ant_conf: 0, main_ant_conf: 1
ar9285_ant_comb_scan: main: 47, alt: 41, rx_ant_conf: 0, main_ant_conf: 2
ar9285_ant_comb_scan: main: 46, alt: 41, rx_ant_conf: 0, main_ant_conf: 1
ar9285_ant_comb_scan: main: 46, alt: 41, rx_ant_conf: 0, main_ant_conf: 3

Quoted 2 lines

Would someone clueful in the ways of Kite software antenna diversity care to give me a hand figuring out what's going on?

Adrian, only fast diversity is supported for AP(diversity combining should not). If you are using AR9285 as an AP please tell us.

Quoted 9 lines

Thanks,

Adrian
_______________________________________________
ath9k-devel mailing list
ath9k-devel at lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel

#3 lore raw
Quoted 5 lines · Mohammed Shafi
Quoted 2 lines

Would someone clueful in the ways of Kite software antenna diversity care to give me a hand figuring out what's going on?

Adrian, only fast diversity is supported for AP(diversity combining should not). If you are using AR9285 as an AP please tell us.

Nope, I'm just using it for now as an station.

Is that particular behaviour enforced in ath9k?

So to clarify:

* Fixed antenna A or B is fine in all modes;
* If the relevant bits are set (HAL_ANT_VARIABLE), enable static diversity combining from EEPROM settings;
* Enable diversity combining only if HAL_ANT_VARIABLE, the fast/lna diversity is enabled -and- AP mode?

Adrian

#4 lore raw
Quoted 12 lines · Adrian Chadd
Quoted 5 lines · Mohammed Shafi
Quoted 2 lines

Would someone clueful in the ways of Kite software antenna diversity care to give me a hand figuring out what's going on?

Adrian, only fast diversity is supported for AP(diversity combining should not). If you are using AR9285 as an AP please tell us.

Nope, I'm just using it for now as an station.

Is that particular behaviour enforced in ath9k?

Quoted 8 lines

So to clarify:

* Fixed antenna A or B is fine in all modes;
* If the relevant bits are set (HAL_ANT_VARIABLE), enable static diversity combining from EEPROM settings;
* Enable diversity combining only if HAL_ANT_VARIABLE, the fast/lna diversity is enabled -and- AP mode?

Adrian,

/* Set the Ant diversity and combining support
* if the eeprom modal versoion is > 3 and
* ant fast diversity and lna diversity enabled */

Quoted 3 lines

Adrian