aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00.h
diff options
context:
space:
mode:
authorIvo van Doorn <IvDoorn@gmail.com>2007-10-06 07:34:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-10 19:55:15 -0400
commit5c58ee51ff8c0aca74c225e0263bc5dd2b917781 (patch)
treea08e875dade8a6f55d45419b728b2b077cec6dc0 /drivers/net/wireless/rt2x00/rt2x00.h
parent4f5af6eb3d17f8e343597ea99d97eb2f2905b2fb (diff)
[PATCH] rt2x00: Reorganize configuration handler
Reorganize configuration handling by creating a extra structure which contains precalculated values based on the mac80211 values which are usefull for all individual drivers. This also fixes the preamble configuration problem, up untill now preamble was never configured since by default the rate->val value was used when changing the mode. Now rate->val will only be used to set the basic rate mask. The preamble configuration will now be done correctly through the erp_ie_changed callback function. 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.h32
1 files changed, 31 insertions, 1 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index a392e2a9d087..aabbe425470f 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -352,6 +352,28 @@ struct hw_mode_spec {
352}; 352};
353 353
354/* 354/*
355 * Configuration structure wrapper around the
356 * mac80211 configuration structure.
357 * When mac80211 configures the driver, rt2x00lib
358 * can precalculate values which are equal for all
359 * rt2x00 drivers. Those values can be stored in here.
360 */
361struct rt2x00lib_conf {
362 struct ieee80211_conf *conf;
363 struct rf_channel rf;
364
365 int phymode;
366
367 int basic_rates;
368 int slot_time;
369
370 short sifs;
371 short pifs;
372 short difs;
373 short eifs;
374};
375
376/*
355 * rt2x00lib callback functions. 377 * rt2x00lib callback functions.
356 */ 378 */
357struct rt2x00lib_ops { 379struct rt2x00lib_ops {
@@ -414,8 +436,12 @@ struct rt2x00lib_ops {
414 void (*config_bssid) (struct rt2x00_dev *rt2x00dev, __le32 *bssid); 436 void (*config_bssid) (struct rt2x00_dev *rt2x00dev, __le32 *bssid);
415 void (*config_type) (struct rt2x00_dev *rt2x00dev, const int type, 437 void (*config_type) (struct rt2x00_dev *rt2x00dev, const int type,
416 const int tsf_sync); 438 const int tsf_sync);
439 void (*config_preamble) (struct rt2x00_dev *rt2x00dev,
440 const int short_preamble,
441 const int ack_timeout,
442 const int ack_consume_time);
417 void (*config) (struct rt2x00_dev *rt2x00dev, const unsigned int flags, 443 void (*config) (struct rt2x00_dev *rt2x00dev, const unsigned int flags,
418 struct ieee80211_conf *conf); 444 struct rt2x00lib_conf *libconf);
419#define CONFIG_UPDATE_PHYMODE ( 1 << 1 ) 445#define CONFIG_UPDATE_PHYMODE ( 1 << 1 )
420#define CONFIG_UPDATE_CHANNEL ( 1 << 2 ) 446#define CONFIG_UPDATE_CHANNEL ( 1 << 2 )
421#define CONFIG_UPDATE_TXPOWER ( 1 << 3 ) 447#define CONFIG_UPDATE_TXPOWER ( 1 << 3 )
@@ -472,6 +498,7 @@ enum rt2x00_flags {
472 CONFIG_EXTERNAL_LNA_BG, 498 CONFIG_EXTERNAL_LNA_BG,
473 CONFIG_DOUBLE_ANTENNA, 499 CONFIG_DOUBLE_ANTENNA,
474 CONFIG_DISABLE_LINK_TUNING, 500 CONFIG_DISABLE_LINK_TUNING,
501 CONFIG_SHORT_PREAMBLE,
475}; 502};
476 503
477/* 504/*
@@ -612,6 +639,7 @@ struct rt2x00_dev {
612 */ 639 */
613 struct work_struct beacon_work; 640 struct work_struct beacon_work;
614 struct work_struct filter_work; 641 struct work_struct filter_work;
642 struct work_struct config_work;
615 643
616 /* 644 /*
617 * Data ring arrays for RX, TX and Beacon. 645 * Data ring arrays for RX, TX and Beacon.
@@ -792,6 +820,8 @@ int rt2x00mac_get_stats(struct ieee80211_hw *hw,
792 struct ieee80211_low_level_stats *stats); 820 struct ieee80211_low_level_stats *stats);
793int rt2x00mac_get_tx_stats(struct ieee80211_hw *hw, 821int rt2x00mac_get_tx_stats(struct ieee80211_hw *hw,
794 struct ieee80211_tx_queue_stats *stats); 822 struct ieee80211_tx_queue_stats *stats);
823void rt2x00mac_erp_ie_changed(struct ieee80211_hw *hw, u8 changes,
824 int cts_protection, int preamble);
795int rt2x00mac_conf_tx(struct ieee80211_hw *hw, int queue, 825int rt2x00mac_conf_tx(struct ieee80211_hw *hw, int queue,
796 const struct ieee80211_tx_queue_params *params); 826 const struct ieee80211_tx_queue_params *params);
797 827