ath6kl: Fix endianness in register write
Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
diff --git a/drivers/net/wireless/ath/ath6kl/main.c b/drivers/net/wireless/ath/ath6kl/main.c
index 48e9c2e..3cefca6 100644
--- a/drivers/net/wireless/ath/ath6kl/main.c
+++ b/drivers/net/wireless/ath/ath6kl/main.c
@@ -261,7 +261,7 @@
* Write to the ATH6KL through its diagnostic window. No cooperation from
* the Target is required for this.
*/
-int ath6kl_diag_write32(struct ath6kl *ar, u32 address, u32 value)
+int ath6kl_diag_write32(struct ath6kl *ar, u32 address, __le32 value)
{
int ret;
@@ -298,7 +298,8 @@
int ath6kl_diag_write(struct ath6kl *ar, u32 address, void *data, u32 length)
{
- u32 count, *buf = data;
+ u32 count;
+ __le32 *buf = data;
int ret;
if (WARN_ON(length % 4))
@@ -397,13 +398,14 @@
{
int status = 0;
u32 address;
- u32 data;
+ __le32 data;
if (target_type != TARGET_TYPE_AR6003 &&
target_type != TARGET_TYPE_AR6004)
return;
- data = cold_reset ? RESET_CONTROL_COLD_RST : RESET_CONTROL_MBOX_RST;
+ data = cold_reset ? cpu_to_le32(RESET_CONTROL_COLD_RST) :
+ cpu_to_le32(RESET_CONTROL_MBOX_RST);
switch (target_type) {
case TARGET_TYPE_AR6003: