hi, I'd first double-check that you've correctly configured the btactive GPIO pin to be an input and the mux config makes it be BT_ACTIVE. I can't really help you more than this right now; I haven't sat down and actually tried this. :-( But it doesn't look like much else needs to happen besides configuring the GPIOs right, enabling BTCOEX and setting the weights. Thanks, Adrian On 7 April 2013 22:20, sandeep suresh <sandeep.suresh@xxxxxxxxxxx> wrote: > Hello Mr.Adrian & Mr.Sujith, > Started doing some experiments with different settings but there wasn't > any good progress. Need your help further in analysis & recommendation, > please. I monitor WLAN_ACTIVE (GPIO5) and BT_ACTIVE (GPIO6) on the > oscilloscope. There were always a lot of pulse trains on WLAN_ACTIVE. On > BT_ACTIVE, I initially pulled it high and also tested with a periodic pulse > train (450ms On and 450ms Off). The following were the different settings > with which I tested; the difference across each test case is marked in > underline/bold: > > 1. In ath9k_hw_btcoex_enable_2wire(), I added the following code: > ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT, AR_STOMP_LOW_WLAN_WGHT); > REG_WRITE(ah, AR_BT_COEX_WEIGHT, btcoex_hw->bt_coex_weights); > Result: WLAN_ACTIVE pulse trains observed during BT_ACTIVE high. > > 2. In ath9k_hw_btcoex_enable_2wire(), I added the following code: > ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT, AR_STOMP_ALL_WLAN_WGHT); > REG_WRITE(ah, AR_BT_COEX_WEIGHT, btcoex_hw->bt_coex_weights); > Result: WLAN_ACTIVE pulse trains observed during BT_ACTIVE high. > > 3. In ath9k_hw_btcoex_enable_2wire(), I added the following code: > ath9k_hw_btcoex_set_weight(ah, 0xFFFF, 0x0000); > REG_WRITE(ah, AR_BT_COEX_WEIGHT, btcoex_hw->bt_coex_weights); > Result: WLAN_ACTIVE pulse trains observed during BT_ACTIVE high. > > In the next test cases, I realized that there are two registers > (AR_BT_COEX_MODE, AR_BT_COEX_MODE2) for setting the coexistence mode. The > following is the code and the test results: > > 4. In ath9k_hw_btcoex_enable_2wire(), I added the following code: > REG_WRITE(ah, AR_BT_COEX_MODE, btcoex_hw->bt_coex_mode); > REG_WRITE(ah, AR_BT_COEX_MODE2, btcoex_hw->bt_coex_mode); > ath9k_hw_btcoex_set_weight(ah, AR_BT_COEX_WGHT, AR_STOMP_LOW_WLAN_WGHT); > REG_WRITE(ah, AR_BT_COEX_WEIGHT, btcoex_hw->bt_coex_weights); > Result: WLAN_ACTIVE pulse trains observed during BT_ACTIVE high. > > > Result: WLAN_ACTIVE pulse trains observed during BT_ACTIVE high. > > 5. Next I changed different enum for BT coex modes i.e ath_bt_mode. > Changed from ATH_BT_COEX_MODE_SLOTTED, ATH_BT_COEX_MODE_UNSLOTTED and > ATH_BT_COEX_MODE_LEGACY. I used again the above settings. But there still > there were pulse trains observed. > > Please help to further solve these problems, please. > Regards > Sandeep Suresh. > From: Adrian Chadd <adrian@xxxxxxxxxxx> > To: sandeep suresh <sandeep.suresh@xxxxxxxxxxx> > Cc: Sujith Manoharan <sujith@xxxxxxxxxxx>; ath9k-devel > <ath9k-devel@xxxxxxxxxxxxxxx>; "linux-wireless@xxxxxxxxxxxxxxx" > <linux-wireless@xxxxxxxxxxxxxxx> > Sent: Sunday, 7 April 2013 11:16 PM > > Subject: Re: [ath9k-devel] AR9287 ; 2-wire coexistence expected behavior > > On 7 April 2013 07:54, sandeep suresh <sandeep.suresh@xxxxxxxxxxx> wrote: >> Hello Mr.Adrian and Mr.Sujith, >> Thanks for your responses. In order to ensure that all of us are on the >> same page and referring to the same code base, some queries: >> >> 1. Please let me know you are referring to freebsd.org or >> linuxwireless.org >> drivers? Because you are referring to Kite & Kiwi which are in FreeBSD. >> FreeBSD --> http://svn.freebsd.org/base/head/sys/ >> Ath9k --> http://linuxwireless.org/en/users/Drivers/ath9k >> Because currently I am using ath9k drivers only from linuxwireless.org. > > Kite = AR9285 > Kiwi = AR9287 > > I know ath9k enough to be (somewhat) helpful and dangerous. But I'm > the FreeBSD guy here; I know the HAL and FreeBSD code much better. > > The FreeBSD code is closer to what our reference driver does / did > than Linux, at least for the legacy chipset support. > >> 2. Which version of ath9k driver is stable & complete from 2-wire/3-wire >> coexistence? The reason for this query is that I downloaded >> compat-wireless-3.6.8-1 which contains the function ath9k_start_btcoex() >> in >> which the Weight register is initialized. But this function is not >> available >> in some of the stable versions of ath9k which I am using. > > Not unsurprising. ath9k's btcoex code is (relatively) recent. it > sounds like you've been using an older kernel. > >> 3. What exactly are Kite and Kiwi? Are these third party modules using >> AR9287 Atheros chipsets? I did not see this in linuxwireless.org but only >> in >> FreeBSD. > > They're chip names. AR9285 = Kite, AR9287 = Kiwi. > >> 4. Just wanted to confirm if the address of the weight register that you >> are >> mentioning below for 2-wire coexistence is : AR_BT_COEX_WEIGHT (0x8174) > > Yup. That's what it is for AR5146 -> AR9287. AR9380 changed this. > >> 5. Just wanted to cross check if the weight register mentioned is for >> 2-wire >> coexistence? The reason for this doubt is I see bt_freq, bt_prio bits >> in BT weight register and these bits are relevant to BT_FREQUENCY and >> BT_PRIORITY lines which are relevant for 3-wire coexistence? > > The weight register is still used. I just don't quite know what the > table mapping is. > > But specifically, as you're effectively trying to implement "bluetooth > stomps everything", what you really want is a table where bt wins each > round, except perhaps for beacon interval (so you send out beacons > reliably.) There should already be static stomp register values for > "BT wins all" and "Wifi wins all." That's all you should need to write > into that register. > > > > > Adrian > > -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html