ath6kl: fix struct host_app_area endian handling
authorKalle Valo <kvalo@qca.qualcomm.com>
Wed, 5 Oct 2011 09:23:17 +0000 (12:23 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Fri, 11 Nov 2011 10:50:55 +0000 (12:50 +0200)
It was missing endian annotation.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath6kl/init.c
drivers/net/wireless/ath/ath6kl/wmi.h

index 81e0031012caa0c7f8ef7033102abe2ec5348d75..aa4dfd562aaefccab8e16f823199cfbe644a192e 100644 (file)
@@ -120,7 +120,7 @@ static int ath6kl_set_host_app_area(struct ath6kl *ar)
                return -EIO;
 
        address = TARG_VTOP(ar->target_type, data);
-       host_app_area.wmi_protocol_ver = WMI_PROTOCOL_VERSION;
+       host_app_area.wmi_protocol_ver = cpu_to_le32(WMI_PROTOCOL_VERSION);
        if (ath6kl_diag_write(ar, address, (u8 *) &host_app_area,
                              sizeof(struct host_app_area)))
                return -EIO;
index 5166f056ba55dd582e5edc74e368a45adfeb5f6f..96102c68640f402653ebdde56c8eadd3db2550b2 100644 (file)
@@ -124,8 +124,8 @@ struct wmi {
 };
 
 struct host_app_area {
-       u32 wmi_protocol_ver;
-};
+       __le32 wmi_protocol_ver;
+} __packed;
 
 enum wmi_msg_type {
        DATA_MSGTYPE = 0x0,