All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Cc: linux-wireless@vger.kernel.org, 'George0505' <george0505@realtek.com>
Subject: Re: rtl8192cu gets confused when scan is aborted by bringing interface down (Re: rtl8192cu goes silent/dead after some time...)
Date: Mon, 11 Mar 2013 16:31:07 -0500	[thread overview]
Message-ID: <513E4D1B.5000902@lwfinger.net> (raw)
In-Reply-To: <20130311230656.949364zqs1dt100s@www.dalek.fi>

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

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


[-- Attachment #2: rtl8192cu_modify_check_bssid --]
[-- Type: text/plain, Size: 1109 bytes --]

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 *) (&reg_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 *) (&reg_rcr));
+	}
 }
 
 /*========================================================================== */

  parent reply	other threads:[~2013-03-11 21:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-25 16:51 rtl8192cu goes silent/dead after some time Jussi Kivilinna
2013-02-27 19:05 ` Larry Finger
2013-03-10 12:29   ` Jussi Kivilinna
2013-03-11 19:17     ` rtl8192cu gets confused when scan is aborted by bringing interface down (Re: rtl8192cu goes silent/dead after some time...) Jussi Kivilinna
2013-03-11 20:25       ` Larry Finger
2013-03-11 21:06         ` Jussi Kivilinna
2013-03-11 21:10           ` Larry Finger
2013-03-11 21:31           ` Larry Finger [this message]
2013-03-12  9:10             ` Jussi Kivilinna
2013-03-12 16:51               ` Larry Finger
2013-03-12 19:49                 ` Jussi Kivilinna
  -- strict thread matches above, loose matches on Subject: below --
2013-03-13 15:11 Alessandro Lannocca
2013-03-13 15:25 ` Larry Finger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=513E4D1B.5000902@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=george0505@realtek.com \
    --cc=jussi.kivilinna@iki.fi \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.