diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-08-04 16:38:47 +0200 |
---|---|---|
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) | |
download | kernel-crypto-8c5e7a5f59f9d11597bd47de28334da318ea0e80.tar.gz kernel-crypto-8c5e7a5f59f9d11597bd47de28334da318ea0e80.tar.xz kernel-crypto-8c5e7a5f59f9d11597bd47de28334da318ea0e80.zip |
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 0ffd972bb85..323bd54eb80 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h @@ -144,6 +144,17 @@ struct rf_channel { }; /* + * Channel information structure + */ +struct channel_info { + unsigned int flags; +#define GEOGRAPHY_ALLOWED 0x00000001 + + short tx_power1; + short tx_power2; +}; + +/* * Antenna setup values. */ struct antenna_setup { @@ -394,10 +405,7 @@ static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif) * @num_channels: Number of supported channels. This is used as array size * for @tx_power_a, @tx_power_bg and @channels. * @channels: Device/chipset specific channel values (See &struct rf_channel). - * @tx_power_a: TX power values for all 5.2GHz channels (may be NULL). - * @tx_power_bg: TX power values for all 2.4GHz channels (may be NULL). - * @tx_power_default: Default TX power value to use when either - * @tx_power_a or @tx_power_bg is missing. + * @channels_info: Additional information for channels (See &struct channel_info). */ struct hw_mode_spec { unsigned int supported_bands; @@ -410,10 +418,7 @@ struct hw_mode_spec { unsigned int num_channels; const struct rf_channel *channels; - - const u8 *tx_power_a; - const u8 *tx_power_bg; - u8 tx_power_default; + const struct channel_info *channels_info; }; /* @@ -425,7 +430,9 @@ struct hw_mode_spec { */ struct rt2x00lib_conf { struct ieee80211_conf *conf; + struct rf_channel rf; + struct channel_info channel; struct antenna_setup ant; |