summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8192ce
diff options
context:
space:
mode:
authorPeter Wu <lekensteyn@gmail.com>2014-02-14 19:03:44 +0100
committerJohn W. Linville <linville@tuxdriver.com>2014-02-24 21:21:53 +0100
commite51048cdf0bdf1358c39839eabb22a06674af9ed (patch)
treeeacb5065d32ab685cbd6eab26c11814e543b0146 /drivers/net/wireless/rtlwifi/rtl8192ce
parentmwifiex: memory corruption in mwifiex_tdls_add_vht_capab() (diff)
downloadlinux-e51048cdf0bdf1358c39839eabb22a06674af9ed.tar.xz
linux-e51048cdf0bdf1358c39839eabb22a06674af9ed.zip
rtlwifi: avoid accessing RCR directly
The rtl*_set_check_bssid functions are mostly the same, but access the RCR register in different ways. Use the get_hw_reg abstraction layer (which reads rtlpci->receive_config for PCI devices and mac->rx_conf for USB). There is no functional change for cases where receive_config was accessed directly. For rtl8192ce, there is still no change because nothing modifies REG_RCR or receive_config. For rtl8192cu, it now also applies changes to rx_conf from configure_filter, but that can be considered a bug which is fixed later. Signed-off-by: Peter Wu <lekensteyn@gmail.com> Acked-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8192ce')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8192ce/hw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
index a82b30a1996c..25e178c80d70 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
@@ -1200,11 +1200,13 @@ static int _rtl92ce_set_media_status(struct ieee80211_hw *hw,
void rtl92ce_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
- u32 reg_rcr = rtl_read_dword(rtlpriv, REG_RCR);
+ u32 reg_rcr;
if (rtlpriv->psc.rfpwr_state != ERFON)
return;
+ rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(&reg_rcr));
+
if (check_bssid) {
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,