aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <ivdoorn@gmail.com>2008-02-17 11:35:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-02-29 15:37:23 -0500
commit31562e802a72caf0757f351fff563d558d48d087 (patch)
treeac2875b80508ab156dd3ef0302673530ca058bf8 /drivers/net/wireless/rt2x00/rt2x00.h
parentde99ff82cdc2e5b596d01000eed9e0d05566f2d7 (diff)
rt2x00: Cleanup mode registration
Don't wildly pass any number for num_rates to rt2x00lib, instead pass which type of rates are supported (CCK, OFDM). Same for num_modes but then for the 2GHZ and 5GHZ band. This makes the interface look much nicer and makes extending it later easier. 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.h38
1 files changed, 23 insertions, 15 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 7a83e0a7dd05..e315d79b2aec 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -392,30 +392,38 @@ static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif)
392 return (struct rt2x00_intf *)vif->drv_priv; 392 return (struct rt2x00_intf *)vif->drv_priv;
393} 393}
394 394
395/* 395/**
396 * struct hw_mode_spec: Hardware specifications structure
397 *
396 * Details about the supported modes, rates and channels 398 * Details about the supported modes, rates and channels
397 * of a particular chipset. This is used by rt2x00lib 399 * of a particular chipset. This is used by rt2x00lib
398 * to build the ieee80211_hw_mode array for mac80211. 400 * to build the ieee80211_hw_mode array for mac80211.
401 *
402 * @supported_bands: Bitmask contained the supported bands (2.4GHz, 5.2GHz).
403 * @supported_rates: Rate types which are supported (CCK, OFDM).
404 * @num_channels: Number of supported channels. This is used as array size
405 * for @tx_power_a, @tx_power_bg and @channels.
406 * channels: Device/chipset specific channel values (See &struct rf_channel).
407 * @tx_power_a: TX power values for all 5.2GHz channels (may be NULL).
408 * @tx_power_bg: TX power values for all 2.4GHz channels (may be NULL).
409 * @tx_power_default: Default TX power value to use when either
410 * @tx_power_a or @tx_power_bg is missing.
399 */ 411 */
400struct hw_mode_spec { 412struct hw_mode_spec {
401 /* 413 unsigned int supported_bands;
402 * Number of modes, rates and channels. 414#define SUPPORT_BAND_2GHZ 0x00000001
403 */ 415#define SUPPORT_BAND_5GHZ 0x00000002
404 int num_modes; 416
405 int num_rates; 417 unsigned int supported_rates;
406 int num_channels; 418#define SUPPORT_RATE_CCK 0x00000001
419#define SUPPORT_RATE_OFDM 0x00000002
420
421 unsigned int num_channels;
422 const struct rf_channel *channels;
407 423
408 /*
409 * txpower values.
410 */
411 const u8 *tx_power_a; 424 const u8 *tx_power_a;
412 const u8 *tx_power_bg; 425 const u8 *tx_power_bg;
413 u8 tx_power_default; 426 u8 tx_power_default;
414
415 /*
416 * Device/chipset specific value.
417 */
418 const struct rf_channel *channels;
419}; 427};
420 428
421/* 429/*