summaryrefslogtreecommitdiffstats
path: root/drivers/staging/rtl8821ae
diff options
context:
space:
mode:
authorLevente Kurusa2014-02-14 22:50:23 +0100
committerGreg Kroah-Hartman2014-02-15 21:32:55 +0100
commitec97423afbd09c566fc3e756b4a6b50695dda0af (patch)
treeda7121bf310ff2104024028f244579ad4b680af2 /drivers/staging/rtl8821ae
parentstaging: usbip: prevent possible buffer overflow reading port records (diff)
downloadkernel-qcow2-linux-ec97423afbd09c566fc3e756b4a6b50695dda0af.tar.gz
kernel-qcow2-linux-ec97423afbd09c566fc3e756b4a6b50695dda0af.tar.xz
kernel-qcow2-linux-ec97423afbd09c566fc3e756b4a6b50695dda0af.zip
staging: rtl8821ae: fix invalid bit mask on MSR_AP check
Since MSR_AP is 0x3, ANDing it with 0xFC will never be true. Add a NOT operation to 0xFC so that we will AND with the last three bits which will result in a possibility that the condition will succeed. Signed-off-by: Levente Kurusa <levex@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8821ae')
-rw-r--r--drivers/staging/rtl8821ae/rtl8821ae/hw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/rtl8821ae/rtl8821ae/hw.c b/drivers/staging/rtl8821ae/rtl8821ae/hw.c
index e8344be92344..d3e9b93400bf 100644
--- a/drivers/staging/rtl8821ae/rtl8821ae/hw.c
+++ b/drivers/staging/rtl8821ae/rtl8821ae/hw.c
@@ -1623,7 +1623,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 & ~0xfc) == MSR_AP)
rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
else
rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66);