diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-25 11:41:20 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-03-25 11:41:20 -0400 |
commit | 7bf7e370d5919112c223a269462cd0b546903829 (patch) | |
tree | 03ccc715239df14ae168277dbccc9d9cf4d8a2c8 /drivers/net/wireless/wl12xx/cmd.h | |
parent | 68b1a1e786f29c900fa1c516a402e24f0ece622a (diff) | |
parent | d39dd11c3e6a7af5c20bfac40594db36cf270f42 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus-1
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6: (9356 commits)
[media] rc: update for bitop name changes
fs: simplify iget & friends
fs: pull inode->i_lock up out of writeback_single_inode
fs: rename inode_lock to inode_hash_lock
fs: move i_wb_list out from under inode_lock
fs: move i_sb_list out from under inode_lock
fs: remove inode_lock from iput_final and prune_icache
fs: Lock the inode LRU list separately
fs: factor inode disposal
fs: protect inode->i_state with inode->i_lock
lib, arch: add filter argument to show_mem and fix private implementations
SLUB: Write to per cpu data when allocating it
slub: Fix debugobjects with lockless fastpath
autofs4: Do not potentially dereference NULL pointer returned by fget() in autofs_dev_ioctl_setpipefd()
autofs4 - remove autofs4_lock
autofs4 - fix d_manage() return on rcu-walk
autofs4 - fix autofs4_expire_indirect() traversal
autofs4 - fix dentry leak in autofs4_expire_direct()
autofs4 - reinstate last used update on access
vfs - check non-mountpoint dentry might block in __follow_mount_rcu()
...
NOTE!
This merge commit was created to fix compilation error. The block
tree was merged upstream and removed the 'elv_queue_empty()'
function which the new 'mtdswap' driver is using. So a simple
merge of the mtd tree with upstream does not compile. And the
mtd tree has already be published, so re-basing it is not an option.
To fix this unfortunate situation, I had to merge upstream into the
mtd-2.6.git tree without committing, put the fixup patch on top of
this, and then commit this. The result is that we do not have commits
which do not compile.
In other words, this merge commit "merges" 3 things: the MTD tree, the
upstream tree, and the fixup patch.
Diffstat (limited to 'drivers/net/wireless/wl12xx/cmd.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/cmd.h | 161 |
1 files changed, 145 insertions, 16 deletions
diff --git a/drivers/net/wireless/wl12xx/cmd.h b/drivers/net/wireless/wl12xx/cmd.h index 2a1d9db7ceb8..54c12e71417e 100644 --- a/drivers/net/wireless/wl12xx/cmd.h +++ b/drivers/net/wireless/wl12xx/cmd.h | |||
@@ -39,7 +39,7 @@ int wl1271_cmd_test(struct wl1271 *wl, void *buf, size_t buf_len, u8 answer); | |||
39 | int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len); | 39 | int wl1271_cmd_interrogate(struct wl1271 *wl, u16 id, void *buf, size_t len); |
40 | int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len); | 40 | int wl1271_cmd_configure(struct wl1271 *wl, u16 id, void *buf, size_t len); |
41 | int wl1271_cmd_data_path(struct wl1271 *wl, bool enable); | 41 | int wl1271_cmd_data_path(struct wl1271 *wl, bool enable); |
42 | int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode, u32 rates, bool send); | 42 | int wl1271_cmd_ps_mode(struct wl1271 *wl, u8 ps_mode); |
43 | int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer, | 43 | int wl1271_cmd_read_memory(struct wl1271 *wl, u32 addr, void *answer, |
44 | size_t len); | 44 | size_t len); |
45 | int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id, | 45 | int wl1271_cmd_template_set(struct wl1271 *wl, u16 template_id, |
@@ -54,12 +54,20 @@ struct sk_buff *wl1271_cmd_build_ap_probe_req(struct wl1271 *wl, | |||
54 | int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, __be32 ip_addr); | 54 | int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, __be32 ip_addr); |
55 | int wl1271_build_qos_null_data(struct wl1271 *wl); | 55 | int wl1271_build_qos_null_data(struct wl1271 *wl); |
56 | int wl1271_cmd_build_klv_null_data(struct wl1271 *wl); | 56 | int wl1271_cmd_build_klv_null_data(struct wl1271 *wl); |
57 | int wl1271_cmd_set_default_wep_key(struct wl1271 *wl, u8 id); | 57 | int wl1271_cmd_set_sta_default_wep_key(struct wl1271 *wl, u8 id); |
58 | int wl1271_cmd_set_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type, | 58 | int wl1271_cmd_set_ap_default_wep_key(struct wl1271 *wl, u8 id); |
59 | u8 key_size, const u8 *key, const u8 *addr, | 59 | int wl1271_cmd_set_sta_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type, |
60 | u32 tx_seq_32, u16 tx_seq_16); | 60 | u8 key_size, const u8 *key, const u8 *addr, |
61 | u32 tx_seq_32, u16 tx_seq_16); | ||
62 | int wl1271_cmd_set_ap_key(struct wl1271 *wl, u16 action, u8 id, u8 key_type, | ||
63 | u8 key_size, const u8 *key, u8 hlid, u32 tx_seq_32, | ||
64 | u16 tx_seq_16); | ||
61 | int wl1271_cmd_disconnect(struct wl1271 *wl); | 65 | int wl1271_cmd_disconnect(struct wl1271 *wl); |
62 | int wl1271_cmd_set_sta_state(struct wl1271 *wl); | 66 | int wl1271_cmd_set_sta_state(struct wl1271 *wl); |
67 | int wl1271_cmd_start_bss(struct wl1271 *wl); | ||
68 | int wl1271_cmd_stop_bss(struct wl1271 *wl); | ||
69 | int wl1271_cmd_add_sta(struct wl1271 *wl, struct ieee80211_sta *sta, u8 hlid); | ||
70 | int wl1271_cmd_remove_sta(struct wl1271 *wl, u8 hlid); | ||
63 | 71 | ||
64 | enum wl1271_commands { | 72 | enum wl1271_commands { |
65 | CMD_INTERROGATE = 1, /*use this to read information elements*/ | 73 | CMD_INTERROGATE = 1, /*use this to read information elements*/ |
@@ -98,6 +106,12 @@ enum wl1271_commands { | |||
98 | CMD_STOP_PERIODIC_SCAN = 51, | 106 | CMD_STOP_PERIODIC_SCAN = 51, |
99 | CMD_SET_STA_STATE = 52, | 107 | CMD_SET_STA_STATE = 52, |
100 | 108 | ||
109 | /* AP mode commands */ | ||
110 | CMD_BSS_START = 60, | ||
111 | CMD_BSS_STOP = 61, | ||
112 | CMD_ADD_STA = 62, | ||
113 | CMD_REMOVE_STA = 63, | ||
114 | |||
101 | NUM_COMMANDS, | 115 | NUM_COMMANDS, |
102 | MAX_COMMAND_ID = 0xFFFF, | 116 | MAX_COMMAND_ID = 0xFFFF, |
103 | }; | 117 | }; |
@@ -126,6 +140,14 @@ enum cmd_templ { | |||
126 | * For CTS-to-self (FastCTS) mechanism | 140 | * For CTS-to-self (FastCTS) mechanism |
127 | * for BT/WLAN coexistence (SoftGemini). */ | 141 | * for BT/WLAN coexistence (SoftGemini). */ |
128 | CMD_TEMPL_ARP_RSP, | 142 | CMD_TEMPL_ARP_RSP, |
143 | CMD_TEMPL_LINK_MEASUREMENT_REPORT, | ||
144 | |||
145 | /* AP-mode specific */ | ||
146 | CMD_TEMPL_AP_BEACON = 13, | ||
147 | CMD_TEMPL_AP_PROBE_RESPONSE, | ||
148 | CMD_TEMPL_AP_ARP_RSP, | ||
149 | CMD_TEMPL_DEAUTH_AP, | ||
150 | |||
129 | CMD_TEMPL_MAX = 0xff | 151 | CMD_TEMPL_MAX = 0xff |
130 | }; | 152 | }; |
131 | 153 | ||
@@ -195,6 +217,7 @@ struct wl1271_cmd_join { | |||
195 | * ACK or CTS frames). | 217 | * ACK or CTS frames). |
196 | */ | 218 | */ |
197 | __le32 basic_rate_set; | 219 | __le32 basic_rate_set; |
220 | __le32 supported_rate_set; | ||
198 | u8 dtim_interval; | 221 | u8 dtim_interval; |
199 | /* | 222 | /* |
200 | * bits 0-2: This bitwise field specifies the type | 223 | * bits 0-2: This bitwise field specifies the type |
@@ -257,20 +280,11 @@ struct wl1271_cmd_ps_params { | |||
257 | struct wl1271_cmd_header header; | 280 | struct wl1271_cmd_header header; |
258 | 281 | ||
259 | u8 ps_mode; /* STATION_* */ | 282 | u8 ps_mode; /* STATION_* */ |
260 | u8 send_null_data; /* Do we have to send NULL data packet ? */ | 283 | u8 padding[3]; |
261 | u8 retries; /* Number of retires for the initial NULL data packet */ | ||
262 | |||
263 | /* | ||
264 | * TUs during which the target stays awake after switching | ||
265 | * to power save mode. | ||
266 | */ | ||
267 | u8 hang_over_period; | ||
268 | __le32 null_data_rate; | ||
269 | } __packed; | 284 | } __packed; |
270 | 285 | ||
271 | /* HW encryption keys */ | 286 | /* HW encryption keys */ |
272 | #define NUM_ACCESS_CATEGORIES_COPY 4 | 287 | #define NUM_ACCESS_CATEGORIES_COPY 4 |
273 | #define MAX_KEY_SIZE 32 | ||
274 | 288 | ||
275 | enum wl1271_cmd_key_action { | 289 | enum wl1271_cmd_key_action { |
276 | KEY_ADD_OR_REPLACE = 1, | 290 | KEY_ADD_OR_REPLACE = 1, |
@@ -289,7 +303,7 @@ enum wl1271_cmd_key_type { | |||
289 | 303 | ||
290 | /* FIXME: Add description for key-types */ | 304 | /* FIXME: Add description for key-types */ |
291 | 305 | ||
292 | struct wl1271_cmd_set_keys { | 306 | struct wl1271_cmd_set_sta_keys { |
293 | struct wl1271_cmd_header header; | 307 | struct wl1271_cmd_header header; |
294 | 308 | ||
295 | /* Ignored for default WEP key */ | 309 | /* Ignored for default WEP key */ |
@@ -318,6 +332,57 @@ struct wl1271_cmd_set_keys { | |||
318 | __le32 ac_seq_num32[NUM_ACCESS_CATEGORIES_COPY]; | 332 | __le32 ac_seq_num32[NUM_ACCESS_CATEGORIES_COPY]; |
319 | } __packed; | 333 | } __packed; |
320 | 334 | ||
335 | enum wl1271_cmd_lid_key_type { | ||
336 | UNICAST_LID_TYPE = 0, | ||
337 | BROADCAST_LID_TYPE = 1, | ||
338 | WEP_DEFAULT_LID_TYPE = 2 | ||
339 | }; | ||
340 | |||
341 | struct wl1271_cmd_set_ap_keys { | ||
342 | struct wl1271_cmd_header header; | ||
343 | |||
344 | /* | ||
345 | * Indicates whether the HLID is a unicast key set | ||
346 | * or broadcast key set. A special value 0xFF is | ||
347 | * used to indicate that the HLID is on WEP-default | ||
348 | * (multi-hlids). of type wl1271_cmd_lid_key_type. | ||
349 | */ | ||
350 | u8 hlid; | ||
351 | |||
352 | /* | ||
353 | * In WEP-default network (hlid == 0xFF) used to | ||
354 | * indicate which network STA/IBSS/AP role should be | ||
355 | * changed | ||
356 | */ | ||
357 | u8 lid_key_type; | ||
358 | |||
359 | /* | ||
360 | * Key ID - For TKIP and AES key types, this field | ||
361 | * indicates the value that should be inserted into | ||
362 | * the KeyID field of frames transmitted using this | ||
363 | * key entry. For broadcast keys the index use as a | ||
364 | * marker for TX/RX key. | ||
365 | * For WEP default network (HLID=0xFF), this field | ||
366 | * indicates the ID of the key to add or remove. | ||
367 | */ | ||
368 | u8 key_id; | ||
369 | u8 reserved_1; | ||
370 | |||
371 | /* key_action_e */ | ||
372 | __le16 key_action; | ||
373 | |||
374 | /* key size in bytes */ | ||
375 | u8 key_size; | ||
376 | |||
377 | /* key_type_e */ | ||
378 | u8 key_type; | ||
379 | |||
380 | /* This field holds the security key data to add to the STA table */ | ||
381 | u8 key[MAX_KEY_SIZE]; | ||
382 | __le16 ac_seq_num16[NUM_ACCESS_CATEGORIES_COPY]; | ||
383 | __le32 ac_seq_num32[NUM_ACCESS_CATEGORIES_COPY]; | ||
384 | } __packed; | ||
385 | |||
321 | struct wl1271_cmd_test_header { | 386 | struct wl1271_cmd_test_header { |
322 | u8 id; | 387 | u8 id; |
323 | u8 padding[3]; | 388 | u8 padding[3]; |
@@ -412,4 +477,68 @@ struct wl1271_cmd_set_sta_state { | |||
412 | u8 padding[3]; | 477 | u8 padding[3]; |
413 | } __packed; | 478 | } __packed; |
414 | 479 | ||
480 | enum wl1271_ssid_type { | ||
481 | SSID_TYPE_PUBLIC = 0, | ||
482 | SSID_TYPE_HIDDEN = 1 | ||
483 | }; | ||
484 | |||
485 | struct wl1271_cmd_bss_start { | ||
486 | struct wl1271_cmd_header header; | ||
487 | |||
488 | /* wl1271_ssid_type */ | ||
489 | u8 ssid_type; | ||
490 | u8 ssid_len; | ||
491 | u8 ssid[IW_ESSID_MAX_SIZE]; | ||
492 | u8 padding_1[2]; | ||
493 | |||
494 | /* Basic rate set */ | ||
495 | __le32 basic_rate_set; | ||
496 | /* Aging period in seconds*/ | ||
497 | __le16 aging_period; | ||
498 | |||
499 | /* | ||
500 | * This field specifies the time between target beacon | ||
501 | * transmission times (TBTTs), in time units (TUs). | ||
502 | * Valid values are 1 to 1024. | ||
503 | */ | ||
504 | __le16 beacon_interval; | ||
505 | u8 bssid[ETH_ALEN]; | ||
506 | u8 bss_index; | ||
507 | /* Radio band */ | ||
508 | u8 band; | ||
509 | u8 channel; | ||
510 | /* The host link id for the AP's global queue */ | ||
511 | u8 global_hlid; | ||
512 | /* The host link id for the AP's broadcast queue */ | ||
513 | u8 broadcast_hlid; | ||
514 | /* DTIM count */ | ||
515 | u8 dtim_interval; | ||
516 | /* Beacon expiry time in ms */ | ||
517 | u8 beacon_expiry; | ||
518 | u8 padding_2[3]; | ||
519 | } __packed; | ||
520 | |||
521 | struct wl1271_cmd_add_sta { | ||
522 | struct wl1271_cmd_header header; | ||
523 | |||
524 | u8 addr[ETH_ALEN]; | ||
525 | u8 hlid; | ||
526 | u8 aid; | ||
527 | u8 psd_type[NUM_ACCESS_CATEGORIES_COPY]; | ||
528 | __le32 supported_rates; | ||
529 | u8 bss_index; | ||
530 | u8 sp_len; | ||
531 | u8 wmm; | ||
532 | u8 padding1; | ||
533 | } __packed; | ||
534 | |||
535 | struct wl1271_cmd_remove_sta { | ||
536 | struct wl1271_cmd_header header; | ||
537 | |||
538 | u8 hlid; | ||
539 | u8 reason_opcode; | ||
540 | u8 send_deauth_flag; | ||
541 | u8 padding1; | ||
542 | } __packed; | ||
543 | |||
415 | #endif /* __WL1271_CMD_H__ */ | 544 | #endif /* __WL1271_CMD_H__ */ |