Modify

Opened 5 years ago

Last modified 3 years ago

#13951 reopened defect

Revision r36939 breaks support for RT5370 (rt2800usb) in HG556a (brcm6358)

Reported by: openwrt@… Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: kernel Version: Trunk
Keywords: r36939 RT5370 rt2800usb HG556a brcm6358 Cc:

Description

Hi,

I have been trying to compile trunk OpenWrt for a Huawei HG556a (brcm6358) adding support for a wireless USB dongle with chip RT5370 (rt2800), with no success. I've found that, from revision r36939 on, the device is detected as USB hardware but the driver does not bring it up. The immediately previous revision (r36938) handles the wifi dongle properly. Other wireless USB devices (ath9k_htc wireless or flash storage) and the internal wireless (ath9k) work fine.

For r36938 and r36939 I've compiled the sources, changing in both cases only this from default ncurses menuconfig:

Target System (Broadcom BCM63xx)
Target Profile (HW556 WiFi)
Kernel modules  --->
 USB Support  --->
  <*> kmod-usb-storage
  <*> kmod-usb2
 Wireless Drivers  --->
  <*> kmod-ath9k-htc
  <*> kmod-rt2800-usb

I'm attaching dmesg output for both compilations, plugging after boot the ath9k_htc dongle and later the rt2800usb.

In case more information/logs/debug is needed, please ask me.

Kind regards,

Roger

Attachments (2)

dmesg_r36938.log (12.8 KB) - added by openwrt@… 5 years ago.
dmesg output for r36938 with rt2800usb working
dmesg_r36939.log (12.5 KB) - added by openwrt@… 5 years ago.
dmesg output for r36939 with rt2800usb not working

Download all attachments as: .zip

Change History (20)

Changed 5 years ago by openwrt@…

dmesg output for r36938 with rt2800usb working

Changed 5 years ago by openwrt@…

dmesg output for r36939 with rt2800usb not working

comment:1 Changed 5 years ago by anonymous

not works

comment:2 Changed 5 years ago by anonymous

revisión 37568
NO works

comment:3 Changed 5 years ago by anonymous

Bug still present in r37577.

comment:4 follow-up: Changed 5 years ago by juhosg

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in r37697.

comment:5 in reply to: ↑ 4 Changed 4 years ago by openwrt@…

Replying to juhosg:

Fixed in r37697.

Reported to work (r38153)! Thank you very much, juhosg!

comment:6 Changed 4 years ago by anonymous

select wifi railink if is HG556a Version A no this one Target Profile (HW556 WiFi)

comment:7 Changed 4 years ago by ivorsmorenburgaguado@…

select wifi railink if is HG556a Version A no this one Target Profile (HW556 WiFi)

comment:8 Changed 4 years ago by alexatkin@…

This appears to be broken again in r40576.

Was working fine in a build from a couple of weeks ago that regretfully I was going to make a note of the build number BEFORE upgrading but forgot.

comment:9 Changed 4 years ago by anonymous

  • Resolution fixed deleted
  • Status changed from closed to reopened

Looks like still broken in r41556

comment:10 Changed 4 years ago by nbd

any details on that?

comment:11 Changed 4 years ago by nbd

  • Resolution set to no_response
  • Status changed from reopened to closed

comment:12 Changed 4 years ago by anonymous

Sorry, I don't have the device anymore. :(

comment:13 follow-up: Changed 3 years ago by anonymous

  • Resolution no_response deleted
  • Status changed from closed to reopened

Broken in r42625

comment:14 in reply to: ↑ 13 ; follow-up: Changed 3 years ago by anonymous

Replying to anonymous:

Broken in r42625

Happy to do testing on this - tlg

comment:15 in reply to: ↑ 14 Changed 3 years ago by anonymous

Replying to anonymous:

Replying to anonymous:

Broken in r42625

Happy to do testing on this - tlg

forum.openwrt.org/viewtopic.php?pid=253759#p253759

comment:16 Changed 3 years ago by lsoltero

still broken in r44186

rt3070 works perfectly. rt5370 does not.

working on an AR9331 SoC based Alfa hornet board. So this seems to be a generic problem across all platforms.

amazingly enough this
rm package/kernel/mac80211/patches/910-00-rt2x00-enable-rt2800soc-for-mt7620.patch

rm package/kernel/mac80211/patches/910-01-add-support-for-mt7620.patch

fixes the problem!

unfortunately we also need to support the mt7620 so it would be nice if rt5370 played nice with the mt7620. any chance of getting this fixed before the official stable release of CC?

--luis

Last edited 3 years ago by lsoltero (previous) (diff)

comment:17 Changed 3 years ago by lsoltero

fixed.

910-01-add-support-for-mt7620.patch

modified rt2800_get_txwi_rxwi_size() to add a case statement for the RT5390. The problem is that the logic added to the case tested for the 7620 but failed to set the values for txwi_size and rxwi_size when the 5390 was not associated with the 7620. So the full function should look like

void rt2800_get_txwi_rxwi_size(struct rt2x00_dev *rt2x00dev,

unsigned short *txwi_size,
unsigned short *rxwi_size)

{

switch (rt2x00dev->chip.rt) {
case RT3593:
case RT3883:

*txwi_size = TXWI_DESC_SIZE_4WORDS;
*rxwi_size = RXWI_DESC_SIZE_5WORDS;
break;


case RT5390:

if ( rt2x00dev->chip.rf == RF7620 ) {

*txwi_size = TXWI_DESC_SIZE_5WORDS;
*rxwi_size = RXWI_DESC_SIZE_6WORDS;

} else {

else clause missing in original patch.

*txwi_size = TXWI_DESC_SIZE_4WORDS;
*rxwi_size = RXWI_DESC_SIZE_4WORDS;

}
break;


case RT5592:

*txwi_size = TXWI_DESC_SIZE_5WORDS;
*rxwi_size = RXWI_DESC_SIZE_6WORDS;
break;


default:

*txwi_size = TXWI_DESC_SIZE_4WORDS;
*rxwi_size = RXWI_DESC_SIZE_4WORDS;
break;

}

}

here is a patch that fixes the problem

package/kernel/mac80211/patches$ cat 910-02-fix-5370-in-add-support-for-mt7620.patch
--- a/drivers/net/wireless/rt2x00/rt2800lib.c
+++ b/drivers/net/wireless/rt2x00/rt2800lib.c
@@ -633,6 +633,9 @@ void rt2800_get_txwi_rxwi_size(struct rt

if ( rt2x00dev->chip.rf == RF7620 ) {

*txwi_size = TXWI_DESC_SIZE_5WORDS;
*rxwi_size = RXWI_DESC_SIZE_6WORDS;

+ } else {
+ *txwi_size = TXWI_DESC_SIZE_4WORDS;
+ *rxwi_size = RXWI_DESC_SIZE_4WORDS;

}
break;

comment:18 Changed 3 years ago by francisT

Has this fix been applied to the CC trunk?

I'm seeing identical behavior on my system using r45579 , which is the most recent I can find.

Model Raspberry Pi
Firmware Version OpenWrt Chaos Calmer r45579 / LuCI (git-15.113.66125-f322842)
Kernel Version 3.18.11

Add Comment

Modify Ticket

Action
as reopened .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.