diff options
author | Peter Wu <lekensteyn@gmail.com> | 2014-02-14 13:03:44 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-02-24 15:21:53 -0500 |
commit | e51048cdf0bdf1358c39839eabb22a06674af9ed (patch) | |
tree | eacb5065d32ab685cbd6eab26c11814e543b0146 /drivers/net/wireless/rtlwifi/rtl8723ae | |
parent | c42c65c1d5863bca54e45ea25ecb24a3def29f59 (diff) |
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/rtl8723ae')
-rw-r--r-- | drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c index c333dfd116b8..4680816f9597 100644 --- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | |||
@@ -1112,12 +1112,13 @@ static int _rtl8723ae_set_media_status(struct ieee80211_hw *hw, | |||
1112 | void rtl8723ae_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) | 1112 | void rtl8723ae_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) |
1113 | { | 1113 | { |
1114 | struct rtl_priv *rtlpriv = rtl_priv(hw); | 1114 | struct rtl_priv *rtlpriv = rtl_priv(hw); |
1115 | struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw)); | 1115 | u32 reg_rcr; |
1116 | u32 reg_rcr = rtlpci->receive_config; | ||
1117 | 1116 | ||
1118 | if (rtlpriv->psc.rfpwr_state != ERFON) | 1117 | if (rtlpriv->psc.rfpwr_state != ERFON) |
1119 | return; | 1118 | return; |
1120 | 1119 | ||
1120 | rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr)); | ||
1121 | |||
1121 | if (check_bssid == true) { | 1122 | if (check_bssid == true) { |
1122 | reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); | 1123 | reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); |
1123 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, | 1124 | rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, |