[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1493678780-7120-4-git-send-email-tuomo.rinne@gmail.com>
Date: Mon, 1 May 2017 23:46:20 +0100
From: Tuomo Rinne <tuomo.rinne@...il.com>
To: gregkh@...uxfoundation.org
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] staging: rtl8192u: Convert u4bAcParam to little-endian
The commit 9304b5b0d4fe ("staging: rtl8192u: Fix sparse warnings in r8192U_dm.c")
adds casting of le16 from cpu endianness. Therefore constructing
u4bAcParam potentially using big-endian order.
This patch converts the u4bAcParam parameter back to little-endian after
it has been constructed. Hence on big-endian architectures the parameter
will remain as little-endian.
Signed-off-by: Tuomo Rinne <tuomo.rinne@...il.com>
---
drivers/staging/rtl8192u/r8192U_dm.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 283dda4..e6f8d1d 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -2321,6 +2321,7 @@ static void dm_check_edca_turbo(
u1bAIFS <<= AC_PARAM_AIFS_OFFSET;
u4bAcParam = op_limit | cw_max | cw_min | u1bAIFS;
+ cpu_to_le32s(&u4bAcParam);
write_nic_dword(dev, EDCAPARA_BE, u4bAcParam);
--
2.1.4
Powered by blists - more mailing lists