/* noise */
        ap->noise = ap_info->noise;
        /* capability */
-       ap->capability = ap_info->capability;
+       ap->capability = le16_to_cpu(ap_info->capability);
        /* rsn */
        if ((ap_info->rsn_mode & RSN_MODE_WPA2) &&
            (priv->wpa.version == IW_AUTH_WPA_VERSION_WPA2)) {
        /* noise */
        ap->noise = ap_info->noise;
        /* capability */
-       ap->capability = ap_info->capability;
+       ap->capability = le16_to_cpu(ap_info->capability);
        /* channel */
        ap->channel = ap_info->ch_info;
 
        bp = ap_info->body;
-       bsize = ap_info->body_size;
+       bsize = le16_to_cpu(ap_info->body_size);
        offset = 0;
 
        while (bsize > offset) {
        wrqu.data.length += sizeof(associnfo_leader0) - 1;
        pbuf += sizeof(associnfo_leader0) - 1;
 
-       for (i = 0; i < assoc_req->req_ies_size; i++)
+       for (i = 0; i < le16_to_cpu(assoc_req->req_ies_size); i++)
                pbuf += sprintf(pbuf, "%02x", *(pb + i));
-       wrqu.data.length += (assoc_req->req_ies_size) * 2;
+       wrqu.data.length += (le16_to_cpu(assoc_req->req_ies_size)) * 2;
 
        memcpy(pbuf, associnfo_leader1, sizeof(associnfo_leader1) - 1);
        wrqu.data.length += sizeof(associnfo_leader1) - 1;
        pbuf += sizeof(associnfo_leader1) - 1;
 
        pb += assoc_req->req_ies_size;
-       for (i = 0; i < assoc_resp->resp_ies_size; i++)
+       for (i = 0; i < le16_to_cpu(assoc_resp->resp_ies_size); i++)
                pbuf += sprintf(pbuf, "%02x", *(pb + i));
-       wrqu.data.length += (assoc_resp->resp_ies_size) * 2;
+       wrqu.data.length += (le16_to_cpu(assoc_resp->resp_ies_size)) * 2;
 
        pbuf += sprintf(pbuf, ")");
        wrqu.data.length += 1;
 
 
 struct hostif_data_request_t {
        struct hostif_hdr header;
-       u16 auth_type;
+       __le16 auth_type;
 #define TYPE_DATA 0x0000
 #define TYPE_AUTH 0x0001
-       u16 reserved;
+       __le16 reserved;
        u8 data[0];
 } __packed;
 
 struct hostif_data_indication_t {
        struct hostif_hdr header;
-       u16 auth_type;
+       __le16 auth_type;
 /* #define TYPE_DATA 0x0000 */
 #define TYPE_PMK1 0x0001
 #define TYPE_GMK1 0x0002
 #define TYPE_GMK2 0x0003
-       u16 reserved;
+       __le16 reserved;
        u8 data[0];
 } __packed;
 
 } __packed;
 
 struct hostif_mib_value_t {
-       u16 size;
-       u16 type;
+       __le16 size;
+       __le16 type;
 #define MIB_VALUE_TYPE_NULL     0
 #define MIB_VALUE_TYPE_INT      1
 #define MIB_VALUE_TYPE_BOOL     2
 
 struct hostif_power_mgmt_confirm_t {
        struct hostif_hdr header;
-       u16 result_code;
+       __le16 result_code;
 } __packed;
 
 struct hostif_start_request_t {
        struct hostif_hdr header;
-       u16 mode;
+       __le16 mode;
 #define MODE_PSEUDO_ADHOC   0
 #define MODE_INFRASTRUCTURE 1
 #define MODE_AP             2  /* not used */
 
 struct hostif_start_confirm_t {
        struct hostif_hdr header;
-       u16 result_code;
+       __le16 result_code;
 } __packed;
 
 #define SSID_MAX_SIZE 32
 } __packed;
 
 struct fh_parms_t {
-       u16 dwell_time;
+       __le16 dwell_time;
        u8 hop_set;
        u8 hop_pattern;
        u8 hop_index;
 struct cf_parms_t {
        u8 count;
        u8 period;
-       u16 max_duration;
-       u16 dur_remaining;
+       __le16 max_duration;
+       __le16 dur_remaining;
 } __packed;
 
 struct ibss_parms_t {
-       u16 atim_window;
+       __le16 atim_window;
 } __packed;
 
 struct rsn_t {
        u8 sq;  /* +07 */
        u8 noise;       /* +08 */
        u8 pad0;        /* +09 */
-       u16 beacon_period;      /* +10 */
-       u16 capability; /* +12 */
+       __le16 beacon_period;   /* +10 */
+       __le16 capability;      /* +12 */
 #define BSS_CAP_ESS             BIT(0)
 #define BSS_CAP_IBSS            BIT(1)
 #define BSS_CAP_CF_POLABLE      BIT(2)
        u8 ch_info;     /* +15 */
 #define FRAME_TYPE_BEACON      0x80
 #define FRAME_TYPE_PROBE_RESP  0x50
-       u16 body_size;  /* +16 */
+       __le16 body_size;       /* +16 */
        u8 body[1024];  /* +18 */
        /* +1032 */
 } __packed;
        u8 sq;  /* +07 */
        u8 noise;       /* +08 */
        u8 pad0;        /* +09 */
-       u16 beacon_period;      /* +10 */
-       u16 capability; /* +12 */
+       __le16 beacon_period;   /* +10 */
+       __le16 capability;      /* +12 */
        struct rate_set8_t rate_set;    /* +14 */
        struct fh_parms_t fh_parameter; /* +24 */
        struct ds_parms_t ds_parameter; /* +29 */
 
 struct hostif_connect_indication_t {
        struct hostif_hdr header;
-       u16 connect_code;
+       __le16 connect_code;
 #define RESULT_CONNECT    0
 #define RESULT_DISCONNECT 1
        struct link_ap_info_t link_ap_info;
 
 struct hostif_stop_confirm_t {
        struct hostif_hdr header;
-       u16 result_code;
+       __le16 result_code;
 } __packed;
 
 /**
  */
 struct hostif_ps_adhoc_set_request_t {
        struct hostif_hdr header;
-       u16 phy_type;
+       __le16 phy_type;
 #define D_11B_ONLY_MODE                0
 #define D_11G_ONLY_MODE                1
 #define D_11BG_COMPATIBLE_MODE 2
 #define D_11A_ONLY_MODE                3
-       u16 cts_mode;
+       __le16 cts_mode;
 #define CTS_MODE_FALSE 0
 #define CTS_MODE_TRUE  1
-       u16 channel;
+       __le16 channel;
        struct rate_set16_t rate_set;
-       u16 capability;
-       u16 scan_type;
+       __le16 capability;
+       __le16 scan_type;
 } __packed;
 
 struct hostif_ps_adhoc_set_confirm_t {
        struct hostif_hdr header;
-       u16 result_code;
+       __le16 result_code;
 } __packed;
 
 /**
  */
 struct hostif_infrastructure_set_request_t {
        struct hostif_hdr header;
-       u16 phy_type;
-       u16 cts_mode;
+       __le16 phy_type;
+       __le16 cts_mode;
        struct rate_set16_t rate_set;
        struct ssid_t ssid;
-       u16 capability;
-       u16 beacon_lost_count;
-       u16 auth_type;
+       __le16 capability;
+       __le16 beacon_lost_count;
+       __le16 auth_type;
 #define AUTH_TYPE_OPEN_SYSTEM 0
 #define AUTH_TYPE_SHARED_KEY  1
        struct channel_list_t channel_list;
-       u16 scan_type;
+       __le16 scan_type;
 } __packed;
 
 /**
  */
 struct hostif_infrastructure_set2_request_t {
        struct hostif_hdr header;
-       u16 phy_type;
-       u16 cts_mode;
+       __le16 phy_type;
+       __le16 cts_mode;
        struct rate_set16_t rate_set;
        struct ssid_t ssid;
-       u16 capability;
-       u16 beacon_lost_count;
-       u16 auth_type;
+       __le16 capability;
+       __le16 beacon_lost_count;
+       __le16 auth_type;
 #define AUTH_TYPE_OPEN_SYSTEM 0
 #define AUTH_TYPE_SHARED_KEY  1
        struct channel_list_t channel_list;
-       u16 scan_type;
+       __le16 scan_type;
        u8 bssid[ETH_ALEN];
 } __packed;
 
 struct hostif_infrastructure_set_confirm_t {
        struct hostif_hdr header;
-       u16 result_code;
+       __le16 result_code;
 } __packed;
 
 /**
  */
 struct hostif_adhoc_set_request_t {
        struct hostif_hdr header;
-       u16 phy_type;
-       u16 cts_mode;
-       u16 channel;
+       __le16 phy_type;
+       __le16 cts_mode;
+       __le16 channel;
        struct rate_set16_t rate_set;
        struct ssid_t ssid;
-       u16 capability;
-       u16 scan_type;
+       __le16 capability;
+       __le16 scan_type;
 } __packed;
 
 /**
  */
 struct hostif_adhoc_set2_request_t {
        struct hostif_hdr header;
-       u16 phy_type;
-       u16 cts_mode;
-       u16 reserved;
+       __le16 phy_type;
+       __le16 cts_mode;
+       __le16 reserved;
        struct rate_set16_t rate_set;
        struct ssid_t ssid;
-       u16 capability;
-       u16 scan_type;
+       __le16 capability;
+       __le16 scan_type;
        struct channel_list_t channel_list;
        u8 bssid[ETH_ALEN];
 } __packed;
 
 struct hostif_adhoc_set_confirm_t {
        struct hostif_hdr header;
-       u16 result_code;
+       __le16 result_code;
 } __packed;
 
 struct last_associate_t {
 #define FRAME_TYPE_ASSOC_REQ   0x00
 #define FRAME_TYPE_REASSOC_REQ 0x20
        u8 pad;
-       u16 capability;
-       u16 listen_interval;
+       __le16 capability;
+       __le16 listen_interval;
        u8 ap_address[6];
-       u16 req_ies_size;
+       __le16 req_ies_size;
 } __packed;
 
 struct association_response_t {
 #define FRAME_TYPE_ASSOC_RESP  0x10
 #define FRAME_TYPE_REASSOC_RESP        0x30
        u8 pad;
-       u16 capability;
-       u16 status;
-       u16 association_id;
-       u16 resp_ies_size;
+       __le16 capability;
+       __le16 status;
+       __le16 association_id;
+       __le16 resp_ies_size;
 } __packed;
 
 struct hostif_associate_indication_t {
 
 struct hostif_bss_scan_confirm_t {
        struct hostif_hdr header;
-       u16 result_code;
-       u16 reserved;
+       __le16 result_code;
+       __le16 reserved;
 } __packed;
 
 struct hostif_phy_information_request_t {
        struct hostif_hdr header;
-       u16 type;
+       __le16 type;
 #define NORMAL_TYPE    0
 #define TIME_TYPE      1
-       u16 time;       /* unit 100ms */
+       __le16 time;    /* unit 100ms */
 } __packed;
 
 struct hostif_phy_information_confirm_t {
 
 struct hostif_sleep_confirm_t {
        struct hostif_hdr header;
-       u16 result_code;
+       __le16 result_code;
 } __packed;
 
 struct hostif_mic_failure_request_t {
        struct hostif_hdr header;
-       u16 failure_count;
-       u16 timer;
+       __le16 failure_count;
+       __le16 timer;
 } __packed;
 
 struct hostif_mic_failure_confirm_t {
        struct hostif_hdr header;
-       u16 result_code;
+       __le16 result_code;
 } __packed;
 
 #define BASIC_RATE     0x80