diff options
Diffstat (limited to 'include/net')
-rw-r--r-- | include/net/bluetooth/bluetooth.h | 3 | ||||
-rw-r--r-- | include/net/bluetooth/hci.h | 187 | ||||
-rw-r--r-- | include/net/bluetooth/hci_core.h | 30 | ||||
-rw-r--r-- | include/net/bluetooth/l2cap.h | 34 | ||||
-rw-r--r-- | include/net/bluetooth/rfcomm.h | 14 | ||||
-rw-r--r-- | include/net/cfg80211.h | 65 | ||||
-rw-r--r-- | include/net/lib80211.h | 3 | ||||
-rw-r--r-- | include/net/mac80211.h | 12 |
8 files changed, 219 insertions, 129 deletions
diff --git a/include/net/bluetooth/bluetooth.h b/include/net/bluetooth/bluetooth.h index ff77e8f882f1..27a902d9b3a9 100644 --- a/include/net/bluetooth/bluetooth.h +++ b/include/net/bluetooth/bluetooth.h | |||
@@ -84,7 +84,7 @@ enum { | |||
84 | /* BD Address */ | 84 | /* BD Address */ |
85 | typedef struct { | 85 | typedef struct { |
86 | __u8 b[6]; | 86 | __u8 b[6]; |
87 | } __attribute__((packed)) bdaddr_t; | 87 | } __packed bdaddr_t; |
88 | 88 | ||
89 | #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}}) | 89 | #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}}) |
90 | #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}}) | 90 | #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}}) |
@@ -138,6 +138,7 @@ struct sock *bt_accept_dequeue(struct sock *parent, struct socket *newsock); | |||
138 | struct bt_skb_cb { | 138 | struct bt_skb_cb { |
139 | __u8 pkt_type; | 139 | __u8 pkt_type; |
140 | __u8 incoming; | 140 | __u8 incoming; |
141 | __u16 expect; | ||
141 | __u8 tx_seq; | 142 | __u8 tx_seq; |
142 | __u8 retries; | 143 | __u8 retries; |
143 | __u8 sar; | 144 | __u8 sar; |
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index fc0c502d9fd1..bcbdd6d4e6dd 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h | |||
@@ -100,6 +100,9 @@ enum { | |||
100 | #define HCISETACLMTU _IOW('H', 227, int) | 100 | #define HCISETACLMTU _IOW('H', 227, int) |
101 | #define HCISETSCOMTU _IOW('H', 228, int) | 101 | #define HCISETSCOMTU _IOW('H', 228, int) |
102 | 102 | ||
103 | #define HCIBLOCKADDR _IOW('H', 230, int) | ||
104 | #define HCIUNBLOCKADDR _IOW('H', 231, int) | ||
105 | |||
103 | #define HCIINQUIRY _IOR('H', 240, int) | 106 | #define HCIINQUIRY _IOR('H', 240, int) |
104 | 107 | ||
105 | /* HCI timeouts */ | 108 | /* HCI timeouts */ |
@@ -227,7 +230,7 @@ struct hci_cp_inquiry { | |||
227 | __u8 lap[3]; | 230 | __u8 lap[3]; |
228 | __u8 length; | 231 | __u8 length; |
229 | __u8 num_rsp; | 232 | __u8 num_rsp; |
230 | } __attribute__ ((packed)); | 233 | } __packed; |
231 | 234 | ||
232 | #define HCI_OP_INQUIRY_CANCEL 0x0402 | 235 | #define HCI_OP_INQUIRY_CANCEL 0x0402 |
233 | 236 | ||
@@ -241,81 +244,81 @@ struct hci_cp_create_conn { | |||
241 | __u8 pscan_mode; | 244 | __u8 pscan_mode; |
242 | __le16 clock_offset; | 245 | __le16 clock_offset; |
243 | __u8 role_switch; | 246 | __u8 role_switch; |
244 | } __attribute__ ((packed)); | 247 | } __packed; |
245 | 248 | ||
246 | #define HCI_OP_DISCONNECT 0x0406 | 249 | #define HCI_OP_DISCONNECT 0x0406 |
247 | struct hci_cp_disconnect { | 250 | struct hci_cp_disconnect { |
248 | __le16 handle; | 251 | __le16 handle; |
249 | __u8 reason; | 252 | __u8 reason; |
250 | } __attribute__ ((packed)); | 253 | } __packed; |
251 | 254 | ||
252 | #define HCI_OP_ADD_SCO 0x0407 | 255 | #define HCI_OP_ADD_SCO 0x0407 |
253 | struct hci_cp_add_sco { | 256 | struct hci_cp_add_sco { |
254 | __le16 handle; | 257 | __le16 handle; |
255 | __le16 pkt_type; | 258 | __le16 pkt_type; |
256 | } __attribute__ ((packed)); | 259 | } __packed; |
257 | 260 | ||
258 | #define HCI_OP_CREATE_CONN_CANCEL 0x0408 | 261 | #define HCI_OP_CREATE_CONN_CANCEL 0x0408 |
259 | struct hci_cp_create_conn_cancel { | 262 | struct hci_cp_create_conn_cancel { |
260 | bdaddr_t bdaddr; | 263 | bdaddr_t bdaddr; |
261 | } __attribute__ ((packed)); | 264 | } __packed; |
262 | 265 | ||
263 | #define HCI_OP_ACCEPT_CONN_REQ 0x0409 | 266 | #define HCI_OP_ACCEPT_CONN_REQ 0x0409 |
264 | struct hci_cp_accept_conn_req { | 267 | struct hci_cp_accept_conn_req { |
265 | bdaddr_t bdaddr; | 268 | bdaddr_t bdaddr; |
266 | __u8 role; | 269 | __u8 role; |
267 | } __attribute__ ((packed)); | 270 | } __packed; |
268 | 271 | ||
269 | #define HCI_OP_REJECT_CONN_REQ 0x040a | 272 | #define HCI_OP_REJECT_CONN_REQ 0x040a |
270 | struct hci_cp_reject_conn_req { | 273 | struct hci_cp_reject_conn_req { |
271 | bdaddr_t bdaddr; | 274 | bdaddr_t bdaddr; |
272 | __u8 reason; | 275 | __u8 reason; |
273 | } __attribute__ ((packed)); | 276 | } __packed; |
274 | 277 | ||
275 | #define HCI_OP_LINK_KEY_REPLY 0x040b | 278 | #define HCI_OP_LINK_KEY_REPLY 0x040b |
276 | struct hci_cp_link_key_reply { | 279 | struct hci_cp_link_key_reply { |
277 | bdaddr_t bdaddr; | 280 | bdaddr_t bdaddr; |
278 | __u8 link_key[16]; | 281 | __u8 link_key[16]; |
279 | } __attribute__ ((packed)); | 282 | } __packed; |
280 | 283 | ||
281 | #define HCI_OP_LINK_KEY_NEG_REPLY 0x040c | 284 | #define HCI_OP_LINK_KEY_NEG_REPLY 0x040c |
282 | struct hci_cp_link_key_neg_reply { | 285 | struct hci_cp_link_key_neg_reply { |
283 | bdaddr_t bdaddr; | 286 | bdaddr_t bdaddr; |
284 | } __attribute__ ((packed)); | 287 | } __packed; |
285 | 288 | ||
286 | #define HCI_OP_PIN_CODE_REPLY 0x040d | 289 | #define HCI_OP_PIN_CODE_REPLY 0x040d |
287 | struct hci_cp_pin_code_reply { | 290 | struct hci_cp_pin_code_reply { |
288 | bdaddr_t bdaddr; | 291 | bdaddr_t bdaddr; |
289 | __u8 pin_len; | 292 | __u8 pin_len; |
290 | __u8 pin_code[16]; | 293 | __u8 pin_code[16]; |
291 | } __attribute__ ((packed)); | 294 | } __packed; |
292 | 295 | ||
293 | #define HCI_OP_PIN_CODE_NEG_REPLY 0x040e | 296 | #define HCI_OP_PIN_CODE_NEG_REPLY 0x040e |
294 | struct hci_cp_pin_code_neg_reply { | 297 | struct hci_cp_pin_code_neg_reply { |
295 | bdaddr_t bdaddr; | 298 | bdaddr_t bdaddr; |
296 | } __attribute__ ((packed)); | 299 | } __packed; |
297 | 300 | ||
298 | #define HCI_OP_CHANGE_CONN_PTYPE 0x040f | 301 | #define HCI_OP_CHANGE_CONN_PTYPE 0x040f |
299 | struct hci_cp_change_conn_ptype { | 302 | struct hci_cp_change_conn_ptype { |
300 | __le16 handle; | 303 | __le16 handle; |
301 | __le16 pkt_type; | 304 | __le16 pkt_type; |
302 | } __attribute__ ((packed)); | 305 | } __packed; |
303 | 306 | ||
304 | #define HCI_OP_AUTH_REQUESTED 0x0411 | 307 | #define HCI_OP_AUTH_REQUESTED 0x0411 |
305 | struct hci_cp_auth_requested { | 308 | struct hci_cp_auth_requested { |
306 | __le16 handle; | 309 | __le16 handle; |
307 | } __attribute__ ((packed)); | 310 | } __packed; |
308 | 311 | ||
309 | #define HCI_OP_SET_CONN_ENCRYPT 0x0413 | 312 | #define HCI_OP_SET_CONN_ENCRYPT 0x0413 |
310 | struct hci_cp_set_conn_encrypt { | 313 | struct hci_cp_set_conn_encrypt { |
311 | __le16 handle; | 314 | __le16 handle; |
312 | __u8 encrypt; | 315 | __u8 encrypt; |
313 | } __attribute__ ((packed)); | 316 | } __packed; |
314 | 317 | ||
315 | #define HCI_OP_CHANGE_CONN_LINK_KEY 0x0415 | 318 | #define HCI_OP_CHANGE_CONN_LINK_KEY 0x0415 |
316 | struct hci_cp_change_conn_link_key { | 319 | struct hci_cp_change_conn_link_key { |
317 | __le16 handle; | 320 | __le16 handle; |
318 | } __attribute__ ((packed)); | 321 | } __packed; |
319 | 322 | ||
320 | #define HCI_OP_REMOTE_NAME_REQ 0x0419 | 323 | #define HCI_OP_REMOTE_NAME_REQ 0x0419 |
321 | struct hci_cp_remote_name_req { | 324 | struct hci_cp_remote_name_req { |
@@ -323,28 +326,28 @@ struct hci_cp_remote_name_req { | |||
323 | __u8 pscan_rep_mode; | 326 | __u8 pscan_rep_mode; |
324 | __u8 pscan_mode; | 327 | __u8 pscan_mode; |
325 | __le16 clock_offset; | 328 | __le16 clock_offset; |
326 | } __attribute__ ((packed)); | 329 | } __packed; |
327 | 330 | ||
328 | #define HCI_OP_REMOTE_NAME_REQ_CANCEL 0x041a | 331 | #define HCI_OP_REMOTE_NAME_REQ_CANCEL 0x041a |
329 | struct hci_cp_remote_name_req_cancel { | 332 | struct hci_cp_remote_name_req_cancel { |
330 | bdaddr_t bdaddr; | 333 | bdaddr_t bdaddr; |
331 | } __attribute__ ((packed)); | 334 | } __packed; |
332 | 335 | ||
333 | #define HCI_OP_READ_REMOTE_FEATURES 0x041b | 336 | #define HCI_OP_READ_REMOTE_FEATURES 0x041b |
334 | struct hci_cp_read_remote_features { | 337 | struct hci_cp_read_remote_features { |
335 | __le16 handle; | 338 | __le16 handle; |
336 | } __attribute__ ((packed)); | 339 | } __packed; |
337 | 340 | ||
338 | #define HCI_OP_READ_REMOTE_EXT_FEATURES 0x041c | 341 | #define HCI_OP_READ_REMOTE_EXT_FEATURES 0x041c |
339 | struct hci_cp_read_remote_ext_features { | 342 | struct hci_cp_read_remote_ext_features { |
340 | __le16 handle; | 343 | __le16 handle; |
341 | __u8 page; | 344 | __u8 page; |
342 | } __attribute__ ((packed)); | 345 | } __packed; |
343 | 346 | ||
344 | #define HCI_OP_READ_REMOTE_VERSION 0x041d | 347 | #define HCI_OP_READ_REMOTE_VERSION 0x041d |
345 | struct hci_cp_read_remote_version { | 348 | struct hci_cp_read_remote_version { |
346 | __le16 handle; | 349 | __le16 handle; |
347 | } __attribute__ ((packed)); | 350 | } __packed; |
348 | 351 | ||
349 | #define HCI_OP_SETUP_SYNC_CONN 0x0428 | 352 | #define HCI_OP_SETUP_SYNC_CONN 0x0428 |
350 | struct hci_cp_setup_sync_conn { | 353 | struct hci_cp_setup_sync_conn { |
@@ -355,7 +358,7 @@ struct hci_cp_setup_sync_conn { | |||
355 | __le16 voice_setting; | 358 | __le16 voice_setting; |
356 | __u8 retrans_effort; | 359 | __u8 retrans_effort; |
357 | __le16 pkt_type; | 360 | __le16 pkt_type; |
358 | } __attribute__ ((packed)); | 361 | } __packed; |
359 | 362 | ||
360 | #define HCI_OP_ACCEPT_SYNC_CONN_REQ 0x0429 | 363 | #define HCI_OP_ACCEPT_SYNC_CONN_REQ 0x0429 |
361 | struct hci_cp_accept_sync_conn_req { | 364 | struct hci_cp_accept_sync_conn_req { |
@@ -366,13 +369,13 @@ struct hci_cp_accept_sync_conn_req { | |||
366 | __le16 content_format; | 369 | __le16 content_format; |
367 | __u8 retrans_effort; | 370 | __u8 retrans_effort; |
368 | __le16 pkt_type; | 371 | __le16 pkt_type; |
369 | } __attribute__ ((packed)); | 372 | } __packed; |
370 | 373 | ||
371 | #define HCI_OP_REJECT_SYNC_CONN_REQ 0x042a | 374 | #define HCI_OP_REJECT_SYNC_CONN_REQ 0x042a |
372 | struct hci_cp_reject_sync_conn_req { | 375 | struct hci_cp_reject_sync_conn_req { |
373 | bdaddr_t bdaddr; | 376 | bdaddr_t bdaddr; |
374 | __u8 reason; | 377 | __u8 reason; |
375 | } __attribute__ ((packed)); | 378 | } __packed; |
376 | 379 | ||
377 | #define HCI_OP_SNIFF_MODE 0x0803 | 380 | #define HCI_OP_SNIFF_MODE 0x0803 |
378 | struct hci_cp_sniff_mode { | 381 | struct hci_cp_sniff_mode { |
@@ -381,59 +384,59 @@ struct hci_cp_sniff_mode { | |||
381 | __le16 min_interval; | 384 | __le16 min_interval; |
382 | __le16 attempt; | 385 | __le16 attempt; |
383 | __le16 timeout; | 386 | __le16 timeout; |
384 | } __attribute__ ((packed)); | 387 | } __packed; |
385 | 388 | ||
386 | #define HCI_OP_EXIT_SNIFF_MODE 0x0804 | 389 | #define HCI_OP_EXIT_SNIFF_MODE 0x0804 |
387 | struct hci_cp_exit_sniff_mode { | 390 | struct hci_cp_exit_sniff_mode { |
388 | __le16 handle; | 391 | __le16 handle; |
389 | } __attribute__ ((packed)); | 392 | } __packed; |
390 | 393 | ||
391 | #define HCI_OP_ROLE_DISCOVERY 0x0809 | 394 | #define HCI_OP_ROLE_DISCOVERY 0x0809 |
392 | struct hci_cp_role_discovery { | 395 | struct hci_cp_role_discovery { |
393 | __le16 handle; | 396 | __le16 handle; |
394 | } __attribute__ ((packed)); | 397 | } __packed; |
395 | struct hci_rp_role_discovery { | 398 | struct hci_rp_role_discovery { |
396 | __u8 status; | 399 | __u8 status; |
397 | __le16 handle; | 400 | __le16 handle; |
398 | __u8 role; | 401 | __u8 role; |
399 | } __attribute__ ((packed)); | 402 | } __packed; |
400 | 403 | ||
401 | #define HCI_OP_SWITCH_ROLE 0x080b | 404 | #define HCI_OP_SWITCH_ROLE 0x080b |
402 | struct hci_cp_switch_role { | 405 | struct hci_cp_switch_role { |
403 | bdaddr_t bdaddr; | 406 | bdaddr_t bdaddr; |
404 | __u8 role; | 407 | __u8 role; |
405 | } __attribute__ ((packed)); | 408 | } __packed; |
406 | 409 | ||
407 | #define HCI_OP_READ_LINK_POLICY 0x080c | 410 | #define HCI_OP_READ_LINK_POLICY 0x080c |
408 | struct hci_cp_read_link_policy { | 411 | struct hci_cp_read_link_policy { |
409 | __le16 handle; | 412 | __le16 handle; |
410 | } __attribute__ ((packed)); | 413 | } __packed; |
411 | struct hci_rp_read_link_policy { | 414 | struct hci_rp_read_link_policy { |
412 | __u8 status; | 415 | __u8 status; |
413 | __le16 handle; | 416 | __le16 handle; |
414 | __le16 policy; | 417 | __le16 policy; |
415 | } __attribute__ ((packed)); | 418 | } __packed; |
416 | 419 | ||
417 | #define HCI_OP_WRITE_LINK_POLICY 0x080d | 420 | #define HCI_OP_WRITE_LINK_POLICY 0x080d |
418 | struct hci_cp_write_link_policy { | 421 | struct hci_cp_write_link_policy { |
419 | __le16 handle; | 422 | __le16 handle; |
420 | __le16 policy; | 423 | __le16 policy; |
421 | } __attribute__ ((packed)); | 424 | } __packed; |
422 | struct hci_rp_write_link_policy { | 425 | struct hci_rp_write_link_policy { |
423 | __u8 status; | 426 | __u8 status; |
424 | __le16 handle; | 427 | __le16 handle; |
425 | } __attribute__ ((packed)); | 428 | } __packed; |
426 | 429 | ||
427 | #define HCI_OP_READ_DEF_LINK_POLICY 0x080e | 430 | #define HCI_OP_READ_DEF_LINK_POLICY 0x080e |
428 | struct hci_rp_read_def_link_policy { | 431 | struct hci_rp_read_def_link_policy { |
429 | __u8 status; | 432 | __u8 status; |
430 | __le16 policy; | 433 | __le16 policy; |
431 | } __attribute__ ((packed)); | 434 | } __packed; |
432 | 435 | ||
433 | #define HCI_OP_WRITE_DEF_LINK_POLICY 0x080f | 436 | #define HCI_OP_WRITE_DEF_LINK_POLICY 0x080f |
434 | struct hci_cp_write_def_link_policy { | 437 | struct hci_cp_write_def_link_policy { |
435 | __le16 policy; | 438 | __le16 policy; |
436 | } __attribute__ ((packed)); | 439 | } __packed; |
437 | 440 | ||
438 | #define HCI_OP_SNIFF_SUBRATE 0x0811 | 441 | #define HCI_OP_SNIFF_SUBRATE 0x0811 |
439 | struct hci_cp_sniff_subrate { | 442 | struct hci_cp_sniff_subrate { |
@@ -441,12 +444,12 @@ struct hci_cp_sniff_subrate { | |||
441 | __le16 max_latency; | 444 | __le16 max_latency; |
442 | __le16 min_remote_timeout; | 445 | __le16 min_remote_timeout; |
443 | __le16 min_local_timeout; | 446 | __le16 min_local_timeout; |
444 | } __attribute__ ((packed)); | 447 | } __packed; |
445 | 448 | ||
446 | #define HCI_OP_SET_EVENT_MASK 0x0c01 | 449 | #define HCI_OP_SET_EVENT_MASK 0x0c01 |
447 | struct hci_cp_set_event_mask { | 450 | struct hci_cp_set_event_mask { |
448 | __u8 mask[8]; | 451 | __u8 mask[8]; |
449 | } __attribute__ ((packed)); | 452 | } __packed; |
450 | 453 | ||
451 | #define HCI_OP_RESET 0x0c03 | 454 | #define HCI_OP_RESET 0x0c03 |
452 | 455 | ||
@@ -455,7 +458,7 @@ struct hci_cp_set_event_flt { | |||
455 | __u8 flt_type; | 458 | __u8 flt_type; |
456 | __u8 cond_type; | 459 | __u8 cond_type; |
457 | __u8 condition[0]; | 460 | __u8 condition[0]; |
458 | } __attribute__ ((packed)); | 461 | } __packed; |
459 | 462 | ||
460 | /* Filter types */ | 463 | /* Filter types */ |
461 | #define HCI_FLT_CLEAR_ALL 0x00 | 464 | #define HCI_FLT_CLEAR_ALL 0x00 |
@@ -474,13 +477,13 @@ struct hci_cp_set_event_flt { | |||
474 | #define HCI_OP_WRITE_LOCAL_NAME 0x0c13 | 477 | #define HCI_OP_WRITE_LOCAL_NAME 0x0c13 |
475 | struct hci_cp_write_local_name { | 478 | struct hci_cp_write_local_name { |
476 | __u8 name[248]; | 479 | __u8 name[248]; |
477 | } __attribute__ ((packed)); | 480 | } __packed; |
478 | 481 | ||
479 | #define HCI_OP_READ_LOCAL_NAME 0x0c14 | 482 | #define HCI_OP_READ_LOCAL_NAME 0x0c14 |
480 | struct hci_rp_read_local_name { | 483 | struct hci_rp_read_local_name { |
481 | __u8 status; | 484 | __u8 status; |
482 | __u8 name[248]; | 485 | __u8 name[248]; |
483 | } __attribute__ ((packed)); | 486 | } __packed; |
484 | 487 | ||
485 | #define HCI_OP_WRITE_CA_TIMEOUT 0x0c16 | 488 | #define HCI_OP_WRITE_CA_TIMEOUT 0x0c16 |
486 | 489 | ||
@@ -508,23 +511,23 @@ struct hci_rp_read_local_name { | |||
508 | struct hci_rp_read_class_of_dev { | 511 | struct hci_rp_read_class_of_dev { |
509 | __u8 status; | 512 | __u8 status; |
510 | __u8 dev_class[3]; | 513 | __u8 dev_class[3]; |
511 | } __attribute__ ((packed)); | 514 | } __packed; |
512 | 515 | ||
513 | #define HCI_OP_WRITE_CLASS_OF_DEV 0x0c24 | 516 | #define HCI_OP_WRITE_CLASS_OF_DEV 0x0c24 |
514 | struct hci_cp_write_class_of_dev { | 517 | struct hci_cp_write_class_of_dev { |
515 | __u8 dev_class[3]; | 518 | __u8 dev_class[3]; |
516 | } __attribute__ ((packed)); | 519 | } __packed; |
517 | 520 | ||
518 | #define HCI_OP_READ_VOICE_SETTING 0x0c25 | 521 | #define HCI_OP_READ_VOICE_SETTING 0x0c25 |
519 | struct hci_rp_read_voice_setting { | 522 | struct hci_rp_read_voice_setting { |
520 | __u8 status; | 523 | __u8 status; |
521 | __le16 voice_setting; | 524 | __le16 voice_setting; |
522 | } __attribute__ ((packed)); | 525 | } __packed; |
523 | 526 | ||
524 | #define HCI_OP_WRITE_VOICE_SETTING 0x0c26 | 527 | #define HCI_OP_WRITE_VOICE_SETTING 0x0c26 |
525 | struct hci_cp_write_voice_setting { | 528 | struct hci_cp_write_voice_setting { |
526 | __le16 voice_setting; | 529 | __le16 voice_setting; |
527 | } __attribute__ ((packed)); | 530 | } __packed; |
528 | 531 | ||
529 | #define HCI_OP_HOST_BUFFER_SIZE 0x0c33 | 532 | #define HCI_OP_HOST_BUFFER_SIZE 0x0c33 |
530 | struct hci_cp_host_buffer_size { | 533 | struct hci_cp_host_buffer_size { |
@@ -532,18 +535,18 @@ struct hci_cp_host_buffer_size { | |||
532 | __u8 sco_mtu; | 535 | __u8 sco_mtu; |
533 | __le16 acl_max_pkt; | 536 | __le16 acl_max_pkt; |
534 | __le16 sco_max_pkt; | 537 | __le16 sco_max_pkt; |
535 | } __attribute__ ((packed)); | 538 | } __packed; |
536 | 539 | ||
537 | #define HCI_OP_READ_SSP_MODE 0x0c55 | 540 | #define HCI_OP_READ_SSP_MODE 0x0c55 |
538 | struct hci_rp_read_ssp_mode { | 541 | struct hci_rp_read_ssp_mode { |
539 | __u8 status; | 542 | __u8 status; |
540 | __u8 mode; | 543 | __u8 mode; |
541 | } __attribute__ ((packed)); | 544 | } __packed; |
542 | 545 | ||
543 | #define HCI_OP_WRITE_SSP_MODE 0x0c56 | 546 | #define HCI_OP_WRITE_SSP_MODE 0x0c56 |
544 | struct hci_cp_write_ssp_mode { | 547 | struct hci_cp_write_ssp_mode { |
545 | __u8 mode; | 548 | __u8 mode; |
546 | } __attribute__ ((packed)); | 549 | } __packed; |
547 | 550 | ||
548 | #define HCI_OP_READ_LOCAL_VERSION 0x1001 | 551 | #define HCI_OP_READ_LOCAL_VERSION 0x1001 |
549 | struct hci_rp_read_local_version { | 552 | struct hci_rp_read_local_version { |
@@ -553,19 +556,19 @@ struct hci_rp_read_local_version { | |||
553 | __u8 lmp_ver; | 556 | __u8 lmp_ver; |
554 | __le16 manufacturer; | 557 | __le16 manufacturer; |
555 | __le16 lmp_subver; | 558 | __le16 lmp_subver; |
556 | } __attribute__ ((packed)); | 559 | } __packed; |
557 | 560 | ||
558 | #define HCI_OP_READ_LOCAL_COMMANDS 0x1002 | 561 | #define HCI_OP_READ_LOCAL_COMMANDS 0x1002 |
559 | struct hci_rp_read_local_commands { | 562 | struct hci_rp_read_local_commands { |
560 | __u8 status; | 563 | __u8 status; |
561 | __u8 commands[64]; | 564 | __u8 commands[64]; |
562 | } __attribute__ ((packed)); | 565 | } __packed; |
563 | 566 | ||
564 | #define HCI_OP_READ_LOCAL_FEATURES 0x1003 | 567 | #define HCI_OP_READ_LOCAL_FEATURES 0x1003 |
565 | struct hci_rp_read_local_features { | 568 | struct hci_rp_read_local_features { |
566 | __u8 status; | 569 | __u8 status; |
567 | __u8 features[8]; | 570 | __u8 features[8]; |
568 | } __attribute__ ((packed)); | 571 | } __packed; |
569 | 572 | ||
570 | #define HCI_OP_READ_LOCAL_EXT_FEATURES 0x1004 | 573 | #define HCI_OP_READ_LOCAL_EXT_FEATURES 0x1004 |
571 | struct hci_rp_read_local_ext_features { | 574 | struct hci_rp_read_local_ext_features { |
@@ -573,7 +576,7 @@ struct hci_rp_read_local_ext_features { | |||
573 | __u8 page; | 576 | __u8 page; |
574 | __u8 max_page; | 577 | __u8 max_page; |
575 | __u8 features[8]; | 578 | __u8 features[8]; |
576 | } __attribute__ ((packed)); | 579 | } __packed; |
577 | 580 | ||
578 | #define HCI_OP_READ_BUFFER_SIZE 0x1005 | 581 | #define HCI_OP_READ_BUFFER_SIZE 0x1005 |
579 | struct hci_rp_read_buffer_size { | 582 | struct hci_rp_read_buffer_size { |
@@ -582,13 +585,13 @@ struct hci_rp_read_buffer_size { | |||
582 | __u8 sco_mtu; | 585 | __u8 sco_mtu; |
583 | __le16 acl_max_pkt; | 586 | __le16 acl_max_pkt; |
584 | __le16 sco_max_pkt; | 587 | __le16 sco_max_pkt; |
585 | } __attribute__ ((packed)); | 588 | } __packed; |
586 | 589 | ||
587 | #define HCI_OP_READ_BD_ADDR 0x1009 | 590 | #define HCI_OP_READ_BD_ADDR 0x1009 |
588 | struct hci_rp_read_bd_addr { | 591 | struct hci_rp_read_bd_addr { |
589 | __u8 status; | 592 | __u8 status; |
590 | bdaddr_t bdaddr; | 593 | bdaddr_t bdaddr; |
591 | } __attribute__ ((packed)); | 594 | } __packed; |
592 | 595 | ||
593 | /* ---- HCI Events ---- */ | 596 | /* ---- HCI Events ---- */ |
594 | #define HCI_EV_INQUIRY_COMPLETE 0x01 | 597 | #define HCI_EV_INQUIRY_COMPLETE 0x01 |
@@ -601,7 +604,7 @@ struct inquiry_info { | |||
601 | __u8 pscan_mode; | 604 | __u8 pscan_mode; |
602 | __u8 dev_class[3]; | 605 | __u8 dev_class[3]; |
603 | __le16 clock_offset; | 606 | __le16 clock_offset; |
604 | } __attribute__ ((packed)); | 607 | } __packed; |
605 | 608 | ||
606 | #define HCI_EV_CONN_COMPLETE 0x03 | 609 | #define HCI_EV_CONN_COMPLETE 0x03 |
607 | struct hci_ev_conn_complete { | 610 | struct hci_ev_conn_complete { |
@@ -610,54 +613,54 @@ struct hci_ev_conn_complete { | |||
610 | bdaddr_t bdaddr; | 613 | bdaddr_t bdaddr; |
611 | __u8 link_type; | 614 | __u8 link_type; |
612 | __u8 encr_mode; | 615 | __u8 encr_mode; |
613 | } __attribute__ ((packed)); | 616 | } __packed; |
614 | 617 | ||
615 | #define HCI_EV_CONN_REQUEST 0x04 | 618 | #define HCI_EV_CONN_REQUEST 0x04 |
616 | struct hci_ev_conn_request { | 619 | struct hci_ev_conn_request { |
617 | bdaddr_t bdaddr; | 620 | bdaddr_t bdaddr; |
618 | __u8 dev_class[3]; | 621 | __u8 dev_class[3]; |
619 | __u8 link_type; | 622 | __u8 link_type; |
620 | } __attribute__ ((packed)); | 623 | } __packed; |
621 | 624 | ||
622 | #define HCI_EV_DISCONN_COMPLETE 0x05 | 625 | #define HCI_EV_DISCONN_COMPLETE 0x05 |
623 | struct hci_ev_disconn_complete { | 626 | struct hci_ev_disconn_complete { |
624 | __u8 status; | 627 | __u8 status; |
625 | __le16 handle; | 628 | __le16 handle; |
626 | __u8 reason; | 629 | __u8 reason; |
627 | } __attribute__ ((packed)); | 630 | } __packed; |
628 | 631 | ||
629 | #define HCI_EV_AUTH_COMPLETE 0x06 | 632 | #define HCI_EV_AUTH_COMPLETE 0x06 |
630 | struct hci_ev_auth_complete { | 633 | struct hci_ev_auth_complete { |
631 | __u8 status; | 634 | __u8 status; |
632 | __le16 handle; | 635 | __le16 handle; |
633 | } __attribute__ ((packed)); | 636 | } __packed; |
634 | 637 | ||
635 | #define HCI_EV_REMOTE_NAME 0x07 | 638 | #define HCI_EV_REMOTE_NAME 0x07 |
636 | struct hci_ev_remote_name { | 639 | struct hci_ev_remote_name { |
637 | __u8 status; | 640 | __u8 status; |
638 | bdaddr_t bdaddr; | 641 | bdaddr_t bdaddr; |
639 | __u8 name[248]; | 642 | __u8 name[248]; |
640 | } __attribute__ ((packed)); | 643 | } __packed; |
641 | 644 | ||
642 | #define HCI_EV_ENCRYPT_CHANGE 0x08 | 645 | #define HCI_EV_ENCRYPT_CHANGE 0x08 |
643 | struct hci_ev_encrypt_change { | 646 | struct hci_ev_encrypt_change { |
644 | __u8 status; | 647 | __u8 status; |
645 | __le16 handle; | 648 | __le16 handle; |
646 | __u8 encrypt; | 649 | __u8 encrypt; |
647 | } __attribute__ ((packed)); | 650 | } __packed; |
648 | 651 | ||
649 | #define HCI_EV_CHANGE_LINK_KEY_COMPLETE 0x09 | 652 | #define HCI_EV_CHANGE_LINK_KEY_COMPLETE 0x09 |
650 | struct hci_ev_change_link_key_complete { | 653 | struct hci_ev_change_link_key_complete { |
651 | __u8 status; | 654 | __u8 status; |
652 | __le16 handle; | 655 | __le16 handle; |
653 | } __attribute__ ((packed)); | 656 | } __packed; |
654 | 657 | ||
655 | #define HCI_EV_REMOTE_FEATURES 0x0b | 658 | #define HCI_EV_REMOTE_FEATURES 0x0b |
656 | struct hci_ev_remote_features { | 659 | struct hci_ev_remote_features { |
657 | __u8 status; | 660 | __u8 status; |
658 | __le16 handle; | 661 | __le16 handle; |
659 | __u8 features[8]; | 662 | __u8 features[8]; |
660 | } __attribute__ ((packed)); | 663 | } __packed; |
661 | 664 | ||
662 | #define HCI_EV_REMOTE_VERSION 0x0c | 665 | #define HCI_EV_REMOTE_VERSION 0x0c |
663 | struct hci_ev_remote_version { | 666 | struct hci_ev_remote_version { |
@@ -666,7 +669,7 @@ struct hci_ev_remote_version { | |||
666 | __u8 lmp_ver; | 669 | __u8 lmp_ver; |
667 | __le16 manufacturer; | 670 | __le16 manufacturer; |
668 | __le16 lmp_subver; | 671 | __le16 lmp_subver; |
669 | } __attribute__ ((packed)); | 672 | } __packed; |
670 | 673 | ||
671 | #define HCI_EV_QOS_SETUP_COMPLETE 0x0d | 674 | #define HCI_EV_QOS_SETUP_COMPLETE 0x0d |
672 | struct hci_qos { | 675 | struct hci_qos { |
@@ -675,38 +678,38 @@ struct hci_qos { | |||
675 | __u32 peak_bandwidth; | 678 | __u32 peak_bandwidth; |
676 | __u32 latency; | 679 | __u32 latency; |
677 | __u32 delay_variation; | 680 | __u32 delay_variation; |
678 | } __attribute__ ((packed)); | 681 | } __packed; |
679 | struct hci_ev_qos_setup_complete { | 682 | struct hci_ev_qos_setup_complete { |
680 | __u8 status; | 683 | __u8 status; |
681 | __le16 handle; | 684 | __le16 handle; |
682 | struct hci_qos qos; | 685 | struct hci_qos qos; |
683 | } __attribute__ ((packed)); | 686 | } __packed; |
684 | 687 | ||
685 | #define HCI_EV_CMD_COMPLETE 0x0e | 688 | #define HCI_EV_CMD_COMPLETE 0x0e |
686 | struct hci_ev_cmd_complete { | 689 | struct hci_ev_cmd_complete { |
687 | __u8 ncmd; | 690 | __u8 ncmd; |
688 | __le16 opcode; | 691 | __le16 opcode; |
689 | } __attribute__ ((packed)); | 692 | } __packed; |
690 | 693 | ||
691 | #define HCI_EV_CMD_STATUS 0x0f | 694 | #define HCI_EV_CMD_STATUS 0x0f |
692 | struct hci_ev_cmd_status { | 695 | struct hci_ev_cmd_status { |
693 | __u8 status; | 696 | __u8 status; |
694 | __u8 ncmd; | 697 | __u8 ncmd; |
695 | __le16 opcode; | 698 | __le16 opcode; |
696 | } __attribute__ ((packed)); | 699 | } __packed; |
697 | 700 | ||
698 | #define HCI_EV_ROLE_CHANGE 0x12 | 701 | #define HCI_EV_ROLE_CHANGE 0x12 |
699 | struct hci_ev_role_change { | 702 | struct hci_ev_role_change { |
700 | __u8 status; | 703 | __u8 status; |
701 | bdaddr_t bdaddr; | 704 | bdaddr_t bdaddr; |
702 | __u8 role; | 705 | __u8 role; |
703 | } __attribute__ ((packed)); | 706 | } __packed; |
704 | 707 | ||
705 | #define HCI_EV_NUM_COMP_PKTS 0x13 | 708 | #define HCI_EV_NUM_COMP_PKTS 0x13 |
706 | struct hci_ev_num_comp_pkts { | 709 | struct hci_ev_num_comp_pkts { |
707 | __u8 num_hndl; | 710 | __u8 num_hndl; |
708 | /* variable length part */ | 711 | /* variable length part */ |
709 | } __attribute__ ((packed)); | 712 | } __packed; |
710 | 713 | ||
711 | #define HCI_EV_MODE_CHANGE 0x14 | 714 | #define HCI_EV_MODE_CHANGE 0x14 |
712 | struct hci_ev_mode_change { | 715 | struct hci_ev_mode_change { |
@@ -714,44 +717,44 @@ struct hci_ev_mode_change { | |||
714 | __le16 handle; | 717 | __le16 handle; |
715 | __u8 mode; | 718 | __u8 mode; |
716 | __le16 interval; | 719 | __le16 interval; |
717 | } __attribute__ ((packed)); | 720 | } __packed; |
718 | 721 | ||
719 | #define HCI_EV_PIN_CODE_REQ 0x16 | 722 | #define HCI_EV_PIN_CODE_REQ 0x16 |
720 | struct hci_ev_pin_code_req { | 723 | struct hci_ev_pin_code_req { |
721 | bdaddr_t bdaddr; | 724 | bdaddr_t bdaddr; |
722 | } __attribute__ ((packed)); | 725 | } __packed; |
723 | 726 | ||
724 | #define HCI_EV_LINK_KEY_REQ 0x17 | 727 | #define HCI_EV_LINK_KEY_REQ 0x17 |
725 | struct hci_ev_link_key_req { | 728 | struct hci_ev_link_key_req { |
726 | bdaddr_t bdaddr; | 729 | bdaddr_t bdaddr; |
727 | } __attribute__ ((packed)); | 730 | } __packed; |
728 | 731 | ||
729 | #define HCI_EV_LINK_KEY_NOTIFY 0x18 | 732 | #define HCI_EV_LINK_KEY_NOTIFY 0x18 |
730 | struct hci_ev_link_key_notify { | 733 | struct hci_ev_link_key_notify { |
731 | bdaddr_t bdaddr; | 734 | bdaddr_t bdaddr; |
732 | __u8 link_key[16]; | 735 | __u8 link_key[16]; |
733 | __u8 key_type; | 736 | __u8 key_type; |
734 | } __attribute__ ((packed)); | 737 | } __packed; |
735 | 738 | ||
736 | #define HCI_EV_CLOCK_OFFSET 0x1c | 739 | #define HCI_EV_CLOCK_OFFSET 0x1c |
737 | struct hci_ev_clock_offset { | 740 | struct hci_ev_clock_offset { |
738 | __u8 status; | 741 | __u8 status; |
739 | __le16 handle; | 742 | __le16 handle; |
740 | __le16 clock_offset; | 743 | __le16 clock_offset; |
741 | } __attribute__ ((packed)); | 744 | } __packed; |
742 | 745 | ||
743 | #define HCI_EV_PKT_TYPE_CHANGE 0x1d | 746 | #define HCI_EV_PKT_TYPE_CHANGE 0x1d |
744 | struct hci_ev_pkt_type_change { | 747 | struct hci_ev_pkt_type_change { |
745 | __u8 status; | 748 | __u8 status; |
746 | __le16 handle; | 749 | __le16 handle; |
747 | __le16 pkt_type; | 750 | __le16 pkt_type; |
748 | } __attribute__ ((packed)); | 751 | } __packed; |
749 | 752 | ||
750 | #define HCI_EV_PSCAN_REP_MODE 0x20 | 753 | #define HCI_EV_PSCAN_REP_MODE 0x20 |
751 | struct hci_ev_pscan_rep_mode { | 754 | struct hci_ev_pscan_rep_mode { |
752 | bdaddr_t bdaddr; | 755 | bdaddr_t bdaddr; |
753 | __u8 pscan_rep_mode; | 756 | __u8 pscan_rep_mode; |
754 | } __attribute__ ((packed)); | 757 | } __packed; |
755 | 758 | ||
756 | #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 | 759 | #define HCI_EV_INQUIRY_RESULT_WITH_RSSI 0x22 |
757 | struct inquiry_info_with_rssi { | 760 | struct inquiry_info_with_rssi { |
@@ -761,7 +764,7 @@ struct inquiry_info_with_rssi { | |||
761 | __u8 dev_class[3]; | 764 | __u8 dev_class[3]; |
762 | __le16 clock_offset; | 765 | __le16 clock_offset; |
763 | __s8 rssi; | 766 | __s8 rssi; |
764 | } __attribute__ ((packed)); | 767 | } __packed; |
765 | struct inquiry_info_with_rssi_and_pscan_mode { | 768 | struct inquiry_info_with_rssi_and_pscan_mode { |
766 | bdaddr_t bdaddr; | 769 | bdaddr_t bdaddr; |
767 | __u8 pscan_rep_mode; | 770 | __u8 pscan_rep_mode; |
@@ -770,7 +773,7 @@ struct inquiry_info_with_rssi_and_pscan_mode { | |||
770 | __u8 dev_class[3]; | 773 | __u8 dev_class[3]; |
771 | __le16 clock_offset; | 774 | __le16 clock_offset; |
772 | __s8 rssi; | 775 | __s8 rssi; |
773 | } __attribute__ ((packed)); | 776 | } __packed; |
774 | 777 | ||
775 | #define HCI_EV_REMOTE_EXT_FEATURES 0x23 | 778 | #define HCI_EV_REMOTE_EXT_FEATURES 0x23 |
776 | struct hci_ev_remote_ext_features { | 779 | struct hci_ev_remote_ext_features { |
@@ -779,7 +782,7 @@ struct hci_ev_remote_ext_features { | |||
779 | __u8 page; | 782 | __u8 page; |
780 | __u8 max_page; | 783 | __u8 max_page; |
781 | __u8 features[8]; | 784 | __u8 features[8]; |
782 | } __attribute__ ((packed)); | 785 | } __packed; |
783 | 786 | ||
784 | #define HCI_EV_SYNC_CONN_COMPLETE 0x2c | 787 | #define HCI_EV_SYNC_CONN_COMPLETE 0x2c |
785 | struct hci_ev_sync_conn_complete { | 788 | struct hci_ev_sync_conn_complete { |
@@ -792,7 +795,7 @@ struct hci_ev_sync_conn_complete { | |||
792 | __le16 rx_pkt_len; | 795 | __le16 rx_pkt_len; |
793 | __le16 tx_pkt_len; | 796 | __le16 tx_pkt_len; |
794 | __u8 air_mode; | 797 | __u8 air_mode; |
795 | } __attribute__ ((packed)); | 798 | } __packed; |
796 | 799 | ||
797 | #define HCI_EV_SYNC_CONN_CHANGED 0x2d | 800 | #define HCI_EV_SYNC_CONN_CHANGED 0x2d |
798 | struct hci_ev_sync_conn_changed { | 801 | struct hci_ev_sync_conn_changed { |
@@ -802,7 +805,7 @@ struct hci_ev_sync_conn_changed { | |||
802 | __u8 retrans_window; | 805 | __u8 retrans_window; |
803 | __le16 rx_pkt_len; | 806 | __le16 rx_pkt_len; |
804 | __le16 tx_pkt_len; | 807 | __le16 tx_pkt_len; |
805 | } __attribute__ ((packed)); | 808 | } __packed; |
806 | 809 | ||
807 | #define HCI_EV_SNIFF_SUBRATE 0x2e | 810 | #define HCI_EV_SNIFF_SUBRATE 0x2e |
808 | struct hci_ev_sniff_subrate { | 811 | struct hci_ev_sniff_subrate { |
@@ -812,7 +815,7 @@ struct hci_ev_sniff_subrate { | |||
812 | __le16 max_rx_latency; | 815 | __le16 max_rx_latency; |
813 | __le16 max_remote_timeout; | 816 | __le16 max_remote_timeout; |
814 | __le16 max_local_timeout; | 817 | __le16 max_local_timeout; |
815 | } __attribute__ ((packed)); | 818 | } __packed; |
816 | 819 | ||
817 | #define HCI_EV_EXTENDED_INQUIRY_RESULT 0x2f | 820 | #define HCI_EV_EXTENDED_INQUIRY_RESULT 0x2f |
818 | struct extended_inquiry_info { | 821 | struct extended_inquiry_info { |
@@ -823,37 +826,37 @@ struct extended_inquiry_info { | |||
823 | __le16 clock_offset; | 826 | __le16 clock_offset; |
824 | __s8 rssi; | 827 | __s8 rssi; |
825 | __u8 data[240]; | 828 | __u8 data[240]; |
826 | } __attribute__ ((packed)); | 829 | } __packed; |
827 | 830 | ||
828 | #define HCI_EV_IO_CAPA_REQUEST 0x31 | 831 | #define HCI_EV_IO_CAPA_REQUEST 0x31 |
829 | struct hci_ev_io_capa_request { | 832 | struct hci_ev_io_capa_request { |
830 | bdaddr_t bdaddr; | 833 | bdaddr_t bdaddr; |
831 | } __attribute__ ((packed)); | 834 | } __packed; |
832 | 835 | ||
833 | #define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 | 836 | #define HCI_EV_SIMPLE_PAIR_COMPLETE 0x36 |
834 | struct hci_ev_simple_pair_complete { | 837 | struct hci_ev_simple_pair_complete { |
835 | __u8 status; | 838 | __u8 status; |
836 | bdaddr_t bdaddr; | 839 | bdaddr_t bdaddr; |
837 | } __attribute__ ((packed)); | 840 | } __packed; |
838 | 841 | ||
839 | #define HCI_EV_REMOTE_HOST_FEATURES 0x3d | 842 | #define HCI_EV_REMOTE_HOST_FEATURES 0x3d |
840 | struct hci_ev_remote_host_features { | 843 | struct hci_ev_remote_host_features { |
841 | bdaddr_t bdaddr; | 844 | bdaddr_t bdaddr; |
842 | __u8 features[8]; | 845 | __u8 features[8]; |
843 | } __attribute__ ((packed)); | 846 | } __packed; |
844 | 847 | ||
845 | /* Internal events generated by Bluetooth stack */ | 848 | /* Internal events generated by Bluetooth stack */ |
846 | #define HCI_EV_STACK_INTERNAL 0xfd | 849 | #define HCI_EV_STACK_INTERNAL 0xfd |
847 | struct hci_ev_stack_internal { | 850 | struct hci_ev_stack_internal { |
848 | __u16 type; | 851 | __u16 type; |
849 | __u8 data[0]; | 852 | __u8 data[0]; |
850 | } __attribute__ ((packed)); | 853 | } __packed; |
851 | 854 | ||
852 | #define HCI_EV_SI_DEVICE 0x01 | 855 | #define HCI_EV_SI_DEVICE 0x01 |
853 | struct hci_ev_si_device { | 856 | struct hci_ev_si_device { |
854 | __u16 event; | 857 | __u16 event; |
855 | __u16 dev_id; | 858 | __u16 dev_id; |
856 | } __attribute__ ((packed)); | 859 | } __packed; |
857 | 860 | ||
858 | #define HCI_EV_SI_SECURITY 0x02 | 861 | #define HCI_EV_SI_SECURITY 0x02 |
859 | struct hci_ev_si_security { | 862 | struct hci_ev_si_security { |
@@ -861,7 +864,7 @@ struct hci_ev_si_security { | |||
861 | __u16 proto; | 864 | __u16 proto; |
862 | __u16 subproto; | 865 | __u16 subproto; |
863 | __u8 incoming; | 866 | __u8 incoming; |
864 | } __attribute__ ((packed)); | 867 | } __packed; |
865 | 868 | ||
866 | /* ---- HCI Packet structures ---- */ | 869 | /* ---- HCI Packet structures ---- */ |
867 | #define HCI_COMMAND_HDR_SIZE 3 | 870 | #define HCI_COMMAND_HDR_SIZE 3 |
@@ -872,22 +875,22 @@ struct hci_ev_si_security { | |||
872 | struct hci_command_hdr { | 875 | struct hci_command_hdr { |
873 | __le16 opcode; /* OCF & OGF */ | 876 | __le16 opcode; /* OCF & OGF */ |
874 | __u8 plen; | 877 | __u8 plen; |
875 | } __attribute__ ((packed)); | 878 | } __packed; |
876 | 879 | ||
877 | struct hci_event_hdr { | 880 | struct hci_event_hdr { |
878 | __u8 evt; | 881 | __u8 evt; |
879 | __u8 plen; | 882 | __u8 plen; |
880 | } __attribute__ ((packed)); | 883 | } __packed; |
881 | 884 | ||
882 | struct hci_acl_hdr { | 885 | struct hci_acl_hdr { |
883 | __le16 handle; /* Handle & Flags(PB, BC) */ | 886 | __le16 handle; /* Handle & Flags(PB, BC) */ |
884 | __le16 dlen; | 887 | __le16 dlen; |
885 | } __attribute__ ((packed)); | 888 | } __packed; |
886 | 889 | ||
887 | struct hci_sco_hdr { | 890 | struct hci_sco_hdr { |
888 | __le16 handle; | 891 | __le16 handle; |
889 | __u8 dlen; | 892 | __u8 dlen; |
890 | } __attribute__ ((packed)); | 893 | } __packed; |
891 | 894 | ||
892 | #ifdef __KERNEL__ | 895 | #ifdef __KERNEL__ |
893 | #include <linux/skbuff.h> | 896 | #include <linux/skbuff.h> |
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index e42f6ed5421c..8b28962e737e 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | BlueZ - Bluetooth protocol stack for Linux | 2 | BlueZ - Bluetooth protocol stack for Linux |
3 | Copyright (C) 2000-2001 Qualcomm Incorporated | 3 | Copyright (c) 2000-2001, 2010, Code Aurora Forum. All rights reserved. |
4 | 4 | ||
5 | Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> | 5 | Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> |
6 | 6 | ||
@@ -12,13 +12,13 @@ | |||
12 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | 12 | OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. | 13 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. |
14 | IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY | 14 | IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) AND AUTHOR(S) BE LIABLE FOR ANY |
15 | CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES | 15 | CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES |
16 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | 16 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
17 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | 17 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
18 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 18 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
19 | 19 | ||
20 | ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, | 20 | ALL LIABILITY, INCLUDING LIABILITY FOR INFRINGEMENT OF ANY PATENTS, |
21 | COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS | 21 | COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS, RELATING TO USE OF THIS |
22 | SOFTWARE IS DISCLAIMED. | 22 | SOFTWARE IS DISCLAIMED. |
23 | */ | 23 | */ |
24 | 24 | ||
@@ -62,6 +62,11 @@ struct hci_conn_hash { | |||
62 | unsigned int sco_num; | 62 | unsigned int sco_num; |
63 | }; | 63 | }; |
64 | 64 | ||
65 | struct bdaddr_list { | ||
66 | struct list_head list; | ||
67 | bdaddr_t bdaddr; | ||
68 | }; | ||
69 | #define NUM_REASSEMBLY 4 | ||
65 | struct hci_dev { | 70 | struct hci_dev { |
66 | struct list_head list; | 71 | struct list_head list; |
67 | spinlock_t lock; | 72 | spinlock_t lock; |
@@ -118,7 +123,7 @@ struct hci_dev { | |||
118 | struct sk_buff_head cmd_q; | 123 | struct sk_buff_head cmd_q; |
119 | 124 | ||
120 | struct sk_buff *sent_cmd; | 125 | struct sk_buff *sent_cmd; |
121 | struct sk_buff *reassembly[3]; | 126 | struct sk_buff *reassembly[NUM_REASSEMBLY]; |
122 | 127 | ||
123 | struct mutex req_lock; | 128 | struct mutex req_lock; |
124 | wait_queue_head_t req_wait_q; | 129 | wait_queue_head_t req_wait_q; |
@@ -127,6 +132,7 @@ struct hci_dev { | |||
127 | 132 | ||
128 | struct inquiry_cache inq_cache; | 133 | struct inquiry_cache inq_cache; |
129 | struct hci_conn_hash conn_hash; | 134 | struct hci_conn_hash conn_hash; |
135 | struct bdaddr_list blacklist; | ||
130 | 136 | ||
131 | struct hci_dev_stats stat; | 137 | struct hci_dev_stats stat; |
132 | 138 | ||
@@ -250,6 +256,7 @@ enum { | |||
250 | HCI_CONN_ENCRYPT_PEND, | 256 | HCI_CONN_ENCRYPT_PEND, |
251 | HCI_CONN_RSWITCH_PEND, | 257 | HCI_CONN_RSWITCH_PEND, |
252 | HCI_CONN_MODE_CHANGE_PEND, | 258 | HCI_CONN_MODE_CHANGE_PEND, |
259 | HCI_CONN_SCO_SETUP_PEND, | ||
253 | }; | 260 | }; |
254 | 261 | ||
255 | static inline void hci_conn_hash_init(struct hci_dev *hdev) | 262 | static inline void hci_conn_hash_init(struct hci_dev *hdev) |
@@ -330,6 +337,7 @@ void hci_acl_connect(struct hci_conn *conn); | |||
330 | void hci_acl_disconn(struct hci_conn *conn, __u8 reason); | 337 | void hci_acl_disconn(struct hci_conn *conn, __u8 reason); |
331 | void hci_add_sco(struct hci_conn *conn, __u16 handle); | 338 | void hci_add_sco(struct hci_conn *conn, __u16 handle); |
332 | void hci_setup_sync(struct hci_conn *conn, __u16 handle); | 339 | void hci_setup_sync(struct hci_conn *conn, __u16 handle); |
340 | void hci_sco_setup(struct hci_conn *conn, __u8 status); | ||
333 | 341 | ||
334 | struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst); | 342 | struct hci_conn *hci_conn_add(struct hci_dev *hdev, int type, bdaddr_t *dst); |
335 | int hci_conn_del(struct hci_conn *conn); | 343 | int hci_conn_del(struct hci_conn *conn); |
@@ -380,7 +388,7 @@ static inline void __hci_dev_put(struct hci_dev *d) | |||
380 | } | 388 | } |
381 | 389 | ||
382 | static inline void hci_dev_put(struct hci_dev *d) | 390 | static inline void hci_dev_put(struct hci_dev *d) |
383 | { | 391 | { |
384 | __hci_dev_put(d); | 392 | __hci_dev_put(d); |
385 | module_put(d->owner); | 393 | module_put(d->owner); |
386 | } | 394 | } |
@@ -424,10 +432,14 @@ int hci_get_conn_info(struct hci_dev *hdev, void __user *arg); | |||
424 | int hci_get_auth_info(struct hci_dev *hdev, void __user *arg); | 432 | int hci_get_auth_info(struct hci_dev *hdev, void __user *arg); |
425 | int hci_inquiry(void __user *arg); | 433 | int hci_inquiry(void __user *arg); |
426 | 434 | ||
435 | struct bdaddr_list *hci_blacklist_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr); | ||
436 | int hci_blacklist_clear(struct hci_dev *hdev); | ||
437 | |||
427 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); | 438 | void hci_event_packet(struct hci_dev *hdev, struct sk_buff *skb); |
428 | 439 | ||
429 | int hci_recv_frame(struct sk_buff *skb); | 440 | int hci_recv_frame(struct sk_buff *skb); |
430 | int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count); | 441 | int hci_recv_fragment(struct hci_dev *hdev, int type, void *data, int count); |
442 | int hci_recv_stream_fragment(struct hci_dev *hdev, void *data, int count); | ||
431 | 443 | ||
432 | int hci_register_sysfs(struct hci_dev *hdev); | 444 | int hci_register_sysfs(struct hci_dev *hdev); |
433 | void hci_unregister_sysfs(struct hci_dev *hdev); | 445 | void hci_unregister_sysfs(struct hci_dev *hdev); |
diff --git a/include/net/bluetooth/l2cap.h b/include/net/bluetooth/l2cap.h index 7c695bfd853c..636724b203ee 100644 --- a/include/net/bluetooth/l2cap.h +++ b/include/net/bluetooth/l2cap.h | |||
@@ -1,6 +1,8 @@ | |||
1 | /* | 1 | /* |
2 | BlueZ - Bluetooth protocol stack for Linux | 2 | BlueZ - Bluetooth protocol stack for Linux |
3 | Copyright (C) 2000-2001 Qualcomm Incorporated | 3 | Copyright (C) 2000-2001 Qualcomm Incorporated |
4 | Copyright (C) 2009-2010 Gustavo F. Padovan <gustavo@padovan.org> | ||
5 | Copyright (C) 2010 Google Inc. | ||
4 | 6 | ||
5 | Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> | 7 | Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com> |
6 | 8 | ||
@@ -129,31 +131,31 @@ struct l2cap_conninfo { | |||
129 | struct l2cap_hdr { | 131 | struct l2cap_hdr { |
130 | __le16 len; | 132 | __le16 len; |
131 | __le16 cid; | 133 | __le16 cid; |
132 | } __attribute__ ((packed)); | 134 | } __packed; |
133 | #define L2CAP_HDR_SIZE 4 | 135 | #define L2CAP_HDR_SIZE 4 |
134 | 136 | ||
135 | struct l2cap_cmd_hdr { | 137 | struct l2cap_cmd_hdr { |
136 | __u8 code; | 138 | __u8 code; |
137 | __u8 ident; | 139 | __u8 ident; |
138 | __le16 len; | 140 | __le16 len; |
139 | } __attribute__ ((packed)); | 141 | } __packed; |
140 | #define L2CAP_CMD_HDR_SIZE 4 | 142 | #define L2CAP_CMD_HDR_SIZE 4 |
141 | 143 | ||
142 | struct l2cap_cmd_rej { | 144 | struct l2cap_cmd_rej { |
143 | __le16 reason; | 145 | __le16 reason; |
144 | } __attribute__ ((packed)); | 146 | } __packed; |
145 | 147 | ||
146 | struct l2cap_conn_req { | 148 | struct l2cap_conn_req { |
147 | __le16 psm; | 149 | __le16 psm; |
148 | __le16 scid; | 150 | __le16 scid; |
149 | } __attribute__ ((packed)); | 151 | } __packed; |
150 | 152 | ||
151 | struct l2cap_conn_rsp { | 153 | struct l2cap_conn_rsp { |
152 | __le16 dcid; | 154 | __le16 dcid; |
153 | __le16 scid; | 155 | __le16 scid; |
154 | __le16 result; | 156 | __le16 result; |
155 | __le16 status; | 157 | __le16 status; |
156 | } __attribute__ ((packed)); | 158 | } __packed; |
157 | 159 | ||
158 | /* channel indentifier */ | 160 | /* channel indentifier */ |
159 | #define L2CAP_CID_SIGNALING 0x0001 | 161 | #define L2CAP_CID_SIGNALING 0x0001 |
@@ -177,14 +179,14 @@ struct l2cap_conf_req { | |||
177 | __le16 dcid; | 179 | __le16 dcid; |
178 | __le16 flags; | 180 | __le16 flags; |
179 | __u8 data[0]; | 181 | __u8 data[0]; |
180 | } __attribute__ ((packed)); | 182 | } __packed; |
181 | 183 | ||
182 | struct l2cap_conf_rsp { | 184 | struct l2cap_conf_rsp { |
183 | __le16 scid; | 185 | __le16 scid; |
184 | __le16 flags; | 186 | __le16 flags; |
185 | __le16 result; | 187 | __le16 result; |
186 | __u8 data[0]; | 188 | __u8 data[0]; |
187 | } __attribute__ ((packed)); | 189 | } __packed; |
188 | 190 | ||
189 | #define L2CAP_CONF_SUCCESS 0x0000 | 191 | #define L2CAP_CONF_SUCCESS 0x0000 |
190 | #define L2CAP_CONF_UNACCEPT 0x0001 | 192 | #define L2CAP_CONF_UNACCEPT 0x0001 |
@@ -195,7 +197,7 @@ struct l2cap_conf_opt { | |||
195 | __u8 type; | 197 | __u8 type; |
196 | __u8 len; | 198 | __u8 len; |
197 | __u8 val[0]; | 199 | __u8 val[0]; |
198 | } __attribute__ ((packed)); | 200 | } __packed; |
199 | #define L2CAP_CONF_OPT_SIZE 2 | 201 | #define L2CAP_CONF_OPT_SIZE 2 |
200 | 202 | ||
201 | #define L2CAP_CONF_HINT 0x80 | 203 | #define L2CAP_CONF_HINT 0x80 |
@@ -216,7 +218,7 @@ struct l2cap_conf_rfc { | |||
216 | __le16 retrans_timeout; | 218 | __le16 retrans_timeout; |
217 | __le16 monitor_timeout; | 219 | __le16 monitor_timeout; |
218 | __le16 max_pdu_size; | 220 | __le16 max_pdu_size; |
219 | } __attribute__ ((packed)); | 221 | } __packed; |
220 | 222 | ||
221 | #define L2CAP_MODE_BASIC 0x00 | 223 | #define L2CAP_MODE_BASIC 0x00 |
222 | #define L2CAP_MODE_RETRANS 0x01 | 224 | #define L2CAP_MODE_RETRANS 0x01 |
@@ -227,22 +229,22 @@ struct l2cap_conf_rfc { | |||
227 | struct l2cap_disconn_req { | 229 | struct l2cap_disconn_req { |
228 | __le16 dcid; | 230 | __le16 dcid; |
229 | __le16 scid; | 231 | __le16 scid; |
230 | } __attribute__ ((packed)); | 232 | } __packed; |
231 | 233 | ||
232 | struct l2cap_disconn_rsp { | 234 | struct l2cap_disconn_rsp { |
233 | __le16 dcid; | 235 | __le16 dcid; |
234 | __le16 scid; | 236 | __le16 scid; |
235 | } __attribute__ ((packed)); | 237 | } __packed; |
236 | 238 | ||
237 | struct l2cap_info_req { | 239 | struct l2cap_info_req { |
238 | __le16 type; | 240 | __le16 type; |
239 | } __attribute__ ((packed)); | 241 | } __packed; |
240 | 242 | ||
241 | struct l2cap_info_rsp { | 243 | struct l2cap_info_rsp { |
242 | __le16 type; | 244 | __le16 type; |
243 | __le16 result; | 245 | __le16 result; |
244 | __u8 data[0]; | 246 | __u8 data[0]; |
245 | } __attribute__ ((packed)); | 247 | } __packed; |
246 | 248 | ||
247 | /* info type */ | 249 | /* info type */ |
248 | #define L2CAP_IT_CL_MTU 0x0001 | 250 | #define L2CAP_IT_CL_MTU 0x0001 |
@@ -287,6 +289,11 @@ struct l2cap_conn { | |||
287 | struct l2cap_chan_list chan_list; | 289 | struct l2cap_chan_list chan_list; |
288 | }; | 290 | }; |
289 | 291 | ||
292 | struct sock_del_list { | ||
293 | struct sock *sk; | ||
294 | struct list_head list; | ||
295 | }; | ||
296 | |||
290 | #define L2CAP_INFO_CL_MTU_REQ_SENT 0x01 | 297 | #define L2CAP_INFO_CL_MTU_REQ_SENT 0x01 |
291 | #define L2CAP_INFO_FEAT_MASK_REQ_SENT 0x04 | 298 | #define L2CAP_INFO_FEAT_MASK_REQ_SENT 0x04 |
292 | #define L2CAP_INFO_FEAT_MASK_REQ_DONE 0x08 | 299 | #define L2CAP_INFO_FEAT_MASK_REQ_DONE 0x08 |
@@ -353,7 +360,6 @@ struct l2cap_pinfo { | |||
353 | 360 | ||
354 | __le16 sport; | 361 | __le16 sport; |
355 | 362 | ||
356 | spinlock_t send_lock; | ||
357 | struct timer_list retrans_timer; | 363 | struct timer_list retrans_timer; |
358 | struct timer_list monitor_timer; | 364 | struct timer_list monitor_timer; |
359 | struct timer_list ack_timer; | 365 | struct timer_list ack_timer; |
diff --git a/include/net/bluetooth/rfcomm.h b/include/net/bluetooth/rfcomm.h index 921d7b3c7f8d..a140847d622c 100644 --- a/include/net/bluetooth/rfcomm.h +++ b/include/net/bluetooth/rfcomm.h | |||
@@ -106,19 +106,19 @@ struct rfcomm_hdr { | |||
106 | u8 addr; | 106 | u8 addr; |
107 | u8 ctrl; | 107 | u8 ctrl; |
108 | u8 len; // Actual size can be 2 bytes | 108 | u8 len; // Actual size can be 2 bytes |
109 | } __attribute__ ((packed)); | 109 | } __packed; |
110 | 110 | ||
111 | struct rfcomm_cmd { | 111 | struct rfcomm_cmd { |
112 | u8 addr; | 112 | u8 addr; |
113 | u8 ctrl; | 113 | u8 ctrl; |
114 | u8 len; | 114 | u8 len; |
115 | u8 fcs; | 115 | u8 fcs; |
116 | } __attribute__ ((packed)); | 116 | } __packed; |
117 | 117 | ||
118 | struct rfcomm_mcc { | 118 | struct rfcomm_mcc { |
119 | u8 type; | 119 | u8 type; |
120 | u8 len; | 120 | u8 len; |
121 | } __attribute__ ((packed)); | 121 | } __packed; |
122 | 122 | ||
123 | struct rfcomm_pn { | 123 | struct rfcomm_pn { |
124 | u8 dlci; | 124 | u8 dlci; |
@@ -128,7 +128,7 @@ struct rfcomm_pn { | |||
128 | __le16 mtu; | 128 | __le16 mtu; |
129 | u8 max_retrans; | 129 | u8 max_retrans; |
130 | u8 credits; | 130 | u8 credits; |
131 | } __attribute__ ((packed)); | 131 | } __packed; |
132 | 132 | ||
133 | struct rfcomm_rpn { | 133 | struct rfcomm_rpn { |
134 | u8 dlci; | 134 | u8 dlci; |
@@ -138,17 +138,17 @@ struct rfcomm_rpn { | |||
138 | u8 xon_char; | 138 | u8 xon_char; |
139 | u8 xoff_char; | 139 | u8 xoff_char; |
140 | __le16 param_mask; | 140 | __le16 param_mask; |
141 | } __attribute__ ((packed)); | 141 | } __packed; |
142 | 142 | ||
143 | struct rfcomm_rls { | 143 | struct rfcomm_rls { |
144 | u8 dlci; | 144 | u8 dlci; |
145 | u8 status; | 145 | u8 status; |
146 | } __attribute__ ((packed)); | 146 | } __packed; |
147 | 147 | ||
148 | struct rfcomm_msc { | 148 | struct rfcomm_msc { |
149 | u8 dlci; | 149 | u8 dlci; |
150 | u8 v24_sig; | 150 | u8 v24_sig; |
151 | } __attribute__ ((packed)); | 151 | } __packed; |
152 | 152 | ||
153 | /* ---- Core structures, flags etc ---- */ | 153 | /* ---- Core structures, flags etc ---- */ |
154 | 154 | ||
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 4d1f19d70798..2fd06c60ffbb 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h | |||
@@ -1416,7 +1416,7 @@ static inline struct device *wiphy_dev(struct wiphy *wiphy) | |||
1416 | * | 1416 | * |
1417 | * @wiphy: The wiphy whose name to return | 1417 | * @wiphy: The wiphy whose name to return |
1418 | */ | 1418 | */ |
1419 | static inline const char *wiphy_name(struct wiphy *wiphy) | 1419 | static inline const char *wiphy_name(const struct wiphy *wiphy) |
1420 | { | 1420 | { |
1421 | return dev_name(&wiphy->dev); | 1421 | return dev_name(&wiphy->dev); |
1422 | } | 1422 | } |
@@ -2420,4 +2420,67 @@ void cfg80211_cqm_rssi_notify(struct net_device *dev, | |||
2420 | enum nl80211_cqm_rssi_threshold_event rssi_event, | 2420 | enum nl80211_cqm_rssi_threshold_event rssi_event, |
2421 | gfp_t gfp); | 2421 | gfp_t gfp); |
2422 | 2422 | ||
2423 | #ifdef __KERNEL__ | ||
2424 | |||
2425 | /* Logging, debugging and troubleshooting/diagnostic helpers. */ | ||
2426 | |||
2427 | /* wiphy_printk helpers, similar to dev_printk */ | ||
2428 | |||
2429 | #define wiphy_printk(level, wiphy, format, args...) \ | ||
2430 | printk(level "%s: " format, wiphy_name(wiphy), ##args) | ||
2431 | #define wiphy_emerg(wiphy, format, args...) \ | ||
2432 | wiphy_printk(KERN_EMERG, wiphy, format, ##args) | ||
2433 | #define wiphy_alert(wiphy, format, args...) \ | ||
2434 | wiphy_printk(KERN_ALERT, wiphy, format, ##args) | ||
2435 | #define wiphy_crit(wiphy, format, args...) \ | ||
2436 | wiphy_printk(KERN_CRIT, wiphy, format, ##args) | ||
2437 | #define wiphy_err(wiphy, format, args...) \ | ||
2438 | wiphy_printk(KERN_ERR, wiphy, format, ##args) | ||
2439 | #define wiphy_warn(wiphy, format, args...) \ | ||
2440 | wiphy_printk(KERN_WARNING, wiphy, format, ##args) | ||
2441 | #define wiphy_notice(wiphy, format, args...) \ | ||
2442 | wiphy_printk(KERN_NOTICE, wiphy, format, ##args) | ||
2443 | #define wiphy_info(wiphy, format, args...) \ | ||
2444 | wiphy_printk(KERN_INFO, wiphy, format, ##args) | ||
2445 | |||
2446 | int wiphy_debug(const struct wiphy *wiphy, const char *format, ...) | ||
2447 | __attribute__ ((format (printf, 2, 3))); | ||
2448 | |||
2449 | #if defined(DEBUG) | ||
2450 | #define wiphy_dbg(wiphy, format, args...) \ | ||
2451 | wiphy_printk(KERN_DEBUG, wiphy, format, ##args) | ||
2452 | #elif defined(CONFIG_DYNAMIC_DEBUG) | ||
2453 | #define wiphy_dbg(wiphy, format, args...) \ | ||
2454 | dynamic_pr_debug("%s: " format, wiphy_name(wiphy), ##args) | ||
2455 | #else | ||
2456 | #define wiphy_dbg(wiphy, format, args...) \ | ||
2457 | ({ \ | ||
2458 | if (0) \ | ||
2459 | wiphy_printk(KERN_DEBUG, wiphy, format, ##args); \ | ||
2460 | 0; \ | ||
2461 | }) | ||
2462 | #endif | ||
2463 | |||
2464 | #if defined(VERBOSE_DEBUG) | ||
2465 | #define wiphy_vdbg wiphy_dbg | ||
2466 | #else | ||
2467 | |||
2468 | #define wiphy_vdbg(wiphy, format, args...) \ | ||
2469 | ({ \ | ||
2470 | if (0) \ | ||
2471 | wiphy_printk(KERN_DEBUG, wiphy, format, ##args); \ | ||
2472 | 0; \ | ||
2473 | }) | ||
2474 | #endif | ||
2475 | |||
2476 | /* | ||
2477 | * wiphy_WARN() acts like wiphy_printk(), but with the key difference | ||
2478 | * of using a WARN/WARN_ON to get the message out, including the | ||
2479 | * file/line information and a backtrace. | ||
2480 | */ | ||
2481 | #define wiphy_WARN(wiphy, format, args...) \ | ||
2482 | WARN(1, "wiphy: %s\n" format, wiphy_name(wiphy), ##args); | ||
2483 | |||
2484 | #endif | ||
2485 | |||
2423 | #endif /* __NET_CFG80211_H */ | 2486 | #endif /* __NET_CFG80211_H */ |
diff --git a/include/net/lib80211.h b/include/net/lib80211.h index fb4e2784857d..848cce1bb7a5 100644 --- a/include/net/lib80211.h +++ b/include/net/lib80211.h | |||
@@ -54,9 +54,6 @@ struct lib80211_crypto_ops { | |||
54 | /* deinitialize crypto context and free allocated private data */ | 54 | /* deinitialize crypto context and free allocated private data */ |
55 | void (*deinit) (void *priv); | 55 | void (*deinit) (void *priv); |
56 | 56 | ||
57 | int (*build_iv) (struct sk_buff * skb, int hdr_len, | ||
58 | u8 *key, int keylen, void *priv); | ||
59 | |||
60 | /* encrypt/decrypt return < 0 on error or >= 0 on success. The return | 57 | /* encrypt/decrypt return < 0 on error or >= 0 on success. The return |
61 | * value from decrypt_mpdu is passed as the keyidx value for | 58 | * value from decrypt_mpdu is passed as the keyidx value for |
62 | * decrypt_msdu. skb must have enough head and tail room for the | 59 | * decrypt_msdu. skb must have enough head and tail room for the |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index 837353bfcb20..b0787a1dea90 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -194,7 +194,9 @@ enum ieee80211_bss_change { | |||
194 | * if the hardware cannot handle this it must set the | 194 | * if the hardware cannot handle this it must set the |
195 | * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag | 195 | * IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE hardware flag |
196 | * @dtim_period: num of beacons before the next DTIM, for beaconing, | 196 | * @dtim_period: num of beacons before the next DTIM, for beaconing, |
197 | * not valid in station mode (cf. hw conf ps_dtim_period) | 197 | * valid in station mode only while @assoc is true and if also |
198 | * requested by %IEEE80211_HW_NEED_DTIM_PERIOD (cf. also hw conf | ||
199 | * @ps_dtim_period) | ||
198 | * @timestamp: beacon timestamp | 200 | * @timestamp: beacon timestamp |
199 | * @beacon_int: beacon interval | 201 | * @beacon_int: beacon interval |
200 | * @assoc_capability: capabilities taken from assoc resp | 202 | * @assoc_capability: capabilities taken from assoc resp |
@@ -625,11 +627,14 @@ struct ieee80211_rx_status { | |||
625 | * may turn the device off as much as possible. Typically, this flag will | 627 | * may turn the device off as much as possible. Typically, this flag will |
626 | * be set when an interface is set UP but not associated or scanning, but | 628 | * be set when an interface is set UP but not associated or scanning, but |
627 | * it can also be unset in that case when monitor interfaces are active. | 629 | * it can also be unset in that case when monitor interfaces are active. |
630 | * @IEEE80211_CONF_OFFCHANNEL: The device is currently not on its main | ||
631 | * operating channel. | ||
628 | */ | 632 | */ |
629 | enum ieee80211_conf_flags { | 633 | enum ieee80211_conf_flags { |
630 | IEEE80211_CONF_MONITOR = (1<<0), | 634 | IEEE80211_CONF_MONITOR = (1<<0), |
631 | IEEE80211_CONF_PS = (1<<1), | 635 | IEEE80211_CONF_PS = (1<<1), |
632 | IEEE80211_CONF_IDLE = (1<<2), | 636 | IEEE80211_CONF_IDLE = (1<<2), |
637 | IEEE80211_CONF_OFFCHANNEL = (1<<3), | ||
633 | }; | 638 | }; |
634 | 639 | ||
635 | 640 | ||
@@ -1024,6 +1029,9 @@ enum ieee80211_tkip_key_type { | |||
1024 | * connection quality related parameters, such as the RSSI level and | 1029 | * connection quality related parameters, such as the RSSI level and |
1025 | * provide notifications if configured trigger levels are reached. | 1030 | * provide notifications if configured trigger levels are reached. |
1026 | * | 1031 | * |
1032 | * @IEEE80211_HW_NEED_DTIM_PERIOD: | ||
1033 | * This device needs to know the DTIM period for the BSS before | ||
1034 | * associating. | ||
1027 | */ | 1035 | */ |
1028 | enum ieee80211_hw_flags { | 1036 | enum ieee80211_hw_flags { |
1029 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, | 1037 | IEEE80211_HW_HAS_RATE_CONTROL = 1<<0, |
@@ -1033,7 +1041,7 @@ enum ieee80211_hw_flags { | |||
1033 | IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4, | 1041 | IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE = 1<<4, |
1034 | IEEE80211_HW_SIGNAL_UNSPEC = 1<<5, | 1042 | IEEE80211_HW_SIGNAL_UNSPEC = 1<<5, |
1035 | IEEE80211_HW_SIGNAL_DBM = 1<<6, | 1043 | IEEE80211_HW_SIGNAL_DBM = 1<<6, |
1036 | /* use this hole */ | 1044 | IEEE80211_HW_NEED_DTIM_PERIOD = 1<<7, |
1037 | IEEE80211_HW_SPECTRUM_MGMT = 1<<8, | 1045 | IEEE80211_HW_SPECTRUM_MGMT = 1<<8, |
1038 | IEEE80211_HW_AMPDU_AGGREGATION = 1<<9, | 1046 | IEEE80211_HW_AMPDU_AGGREGATION = 1<<9, |
1039 | IEEE80211_HW_SUPPORTS_PS = 1<<10, | 1047 | IEEE80211_HW_SUPPORTS_PS = 1<<10, |