Search Linux Wireless

Re: Problem with the rtl8192cu - kernelmodule after ifdown, ifup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

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;

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux