It seems possible to slip in a set coverage class before ath5k_hw_init_core_clock has been called. The openwrt script /lib/wifi/mac80211.sh does it reliably. Sometimes I get "rmmod ath5k;insmod ath5k;iw phyx set distance 11000" to oops, but not always.
compat-wireless-2011-02-25. Steve ======================= divide error: 0000 [#1] last sysfs file: /sys/devices/pci0000:00/0000:00:0e.0/ieee80211/phy0/index Modules linked in: usbhid option usb_wwan usb_storage usbserial evdev lm90 scx200_acb i2c_algo_bit i2c_dev i2c_core via_rhine ohci_hcd ne2k_pci 8390 leds_ali Pid: 919, comm: iw Not tainted 2.6.37 #2 / EIP: 0060:[<d2eca5a1>] EFLAGS: 00010246 CPU: 0 EIP is at ath5k_hw_clocktoh+0x31/0x50 [ath5k] EAX: 00001fff EBX: cf892000 ECX: c1325a6c EDX: 00000000 ESI: 00001fff EDI: 00000019 EBP: 00000060 ESP: ce76fc00 DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 0068 Process iw (pid: 919, ti=ce76e000 task=ce62aff0 task.ti=ce76e000) Stack: d2ede21b 00000000 cf892000 cf892000 cf892000 000000a0 d2ec4b76 ce720d94 ce720d80 00000019 ffffffa1 d2ed370d 00000010 ce7200c0 ce720200 d29f2407 ce720000 d2a0e8c0 ffffffff 00000000 d19c40e5 c120f582 00000002 19763840 Call Trace: [<d2ec4b76>] ? ath5k_hw_set_coverage_class+0x46/0xf0 [ath5k] [<d2ed370d>] ? ath5k_set_coverage_class+0x2d/0x50 [ath5k] [<d29f2407>] ? ieee80211_set_wiphy_params+0x67/0xd0 [mac80211] [<d19c40e5>] ? nl80211_set_wiphy+0x565/0x5f0 [cfg80211] [<c120f582>] ? ctrl_dumpfamily+0x72/0xc0 [<c107acba>] ? kmem_cache_alloc+0x5a/0x70 [<c112ec74>] ? nla_parse+0x44/0xb0 [<d19bea09>] ? nl80211_pre_doit+0x29/0x160 [cfg80211] [<c120fa2f>] ? genl_rcv_msg+0x1af/0x1f0 [<c120f880>] ? genl_rcv_msg+0x0/0x1f0 [<c120eec9>] ? netlink_rcv_skb+0x39/0x80 [<c120f860>] ? genl_rcv+0x0/0x20 [<c120f874>] ? genl_rcv+0x14/0x20 [<c120e958>] ? netlink_unicast+0x1b8/0x240 [<c120ec28>] ? netlink_sendmsg+0x248/0x2b0 [<c11e608a>] ? sock_sendmsg+0x9a/0xc0 [<c108cfa0>] ? prepend+0x30/0x40 [<c108d1c9>] ? prepend_path+0xb9/0x140 [<c108cfa0>] ? prepend+0x30/0x40 [<c11efbc0>] ? verify_iovec+0x50/0xb0 [<c11e872a>] ? sys_sendmsg+0x1da/0x250 [<c1069ab3>] ? __do_fault.clone.74+0x373/0x3c0 [<c106b99d>] ? handle_mm_fault+0xfd/0x5b0 [<d19b9380>] ? index_show+0x0/0x30 [cfg80211] [<c101d170>] ? do_page_fault+0x0/0x3b0 [<c101d4ea>] ? do_page_fault+0x37a/0x3b0 [<c11e8cad>] ? sys_socketcall+0x22d/0x290 [<c107c10f>] ? filp_close+0x5f/0x80 [<c101d170>] ? do_page_fault+0x0/0x3b0 [<c1263865>] ? syscall_call+0x7/0xb Code: 10 89 c3 89 74 24 14 89 d6 89 44 24 0c 89 44 24 08 8b 80 88 00 00 00 c7 04 24 1b e2 ed d2 89 44 24 04 e8 98 7a 39 ee 89 f0 31 d2 <f7> b3 88 00 00 00 8 EIP: [<d2eca5a1>] ath5k_hw_clocktoh+0x31/0x50 [ath5k] SS:ESP 0068:ce76fc00 ---[ end trace 4627023a732e5338 ]--- ================================ (gdb) info line *ath5k_hw_clocktoh+0x31 Line 87 of "/home/brown/wifi/dev/openwrt/alix-svn/build_dir/linux-x86_generic/compat-wireless-2011-02-25/drivers/net/wireless/ath/ath5k/reset.c" starts at address 0xc5cd <ath5k_hw_clocktoh+45> and ends at 0xc5d7 <ath5k_hw_clocktoh+55>. _______________________________________________ ath5k-devel mailing list ath5k-devel@lists.ath5k.org https://lists.ath5k.org/mailman/listinfo/ath5k-devel