aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/ipw2200.c12
-rw-r--r--drivers/net/wireless/ipw2200.h112
2 files changed, 64 insertions, 60 deletions
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c
index 3d4b590046a8..e79de53bd4f3 100644
--- a/drivers/net/wireless/ipw2200.c
+++ b/drivers/net/wireless/ipw2200.c
@@ -4495,9 +4495,9 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4495 priv-> 4495 priv->
4496 essid_len), 4496 essid_len),
4497 print_mac(mac, priv->bssid), 4497 print_mac(mac, priv->bssid),
4498 ntohs(auth->status), 4498 le16_to_cpu(auth->status),
4499 ipw_get_status_code 4499 ipw_get_status_code
4500 (ntohs 4500 (le16_to_cpu
4501 (auth->status))); 4501 (auth->status)));
4502 4502
4503 priv->status &= 4503 priv->status &=
@@ -4532,9 +4532,9 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4532 IPW_DL_STATE | 4532 IPW_DL_STATE |
4533 IPW_DL_ASSOC, 4533 IPW_DL_ASSOC,
4534 "association failed (0x%04X): %s\n", 4534 "association failed (0x%04X): %s\n",
4535 ntohs(resp->status), 4535 le16_to_cpu(resp->status),
4536 ipw_get_status_code 4536 ipw_get_status_code
4537 (ntohs 4537 (le16_to_cpu
4538 (resp->status))); 4538 (resp->status)));
4539 } 4539 }
4540 4540
@@ -4591,8 +4591,8 @@ static void ipw_rx_notification(struct ipw_priv *priv,
4591 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE | 4591 IPW_DEBUG(IPW_DL_NOTIF | IPW_DL_STATE |
4592 IPW_DL_ASSOC, 4592 IPW_DL_ASSOC,
4593 "authentication failed (0x%04X): %s\n", 4593 "authentication failed (0x%04X): %s\n",
4594 ntohs(auth->status), 4594 le16_to_cpu(auth->status),
4595 ipw_get_status_code(ntohs 4595 ipw_get_status_code(le16_to_cpu
4596 (auth-> 4596 (auth->
4597 status))); 4597 status)));
4598 } 4598 }
diff --git a/drivers/net/wireless/ipw2200.h b/drivers/net/wireless/ipw2200.h
index fdc187e0769d..cd3295b66dd6 100644
--- a/drivers/net/wireless/ipw2200.h
+++ b/drivers/net/wireless/ipw2200.h
@@ -385,73 +385,73 @@ struct clx2_queue {
385 dma_addr_t dma_addr; /**< physical addr for BD's */ 385 dma_addr_t dma_addr; /**< physical addr for BD's */
386 int low_mark; /**< low watermark, resume queue if free space more than this */ 386 int low_mark; /**< low watermark, resume queue if free space more than this */
387 int high_mark; /**< high watermark, stop queue if free space less than this */ 387 int high_mark; /**< high watermark, stop queue if free space less than this */
388} __attribute__ ((packed)); 388} __attribute__ ((packed)); /* XXX */
389 389
390struct machdr32 { 390struct machdr32 {
391 __le16 frame_ctl; 391 __le16 frame_ctl;
392 u16 duration; // watch out for endians! 392 __le16 duration; // watch out for endians!
393 u8 addr1[MACADRR_BYTE_LEN]; 393 u8 addr1[MACADRR_BYTE_LEN];
394 u8 addr2[MACADRR_BYTE_LEN]; 394 u8 addr2[MACADRR_BYTE_LEN];
395 u8 addr3[MACADRR_BYTE_LEN]; 395 u8 addr3[MACADRR_BYTE_LEN];
396 u16 seq_ctrl; // more endians! 396 __le16 seq_ctrl; // more endians!
397 u8 addr4[MACADRR_BYTE_LEN]; 397 u8 addr4[MACADRR_BYTE_LEN];
398 __le16 qos_ctrl; 398 __le16 qos_ctrl;
399} __attribute__ ((packed)); 399} __attribute__ ((packed));
400 400
401struct machdr30 { 401struct machdr30 {
402 __le16 frame_ctl; 402 __le16 frame_ctl;
403 u16 duration; // watch out for endians! 403 __le16 duration; // watch out for endians!
404 u8 addr1[MACADRR_BYTE_LEN]; 404 u8 addr1[MACADRR_BYTE_LEN];
405 u8 addr2[MACADRR_BYTE_LEN]; 405 u8 addr2[MACADRR_BYTE_LEN];
406 u8 addr3[MACADRR_BYTE_LEN]; 406 u8 addr3[MACADRR_BYTE_LEN];
407 u16 seq_ctrl; // more endians! 407 __le16 seq_ctrl; // more endians!
408 u8 addr4[MACADRR_BYTE_LEN]; 408 u8 addr4[MACADRR_BYTE_LEN];
409} __attribute__ ((packed)); 409} __attribute__ ((packed));
410 410
411struct machdr26 { 411struct machdr26 {
412 __le16 frame_ctl; 412 __le16 frame_ctl;
413 u16 duration; // watch out for endians! 413 __le16 duration; // watch out for endians!
414 u8 addr1[MACADRR_BYTE_LEN]; 414 u8 addr1[MACADRR_BYTE_LEN];
415 u8 addr2[MACADRR_BYTE_LEN]; 415 u8 addr2[MACADRR_BYTE_LEN];
416 u8 addr3[MACADRR_BYTE_LEN]; 416 u8 addr3[MACADRR_BYTE_LEN];
417 u16 seq_ctrl; // more endians! 417 __le16 seq_ctrl; // more endians!
418 __le16 qos_ctrl; 418 __le16 qos_ctrl;
419} __attribute__ ((packed)); 419} __attribute__ ((packed));
420 420
421struct machdr24 { 421struct machdr24 {
422 __le16 frame_ctl; 422 __le16 frame_ctl;
423 u16 duration; // watch out for endians! 423 __le16 duration; // watch out for endians!
424 u8 addr1[MACADRR_BYTE_LEN]; 424 u8 addr1[MACADRR_BYTE_LEN];
425 u8 addr2[MACADRR_BYTE_LEN]; 425 u8 addr2[MACADRR_BYTE_LEN];
426 u8 addr3[MACADRR_BYTE_LEN]; 426 u8 addr3[MACADRR_BYTE_LEN];
427 u16 seq_ctrl; // more endians! 427 __le16 seq_ctrl; // more endians!
428} __attribute__ ((packed)); 428} __attribute__ ((packed));
429 429
430// TX TFD with 32 byte MAC Header 430// TX TFD with 32 byte MAC Header
431struct tx_tfd_32 { 431struct tx_tfd_32 {
432 struct machdr32 mchdr; // 32 432 struct machdr32 mchdr; // 32
433 u32 uivplaceholder[2]; // 8 433 __le32 uivplaceholder[2]; // 8
434} __attribute__ ((packed)); 434} __attribute__ ((packed));
435 435
436// TX TFD with 30 byte MAC Header 436// TX TFD with 30 byte MAC Header
437struct tx_tfd_30 { 437struct tx_tfd_30 {
438 struct machdr30 mchdr; // 30 438 struct machdr30 mchdr; // 30
439 u8 reserved[2]; // 2 439 u8 reserved[2]; // 2
440 u32 uivplaceholder[2]; // 8 440 __le32 uivplaceholder[2]; // 8
441} __attribute__ ((packed)); 441} __attribute__ ((packed));
442 442
443// tx tfd with 26 byte mac header 443// tx tfd with 26 byte mac header
444struct tx_tfd_26 { 444struct tx_tfd_26 {
445 struct machdr26 mchdr; // 26 445 struct machdr26 mchdr; // 26
446 u8 reserved1[2]; // 2 446 u8 reserved1[2]; // 2
447 u32 uivplaceholder[2]; // 8 447 __le32 uivplaceholder[2]; // 8
448 u8 reserved2[4]; // 4 448 u8 reserved2[4]; // 4
449} __attribute__ ((packed)); 449} __attribute__ ((packed));
450 450
451// tx tfd with 24 byte mac header 451// tx tfd with 24 byte mac header
452struct tx_tfd_24 { 452struct tx_tfd_24 {
453 struct machdr24 mchdr; // 24 453 struct machdr24 mchdr; // 24
454 u32 uivplaceholder[2]; // 8 454 __le32 uivplaceholder[2]; // 8
455 u8 reserved[8]; // 8 455 u8 reserved[8]; // 8
456} __attribute__ ((packed)); 456} __attribute__ ((packed));
457 457
@@ -460,7 +460,7 @@ struct tx_tfd_24 {
460struct tfd_command { 460struct tfd_command {
461 u8 index; 461 u8 index;
462 u8 length; 462 u8 length;
463 u16 reserved; 463 __le16 reserved;
464 u8 payload[0]; 464 u8 payload[0];
465} __attribute__ ((packed)); 465} __attribute__ ((packed));
466 466
@@ -562,27 +562,27 @@ struct rate_histogram {
562struct ipw_cmd_stats { 562struct ipw_cmd_stats {
563 u8 cmd_id; 563 u8 cmd_id;
564 u8 seq_num; 564 u8 seq_num;
565 u16 good_sfd; 565 __le16 good_sfd;
566 u16 bad_plcp; 566 __le16 bad_plcp;
567 u16 wrong_bssid; 567 __le16 wrong_bssid;
568 u16 valid_mpdu; 568 __le16 valid_mpdu;
569 u16 bad_mac_header; 569 __le16 bad_mac_header;
570 u16 reserved_frame_types; 570 __le16 reserved_frame_types;
571 u16 rx_ina; 571 __le16 rx_ina;
572 u16 bad_crc32; 572 __le16 bad_crc32;
573 u16 invalid_cts; 573 __le16 invalid_cts;
574 u16 invalid_acks; 574 __le16 invalid_acks;
575 u16 long_distance_ina_fina; 575 __le16 long_distance_ina_fina;
576 u16 dsp_silence_unreachable; 576 __le16 dsp_silence_unreachable;
577 u16 accumulated_rssi; 577 __le16 accumulated_rssi;
578 u16 rx_ovfl_frame_tossed; 578 __le16 rx_ovfl_frame_tossed;
579 u16 rssi_silence_threshold; 579 __le16 rssi_silence_threshold;
580 u16 rx_ovfl_frame_supplied; 580 __le16 rx_ovfl_frame_supplied;
581 u16 last_rx_frame_signal; 581 __le16 last_rx_frame_signal;
582 u16 last_rx_frame_noise; 582 __le16 last_rx_frame_noise;
583 u16 rx_autodetec_no_ofdm; 583 __le16 rx_autodetec_no_ofdm;
584 u16 rx_autodetec_no_barker; 584 __le16 rx_autodetec_no_barker;
585 u16 reserved; 585 __le16 reserved;
586} __attribute__ ((packed)); 586} __attribute__ ((packed));
587 587
588struct notif_channel_result { 588struct notif_channel_result {
@@ -637,7 +637,7 @@ struct notif_association {
637struct notif_authenticate { 637struct notif_authenticate {
638 u8 state; 638 u8 state;
639 struct machdr24 addr; 639 struct machdr24 addr;
640 u16 status; 640 __le16 status;
641} __attribute__ ((packed)); 641} __attribute__ ((packed));
642 642
643struct notif_calibration { 643struct notif_calibration {
@@ -732,14 +732,14 @@ struct ipw_rx_queue {
732struct alive_command_responce { 732struct alive_command_responce {
733 u8 alive_command; 733 u8 alive_command;
734 u8 sequence_number; 734 u8 sequence_number;
735 u16 software_revision; 735 __le16 software_revision;
736 u8 device_identifier; 736 u8 device_identifier;
737 u8 reserved1[5]; 737 u8 reserved1[5];
738 u16 reserved2; 738 __le16 reserved2;
739 u16 reserved3; 739 __le16 reserved3;
740 u16 clock_settle_time; 740 __le16 clock_settle_time;
741 u16 powerup_settle_time; 741 __le16 powerup_settle_time;
742 u16 reserved4; 742 __le16 reserved4;
743 u8 time_stamp[5]; /* month, day, year, hours, minutes */ 743 u8 time_stamp[5]; /* month, day, year, hours, minutes */
744 u8 ucode_valid; 744 u8 ucode_valid;
745} __attribute__ ((packed)); 745} __attribute__ ((packed));
@@ -878,7 +878,11 @@ static inline void ipw_set_scan_type(struct ipw_scan_request_ext *scan,
878 878
879struct ipw_associate { 879struct ipw_associate {
880 u8 channel; 880 u8 channel;
881#ifdef __LITTLE_ENDIAN_BITFIELD
881 u8 auth_type:4, auth_key:4; 882 u8 auth_type:4, auth_key:4;
883#else
884 u8 auth_key:4, auth_type:4;
885#endif
882 u8 assoc_type; 886 u8 assoc_type;
883 u8 reserved; 887 u8 reserved;
884 __le16 policy_support; 888 __le16 policy_support;
@@ -918,12 +922,12 @@ struct ipw_frag_threshold {
918struct ipw_retry_limit { 922struct ipw_retry_limit {
919 u8 short_retry_limit; 923 u8 short_retry_limit;
920 u8 long_retry_limit; 924 u8 long_retry_limit;
921 u16 reserved; 925 __le16 reserved;
922} __attribute__ ((packed)); 926} __attribute__ ((packed));
923 927
924struct ipw_dino_config { 928struct ipw_dino_config {
925 u32 dino_config_addr; 929 __le32 dino_config_addr;
926 u16 dino_config_size; 930 __le16 dino_config_size;
927 u8 dino_response; 931 u8 dino_response;
928 u8 reserved; 932 u8 reserved;
929} __attribute__ ((packed)); 933} __attribute__ ((packed));
@@ -998,7 +1002,7 @@ struct ipw_sensitivity_calib {
998 * - \a status contains status; 1002 * - \a status contains status;
999 * - \a param filled with status parameters. 1003 * - \a param filled with status parameters.
1000 */ 1004 */
1001struct ipw_cmd { 1005struct ipw_cmd { /* XXX */
1002 u32 cmd; /**< Host command */ 1006 u32 cmd; /**< Host command */
1003 u32 status;/**< Status */ 1007 u32 status;/**< Status */
1004 u32 status_len; 1008 u32 status_len;
@@ -1092,7 +1096,7 @@ struct ipw_ibss_seq {
1092 struct list_head list; 1096 struct list_head list;
1093}; 1097};
1094 1098
1095struct ipw_error_elem { 1099struct ipw_error_elem { /* XXX */
1096 u32 desc; 1100 u32 desc;
1097 u32 time; 1101 u32 time;
1098 u32 blink1; 1102 u32 blink1;
@@ -1102,13 +1106,13 @@ struct ipw_error_elem {
1102 u32 data; 1106 u32 data;
1103}; 1107};
1104 1108
1105struct ipw_event { 1109struct ipw_event { /* XXX */
1106 u32 event; 1110 u32 event;
1107 u32 time; 1111 u32 time;
1108 u32 data; 1112 u32 data;
1109} __attribute__ ((packed)); 1113} __attribute__ ((packed));
1110 1114
1111struct ipw_fw_error { 1115struct ipw_fw_error { /* XXX */
1112 unsigned long jiffies; 1116 unsigned long jiffies;
1113 u32 status; 1117 u32 status;
1114 u32 config; 1118 u32 config;
@@ -1153,7 +1157,7 @@ struct ipw_prom_priv {
1153 */ 1157 */
1154struct ipw_rt_hdr { 1158struct ipw_rt_hdr {
1155 struct ieee80211_radiotap_header rt_hdr; 1159 struct ieee80211_radiotap_header rt_hdr;
1156 u64 rt_tsf; /* TSF */ 1160 u64 rt_tsf; /* TSF */ /* XXX */
1157 u8 rt_flags; /* radiotap packet flags */ 1161 u8 rt_flags; /* radiotap packet flags */
1158 u8 rt_rate; /* rate in 500kb/s */ 1162 u8 rt_rate; /* rate in 500kb/s */
1159 __le16 rt_channel; /* channel in mhz */ 1163 __le16 rt_channel; /* channel in mhz */
@@ -1940,8 +1944,8 @@ enum {
1940#define IPW_MEM_FIXED_OVERRIDE (IPW_SHARED_LOWER_BOUND + 0x41C) 1944#define IPW_MEM_FIXED_OVERRIDE (IPW_SHARED_LOWER_BOUND + 0x41C)
1941 1945
1942struct ipw_fixed_rate { 1946struct ipw_fixed_rate {
1943 u16 tx_rates; 1947 __le16 tx_rates;
1944 u16 reserved; 1948 __le16 reserved;
1945} __attribute__ ((packed)); 1949} __attribute__ ((packed));
1946 1950
1947#define IPW_INDIRECT_ADDR_MASK (~0x3ul) 1951#define IPW_INDIRECT_ADDR_MASK (~0x3ul)
@@ -1951,12 +1955,12 @@ struct host_cmd {
1951 u8 len; 1955 u8 len;
1952 u16 reserved; 1956 u16 reserved;
1953 u32 *param; 1957 u32 *param;
1954} __attribute__ ((packed)); 1958} __attribute__ ((packed)); /* XXX */
1955 1959
1956struct cmdlog_host_cmd { 1960struct cmdlog_host_cmd {
1957 u8 cmd; 1961 u8 cmd;
1958 u8 len; 1962 u8 len;
1959 u16 reserved; 1963 __le16 reserved;
1960 char param[124]; 1964 char param[124];
1961} __attribute__ ((packed)); 1965} __attribute__ ((packed));
1962 1966