aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2007-10-13 10:26:23 -0400
committerDavid S. Miller <davem@davemloft.net>2008-01-28 18:02:51 -0500
commitaddc81bd428f9eb29ed2ab64ad4039c6aed55aea (patch)
tree949871f2ba2d4f215df8bd323b1dec6d7906e104 /drivers/net/wireless/rt2x00/rt2x00.h
parent362f3b6bfbb18b4b8bd8a8ef391fb95efb43c632 (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.h25
1 files changed, 24 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index cec604b1b093..c47a1e6333cc 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -180,6 +180,14 @@ struct rf_channel {
180}; 180};
181 181
182/* 182/*
183 * Antenna setup values.
184 */
185struct antenna_setup {
186 enum antenna rx;
187 enum antenna tx;
188};
189
190/*
183 * Quality statistics about the currently active link. 191 * Quality statistics about the currently active link.
184 */ 192 */
185struct link_qual { 193struct link_qual {
@@ -251,6 +259,13 @@ struct link {
251 struct link_qual qual; 259 struct link_qual qual;
252 260
253 /* 261 /*
262 * Currently active TX/RX antenna setup.
263 * When software diversity is used, this will indicate
264 * which antenna is actually used at this time.
265 */
266 struct antenna_setup active_ant;
267
268 /*
254 * Active VGC level 269 * Active VGC level
255 */ 270 */
256 int vgc_level; 271 int vgc_level;
@@ -272,7 +287,6 @@ static inline void rt2x00_clear_link(struct link *link)
272 link->qual.tx_percentage = 50; 287 link->qual.tx_percentage = 50;
273} 288}
274 289
275
276/* 290/*
277 * Update the rssi using the walking average approach. 291 * Update the rssi using the walking average approach.
278 */ 292 */
@@ -378,6 +392,8 @@ struct rt2x00lib_conf {
378 struct ieee80211_conf *conf; 392 struct ieee80211_conf *conf;
379 struct rf_channel rf; 393 struct rf_channel rf;
380 394
395 struct antenna_setup ant;
396
381 int phymode; 397 int phymode;
382 398
383 int basic_rates; 399 int basic_rates;
@@ -583,6 +599,13 @@ struct rt2x00_dev {
583 struct hw_mode_spec spec; 599 struct hw_mode_spec spec;
584 600
585 /* 601 /*
602 * This is the default TX/RX antenna setup as indicated
603 * by the device's EEPROM. When mac80211 sets its
604 * antenna value to 0 we should be using these values.
605 */
606 struct antenna_setup default_ant;
607
608 /*
586 * Register pointers 609 * Register pointers
587 * csr_addr: Base register address. (PCI) 610 * csr_addr: Base register address. (PCI)
588 * csr_cache: CSR cache for usb_control_msg. (USB) 611 * csr_cache: CSR cache for usb_control_msg. (USB)