mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-05 14:17:43 +00:00
rtlwifi: rtl8821ae: Fix an expression that is always false
In routine _rtl8821ae_set_media_status(), an incorrect mask results in a test for AP status to always be false. Similar bugs were fixed in rtl8192cu and rtl8192de, but this instance was missed at that time. Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Cc: Stable <stable@vger.kernel.org> [3.18+] Cc: David Binderman <dcb314@hotmail.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
This commit is contained in:
parent
cae761b5a6
commit
251086f588
2 changed files with 2 additions and 1 deletions
|
@ -2180,7 +2180,7 @@ static int _rtl8821ae_set_media_status(struct ieee80211_hw *hw,
|
|||
|
||||
rtl_write_byte(rtlpriv, MSR, bt_msr);
|
||||
rtlpriv->cfg->ops->led_control(hw, ledaction);
|
||||
if ((bt_msr & 0xfc) == MSR_AP)
|
||||
if ((bt_msr & MSR_MASK) == MSR_AP)
|
||||
rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
|
||||
else
|
||||
rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66);
|
||||
|
|
|
@ -429,6 +429,7 @@
|
|||
#define MSR_ADHOC 0x01
|
||||
#define MSR_INFRA 0x02
|
||||
#define MSR_AP 0x03
|
||||
#define MSR_MASK 0x03
|
||||
|
||||
#define RRSR_RSC_OFFSET 21
|
||||
#define RRSR_SHORT_OFFSET 23
|
||||
|
|
Loading…
Add table
Reference in a new issue