On 5 April 2013 08:24, sandeep suresh <[email protected]> wrote:
> Hello Mr.Sujith,
> Thanks for the elaborate answer which helps a lot.
> But the question is for 2-wire coexistence, are there any weight register?
> Because I did not see the same in ath9k code base neither in btcoex.c,
> gpio.c etc. The weight registers are only available for 3-wire. Please let
> me know if there is any weight register in AR9287 for 2-wire and its address
> in AR9287?
Yup. The weight register is there for 2-wire. It just has a different meaning.
I'm digging thorough this, i'll let you know when I know more.
> Do you know if AR9287 also supports MCI mode?
Nope. It doesn't.
So the weight table for Kite/Kiwi:
wait_beacon | qcu_priority | rx_clear | wlan level
0 | 0 | 0 | wlan_weight[0:1]
0 | 0 | 1 | wlan_weight[3:2]
0 | 1 | 0 | wlan_weight[5:4]
0 | 1 | 1 | wlan_weight[7:6]
1 | 0 | 0 | wlan_weight[9:8]
1 | 0 | 1 | wlan_weight[11:10]
1 | 1 | 0 | wlan_weight[13:12]
1 | 1 | 1 | wlan_weight[15:14]
bt_priority | bt freq | bt_tx_rx | bt_level
0 | 0 | 0 | bt_weight[0:1]
0 | 0 | 1 | bt_weight[3:2]
0 | 1 | 0 | bt_weight[5:4]
0 | 1 | 1 | bt_weight[7:6]
1 | 0 | 0 | bt_weight[9:8]
1 | 0 | 1 | bt_weight[11:10]
1 | 1 | 0 | bt_weight[13:12]
1 | 1 | 1 | bt_weight[15:14]
wait_beacon is whether we're waiting for a beacon in STA mode. No idea
how this works in hostap mode, but see below.
qcu_priority is whether it's a low or high queue priority. Any queue
above the "queue threshold" value in one of the BT config registers
(see the source) is a high priority queue and is 1 here.
rx_clear is whether we're busy
bt_priority - the bt priority line
bt_freq - no idea
bt_tx_rx - whether the BT module is transmitting (3 wire only I guess,
irrelevant for 2 wire)
I hope that's enough to get started on what you're trying to achieve.
Please share your results!
Ok, so what I've discovered:
The weight registers in pre-ar9300 chips are pairs of 2 bit registers
that map to some internal state inside the MAC.
Ie, if state is "X", then weight is "Y".
The MAC then compares the WLAN and BT weights; if WLAN >= BT, WLAN wins.
I'll see if I can polish this up and dump some register description
online for these coexistence registers. There's only like, 3 major
ones for AR9285/AR9287 (and then various ancillaries) that are
involved in basic BT coexistence.
AR9380 and later have larger weight tables because (a) their weight
values are bigger than 2 bits I Think? and (b) there's more internal
states to take into account. But 2-wire and 3-wire coexistence is
essentially the same. MCI (with lots of message passing around) is
where that changed.