cccc144756b0dc388e45921743caf899c1820125
[openwrt/svn-archive/archive.git] / package / iw / patches / 001-nl80211_h_sync.patch
1 --- a/nl80211.h
2 +++ b/nl80211.h
3 @@ -156,21 +156,23 @@
4 * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_IDX
5 * or %NL80211_ATTR_MAC.
6 *
7 - * @NL80211_CMD_GET_BEACON: retrieve beacon information (returned in a
8 - * %NL80222_CMD_NEW_BEACON message)
9 - * @NL80211_CMD_SET_BEACON: set the beacon on an access point interface
10 - * using the %NL80211_ATTR_BEACON_INTERVAL, %NL80211_ATTR_DTIM_PERIOD,
11 - * %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL attributes.
12 - * Following attributes are provided for drivers that generate full Beacon
13 - * and Probe Response frames internally: %NL80211_ATTR_SSID,
14 + * @NL80211_CMD_GET_BEACON: (not used)
15 + * @NL80211_CMD_SET_BEACON: change the beacon on an access point interface
16 + * using the %NL80211_ATTR_BEACON_HEAD and %NL80211_ATTR_BEACON_TAIL
17 + * attributes. For drivers that generate the beacon and probe responses
18 + * internally, the following attributes must be provided: %NL80211_ATTR_IE,
19 + * %NL80211_ATTR_IE_PROBE_RESP and %NL80211_ATTR_IE_ASSOC_RESP.
20 + * @NL80211_CMD_START_AP: Start AP operation on an AP interface, parameters
21 + * are like for %NL80211_CMD_SET_BEACON, and additionally parameters that
22 + * do not change are used, these include %NL80211_ATTR_BEACON_INTERVAL,
23 + * %NL80211_ATTR_DTIM_PERIOD, %NL80211_ATTR_SSID,
24 * %NL80211_ATTR_HIDDEN_SSID, %NL80211_ATTR_CIPHERS_PAIRWISE,
25 * %NL80211_ATTR_CIPHER_GROUP, %NL80211_ATTR_WPA_VERSIONS,
26 * %NL80211_ATTR_AKM_SUITES, %NL80211_ATTR_PRIVACY,
27 - * %NL80211_ATTR_AUTH_TYPE, %NL80211_ATTR_IE, %NL80211_ATTR_IE_PROBE_RESP,
28 - * %NL80211_ATTR_IE_ASSOC_RESP.
29 - * @NL80211_CMD_NEW_BEACON: add a new beacon to an access point interface,
30 - * parameters are like for %NL80211_CMD_SET_BEACON.
31 - * @NL80211_CMD_DEL_BEACON: remove the beacon, stop sending it
32 + * %NL80211_ATTR_AUTH_TYPE and %NL80211_ATTR_INACTIVITY_TIMEOUT.
33 + * @NL80211_CMD_NEW_BEACON: old alias for %NL80211_CMD_START_AP
34 + * @NL80211_CMD_STOP_AP: Stop AP operation on the given interface
35 + * @NL80211_CMD_DEL_BEACON: old alias for %NL80211_CMD_STOP_AP
36 *
37 * @NL80211_CMD_GET_STATION: Get station attributes for station identified by
38 * %NL80211_ATTR_MAC on the interface identified by %NL80211_ATTR_IFINDEX.
39 @@ -367,6 +369,11 @@
40 * %NL80211_ATTR_WIPHY_FREQ, %NL80211_ATTR_CONTROL_PORT,
41 * %NL80211_ATTR_CONTROL_PORT_ETHERTYPE and
42 * %NL80211_ATTR_CONTROL_PORT_NO_ENCRYPT.
43 + * Background scan period can optionally be
44 + * specified in %NL80211_ATTR_BG_SCAN_PERIOD,
45 + * if not specified default background scan configuration
46 + * in driver is used and if period value is 0, bg scan will be disabled.
47 + * This attribute is ignored if driver does not support roam scan.
48 * It is also sent as an event, with the BSSID and response IEs when the
49 * connection is established or failed to be established. This can be
50 * determined by the STATUS_CODE attribute.
51 @@ -541,6 +548,11 @@
52 * @NL80211_CMD_SET_NOACK_MAP: sets a bitmap for the individual TIDs whether
53 * No Acknowledgement Policy should be applied.
54 *
55 + * @NL80211_CMD_CH_SWITCH_NOTIFY: An AP or GO may decide to switch channels
56 + * independently of the userspace SME, send this event indicating
57 + * %NL80211_ATTR_IFINDEX is now on %NL80211_ATTR_WIPHY_FREQ with
58 + * %NL80211_ATTR_WIPHY_CHANNEL_TYPE.
59 + *
60 * @NL80211_CMD_MAX: highest used command number
61 * @__NL80211_CMD_AFTER_LAST: internal use
62 */
63 @@ -565,8 +577,10 @@ enum nl80211_commands {
64
65 NL80211_CMD_GET_BEACON,
66 NL80211_CMD_SET_BEACON,
67 - NL80211_CMD_NEW_BEACON,
68 - NL80211_CMD_DEL_BEACON,
69 + NL80211_CMD_START_AP,
70 + NL80211_CMD_NEW_BEACON = NL80211_CMD_START_AP,
71 + NL80211_CMD_STOP_AP,
72 + NL80211_CMD_DEL_BEACON = NL80211_CMD_STOP_AP,
73
74 NL80211_CMD_GET_STATION,
75 NL80211_CMD_SET_STATION,
76 @@ -680,6 +694,8 @@ enum nl80211_commands {
77
78 NL80211_CMD_SET_NOACK_MAP,
79
80 + NL80211_CMD_CH_SWITCH_NOTIFY,
81 +
82 /* add new commands above here */
83
84 /* used to define NL80211_CMD_MAX below */
85 @@ -1193,6 +1209,19 @@ enum nl80211_commands {
86 * @NL80211_ATTR_NOACK_MAP: This u16 bitmap contains the No Ack Policy of
87 * up to 16 TIDs.
88 *
89 + * @NL80211_ATTR_INACTIVITY_TIMEOUT: timeout value in seconds, this can be
90 + * used by the drivers which has MLME in firmware and does not have support
91 + * to report per station tx/rx activity to free up the staion entry from
92 + * the list. This needs to be used when the driver advertises the
93 + * capability to timeout the stations.
94 + *
95 + * @NL80211_ATTR_RX_SIGNAL_DBM: signal strength in dBm (as a 32-bit int);
96 + * this attribute is (depending on the driver capabilities) added to
97 + * received frames indicated with %NL80211_CMD_FRAME.
98 + *
99 + * @NL80211_ATTR_BG_SCAN_PERIOD: Background scan period in seconds
100 + * or 0 to disable background scan.
101 + *
102 * @NL80211_ATTR_MAX: highest attribute number currently defined
103 * @__NL80211_ATTR_AFTER_LAST: internal use
104 */
105 @@ -1438,6 +1467,12 @@ enum nl80211_attrs {
106
107 NL80211_ATTR_NOACK_MAP,
108
109 + NL80211_ATTR_INACTIVITY_TIMEOUT,
110 +
111 + NL80211_ATTR_RX_SIGNAL_DBM,
112 +
113 + NL80211_ATTR_BG_SCAN_PERIOD,
114 +
115 /* add attributes here, update the policy in nl80211.c */
116
117 __NL80211_ATTR_AFTER_LAST,
118 @@ -1475,6 +1510,7 @@ enum nl80211_attrs {
119 #define NL80211_ATTR_FEATURE_FLAGS NL80211_ATTR_FEATURE_FLAGS
120
121 #define NL80211_MAX_SUPP_RATES 32
122 +#define NL80211_MAX_SUPP_HT_RATES 77
123 #define NL80211_MAX_SUPP_REG_RULES 32
124 #define NL80211_TKIP_DATA_OFFSET_ENCR_KEY 0
125 #define NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY 16
126 @@ -1536,7 +1572,11 @@ enum nl80211_iftype {
127 * @NL80211_STA_FLAG_WME: station is WME/QoS capable
128 * @NL80211_STA_FLAG_MFP: station uses management frame protection
129 * @NL80211_STA_FLAG_AUTHENTICATED: station is authenticated
130 - * @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer
131 + * @NL80211_STA_FLAG_TDLS_PEER: station is a TDLS peer -- this flag should
132 + * only be used in managed mode (even in the flags mask). Note that the
133 + * flag can't be changed, it is only valid while adding a station, and
134 + * attempts to change it will silently be ignored (rather than rejected
135 + * as errors.)
136 * @NL80211_STA_FLAG_MAX: highest station flag number currently defined
137 * @__NL80211_STA_FLAG_AFTER_LAST: internal use
138 */
139 @@ -1651,6 +1691,10 @@ enum nl80211_sta_bss_param {
140 * containing info as possible, see &enum nl80211_sta_bss_param
141 * @NL80211_STA_INFO_CONNECTED_TIME: time since the station is last connected
142 * @NL80211_STA_INFO_STA_FLAGS: Contains a struct nl80211_sta_flag_update.
143 + * @NL80211_STA_INFO_BEACON_LOSS: count of times beacon loss was detected (u32)
144 + * @NL80211_STA_INFO_T_OFFSET: timing offset with respect to this STA (s64)
145 + * @NL80211_STA_INFO_CHAIN_SIGNAL: per-chain signal strength of last PPDU
146 + * @NL80211_STA_INFO_CHAIN_SIGNAL_AVG: per-chain signal strength average
147 * @__NL80211_STA_INFO_AFTER_LAST: internal
148 * @NL80211_STA_INFO_MAX: highest possible station info attribute
149 */
150 @@ -1673,6 +1717,10 @@ enum nl80211_sta_info {
151 NL80211_STA_INFO_BSS_PARAM,
152 NL80211_STA_INFO_CONNECTED_TIME,
153 NL80211_STA_INFO_STA_FLAGS,
154 + NL80211_STA_INFO_BEACON_LOSS,
155 + NL80211_STA_INFO_T_OFFSET,
156 + NL80211_STA_INFO_CHAIN_SIGNAL,
157 + NL80211_STA_INFO_CHAIN_SIGNAL_AVG,
158
159 /* keep last */
160 __NL80211_STA_INFO_AFTER_LAST,
161 @@ -2098,8 +2146,18 @@ enum nl80211_mntr_flags {
162 * TUs) during which a mesh STA can send only one Action frame containing a
163 * PERR element.
164 *
165 + * @NL80211_MESHCONF_FORWARDING: set Mesh STA as forwarding or non-forwarding
166 + * or forwarding entity (default is TRUE - forwarding entity)
167 + *
168 + * @NL80211_MESHCONF_RSSI_THRESHOLD: RSSI threshold in dBm. This specifies the
169 + * threshold for average signal strength of candidate station to establish
170 + * a peer link.
171 + *
172 * @NL80211_MESHCONF_ATTR_MAX: highest possible mesh configuration attribute
173 *
174 + * @NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR: maximum number of neighbors
175 + * to synchronize to for 11s default synchronization method (see 11C.12.2.2)
176 + *
177 * @__NL80211_MESHCONF_ATTR_AFTER_LAST: internal use
178 */
179 enum nl80211_meshconf_params {
180 @@ -2122,6 +2180,9 @@ enum nl80211_meshconf_params {
181 NL80211_MESHCONF_HWMP_RANN_INTERVAL,
182 NL80211_MESHCONF_GATE_ANNOUNCEMENTS,
183 NL80211_MESHCONF_HWMP_PERR_MIN_INTERVAL,
184 + NL80211_MESHCONF_FORWARDING,
185 + NL80211_MESHCONF_RSSI_THRESHOLD,
186 + NL80211_MESHCONF_SYNC_OFFSET_MAX_NEIGHBOR,
187
188 /* keep last */
189 __NL80211_MESHCONF_ATTR_AFTER_LAST,
190 @@ -2161,6 +2222,11 @@ enum nl80211_meshconf_params {
191 * complete (unsecured) mesh peering without the need of a userspace daemon.
192 *
193 * @NL80211_MESH_SETUP_ATTR_MAX: highest possible mesh setup attribute number
194 + *
195 + * @NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC: Enable this option to use a
196 + * vendor specific synchronization method or disable it to use the default
197 + * neighbor offset synchronization
198 + *
199 * @__NL80211_MESH_SETUP_ATTR_AFTER_LAST: Internal use
200 */
201 enum nl80211_mesh_setup_params {
202 @@ -2170,6 +2236,7 @@ enum nl80211_mesh_setup_params {
203 NL80211_MESH_SETUP_IE,
204 NL80211_MESH_SETUP_USERSPACE_AUTH,
205 NL80211_MESH_SETUP_USERSPACE_AMPE,
206 + NL80211_MESH_SETUP_ENABLE_VENDOR_SYNC,
207
208 /* keep last */
209 __NL80211_MESH_SETUP_ATTR_AFTER_LAST,
210 @@ -2179,7 +2246,7 @@ enum nl80211_mesh_setup_params {
211 /**
212 * enum nl80211_txq_attr - TX queue parameter attributes
213 * @__NL80211_TXQ_ATTR_INVALID: Attribute number 0 is reserved
214 - * @NL80211_TXQ_ATTR_QUEUE: TX queue identifier (NL80211_TXQ_Q_*)
215 + * @NL80211_TXQ_ATTR_AC: AC identifier (NL80211_AC_*)
216 * @NL80211_TXQ_ATTR_TXOP: Maximum burst time in units of 32 usecs, 0 meaning
217 * disabled
218 * @NL80211_TXQ_ATTR_CWMIN: Minimum contention window [a value of the form
219 @@ -2192,7 +2259,7 @@ enum nl80211_mesh_setup_params {
220 */
221 enum nl80211_txq_attr {
222 __NL80211_TXQ_ATTR_INVALID,
223 - NL80211_TXQ_ATTR_QUEUE,
224 + NL80211_TXQ_ATTR_AC,
225 NL80211_TXQ_ATTR_TXOP,
226 NL80211_TXQ_ATTR_CWMIN,
227 NL80211_TXQ_ATTR_CWMAX,
228 @@ -2203,13 +2270,21 @@ enum nl80211_txq_attr {
229 NL80211_TXQ_ATTR_MAX = __NL80211_TXQ_ATTR_AFTER_LAST - 1
230 };
231
232 -enum nl80211_txq_q {
233 - NL80211_TXQ_Q_VO,
234 - NL80211_TXQ_Q_VI,
235 - NL80211_TXQ_Q_BE,
236 - NL80211_TXQ_Q_BK
237 +enum nl80211_ac {
238 + NL80211_AC_VO,
239 + NL80211_AC_VI,
240 + NL80211_AC_BE,
241 + NL80211_AC_BK,
242 + NL80211_NUM_ACS
243 };
244
245 +/* backward compat */
246 +#define NL80211_TXQ_ATTR_QUEUE NL80211_TXQ_ATTR_AC
247 +#define NL80211_TXQ_Q_VO NL80211_AC_VO
248 +#define NL80211_TXQ_Q_VI NL80211_AC_VI
249 +#define NL80211_TXQ_Q_BE NL80211_AC_BE
250 +#define NL80211_TXQ_Q_BK NL80211_AC_BK
251 +
252 enum nl80211_channel_type {
253 NL80211_CHAN_NO_HT,
254 NL80211_CHAN_HT20,
255 @@ -2395,12 +2470,15 @@ enum nl80211_key_attributes {
256 * in an array of rates as defined in IEEE 802.11 7.3.2.2 (u8 values with
257 * 1 = 500 kbps) but without the IE length restriction (at most
258 * %NL80211_MAX_SUPP_RATES in a single array).
259 + * @NL80211_TXRATE_MCS: HT (MCS) rates allowed for TX rate selection
260 + * in an array of MCS numbers.
261 * @__NL80211_TXRATE_AFTER_LAST: internal
262 * @NL80211_TXRATE_MAX: highest TX rate attribute
263 */
264 enum nl80211_tx_rate_attributes {
265 __NL80211_TXRATE_INVALID,
266 NL80211_TXRATE_LEGACY,
267 + NL80211_TXRATE_MCS,
268
269 /* keep last */
270 __NL80211_TXRATE_AFTER_LAST,
271 @@ -2786,10 +2864,13 @@ enum nl80211_ap_sme_features {
272 * TX status to the socket error queue when requested with the
273 * socket option.
274 * @NL80211_FEATURE_HT_IBSS: This driver supports IBSS with HT datarates.
275 + * @NL80211_FEATURE_INACTIVITY_TIMER: This driver takes care of freeing up
276 + * the connected inactive stations in AP mode.
277 */
278 enum nl80211_feature_flags {
279 NL80211_FEATURE_SK_TX_STATUS = 1 << 0,
280 NL80211_FEATURE_HT_IBSS = 1 << 1,
281 + NL80211_FEATURE_INACTIVITY_TIMER = 1 << 2,
282 };
283
284 /**