X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fnet%2Fwireless%2Frt2x00%2Frt2x00.h;h=65614841f748ebbdab733409b661a3f65e2ee12d;hb=61486e0f68d1f8966c09b734566a187d42d65c54;hp=9098532e046ab0e07ab43406a9143be8688f6e08;hpb=21795094e2b71b4b11bfb468321046c1336cef69;p=linux-2.6 diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 9098532e04..65614841f7 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h @@ -44,7 +44,7 @@ /* * Module information. */ -#define DRV_VERSION "2.1.0" +#define DRV_VERSION "2.1.5" #define DRV_PROJECT "http://rt2x00.serialmonkey.com" /* @@ -384,7 +384,8 @@ struct rt2x00_intf { */ unsigned int delayed_flags; #define DELAYED_UPDATE_BEACON 0x00000001 -#define DELAYED_CONFIG_PREAMBLE 0x00000002 +#define DELAYED_CONFIG_ERP 0x00000002 +#define DELAYED_LED_ASSOC 0x00000004 }; static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif) @@ -392,30 +393,38 @@ static inline struct rt2x00_intf* vif_to_intf(struct ieee80211_vif *vif) return (struct rt2x00_intf *)vif->drv_priv; } -/* +/** + * struct hw_mode_spec: Hardware specifications structure + * * Details about the supported modes, rates and channels * of a particular chipset. This is used by rt2x00lib * to build the ieee80211_hw_mode array for mac80211. + * + * @supported_bands: Bitmask contained the supported bands (2.4GHz, 5.2GHz). + * @supported_rates: Rate types which are supported (CCK, OFDM). + * @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. */ struct hw_mode_spec { - /* - * Number of modes, rates and channels. - */ - int num_modes; - int num_rates; - int num_channels; + unsigned int supported_bands; +#define SUPPORT_BAND_2GHZ 0x00000001 +#define SUPPORT_BAND_5GHZ 0x00000002 + + unsigned int supported_rates; +#define SUPPORT_RATE_CCK 0x00000001 +#define SUPPORT_RATE_OFDM 0x00000002 + + unsigned int num_channels; + const struct rf_channel *channels; - /* - * txpower values. - */ const u8 *tx_power_a; const u8 *tx_power_bg; u8 tx_power_default; - - /* - * Device/chipset specific value. - */ - const struct rf_channel *channels; }; /* @@ -433,8 +442,8 @@ struct rt2x00lib_conf { enum ieee80211_band band; - int basic_rates; - int slot_time; + u32 basic_rates; + u32 slot_time; short sifs; short pifs; @@ -442,6 +451,16 @@ struct rt2x00lib_conf { short eifs; }; +/* + * Configuration structure for erp settings. + */ +struct rt2x00lib_erp { + int short_preamble; + + int ack_timeout; + int ack_consume_time; +}; + /* * Configuration structure wrapper around the * rt2x00 interface configuration handler. @@ -487,6 +506,7 @@ struct rt2x00lib_ops { */ int (*probe_hw) (struct rt2x00_dev *rt2x00dev); char *(*get_firmware_name) (struct rt2x00_dev *rt2x00dev); + u16 (*get_firmware_crc) (void *data, const size_t len); int (*load_firmware) (struct rt2x00_dev *rt2x00dev, void *data, const size_t len); @@ -514,23 +534,20 @@ struct rt2x00lib_ops { struct link_qual *qual); void (*reset_tuner) (struct rt2x00_dev *rt2x00dev); void (*link_tuner) (struct rt2x00_dev *rt2x00dev); - void (*led_brightness) (struct led_classdev *led_cdev, - enum led_brightness brightness); /* * TX control handlers */ void (*write_tx_desc) (struct rt2x00_dev *rt2x00dev, struct sk_buff *skb, - struct txentry_desc *txdesc, - struct ieee80211_tx_control *control); + struct txentry_desc *txdesc); int (*write_tx_data) (struct rt2x00_dev *rt2x00dev, struct data_queue *queue, struct sk_buff *skb, struct ieee80211_tx_control *control); int (*get_tx_data_len) (struct rt2x00_dev *rt2x00dev, struct sk_buff *skb); void (*kick_tx_queue) (struct rt2x00_dev *rt2x00dev, - const unsigned int queue); + const enum data_queue_qid queue); /* * RX control handlers @@ -541,6 +558,8 @@ struct rt2x00lib_ops { /* * Configuration handlers. */ + void (*config_filter) (struct rt2x00_dev *rt2x00dev, + const unsigned int filter_flags); void (*config_intf) (struct rt2x00_dev *rt2x00dev, struct rt2x00_intf *intf, struct rt2x00intf_conf *conf, @@ -549,10 +568,8 @@ struct rt2x00lib_ops { #define CONFIG_UPDATE_MAC ( 1 << 2 ) #define CONFIG_UPDATE_BSSID ( 1 << 3 ) - int (*config_preamble) (struct rt2x00_dev *rt2x00dev, - const int short_preamble, - const int ack_timeout, - const int ack_consume_time); + void (*config_erp) (struct rt2x00_dev *rt2x00dev, + struct rt2x00lib_erp *erp); void (*config) (struct rt2x00_dev *rt2x00dev, struct rt2x00lib_conf *libconf, const unsigned int flags); @@ -603,12 +620,10 @@ enum rt2x00_flags { /* * Driver features */ - DRIVER_SUPPORT_MIXED_INTERFACES, DRIVER_REQUIRE_FIRMWARE, - DRIVER_REQUIRE_FIRMWARE_CRC_ITU_T, - DRIVER_REQUIRE_FIRMWARE_CCITT, DRIVER_REQUIRE_BEACON_GUARD, DRIVER_REQUIRE_ATIM_QUEUE, + DRIVER_REQUIRE_SCHEDULED, /* * Driver configuration @@ -656,6 +671,9 @@ struct rt2x00_dev { * This will only be compiled in when required. */ #ifdef CONFIG_RT2X00_LIB_RFKILL + unsigned long rfkill_state; +#define RFKILL_STATE_ALLOCATED 1 +#define RFKILL_STATE_REGISTERED 2 struct rfkill *rfkill; struct input_polled_dev *poll_dev; #endif /* CONFIG_RT2X00_LIB_RFKILL */ @@ -673,8 +691,6 @@ struct rt2x00_dev { * by mac8011 or the kernel. */ #ifdef CONFIG_RT2X00_LIB_LEDS - unsigned int led_flags; - struct rt2x00_trigger trigger_qual; struct rt2x00_led led_radio; struct rt2x00_led led_assoc; struct rt2x00_led led_qual; @@ -910,17 +926,16 @@ static inline u16 get_duration_res(const unsigned int size, const u8 rate) } /** - * rt2x00queue_get_queue - Convert mac80211 queue index to rt2x00 queue + * rt2x00queue_get_queue - Convert queue index to queue pointer * @rt2x00dev: Pointer to &struct rt2x00_dev. - * @queue: mac80211/rt2x00 queue index - * (see &enum ieee80211_tx_queue and &enum rt2x00_bcn_queue). + * @queue: rt2x00 queue index (see &enum data_queue_qid). */ struct data_queue *rt2x00queue_get_queue(struct rt2x00_dev *rt2x00dev, - const unsigned int queue); + const enum data_queue_qid queue); /** * rt2x00queue_get_entry - Get queue entry where the given index points to. - * @rt2x00dev: Pointer to &struct rt2x00_dev. + * @queue: Pointer to &struct data_queue from where we obtain the entry. * @index: Index identifier for obtaining the correct index. */ struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue, @@ -929,7 +944,7 @@ struct queue_entry *rt2x00queue_get_entry(struct data_queue *queue, /** * rt2x00queue_index_inc - Index incrementation function * @queue: Queue (&struct data_queue) to perform the action on. - * @action: Index type (&enum queue_index) to perform the action on. + * @index: Index type (&enum queue_index) to perform the action on. * * This function will increase the requested index on the queue, * it will grab the appropriate locks and handle queue overflow events by @@ -969,6 +984,10 @@ int rt2x00mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf); int rt2x00mac_config_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_if_conf *conf); +void rt2x00mac_configure_filter(struct ieee80211_hw *hw, + unsigned int changed_flags, + unsigned int *total_flags, + int mc_count, struct dev_addr_list *mc_list); int rt2x00mac_get_stats(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats); int rt2x00mac_get_tx_stats(struct ieee80211_hw *hw, @@ -977,7 +996,7 @@ void rt2x00mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *bss_conf, u32 changes); -int rt2x00mac_conf_tx(struct ieee80211_hw *hw, int queue, +int rt2x00mac_conf_tx(struct ieee80211_hw *hw, u16 queue, const struct ieee80211_tx_queue_params *params); /*