aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-11-24 18:01:29 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-24 18:01:29 -0500
commit4ba3eb034fb6fd1990ccc5a6d71d5abcda37b905 (patch)
tree0789ba36d96dba330416a1e6a9a68e891a78802a /include/net
parent35700212b45ea9f98fa682cfc1bc1a67c9ccc34b (diff)
parent18b6c9a2213d3b6e0212e8b225abf95f7564206a (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'include/net')
-rw-r--r--include/net/cfg80211.h85
-rw-r--r--include/net/mac80211.h51
2 files changed, 91 insertions, 45 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 21710fc17eaf..a6492e9bca97 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1108,27 +1108,50 @@ struct cfg80211_ops {
1108 */ 1108 */
1109 1109
1110/** 1110/**
1111 * struct wiphy - wireless hardware description 1111 * enum wiphy_flags - wiphy capability flags
1112 * @idx: the wiphy index assigned to this item 1112 *
1113 * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name> 1113 * @WIPHY_FLAG_CUSTOM_REGULATORY: tells us the driver for this device
1114 * @custom_regulatory: tells us the driver for this device
1115 * has its own custom regulatory domain and cannot identify the 1114 * has its own custom regulatory domain and cannot identify the
1116 * ISO / IEC 3166 alpha2 it belongs to. When this is enabled 1115 * ISO / IEC 3166 alpha2 it belongs to. When this is enabled
1117 * we will disregard the first regulatory hint (when the 1116 * we will disregard the first regulatory hint (when the
1118 * initiator is %REGDOM_SET_BY_CORE). 1117 * initiator is %REGDOM_SET_BY_CORE).
1119 * @strict_regulatory: tells us the driver for this device will ignore 1118 * @WIPHY_FLAG_STRICT_REGULATORY: tells us the driver for this device will
1120 * regulatory domain settings until it gets its own regulatory domain 1119 * ignore regulatory domain settings until it gets its own regulatory
1121 * via its regulatory_hint(). After its gets its own regulatory domain 1120 * domain via its regulatory_hint(). After its gets its own regulatory
1122 * it will only allow further regulatory domain settings to further 1121 * domain it will only allow further regulatory domain settings to
1123 * enhance compliance. For example if channel 13 and 14 are disabled 1122 * further enhance compliance. For example if channel 13 and 14 are
1124 * by this regulatory domain no user regulatory domain can enable these 1123 * disabled by this regulatory domain no user regulatory domain can
1125 * channels at a later time. This can be used for devices which do not 1124 * enable these channels at a later time. This can be used for devices
1126 * have calibration information gauranteed for frequencies or settings 1125 * which do not have calibration information gauranteed for frequencies
1127 * outside of its regulatory domain. 1126 * or settings outside of its regulatory domain.
1128 * @disable_beacon_hints: enable this if your driver needs to ensure that 1127 * @WIPHY_FLAG_DISABLE_BEACON_HINTS: enable this if your driver needs to ensure
1129 * passive scan flags and beaconing flags may not be lifted by cfg80211 1128 * that passive scan flags and beaconing flags may not be lifted by
1130 * due to regulatory beacon hints. For more information on beacon 1129 * cfg80211 due to regulatory beacon hints. For more information on beacon
1131 * hints read the documenation for regulatory_hint_found_beacon() 1130 * hints read the documenation for regulatory_hint_found_beacon()
1131 * @WIPHY_FLAG_NETNS_OK: if not set, do not allow changing the netns of this
1132 * wiphy at all
1133 * @WIPHY_FLAG_PS_ON_BY_DEFAULT: if set to true, powersave will be enabled
1134 * by default -- this flag will be set depending on the kernel's default
1135 * on wiphy_new(), but can be changed by the driver if it has a good
1136 * reason to override the default
1137 * @WIPHY_FLAG_4ADDR_AP: supports 4addr mode even on AP (with a single station
1138 * on a VLAN interface)
1139 * @WIPHY_FLAG_4ADDR_STATION: supports 4addr mode even as a station
1140 */
1141enum wiphy_flags {
1142 WIPHY_FLAG_CUSTOM_REGULATORY = BIT(0),
1143 WIPHY_FLAG_STRICT_REGULATORY = BIT(1),
1144 WIPHY_FLAG_DISABLE_BEACON_HINTS = BIT(2),
1145 WIPHY_FLAG_NETNS_OK = BIT(3),
1146 WIPHY_FLAG_PS_ON_BY_DEFAULT = BIT(4),
1147 WIPHY_FLAG_4ADDR_AP = BIT(5),
1148 WIPHY_FLAG_4ADDR_STATION = BIT(6),
1149};
1150
1151/**
1152 * struct wiphy - wireless hardware description
1153 * @idx: the wiphy index assigned to this item
1154 * @class_dev: the class device representing /sys/class/ieee80211/<wiphy-name>
1132 * @reg_notifier: the driver's regulatory notification callback 1155 * @reg_notifier: the driver's regulatory notification callback
1133 * @regd: the driver's regulatory domain, if one was requested via 1156 * @regd: the driver's regulatory domain, if one was requested via
1134 * the regulatory_hint() API. This can be used by the driver 1157 * the regulatory_hint() API. This can be used by the driver
@@ -1143,11 +1166,6 @@ struct cfg80211_ops {
1143 * -1 = fragmentation disabled, only odd values >= 256 used 1166 * -1 = fragmentation disabled, only odd values >= 256 used
1144 * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled 1167 * @rts_threshold: RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled
1145 * @net: the network namespace this wiphy currently lives in 1168 * @net: the network namespace this wiphy currently lives in
1146 * @netnsok: if set to false, do not allow changing the netns of this
1147 * wiphy at all
1148 * @ps_default: default for powersave, will be set depending on the
1149 * kernel's default on wiphy_new(), but can be changed by the
1150 * driver if it has a good reason to override the default
1151 */ 1169 */
1152struct wiphy { 1170struct wiphy {
1153 /* assign these fields before you register the wiphy */ 1171 /* assign these fields before you register the wiphy */
@@ -1158,12 +1176,7 @@ struct wiphy {
1158 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */ 1176 /* Supported interface modes, OR together BIT(NL80211_IFTYPE_...) */
1159 u16 interface_modes; 1177 u16 interface_modes;
1160 1178
1161 bool custom_regulatory; 1179 u32 flags;
1162 bool strict_regulatory;
1163 bool disable_beacon_hints;
1164
1165 bool netnsok;
1166 bool ps_default;
1167 1180
1168 enum cfg80211_signal_type signal_type; 1181 enum cfg80211_signal_type signal_type;
1169 1182
@@ -1358,6 +1371,10 @@ struct cfg80211_cached_keys;
1358 * @ssid_len: (private) Used by the internal configuration code 1371 * @ssid_len: (private) Used by the internal configuration code
1359 * @wext: (private) Used by the internal wireless extensions compat code 1372 * @wext: (private) Used by the internal wireless extensions compat code
1360 * @wext_bssid: (private) Used by the internal wireless extensions compat code 1373 * @wext_bssid: (private) Used by the internal wireless extensions compat code
1374 * @use_4addr: indicates 4addr mode is used on this interface, must be
1375 * set by driver (if supported) on add_interface BEFORE registering the
1376 * netdev and may otherwise be used by driver read-only, will be update
1377 * by cfg80211 on change_interface
1361 */ 1378 */
1362struct wireless_dev { 1379struct wireless_dev {
1363 struct wiphy *wiphy; 1380 struct wiphy *wiphy;
@@ -1371,6 +1388,8 @@ struct wireless_dev {
1371 1388
1372 struct work_struct cleanup_work; 1389 struct work_struct cleanup_work;
1373 1390
1391 bool use_4addr;
1392
1374 /* currently used for IBSS and SME - might be rearranged later */ 1393 /* currently used for IBSS and SME - might be rearranged later */
1375 u8 ssid[IEEE80211_MAX_SSID_LEN]; 1394 u8 ssid[IEEE80211_MAX_SSID_LEN];
1376 u8 ssid_len; 1395 u8 ssid_len;
@@ -1820,6 +1839,18 @@ void cfg80211_send_rx_auth(struct net_device *dev, const u8 *buf, size_t len);
1820void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr); 1839void cfg80211_send_auth_timeout(struct net_device *dev, const u8 *addr);
1821 1840
1822/** 1841/**
1842 * __cfg80211_auth_canceled - notify cfg80211 that authentication was canceled
1843 * @dev: network device
1844 * @addr: The MAC address of the device with which the authentication timed out
1845 *
1846 * When a pending authentication had no action yet, the driver may decide
1847 * to not send a deauth frame, but in that case must calls this function
1848 * to tell cfg80211 about this decision. It is only valid to call this
1849 * function within the deauth() callback.
1850 */
1851void __cfg80211_auth_canceled(struct net_device *dev, const u8 *addr);
1852
1853/**
1823 * cfg80211_send_rx_assoc - notification of processed association 1854 * cfg80211_send_rx_assoc - notification of processed association
1824 * @dev: network device 1855 * @dev: network device
1825 * @buf: (re)association response frame (header + body) 1856 * @buf: (re)association response frame (header + body)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 2c10eac637d8..3754ea405c88 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -219,7 +219,7 @@ struct ieee80211_bss_conf {
219 * 219 *
220 * These flags are used with the @flags member of &ieee80211_tx_info. 220 * These flags are used with the @flags member of &ieee80211_tx_info.
221 * 221 *
222 * @IEEE80211_TX_CTL_REQ_TX_STATUS: request TX status callback for this frame. 222 * @IEEE80211_TX_CTL_REQ_TX_STATUS: require TX status callback for this frame.
223 * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence 223 * @IEEE80211_TX_CTL_ASSIGN_SEQ: The driver has to assign a sequence
224 * number to this frame, taking care of not overwriting the fragment 224 * number to this frame, taking care of not overwriting the fragment
225 * number and increasing the sequence number only when the 225 * number and increasing the sequence number only when the
@@ -390,10 +390,12 @@ struct ieee80211_tx_rate {
390 * @control: union for control data 390 * @control: union for control data
391 * @status: union for status data 391 * @status: union for status data
392 * @driver_data: array of driver_data pointers 392 * @driver_data: array of driver_data pointers
393 * @ampdu_ack_len: number of aggregated frames. 393 * @ampdu_ack_len: number of acked aggregated frames.
394 * relevant only if IEEE80211_TX_STATUS_AMPDU was set. 394 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
395 * @ampdu_ack_map: block ack bit map for the aggregation. 395 * @ampdu_ack_map: block ack bit map for the aggregation.
396 * relevant only if IEEE80211_TX_STATUS_AMPDU was set. 396 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
397 * @ampdu_len: number of aggregated frames.
398 * relevant only if IEEE80211_TX_STATUS_AMPDU was set.
397 * @ack_signal: signal strength of the ACK frame 399 * @ack_signal: signal strength of the ACK frame
398 */ 400 */
399struct ieee80211_tx_info { 401struct ieee80211_tx_info {
@@ -428,7 +430,8 @@ struct ieee80211_tx_info {
428 u8 ampdu_ack_len; 430 u8 ampdu_ack_len;
429 u64 ampdu_ack_map; 431 u64 ampdu_ack_map;
430 int ack_signal; 432 int ack_signal;
431 /* 8 bytes free */ 433 u8 ampdu_len;
434 /* 7 bytes free */
432 } status; 435 } status;
433 struct { 436 struct {
434 struct ieee80211_tx_rate driver_rates[ 437 struct ieee80211_tx_rate driver_rates[
@@ -852,6 +855,19 @@ enum ieee80211_tkip_key_type {
852 * any particular flags. There are some exceptions to this rule, 855 * any particular flags. There are some exceptions to this rule,
853 * however, so you are advised to review these flags carefully. 856 * however, so you are advised to review these flags carefully.
854 * 857 *
858 * @IEEE80211_HW_HAS_RATE_CONTROL:
859 * The hardware or firmware includes rate control, and cannot be
860 * controlled by the stack. As such, no rate control algorithm
861 * should be instantiated, and the TX rate reported to userspace
862 * will be taken from the TX status instead of the rate control
863 * algorithm.
864 * Note that this requires that the driver implement a number of
865 * callbacks so it has the correct information, it needs to have
866 * the @set_rts_threshold callback and must look at the BSS config
867 * @use_cts_prot for G/N protection, @use_short_slot for slot
868 * timing in 2.4 GHz and @use_short_preamble for preambles for
869 * CCK frames.
870 *
855 * @IEEE80211_HW_RX_INCLUDES_FCS: 871 * @IEEE80211_HW_RX_INCLUDES_FCS:
856 * Indicates that received frames passed to the stack include 872 * Indicates that received frames passed to the stack include
857 * the FCS at the end. 873 * the FCS at the end.
@@ -910,6 +926,7 @@ enum ieee80211_tkip_key_type {
910 * avoid waking up cpu. 926 * avoid waking up cpu.
911 */ 927 */
912enum ieee80211_hw_flags { 928enum ieee80211_hw_flags {
929 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
913 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1, 930 IEEE80211_HW_RX_INCLUDES_FCS = 1<<1,
914 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2, 931 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING = 1<<2,
915 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3, 932 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE = 1<<3,
@@ -1505,6 +1522,7 @@ struct ieee80211_ops {
1505 void (*reset_tsf)(struct ieee80211_hw *hw); 1522 void (*reset_tsf)(struct ieee80211_hw *hw);
1506 int (*tx_last_beacon)(struct ieee80211_hw *hw); 1523 int (*tx_last_beacon)(struct ieee80211_hw *hw);
1507 int (*ampdu_action)(struct ieee80211_hw *hw, 1524 int (*ampdu_action)(struct ieee80211_hw *hw,
1525 struct ieee80211_vif *vif,
1508 enum ieee80211_ampdu_mlme_action action, 1526 enum ieee80211_ampdu_mlme_action action,
1509 struct ieee80211_sta *sta, u16 tid, u16 *ssn); 1527 struct ieee80211_sta *sta, u16 tid, u16 *ssn);
1510 1528
@@ -2026,8 +2044,7 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
2026 2044
2027/** 2045/**
2028 * ieee80211_start_tx_ba_session - Start a tx Block Ack session. 2046 * ieee80211_start_tx_ba_session - Start a tx Block Ack session.
2029 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2047 * @sta: the station for which to start a BA session
2030 * @ra: receiver address of the BA session recipient
2031 * @tid: the TID to BA on. 2048 * @tid: the TID to BA on.
2032 * 2049 *
2033 * Return: success if addBA request was sent, failure otherwise 2050 * Return: success if addBA request was sent, failure otherwise
@@ -2036,22 +2053,22 @@ void ieee80211_queue_delayed_work(struct ieee80211_hw *hw,
2036 * the need to start aggregation on a certain RA/TID, the session level 2053 * the need to start aggregation on a certain RA/TID, the session level
2037 * will be managed by the mac80211. 2054 * will be managed by the mac80211.
2038 */ 2055 */
2039int ieee80211_start_tx_ba_session(struct ieee80211_hw *hw, u8 *ra, u16 tid); 2056int ieee80211_start_tx_ba_session(struct ieee80211_sta *sta, u16 tid);
2040 2057
2041/** 2058/**
2042 * ieee80211_start_tx_ba_cb - low level driver ready to aggregate. 2059 * ieee80211_start_tx_ba_cb - low level driver ready to aggregate.
2043 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2060 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2044 * @ra: receiver address of the BA session recipient. 2061 * @ra: receiver address of the BA session recipient.
2045 * @tid: the TID to BA on. 2062 * @tid: the TID to BA on.
2046 * 2063 *
2047 * This function must be called by low level driver once it has 2064 * This function must be called by low level driver once it has
2048 * finished with preparations for the BA session. 2065 * finished with preparations for the BA session.
2049 */ 2066 */
2050void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid); 2067void ieee80211_start_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u16 tid);
2051 2068
2052/** 2069/**
2053 * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate. 2070 * ieee80211_start_tx_ba_cb_irqsafe - low level driver ready to aggregate.
2054 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2071 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2055 * @ra: receiver address of the BA session recipient. 2072 * @ra: receiver address of the BA session recipient.
2056 * @tid: the TID to BA on. 2073 * @tid: the TID to BA on.
2057 * 2074 *
@@ -2059,13 +2076,12 @@ void ieee80211_start_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u16 tid);
2059 * finished with preparations for the BA session. 2076 * finished with preparations for the BA session.
2060 * This version of the function is IRQ-safe. 2077 * This version of the function is IRQ-safe.
2061 */ 2078 */
2062void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, 2079void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
2063 u16 tid); 2080 u16 tid);
2064 2081
2065/** 2082/**
2066 * ieee80211_stop_tx_ba_session - Stop a Block Ack session. 2083 * ieee80211_stop_tx_ba_session - Stop a Block Ack session.
2067 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2084 * @sta: the station whose BA session to stop
2068 * @ra: receiver address of the BA session recipient
2069 * @tid: the TID to stop BA. 2085 * @tid: the TID to stop BA.
2070 * @initiator: if indicates initiator DELBA frame will be sent. 2086 * @initiator: if indicates initiator DELBA frame will be sent.
2071 * 2087 *
@@ -2075,24 +2091,23 @@ void ieee80211_start_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra,
2075 * the need to stop aggregation on a certain RA/TID, the session level 2091 * the need to stop aggregation on a certain RA/TID, the session level
2076 * will be managed by the mac80211. 2092 * will be managed by the mac80211.
2077 */ 2093 */
2078int ieee80211_stop_tx_ba_session(struct ieee80211_hw *hw, 2094int ieee80211_stop_tx_ba_session(struct ieee80211_sta *sta, u16 tid,
2079 u8 *ra, u16 tid,
2080 enum ieee80211_back_parties initiator); 2095 enum ieee80211_back_parties initiator);
2081 2096
2082/** 2097/**
2083 * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate. 2098 * ieee80211_stop_tx_ba_cb - low level driver ready to stop aggregate.
2084 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2099 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2085 * @ra: receiver address of the BA session recipient. 2100 * @ra: receiver address of the BA session recipient.
2086 * @tid: the desired TID to BA on. 2101 * @tid: the desired TID to BA on.
2087 * 2102 *
2088 * This function must be called by low level driver once it has 2103 * This function must be called by low level driver once it has
2089 * finished with preparations for the BA session tear down. 2104 * finished with preparations for the BA session tear down.
2090 */ 2105 */
2091void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid); 2106void ieee80211_stop_tx_ba_cb(struct ieee80211_vif *vif, u8 *ra, u8 tid);
2092 2107
2093/** 2108/**
2094 * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate. 2109 * ieee80211_stop_tx_ba_cb_irqsafe - low level driver ready to stop aggregate.
2095 * @hw: pointer as obtained from ieee80211_alloc_hw(). 2110 * @vif: &struct ieee80211_vif pointer from &struct ieee80211_if_init_conf
2096 * @ra: receiver address of the BA session recipient. 2111 * @ra: receiver address of the BA session recipient.
2097 * @tid: the desired TID to BA on. 2112 * @tid: the desired TID to BA on.
2098 * 2113 *
@@ -2100,7 +2115,7 @@ void ieee80211_stop_tx_ba_cb(struct ieee80211_hw *hw, u8 *ra, u8 tid);
2100 * finished with preparations for the BA session tear down. 2115 * finished with preparations for the BA session tear down.
2101 * This version of the function is IRQ-safe. 2116 * This version of the function is IRQ-safe.
2102 */ 2117 */
2103void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_hw *hw, const u8 *ra, 2118void ieee80211_stop_tx_ba_cb_irqsafe(struct ieee80211_vif *vif, const u8 *ra,
2104 u16 tid); 2119 u16 tid);
2105 2120
2106/** 2121/**