Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1633294

[PATCH 3/3] staging: rtl8192u: Convert u4bAcParam back to little-endian after construction

From Tuomo Rinne <tuomo.rinne@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 3/3] staging: rtl8192u: Convert u4bAcParam back to little-endian after construction
Date 2017-04-29 13:40 +0200
Message-ID <tByTg-5FX-15@gated-at.bofh.it> (permalink)
References <tBbtE-64f-27@gated-at.bofh.it> <tByTf-5FX-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


commit 9304b5b0d4fe8498d3d059db4bb8a7de253355a5 adds casting of le16
values to cpu to get rid of sparse warnings. The u4bAcParam is therefore
constructed using machines endianess. However, the parameter ought to be casted back to little endian to keep the function logic the same as before.

Unfortunately I don't have the hardware to test this change.

Signed-off-by: Tuomo Rinne <tuomo.rinne@gmail.com>
---
 drivers/staging/rtl8192u/r8192U_dm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8192u/r8192U_dm.c b/drivers/staging/rtl8192u/r8192U_dm.c
index 5e84ed7..dceec20 100644
--- a/drivers/staging/rtl8192u/r8192U_dm.c
+++ b/drivers/staging/rtl8192u/r8192U_dm.c
@@ -2321,10 +2321,10 @@ 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);
 
-
 			/*
 			 * Check ACM bit.
 			 * If it is set, immediately set ACM control bit to downgrading AC for passing WMM testplan. Annie, 2005-12-13.
-- 
2.1.4

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: [PATCH] staging: rtl8192u: Improve readability and fix sparse  warnings: cast from restricted __le16 Greg KH <gregkh@linuxfoundation.org> - 2017-04-28 12:40 +0200
  [PATCH 1/3] staging: rtl8192u: Remove unnecessary scope Tuomo Rinne <tuomo.rinne@gmail.com> - 2017-04-29 13:40 +0200
    [PATCH 2/3] staging: rtl8192u: Improve code readability Tuomo Rinne <tuomo.rinne@gmail.com> - 2017-04-29 13:40 +0200
    [PATCH 3/3] staging: rtl8192u: Convert u4bAcParam back to little-endian after construction Tuomo Rinne <tuomo.rinne@gmail.com> - 2017-04-29 13:40 +0200

csiph-web