[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1511315892.183980594@decadent.org.uk>
Date: Wed, 22 Nov 2017 01:58:12 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Kalle Valo" <kvalo@...eaurora.org>,
"Dan Carpenter" <dan.carpenter@...cle.com>,
"Larry Finger" <Larry.Finger@...inger.net>
Subject: [PATCH 3.16 014/133] rtlwifi: rtl8821ae: Fix HW_VAR_NAV_UPPER
operation
3.16.51-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@...cle.com>
commit d28ac7be15c70343cb270648e252f54d770eca6a upstream.
The cast here is wrong. We want to cast the pointer but we accidentally
do a no-op cast of the value. We normally want to set us_nav_upper to
WIFI_NAV_UPPER_US (30000) but because of this bug we instead set it to
184 on little endian systems and 0 on big endian ones.
Fixes: 3c05bedb5fef ("Staging: rtl8812ae: Add Realtek 8821 PCI WIFI driver")
Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
Acked-by: Larry Finger <Larry.Finger@...inger.net>
Signed-off-by: Kalle Valo <kvalo@...eaurora.org>
[bwh: Backported to 3.16: adjust filename, context, indentation]
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/staging/rtl8821ae/rtl8821ae/hw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/staging/rtl8821ae/rtl8821ae/hw.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/hw.c
@@ -760,7 +760,7 @@ void rtl8821ae_set_hw_reg(struct ieee802
}
case HW_VAR_NAV_UPPER: {
- u32 us_nav_upper = ((u32)*val);
+ u32 us_nav_upper = *(u32 *)val;
if(us_nav_upper > HAL_92C_NAV_UPPER_UNIT * 0xFF)
{
Powered by blists - more mailing lists