On 03/11/2013 04:06 PM, Jussi Kivilinna wrote:
Scan appearently is not necessary, 'ifconfig wlan0 up & sleep 0.02; ifconfig wlan0 down' is enough. Just doing 'ifconfig wlan0 up; ifconfig wlan0 down' is enough. I also tested with monitor interface opened for tcpdump while doing 'ifconfig up&down' on wlan0 and still triggered the issue. Then turning wlan0 up resulted monitor interface only receiving probe requests from nearby devices.
I am in the middle of a long-term test of rtl8192ce, which keeps me from running tests of rtl8192cu, but I noticed something strange. Does the attached patch help? It is compile tested.
Larry
Index: linux-2.6/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c =================================================================== --- linux-2.6.orig/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c +++ linux-2.6/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c @@ -1377,7 +1377,23 @@ void rtl92cu_card_disable(struct ieee802 void rtl92cu_set_check_bssid(struct ieee80211_hw *hw, bool check_bssid) { - /* dummy routine needed for callback from rtl_op_configure_filter() */ + struct rtl_priv *rtlpriv = rtl_priv(hw); + u32 reg_rcr = rtl_read_dword(rtlpriv, REG_RCR); + + if (rtlpriv->psc.rfpwr_state != ERFON) + return; + + if (check_bssid) { + reg_rcr |= (RCR_CBSSID_DATA | RCR_CBSSID_BCN); + rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_RCR, + (u8 *) (®_rcr)); + _rtl92cu_set_bcn_ctrl_reg(hw, 0, BIT(4)); + } else if (!check_bssid) { + reg_rcr &= (~(RCR_CBSSID_DATA | RCR_CBSSID_BCN)); + _rtl92cu_set_bcn_ctrl_reg(hw, BIT(4), 0); + rtlpriv->cfg->ops->set_hw_reg(hw, + HW_VAR_RCR, (u8 *) (®_rcr)); + } } /*========================================================================== */