Skip to contentSkip to conversation

Antenna Configuration

ath9k-devel Robert Meschke 3 participants 4 messages Sep 13, 2010 – Sep 15, 2010

lore
Share & tools
lore
#0 lore raw

Hi Mike,

I had the same problem and wrote a workaround for it. The possible Chainmask-Configuration is retrieved from the EEPROM of your card by the driver. Normally all Antennas are activated. There is no API for Antenna-Configuration in Ath9k/Cfg80211... and therefore no API in Userspace, too. Try to apply the attached patch. It should give you the possibility to set up your antenna-config by using special module params. I'm using an embedded system with up to four mini-pci-slots. So I added the params chainconf0 - chainconf3. Usage:

Quoted 1 line

insmod/modprobe ath9k chainconf0=11:22:33:44:55:66#2x2 (3x3, 2x3, 1x1

...)

(macadress of the interface + MIMO-representation)

I tested the patch with a spectrum analyser attached to the antenna-connectors and by transmitting data. The patch works well for me with AR9160.

good luck :-)

Robert
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: antenna.patch
Url: http://lists.ath9k.org/pipermail/ath9k-devel/attachments/20100913/72bf09a6/attachment.txt

#1 lore raw

Hi!

Did you test this in 11abg mode? Or just 11n?

I've got a 3x3 AR9160 card which I'm considering disabling radio chains on to compare performance. This seems like it's a useful thing.

Whilst talking about antennas, do you/anyone know how TX/RX antenna setting/diversity works on the AR9160/AR9106 in 11abg mode(s) ? I've been investigating it with a spectrum analyser for the TX path but I'm curious about the specifics on how both TX/RX radios and antennas works in the non-n modes.

Thanks,

Adrian

Quoted 29 lines · Robert Meschke

?Hi Mike,

I had the same problem and wrote a workaround for it. The possible Chainmask-Configuration is retrieved from the EEPROM of your card by the driver. Normally all Antennas are activated. There is no API for Antenna-Configuration in Ath9k/Cfg80211... and therefore no API in Userspace, too. Try to apply the attached patch. It should give you the possibility to set up your antenna-config by using special module params. I'm using an embedded system with up to four mini-pci-slots. So I added the params chainconf0 - chainconf3. Usage:

Quoted 1 line

insmod/modprobe ath9k chainconf0=11:22:33:44:55:66#2x2 (3x3, 2x3, 1x1 ...)

(macadress of the interface + MIMO-representation)

I tested the patch with a spectrum analyser attached to the antenna-connectors and by transmitting data. The patch works well for me with AR9160.

good luck :-)

Robert

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

#2 lore raw
In reply to Robert Meschke

Hi Adrian,

look at the main.c of ath9k.

/*
* Update tx/rx chainmask. For legacy association,
* hard code chainmask to 1x1, for 11n association, use
* the chainmask configuration, for bt coexistence, use
* the chainmask configuration even in legacy mode. */
void ath_update_chainmask(struct ath_softc *sc, int is_ht)

{
     struct ath_hw *ah = sc->sc_ah;
     struct ath_common *common = ath9k_hw_common(ah);

     if ((sc->sc_flags & SC_OP_SCANNING) || is_ht ||
         (ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE)) {
         common->tx_chainmask = ah->caps.tx_chainmask;
         common->rx_chainmask = ah->caps.rx_chainmask;
     } else {
         common->tx_chainmask = 1;
         common->rx_chainmask = 1;
     }

     ath_print(common, ATH_DBG_CONFIG,
           "tx chmask: %d, rx chmask: %d\n",
           common->tx_chainmask,
           common->rx_chainmask);
}

This function is called on every channel change. If there is no 11n mode
1x1 is used (when no bt coexistence is used) -> always chain0 is used.
So i think that antenna diversity is impossible in legacy mode!? with no bt coexictence. I don't know the term bt coexistence (Bluetooth - coexictence!?)
My patch only overides the capability field. I don't touch this function. So I think my patch can only work well in 11n mode.

Btw. If you setup 2x2 on AR9160 you will use chain0 an chain1. I got strange behaviour, when I tried to use for example chain 0 and chain2

Robert

#3 lore raw
In reply to Robert Meschke

Hi Robert,

That looks excellent - thank you.

I'll give this a try.

Cheers, Mike.

-----Original Message-----
From: Robert Meschke [mailto:r_meschke at yahoo.de]
Sent: 13 September 2010 16:57
To: ath9k-devel at venema.h4ckr.net
Cc: Mike Pithouse
Subject: [ath9k-devel] Antenna Configuration

Hi Mike,

I had the same problem and wrote a workaround for it. The possible Chainmask-Configuration is retrieved from the EEPROM of your card by the driver. Normally all Antennas are activated. There is no API for Antenna-Configuration in Ath9k/Cfg80211... and therefore no API in Userspace, too. Try to apply the attached patch. It should give you the possibility to set up your antenna-config by using special module params. I'm using an embedded system with up to four mini-pci-slots. So I added the params chainconf0 - chainconf3. Usage:

Quoted 1 line

insmod/modprobe ath9k chainconf0=11:22:33:44:55:66#2x2 (3x3, 2x3, 1x1

...)

(macadress of the interface + MIMO-representation)

I tested the patch with a spectrum analyser attached to the antenna-connectors and by transmitting data. The patch works well for me with AR9160.

good luck :-)

Robert