Hi,
While investigating bug 60713[1] which is about the inability to connect
with RTL8192CE hardware, I noticed that the monitor mode only shows
broadcast and multicast frames. The cause is described next.
`rtlpci->receive_config` seems to contain the current value of REG_RCR.
It gets initialized in rtl*_init_sw_vars. It is returned by
rtl*_get_hw_reg and set by rtl*_set_hw_reg (after writing to REG_RCR).
`mac->rx_conf` is initialized in rtl_init_rx_config. For PCIe drivers,
it gets inited from `receive_config` via get_hw_reg (one of the
functions from the previous section).
When monitor mode is enabled with otherbss set, rtl_op_configure_filter
is called. This has a problem:
(1) The rtl_op_configure_filter function only sets mac->rx_conf.
(2) rx_conf is only written to register REG_RCR by rtl8192cu and besides
that driver, it is only read by rtl_init_rx_config in base.c.
Patch 2/3 fixes the above issue. 1/2 makes accessing RCR more consistent
and 3/3 removes unused functions (yay, less code!). Similar
modifications (3 and probably 1) need to be done for staging.
I have tested these patches on top of v3.14-rc2-267-g9398a10, but it
unfortunately does not improve the connectivity problem. It got even
stranger, when I run `iw wlan0 set monitor fcsfail`, I do not see a
"Enable receive FCS error frame" message with debug=5. Instead I see
"Enable receive control frame". More testing will be done later this
day. For example, only the first and second EAPOL frame of a second test
device got captured, others got lost somehow. Hopefully it is not a
memory corruption issue somewhere.
Related question for a Realtek engineer (or someone with access to the
specs): the rx_ctrl_filter and rx_data_filter fields are only *read* in
the rtl8192cu driver. Besides that they are unused. Can this be removed?
Otherwise, what about moving them to rtl_init_rx_config() and updating
the *_get_hw_reg() functions to ignore/process the vars? After doing so,
_update_mac_setting can be removed from rtl8192cu/hw.c.
Regards,
Peter
[1]: https://bugzilla.kernel.org/show_bug.cgi?id=60713
---
Peter Wu (3):
rtlwifi: avoid accessing RCR directly
rtlwifi: properly apply filter flags
rtlwifi: remove unused allow_all_destaddr functions
drivers/net/wireless/rtlwifi/core.c | 52 +++++++++++++++++------------
drivers/net/wireless/rtlwifi/rtl8188ee/hw.c | 25 ++------------
drivers/net/wireless/rtlwifi/rtl8188ee/hw.h | 2 --
drivers/net/wireless/rtlwifi/rtl8188ee/sw.c | 1 -
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 25 ++------------
drivers/net/wireless/rtlwifi/rtl8192ce/hw.h | 2 --
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 1 -
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 4 ++-
drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 6 ++--
drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 25 ++------------
drivers/net/wireless/rtlwifi/rtl8192se/hw.h | 2 --
drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 1 -
drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | 26 ++-------------
drivers/net/wireless/rtlwifi/rtl8723ae/hw.h | 2 --
drivers/net/wireless/rtlwifi/rtl8723ae/sw.c | 1 -
drivers/net/wireless/rtlwifi/wifi.h | 2 --
16 files changed, 49 insertions(+), 128 deletions(-)
--
1.8.5.4
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 <[email protected]>
---
drivers/net/wireless/rtlwifi/rtl8188ee/hw.c | 5 +++--
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 4 +++-
drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 4 +++-
drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 6 ++++--
drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 5 +++--
drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | 5 +++--
6 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
index e06971b..ce2226c 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
@@ -1235,12 +1235,13 @@ static int _rtl88ee_set_media_status(struct ieee80211_hw *hw,
void rtl88ee_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
- struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- u32 reg_rcr = rtlpci->receive_config;
+ u32 reg_rcr;
if (rtlpriv->psc.rfpwr_state != ERFON)
return;
+ rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
+
if (check_bssid == true) {
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
index a82b30a..25e178c 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 *)(®_rcr));
+
if (check_bssid) {
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
index 468bf73..49ad106 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
@@ -1379,11 +1379,13 @@ void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
- 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 *)(®_rcr));
+
if (check_bssid) {
u8 tmp;
if (IS_NORMAL_CHIP(rtlhal->version)) {
diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
index c4a7db9..c16aa6b 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
@@ -1138,11 +1138,13 @@ static int _rtl92de_set_media_status(struct ieee80211_hw *hw,
void rtl92de_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
- struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- u32 reg_rcr = rtlpci->receive_config;
+ u32 reg_rcr;
if (rtlpriv->psc.rfpwr_state != ERFON)
return;
+
+ rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
+
if (check_bssid) {
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
index 4f46178..5aa39ef 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
@@ -1135,12 +1135,13 @@ void rtl92se_set_mac_addr(struct rtl_io *io, const u8 *addr)
void rtl92se_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
- struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- u32 reg_rcr = rtlpci->receive_config;
+ u32 reg_rcr;
if (rtlpriv->psc.rfpwr_state != ERFON)
return;
+ rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
+
if (check_bssid) {
reg_rcr |= (RCR_CBSSID);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
index c333dfd..4680816 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,
void rtl8723ae_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
- struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
- u32 reg_rcr = rtlpci->receive_config;
+ u32 reg_rcr;
if (rtlpriv->psc.rfpwr_state != ERFON)
return;
+ rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
+
if (check_bssid == true) {
reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
--
1.8.5.4
Unused as configure_filter takes care of setting/clearing RCR_AAP.
Signed-off-by: Peter Wu <[email protected]>
---
drivers/net/wireless/rtlwifi/rtl8188ee/hw.c | 20 --------------------
drivers/net/wireless/rtlwifi/rtl8188ee/hw.h | 2 --
drivers/net/wireless/rtlwifi/rtl8188ee/sw.c | 1 -
drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 21 ---------------------
drivers/net/wireless/rtlwifi/rtl8192ce/hw.h | 2 --
drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 1 -
drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 20 --------------------
drivers/net/wireless/rtlwifi/rtl8192se/hw.h | 2 --
drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 1 -
drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | 21 ---------------------
drivers/net/wireless/rtlwifi/rtl8723ae/hw.h | 2 --
drivers/net/wireless/rtlwifi/rtl8723ae/sw.c | 1 -
drivers/net/wireless/rtlwifi/wifi.h | 2 --
13 files changed, 96 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
index ce2226c..c0e7f62 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
@@ -2510,23 +2510,3 @@ void rtl88ee_suspend(struct ieee80211_hw *hw)
void rtl88ee_resume(struct ieee80211_hw *hw)
{
}
-
-/* Turn on AAP (RCR:bit 0) for promicuous mode. */
-void rtl88ee_allow_all_destaddr(struct ieee80211_hw *hw,
- bool allow_all_da, bool write_into_reg)
-{
- struct rtl_priv *rtlpriv = rtl_priv(hw);
- struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
-
- if (allow_all_da) /* Set BIT0 */
- rtlpci->receive_config |= RCR_AAP;
- else /* Clear BIT0 */
- rtlpci->receive_config &= ~RCR_AAP;
-
- if (write_into_reg)
- rtl_write_dword(rtlpriv, REG_RCR, rtlpci->receive_config);
-
- RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
- "receive_config = 0x%08X, write_into_reg =%d\n",
- rtlpci->receive_config, write_into_reg);
-}
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h
index b4460a4..1850fde 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h
@@ -61,8 +61,6 @@ void rtl8188ee_bt_reg_init(struct ieee80211_hw *hw);
void rtl8188ee_bt_hw_init(struct ieee80211_hw *hw);
void rtl88ee_suspend(struct ieee80211_hw *hw);
void rtl88ee_resume(struct ieee80211_hw *hw);
-void rtl88ee_allow_all_destaddr(struct ieee80211_hw *hw,
- bool allow_all_da, bool write_into_reg);
void rtl88ee_fw_clk_off_timer_callback(unsigned long data);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c b/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
index 347af1e..41de6f3 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
@@ -254,7 +254,6 @@ static struct rtl_hal_ops rtl8188ee_hal_ops = {
.enable_hw_sec = rtl88ee_enable_hw_security_config,
.set_key = rtl88ee_set_key,
.init_sw_leds = rtl88ee_init_sw_leds,
- .allow_all_destaddr = rtl88ee_allow_all_destaddr,
.get_bbreg = rtl88e_phy_query_bb_reg,
.set_bbreg = rtl88e_phy_set_bb_reg,
.get_rfreg = rtl88e_phy_query_rf_reg,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
index 25e178c..8b3134a 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
@@ -2407,24 +2407,3 @@ void rtl92ce_suspend(struct ieee80211_hw *hw)
void rtl92ce_resume(struct ieee80211_hw *hw)
{
}
-
-/* Turn on AAP (RCR:bit 0) for promicuous mode. */
-void rtl92ce_allow_all_destaddr(struct ieee80211_hw *hw,
- bool allow_all_da, bool write_into_reg)
-{
- struct rtl_priv *rtlpriv = rtl_priv(hw);
- struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
-
- if (allow_all_da) {/* Set BIT0 */
- rtlpci->receive_config |= RCR_AAP;
- } else {/* Clear BIT0 */
- rtlpci->receive_config &= ~RCR_AAP;
- }
-
- if (write_into_reg)
- rtl_write_dword(rtlpriv, REG_RCR, rtlpci->receive_config);
-
- RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
- "receive_config=0x%08X, write_into_reg=%d\n",
- rtlpci->receive_config, write_into_reg);
-}
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h
index 2d063b0..5533070 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h
@@ -76,7 +76,5 @@ void rtl8192ce_bt_reg_init(struct ieee80211_hw *hw);
void rtl8192ce_bt_hw_init(struct ieee80211_hw *hw);
void rtl92ce_suspend(struct ieee80211_hw *hw);
void rtl92ce_resume(struct ieee80211_hw *hw);
-void rtl92ce_allow_all_destaddr(struct ieee80211_hw *hw,
- bool allow_all_da, bool write_into_reg);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
index b790320..12f21f4 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
@@ -229,7 +229,6 @@ static struct rtl_hal_ops rtl8192ce_hal_ops = {
.enable_hw_sec = rtl92ce_enable_hw_security_config,
.set_key = rtl92ce_set_key,
.init_sw_leds = rtl92ce_init_sw_leds,
- .allow_all_destaddr = rtl92ce_allow_all_destaddr,
.get_bbreg = rtl92c_phy_query_bb_reg,
.set_bbreg = rtl92c_phy_set_bb_reg,
.set_rfreg = rtl92ce_phy_set_rf_reg,
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
index 5aa39ef..8c7aca4 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
@@ -2531,23 +2531,3 @@ void rtl92se_resume(struct ieee80211_hw *hw)
pci_write_config_dword(rtlpci->pdev, 0x40,
val & 0xffff00ff);
}
-
-/* Turn on AAP (RCR:bit 0) for promicuous mode. */
-void rtl92se_allow_all_destaddr(struct ieee80211_hw *hw,
- bool allow_all_da, bool write_into_reg)
-{
- struct rtl_priv *rtlpriv = rtl_priv(hw);
- struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
-
- if (allow_all_da) /* Set BIT0 */
- rtlpci->receive_config |= RCR_AAP;
- else /* Clear BIT0 */
- rtlpci->receive_config &= ~RCR_AAP;
-
- if (write_into_reg)
- rtl_write_dword(rtlpriv, RCR, rtlpci->receive_config);
-
- RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
- "receive_config=0x%08X, write_into_reg=%d\n",
- rtlpci->receive_config, write_into_reg);
-}
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.h b/drivers/net/wireless/rtlwifi/rtl8192se/hw.h
index da48aa8..4cacee1 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.h
@@ -74,7 +74,5 @@ void rtl92se_set_key(struct ieee80211_hw *hw,
u8 enc_algo, bool is_wepkey, bool clear_all);
void rtl92se_suspend(struct ieee80211_hw *hw);
void rtl92se_resume(struct ieee80211_hw *hw);
-void rtl92se_allow_all_destaddr(struct ieee80211_hw *hw,
- bool allow_all_da, bool write_into_reg);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
index 2e8e6f8..1bff2a0 100644
--- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
@@ -290,7 +290,6 @@ static struct rtl_hal_ops rtl8192se_hal_ops = {
.enable_hw_sec = rtl92se_enable_hw_security_config,
.set_key = rtl92se_set_key,
.init_sw_leds = rtl92se_init_sw_leds,
- .allow_all_destaddr = rtl92se_allow_all_destaddr,
.get_bbreg = rtl92s_phy_query_bb_reg,
.set_bbreg = rtl92s_phy_set_bb_reg,
.get_rfreg = rtl92s_phy_query_rf_reg,
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
index 4680816..48e8b82 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
@@ -2377,24 +2377,3 @@ void rtl8723ae_suspend(struct ieee80211_hw *hw)
void rtl8723ae_resume(struct ieee80211_hw *hw)
{
}
-
-/* Turn on AAP (RCR:bit 0) for promicuous mode. */
-void rtl8723ae_allow_all_destaddr(struct ieee80211_hw *hw,
- bool allow_all_da, bool write_into_reg)
-{
- struct rtl_priv *rtlpriv = rtl_priv(hw);
- struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
-
- if (allow_all_da) /* Set BIT0 */
- rtlpci->receive_config |= RCR_AAP;
- else /* Clear BIT0 */
- rtlpci->receive_config &= ~RCR_AAP;
-
- if (write_into_reg)
- rtl_write_dword(rtlpriv, REG_RCR, rtlpci->receive_config);
-
-
- RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
- "receive_config=0x%08X, write_into_reg=%d\n",
- rtlpci->receive_config, write_into_reg);
-}
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h
index 6fa24f7..d3bc39f 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h
@@ -67,7 +67,5 @@ void rtl8723ae_bt_reg_init(struct ieee80211_hw *hw);
void rtl8723ae_bt_hw_init(struct ieee80211_hw *hw);
void rtl8723ae_suspend(struct ieee80211_hw *hw);
void rtl8723ae_resume(struct ieee80211_hw *hw);
-void rtl8723ae_allow_all_destaddr(struct ieee80211_hw *hw,
- bool allow_all_da, bool write_into_reg);
#endif
diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
index 62b204f..a9cb110 100644
--- a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
@@ -230,7 +230,6 @@ static struct rtl_hal_ops rtl8723ae_hal_ops = {
.enable_hw_sec = rtl8723ae_enable_hw_security_config,
.set_key = rtl8723ae_set_key,
.init_sw_leds = rtl8723ae_init_sw_leds,
- .allow_all_destaddr = rtl8723ae_allow_all_destaddr,
.get_bbreg = rtl8723ae_phy_query_bb_reg,
.set_bbreg = rtl8723ae_phy_set_bb_reg,
.get_rfreg = rtl8723ae_phy_query_rf_reg,
diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
index 8c64739..08fd164 100644
--- a/drivers/net/wireless/rtlwifi/wifi.h
+++ b/drivers/net/wireless/rtlwifi/wifi.h
@@ -1714,8 +1714,6 @@ struct rtl_hal_ops {
u32 regaddr, u32 bitmask);
void (*set_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath,
u32 regaddr, u32 bitmask, u32 data);
- void (*allow_all_destaddr)(struct ieee80211_hw *hw,
- bool allow_all_da, bool write_into_reg);
void (*linked_set_reg) (struct ieee80211_hw *hw);
void (*chk_switch_dmdp) (struct ieee80211_hw *hw);
void (*dualmac_easy_concurrent) (struct ieee80211_hw *hw);
--
1.8.5.4
commit 0baa0fd76f3f5a134461d6cf30294f6bb1bb824c
("rtlwifi: Convert core routines for addition of rtl8192se and
rtl8192de") removed setting HW_VAR_RCR, HW_VAR_MGT_FILTER and
HW_VAR_CTRL_FILTER. The last two are probably done because some hardware
does not support them. The first is probably a mistake. This patch adds
the missing set_hw_reg call.
For PCI support, rx_conf is not touched directly. Instead, get_hw_reg is
used to abstract between receive_config (for PCI) and rx_conf (for USB).
This was tested on a 10ec:8176 Realtek RTL8188CE (according to the
label on the mini-PCIe card). Before this patch, `iw wlan0 set monitor
otherbss` did not capture frames from other BSS's. After this patch, it
does print packets.
Tested-by: Peter Wu <[email protected]>
Signed-off-by: Peter Wu <[email protected]>
---
drivers/net/wireless/rtlwifi/core.c | 52 +++++++++++++++++++++----------------
1 file changed, 30 insertions(+), 22 deletions(-)
diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
index 2d337a0..6df4df0 100644
--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -475,20 +475,40 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
{
struct rtl_priv *rtlpriv = rtl_priv(hw);
struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
+ u32 rx_conf;
*new_flags &= RTL_SUPPORTED_FILTERS;
if (!changed_flags)
return;
+ /* if ssid not set to hw don't check bssid
+ * here just used for linked scanning, & linked
+ * and nolink check bssid is set in set network_type */
+ if ((changed_flags & FIF_BCN_PRBRESP_PROMISC) &&
+ (mac->link_state >= MAC80211_LINKED)) {
+ if (mac->opmode != NL80211_IFTYPE_AP &&
+ mac->opmode != NL80211_IFTYPE_MESH_POINT) {
+ if (*new_flags & FIF_BCN_PRBRESP_PROMISC) {
+ rtlpriv->cfg->ops->set_chk_bssid(hw, false);
+ } else {
+ rtlpriv->cfg->ops->set_chk_bssid(hw, true);
+ }
+ }
+ }
+
+ /* must be called after set_chk_bssid since that function modifies the
+ * RCR register too. */
+ rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(&rx_conf));
+
/*TODO: we disable broadcase now, so enable here */
if (changed_flags & FIF_ALLMULTI) {
if (*new_flags & FIF_ALLMULTI) {
- mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AM] |
+ rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AM] |
rtlpriv->cfg->maps[MAC_RCR_AB];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Enable receive multicast frame\n");
} else {
- mac->rx_conf &= ~(rtlpriv->cfg->maps[MAC_RCR_AM] |
+ rx_conf &= ~(rtlpriv->cfg->maps[MAC_RCR_AM] |
rtlpriv->cfg->maps[MAC_RCR_AB]);
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Disable receive multicast frame\n");
@@ -497,39 +517,25 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
if (changed_flags & FIF_FCSFAIL) {
if (*new_flags & FIF_FCSFAIL) {
- mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACRC32];
+ rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACRC32];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Enable receive FCS error frame\n");
} else {
- mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACRC32];
+ rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACRC32];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Disable receive FCS error frame\n");
}
}
- /* if ssid not set to hw don't check bssid
- * here just used for linked scanning, & linked
- * and nolink check bssid is set in set network_type */
- if ((changed_flags & FIF_BCN_PRBRESP_PROMISC) &&
- (mac->link_state >= MAC80211_LINKED)) {
- if (mac->opmode != NL80211_IFTYPE_AP &&
- mac->opmode != NL80211_IFTYPE_MESH_POINT) {
- if (*new_flags & FIF_BCN_PRBRESP_PROMISC) {
- rtlpriv->cfg->ops->set_chk_bssid(hw, false);
- } else {
- rtlpriv->cfg->ops->set_chk_bssid(hw, true);
- }
- }
- }
if (changed_flags & FIF_CONTROL) {
if (*new_flags & FIF_CONTROL) {
- mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACF];
+ rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACF];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Enable receive control frame\n");
} else {
- mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACF];
+ rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACF];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Disable receive control frame\n");
}
@@ -537,15 +543,17 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
if (changed_flags & FIF_OTHER_BSS) {
if (*new_flags & FIF_OTHER_BSS) {
- mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AAP];
+ rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AAP];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Enable receive other BSS's frame\n");
} else {
- mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_AAP];
+ rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_AAP];
RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
"Disable receive other BSS's frame\n");
}
}
+
+ rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(&rx_conf));
}
static int rtl_op_sta_add(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
--
1.8.5.4
On 02/14/2014 12:03 PM, Peter Wu wrote:
> 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 <[email protected]>
Acked-by: Larry Finger <Larry.Finger@lwfinger>
With this change it will not take much work to move all the *_set_check_bssid
functions into a common version in rtlwifi. But that will have to wait as I have
one new driver submitted, but not merged, and two others that are not quite
ready for submission.
Thanks, Larry
> ---
> drivers/net/wireless/rtlwifi/rtl8188ee/hw.c | 5 +++--
> drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 4 +++-
> drivers/net/wireless/rtlwifi/rtl8192cu/hw.c | 4 +++-
> drivers/net/wireless/rtlwifi/rtl8192de/hw.c | 6 ++++--
> drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 5 +++--
> drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | 5 +++--
> 6 files changed, 19 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
> index e06971b..ce2226c 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
> @@ -1235,12 +1235,13 @@ static int _rtl88ee_set_media_status(struct ieee80211_hw *hw,
> void rtl88ee_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
> {
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> - u32 reg_rcr = rtlpci->receive_config;
> + u32 reg_rcr;
>
> if (rtlpriv->psc.rfpwr_state != ERFON)
> return;
>
> + rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
> +
> if (check_bssid == true) {
> reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
> rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> index a82b30a..25e178c 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 *)(®_rcr));
> +
> if (check_bssid) {
> reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
> rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> index 468bf73..49ad106 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
> @@ -1379,11 +1379,13 @@ void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
> {
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
> - 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 *)(®_rcr));
> +
> if (check_bssid) {
> u8 tmp;
> if (IS_NORMAL_CHIP(rtlhal->version)) {
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> index c4a7db9..c16aa6b 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192de/hw.c
> @@ -1138,11 +1138,13 @@ static int _rtl92de_set_media_status(struct ieee80211_hw *hw,
> void rtl92de_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
> {
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> - u32 reg_rcr = rtlpci->receive_config;
> + u32 reg_rcr;
>
> if (rtlpriv->psc.rfpwr_state != ERFON)
> return;
> +
> + rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
> +
> if (check_bssid) {
> reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
> rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> index 4f46178..5aa39ef 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> @@ -1135,12 +1135,13 @@ void rtl92se_set_mac_addr(struct rtl_io *io, const u8 *addr)
> void rtl92se_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
> {
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> - u32 reg_rcr = rtlpci->receive_config;
> + u32 reg_rcr;
>
> if (rtlpriv->psc.rfpwr_state != ERFON)
> return;
>
> + rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
> +
> if (check_bssid) {
> reg_rcr |= (RCR_CBSSID);
> rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
> diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
> index c333dfd..4680816 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,
> void rtl8723ae_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid)
> {
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> - u32 reg_rcr = rtlpci->receive_config;
> + u32 reg_rcr;
>
> if (rtlpriv->psc.rfpwr_state != ERFON)
> return;
>
> + rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(®_rcr));
> +
> if (check_bssid == true) {
> reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN);
> rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR,
>
On 02/14/2014 12:03 PM, Peter Wu wrote:
> commit 0baa0fd76f3f5a134461d6cf30294f6bb1bb824c
> ("rtlwifi: Convert core routines for addition of rtl8192se and
> rtl8192de") removed setting HW_VAR_RCR, HW_VAR_MGT_FILTER and
> HW_VAR_CTRL_FILTER. The last two are probably done because some hardware
> does not support them. The first is probably a mistake. This patch adds
> the missing set_hw_reg call.
>
> For PCI support, rx_conf is not touched directly. Instead, get_hw_reg is
> used to abstract between receive_config (for PCI) and rx_conf (for USB).
>
> This was tested on a 10ec:8176 Realtek RTL8188CE (according to the
> label on the mini-PCIe card). Before this patch, `iw wlan0 set monitor
> otherbss` did not capture frames from other BSS's. After this patch, it
> does print packets.
>
> Tested-by: Peter Wu <[email protected]>
> Signed-off-by: Peter Wu <[email protected]>
> ---
Acked-by: Larry Finger <[email protected]>
Thanks,
Larry
> drivers/net/wireless/rtlwifi/core.c | 52 +++++++++++++++++++++----------------
> 1 file changed, 30 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/core.c b/drivers/net/wireless/rtlwifi/core.c
> index 2d337a0..6df4df0 100644
> --- a/drivers/net/wireless/rtlwifi/core.c
> +++ b/drivers/net/wireless/rtlwifi/core.c
> @@ -475,20 +475,40 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
> {
> struct rtl_priv *rtlpriv = rtl_priv(hw);
> struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
> + u32 rx_conf;
>
> *new_flags &= RTL_SUPPORTED_FILTERS;
> if (!changed_flags)
> return;
>
> + /* if ssid not set to hw don't check bssid
> + * here just used for linked scanning, & linked
> + * and nolink check bssid is set in set network_type */
> + if ((changed_flags & FIF_BCN_PRBRESP_PROMISC) &&
> + (mac->link_state >= MAC80211_LINKED)) {
> + if (mac->opmode != NL80211_IFTYPE_AP &&
> + mac->opmode != NL80211_IFTYPE_MESH_POINT) {
> + if (*new_flags & FIF_BCN_PRBRESP_PROMISC) {
> + rtlpriv->cfg->ops->set_chk_bssid(hw, false);
> + } else {
> + rtlpriv->cfg->ops->set_chk_bssid(hw, true);
> + }
> + }
> + }
> +
> + /* must be called after set_chk_bssid since that function modifies the
> + * RCR register too. */
> + rtlpriv->cfg->ops->get_hw_reg(hw, HW_VAR_RCR, (u8 *)(&rx_conf));
> +
> /*TODO: we disable broadcase now, so enable here */
> if (changed_flags & FIF_ALLMULTI) {
> if (*new_flags & FIF_ALLMULTI) {
> - mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AM] |
> + rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AM] |
> rtlpriv->cfg->maps[MAC_RCR_AB];
> RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
> "Enable receive multicast frame\n");
> } else {
> - mac->rx_conf &= ~(rtlpriv->cfg->maps[MAC_RCR_AM] |
> + rx_conf &= ~(rtlpriv->cfg->maps[MAC_RCR_AM] |
> rtlpriv->cfg->maps[MAC_RCR_AB]);
> RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
> "Disable receive multicast frame\n");
> @@ -497,39 +517,25 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
>
> if (changed_flags & FIF_FCSFAIL) {
> if (*new_flags & FIF_FCSFAIL) {
> - mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACRC32];
> + rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACRC32];
> RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
> "Enable receive FCS error frame\n");
> } else {
> - mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACRC32];
> + rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACRC32];
> RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
> "Disable receive FCS error frame\n");
> }
> }
>
> - /* if ssid not set to hw don't check bssid
> - * here just used for linked scanning, & linked
> - * and nolink check bssid is set in set network_type */
> - if ((changed_flags & FIF_BCN_PRBRESP_PROMISC) &&
> - (mac->link_state >= MAC80211_LINKED)) {
> - if (mac->opmode != NL80211_IFTYPE_AP &&
> - mac->opmode != NL80211_IFTYPE_MESH_POINT) {
> - if (*new_flags & FIF_BCN_PRBRESP_PROMISC) {
> - rtlpriv->cfg->ops->set_chk_bssid(hw, false);
> - } else {
> - rtlpriv->cfg->ops->set_chk_bssid(hw, true);
> - }
> - }
> - }
>
> if (changed_flags & FIF_CONTROL) {
> if (*new_flags & FIF_CONTROL) {
> - mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACF];
> + rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACF];
>
> RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
> "Enable receive control frame\n");
> } else {
> - mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACF];
> + rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACF];
> RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
> "Disable receive control frame\n");
> }
> @@ -537,15 +543,17 @@ static void rtl_op_configure_filter(struct ieee80211_hw *hw,
>
> if (changed_flags & FIF_OTHER_BSS) {
> if (*new_flags & FIF_OTHER_BSS) {
> - mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AAP];
> + rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AAP];
> RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
> "Enable receive other BSS's frame\n");
> } else {
> - mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_AAP];
> + rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_AAP];
> RT_TRACE(rtlpriv, COMP_MAC80211, DBG_LOUD,
> "Disable receive other BSS's frame\n");
> }
> }
> +
> + rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, (u8 *)(&rx_conf));
> }
> static int rtl_op_sta_add(struct ieee80211_hw *hw,
> struct ieee80211_vif *vif,
>
On 02/14/2014 12:03 PM, Peter Wu wrote:
> Unused as configure_filter takes care of setting/clearing RCR_AAP.
>
> Signed-off-by: Peter Wu <[email protected]>
NACK - at least for now. This patch has merge conflicts for the set of patches
that add the rtl8723be driver, and would cause build errors if the merge were
fixed. I will hang on to it and apply it later when the rtl8723be merge is done.
@John Linville: You should apply #1 and 2 of this series, but skip this one.
Thanks,
Larry
PS: I just noticed the John Linville was not Cc'd on these patches. For
wireless, such patches should be sent to him with a Cc to the wireless ML.
> ---
> drivers/net/wireless/rtlwifi/rtl8188ee/hw.c | 20 --------------------
> drivers/net/wireless/rtlwifi/rtl8188ee/hw.h | 2 --
> drivers/net/wireless/rtlwifi/rtl8188ee/sw.c | 1 -
> drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 21 ---------------------
> drivers/net/wireless/rtlwifi/rtl8192ce/hw.h | 2 --
> drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 1 -
> drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 20 --------------------
> drivers/net/wireless/rtlwifi/rtl8192se/hw.h | 2 --
> drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 1 -
> drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | 21 ---------------------
> drivers/net/wireless/rtlwifi/rtl8723ae/hw.h | 2 --
> drivers/net/wireless/rtlwifi/rtl8723ae/sw.c | 1 -
> drivers/net/wireless/rtlwifi/wifi.h | 2 --
> 13 files changed, 96 deletions(-)
>
> diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
> index ce2226c..c0e7f62 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
> @@ -2510,23 +2510,3 @@ void rtl88ee_suspend(struct ieee80211_hw *hw)
> void rtl88ee_resume(struct ieee80211_hw *hw)
> {
> }
> -
> -/* Turn on AAP (RCR:bit 0) for promicuous mode. */
> -void rtl88ee_allow_all_destaddr(struct ieee80211_hw *hw,
> - bool allow_all_da, bool write_into_reg)
> -{
> - struct rtl_priv *rtlpriv = rtl_priv(hw);
> - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> -
> - if (allow_all_da) /* Set BIT0 */
> - rtlpci->receive_config |= RCR_AAP;
> - else /* Clear BIT0 */
> - rtlpci->receive_config &= ~RCR_AAP;
> -
> - if (write_into_reg)
> - rtl_write_dword(rtlpriv, REG_RCR, rtlpci->receive_config);
> -
> - RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
> - "receive_config = 0x%08X, write_into_reg =%d\n",
> - rtlpci->receive_config, write_into_reg);
> -}
> diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h
> index b4460a4..1850fde 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h
> @@ -61,8 +61,6 @@ void rtl8188ee_bt_reg_init(struct ieee80211_hw *hw);
> void rtl8188ee_bt_hw_init(struct ieee80211_hw *hw);
> void rtl88ee_suspend(struct ieee80211_hw *hw);
> void rtl88ee_resume(struct ieee80211_hw *hw);
> -void rtl88ee_allow_all_destaddr(struct ieee80211_hw *hw,
> - bool allow_all_da, bool write_into_reg);
> void rtl88ee_fw_clk_off_timer_callback(unsigned long data);
>
> #endif
> diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c b/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
> index 347af1e..41de6f3 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
> @@ -254,7 +254,6 @@ static struct rtl_hal_ops rtl8188ee_hal_ops = {
> .enable_hw_sec = rtl88ee_enable_hw_security_config,
> .set_key = rtl88ee_set_key,
> .init_sw_leds = rtl88ee_init_sw_leds,
> - .allow_all_destaddr = rtl88ee_allow_all_destaddr,
> .get_bbreg = rtl88e_phy_query_bb_reg,
> .set_bbreg = rtl88e_phy_set_bb_reg,
> .get_rfreg = rtl88e_phy_query_rf_reg,
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> index 25e178c..8b3134a 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> @@ -2407,24 +2407,3 @@ void rtl92ce_suspend(struct ieee80211_hw *hw)
> void rtl92ce_resume(struct ieee80211_hw *hw)
> {
> }
> -
> -/* Turn on AAP (RCR:bit 0) for promicuous mode. */
> -void rtl92ce_allow_all_destaddr(struct ieee80211_hw *hw,
> - bool allow_all_da, bool write_into_reg)
> -{
> - struct rtl_priv *rtlpriv = rtl_priv(hw);
> - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> -
> - if (allow_all_da) {/* Set BIT0 */
> - rtlpci->receive_config |= RCR_AAP;
> - } else {/* Clear BIT0 */
> - rtlpci->receive_config &= ~RCR_AAP;
> - }
> -
> - if (write_into_reg)
> - rtl_write_dword(rtlpriv, REG_RCR, rtlpci->receive_config);
> -
> - RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
> - "receive_config=0x%08X, write_into_reg=%d\n",
> - rtlpci->receive_config, write_into_reg);
> -}
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h
> index 2d063b0..5533070 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h
> @@ -76,7 +76,5 @@ void rtl8192ce_bt_reg_init(struct ieee80211_hw *hw);
> void rtl8192ce_bt_hw_init(struct ieee80211_hw *hw);
> void rtl92ce_suspend(struct ieee80211_hw *hw);
> void rtl92ce_resume(struct ieee80211_hw *hw);
> -void rtl92ce_allow_all_destaddr(struct ieee80211_hw *hw,
> - bool allow_all_da, bool write_into_reg);
>
> #endif
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
> index b790320..12f21f4 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
> @@ -229,7 +229,6 @@ static struct rtl_hal_ops rtl8192ce_hal_ops = {
> .enable_hw_sec = rtl92ce_enable_hw_security_config,
> .set_key = rtl92ce_set_key,
> .init_sw_leds = rtl92ce_init_sw_leds,
> - .allow_all_destaddr = rtl92ce_allow_all_destaddr,
> .get_bbreg = rtl92c_phy_query_bb_reg,
> .set_bbreg = rtl92c_phy_set_bb_reg,
> .set_rfreg = rtl92ce_phy_set_rf_reg,
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> index 5aa39ef..8c7aca4 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> @@ -2531,23 +2531,3 @@ void rtl92se_resume(struct ieee80211_hw *hw)
> pci_write_config_dword(rtlpci->pdev, 0x40,
> val & 0xffff00ff);
> }
> -
> -/* Turn on AAP (RCR:bit 0) for promicuous mode. */
> -void rtl92se_allow_all_destaddr(struct ieee80211_hw *hw,
> - bool allow_all_da, bool write_into_reg)
> -{
> - struct rtl_priv *rtlpriv = rtl_priv(hw);
> - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> -
> - if (allow_all_da) /* Set BIT0 */
> - rtlpci->receive_config |= RCR_AAP;
> - else /* Clear BIT0 */
> - rtlpci->receive_config &= ~RCR_AAP;
> -
> - if (write_into_reg)
> - rtl_write_dword(rtlpriv, RCR, rtlpci->receive_config);
> -
> - RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
> - "receive_config=0x%08X, write_into_reg=%d\n",
> - rtlpci->receive_config, write_into_reg);
> -}
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.h b/drivers/net/wireless/rtlwifi/rtl8192se/hw.h
> index da48aa8..4cacee1 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.h
> @@ -74,7 +74,5 @@ void rtl92se_set_key(struct ieee80211_hw *hw,
> u8 enc_algo, bool is_wepkey, bool clear_all);
> void rtl92se_suspend(struct ieee80211_hw *hw);
> void rtl92se_resume(struct ieee80211_hw *hw);
> -void rtl92se_allow_all_destaddr(struct ieee80211_hw *hw,
> - bool allow_all_da, bool write_into_reg);
>
> #endif
> diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> index 2e8e6f8..1bff2a0 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> @@ -290,7 +290,6 @@ static struct rtl_hal_ops rtl8192se_hal_ops = {
> .enable_hw_sec = rtl92se_enable_hw_security_config,
> .set_key = rtl92se_set_key,
> .init_sw_leds = rtl92se_init_sw_leds,
> - .allow_all_destaddr = rtl92se_allow_all_destaddr,
> .get_bbreg = rtl92s_phy_query_bb_reg,
> .set_bbreg = rtl92s_phy_set_bb_reg,
> .get_rfreg = rtl92s_phy_query_rf_reg,
> diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
> index 4680816..48e8b82 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
> @@ -2377,24 +2377,3 @@ void rtl8723ae_suspend(struct ieee80211_hw *hw)
> void rtl8723ae_resume(struct ieee80211_hw *hw)
> {
> }
> -
> -/* Turn on AAP (RCR:bit 0) for promicuous mode. */
> -void rtl8723ae_allow_all_destaddr(struct ieee80211_hw *hw,
> - bool allow_all_da, bool write_into_reg)
> -{
> - struct rtl_priv *rtlpriv = rtl_priv(hw);
> - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> -
> - if (allow_all_da) /* Set BIT0 */
> - rtlpci->receive_config |= RCR_AAP;
> - else /* Clear BIT0 */
> - rtlpci->receive_config &= ~RCR_AAP;
> -
> - if (write_into_reg)
> - rtl_write_dword(rtlpriv, REG_RCR, rtlpci->receive_config);
> -
> -
> - RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
> - "receive_config=0x%08X, write_into_reg=%d\n",
> - rtlpci->receive_config, write_into_reg);
> -}
> diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h
> index 6fa24f7..d3bc39f 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h
> +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h
> @@ -67,7 +67,5 @@ void rtl8723ae_bt_reg_init(struct ieee80211_hw *hw);
> void rtl8723ae_bt_hw_init(struct ieee80211_hw *hw);
> void rtl8723ae_suspend(struct ieee80211_hw *hw);
> void rtl8723ae_resume(struct ieee80211_hw *hw);
> -void rtl8723ae_allow_all_destaddr(struct ieee80211_hw *hw,
> - bool allow_all_da, bool write_into_reg);
>
> #endif
> diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
> index 62b204f..a9cb110 100644
> --- a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
> +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
> @@ -230,7 +230,6 @@ static struct rtl_hal_ops rtl8723ae_hal_ops = {
> .enable_hw_sec = rtl8723ae_enable_hw_security_config,
> .set_key = rtl8723ae_set_key,
> .init_sw_leds = rtl8723ae_init_sw_leds,
> - .allow_all_destaddr = rtl8723ae_allow_all_destaddr,
> .get_bbreg = rtl8723ae_phy_query_bb_reg,
> .set_bbreg = rtl8723ae_phy_set_bb_reg,
> .get_rfreg = rtl8723ae_phy_query_rf_reg,
> diff --git a/drivers/net/wireless/rtlwifi/wifi.h b/drivers/net/wireless/rtlwifi/wifi.h
> index 8c64739..08fd164 100644
> --- a/drivers/net/wireless/rtlwifi/wifi.h
> +++ b/drivers/net/wireless/rtlwifi/wifi.h
> @@ -1714,8 +1714,6 @@ struct rtl_hal_ops {
> u32 regaddr, u32 bitmask);
> void (*set_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath,
> u32 regaddr, u32 bitmask, u32 data);
> - void (*allow_all_destaddr)(struct ieee80211_hw *hw,
> - bool allow_all_da, bool write_into_reg);
> void (*linked_set_reg) (struct ieee80211_hw *hw);
> void (*chk_switch_dmdp) (struct ieee80211_hw *hw);
> void (*dualmac_easy_concurrent) (struct ieee80211_hw *hw);
>
On Friday 14 February 2014 15:28:44 Larry Finger wrote:
> On 02/14/2014 12:03 PM, Peter Wu wrote:
> > 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 <[email protected]>
>
> Acked-by: Larry Finger <Larry.Finger@lwfinger>
TLD is missing ;)
> With this change it will not take much work to move all the
> *_set_check_bssid functions into a common version in rtlwifi. But that
> will have to wait as I have one new driver submitted, but not merged, and
> two others that are not quite ready for submission.
There are three variants of the set_check_bssid functions:
- four that modify the beacon filter (through _rtl*_set_bcn_ctrl_reg)
- one (rtl8192se) that does not modify the beacon filter and writes
less bits (just RCR_BSSID instead of RCR_BSSID_{DATA,BCN})
- one (rtl8192cu) that modifies the beacon filter, and depending on
the chip version, sets the same bits as rtl8192se, or the other four.
I was not sure where to move the set_bcn_ctrl_reg functions, these
depend on a value from rtl*/reg.h. Perhaps the [gs]et_hw_reg functions
can be extended with these registers?
Thanks,
Peter
On Friday 14 February 2014 15:38:32 Larry Finger wrote:
> On 02/14/2014 12:03 PM, Peter Wu wrote:
> > Unused as configure_filter takes care of setting/clearing RCR_AAP.
> >
> > Signed-off-by: Peter Wu <[email protected]>
>
> NACK - at least for now. This patch has merge conflicts for the set of
> patches that add the rtl8723be driver, and would cause build errors if the
> merge were fixed. I will hang on to it and apply it later when the
> rtl8723be merge is done.
Fair enough, the next patch will strip even more then :-)
> @John Linville: You should apply #1 and 2 of this series, but skip this one.
>
> Thanks,
>
> Larry
>
> PS: I just noticed the John Linville was not Cc'd on these patches. For
> wireless, such patches should be sent to him with a Cc to the wireless ML.
Ah, I will keep that in mind for future patches. The first reply is now
also sent with John in the recipients list.
Thanks,
Peter
> > ---
> >
> > drivers/net/wireless/rtlwifi/rtl8188ee/hw.c | 20 --------------------
> > drivers/net/wireless/rtlwifi/rtl8188ee/hw.h | 2 --
> > drivers/net/wireless/rtlwifi/rtl8188ee/sw.c | 1 -
> > drivers/net/wireless/rtlwifi/rtl8192ce/hw.c | 21 ---------------------
> > drivers/net/wireless/rtlwifi/rtl8192ce/hw.h | 2 --
> > drivers/net/wireless/rtlwifi/rtl8192ce/sw.c | 1 -
> > drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 20 --------------------
> > drivers/net/wireless/rtlwifi/rtl8192se/hw.h | 2 --
> > drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 1 -
> > drivers/net/wireless/rtlwifi/rtl8723ae/hw.c | 21 ---------------------
> > drivers/net/wireless/rtlwifi/rtl8723ae/hw.h | 2 --
> > drivers/net/wireless/rtlwifi/rtl8723ae/sw.c | 1 -
> > drivers/net/wireless/rtlwifi/wifi.h | 2 --
> > 13 files changed, 96 deletions(-)
> >
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
> > b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c index ce2226c..c0e7f62
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
> > +++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
> > @@ -2510,23 +2510,3 @@ void rtl88ee_suspend(struct ieee80211_hw *hw)
> >
> > void rtl88ee_resume(struct ieee80211_hw *hw)
> > {
> > }
> >
> > -
> > -/* Turn on AAP (RCR:bit 0) for promicuous mode. */
> > -void rtl88ee_allow_all_destaddr(struct ieee80211_hw *hw,
> > - bool allow_all_da, bool write_into_reg)
> > -{
> > - struct rtl_priv *rtlpriv = rtl_priv(hw);
> > - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> > -
> > - if (allow_all_da) /* Set BIT0 */
> > - rtlpci->receive_config |= RCR_AAP;
> > - else /* Clear BIT0 */
> > - rtlpci->receive_config &= ~RCR_AAP;
> > -
> > - if (write_into_reg)
> > - rtl_write_dword(rtlpriv, REG_RCR, rtlpci->receive_config);
> > -
> > - RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
> > - "receive_config = 0x%08X, write_into_reg =%d\n",
> > - rtlpci->receive_config, write_into_reg);
> > -}
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h
> > b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h index b4460a4..1850fde
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h
> > +++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.h
> > @@ -61,8 +61,6 @@ void rtl8188ee_bt_reg_init(struct ieee80211_hw *hw);
> >
> > void rtl8188ee_bt_hw_init(struct ieee80211_hw *hw);
> > void rtl88ee_suspend(struct ieee80211_hw *hw);
> > void rtl88ee_resume(struct ieee80211_hw *hw);
> >
> > -void rtl88ee_allow_all_destaddr(struct ieee80211_hw *hw,
> > - bool allow_all_da, bool write_into_reg);
> >
> > void rtl88ee_fw_clk_off_timer_callback(unsigned long data);
> >
> > #endif
> >
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
> > b/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c index 347af1e..41de6f3
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
> > +++ b/drivers/net/wireless/rtlwifi/rtl8188ee/sw.c
> > @@ -254,7 +254,6 @@ static struct rtl_hal_ops rtl8188ee_hal_ops = {
> >
> > .enable_hw_sec = rtl88ee_enable_hw_security_config,
> > .set_key = rtl88ee_set_key,
> > .init_sw_leds = rtl88ee_init_sw_leds,
> >
> > - .allow_all_destaddr = rtl88ee_allow_all_destaddr,
> >
> > .get_bbreg = rtl88e_phy_query_bb_reg,
> > .set_bbreg = rtl88e_phy_set_bb_reg,
> > .get_rfreg = rtl88e_phy_query_rf_reg,
> >
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> > b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c index 25e178c..8b3134a
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> > +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.c
> > @@ -2407,24 +2407,3 @@ void rtl92ce_suspend(struct ieee80211_hw *hw)
> >
> > void rtl92ce_resume(struct ieee80211_hw *hw)
> > {
> > }
> >
> > -
> > -/* Turn on AAP (RCR:bit 0) for promicuous mode. */
> > -void rtl92ce_allow_all_destaddr(struct ieee80211_hw *hw,
> > - bool allow_all_da, bool write_into_reg)
> > -{
> > - struct rtl_priv *rtlpriv = rtl_priv(hw);
> > - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> > -
> > - if (allow_all_da) {/* Set BIT0 */
> > - rtlpci->receive_config |= RCR_AAP;
> > - } else {/* Clear BIT0 */
> > - rtlpci->receive_config &= ~RCR_AAP;
> > - }
> > -
> > - if (write_into_reg)
> > - rtl_write_dword(rtlpriv, REG_RCR, rtlpci->receive_config);
> > -
> > - RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
> > - "receive_config=0x%08X, write_into_reg=%d\n",
> > - rtlpci->receive_config, write_into_reg);
> > -}
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h
> > b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h index 2d063b0..5533070
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h
> > +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/hw.h
> > @@ -76,7 +76,5 @@ void rtl8192ce_bt_reg_init(struct ieee80211_hw *hw);
> >
> > void rtl8192ce_bt_hw_init(struct ieee80211_hw *hw);
> > void rtl92ce_suspend(struct ieee80211_hw *hw);
> > void rtl92ce_resume(struct ieee80211_hw *hw);
> >
> > -void rtl92ce_allow_all_destaddr(struct ieee80211_hw *hw,
> > - bool allow_all_da, bool write_into_reg);
> >
> > #endif
> >
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
> > b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c index b790320..12f21f4
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
> > +++ b/drivers/net/wireless/rtlwifi/rtl8192ce/sw.c
> > @@ -229,7 +229,6 @@ static struct rtl_hal_ops rtl8192ce_hal_ops = {
> >
> > .enable_hw_sec = rtl92ce_enable_hw_security_config,
> > .set_key = rtl92ce_set_key,
> > .init_sw_leds = rtl92ce_init_sw_leds,
> >
> > - .allow_all_destaddr = rtl92ce_allow_all_destaddr,
> >
> > .get_bbreg = rtl92c_phy_query_bb_reg,
> > .set_bbreg = rtl92c_phy_set_bb_reg,
> > .set_rfreg = rtl92ce_phy_set_rf_reg,
> >
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> > b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c index 5aa39ef..8c7aca4
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> > +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
> > @@ -2531,23 +2531,3 @@ void rtl92se_resume(struct ieee80211_hw *hw)
> >
> > pci_write_config_dword(rtlpci->pdev, 0x40,
> >
> > val & 0xffff00ff);
> >
> > }
> >
> > -
> > -/* Turn on AAP (RCR:bit 0) for promicuous mode. */
> > -void rtl92se_allow_all_destaddr(struct ieee80211_hw *hw,
> > - bool allow_all_da, bool write_into_reg)
> > -{
> > - struct rtl_priv *rtlpriv = rtl_priv(hw);
> > - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> > -
> > - if (allow_all_da) /* Set BIT0 */
> > - rtlpci->receive_config |= RCR_AAP;
> > - else /* Clear BIT0 */
> > - rtlpci->receive_config &= ~RCR_AAP;
> > -
> > - if (write_into_reg)
> > - rtl_write_dword(rtlpriv, RCR, rtlpci->receive_config);
> > -
> > - RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
> > - "receive_config=0x%08X, write_into_reg=%d\n",
> > - rtlpci->receive_config, write_into_reg);
> > -}
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/hw.h
> > b/drivers/net/wireless/rtlwifi/rtl8192se/hw.h index da48aa8..4cacee1
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8192se/hw.h
> > +++ b/drivers/net/wireless/rtlwifi/rtl8192se/hw.h
> > @@ -74,7 +74,5 @@ void rtl92se_set_key(struct ieee80211_hw *hw,
> >
> > u8 enc_algo, bool is_wepkey, bool clear_all);
> >
> > void rtl92se_suspend(struct ieee80211_hw *hw);
> > void rtl92se_resume(struct ieee80211_hw *hw);
> >
> > -void rtl92se_allow_all_destaddr(struct ieee80211_hw *hw,
> > - bool allow_all_da, bool write_into_reg);
> >
> > #endif
> >
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> > b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c index 2e8e6f8..1bff2a0
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> > +++ b/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
> > @@ -290,7 +290,6 @@ static struct rtl_hal_ops rtl8192se_hal_ops = {
> >
> > .enable_hw_sec = rtl92se_enable_hw_security_config,
> > .set_key = rtl92se_set_key,
> > .init_sw_leds = rtl92se_init_sw_leds,
> >
> > - .allow_all_destaddr = rtl92se_allow_all_destaddr,
> >
> > .get_bbreg = rtl92s_phy_query_bb_reg,
> > .set_bbreg = rtl92s_phy_set_bb_reg,
> > .get_rfreg = rtl92s_phy_query_rf_reg,
> >
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
> > b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c index 4680816..48e8b82
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
> > +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.c
> > @@ -2377,24 +2377,3 @@ void rtl8723ae_suspend(struct ieee80211_hw *hw)
> >
> > void rtl8723ae_resume(struct ieee80211_hw *hw)
> > {
> > }
> >
> > -
> > -/* Turn on AAP (RCR:bit 0) for promicuous mode. */
> > -void rtl8723ae_allow_all_destaddr(struct ieee80211_hw *hw,
> > - bool allow_all_da, bool write_into_reg)
> > -{
> > - struct rtl_priv *rtlpriv = rtl_priv(hw);
> > - struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
> > -
> > - if (allow_all_da) /* Set BIT0 */
> > - rtlpci->receive_config |= RCR_AAP;
> > - else /* Clear BIT0 */
> > - rtlpci->receive_config &= ~RCR_AAP;
> > -
> > - if (write_into_reg)
> > - rtl_write_dword(rtlpriv, REG_RCR, rtlpci->receive_config);
> > -
> > -
> > - RT_TRACE(rtlpriv, COMP_TURBO | COMP_INIT, DBG_LOUD,
> > - "receive_config=0x%08X, write_into_reg=%d\n",
> > - rtlpci->receive_config, write_into_reg);
> > -}
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h
> > b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h index 6fa24f7..d3bc39f
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h
> > +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/hw.h
> > @@ -67,7 +67,5 @@ void rtl8723ae_bt_reg_init(struct ieee80211_hw *hw);
> >
> > void rtl8723ae_bt_hw_init(struct ieee80211_hw *hw);
> > void rtl8723ae_suspend(struct ieee80211_hw *hw);
> > void rtl8723ae_resume(struct ieee80211_hw *hw);
> >
> > -void rtl8723ae_allow_all_destaddr(struct ieee80211_hw *hw,
> > - bool allow_all_da, bool write_into_reg);
> >
> > #endif
> >
> > diff --git a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
> > b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c index 62b204f..a9cb110
> > 100644
> > --- a/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
> > +++ b/drivers/net/wireless/rtlwifi/rtl8723ae/sw.c
> > @@ -230,7 +230,6 @@ static struct rtl_hal_ops rtl8723ae_hal_ops = {
> >
> > .enable_hw_sec = rtl8723ae_enable_hw_security_config,
> > .set_key = rtl8723ae_set_key,
> > .init_sw_leds = rtl8723ae_init_sw_leds,
> >
> > - .allow_all_destaddr = rtl8723ae_allow_all_destaddr,
> >
> > .get_bbreg = rtl8723ae_phy_query_bb_reg,
> > .set_bbreg = rtl8723ae_phy_set_bb_reg,
> > .get_rfreg = rtl8723ae_phy_query_rf_reg,
> >
> > diff --git a/drivers/net/wireless/rtlwifi/wifi.h
> > b/drivers/net/wireless/rtlwifi/wifi.h index 8c64739..08fd164 100644
> > --- a/drivers/net/wireless/rtlwifi/wifi.h
> > +++ b/drivers/net/wireless/rtlwifi/wifi.h
> > @@ -1714,8 +1714,6 @@ struct rtl_hal_ops {
> >
> > u32 regaddr, u32 bitmask);
> >
> > void (*set_rfreg) (struct ieee80211_hw *hw, enum radio_path rfpath,
> >
> > u32 regaddr, u32 bitmask, u32 data);
> >
> > - void (*allow_all_destaddr)(struct ieee80211_hw *hw,
> > - bool allow_all_da, bool write_into_reg);
> >
> > void (*linked_set_reg) (struct ieee80211_hw *hw);
> > void (*chk_switch_dmdp) (struct ieee80211_hw *hw);
> > void (*dualmac_easy_concurrent) (struct ieee80211_hw *hw);
On 02/14/2014 03:48 PM, Peter Wu wrote:
> On Friday 14 February 2014 15:38:32 Larry Finger wrote:
>> On 02/14/2014 12:03 PM, Peter Wu wrote:
>>> Unused as configure_filter takes care of setting/clearing RCR_AAP.
>>>
>>> Signed-off-by: Peter Wu <[email protected]>
>>
>> NACK - at least for now. This patch has merge conflicts for the set of
>> patches that add the rtl8723be driver, and would cause build errors if the
>> merge were fixed. I will hang on to it and apply it later when the
>> rtl8723be merge is done.
>
> Fair enough, the next patch will strip even more then :-)
No harm in sending more as [RFC/RFT] items. That way they will get reviewed, and
I will be able to test them. Once the conflicts are cleared, then I can push
them to John with a "From" you.
Larry