All of lore.kernel.org
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Nicu Pavel <npavel@mini-box.com>
Cc: linux-wireless@vger.kernel.org,
	Joshua Roys <Joshua.Roys@gtri.gatech.edu>
Subject: Re: Problem with the rtl8192cu - kernelmodule after ifdown, ifup
Date: Fri, 06 Apr 2012 14:54:55 -0500	[thread overview]
Message-ID: <4F7F4A0F.2050300@lwfinger.net> (raw)
In-Reply-To: <CAL9MRr=U+CCzjP-cSOkPJpvw=AQuHX23grj1atfkT9uxLzEM4w@mail.gmail.com>

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

On 04/06/2012 03:48 AM, Nicu Pavel wrote:
> ---->  ifdown/ifup no scanning results.
>
> <6>rtl8192cu: MAC auto ON okay!
> <6>rtl8192cu: Tx queue select: 0x05
> <7>rtl8192c_common:rtl92c_phy_set_bw_mode():<0-0>  FALSE driver sleep or unload
> <6>rtl8192c_common: Loading firmware file rtlwifi/rtl8192cufw.bin
> <7>rtl8192cu:rtl92cu_set_hw_reg():<0-0>  ### Set RCR(0xf0002ace) ###
> <7>rtlwifi:rtl_op_conf_tx():<0-0>  queue number -954253944 is incorrect!
> <7>rtlwifi:rtl_op_conf_tx():<0-0>  queue number -954253944 is incorrect!
> <7>rtlwifi:rtl_op_conf_tx():<0-0>  queue number -954253944 is incorrect!
> <7>rtlwifi:rtl_op_conf_tx():<0-0>  queue number -954253944 is incorrect!
> <7>rtl8192cu:rtl92cu_set_hw_reg():<0-0>  ### Set RCR(0xf0002a0e) ###
>
> ---->  ifdown/ifup no scanning results.

Please try the attached patch. After looking at the backtraces for the calls 
that set the BSSID filters, I could see no reason for the driver to fail, yet it 
did. Once I kept those bits clear you did in the beginning, then it works. The 
amount of extra overhead will be minimal as the bits were only set for a short time.

If this patch works for you, then I will send it upstream for mainline and 
stable. The best place to keep the bits clear would be in the calling routine, 
not in rtl92cu_set_hw_reg(); however, that patch will be much more intrusive and 
would not be accepted for 3.4.

Larry


[-- Attachment #2: rtl8192cu_set_check_bssid --]
[-- Type: text/plain, Size: 937 bytes --]

Index: wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
@@ -1867,8 +1867,14 @@ void rtl92cu_set_hw_reg(struct ieee80211
 			break;
 		}
 	case HW_VAR_RCR:{
-			rtl_write_dword(rtlpriv, REG_RCR, ((u32 *) (val))[0]);
 			mac->rx_conf = ((u32 *) (val))[0];
+			/* whenever the driver sets bits enabling only a
+			 * specific BSSID for beacons or data, a failure
+			 * occurs. Thus we do not allow those bits to be set */
+			if (mac->rx_conf & (RCR_CBSSID_BCN | RCR_CBSSID_DATA))
+				mac->rx_conf &= ~(RCR_CBSSID_BCN |
+						  RCR_CBSSID_DATA);
+			rtl_write_dword(rtlpriv, REG_RCR, ((u32 *) (val))[0]);
 			RT_TRACE(rtlpriv, COMP_RECV, DBG_DMESG,
 				 "### Set RCR(0x%08x) ###\n", mac->rx_conf);
 			break;

  reply	other threads:[~2012-04-06 19:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-12 14:11 Problem with the rtl8192cu - kernelmodule after ifdown, ifup Markus Königshaus
2012-01-13  3:28 ` Larry Finger
2012-04-02 11:32   ` Nicu Pavel
2012-04-05  7:27   ` Nicu Pavel
2012-04-05 12:31     ` Joshua Roys
2012-04-05 16:23       ` Larry Finger
2012-04-06  2:04       ` Larry Finger
2012-04-06  8:48         ` Nicu Pavel
2012-04-06 19:54           ` Larry Finger [this message]
2012-04-09  8:40             ` Nicu Pavel
2012-04-09 16:03               ` Larry Finger
2012-04-09 16:29                 ` Nicu Pavel

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=4F7F4A0F.2050300@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=Joshua.Roys@gtri.gatech.edu \
    --cc=linux-wireless@vger.kernel.org \
    --cc=npavel@mini-box.com \
    /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.