Re: [Madwifi-devel] Survey: What are you using MadWifi for, and why?
Holger Schurig <[email protected]>
| Newsgroups | gmane.linux.drivers.madwifi.user,gmane.linux.drivers.madwifi.devel |
|---|---|
| Message-ID | <[email protected]> |
> Last time I tried ath5k I had problems trying to set the
> txantenna, rxantenna and diversity registers. In madwifi, this
> is done via the sysctl interface.
I now probably know enought about nl80211, cfg80211, iw and ath5k
that I can create a patch for this. For now, I simple do:
Index: linux-wl/drivers/net/wireless/ath/ath5k/base.c
===================================================================
--- linux-wl.orig/drivers/net/wireless/ath/ath5k/base.c
2009-09-16 10:55:11.000000000 +0200
+++ linux-wl/drivers/net/wireless/ath/ath5k/base.c
2009-09-16 10:56:09.000000000 +0200
@@ -2850,7 +2850,7 @@ 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);
unlock:
mutex_unlock(&sc->lock);
Basically:
a) a cfg80211 driver needs to export how much antennas it has
b) cfg80211 must export to nl80211 how much antennas there are
c) iw needs to list this on "iw list"
d) nl80211 needs some command to select one of the antennas
e) nl80211 must tell cfg80211 which antenna to use
f) cfg80211 must tell the mac80211 driver which antenna to use
Most of this is boring boilerplate coding :-/
This scheme would then also work for driver that are
cfg80211-enabled, but are not mac80211 drivers, e.g. a modified
libertas.
--
http://www.holgerschurig.de
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july