summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/wl12xx/wl1271_init.h
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@nokia.com>2009-10-15 10:33:29 +0300
committerJohn W. Linville <linville@tuxdriver.com>2009-10-27 16:48:19 -0400
commitd0f63b202146f3281800ee44823740c8bbf38f11 (patch)
treee6cfd9e31039674135c5727cc192b3d4270a457d /drivers/net/wireless/wl12xx/wl1271_init.h
parent0b5b72da1b21fe61926318dd842f6dd7c8862e9f (diff)
wl1271: fix endianess issues
We were not handling endianess correctly. The wl1271 chip runs on little-endian values. This patch makes sure that all the communication with the wl1271 firmware is done in little-endian by using cpu_to_le* and le*_to_cpu where appropriate. Also, all the struct definitions for data exchanged with the firmware has been changed to use __le16/32 types instead of u16/32. This fixes a few sparse warnings, such as these: drivers/net/wireless/wl12xx/wl1271_cmd.c:554:42: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/wl1271_cmd.c:555:42: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/wl1271_cmd.c:577:58: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/wl1271_cmd.c:579:58: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/wl1271_cmd.c:676:18: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/wl1271_cmd.c:787:22: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/wl1271_cmd.c:789:21: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/wl1271_tx.c:98:47: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/wl12xx/wl1271_acx.c:932:32: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/wl1271_boot.c:191:32: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/wl12xx/wl1271_boot.c:197:38: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/wl12xx/wl1271_boot.c:199:37: warning: incorrect type in argument 1 (different base types) drivers/net/wireless/wl12xx/wl1271_init.c:255:40: warning: incorrect type in assignment (different base types) drivers/net/wireless/wl12xx/wl1271_init.c:275:53: warning: incorrect type in assignment (different base types) Reported-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com> Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_init.h')
-rw-r--r--drivers/net/wireless/wl12xx/wl1271_init.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_init.h b/drivers/net/wireless/wl12xx/wl1271_init.h
index 513d0cb1866b..6e21ceee76a6 100644
--- a/drivers/net/wireless/wl12xx/wl1271_init.h
+++ b/drivers/net/wireless/wl12xx/wl1271_init.h
@@ -65,7 +65,7 @@ struct wl1271_radio_parms {
/* Dynamic radio parameters */
/* 2.4GHz */
- s16 tx_ref_pd_voltage;
+ __le16 tx_ref_pd_voltage;
s8 tx_ref_power;
s8 tx_offset_db;
@@ -82,7 +82,7 @@ struct wl1271_radio_parms {
u8 padding2;
/* 5GHz */
- s16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5];
+ __le16 tx_ref_pd_voltage_5[CONF_NUMBER_OF_SUB_BANDS_5];
s8 tx_ref_power_5[CONF_NUMBER_OF_SUB_BANDS_5];
s8 tx_offset_db_5[CONF_NUMBER_OF_SUB_BANDS_5];