Modify

Opened 7 years ago

Closed 7 years ago

#9586 closed defect (fixed)

ath5k with "option distance" parameter crashes on boot

Reported by: Nenad Opsenica <nenad@…> Owned by: nbd
Priority: high Milestone:
Component: packages Version: Backfire 10.03.1 RC4
Keywords: Cc:

Description

Ath5k (on x86) with "option distance" parameter set for wireless device crashes when booting with

divide error: 0000 [#1]
last sysfs file: /sys/devices/pci0000:00/0000:00:0c.0/ieee80211/phy0/index
Modules linked in: cs5535_gpio i2c_algo_pcf i2c_algo_pca i2c_algo_bit i2c_dev i2c_core via_velocity via_rhine sis90c

Pid: 883, comm: iw Tainted: G        W  (2.6.32.27 #5)
EIP: 0060:[<c8a06f7a>] EFLAGS: 00010246 CPU: 0
EIP is at ath5k_hw_clocktoh+0xa/0x630 [ath5k]
EAX: 00001fff EBX: 00000033 ECX: c78a8000 EDX: 00000000
ESI: c78a8000 EDI: 0000003d EBP: 0000000e ESP: c6f26bd0
 DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
Process iw (pid: 883, ti=c6f26000 task=c78cb440 task.ti=c6f26000)
Stack:
 0000003d 00000033 c8a01735 c6dd8d40 c6dd8d54 00000010 c6dd8000 c8a101ac
<0> 0e8ff04c c6dd80c0 c6dd8200 c8994104 c89af4c0 00000000 ffffffff c88f0000
<0> c88fe340 c88fe378 c6f26c74 00000000 00000000 0000a504 00000000 0407e340
Call Trace:
 [<c8a01735>] ? ath5k_hw_set_coverage_class+0x45/0x100 [ath5k]
 [<c8a101ac>] ? ath5k_sysfs_register+0x21c/0x1070 [ath5k]
 [<c8994104>] ? __ieee80211_request_smps+0x1964/0x1ea0 [mac80211]
 [<c88f0000>] ? nl80211_send_scan_start+0x1d50/0x38b0 [cfg80211]
 [<c11cf0b5>] ? ctrl_dumpfamily+0x85/0xe0
 [<c88f02af>] ? nl80211_send_scan_start+0x1fff/0x38b0 [cfg80211]
 [<c88aae5d>] ? __kfifo_from_user_r+0x17d/0x210 [compat]
 [<c11cf339>] ? genl_rcv_msg+0x169/0x1a0
 [<c11cf1d0>] ? genl_rcv_msg+0x0/0x1a0
 [<c11cc8c8>] ? netlink_rcv_skb+0x38/0x90
 [<c11ce0a9>] ? genl_rcv+0x19/0x30
 [<c11cc663>] ? netlink_unicast+0x1b3/0x220
 [<c11cd39e>] ? netlink_sendmsg+0x26e/0x290
 [<c11a846e>] ? sock_sendmsg+0xbe/0xf0
 [<c1032cf0>] ? autoremove_wake_function+0x0/0x50
 [<c104df66>] ? __alloc_pages_nodemask+0x106/0x540
 [<c1075183>] ? do_lookup+0x53/0x1b0
 [<c1076f49>] ? __link_path_walk+0x9b9/0x9e0
 [<c1076f49>] ? __link_path_walk+0x9b9/0x9e0
 [<c11b0f90>] ? verify_iovec+0x50/0x90
 [<c11a8681>] ? sys_sendmsg+0x1e1/0x270
 [<c1049590>] ? find_get_page+0x10/0x50
 [<c104b0cf>] ? filemap_fault+0x5f/0x370
 [<c1059889>] ? __do_fault+0x319/0x370
 [<c104b070>] ? filemap_fault+0x0/0x370
 [<c11a99a4>] ? sys_socketcall+0x244/0x290
 [<c101973c>] ? do_page_fault+0x1ec/0x270
 [<c1019550>] ? do_page_fault+0x0/0x270
 [<c1002ae5>] ? syscall_call+0x7/0xb
Code: 89 d0 31 d2 f7 f1 89 c7 e9 bc f5 ff ff 8d 74 26 00 8b 44 24 18 83 c4 58 5b 5e 5f 5d c3 90 90 90 90 53 89 c1 8
EIP: [<c8a06f7a>] ath5k_hw_clocktoh+0xa/0x630 [ath5k] SS:ESP 0068:c6f26bd0
---[ end trace a7919e7f17c0a727 ]---

Same problem is reported in http://www.mail-archive.com/ath5k-devel@lists.ath5k.org/msg04472.html

Workaround is to postpone setting distance, i.e.

--- a/package/mac80211/files/lib/wifi/mac80211.sh
+++ b/package/mac80211/files/lib/wifi/mac80211.sh
@@ -316,7 +316,10 @@ enable_mac80211() {
                fi
        fi

-       [ -n "$distance" ] && iw phy "$phy" set distance "$distance"
+       # wait a bit before setting distance to avoid oops or noop if
+       # patch 991-skip-set_coverage_class-if-core_clock-not-defined.patch is applied
+       [ -n "$distance" ] && ( sleep 10; iw phy "$phy" set distance "$distance" ) &
+
        [ -n "$frag" ] && iw phy "$phy" set frag "${frag%%.*}"
        [ -n "$rts" ] && iw phy "$phy" set rts "${rts%%.*}"


or to apply patch proposed in http://www.mail-archive.com/ath5k-devel@lists.ath5k.org/msg04473.html, i.e.

--- /dev/null
+++ b/package/mac80211/patches/991-skip-set_coverage_class-if-core_clock-not-defined.patch
@@ -0,0 +1,25 @@
+diff -ruN compat-wireless-2011-04-19.orig/drivers/net/wireless/ath/ath5k/pcu.c compat-wireless-2011-04-19/drivers/net/wireless/ath/ath5k/pcu.c
+--- compat-wireless-2011-04-19.orig/drivers/net/wireless/ath/ath5k/pcu.c       2011-04-20 19:06:12.000000000 +0200
++++ compat-wireless-2011-04-19/drivers/net/wireless/ath/ath5k/pcu.c    2011-06-16 19:41:36.000000000 +0200
+@@ -758,14 +758,18 @@
+  */
+ void ath5k_hw_set_coverage_class(struct ath5k_hw *ah, u8 coverage_class)
+ {
++      struct ath_common *common = ath5k_hw_common(ah);
++
+       /* As defined by IEEE 802.11-2007 17.3.8.6 */
+       int slot_time = ath5k_hw_get_default_slottime(ah) + 3 * coverage_class;
+       int ack_timeout = ath5k_hw_get_default_sifs(ah) + slot_time;
+       int cts_timeout = ack_timeout;
+
+-      ath5k_hw_set_ifs_intervals(ah, slot_time);
+-      ath5k_hw_set_ack_timeout(ah, ack_timeout);
+-      ath5k_hw_set_cts_timeout(ah, cts_timeout);
++      if (common->clockrate) {
++              ath5k_hw_set_ifs_intervals(ah, slot_time);
++              ath5k_hw_set_ack_timeout(ah, ack_timeout);
++              ath5k_hw_set_cts_timeout(ah, cts_timeout);
++      }
+
+       ah->ah_coverage_class = coverage_class;
+ }


Attachments (0)

Change History (2)

comment:1 Changed 7 years ago by jow

  • Owner changed from developers to nbd
  • Status changed from new to assigned

comment:2 Changed 7 years ago by nbd

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

fixed in r27352

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.