Bug 38012

Summary: Missing code to load firmware
Product: Drivers Reporter: Larry Finger (Larry.Finger)
Component: network-wirelessAssignee: drivers_network-wireless (drivers_network-wireless)
Status: CLOSED CODE_FIX    
Severity: high CC: aliaksei.katovich, florian, maciej.rutecki, rjw
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.0-rc3 Subsystem:
Regression: Yes Bisected commit-id:
Bug Depends on:    
Bug Blocks: 36912    
Attachments: Patch to fix firmware loading for rtl8192cu

Description Larry Finger 2011-06-20 21:44:31 UTC
In commit 3ac5e26a1e935469a8bdae1d624bc3b59d1fcdc5 entitled "rtlwifi: rtl8192c-common: Change common firmware routines for addition of rtl8192se and rtl8192de", the firmware loading code was moved. Unfortunately, some necessary code was dropped for rtl8192cu.

In the logs, the following messages are output:

rtl8192c: Loading firmware file rtlwifi/rtl8192cufw.bin
rtl8192c_common:_rtl92c_fw_free_to_go():<0-0> Polling FW ready fail!! REG_MCUFWDL:0x00000006 .
rtl8192c_common:rtl92c_download_fw():<0-0> Firmware is not ready to run!

In addition, the interface will authenticate and associate, but cannot transfer data.
Comment 1 Larry Finger 2011-06-20 21:46:32 UTC
The title should contain "rtl8192cu".
Comment 2 Larry Finger 2011-06-20 21:50:21 UTC
Created attachment 63002 [details]
Patch to fix firmware loading for rtl8192cu
Comment 3 Rafael J. Wysocki 2011-06-20 22:59:21 UTC
Handled-By : Larry Finger <Larry.Finger@lwfinger.net>
Patch : https://bugzilla.kernel.org/attachment.cgi?id=63002
Comment 4 Larry Finger 2011-06-20 23:14:11 UTC
Rafael - I am still waiting for testing by peter@chubb.wattle.id.au who first reported a problem. If his testing still shows a problem, I will reopen the bug.
Comment 5 Larry Finger 2011-07-02 17:30:50 UTC
The patch is commit 9935d12651c9e54ad266e17cd542ec717ccd0fc8 in mainline. The bug will be closed.
Comment 6 Aliaksei Katovich 2012-09-27 20:45:48 UTC
I encountered similar problem on AllWinner A10 device with 3.6 kernel. Symptoms are same as in original report. Here are some details:

~/ uname -a
Linux localhost 3.6.0-rc7+ #54 PREEMPT Thu Sep 27 22:40:25 EEST 2012 armv7l armv7l armv7l GNU/Linux

~/ [root@localhost ~]# dmesg | grep rtl
[   10.550000] rtl8192cu: Chip version 0x10
[   10.690000] rtl8192cu: MAC address: 00:92:c3:b6:52:e5
[   10.700000] rtl8192cu: Board Type 0
[   10.710000] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
[   10.710000] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw.bin
[   10.730000] usbcore: registered new interface driver rtl8192cu
[   10.760000] ieee80211 phy0: Selected rate control algorithm 'rtl_rc'
[   10.790000] rtlwifi: wireless switch is on
[   14.480000] rtl8192cu: MAC auto ON okay!
[   14.540000] rtl8192cu: Tx queue select: 0x05
[   14.590000] rtl8192c_common:_rtl92c_fw_free_to_go():<0-0> chksum report faill ! REG_MCUFWDL:0x00030000
[   14.610000] rtl8192c_common:rtl92c_download_fw():<0-0> Firmware is not ready to run!
Comment 7 Larry Finger 2012-09-27 22:12:45 UTC
The symptoms in this report are different - this one indicates a faulty firmware file with a bad checksum. The md5sum should be 943e9b714a926e630b8152d7aad91d2e  for /lib/firmware/rtlwifi/rtl8192cufw.bin.

This bug should remain closed.
Comment 8 Aliaksei Katovich 2012-09-28 08:06:56 UTC
Well, agree, the symptoms are different but what is common is that interface is authenticated and associated but no data traffic whatsoever.

Also, it looks like md5sum of firmware on my device is correct:

[root@localhost ~]# md5sum /lib/firmware/rtlwifi/rtl8192cufw.bin 
943e9b714a926e630b8152d7aad91d2e  /lib/firmware/rtlwifi/rtl8192cufw.bin

I will try to investigate the problem further, but is this ok to post my findings here, if any?
Comment 9 Larry Finger 2012-09-28 14:39:59 UTC
Your log output never showed anything past the indication that the firmware was not ready to run. How could it possibly authenticate?

I think you should create a new Bugzilla entry.
Comment 10 Aliaksei Katovich 2012-09-28 22:55:58 UTC
I concluded this from iwconfig output: ap associated, key assigned, also dmesg shows this:

[...]
[   28.330000] Modules linked in: rtl8192cu rtlwifi rtl8192c_common
[   41.740000] wlan0: authenticate with 40:4a:03:a5:20:87
[   41.790000] wlan0: send auth to 40:4a:03:a5:20:87 (try 1/3)
[   41.810000] wlan0: authenticated
[...]

But anyway, you are right, this is the subject of a new bug.