Linux wireless drivers development
 help / color / mirror / Atom feed
* question: ATH5K, antenna-mode and fall-throught in ath5k_hw_set_fast_div()
@ 2009-09-16 10:20 Holger Schurig
  2009-09-16 13:36 ` Nick Kossifidis
  0 siblings, 1 reply; 2+ messages in thread
From: Holger Schurig @ 2009-09-16 10:20 UTC (permalink / raw)
  To: Linux Wireless List

Hi !

I have a device (fork-lift-terminal) where there is a PCCARD with
an Atheros chip inside it. The PCCARD has an built-in antenna and
a socket, where a cable goes to the external antenna.

Using madwifi, I always did:

        echo 2 >/proc/sys/dev/wifi0/rxantenna
        echo 2 >/proc/sys/dev/wifi0/txantenna
        echo 0 >/proc/sys/dev/wifi0/diversity

Now, with ath5k I'm planning to do this:

--- linux-wl.orig/drivers/net/wireless/ath/ath5k/base.c 2009-09-16 10:43:45.000000000 +0200
+++ linux-wl/drivers/net/wireless/ath/ath5k/base.c      2009-09-16 10:44:10.000000000 +0200
@@ -2850,5 +2850,5 @@ ath5k_config(struct ieee80211_hw *hw, u3
         * then we must allow the user to set how many tx antennas we
         * have available
         */
-       ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_DEFAULT);
+       ath5k_hw_set_antenna_mode(ah, AR5K_ANTMODE_FIXED_B);


... as long as there is no offical interface for setting antenna
mode. A bit crude, but ... :-)



However, when looking for the antenna-related code-paths, I found
this:

ath5k_hw_set_fast_div(struct ath5k_hw *ah, u8 ee_mode, bool enable)
{
        switch (ee_mode) {
        case AR5K_EEPROM_MODE_11G:
                /* XXX: This is set to
                 * disabled on initvals !!! */
        case AR5K_EEPROM_MODE_11A:
        ...


In my case, ee_mode happens to be AR5K_EEPROM_MODE_11G, but I don't
understand the implication of this comment. Is the XXX something
to worry?  My card is a B/G only card, so I wonder if the
fall-through into the MODE_11A case is ok ?!?

-- 
http://www.holgerschurig.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-16 13:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-16 10:20 question: ATH5K, antenna-mode and fall-throught in ath5k_hw_set_fast_div() Holger Schurig
2009-09-16 13:36 ` Nick Kossifidis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox