1 Index: linux-2.6.23-rc6/include/linux/ieee80211.h
2 ===================================================================
3 --- linux-2.6.23-rc6.orig/include/linux/ieee80211.h 2007-09-21 16:23:52.000000000 +0800
4 +++ linux-2.6.23-rc6/include/linux/ieee80211.h 2007-09-21 16:24:07.000000000 +0800
6 } __attribute__ ((packed));
9 +struct ieee80211_ht_capability {
10 + __le16 capabilities_info;
11 + u8 mac_ht_params_info;
12 + u8 supported_mcs_set[16];
13 + __le16 extended_ht_capability_info;
14 + __le32 tx_BF_capability_info;
15 + u8 antenna_selection_info;
16 +}__attribute__ ((packed));
18 +struct ieee80211_ht_additional_info {
21 + __le16 operation_mode;
24 +}__attribute__ ((packed));
27 +#define IEEE80211_TSINFO_TYPE(a) ((a.byte1 & 0x01) >> 0)
28 +#define IEEE80211_TSINFO_TSID(a) ((a.byte1 & 0x1E) >> 1)
29 +#define IEEE80211_TSINFO_DIR(a) ((a.byte1 & 0x60) >> 5)
30 +#define IEEE80211_TSINFO_POLICY(a) ((a.byte1 & 0x80) >> 7 + \
31 + (a.byte2 & 0x01) << 1)
32 +#define IEEE80211_TSINFO_AGG(a) ((a.byte2 & 0x02) >> 1)
33 +#define IEEE80211_TSINFO_APSD(a) ((a.byte2 & 0x04) >> 2)
34 +#define IEEE80211_TSINFO_UP(a) ((a.byte2 & 0x38) >> 3)
35 +#define IEEE80211_TSINFO_ACK(a) ((a.byte2 & 0xC0) >> 6)
36 +#define IEEE80211_TSINFO_SCHEDULE(a) ((a.byte3 & 0x01) >> 0)
38 +#define IEEE80211_SET_TSINFO_TYPE(i, d) (i.byte1 |= (d << 0) & 0x01)
39 +#define IEEE80211_SET_TSINFO_TSID(i, d) (i.byte1 |= (d << 1) & 0x1E)
40 +#define IEEE80211_SET_TSINFO_DIR(i, d) (i.byte1 |= (d << 5) & 0x60)
41 +#define IEEE80211_SET_TSINFO_POLICY(i, d) \
43 + i.byte1 |= (d & 0x01) << 7; \
44 + i.byte2 |= (d & 0x02) >> 1; \
46 +#define IEEE80211_SET_TSINFO_AGG(i, d) (i.byte2 |= (d << 1) & 0x02)
47 +#define IEEE80211_SET_TSINFO_APSD(i, d) (i.byte2 |= (d << 2) & 0x04)
48 +#define IEEE80211_SET_TSINFO_UP(i, d) (i.byte2 |= (d << 3) & 0x38)
49 +#define IEEE80211_SET_TSINFO_ACK(i, d) (i.byte2 |= (d << 6) & 0xC0)
50 +#define IEEE80211_SET_TSINFO_SCHEDULE(i, d) (i.byte3 |= (d << 0) & 0x01)
52 +struct ieee80211_ts_info {
56 +} __attribute__ ((packed));
58 +struct ieee80211_elem_tspec {
59 + struct ieee80211_ts_info ts_info;
60 + __le16 nominal_msdu_size;
61 + __le16 max_msdu_size;
62 + __le32 min_service_interval;
63 + __le32 max_service_interval;
64 + __le32 inactivity_interval;
65 + __le32 suspension_interval;
66 + __le32 service_start_time;
67 + __le32 min_data_rate;
68 + __le32 mean_data_rate;
69 + __le32 peak_data_rate;
72 + __le32 min_phy_rate;
73 + __le16 surplus_band_allow;
75 +} __attribute__ ((packed));
78 struct ieee80211_mgmt {
86 + } __attribute__ ((packed)) addts_req;
92 + } __attribute__ ((packed)) addts_resp;
95 + struct ieee80211_ts_info ts_info;
97 + } __attribute__ ((packed)) delts;
103 } __attribute__ ((packed)) wme_action;
110 + /* Followed by Supported Rates and
111 + * Extended Supported Rates */
113 + } __attribute__ ((packed)) dls_req;
116 + __le16 status_code;
119 + /* Followed by Capability Information,
120 + * Supported Rates and Extended
121 + * Supported Rates */
123 + } __attribute__ ((packed)) dls_resp;
128 + __le16 reason_code;
129 + } __attribute__ ((packed)) dls_teardown;
136 } __attribute__((packed)) chan_switch;
142 + __le16 start_seq_num;
143 + } __attribute__((packed)) addba_req;
150 + } __attribute__((packed)) addba_resp;
154 + __le16 reason_code;
155 + }__attribute__((packed)) delba;
157 } __attribute__ ((packed)) action;
160 WLAN_STATUS_UNSUPP_RSN_VERSION = 44,
161 WLAN_STATUS_INVALID_RSN_IE_CAP = 45,
162 WLAN_STATUS_CIPHER_SUITE_REJECTED = 46,
164 + WLAN_STATUS_UNSPECIFIED_QOS = 32,
165 + WLAN_STATUS_ASSOC_DENIED_NOBANDWIDTH = 33,
166 + WLAN_STATUS_ASSOC_DENIED_LOWACK = 34,
167 + WLAN_STATUS_ASSOC_DENIED_UNSUPP_QOS = 35,
168 + WLAN_STATUS_REQUEST_DECLINED = 37,
169 + WLAN_STATUS_INVALID_QOS_PARAM = 38,
170 + WLAN_STATUS_CHANGE_TSPEC = 39,
171 + WLAN_STATUS_WAIT_TS_DELAY = 47,
172 + WLAN_STATUS_NO_DIRECT_LINK = 48,
173 + WLAN_STATUS_STA_NOT_PRESENT = 49,
174 + WLAN_STATUS_STA_NOT_QSTA = 50,
179 WLAN_REASON_INVALID_RSN_IE_CAP = 22,
180 WLAN_REASON_IEEE8021X_FAILED = 23,
181 WLAN_REASON_CIPHER_SUITE_REJECTED = 24,
183 + WLAN_REASON_DISASSOC_UNSPECIFIED_QOS = 32,
184 + WLAN_REASON_DISASSOC_QAP_NO_BANDWIDTH = 33,
185 + WLAN_REASON_DISASSOC_LOW_ACK = 34,
186 + WLAN_REASON_DISASSOC_QAP_EXCEED_TXOP = 35,
187 + WLAN_REASON_QSTA_LEAVE_QBSS = 36,
188 + WLAN_REASON_QSTA_NOT_USE = 37,
189 + WLAN_REASON_QSTA_REQUIRE_SETUP = 38,
190 + WLAN_REASON_QSTA_TIMEOUT = 39,
191 + WLAN_REASON_QSTA_CIPHER_NOT_SUPP = 45,
196 +enum ieee80211_category {
197 + WLAN_CATEGORY_SPECTRUM_MGMT = 0,
198 + WLAN_CATEGORY_QOS = 1,
199 + WLAN_CATEGORY_DLS = 2,
200 + WLAN_CATEGORY_BACK = 3,
201 + WLAN_CATEGORY_WMM = 17,
204 +/* QoS Action Code */
205 +enum ieee80211_qos_actioncode {
206 + WLAN_ACTION_QOS_ADDTS_REQ = 0,
207 + WLAN_ACTION_QOS_ADDTS_RESP = 1,
208 + WLAN_ACTION_QOS_DELTS = 2,
209 + WLAN_ACTION_QOS_SCHEDULE = 3,
212 +/* DLS Action Code */
213 +enum ieee80211_dls_actioncode {
214 + WLAN_ACTION_DLS_REQ = 0,
215 + WLAN_ACTION_DLS_RESP = 1,
216 + WLAN_ACTION_DLS_TEARDOWN = 2,
219 +/* BACK Action Code */
220 +enum ieee80211_back_actioncode {
221 + WLAN_ACTION_ADDBA_REQ = 0,
222 + WLAN_ACTION_ADDBA_RESP = 1,
223 + WLAN_ACTION_DELBA = 2,
226 /* Information Element IDs */
230 WLAN_EID_HP_PARAMS = 8,
231 WLAN_EID_HP_TABLE = 9,
232 WLAN_EID_REQUEST = 10,
234 + WLAN_EID_QBSS_LOAD = 11,
235 + WLAN_EID_EDCA_PARAM_SET = 12,
236 + WLAN_EID_TSPEC = 13,
237 + WLAN_EID_TCLAS = 14,
238 + WLAN_EID_SCHEDULE = 15,
239 + WLAN_EID_TS_DELAY = 43,
240 + WLAN_EID_TCLAS_PROCESSING = 44,
241 + WLAN_EID_QOS_CAPA = 46,
243 WLAN_EID_PWR_CONSTRAINT = 32,
244 WLAN_EID_PWR_CAPABILITY = 33,
247 WLAN_EID_ERP_INFO = 42,
248 WLAN_EID_EXT_SUPP_RATES = 50,
250 + WLAN_EID_HT_CAPABILITY = 45,
251 + WLAN_EID_HT_EXTRA_INFO = 61,
256 WLAN_EID_QOS_PARAMETER = 222
260 +#define IEEE80211_QOS_CONTROL_A_MSDU_PRESENT 0x0080
262 /* cipher suite selectors */
263 #define WLAN_CIPHER_SUITE_USE_GROUP 0x000FAC00
264 #define WLAN_CIPHER_SUITE_WEP40 0x000FAC01
267 #define WLAN_MAX_KEY_LEN 32
269 +enum ieee80211_tsinfo_direction {
270 + WLAN_TSINFO_UPLINK = 0,
271 + WLAN_TSINFO_DOWNLINK = 1,
272 + WLAN_TSINFO_DIRECTLINK = 2,
273 + WLAN_TSINFO_BIDIRECTIONAL = 3,
276 +enum ieee80211_tsinfo_access {
277 + WLAN_TSINFO_EDCA = 1,
278 + WLAN_TSINFO_HCCA = 2,
279 + WLAN_TSINFO_HEMM = 3,
282 +enum ieee80211_tsinfo_psb {
283 + WLAN_TSINFO_PSB_LEGACY = 0,
284 + WLAN_TSINFO_PSB_APSD = 1,
288 +/* WI-FI Alliance OUI Type and Subtype */
289 +enum wifi_oui_type {
290 + WIFI_OUI_TYPE_WPA = 1,
291 + WIFI_OUI_TYPE_WMM = 2,
292 + WIFI_OUI_TYPE_WSC = 4,
293 + WIFI_OUI_TYPE_PSD = 6,
296 +enum wifi_oui_stype_wmm {
297 + WIFI_OUI_STYPE_WMM_INFO = 0,
298 + WIFI_OUI_STYPE_WMM_PARAM = 1,
299 + WIFI_OUI_STYPE_WMM_TSPEC = 2,
302 #endif /* IEEE80211_H */
303 Index: linux-2.6.23-rc6/include/linux/nl80211.h
304 ===================================================================
305 --- linux-2.6.23-rc6.orig/include/linux/nl80211.h 2007-09-21 16:23:52.000000000 +0800
306 +++ linux-2.6.23-rc6/include/linux/nl80211.h 2007-09-21 16:24:07.000000000 +0800
311 + * enum nl80211_commands - supported nl80211 commands
312 + * @NL80211_CMD_UNSPEC: unspecified command to catch errors
313 + * @NL80211_CMD_RENAME_WIPHY: rename a wiphy, needs
314 + * %NL80211_ATTR_WIPHY and %NL80211_ATTR_WIPHY_NAME
315 + * @NL80211_CMD_WIPHY_NEWNAME: rename notification
316 + * @NL80211_CMD_GET_CMDLIST: TO BE DEFINED PROPERLY. currently the code makes
317 + * it depend on the wiphy only but it really should depend on the
318 + * interface type too....
319 + * @NL80211_CMD_NEW_CMDLIST: command list result
320 + * @NL80211_CMD_ADD_VIRTUAL_INTERFACE: create a virtual interface for the
321 + * wiphy identified by an %NL80211_ATTR_WIPHY attribute with the given
322 + * %NL80211_ATTR_IFTYPE and %NL80211_ATTR_IFNAME.
323 + * @NL80211_CMD_DEL_VIRTUAL_INTERFACE: destroy a virtual interface identified
324 + * by %NL80211_ATTR_IFINDEX.
325 + * @NL80211_CMD_CHANGE_VIRTUAL_INTERFACE: change type of virtual interface to
326 + * the type given by %NL80211_ATTR_IFTYPE, the interface is identified by
327 + * %NL80211_ATTR_IFINDEX.
328 + * @NL80211_CMD_GET_WIPHYS: request a list of all wiphys present in the system
329 + * @NL80211_CMD_NEW_WIPHYS: returned list of all wiphys
330 + * @NL80211_CMD_GET_INTERFACES: request a list of all interfaces belonging to
331 + * the wiphy identified by %NL80211_ATTR_WIPHY
332 + * @NL80211_CMD_NEW_INTERFACES: result for %NL80211_CMD_GET_INTERFACES
333 + * @NL80211_CMD_INITIATE_SCAN: initiate a scan with the passed parameters. THe
334 + * parameters may contain %NL80211_ATTR_FLAG_SCAN_ACTIVE,
335 + * %NL80211_ATTR_PHYMODE and a list of channels in an
336 + * %NL80211_ATTR_CHANNEL_LIST attribute (an array of nested attributes)
337 + * containing %NL80211_ATTR_CHANNEL, %NL80211_ATTR_PHYMODE, and possibly
338 + * %NL80211_ATTR_FLAG_SCAN_ACTIVE. The outer %NL80211_ATTR_FLAG_SCAN_ACTIVE
339 + * is ignored when a channel list is present.
340 + * @NL80211_CMD_SCAN_RESULT: scan result, contains an array in
341 + * %NL80211_ATTR_BSS_LIST.
342 + * @NL80211_CMD_ASSOCIATE: associate with the given parameters
343 + * (%NL80211_ATTR_SSID is mandatory, %NL80211_ATTR_TIMEOUT_TU,
344 + * %NL80211_ATTR_BSSID, %NL80211_ATTR_CHANNEL, %NL80211_ATTR_PHYMODE,
345 + * and %NL80211_ATTR_IE may be given)
346 + * @NL80211_CMD_ADD_KEY: add a key with given %NL80211_ATTR_KEY_DATA,
347 + * %NL80211_ATTR_KEY_ID, %NL80211_ATTR_KEY_TYPE, %NL80211_ATTR_MAC and
348 + * %NL80211_ATTR_KEY_CIPHER attributes.
349 + * @NL80211_CMD_DEL_KEY: delete a key identified by %NL80211_ATTR_KEY_ID,
350 + * %NL80211_ATTR_KEY_TYPE and %NL80211_ATTR_MAC or all keys.
351 + * @__NL80211_CMD_AFTER_LAST: internal use
353 +enum nl80211_commands {
354 +/* don't change the order or add anything inbetween, this is ABI! */
355 + NL80211_CMD_UNSPEC,
356 + /* %input: wiphy, wiphy_name */
357 + NL80211_CMD_RENAME_WIPHY,
358 + NL80211_CMD_WIPHY_NEWNAME,
359 + /* %input: wiphy|ifindex */
360 + NL80211_CMD_GET_CMDLIST,
361 + NL80211_CMD_NEW_CMDLIST,
362 + /* %input: wiphy, ifname, {iftype} */
363 + NL80211_CMD_ADD_VIRTUAL_INTERFACE,
364 + /* %input: wiphy, ifindex */
365 + NL80211_CMD_DEL_VIRTUAL_INTERFACE,
366 + /* %input: ifindex, iftype */
367 + NL80211_CMD_CHANGE_VIRTUAL_INTERFACE,
369 + NL80211_CMD_GET_WIPHYS,
370 + NL80211_CMD_NEW_WIPHYS,
371 + /* %input: wiphy */
372 + NL80211_CMD_GET_INTERFACES,
373 + NL80211_CMD_NEW_INTERFACES,
374 + NL80211_CMD_INITIATE_SCAN,
375 + NL80211_CMD_SCAN_RESULT,
376 + NL80211_CMD_GET_ASSOCIATION,
377 + NL80211_CMD_ASSOCIATION_CHANGED,
378 + NL80211_CMD_ASSOCIATE,
379 + NL80211_CMD_DISASSOCIATE,
380 + NL80211_CMD_DEAUTH,
381 + NL80211_CMD_GET_AUTH_LIST,
382 + NL80211_CMD_NEW_AUTH_LIST,
383 + NL80211_CMD_AUTHENTICATION_CHANGED,
384 + NL80211_CMD_AP_SET_BEACON,
385 + NL80211_CMD_AP_ADD_STA,
386 + NL80211_CMD_AP_UPDATE_STA,
387 + NL80211_CMD_AP_GET_STA_INFO,
388 + NL80211_CMD_AP_SET_RATESETS,
389 + NL80211_CMD_ADD_KEY,
390 + NL80211_CMD_DEL_KEY,
392 + /* add commands here */
394 + /* used to define NL80211_CMD_MAX below */
395 + __NL80211_CMD_AFTER_LAST
397 +#define NL80211_CMD_MAX (__NL80211_CMD_AFTER_LAST - 1)
401 + * enum nl80211_attrs - nl80211 netlink attributes
402 + * @NL80211_ATTR_UNSPEC: unspecified attribute to catch errors
403 + * @NL80211_ATTR_IFINDEX: network interface index of the device to operate on
404 + * @NL80211_ATTR_IFNAME: network interface name
405 + * @NL80211_ATTR_WIPHY: index of wiphy to operate on, cf.
406 + * /sys/class/ieee80211/<phyname>/index
407 + * @NL80211_ATTR_WIPHY_NAME: wiphy name (used for renaming)
408 + * @NL80211_ATTR_CMDS: list of u8's identifying commands a device supports
409 + * @NL80211_ATTR_IFTYPE: type of virtual interface, see &enum nl80211_iftype
410 + * @NL80211_ATTR_INTERFACE_LIST: interface array, nested netlink attribute
411 + * @NL80211_ATTR_WIPHY_LIST: wiphy array, nested netlink attribute
412 + * @NL80211_ATTR_BSSID: BSSID (must be 6 bytes)
413 + * @NL80211_ATTR_SSID: SSID (1-32 bytes)
414 + * @NL80211_ATTR_CHANNEL: channel number
415 + * @NL80211_ATTR_PHYMODE: PHY mode, see &enum nl80211_phymode
416 + * @NL80211_ATTR_CHANNEL_LIST: netlink nested attribute array containing scan
417 + * parameters for channels
418 + * @NL80211_ATTR_BSS_LIST: nested attribute containing an array
419 + * @NL80211_ATTR_BSSTYPE: BSS type, see &enum nl80211_bsstype
420 + * @NL80211_ATTR_BEACON_PERIOD: beacon period
421 + * @NL80211_ATTR_DTIM_PERIOD: DTIM period
422 + * @NL80211_ATTR_TIMESTAMP: 64-bit timestamp of received beacon/probe response
423 + * @NL80211_ATTR_IE: information element(s), maximum length %NL80211_MAX_IE_LEN
424 + * @NL80211_ATTR_AUTH_ALGORITHM: authentication algorithm
425 + * @NL80211_ATTR_TIMEOUT_TU: timeout in TU (TO BE USED)
426 + * @NL80211_ATTR_REASON_CODE: 802.11 reason code
427 + * @NL80211_ATTR_ASSOCIATION_ID: association ID (u16, 1-2007)
428 + * @NL80211_ATTR_DEAUTHENTICATED: TO BE USED
429 + * @NL80211_ATTR_RX_SENSITIVITY: receiver sensitivity in dBm
430 + * @NL80211_ATTR_TRANSMIT_POWER: transmit power in mW
431 + * @NL80211_ATTR_FRAG_THRESHOLD: fragmentation threshold (bytes)
432 + * @NL80211_ATTR_FLAG_SCAN_ACTIVE: netlink flag indiciating active scan
433 + * @NL80211_ATTR_KEY_DATA: temporal key data
434 + * @NL80211_ATTR_KEY_ID: key ID (u8, 0-3)
435 + * @NL80211_ATTR_KEY_TYPE: key type (see &enum nl80211_keytype)
436 + * @NL80211_ATTR_MAC: MAC address
437 + * @NL80211_ATTR_KEY_CIPHER: key cipher suite (u32)
438 + * @__NL80211_ATTR_AFTER_LAST: internal use
440 +enum nl80211_attrs {
441 +/* don't change the order or add anything inbetween, this is ABI! */
442 + NL80211_ATTR_UNSPEC,
444 + NL80211_ATTR_IFINDEX,
445 + /* %type: nulstring */
446 + NL80211_ATTR_IFNAME,
448 + NL80211_ATTR_WIPHY,
449 + /* %type: nulstring */
450 + NL80211_ATTR_WIPHY_NAME,
453 + NL80211_ATTR_IFTYPE,
454 + NL80211_ATTR_INTERFACE_LIST,
455 + NL80211_ATTR_WIPHY_LIST,
456 + NL80211_ATTR_BSSID,
458 + NL80211_ATTR_CHANNEL,
459 + NL80211_ATTR_PHYMODE,
460 + NL80211_ATTR_CHANNEL_LIST,
461 + NL80211_ATTR_BSS_LIST,
462 + NL80211_ATTR_BSSTYPE,
463 + NL80211_ATTR_BEACON_PERIOD,
464 + NL80211_ATTR_DTIM_PERIOD,
465 + NL80211_ATTR_TIMESTAMP,
467 + NL80211_ATTR_AUTH_ALGORITHM,
468 + NL80211_ATTR_TIMEOUT_TU,
469 + NL80211_ATTR_REASON_CODE,
470 + NL80211_ATTR_ASSOCIATION_ID,
471 + NL80211_ATTR_DEAUTHENTICATED,
472 + NL80211_ATTR_RX_SENSITIVITY,
473 + NL80211_ATTR_TRANSMIT_POWER,
474 + NL80211_ATTR_FRAG_THRESHOLD,
475 + NL80211_ATTR_FLAG_SCAN_ACTIVE,
477 + NL80211_ATTR_KEY_DATA,
478 + NL80211_ATTR_KEY_ID,
479 + NL80211_ATTR_KEY_TYPE,
481 + NL80211_ATTR_KEY_CIPHER,
483 + NL80211_ATTR_BEACON_HEAD,
484 + NL80211_ATTR_BEACON_TAIL,
486 + /* add attributes here, update the policy in nl80211.c */
488 + /* used to define NL80211_ATTR_MAX below */
489 + __NL80211_ATTR_AFTER_LAST,
491 +#define NL80211_ATTR_MAX (__NL80211_ATTR_AFTER_LAST - 1)
494 + * enum nl80211_multicast_groups - multicast groups for nl80211
495 + * @NL80211_GROUP_CONFIG: members of this group are notified of
496 + * configuration changes
498 +enum nl80211_multicast_groups {
499 + /* be notified of configuration changes like wiphy renames */
500 + NL80211_GROUP_CONFIG,
502 + /* add groups here */
505 + __NL80211_GROUP_AFTER_LAST
507 +#define NL80211_GROUP_MAX (__NL80211_GROUP_AFTER_LAST - 1)
510 + * maximum length of IE(s) passed in an NL80211_ATTR_IE.
511 + * this is an arbitrary limit, 774 means three full-length
512 + * IEs would fit... increase if necessary */
513 +#define NL80211_MAX_IE_LEN 774
516 + * maximum number of items in an ATTR_CHANNEL_LIST,
517 + * just to avoid too large allocations
519 +#define NL80211_MAX_CHANNEL_LIST_ITEM 200
522 * enum nl80211_iftype - (virtual) interface types
523 * @NL80211_IFTYPE_UNSPECIFIED: unspecified type, driver decides
524 * @NL80211_IFTYPE_ADHOC: independent BSS member
527 #define NL80211_IFTYPE_MAX (__NL80211_IFTYPE_AFTER_LAST - 1)
530 + * enum nl80211_phymode - PHY modes
531 + * @NL80211_PHYMODE_A: 5 GHz PHY
532 + * @NL80211_PHYMODE_B: 2.4 GHz PHY (B mode)
533 + * @NL80211_PHYMODE_G: 2.4 GHz PHY (G, compatible with B)
534 + * @__NL80211_PHYMODE_AFTER_LAST: internal use
536 + * These values are used for %NL80211_ATTR_PHYMODE.
538 +enum nl80211_phymode {
544 + __NL80211_PHYMODE_AFTER_LAST
546 +#define NL80211_PHYMODE_MAX (__NL80211_PHYMODE_AFTER_LAST - 1)
549 + * enum nl80211_bsstype - BSS types
550 + * @NL80211_BSSTYPE_INFRASTRUCTURE: infrastructure BSS
551 + * @NL80211_BSSTYPE_INDEPENDENT: independent BSS (ad-hoc network)
552 + * @__NL80211_BSSTYPE_AFTER_LAST: internal use
554 + * These values are used for %NL80211_ATTR_BSSTYPE.
556 +enum nl80211_bsstype {
557 + NL80211_BSSTYPE_INFRASTRUCTURE,
558 + NL80211_BSSTYPE_INDEPENDENT,
561 + __NL80211_BSSTYPE_AFTER_LAST
563 +#define NL80211_BSSTYPE_MAX (__NL80211_BSSTYPE_AFTER_LAST - 1)
566 + * enum nl80211_keytype - key types
567 + * @NL80211_KEYTYPE_GROUP: group key
568 + * @NL80211_KEYTYPE_PAIRWISE: pairwise key
569 + * @NL80211_KEYTYPE_PEER: peer key
571 +enum nl80211_keytype {
572 + NL80211_KEYTYPE_GROUP,
573 + NL80211_KEYTYPE_PAIRWISE,
574 + NL80211_KEYTYPE_PEER,
577 + __NL80211_KEYTYPE_AFTER_LAST
579 +#define NL80211_KEYTYPE_MAX (__NL80211_KEYTYPE_AFTER_LAST - 1)
581 #endif /* __LINUX_NL80211_H */
582 Index: linux-2.6.23-rc6/include/net/cfg80211.h
583 ===================================================================
584 --- linux-2.6.23-rc6.orig/include/net/cfg80211.h 2007-09-21 16:23:52.000000000 +0800
585 +++ linux-2.6.23-rc6/include/net/cfg80211.h 2007-09-21 16:24:07.000000000 +0800
588 #include <linux/netlink.h>
589 #include <linux/skbuff.h>
590 +#include <linux/nl80211.h>
591 #include <net/genetlink.h>
595 struct ieee80211_radiotap_iterator *iterator);
599 + * struct scan_channel - describes a single channel to scan
600 + * @phymode: PHY mode for this channel
601 + * @channel: channel number (1-14, ...)
602 + * @active: scan actively or passively on this channel
604 +struct scan_channel {
605 + enum nl80211_phymode phymode;
611 + * struct scan_params - describes scan parameters
612 + * @n_channels: number of items in @channels array or -1 to indicate all
613 + * channels should be scanned (in that case @channels will be %NULL)
614 + * @active: when n_channels is -1 this determines active/passive scanning.
615 + * @phymode: when n_channels is -1 this determines PHY mode to scan. It is
616 + * not possible to scan different PHY modes in one request w/o giving
618 + * @channels: array containing @n_channels &struct scan_channel items
620 +struct scan_params {
623 + enum nl80211_phymode phymode;
624 + struct scan_channel *channels;
628 + * struct association_params - describes association parameters
629 + * @valid: this member contains flags which items are valid
630 + * @bssid: the BSSID of the BSS to associate [%ASSOC_PARAMS_BSSID]
631 + * @timeout: timeout (in TU) [%ASSOC_PARAMS_TIMEOUT]
632 + * @ie: information element(s) to include in the association frames [%ASSOC_PARAMS_IE]
633 + * @ie_len: length of the information element(s)
634 + * @ssid: the SSID, always valid.
635 + * @ssid_len: length of the SSID
637 +struct association_params {
645 + unsigned int valid;
647 +#define ASSOC_PARAMS_TIMEOUT (1<<0)
650 + * struct key_params - key information
661 /* from net/wireless.h */
665 * @add_virtual_intf: create a new virtual interface with the given name
667 * @del_virtual_intf: remove the virtual interface determined by ifindex.
669 + * @change_virtual_intf: change type of virtual interface
671 + * @associate: associate with given parameters
673 + * @disassociate: disassociate from current AP
675 + * @deauth: deauth from current AP
677 + * @initiate_scan: scan with the given information (see &struct scan_params above)
679 + * @get_association: get BSSID of the BSS that the device is currently
680 + * associated to and return 1, or return 0 if not
681 + * associated (or a negative error code)
682 + * @get_auth_list: get list of BSSIDs of all BSSs the device has
683 + * authenticated with, must call next_bssid for each,
684 + * next_bssid returns non-zero on error, the given data
685 + * is to be passed to that callback
686 + * @add_key: add a key using &struct key_params
687 + * @del_key: delete a key using info from &struct key_params
689 struct cfg80211_ops {
690 int (*add_virtual_intf)(struct wiphy *wiphy, char *name,
691 - unsigned int type);
692 + enum nl80211_iftype type);
693 int (*del_virtual_intf)(struct wiphy *wiphy, int ifindex);
694 + int (*change_virtual_intf)(struct wiphy *wiphy, int ifindex,
695 + enum nl80211_iftype type);
697 + int (*associate)(struct wiphy *wiphy, struct net_device *dev,
698 + struct association_params *params);
699 + int (*disassociate)(struct wiphy *wiphy, struct net_device *dev);
700 + int (*deauth)(struct wiphy *wiphy, struct net_device *dev);
703 + int (*initiate_scan)(struct wiphy *wiphy, struct net_device *dev,
704 + struct scan_params *params);
707 + int (*get_association)(struct wiphy *wiphy, struct net_device *dev,
710 + int (*get_auth_list)(struct wiphy *wiphy, struct net_device *dev,
712 + int (*next_bssid)(void *data, u8 *bssid));
714 + int (*add_key)(struct wiphy *wiphy, struct net_device *dev,
715 + struct key_params *params);
716 + int (*del_key)(struct wiphy *wiphy, struct net_device *dev,
717 + struct key_params *params);
721 +/* helper functions specific to nl80211 */
722 +extern void *nl80211hdr_put(struct sk_buff *skb, u32 pid,
723 + u32 seq, int flags, u8 cmd);
724 +extern void *nl80211msg_new(struct sk_buff **skb, u32 pid,
725 + u32 seq, int flags, u8 cmd);
727 #endif /* __NET_CFG80211_H */
728 Index: linux-2.6.23-rc6/include/net/iw_handler.h
729 ===================================================================
730 --- linux-2.6.23-rc6.orig/include/net/iw_handler.h 2007-09-21 16:23:52.000000000 +0800
731 +++ linux-2.6.23-rc6/include/net/iw_handler.h 2007-09-21 16:24:07.000000000 +0800
733 * Those may be called only within the kernel.
736 -/* functions that may be called by driver modules */
737 +/* First : function strictly used inside the kernel */
739 +/* Handle /proc/net/wireless, called in net/code/dev.c */
740 +extern int dev_get_wireless_info(char * buffer, char **start, off_t offset,
743 +/* Second : functions that may be called by driver modules */
745 /* Send a single event to user space */
746 extern void wireless_send_event(struct net_device * dev,
747 Index: linux-2.6.23-rc6/include/net/mac80211.h
748 ===================================================================
749 --- linux-2.6.23-rc6.orig/include/net/mac80211.h 2007-09-21 16:23:52.000000000 +0800
750 +++ linux-2.6.23-rc6/include/net/mac80211.h 2007-09-21 16:24:07.000000000 +0800
752 /* Following five fields are used for IEEE 802.11H */
753 unsigned int radar_detect;
754 unsigned int spect_mgmt;
755 - /* All following fields are currently unused. */
756 unsigned int quiet_duration; /* duration of quiet period */
757 unsigned int quiet_offset; /* how far into the beacon is the quiet
760 * per-packet RC4 key with each TX frame when doing hwcrypto */
761 #define IEEE80211_HW_TKIP_REQ_PHASE2_KEY (1<<14)
763 + /* The device capable of supporting 11n */
764 +#define IEEE80211_HW_SUPPORT_HT_MODE (1<<15)
766 u32 flags; /* hardware flags defined above */
768 /* Set to the size of a needed device specific skb headroom for TX skbs. */
770 * used if the wlan hardware or low-level driver implements PAE.
771 * 80211.o module will anyway filter frames based on authorization
772 * state, so this function pointer can be NULL if low-level driver does
773 - * not require event notification about port state changes.
774 - * Currently unused. */
775 + * not require event notification about port state changes. */
776 int (*set_port_auth)(struct ieee80211_hw *hw, u8 *addr,
780 /* Get statistics of the current TX queue status. This is used to get
781 * number of currently queued packets (queue length), maximum queue
782 * size (limit), and total number of packets sent using each TX queue
784 - * Currently unused. */
785 + * (count). This information is used for WMM to find out which TX
786 + * queues have room for more packets and by hostapd to provide
787 + * statistics about the current queueing state to external programs. */
788 int (*get_tx_stats)(struct ieee80211_hw *hw,
789 struct ieee80211_tx_queue_stats *stats);
791 @@ -713,12 +715,25 @@
793 u64 (*get_tsf)(struct ieee80211_hw *hw);
795 + /* Call low level driver with 11n Block Ack action */
796 + int (*handle_ba_action)(struct ieee80211_hw *hw,
797 + struct ieee80211_mgmt *mgmt);
799 /* Reset the TSF timer and allow firmware/hardware to synchronize with
800 * other STAs in the IBSS. This is only used in IBSS mode. This
801 * function is optional if the firmware/hardware takes full care of
802 * TSF synchronization. */
803 void (*reset_tsf)(struct ieee80211_hw *hw);
805 + /* Configure ht parameters. */
806 + int (*conf_ht)(struct ieee80211_hw *hw,
807 + struct ieee80211_ht_capability *ht_cap_param,
808 + struct ieee80211_ht_additional_info *ht_extra_param);
810 + /* Get ht capabilities from the device */
811 + void (*get_ht_capab)(struct ieee80211_hw *hw,
812 + struct ieee80211_ht_capability *ht_cap_param);
814 /* Setup beacon data for IBSS beacons. Unlike access point (Master),
815 * IBSS uses a fixed beacon frame which is configured using this
816 * function. This handler is required only for IBSS mode. */