From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail.candelatech.com ([208.74.158.172]:39907 "EHLO ns3.lanforge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750779Ab0JOVkV (ORCPT ); Fri, 15 Oct 2010 17:40:21 -0400 Message-ID: <4CB8CA37.2050509@candelatech.com> Date: Fri, 15 Oct 2010 14:40:07 -0700 From: Ben Greear MIME-Version: 1.0 To: Felix Fietkau CC: linux-wireless@vger.kernel.org, linville@tuxdriver.com, lrodriguez@atheros.com, br1@einfach.org Subject: Re: [PATCH 3/4] ath9k_hw: move the cycle counter tracking to ath References: <1286568834-18821-1-git-send-email-nbd@openwrt.org> <1286568834-18821-2-git-send-email-nbd@openwrt.org> <1286568834-18821-3-git-send-email-nbd@openwrt.org> In-Reply-To: <1286568834-18821-3-git-send-email-nbd@openwrt.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sender: linux-wireless-owner@vger.kernel.org List-ID: On 10/08/2010 01:13 PM, Felix Fietkau wrote: > Instead of keeping track of wraparound, clear the counters on every > access and keep separate deltas for ANI and later survey use. > Also moves the function for calculating the 'listen time' for ANI > @@ -147,6 +155,10 @@ struct ath_common { > > unsigned int clockrate; > > + spinlock_t cc_lock; > + struct ath_cycle_counters cc_ani; > + struct ath_cycle_counters cc_survey; I don't see where cc_lock is ever initialized properly. I think that is what is causing this lockdep splat: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Pid: 2240, comm: ip Not tainted 2.6.36-rc8-wl+ #32 Call Trace: [] ? printk+0xf/0x17 [] register_lock_class+0x5a/0x29e [] ? mark_lock+0x1e/0x1de [] __lock_acquire+0xa2/0xb8c [] ? mark_lock+0x1e/0x1de [] lock_acquire+0x5a/0x78 [] ? ath9k_config+0x274/0x3d8 [ath9k] [] _raw_spin_lock_irqsave+0x2f/0x3f [] ? ath9k_config+0x274/0x3d8 [ath9k] [] ath9k_config+0x274/0x3d8 [ath9k] [] ieee80211_hw_config+0x11b/0x125 [mac80211] [] ieee80211_do_open+0x3c5/0x466 [mac80211] [] ? ieee80211_check_concurrent_iface+0x21/0x13a [mac80211] [] ieee80211_open+0x5b/0x5e [mac80211] [] __dev_open+0x80/0xae [] __dev_change_flags+0xa0/0x115 [] dev_change_flags+0x13/0x3f [] do_setlink+0x23a/0x51b [] ? register_lock_class+0x17/0x29e [] rtnl_newlink+0x269/0x431 [] ? rtnl_newlink+0x7e/0x431 [] ? mark_lock+0x1e/0x1de [] ? mark_held_locks+0x47/0x5f [] ? __mutex_lock_common+0x2bb/0x2d6 [] ? trace_hardirqs_on_caller+0x104/0x125 [] ? __mutex_lock_common+0x2cc/0x2d6 [] ? rtnl_newlink+0x0/0x431 [] rtnetlink_rcv_msg+0x182/0x198 [] ? rtnetlink_rcv_msg+0x0/0x198 [] netlink_rcv_skb+0x30/0x77 [] rtnetlink_rcv+0x1b/0x22 [] netlink_unicast+0xbe/0x119 [] netlink_sendmsg+0x234/0x24c [] __sock_sendmsg+0x51/0x5a [] sock_sendmsg+0x93/0xa7 [] ? might_fault+0x47/0x81 [] ? might_fault+0x7c/0x81 [] ? copy_from_user+0x8/0xa [] ? verify_iovec+0x3e/0x6d [] sys_sendmsg+0x149/0x193 [] ? register_lock_class+0x17/0x29e [] ? mark_lock+0x1e/0x1de [] ? __do_fault+0x1fc/0x3a5 [] ? unlock_page+0x40/0x43 [] ? __do_fault+0x379/0x3a5 [] ? lock_release_non_nested+0x86/0x1d8 [] ? might_fault+0x47/0x81 [] ? might_fault+0x47/0x81 [] sys_socketcall+0x15e/0x1a5 [] sysenter_do_call+0x12/0x38 ADDRCONF(NETDEV_UP): wlan0: link is not ready ieee80211 phy0: device no longer idle - scanning -- Ben Greear Candela Technologies Inc http://www.candelatech.com