Bug 1480829

Summary: RT3573 does not work on 4.12.x but works OK on 4.11.x
Product: [Fedora] Fedora Reporter: Jussi Eloranta <eloranta>
Component: kernelAssignee: Stanislaw Gruszka <sgruszka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 26CC: gansalmon, ichavero, itamar, jonathan, kernel-maint, madhu.chinakonda, mchehab
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-4.12.9-300.fc26 kernel-4.12.9-200.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-31 22:53:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
0001-rt2800-restore-previous-TX_PIN_CFG-setting.patch none

Description Jussi Eloranta 2017-08-12 01:20:43 UTC
Description of problem: I am using the following USB wifi dongle:

Bus 008 Device 002: ID 148f:3573 Ralink Technology, Corp. RT3573 Wireless Adapter

which has been working correctly on 2.11.x earlier. However, on 2.12.x (at least .4), the dongle is found correctly but all signals appear extremely weak. I can barely see my router that is sitting right next to the computer with this wifi dongle. With 2.11.x the signal level is much higher and I can even see neighbors routers.

Here is lsmod:

...
rt2x00usb              20480  1 rt2800usb
rt2800lib              98304  1 rt2800usb
rt2x00lib              65536  3 rt2800lib,rt2800usb,rt2x00usb
media                  40960  5 tuner,tvp5150,videodev,em28xx,em28xx_v4l
mac80211              761856  3 rt2800lib,rt2x00lib,rt2x00usb
btusb                  45056  0
eeepc_wmi              16384  0
asus_wmi               28672  1 eeepc_wmi
btrtl                  16384  1 btusb
btbcm                  16384  1 btusb
cfg80211              598016  2 rt2x00lib,mac80211
...

This is the relevant part of dmesg on 2.11.x:

[   21.738441] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3593, rev 0402 detected
[   21.749444] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 000d detected
[   21.779582] usbcore: registered new interface driver rt2800usb
[   21.906641] rt2800usb 8-1:1.0 wlp3s0u1: renamed from wlan0
[   35.268167] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   35.508544] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36

I will post the corresponding dmesg info on 2.12.x in the following msg (need to reboot).

Comment 1 Jussi Eloranta 2017-08-12 01:34:56 UTC
[   20.616353] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 3593, rev 0402 d
etected
[   20.627743] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 000d detected
[   21.333479] usbcore: registered new interface driver rt2800usb
[   21.443328] rt2800usb 8-1:1.0 wlp3s0u1: renamed from wlan0
[   35.712791] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmwa
re file 'rt2870.bin'
[   35.834845] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detec
ted - version: 0.36

So, no difference. One more observation: if I boot into 2.11.x first and then (soft) reboot into 2.12.x, the usb wifi dongle works OK. So, perhaps there is an issue with gain setting in 2.12.x and that 2.11.x is able to set it correctly? Of course, as I said above, cold reboot into 2.12.x yields extremely low sensitivity for the wifi.

Comment 2 Jussi Eloranta 2017-08-12 20:55:30 UTC
Same result with 4.12.6-300.

Comment 3 Stanislaw Gruszka 2017-08-18 09:07:56 UTC
I assume you mean about difference between 4.11.x and 4.12.x. Here are commits of rt2x00 driver that could cause this problem:

da6a435 mac80211: separate encoding/bandwidth from flags
7fdd69c mac80211: clean up rate encoding bits in RX status
ac2291c Merge tag 'wireless-drivers-next-for-davem-2017-04-21' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next
028f43b Merge tag 'mac80211-next-for-davem-2017-04-18' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next
a059783 rt2800: fix mt7620 E2 channel registers
4bd96b5 rt2800: fix mt7620 vco calibration registers
2031bad rt2800: do VCO calibration after programming ALC
225a644 rt2800: fix LNA gain assignment for MT7620
1f242a3 rt2x00: reverse external PA capability flag logic
41977e8 rt2x00: add support for MT7620
5ce33b6 rt2x00: fix TX_PWR_CFG_4 register definition
dd35cc0 rt2x00: fix rt2x00debug_dump_frame comment
fb47ada rt2800: use TXOP_BACKOFF for probe frames
9d7a7a4 rt2800: status based rate flags for nomatch case
293dff7 rt2x00: use txdone_nomatch on rt2800usb
ec80ad7 rt2x00: fixup fill_tx_status for nomatch case
a09305d rt2x00: add txdone nomatch function
56646ad rt2x00: separte clearing entry from rt2x00lib_txdone
5edb05a rt2x00: separte filling tx status from rt2x00lib_txdone
a13d985 rt2800: identify station based on status WCID
96609f3 rt2x00: rt2800lib: move rt2800_drv_data declaration into rt2800lib.h
ae44b50 wireless: Set NL80211_EXT_FEATURE_CQM_RSSI_LIST in multiple drivers

I'll provide you test kernels with reverts of the commits to identify change which cause the problem.

Comment 4 Stanislaw Gruszka 2017-08-18 09:52:37 UTC
Please cold boot rt2x00_r1 and r2 kernels from:
https://koji.fedoraproject.org/koji/taskinfo?taskID=21300927
and
https://koji.fedoraproject.org/koji/taskinfo?taskID=21300927
and check if any of them works properly.

Comment 5 Jussi Eloranta 2017-08-19 00:39:28 UTC
r1 works after cold boot. How do I get hold of r2? The two links above seem to be the same.

Comment 6 Stanislaw Gruszka 2017-08-21 06:59:59 UTC
Sorry, I copied wrong link, here is r2 kernel:
https://koji.fedoraproject.org/koji/taskinfo?taskID=21300955

Comment 7 Jussi Eloranta 2017-08-22 04:10:17 UTC
r2 works as well (from cold boot).

Comment 8 Stanislaw Gruszka 2017-08-24 10:53:05 UTC
Created attachment 1317639 [details]
0001-rt2800-restore-previous-TX_PIN_CFG-setting.patch

Proposed fix. Kernel build with the fix is here:
https://koji.fedoraproject.org/koji/taskinfo?taskID=21437030
Please test if it fixes the issue.

Comment 9 Jussi Eloranta 2017-08-25 03:14:46 UTC
OK, thanks! I confirm that the patch works.

Comment 10 Stanislaw Gruszka 2017-08-25 12:14:37 UTC
Thanks for testing, patch was submitted:
https://marc.info/?l=linux-wireless&m=150366111408179&w=2

Comment 11 Fedora Update System 2017-08-25 21:14:23 UTC
kernel-4.12.9-300.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-78c4c71539

Comment 12 Fedora Update System 2017-08-25 21:15:30 UTC
kernel-4.12.9-200.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-4b4c022807

Comment 13 Fedora Update System 2017-08-26 22:36:32 UTC
kernel-4.12.9-300.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-78c4c71539

Comment 14 Fedora Update System 2017-08-26 22:37:34 UTC
kernel-4.12.9-200.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-4b4c022807

Comment 15 Stanislaw Gruszka 2017-08-28 05:42:20 UTC
For 4.13+ kernels updated patch is here:
https://patchwork.kernel.org/patch/9922285/

Comment 16 Fedora Update System 2017-08-31 22:53:47 UTC
kernel-4.12.9-300.fc26 has been pushed to the Fedora 26 stable repository. If problems still persist, please make note of it in this bug report.

Comment 17 Fedora Update System 2017-09-01 03:23:26 UTC
kernel-4.12.9-200.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.