diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2017-07-13 10:43:23 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-07-28 18:42:59 +0300 |
commit | d28ac7be15c70343cb270648e252f54d770eca6a (patch) | |
tree | 8e134c026f8312f31698a18631a927cf47a89a12 /drivers/net/wireless/realtek/rtlwifi/rtl8821ae | |
parent | f2764f61fa10593204b0c5e4e9a68dba02112e50 (diff) |
rtlwifi: rtl8821ae: Fix HW_VAR_NAV_UPPER operation
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@oracle.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/realtek/rtlwifi/rtl8821ae')
-rw-r--r-- | drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c index 8f4abb3d7669..4f73012978e9 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c @@ -779,7 +779,7 @@ void rtl8821ae_set_hw_reg(struct ieee80211_hw *hw, u8 variable, u8 *val) _rtl8821ae_resume_tx_beacon(hw); break; } 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) { RT_TRACE(rtlpriv, COMP_INIT , DBG_WARNING, |