aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ipw2x00
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-06-02 14:10:09 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-03 06:18:23 -0400
commitba2d3587912f82d1ab4367975b1df460db60fb1e (patch)
tree1e4e04caf23274bb4e39edbfc5713b4856326953 /drivers/net/wireless/ipw2x00
parent1273d97674a1782ff55b823aa6c40aea9b538aaf (diff)
drivers/net: use __packed annotation
cleanup patch. Use new __packed annotation in drivers/net/ Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/wireless/ipw2x00')
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.c4
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2100.h16
-rw-r--r--drivers/net/wireless/ipw2x00/ipw2200.h122
-rw-r--r--drivers/net/wireless/ipw2x00/libipw.h62
4 files changed, 102 insertions, 102 deletions
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.c b/drivers/net/wireless/ipw2x00/ipw2100.c
index 0bd4dfa59a8a..4264fc091ada 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
@@ -5233,7 +5233,7 @@ struct security_info_params {
5233 u8 auth_mode; 5233 u8 auth_mode;
5234 u8 replay_counters_number; 5234 u8 replay_counters_number;
5235 u8 unicast_using_group; 5235 u8 unicast_using_group;
5236} __attribute__ ((packed)); 5236} __packed;
5237 5237
5238static int ipw2100_set_security_information(struct ipw2100_priv *priv, 5238static int ipw2100_set_security_information(struct ipw2100_priv *priv,
5239 int auth_mode, 5239 int auth_mode,
@@ -8475,7 +8475,7 @@ struct ipw2100_fw_header {
8475 short mode; 8475 short mode;
8476 unsigned int fw_size; 8476 unsigned int fw_size;
8477 unsigned int uc_size; 8477 unsigned int uc_size;
8478} __attribute__ ((packed)); 8478} __packed;
8479 8479
8480static int ipw2100_mod_firmware_load(struct ipw2100_fw *fw) 8480static int ipw2100_mod_firmware_load(struct ipw2100_fw *fw)
8481{ 8481{
diff --git a/drivers/net/wireless/ipw2x00/ipw2100.h b/drivers/net/wireless/ipw2x00/ipw2100.h
index 1eab0d698f4d..838002b4881e 100644
--- a/drivers/net/wireless/ipw2x00/ipw2100.h
+++ b/drivers/net/wireless/ipw2x00/ipw2100.h
@@ -164,7 +164,7 @@ struct bd_status {
164 } fields; 164 } fields;
165 u8 field; 165 u8 field;
166 } info; 166 } info;
167} __attribute__ ((packed)); 167} __packed;
168 168
169struct ipw2100_bd { 169struct ipw2100_bd {
170 u32 host_addr; 170 u32 host_addr;
@@ -174,7 +174,7 @@ struct ipw2100_bd {
174 * 1st TBD) */ 174 * 1st TBD) */
175 u8 num_fragments; 175 u8 num_fragments;
176 u8 reserved[6]; 176 u8 reserved[6];
177} __attribute__ ((packed)); 177} __packed;
178 178
179#define IPW_BD_QUEUE_LENGTH(n) (1<<n) 179#define IPW_BD_QUEUE_LENGTH(n) (1<<n)
180#define IPW_BD_ALIGNMENT(L) (L*sizeof(struct ipw2100_bd)) 180#define IPW_BD_ALIGNMENT(L) (L*sizeof(struct ipw2100_bd))
@@ -232,7 +232,7 @@ struct ipw2100_status {
232#define IPW_STATUS_FLAG_WEP_ENCRYPTED (1<<1) 232#define IPW_STATUS_FLAG_WEP_ENCRYPTED (1<<1)
233#define IPW_STATUS_FLAG_CRC_ERROR (1<<2) 233#define IPW_STATUS_FLAG_CRC_ERROR (1<<2)
234 u8 rssi; 234 u8 rssi;
235} __attribute__ ((packed)); 235} __packed;
236 236
237struct ipw2100_status_queue { 237struct ipw2100_status_queue {
238 /* driver (virtual) pointer to queue */ 238 /* driver (virtual) pointer to queue */
@@ -293,7 +293,7 @@ struct ipw2100_cmd_header {
293 u32 reserved1[3]; 293 u32 reserved1[3];
294 u32 *ordinal1_ptr; 294 u32 *ordinal1_ptr;
295 u32 *ordinal2_ptr; 295 u32 *ordinal2_ptr;
296} __attribute__ ((packed)); 296} __packed;
297 297
298struct ipw2100_data_header { 298struct ipw2100_data_header {
299 u32 host_command_reg; 299 u32 host_command_reg;
@@ -307,7 +307,7 @@ struct ipw2100_data_header {
307 u8 src_addr[ETH_ALEN]; 307 u8 src_addr[ETH_ALEN];
308 u8 dst_addr[ETH_ALEN]; 308 u8 dst_addr[ETH_ALEN];
309 u16 fragment_size; 309 u16 fragment_size;
310} __attribute__ ((packed)); 310} __packed;
311 311
312/* Host command data structure */ 312/* Host command data structure */
313struct host_command { 313struct host_command {
@@ -316,7 +316,7 @@ struct host_command {
316 u32 host_command_sequence; // UNIQUE COMMAND NUMBER (ID) 316 u32 host_command_sequence; // UNIQUE COMMAND NUMBER (ID)
317 u32 host_command_length; // LENGTH 317 u32 host_command_length; // LENGTH
318 u32 host_command_parameters[HOST_COMMAND_PARAMS_REG_LEN]; // COMMAND PARAMETERS 318 u32 host_command_parameters[HOST_COMMAND_PARAMS_REG_LEN]; // COMMAND PARAMETERS
319} __attribute__ ((packed)); 319} __packed;
320 320
321typedef enum { 321typedef enum {
322 POWER_ON_RESET, 322 POWER_ON_RESET,
@@ -382,7 +382,7 @@ struct ipw2100_notification {
382 u32 hnhdr_size; /* size in bytes of data 382 u32 hnhdr_size; /* size in bytes of data
383 or number of entries, if table. 383 or number of entries, if table.
384 Does NOT include header */ 384 Does NOT include header */
385} __attribute__ ((packed)); 385} __packed;
386 386
387#define MAX_KEY_SIZE 16 387#define MAX_KEY_SIZE 16
388#define MAX_KEYS 8 388#define MAX_KEYS 8
@@ -814,7 +814,7 @@ struct ipw2100_rx {
814 struct ipw2100_notification notification; 814 struct ipw2100_notification notification;
815 struct ipw2100_cmd_header command; 815 struct ipw2100_cmd_header command;
816 } rx_data; 816 } rx_data;
817} __attribute__ ((packed)); 817} __packed;
818 818
819/* Bit 0-7 are for 802.11b tx rates - . Bit 5-7 are reserved */ 819/* Bit 0-7 are for 802.11b tx rates - . Bit 5-7 are reserved */
820#define TX_RATE_1_MBIT 0x0001 820#define TX_RATE_1_MBIT 0x0001
diff --git a/drivers/net/wireless/ipw2x00/ipw2200.h b/drivers/net/wireless/ipw2x00/ipw2200.h
index bf0eeb2e873a..d7d049c7a4fa 100644
--- a/drivers/net/wireless/ipw2x00/ipw2200.h
+++ b/drivers/net/wireless/ipw2x00/ipw2200.h
@@ -388,7 +388,7 @@ struct clx2_queue {
388 dma_addr_t dma_addr; /**< physical addr for BD's */ 388 dma_addr_t dma_addr; /**< physical addr for BD's */
389 int low_mark; /**< low watermark, resume queue if free space more than this */ 389 int low_mark; /**< low watermark, resume queue if free space more than this */
390 int high_mark; /**< high watermark, stop queue if free space less than this */ 390 int high_mark; /**< high watermark, stop queue if free space less than this */
391} __attribute__ ((packed)); /* XXX */ 391} __packed; /* XXX */
392 392
393struct machdr32 { 393struct machdr32 {
394 __le16 frame_ctl; 394 __le16 frame_ctl;
@@ -399,7 +399,7 @@ struct machdr32 {
399 __le16 seq_ctrl; // more endians! 399 __le16 seq_ctrl; // more endians!
400 u8 addr4[MACADRR_BYTE_LEN]; 400 u8 addr4[MACADRR_BYTE_LEN];
401 __le16 qos_ctrl; 401 __le16 qos_ctrl;
402} __attribute__ ((packed)); 402} __packed;
403 403
404struct machdr30 { 404struct machdr30 {
405 __le16 frame_ctl; 405 __le16 frame_ctl;
@@ -409,7 +409,7 @@ struct machdr30 {
409 u8 addr3[MACADRR_BYTE_LEN]; 409 u8 addr3[MACADRR_BYTE_LEN];
410 __le16 seq_ctrl; // more endians! 410 __le16 seq_ctrl; // more endians!
411 u8 addr4[MACADRR_BYTE_LEN]; 411 u8 addr4[MACADRR_BYTE_LEN];
412} __attribute__ ((packed)); 412} __packed;
413 413
414struct machdr26 { 414struct machdr26 {
415 __le16 frame_ctl; 415 __le16 frame_ctl;
@@ -419,7 +419,7 @@ struct machdr26 {
419 u8 addr3[MACADRR_BYTE_LEN]; 419 u8 addr3[MACADRR_BYTE_LEN];
420 __le16 seq_ctrl; // more endians! 420 __le16 seq_ctrl; // more endians!
421 __le16 qos_ctrl; 421 __le16 qos_ctrl;
422} __attribute__ ((packed)); 422} __packed;
423 423
424struct machdr24 { 424struct machdr24 {
425 __le16 frame_ctl; 425 __le16 frame_ctl;
@@ -428,20 +428,20 @@ struct machdr24 {
428 u8 addr2[MACADRR_BYTE_LEN]; 428 u8 addr2[MACADRR_BYTE_LEN];
429 u8 addr3[MACADRR_BYTE_LEN]; 429 u8 addr3[MACADRR_BYTE_LEN];
430 __le16 seq_ctrl; // more endians! 430 __le16 seq_ctrl; // more endians!
431} __attribute__ ((packed)); 431} __packed;
432 432
433// TX TFD with 32 byte MAC Header 433// TX TFD with 32 byte MAC Header
434struct tx_tfd_32 { 434struct tx_tfd_32 {
435 struct machdr32 mchdr; // 32 435 struct machdr32 mchdr; // 32
436 __le32 uivplaceholder[2]; // 8 436 __le32 uivplaceholder[2]; // 8
437} __attribute__ ((packed)); 437} __packed;
438 438
439// TX TFD with 30 byte MAC Header 439// TX TFD with 30 byte MAC Header
440struct tx_tfd_30 { 440struct tx_tfd_30 {
441 struct machdr30 mchdr; // 30 441 struct machdr30 mchdr; // 30
442 u8 reserved[2]; // 2 442 u8 reserved[2]; // 2
443 __le32 uivplaceholder[2]; // 8 443 __le32 uivplaceholder[2]; // 8
444} __attribute__ ((packed)); 444} __packed;
445 445
446// tx tfd with 26 byte mac header 446// tx tfd with 26 byte mac header
447struct tx_tfd_26 { 447struct tx_tfd_26 {
@@ -449,14 +449,14 @@ struct tx_tfd_26 {
449 u8 reserved1[2]; // 2 449 u8 reserved1[2]; // 2
450 __le32 uivplaceholder[2]; // 8 450 __le32 uivplaceholder[2]; // 8
451 u8 reserved2[4]; // 4 451 u8 reserved2[4]; // 4
452} __attribute__ ((packed)); 452} __packed;
453 453
454// tx tfd with 24 byte mac header 454// tx tfd with 24 byte mac header
455struct tx_tfd_24 { 455struct tx_tfd_24 {
456 struct machdr24 mchdr; // 24 456 struct machdr24 mchdr; // 24
457 __le32 uivplaceholder[2]; // 8 457 __le32 uivplaceholder[2]; // 8
458 u8 reserved[8]; // 8 458 u8 reserved[8]; // 8
459} __attribute__ ((packed)); 459} __packed;
460 460
461#define DCT_WEP_KEY_FIELD_LENGTH 16 461#define DCT_WEP_KEY_FIELD_LENGTH 16
462 462
@@ -465,7 +465,7 @@ struct tfd_command {
465 u8 length; 465 u8 length;
466 __le16 reserved; 466 __le16 reserved;
467 u8 payload[0]; 467 u8 payload[0];
468} __attribute__ ((packed)); 468} __packed;
469 469
470struct tfd_data { 470struct tfd_data {
471 /* Header */ 471 /* Header */
@@ -504,14 +504,14 @@ struct tfd_data {
504 __le32 num_chunks; 504 __le32 num_chunks;
505 __le32 chunk_ptr[NUM_TFD_CHUNKS]; 505 __le32 chunk_ptr[NUM_TFD_CHUNKS];
506 __le16 chunk_len[NUM_TFD_CHUNKS]; 506 __le16 chunk_len[NUM_TFD_CHUNKS];
507} __attribute__ ((packed)); 507} __packed;
508 508
509struct txrx_control_flags { 509struct txrx_control_flags {
510 u8 message_type; 510 u8 message_type;
511 u8 rx_seq_num; 511 u8 rx_seq_num;
512 u8 control_bits; 512 u8 control_bits;
513 u8 reserved; 513 u8 reserved;
514} __attribute__ ((packed)); 514} __packed;
515 515
516#define TFD_SIZE 128 516#define TFD_SIZE 128
517#define TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH (TFD_SIZE - sizeof(struct txrx_control_flags)) 517#define TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH (TFD_SIZE - sizeof(struct txrx_control_flags))
@@ -523,7 +523,7 @@ struct tfd_frame {
523 struct tfd_command cmd; 523 struct tfd_command cmd;
524 u8 raw[TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH]; 524 u8 raw[TFD_CMD_IMMEDIATE_PAYLOAD_LENGTH];
525 } u; 525 } u;
526} __attribute__ ((packed)); 526} __packed;
527 527
528typedef void destructor_func(const void *); 528typedef void destructor_func(const void *);
529 529
@@ -559,7 +559,7 @@ struct rate_histogram {
559 __le32 b[SUP_RATE_11B_MAX_NUM_CHANNELS]; 559 __le32 b[SUP_RATE_11B_MAX_NUM_CHANNELS];
560 __le32 g[SUP_RATE_11G_MAX_NUM_CHANNELS]; 560 __le32 g[SUP_RATE_11G_MAX_NUM_CHANNELS];
561 } failed; 561 } failed;
562} __attribute__ ((packed)); 562} __packed;
563 563
564/* statistics command response */ 564/* statistics command response */
565struct ipw_cmd_stats { 565struct ipw_cmd_stats {
@@ -586,13 +586,13 @@ struct ipw_cmd_stats {
586 __le16 rx_autodetec_no_ofdm; 586 __le16 rx_autodetec_no_ofdm;
587 __le16 rx_autodetec_no_barker; 587 __le16 rx_autodetec_no_barker;
588 __le16 reserved; 588 __le16 reserved;
589} __attribute__ ((packed)); 589} __packed;
590 590
591struct notif_channel_result { 591struct notif_channel_result {
592 u8 channel_num; 592 u8 channel_num;
593 struct ipw_cmd_stats stats; 593 struct ipw_cmd_stats stats;
594 u8 uReserved; 594 u8 uReserved;
595} __attribute__ ((packed)); 595} __packed;
596 596
597#define SCAN_COMPLETED_STATUS_COMPLETE 1 597#define SCAN_COMPLETED_STATUS_COMPLETE 1
598#define SCAN_COMPLETED_STATUS_ABORTED 2 598#define SCAN_COMPLETED_STATUS_ABORTED 2
@@ -602,24 +602,24 @@ struct notif_scan_complete {
602 u8 num_channels; 602 u8 num_channels;
603 u8 status; 603 u8 status;
604 u8 reserved; 604 u8 reserved;
605} __attribute__ ((packed)); 605} __packed;
606 606
607struct notif_frag_length { 607struct notif_frag_length {
608 __le16 frag_length; 608 __le16 frag_length;
609 __le16 reserved; 609 __le16 reserved;
610} __attribute__ ((packed)); 610} __packed;
611 611
612struct notif_beacon_state { 612struct notif_beacon_state {
613 __le32 state; 613 __le32 state;
614 __le32 number; 614 __le32 number;
615} __attribute__ ((packed)); 615} __packed;
616 616
617struct notif_tgi_tx_key { 617struct notif_tgi_tx_key {
618 u8 key_state; 618 u8 key_state;
619 u8 security_type; 619 u8 security_type;
620 u8 station_index; 620 u8 station_index;
621 u8 reserved; 621 u8 reserved;
622} __attribute__ ((packed)); 622} __packed;
623 623
624#define SILENCE_OVER_THRESH (1) 624#define SILENCE_OVER_THRESH (1)
625#define SILENCE_UNDER_THRESH (2) 625#define SILENCE_UNDER_THRESH (2)
@@ -631,25 +631,25 @@ struct notif_link_deterioration {
631 struct rate_histogram histogram; 631 struct rate_histogram histogram;
632 u8 silence_notification_type; /* SILENCE_OVER/UNDER_THRESH */ 632 u8 silence_notification_type; /* SILENCE_OVER/UNDER_THRESH */
633 __le16 silence_count; 633 __le16 silence_count;
634} __attribute__ ((packed)); 634} __packed;
635 635
636struct notif_association { 636struct notif_association {
637 u8 state; 637 u8 state;
638} __attribute__ ((packed)); 638} __packed;
639 639
640struct notif_authenticate { 640struct notif_authenticate {
641 u8 state; 641 u8 state;
642 struct machdr24 addr; 642 struct machdr24 addr;
643 __le16 status; 643 __le16 status;
644} __attribute__ ((packed)); 644} __packed;
645 645
646struct notif_calibration { 646struct notif_calibration {
647 u8 data[104]; 647 u8 data[104];
648} __attribute__ ((packed)); 648} __packed;
649 649
650struct notif_noise { 650struct notif_noise {
651 __le32 value; 651 __le32 value;
652} __attribute__ ((packed)); 652} __packed;
653 653
654struct ipw_rx_notification { 654struct ipw_rx_notification {
655 u8 reserved[8]; 655 u8 reserved[8];
@@ -669,7 +669,7 @@ struct ipw_rx_notification {
669 struct notif_noise noise; 669 struct notif_noise noise;
670 u8 raw[0]; 670 u8 raw[0];
671 } u; 671 } u;
672} __attribute__ ((packed)); 672} __packed;
673 673
674struct ipw_rx_frame { 674struct ipw_rx_frame {
675 __le32 reserved1; 675 __le32 reserved1;
@@ -692,14 +692,14 @@ struct ipw_rx_frame {
692 u8 rtscts_seen; // 0x1 RTS seen ; 0x2 CTS seen 692 u8 rtscts_seen; // 0x1 RTS seen ; 0x2 CTS seen
693 __le16 length; 693 __le16 length;
694 u8 data[0]; 694 u8 data[0];
695} __attribute__ ((packed)); 695} __packed;
696 696
697struct ipw_rx_header { 697struct ipw_rx_header {
698 u8 message_type; 698 u8 message_type;
699 u8 rx_seq_num; 699 u8 rx_seq_num;
700 u8 control_bits; 700 u8 control_bits;
701 u8 reserved; 701 u8 reserved;
702} __attribute__ ((packed)); 702} __packed;
703 703
704struct ipw_rx_packet { 704struct ipw_rx_packet {
705 struct ipw_rx_header header; 705 struct ipw_rx_header header;
@@ -707,7 +707,7 @@ struct ipw_rx_packet {
707 struct ipw_rx_frame frame; 707 struct ipw_rx_frame frame;
708 struct ipw_rx_notification notification; 708 struct ipw_rx_notification notification;
709 } u; 709 } u;
710} __attribute__ ((packed)); 710} __packed;
711 711
712#define IPW_RX_NOTIFICATION_SIZE sizeof(struct ipw_rx_header) + 12 712#define IPW_RX_NOTIFICATION_SIZE sizeof(struct ipw_rx_header) + 12
713#define IPW_RX_FRAME_SIZE (unsigned int)(sizeof(struct ipw_rx_header) + \ 713#define IPW_RX_FRAME_SIZE (unsigned int)(sizeof(struct ipw_rx_header) + \
@@ -717,7 +717,7 @@ struct ipw_rx_mem_buffer {
717 dma_addr_t dma_addr; 717 dma_addr_t dma_addr;
718 struct sk_buff *skb; 718 struct sk_buff *skb;
719 struct list_head list; 719 struct list_head list;
720}; /* Not transferred over network, so not __attribute__ ((packed)) */ 720}; /* Not transferred over network, so not __packed */
721 721
722struct ipw_rx_queue { 722struct ipw_rx_queue {
723 struct ipw_rx_mem_buffer pool[RX_QUEUE_SIZE + RX_FREE_BUFFERS]; 723 struct ipw_rx_mem_buffer pool[RX_QUEUE_SIZE + RX_FREE_BUFFERS];
@@ -730,7 +730,7 @@ struct ipw_rx_queue {
730 struct list_head rx_free; /* Own an SKBs */ 730 struct list_head rx_free; /* Own an SKBs */
731 struct list_head rx_used; /* No SKB allocated */ 731 struct list_head rx_used; /* No SKB allocated */
732 spinlock_t lock; 732 spinlock_t lock;
733}; /* Not transferred over network, so not __attribute__ ((packed)) */ 733}; /* Not transferred over network, so not __packed */
734 734
735struct alive_command_responce { 735struct alive_command_responce {
736 u8 alive_command; 736 u8 alive_command;
@@ -745,21 +745,21 @@ struct alive_command_responce {
745 __le16 reserved4; 745 __le16 reserved4;
746 u8 time_stamp[5]; /* month, day, year, hours, minutes */ 746 u8 time_stamp[5]; /* month, day, year, hours, minutes */
747 u8 ucode_valid; 747 u8 ucode_valid;
748} __attribute__ ((packed)); 748} __packed;
749 749
750#define IPW_MAX_RATES 12 750#define IPW_MAX_RATES 12
751 751
752struct ipw_rates { 752struct ipw_rates {
753 u8 num_rates; 753 u8 num_rates;
754 u8 rates[IPW_MAX_RATES]; 754 u8 rates[IPW_MAX_RATES];
755} __attribute__ ((packed)); 755} __packed;
756 756
757struct command_block { 757struct command_block {
758 unsigned int control; 758 unsigned int control;
759 u32 source_addr; 759 u32 source_addr;
760 u32 dest_addr; 760 u32 dest_addr;
761 unsigned int status; 761 unsigned int status;
762} __attribute__ ((packed)); 762} __packed;
763 763
764#define CB_NUMBER_OF_ELEMENTS_SMALL 64 764#define CB_NUMBER_OF_ELEMENTS_SMALL 64
765struct fw_image_desc { 765struct fw_image_desc {
@@ -792,7 +792,7 @@ struct ipw_sys_config {
792 u8 accept_all_mgmt_frames; 792 u8 accept_all_mgmt_frames;
793 u8 pass_noise_stats_to_host; 793 u8 pass_noise_stats_to_host;
794 u8 reserved3; 794 u8 reserved3;
795} __attribute__ ((packed)); 795} __packed;
796 796
797struct ipw_multicast_addr { 797struct ipw_multicast_addr {
798 u8 num_of_multicast_addresses; 798 u8 num_of_multicast_addresses;
@@ -801,7 +801,7 @@ struct ipw_multicast_addr {
801 u8 mac2[6]; 801 u8 mac2[6];
802 u8 mac3[6]; 802 u8 mac3[6];
803 u8 mac4[6]; 803 u8 mac4[6];
804} __attribute__ ((packed)); 804} __packed;
805 805
806#define DCW_WEP_KEY_INDEX_MASK 0x03 /* bits [0:1] */ 806#define DCW_WEP_KEY_INDEX_MASK 0x03 /* bits [0:1] */
807#define DCW_WEP_KEY_SEC_TYPE_MASK 0x30 /* bits [4:5] */ 807#define DCW_WEP_KEY_SEC_TYPE_MASK 0x30 /* bits [4:5] */
@@ -822,7 +822,7 @@ struct ipw_wep_key {
822 u8 key_index; 822 u8 key_index;
823 u8 key_size; 823 u8 key_size;
824 u8 key[16]; 824 u8 key[16];
825} __attribute__ ((packed)); 825} __packed;
826 826
827struct ipw_tgi_tx_key { 827struct ipw_tgi_tx_key {
828 u8 key_id; 828 u8 key_id;
@@ -831,7 +831,7 @@ struct ipw_tgi_tx_key {
831 u8 flags; 831 u8 flags;
832 u8 key[16]; 832 u8 key[16];
833 __le32 tx_counter[2]; 833 __le32 tx_counter[2];
834} __attribute__ ((packed)); 834} __packed;
835 835
836#define IPW_SCAN_CHANNELS 54 836#define IPW_SCAN_CHANNELS 54
837 837
@@ -840,7 +840,7 @@ struct ipw_scan_request {
840 __le16 dwell_time; 840 __le16 dwell_time;
841 u8 channels_list[IPW_SCAN_CHANNELS]; 841 u8 channels_list[IPW_SCAN_CHANNELS];
842 u8 channels_reserved[3]; 842 u8 channels_reserved[3];
843} __attribute__ ((packed)); 843} __packed;
844 844
845enum { 845enum {
846 IPW_SCAN_PASSIVE_TILL_FIRST_BEACON_SCAN = 0, 846 IPW_SCAN_PASSIVE_TILL_FIRST_BEACON_SCAN = 0,
@@ -857,7 +857,7 @@ struct ipw_scan_request_ext {
857 u8 scan_type[IPW_SCAN_CHANNELS / 2]; 857 u8 scan_type[IPW_SCAN_CHANNELS / 2];
858 u8 reserved; 858 u8 reserved;
859 __le16 dwell_time[IPW_SCAN_TYPES]; 859 __le16 dwell_time[IPW_SCAN_TYPES];
860} __attribute__ ((packed)); 860} __packed;
861 861
862static inline u8 ipw_get_scan_type(struct ipw_scan_request_ext *scan, u8 index) 862static inline u8 ipw_get_scan_type(struct ipw_scan_request_ext *scan, u8 index)
863{ 863{
@@ -902,7 +902,7 @@ struct ipw_associate {
902 u8 smr; 902 u8 smr;
903 u8 reserved1; 903 u8 reserved1;
904 __le16 reserved2; 904 __le16 reserved2;
905} __attribute__ ((packed)); 905} __packed;
906 906
907struct ipw_supported_rates { 907struct ipw_supported_rates {
908 u8 ieee_mode; 908 u8 ieee_mode;
@@ -910,36 +910,36 @@ struct ipw_supported_rates {
910 u8 purpose; 910 u8 purpose;
911 u8 reserved; 911 u8 reserved;
912 u8 supported_rates[IPW_MAX_RATES]; 912 u8 supported_rates[IPW_MAX_RATES];
913} __attribute__ ((packed)); 913} __packed;
914 914
915struct ipw_rts_threshold { 915struct ipw_rts_threshold {
916 __le16 rts_threshold; 916 __le16 rts_threshold;
917 __le16 reserved; 917 __le16 reserved;
918} __attribute__ ((packed)); 918} __packed;
919 919
920struct ipw_frag_threshold { 920struct ipw_frag_threshold {
921 __le16 frag_threshold; 921 __le16 frag_threshold;
922 __le16 reserved; 922 __le16 reserved;
923} __attribute__ ((packed)); 923} __packed;
924 924
925struct ipw_retry_limit { 925struct ipw_retry_limit {
926 u8 short_retry_limit; 926 u8 short_retry_limit;
927 u8 long_retry_limit; 927 u8 long_retry_limit;
928 __le16 reserved; 928 __le16 reserved;
929} __attribute__ ((packed)); 929} __packed;
930 930
931struct ipw_dino_config { 931struct ipw_dino_config {
932 __le32 dino_config_addr; 932 __le32 dino_config_addr;
933 __le16 dino_config_size; 933 __le16 dino_config_size;
934 u8 dino_response; 934 u8 dino_response;
935 u8 reserved; 935 u8 reserved;
936} __attribute__ ((packed)); 936} __packed;
937 937
938struct ipw_aironet_info { 938struct ipw_aironet_info {
939 u8 id; 939 u8 id;
940 u8 length; 940 u8 length;
941 __le16 reserved; 941 __le16 reserved;
942} __attribute__ ((packed)); 942} __packed;
943 943
944struct ipw_rx_key { 944struct ipw_rx_key {
945 u8 station_index; 945 u8 station_index;
@@ -950,25 +950,25 @@ struct ipw_rx_key {
950 u8 station_address[6]; 950 u8 station_address[6];
951 u8 key_index; 951 u8 key_index;
952 u8 reserved; 952 u8 reserved;
953} __attribute__ ((packed)); 953} __packed;
954 954
955struct ipw_country_channel_info { 955struct ipw_country_channel_info {
956 u8 first_channel; 956 u8 first_channel;
957 u8 no_channels; 957 u8 no_channels;
958 s8 max_tx_power; 958 s8 max_tx_power;
959} __attribute__ ((packed)); 959} __packed;
960 960
961struct ipw_country_info { 961struct ipw_country_info {
962 u8 id; 962 u8 id;
963 u8 length; 963 u8 length;
964 u8 country_str[3]; 964 u8 country_str[3];
965 struct ipw_country_channel_info groups[7]; 965 struct ipw_country_channel_info groups[7];
966} __attribute__ ((packed)); 966} __packed;
967 967
968struct ipw_channel_tx_power { 968struct ipw_channel_tx_power {
969 u8 channel_number; 969 u8 channel_number;
970 s8 tx_power; 970 s8 tx_power;
971} __attribute__ ((packed)); 971} __packed;
972 972
973#define SCAN_ASSOCIATED_INTERVAL (HZ) 973#define SCAN_ASSOCIATED_INTERVAL (HZ)
974#define SCAN_INTERVAL (HZ / 10) 974#define SCAN_INTERVAL (HZ / 10)
@@ -979,18 +979,18 @@ struct ipw_tx_power {
979 u8 num_channels; 979 u8 num_channels;
980 u8 ieee_mode; 980 u8 ieee_mode;
981 struct ipw_channel_tx_power channels_tx_power[MAX_A_CHANNELS]; 981 struct ipw_channel_tx_power channels_tx_power[MAX_A_CHANNELS];
982} __attribute__ ((packed)); 982} __packed;
983 983
984struct ipw_rsn_capabilities { 984struct ipw_rsn_capabilities {
985 u8 id; 985 u8 id;
986 u8 length; 986 u8 length;
987 __le16 version; 987 __le16 version;
988} __attribute__ ((packed)); 988} __packed;
989 989
990struct ipw_sensitivity_calib { 990struct ipw_sensitivity_calib {
991 __le16 beacon_rssi_raw; 991 __le16 beacon_rssi_raw;
992 __le16 reserved; 992 __le16 reserved;
993} __attribute__ ((packed)); 993} __packed;
994 994
995/** 995/**
996 * Host command structure. 996 * Host command structure.
@@ -1019,7 +1019,7 @@ struct ipw_cmd { /* XXX */
1019 * nParams=(len+3)/4+status_len 1019 * nParams=(len+3)/4+status_len
1020 */ 1020 */
1021 u32 param[0]; 1021 u32 param[0];
1022} __attribute__ ((packed)); 1022} __packed;
1023 1023
1024#define STATUS_HCMD_ACTIVE (1<<0) /**< host command in progress */ 1024#define STATUS_HCMD_ACTIVE (1<<0) /**< host command in progress */
1025 1025
@@ -1114,7 +1114,7 @@ struct ipw_event { /* XXX */
1114 u32 event; 1114 u32 event;
1115 u32 time; 1115 u32 time;
1116 u32 data; 1116 u32 data;
1117} __attribute__ ((packed)); 1117} __packed;
1118 1118
1119struct ipw_fw_error { /* XXX */ 1119struct ipw_fw_error { /* XXX */
1120 unsigned long jiffies; 1120 unsigned long jiffies;
@@ -1125,7 +1125,7 @@ struct ipw_fw_error { /* XXX */
1125 struct ipw_error_elem *elem; 1125 struct ipw_error_elem *elem;
1126 struct ipw_event *log; 1126 struct ipw_event *log;
1127 u8 payload[0]; 1127 u8 payload[0];
1128} __attribute__ ((packed)); 1128} __packed;
1129 1129
1130#ifdef CONFIG_IPW2200_PROMISCUOUS 1130#ifdef CONFIG_IPW2200_PROMISCUOUS
1131 1131
@@ -1170,7 +1170,7 @@ struct ipw_rt_hdr {
1170 s8 rt_dbmnoise; 1170 s8 rt_dbmnoise;
1171 u8 rt_antenna; /* antenna number */ 1171 u8 rt_antenna; /* antenna number */
1172 u8 payload[0]; /* payload... */ 1172 u8 payload[0]; /* payload... */
1173} __attribute__ ((packed)); 1173} __packed;
1174#endif 1174#endif
1175 1175
1176struct ipw_priv { 1176struct ipw_priv {
@@ -1957,7 +1957,7 @@ enum {
1957struct ipw_fixed_rate { 1957struct ipw_fixed_rate {
1958 __le16 tx_rates; 1958 __le16 tx_rates;
1959 __le16 reserved; 1959 __le16 reserved;
1960} __attribute__ ((packed)); 1960} __packed;
1961 1961
1962#define IPW_INDIRECT_ADDR_MASK (~0x3ul) 1962#define IPW_INDIRECT_ADDR_MASK (~0x3ul)
1963 1963
@@ -1966,14 +1966,14 @@ struct host_cmd {
1966 u8 len; 1966 u8 len;
1967 u16 reserved; 1967 u16 reserved;
1968 u32 *param; 1968 u32 *param;
1969} __attribute__ ((packed)); /* XXX */ 1969} __packed; /* XXX */
1970 1970
1971struct cmdlog_host_cmd { 1971struct cmdlog_host_cmd {
1972 u8 cmd; 1972 u8 cmd;
1973 u8 len; 1973 u8 len;
1974 __le16 reserved; 1974 __le16 reserved;
1975 char param[124]; 1975 char param[124];
1976} __attribute__ ((packed)); 1976} __packed;
1977 1977
1978struct ipw_cmd_log { 1978struct ipw_cmd_log {
1979 unsigned long jiffies; 1979 unsigned long jiffies;
diff --git a/drivers/net/wireless/ipw2x00/libipw.h b/drivers/net/wireless/ipw2x00/libipw.h
index 284b0e4cb815..4736861bc4f8 100644
--- a/drivers/net/wireless/ipw2x00/libipw.h
+++ b/drivers/net/wireless/ipw2x00/libipw.h
@@ -154,7 +154,7 @@ struct libipw_snap_hdr {
154 u8 ctrl; /* always 0x03 */ 154 u8 ctrl; /* always 0x03 */
155 u8 oui[P80211_OUI_LEN]; /* organizational universal id */ 155 u8 oui[P80211_OUI_LEN]; /* organizational universal id */
156 156
157} __attribute__ ((packed)); 157} __packed;
158 158
159#define SNAP_SIZE sizeof(struct libipw_snap_hdr) 159#define SNAP_SIZE sizeof(struct libipw_snap_hdr)
160 160
@@ -323,7 +323,7 @@ struct libipw_security {
323 u8 keys[WEP_KEYS][SCM_KEY_LEN]; 323 u8 keys[WEP_KEYS][SCM_KEY_LEN];
324 u8 level; 324 u8 level;
325 u16 flags; 325 u16 flags;
326} __attribute__ ((packed)); 326} __packed;
327 327
328/* 328/*
329 329
@@ -347,7 +347,7 @@ struct libipw_hdr_1addr {
347 __le16 duration_id; 347 __le16 duration_id;
348 u8 addr1[ETH_ALEN]; 348 u8 addr1[ETH_ALEN];
349 u8 payload[0]; 349 u8 payload[0];
350} __attribute__ ((packed)); 350} __packed;
351 351
352struct libipw_hdr_2addr { 352struct libipw_hdr_2addr {
353 __le16 frame_ctl; 353 __le16 frame_ctl;
@@ -355,7 +355,7 @@ struct libipw_hdr_2addr {
355 u8 addr1[ETH_ALEN]; 355 u8 addr1[ETH_ALEN];
356 u8 addr2[ETH_ALEN]; 356 u8 addr2[ETH_ALEN];
357 u8 payload[0]; 357 u8 payload[0];
358} __attribute__ ((packed)); 358} __packed;
359 359
360struct libipw_hdr_3addr { 360struct libipw_hdr_3addr {
361 __le16 frame_ctl; 361 __le16 frame_ctl;
@@ -365,7 +365,7 @@ struct libipw_hdr_3addr {
365 u8 addr3[ETH_ALEN]; 365 u8 addr3[ETH_ALEN];
366 __le16 seq_ctl; 366 __le16 seq_ctl;
367 u8 payload[0]; 367 u8 payload[0];
368} __attribute__ ((packed)); 368} __packed;
369 369
370struct libipw_hdr_4addr { 370struct libipw_hdr_4addr {
371 __le16 frame_ctl; 371 __le16 frame_ctl;
@@ -376,7 +376,7 @@ struct libipw_hdr_4addr {
376 __le16 seq_ctl; 376 __le16 seq_ctl;
377 u8 addr4[ETH_ALEN]; 377 u8 addr4[ETH_ALEN];
378 u8 payload[0]; 378 u8 payload[0];
379} __attribute__ ((packed)); 379} __packed;
380 380
381struct libipw_hdr_3addrqos { 381struct libipw_hdr_3addrqos {
382 __le16 frame_ctl; 382 __le16 frame_ctl;
@@ -387,13 +387,13 @@ struct libipw_hdr_3addrqos {
387 __le16 seq_ctl; 387 __le16 seq_ctl;
388 u8 payload[0]; 388 u8 payload[0];
389 __le16 qos_ctl; 389 __le16 qos_ctl;
390} __attribute__ ((packed)); 390} __packed;
391 391
392struct libipw_info_element { 392struct libipw_info_element {
393 u8 id; 393 u8 id;
394 u8 len; 394 u8 len;
395 u8 data[0]; 395 u8 data[0];
396} __attribute__ ((packed)); 396} __packed;
397 397
398/* 398/*
399 * These are the data types that can make up management packets 399 * These are the data types that can make up management packets
@@ -406,7 +406,7 @@ struct libipw_info_element {
406 u16 listen_interval; 406 u16 listen_interval;
407 struct { 407 struct {
408 u16 association_id:14, reserved:2; 408 u16 association_id:14, reserved:2;
409 } __attribute__ ((packed)); 409 } __packed;
410 u32 time_stamp[2]; 410 u32 time_stamp[2];
411 u16 reason; 411 u16 reason;
412 u16 status; 412 u16 status;
@@ -419,7 +419,7 @@ struct libipw_auth {
419 __le16 status; 419 __le16 status;
420 /* challenge */ 420 /* challenge */
421 struct libipw_info_element info_element[0]; 421 struct libipw_info_element info_element[0];
422} __attribute__ ((packed)); 422} __packed;
423 423
424struct libipw_channel_switch { 424struct libipw_channel_switch {
425 u8 id; 425 u8 id;
@@ -427,7 +427,7 @@ struct libipw_channel_switch {
427 u8 mode; 427 u8 mode;
428 u8 channel; 428 u8 channel;
429 u8 count; 429 u8 count;
430} __attribute__ ((packed)); 430} __packed;
431 431
432struct libipw_action { 432struct libipw_action {
433 struct libipw_hdr_3addr header; 433 struct libipw_hdr_3addr header;
@@ -441,12 +441,12 @@ struct libipw_action {
441 struct libipw_channel_switch channel_switch; 441 struct libipw_channel_switch channel_switch;
442 442
443 } format; 443 } format;
444} __attribute__ ((packed)); 444} __packed;
445 445
446struct libipw_disassoc { 446struct libipw_disassoc {
447 struct libipw_hdr_3addr header; 447 struct libipw_hdr_3addr header;
448 __le16 reason; 448 __le16 reason;
449} __attribute__ ((packed)); 449} __packed;
450 450
451/* Alias deauth for disassoc */ 451/* Alias deauth for disassoc */
452#define libipw_deauth libipw_disassoc 452#define libipw_deauth libipw_disassoc
@@ -455,7 +455,7 @@ struct libipw_probe_request {
455 struct libipw_hdr_3addr header; 455 struct libipw_hdr_3addr header;
456 /* SSID, supported rates */ 456 /* SSID, supported rates */
457 struct libipw_info_element info_element[0]; 457 struct libipw_info_element info_element[0];
458} __attribute__ ((packed)); 458} __packed;
459 459
460struct libipw_probe_response { 460struct libipw_probe_response {
461 struct libipw_hdr_3addr header; 461 struct libipw_hdr_3addr header;
@@ -465,7 +465,7 @@ struct libipw_probe_response {
465 /* SSID, supported rates, FH params, DS params, 465 /* SSID, supported rates, FH params, DS params,
466 * CF params, IBSS params, TIM (if beacon), RSN */ 466 * CF params, IBSS params, TIM (if beacon), RSN */
467 struct libipw_info_element info_element[0]; 467 struct libipw_info_element info_element[0];
468} __attribute__ ((packed)); 468} __packed;
469 469
470/* Alias beacon for probe_response */ 470/* Alias beacon for probe_response */
471#define libipw_beacon libipw_probe_response 471#define libipw_beacon libipw_probe_response
@@ -476,7 +476,7 @@ struct libipw_assoc_request {
476 __le16 listen_interval; 476 __le16 listen_interval;
477 /* SSID, supported rates, RSN */ 477 /* SSID, supported rates, RSN */
478 struct libipw_info_element info_element[0]; 478 struct libipw_info_element info_element[0];
479} __attribute__ ((packed)); 479} __packed;
480 480
481struct libipw_reassoc_request { 481struct libipw_reassoc_request {
482 struct libipw_hdr_3addr header; 482 struct libipw_hdr_3addr header;
@@ -484,7 +484,7 @@ struct libipw_reassoc_request {
484 __le16 listen_interval; 484 __le16 listen_interval;
485 u8 current_ap[ETH_ALEN]; 485 u8 current_ap[ETH_ALEN];
486 struct libipw_info_element info_element[0]; 486 struct libipw_info_element info_element[0];
487} __attribute__ ((packed)); 487} __packed;
488 488
489struct libipw_assoc_response { 489struct libipw_assoc_response {
490 struct libipw_hdr_3addr header; 490 struct libipw_hdr_3addr header;
@@ -493,7 +493,7 @@ struct libipw_assoc_response {
493 __le16 aid; 493 __le16 aid;
494 /* supported rates */ 494 /* supported rates */
495 struct libipw_info_element info_element[0]; 495 struct libipw_info_element info_element[0];
496} __attribute__ ((packed)); 496} __packed;
497 497
498struct libipw_txb { 498struct libipw_txb {
499 u8 nr_frags; 499 u8 nr_frags;
@@ -555,19 +555,19 @@ struct libipw_qos_information_element {
555 u8 qui_subtype; 555 u8 qui_subtype;
556 u8 version; 556 u8 version;
557 u8 ac_info; 557 u8 ac_info;
558} __attribute__ ((packed)); 558} __packed;
559 559
560struct libipw_qos_ac_parameter { 560struct libipw_qos_ac_parameter {
561 u8 aci_aifsn; 561 u8 aci_aifsn;
562 u8 ecw_min_max; 562 u8 ecw_min_max;
563 __le16 tx_op_limit; 563 __le16 tx_op_limit;
564} __attribute__ ((packed)); 564} __packed;
565 565
566struct libipw_qos_parameter_info { 566struct libipw_qos_parameter_info {
567 struct libipw_qos_information_element info_element; 567 struct libipw_qos_information_element info_element;
568 u8 reserved; 568 u8 reserved;
569 struct libipw_qos_ac_parameter ac_params_record[QOS_QUEUE_NUM]; 569 struct libipw_qos_ac_parameter ac_params_record[QOS_QUEUE_NUM];
570} __attribute__ ((packed)); 570} __packed;
571 571
572struct libipw_qos_parameters { 572struct libipw_qos_parameters {
573 __le16 cw_min[QOS_QUEUE_NUM]; 573 __le16 cw_min[QOS_QUEUE_NUM];
@@ -575,7 +575,7 @@ struct libipw_qos_parameters {
575 u8 aifs[QOS_QUEUE_NUM]; 575 u8 aifs[QOS_QUEUE_NUM];
576 u8 flag[QOS_QUEUE_NUM]; 576 u8 flag[QOS_QUEUE_NUM];
577 __le16 tx_op_limit[QOS_QUEUE_NUM]; 577 __le16 tx_op_limit[QOS_QUEUE_NUM];
578} __attribute__ ((packed)); 578} __packed;
579 579
580struct libipw_qos_data { 580struct libipw_qos_data {
581 struct libipw_qos_parameters parameters; 581 struct libipw_qos_parameters parameters;
@@ -588,7 +588,7 @@ struct libipw_qos_data {
588struct libipw_tim_parameters { 588struct libipw_tim_parameters {
589 u8 tim_count; 589 u8 tim_count;
590 u8 tim_period; 590 u8 tim_period;
591} __attribute__ ((packed)); 591} __packed;
592 592
593/*******************************************************/ 593/*******************************************************/
594 594
@@ -606,7 +606,7 @@ struct libipw_basic_report {
606 __le64 start_time; 606 __le64 start_time;
607 __le16 duration; 607 __le16 duration;
608 u8 map; 608 u8 map;
609} __attribute__ ((packed)); 609} __packed;
610 610
611enum { /* libipw_measurement_request.mode */ 611enum { /* libipw_measurement_request.mode */
612 /* Bit 0 is reserved */ 612 /* Bit 0 is reserved */
@@ -627,7 +627,7 @@ struct libipw_measurement_params {
627 u8 channel; 627 u8 channel;
628 __le64 start_time; 628 __le64 start_time;
629 __le16 duration; 629 __le16 duration;
630} __attribute__ ((packed)); 630} __packed;
631 631
632struct libipw_measurement_request { 632struct libipw_measurement_request {
633 struct libipw_info_element ie; 633 struct libipw_info_element ie;
@@ -635,7 +635,7 @@ struct libipw_measurement_request {
635 u8 mode; 635 u8 mode;
636 u8 type; 636 u8 type;
637 struct libipw_measurement_params params[0]; 637 struct libipw_measurement_params params[0];
638} __attribute__ ((packed)); 638} __packed;
639 639
640struct libipw_measurement_report { 640struct libipw_measurement_report {
641 struct libipw_info_element ie; 641 struct libipw_info_element ie;
@@ -645,17 +645,17 @@ struct libipw_measurement_report {
645 union { 645 union {
646 struct libipw_basic_report basic[0]; 646 struct libipw_basic_report basic[0];
647 } u; 647 } u;
648} __attribute__ ((packed)); 648} __packed;
649 649
650struct libipw_tpc_report { 650struct libipw_tpc_report {
651 u8 transmit_power; 651 u8 transmit_power;
652 u8 link_margin; 652 u8 link_margin;
653} __attribute__ ((packed)); 653} __packed;
654 654
655struct libipw_channel_map { 655struct libipw_channel_map {
656 u8 channel; 656 u8 channel;
657 u8 map; 657 u8 map;
658} __attribute__ ((packed)); 658} __packed;
659 659
660struct libipw_ibss_dfs { 660struct libipw_ibss_dfs {
661 struct libipw_info_element ie; 661 struct libipw_info_element ie;
@@ -668,14 +668,14 @@ struct libipw_csa {
668 u8 mode; 668 u8 mode;
669 u8 channel; 669 u8 channel;
670 u8 count; 670 u8 count;
671} __attribute__ ((packed)); 671} __packed;
672 672
673struct libipw_quiet { 673struct libipw_quiet {
674 u8 count; 674 u8 count;
675 u8 period; 675 u8 period;
676 u8 duration; 676 u8 duration;
677 u8 offset; 677 u8 offset;
678} __attribute__ ((packed)); 678} __packed;
679 679
680struct libipw_network { 680struct libipw_network {
681 /* These entries are used to identify a unique network */ 681 /* These entries are used to identify a unique network */