| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Merged with mainline ieee80211.h in Aug 2004. Original ieee802_11 |
|---|
| 3 | 4 | * remains copyright by the original authors |
|---|
| .. | .. |
|---|
| 12 | 13 | * Adaption to a generic IEEE 802.11 stack by James Ketrenos |
|---|
| 13 | 14 | * <jketreno@linux.intel.com> |
|---|
| 14 | 15 | * Copyright (c) 2004-2005, Intel Corporation |
|---|
| 15 | | - * |
|---|
| 16 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 17 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 18 | | - * published by the Free Software Foundation. See README and COPYING for |
|---|
| 19 | | - * more details. |
|---|
| 20 | 16 | * |
|---|
| 21 | 17 | * API Version History |
|---|
| 22 | 18 | * 1.0.x -- Initial version |
|---|
| .. | .. |
|---|
| 64 | 60 | extern u32 libipw_debug_level; |
|---|
| 65 | 61 | #define LIBIPW_DEBUG(level, fmt, args...) \ |
|---|
| 66 | 62 | do { if (libipw_debug_level & (level)) \ |
|---|
| 67 | | - printk(KERN_DEBUG "libipw: %c %s " fmt, \ |
|---|
| 68 | | - in_interrupt() ? 'I' : 'U', __func__ , ## args); } while (0) |
|---|
| 63 | + printk(KERN_DEBUG "libipw: %s " fmt, __func__ , ## args); } while (0) |
|---|
| 69 | 64 | #else |
|---|
| 70 | 65 | #define LIBIPW_DEBUG(level, fmt, args...) do {} while (0) |
|---|
| 71 | 66 | #endif /* CONFIG_LIBIPW_DEBUG */ |
|---|
| .. | .. |
|---|
| 338 | 333 | __le16 frame_ctl; |
|---|
| 339 | 334 | __le16 duration_id; |
|---|
| 340 | 335 | u8 addr1[ETH_ALEN]; |
|---|
| 341 | | - u8 payload[0]; |
|---|
| 336 | + u8 payload[]; |
|---|
| 342 | 337 | } __packed; |
|---|
| 343 | 338 | |
|---|
| 344 | 339 | struct libipw_hdr_2addr { |
|---|
| .. | .. |
|---|
| 346 | 341 | __le16 duration_id; |
|---|
| 347 | 342 | u8 addr1[ETH_ALEN]; |
|---|
| 348 | 343 | u8 addr2[ETH_ALEN]; |
|---|
| 349 | | - u8 payload[0]; |
|---|
| 344 | + u8 payload[]; |
|---|
| 350 | 345 | } __packed; |
|---|
| 351 | 346 | |
|---|
| 352 | 347 | struct libipw_hdr_3addr { |
|---|
| .. | .. |
|---|
| 356 | 351 | u8 addr2[ETH_ALEN]; |
|---|
| 357 | 352 | u8 addr3[ETH_ALEN]; |
|---|
| 358 | 353 | __le16 seq_ctl; |
|---|
| 359 | | - u8 payload[0]; |
|---|
| 354 | + u8 payload[]; |
|---|
| 360 | 355 | } __packed; |
|---|
| 361 | 356 | |
|---|
| 362 | 357 | struct libipw_hdr_4addr { |
|---|
| .. | .. |
|---|
| 367 | 362 | u8 addr3[ETH_ALEN]; |
|---|
| 368 | 363 | __le16 seq_ctl; |
|---|
| 369 | 364 | u8 addr4[ETH_ALEN]; |
|---|
| 370 | | - u8 payload[0]; |
|---|
| 365 | + u8 payload[]; |
|---|
| 371 | 366 | } __packed; |
|---|
| 372 | 367 | |
|---|
| 373 | 368 | struct libipw_hdr_3addrqos { |
|---|
| .. | .. |
|---|
| 384 | 379 | struct libipw_info_element { |
|---|
| 385 | 380 | u8 id; |
|---|
| 386 | 381 | u8 len; |
|---|
| 387 | | - u8 data[0]; |
|---|
| 382 | + u8 data[]; |
|---|
| 388 | 383 | } __packed; |
|---|
| 389 | 384 | |
|---|
| 390 | 385 | /* |
|---|
| .. | .. |
|---|
| 410 | 405 | __le16 transaction; |
|---|
| 411 | 406 | __le16 status; |
|---|
| 412 | 407 | /* challenge */ |
|---|
| 413 | | - struct libipw_info_element info_element[0]; |
|---|
| 408 | + struct libipw_info_element info_element[]; |
|---|
| 414 | 409 | } __packed; |
|---|
| 415 | 410 | |
|---|
| 416 | 411 | struct libipw_channel_switch { |
|---|
| .. | .. |
|---|
| 446 | 441 | struct libipw_probe_request { |
|---|
| 447 | 442 | struct libipw_hdr_3addr header; |
|---|
| 448 | 443 | /* SSID, supported rates */ |
|---|
| 449 | | - struct libipw_info_element info_element[0]; |
|---|
| 444 | + struct libipw_info_element info_element[]; |
|---|
| 450 | 445 | } __packed; |
|---|
| 451 | 446 | |
|---|
| 452 | 447 | struct libipw_probe_response { |
|---|
| .. | .. |
|---|
| 456 | 451 | __le16 capability; |
|---|
| 457 | 452 | /* SSID, supported rates, FH params, DS params, |
|---|
| 458 | 453 | * CF params, IBSS params, TIM (if beacon), RSN */ |
|---|
| 459 | | - struct libipw_info_element info_element[0]; |
|---|
| 454 | + struct libipw_info_element info_element[]; |
|---|
| 460 | 455 | } __packed; |
|---|
| 461 | 456 | |
|---|
| 462 | 457 | /* Alias beacon for probe_response */ |
|---|
| .. | .. |
|---|
| 467 | 462 | __le16 capability; |
|---|
| 468 | 463 | __le16 listen_interval; |
|---|
| 469 | 464 | /* SSID, supported rates, RSN */ |
|---|
| 470 | | - struct libipw_info_element info_element[0]; |
|---|
| 465 | + struct libipw_info_element info_element[]; |
|---|
| 471 | 466 | } __packed; |
|---|
| 472 | 467 | |
|---|
| 473 | 468 | struct libipw_reassoc_request { |
|---|
| .. | .. |
|---|
| 475 | 470 | __le16 capability; |
|---|
| 476 | 471 | __le16 listen_interval; |
|---|
| 477 | 472 | u8 current_ap[ETH_ALEN]; |
|---|
| 478 | | - struct libipw_info_element info_element[0]; |
|---|
| 473 | + struct libipw_info_element info_element[]; |
|---|
| 479 | 474 | } __packed; |
|---|
| 480 | 475 | |
|---|
| 481 | 476 | struct libipw_assoc_response { |
|---|
| .. | .. |
|---|
| 484 | 479 | __le16 status; |
|---|
| 485 | 480 | __le16 aid; |
|---|
| 486 | 481 | /* supported rates */ |
|---|
| 487 | | - struct libipw_info_element info_element[0]; |
|---|
| 482 | + struct libipw_info_element info_element[]; |
|---|
| 488 | 483 | } __packed; |
|---|
| 489 | 484 | |
|---|
| 490 | 485 | struct libipw_txb { |
|---|
| .. | .. |
|---|
| 494 | 489 | u8 reserved; |
|---|
| 495 | 490 | u16 frag_size; |
|---|
| 496 | 491 | u16 payload_size; |
|---|
| 497 | | - struct sk_buff *fragments[0]; |
|---|
| 492 | + struct sk_buff *fragments[]; |
|---|
| 498 | 493 | }; |
|---|
| 499 | 494 | |
|---|
| 500 | 495 | /* SWEEP TABLE ENTRIES NUMBER */ |
|---|
| .. | .. |
|---|
| 598 | 593 | struct libipw_info_element ie; |
|---|
| 599 | 594 | u8 owner[ETH_ALEN]; |
|---|
| 600 | 595 | u8 recovery_interval; |
|---|
| 601 | | - struct libipw_channel_map channel_map[0]; |
|---|
| 596 | + struct libipw_channel_map channel_map[]; |
|---|
| 602 | 597 | }; |
|---|
| 603 | 598 | |
|---|
| 604 | 599 | struct libipw_csa { |
|---|
| .. | .. |
|---|
| 834 | 829 | |
|---|
| 835 | 830 | /* This must be the last item so that it points to the data |
|---|
| 836 | 831 | * allocated beyond this structure by alloc_libipw */ |
|---|
| 837 | | - u8 priv[0]; |
|---|
| 832 | + u8 priv[]; |
|---|
| 838 | 833 | }; |
|---|
| 839 | 834 | |
|---|
| 840 | 835 | #define IEEE_A (1<<0) |
|---|