Modify

Opened 4 years ago

Closed 4 years ago

#14856 closed defect (fixed)

ath9k_hw: Unknown symbol __bad_udelay (err 0) boot message, atheros wifi no longer working

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: kernel Version: Trunk
Keywords: ath9k drivers Cc:

Description

I've been building trunk images monthly for the past several months with out issue with the ath9k drivers, seems that have have been improving too, up till this month. Have been using the TPLink tl-WN722n usb card. Seems that there is a bug in the ath9k drivers that produce a boot error" ath9k_hw: Unknown symbol bad_udelay (err 0)"

/sbin/wifi detect -returns empty

Build using ubuntu 12.04TLS system for the brcm2708 platform
Here is the dmesg output, any advice is appreciated.

Attachments (2)

dmesg (12.4 KB) - added by anonymous 4 years ago.
dmesg output
ath9k.patch (445 bytes) - added by rondoval 4 years ago.
The patch mentioned in comments

Download all attachments as: .zip

Change History (10)

Changed 4 years ago by anonymous

dmesg output

comment:1 Changed 4 years ago by rondoval

Same thing on WRT350N v2 (ath9k wifi module).
Fix:
diff --git a/package/kernel/mac80211/patches/300-pending_work.patch b/package/kernel/mac80211/patches/300-pending_work.patch
index bcaeee9..2ffdcf4 100644
--- a/package/kernel/mac80211/patches/300-pending_work.patch
+++ b/package/kernel/mac80211/patches/300-pending_work.patch
@@ -2216,7 +2216,7 @@

+ if (AR_SREV_9300_20_OR_LATER(ah))
+ udelay(50);
+ else if (AR_SREV_9100(ah))

-+ udelay(10000);
++ mdelay(10);

+ else
+ udelay(100);

comment:2 Changed 4 years ago by anonymous

Thanks for the patch. But for some reason I can't get it to apply.

saved the patch to auth9k.patch

Here is what I get:
openwrt$ git apply ath9k.patch --verbose
Checking patch package/kernel/mac80211/patches/300-pending_work.patch...
error: while searching for:

+ if (AR_SREV_9300_20_OR_LATER(ah))
+ udelay(50);
+ else if (AR_SREV_9100(ah))

+ udelay(10000);

error: patch failed: package/kernel/mac80211/patches/300-pending_work.patch:2216
error: package/kernel/mac80211/patches/300-pending_work.patch: patch does not apply

Is it possible that that patch is already applied via the git source? I see this in the file 300-pending_work.patch file
@@ -1373,7 +1328,12 @@ static bool ath9k_hw_set_reset(struct at

REGWRITE_BUFFER_FLUSH(ah);

  • udelay(50);

+ if (AR_SREV_9300_20_OR_LATER(ah))
+ udelay(50);
+ else if (AR_SREV_9100(ah))
+ udelay(10000);
+ else
+ udelay(100);

Changed 4 years ago by rondoval

The patch mentioned in comments

comment:3 Changed 4 years ago by anonymous

That patch works, no more ath9k messages. But the option channel 'auto' no longer works. Things do work if you define a channel. Here are the /etc/config/wireless options and logs if that helps.

config wifi-device 'radio0'

option type 'mac80211'
option hwmode '11ng'
option path 'platform/bcm2708_usb/usb1/1-1/1-1.2/1-1.2:1.0'
option htmode 'HT20'
list ht_capab 'SHORT-GI-20'
list ht_capab 'SHORT-GI-40'
list ht_capab 'RX-STBC1'
list ht_capab 'DSSS_CCK-40'
option channel 'auto'
option txpower '20'
option country 'US'

Logs
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): Configuration file: /var/run/hostapd-phy0.conf
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): wlan0: interface state UNINITIALIZED->COUNTRY_UPDATE
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): ACS: Automatic channel selection started, this may take a bit
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): wlan0: interface state COUNTRY_UPDATE->ACS
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): wlan0: ACS-STARTED
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): handle_probe_req: send failed
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): handle_probe_req: send failed
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): ACS: Unable to collect survey data
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): ACS: All study options have failed
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): Interface initialization failed
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): wlan0: interface state ACS->DISABLED
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): cat: can't open '/var/run/wifi-phy0.pid': No such file or directory
Wed Jan 29 02:45:56 2014 daemon.notice netifd: radio0 (255): Command failed: Invalid argument

comment:4 Changed 4 years ago by rondoval

Well, 'auto' does work for me on Barrier Breaker r39404 (but I do have a slightly different Atheros chipset).
The upstream change that has caused bad_udelay is here: http://git.kernel.org/cgit/linux/kernel/git/linville/wireless-next.git/commit/?id=04575f21d9c8dc3fbf8ad7d7ce3fc8261377def1

You could try reverting it entirely, i.e. from mdelay(10) to udelay(50). In any event, my bet is the new problem is not related.

Last edited 4 years ago by rondoval (previous) (diff)

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

On Cubieboard with usb adapter (module ath9k_htc) with that patch I have:
ath9k_hw: Unknown symbol bad_udelay (err 0)

comment:6 in reply to: ↑ 5 Changed 4 years ago by uvi

Replying to uvi:

On Cubieboard with usb adapter (module ath9k_htc) with that patch I have:
ath9k_hw: Unknown symbol bad_udelay (err 0)

Sorry, i changed only uImage, I forgot replace modules in rootfs.

comment:7 Changed 4 years ago by rondoval

From what I see this ticket is fixed by upstream merge in r39427

Last edited 4 years ago by rondoval (previous) (diff)

comment:8 Changed 4 years ago by nbd

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

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.