diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-08-04 10:38:47 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-08-22 16:29:58 -0400 |
commit | 8c5e7a5f59f9d11597bd47de28334da318ea0e80 (patch) | |
tree | 46dc69607e8a196fd68b3b040b312bc1e7fc0559 /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | 906c110fcc24bdd5bf0fa22d89ac75d99c747e53 (diff) |
rt2x00: Gather channel information in structure
Channel information which is read from EEPROM should
be read into an array containing per-channel information.
This removes the requirement of multiple arrays and makes
the channel handling a bit cleaner and easier to expand.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 0ffd972bb856..323bd54eb801 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -144,6 +144,17 @@ struct rf_channel { | |||
144 | }; | 144 | }; |
145 | 145 | ||
146 | /* | 146 | /* |
147 | * Channel information structure | ||
148 | */ | ||
149 | struct channel_info { | ||
150 | unsigned int flags; | ||
151 | #define GEOGRAPHY_ALLOWED 0x00000001 | ||
152 | |||
153 | short tx_power1; | ||
154 | short tx_power2; | ||
155 | }; | ||
156 | |||
157 | /* | ||
147 | * Antenna setup values. | 158 | * Antenna setup values. |
148 | */ | 159 | */ |
149 | struct antenna_setup { | 160 | struct antenna_setup { |
@@ -394,10 +405,7 @@ static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif) | |||
394 | * @num_channels: Number of supported channels. This is used as array size | 405 | * @num_channels: Number of supported channels. This is used as array size |
395 | * for @tx_power_a, @tx_power_bg and @channels. | 406 | * for @tx_power_a, @tx_power_bg and @channels. |
396 | * @channels: Device/chipset specific channel values (See &struct rf_channel). | 407 | * @channels: Device/chipset specific channel values (See &struct rf_channel). |
397 | * @tx_power_a: TX power values for all 5.2GHz channels (may be NULL). | 408 | * @channels_info: Additional information for channels (See &struct channel_info). |
398 | * @tx_power_bg: TX power values for all 2.4GHz channels (may be NULL). | ||
399 | * @tx_power_default: Default TX power value to use when either | ||
400 | * @tx_power_a or @tx_power_bg is missing. | ||
401 | */ | 409 | */ |
402 | struct hw_mode_spec { | 410 | struct hw_mode_spec { |
403 | unsigned int supported_bands; | 411 | unsigned int supported_bands; |
@@ -410,10 +418,7 @@ struct hw_mode_spec { | |||
410 | 418 | ||
411 | unsigned int num_channels; | 419 | unsigned int num_channels; |
412 | const struct rf_channel *channels; | 420 | const struct rf_channel *channels; |
413 | 421 | const struct channel_info *channels_info; | |
414 | const u8 *tx_power_a; | ||
415 | const u8 *tx_power_bg; | ||
416 | u8 tx_power_default; | ||
417 | }; | 422 | }; |
418 | 423 | ||
419 | /* | 424 | /* |
@@ -425,7 +430,9 @@ struct hw_mode_spec { | |||
425 | */ | 430 | */ |
426 | struct rt2x00lib_conf { | 431 | struct rt2x00lib_conf { |
427 | struct ieee80211_conf *conf; | 432 | struct ieee80211_conf *conf; |
433 | |||
428 | struct rf_channel rf; | 434 | struct rf_channel rf; |
435 | struct channel_info channel; | ||
429 | 436 | ||
430 | struct antenna_setup ant; | 437 | struct antenna_setup ant; |
431 | 438 | ||