diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2007-10-13 16:26:23 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 15:02:51 -0800 |
commit | addc81bd428f9eb29ed2ab64ad4039c6aed55aea (patch) | |
tree | 949871f2ba2d4f215df8bd323b1dec6d7906e104 /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | 362f3b6bfbb18b4b8bd8a8ef391fb95efb43c632 (diff) |
[PATCH] rt2x00: Correctly translate mac80211 antenna setup to rt2x00
mac80211 has 3 values for the antenna setup:
0 - default
1 - use antenna 1
2 - use antenna 2
This means that rt2x00 should store the default value
from the EEPROM somwhere and use that when mac80211 indicates
that the antenna setup is 0.
This also implies that rt2x00 should no longer write the
hw->config.antenna_sel_* values based on the EEPROM input.
This also adds the basis in rt2x00lib for correct software
diversity handling. By default rt2x00lib will now configure
antenna B instead of hardware diversity.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index cec604b1b09..c47a1e6333c 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h @@ -180,6 +180,14 @@ struct rf_channel { }; /* + * Antenna setup values. + */ +struct antenna_setup { + enum antenna rx; + enum antenna tx; +}; + +/* * Quality statistics about the currently active link. */ struct link_qual { @@ -251,6 +259,13 @@ struct link { struct link_qual qual; /* + * Currently active TX/RX antenna setup. + * When software diversity is used, this will indicate + * which antenna is actually used at this time. + */ + struct antenna_setup active_ant; + + /* * Active VGC level */ int vgc_level; @@ -272,7 +287,6 @@ static inline void rt2x00_clear_link(struct link *link) link->qual.tx_percentage = 50; } - /* * Update the rssi using the walking average approach. */ @@ -378,6 +392,8 @@ struct rt2x00lib_conf { struct ieee80211_conf *conf; struct rf_channel rf; + struct antenna_setup ant; + int phymode; int basic_rates; @@ -583,6 +599,13 @@ struct rt2x00_dev { struct hw_mode_spec spec; /* + * This is the default TX/RX antenna setup as indicated + * by the device's EEPROM. When mac80211 sets its + * antenna value to 0 we should be using these values. + */ + struct antenna_setup default_ant; + + /* * Register pointers * csr_addr: Base register address. (PCI) * csr_cache: CSR cache for usb_control_msg. (USB) |