X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fnet%2Fmac80211.h;h=17b60391fcd66c7ba94ff14b44c0139881412b8b;hb=2ba14a017a4ba8d2266316f481d4ad7400073d18;hp=fcca9c39b9e77c73885d2da066e3ffb24e8eb2fa;hpb=f97df02e23269c7650869f6192e809f8ac1a4b39;p=linux-2.6 diff --git a/include/net/mac80211.h b/include/net/mac80211.h index fcca9c39b9..17b60391fc 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -457,6 +457,8 @@ struct ieee80211_conf { /** * enum ieee80211_if_types - types of 802.11 network interfaces * + * @IEEE80211_IF_TYPE_INVALID: invalid interface type, not used + * by mac80211 itself * @IEEE80211_IF_TYPE_AP: interface in AP mode. * @IEEE80211_IF_TYPE_MGMT: special interface for communication with hostap * daemon. Drivers should never see this type. @@ -468,8 +470,8 @@ struct ieee80211_conf { * will never see this type. */ enum ieee80211_if_types { + IEEE80211_IF_TYPE_INVALID, IEEE80211_IF_TYPE_AP, - IEEE80211_IF_TYPE_MGMT, IEEE80211_IF_TYPE_STA, IEEE80211_IF_TYPE_IBSS, IEEE80211_IF_TYPE_MNTR, @@ -519,11 +521,6 @@ struct ieee80211_if_init_conf { * config_interface() call, so copy the value somewhere if you need * it. * @ssid_len: length of the @ssid field. - * @generic_elem: used (together with @generic_elem_len) by drivers for - * hardware that generate beacons independently. The pointer is valid - * only during the config_interface() call, so copy the value somewhere - * if you need it. - * @generic_elem_len: length of the generic element. * @beacon: beacon template. Valid only if @host_gen_beacon_template in * &struct ieee80211_hw is set. The driver is responsible of freeing * the sk_buff. @@ -538,25 +535,21 @@ struct ieee80211_if_conf { u8 *bssid; u8 *ssid; size_t ssid_len; - u8 *generic_elem; - size_t generic_elem_len; struct sk_buff *beacon; struct ieee80211_tx_control *beacon_control; }; /** * enum ieee80211_key_alg - key algorithm - * @ALG_NONE: Unset key algorithm, will never be passed to the driver * @ALG_WEP: WEP40 or WEP104 * @ALG_TKIP: TKIP * @ALG_CCMP: CCMP (AES) */ -typedef enum ieee80211_key_alg { - ALG_NONE, +enum ieee80211_key_alg { ALG_WEP, ALG_TKIP, ALG_CCMP, -} ieee80211_key_alg; +}; /** @@ -596,7 +589,7 @@ enum ieee80211_key_flags { * @key: key material */ struct ieee80211_key_conf { - ieee80211_key_alg alg; + enum ieee80211_key_alg alg; u8 hw_key_idx; u8 flags; s8 keyidx; @@ -616,10 +609,22 @@ struct ieee80211_key_conf { * @SET_KEY: a key is set * @DISABLE_KEY: a key must be disabled */ -typedef enum set_key_cmd { +enum set_key_cmd { SET_KEY, DISABLE_KEY, -} set_key_cmd; +}; +/** + * enum sta_notify_cmd - sta notify command + * + * Used with the sta_notify() callback in &struct ieee80211_ops, this + * indicates addition and removal of a station to station table + * + * @STA_NOTIFY_ADD: a station was added to the station table + * @STA_NOTIFY_REMOVE: a station being removed from the station table + */ +enum sta_notify_cmd { + STA_NOTIFY_ADD, STA_NOTIFY_REMOVE +}; /** * enum ieee80211_hw_flags - hardware flags @@ -701,11 +706,16 @@ enum ieee80211_hw_flags { * * @queues: number of available hardware transmit queues for * data packets. WMM/QoS requires at least four. + * + * @rate_control_algorithm: rate control algorithm for this hardware. + * If unset (NULL), the default algorithm will be used. Must be + * set before calling ieee80211_register_hw(). */ struct ieee80211_hw { struct ieee80211_conf conf; struct wiphy *wiphy; struct workqueue_struct *workqueue; + const char *rate_control_algorithm; void *priv; u32 flags; unsigned int extra_tx_headroom; @@ -931,27 +941,11 @@ enum ieee80211_erp_change_flags { * and remove_interface calls, i.e. while the interface with the * given local_address is enabled. * - * @set_ieee8021x: Enable/disable IEEE 802.1X. This item requests wlan card - * to pass unencrypted EAPOL-Key frames even when encryption is - * configured. If the wlan card does not require such a configuration, - * this function pointer can be set to NULL. - * - * @set_port_auth: Set port authorization state (IEEE 802.1X PAE) to be - * authorized (@authorized=1) or unauthorized (=0). This function can be - * used if the wlan hardware or low-level driver implements PAE. - * mac80211 will filter frames based on authorization state in any case, - * so this function pointer can be NULL if low-level driver does not - * require event notification about port state changes. - * * @hw_scan: Ask the hardware to service the scan request, no need to start * the scan state machine in stack. * * @get_stats: return low-level statistics * - * @set_privacy_invoked: For devices that generate their own beacons and probe - * response or association responses this updates the state of privacy_invoked - * returns 0 for success or an error number. - * * @get_sequence_counter: For devices that have internal sequence counters this * callback allows mac80211 to access the current value of a counter. * This callback seems not well-defined, tell us if you need it. @@ -964,8 +958,8 @@ enum ieee80211_erp_change_flags { * * @set_retry_limit: Configuration of retry limits (if device needs it) * - * @sta_table_notification: Number of STAs in STA table notification. Must - * be atomic. + * @sta_notify: Notifies low level driver about addition or removal + * of assocaited station or AP. * * @erp_ie_changed: Handle ERP IE change notifications. Must be atomic. * @@ -991,7 +985,14 @@ enum ieee80211_erp_change_flags { * * @beacon_update: Setup beacon data for IBSS beacons. Unlike access point, * IBSS uses a fixed beacon frame which is configured using this - * function. This handler is required only for IBSS mode. + * function. + * If the driver returns success (0) from this callback, it owns + * the skb. That means the driver is responsible to kfree_skb() it. + * The control structure is not dynamically allocated. That means the + * driver does not own the pointer and if it needs it somewhere + * outside of the context of this function, it must copy it + * somewhere else. + * This handler is required only for IBSS mode. * * @tx_last_beacon: Determine whether the last IBSS beacon was sent by us. * This is needed only for IBSS mode and the result of this function is @@ -1014,17 +1015,12 @@ struct ieee80211_ops { unsigned int *total_flags, int mc_count, struct dev_addr_list *mc_list); int (*set_tim)(struct ieee80211_hw *hw, int aid, int set); - int (*set_key)(struct ieee80211_hw *hw, set_key_cmd cmd, + int (*set_key)(struct ieee80211_hw *hw, enum set_key_cmd cmd, const u8 *local_address, const u8 *address, struct ieee80211_key_conf *key); - int (*set_ieee8021x)(struct ieee80211_hw *hw, int use_ieee8021x); - int (*set_port_auth)(struct ieee80211_hw *hw, u8 *addr, - int authorized); int (*hw_scan)(struct ieee80211_hw *hw, u8 *ssid, size_t len); int (*get_stats)(struct ieee80211_hw *hw, struct ieee80211_low_level_stats *stats); - int (*set_privacy_invoked)(struct ieee80211_hw *hw, - int privacy_invoked); int (*get_sequence_counter)(struct ieee80211_hw *hw, u8* addr, u8 keyidx, u8 txrx, u32* iv32, u16* iv16); @@ -1032,8 +1028,8 @@ struct ieee80211_ops { int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value); int (*set_retry_limit)(struct ieee80211_hw *hw, u32 short_retry, u32 long_retr); - void (*sta_table_notification)(struct ieee80211_hw *hw, - int num_sta); + void (*sta_notify)(struct ieee80211_hw *hw, int if_id, + enum sta_notify_cmd, const u8 *addr); void (*erp_ie_changed)(struct ieee80211_hw *hw, u8 changes, int cts_protection, int preamble); int (*conf_tx)(struct ieee80211_hw *hw, int queue, @@ -1076,6 +1072,7 @@ int ieee80211_register_hw(struct ieee80211_hw *hw); #ifdef CONFIG_MAC80211_LEDS extern char *__ieee80211_get_tx_led_name(struct ieee80211_hw *hw); extern char *__ieee80211_get_rx_led_name(struct ieee80211_hw *hw); +extern char *__ieee80211_get_assoc_led_name(struct ieee80211_hw *hw); #endif /** * ieee80211_get_tx_led_name - get name of TX LED @@ -1115,6 +1112,16 @@ static inline char *ieee80211_get_rx_led_name(struct ieee80211_hw *hw) #endif } +static inline char *ieee80211_get_assoc_led_name(struct ieee80211_hw *hw) +{ +#ifdef CONFIG_MAC80211_LEDS + return __ieee80211_get_assoc_led_name(hw); +#else + return NULL; +#endif +} + + /* Register a new hardware PHYMODE capability to the stack. */ int ieee80211_register_hwmode(struct ieee80211_hw *hw, struct ieee80211_hw_mode *mode);