From owner-freebsd-wireless@FreeBSD.ORG Sat Jun 22 15:48:05 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3E47EC5A; Sat, 22 Jun 2013 15:48:05 +0000 (UTC) (envelope-from gprspb@mail.ru) Received: from fallback3.mail.ru (fallback3.mail.ru [94.100.176.58]) by mx1.freebsd.org (Postfix) with ESMTP id 748551257; Sat, 22 Jun 2013 15:48:03 +0000 (UTC) Received: from smtp29.i.mail.ru (smtp29.i.mail.ru [94.100.177.89]) by fallback3.mail.ru (mPOP.Fallback_MX) with ESMTP id 05803E935DA4; Sat, 22 Jun 2013 19:48:02 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=ARoxju7+gQEWKOngkBPZ7he9FVfTatJzIwD/7xaa2yo=; b=uXSPyF6p1J8fJNYM2tTceH+KAkm+6D1SlRLcFr3Cphd/0L2pnSxlJ6s8fRs2v/NnAR6YeP/nDk49n0DSMl5iwlFAvqW1X5mvDRj3DUAxhL+XZSN9DGCWjbcjaIMirRKiPg+SxsAzcJjqkcjTugyHBY4eiWbCz3NqNliNiBUqN1E=; Received: from [93.185.182.46] (port=59550 helo=gpr.nnz-home.ru) by smtp29.i.mail.ru with esmtpa (envelope-from ) id 1UqQ2d-0000GZ-4N; Sat, 22 Jun 2013 19:47:55 +0400 Received: from gpr by gpr.nnz-home.ru with local (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1UqQ2U-0000N2-Ih; Sat, 22 Jun 2013 19:47:46 +0400 Date: Sat, 22 Jun 2013 19:47:45 +0400 From: Gennady Proskurin To: Gennady Proskurin Subject: Re: svn commit: r251741 - head/sys/contrib/dev/ath/ath_hal/ar9300 Message-ID: <20130622154745.GA1407@gpr.nnz-home.ru> References: <20130619072806.GA985@gpr.nnz-home.ru> <20130619082855.GC985@gpr.nnz-home.ru> <20130619091310.GD985@gpr.nnz-home.ru> <20130620072418.GA987@gpr.nnz-home.ru> <20130620144834.GA913@gpr.nnz-home.ru> <20130621103812.GA3683@gpr.nnz-home.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130621103812.GA3683@gpr.nnz-home.ru> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam: Not detected X-Mras: Ok Cc: freebsd-wireless@freebsd.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 15:48:05 -0000 I added "channel 6" to wlan ifconfig, and now all works (with fresh HEAD r252061) On Fri, Jun 21, 2013 at 02:38:12PM +0400, Gennady Proskurin wrote: > I recompiled and rebooted kernel and all modules to r250662 (last revision > before r250665). This is remote host, I cannot tell whether wifi actually works > or not, but I see no changes - high system load (~30%) and a lot of "stuck > beacon" messages. I think it doesn't work. > > I do not understand what you mean by trying r250665, I tried r251541 (which > includes r250665 changes), it does not work. > > On Thu, Jun 20, 2013 at 12:33:28PM -0700, Adrian Chadd wrote: > > Well, try rebooting with -HEAD a few times. > > > > Also, try r250665 (my first set of patches that enabled better ps-poll > > support) and r250664 (the revision beforehand.) See if you can > > reproduce the issues with that. > > > > I have a sneaking suspicion that doing more aggressive power save > > handling in hostap mode is causing issues but I haven't yet narrowed > > it down. > > > > > > > > adrian > > > > > > On 20 June 2013 07:48, Gennady Proskurin wrote: > > > I reverted kernel and world to r251541 and card does not work. So, bug is not > > > caused by source changes. > > > > > > On Thu, Jun 20, 2013 at 11:24:18AM +0400, Gennady Proskurin wrote: > > >> I have strange results. Finally, I reverted kernel and all the modules to old > > >> "working" revision r251541 (just renamed kernel.old to kernel), and my ath card > > >> does not work. All userspace world is from r251945. > > >> I see the same errors "ath0: stuck beacon; resetting (bmiss count 4)". > > >> > > >> I doubt it has something to do with changes after r251541, may be my card has > > >> some problems. I remember, a few months ago, when I installed it, it had the > > >> same problems, which were magically solved after few reboots and upgrades, then > > >> my card worked without problems for a few months, surviving weekly upgrades and > > >> reboots. > > >> > > >> Now I recompiling world back to r251541 to be completely sure that it has > > >> nothing to do with source changes. > > >> > > >> CPU usage from top follows: > > >> CPU: 0.0% user, 0.0% nice, 35.4% system, 0.0% interrupt, 64.6% idle > > >> 0 root -92 0 0K 2496K - 3:11 34.28% kernel{ath0 taskq} > > >> 11 root -92 - 0K 288K WAIT 0:00 0.00% intr{irq19: ath0} > > >> 0 root -92 0 0K 2496K - 0:00 0.00% kernel{ath0 net80211 ta} > > >> > > >> As you see almost all system load is ath0 taskq > > >> > > >> May be my card is somewhat "broken", or require some magic in driver, but > > >> sometimes it can work reliably, and I'll be glad to participate in debugging > > >> this case. > > >> > > >> On Wed, Jun 19, 2013 at 08:49:10AM -0700, Adrian Chadd wrote: > > >> > Hi! > > >> > > > >> > I'd rather you recompile the whole kernel, in case it's actually a > > >> > problem elsewhere. > > >> > > > >> > Thanks, > > >> > > > >> > > > >> > > > >> > adrian > > >> > > > >> > On 19 June 2013 02:13, Gennady Proskurin wrote: > > >> > > I filled pr kern/179709 > > >> > > > > >> > > I'll try to bisect repo in r251541-r251945 interval and try different revisions > > >> > > to narrow down a problem when I have time. I hope, tomorrow I'll have some > > >> > > results. > > >> > > > > >> > > Is it sufficient to just recompile kernel, if_ath and if_ath_pci modules? > > >> > > > > >> > > % kldstat | egrep 'ath|wlan' > > >> > > 11 1 0xffffffff80e12000 d07 if_ath_pci.ko > > >> > > 12 6 0xffffffff80e13000 37059 wlan.ko > > >> > > 13 1 0xffffffff80e4b000 c9b85 if_ath.ko > > >> > > 16 1 0xffffffff80f3c000 23b wlan_xauth.ko > > >> > > 17 1 0xffffffff80f3d000 e7b wlan_wep.ko > > >> > > 18 1 0xffffffff80f3e000 1def wlan_tkip.ko > > >> > > 19 1 0xffffffff80f40000 4b8d wlan_ccmp.ko > > >> > > > > >> > > On Wed, Jun 19, 2013 at 01:35:58AM -0700, Adrian Chadd wrote: > > >> > >> Hi, > > >> > >> > > >> > >> 251541 is recent, AND it's _after_ the power save queue changes. > > >> > >> > > >> > >> The only revisions that are changes to sys/dev/ath are: > > >> > >> > > >> > >> r251606 > > >> > >> r251643 > > >> > >> r251655 > > >> > >> r251656 > > >> > >> r251730 > > >> > >> r251742 > > >> > >> > > >> > >> > > >> > >> .. and these are all bluetooth coexistence changes for _another_ chip. > > >> > >> > > >> > >> Can you try these and see which work and which don't? > > >> > >> > > >> > >> The other thing to keep in mind - it may be an issue somewhere else in > > >> > >> the kernel rather than a sys/dev/ath driver issue. But let's narrow it > > >> > >> down to the above list first, then we can try narrowing it down > > >> > >> further. > > >> > >> > > >> > >> Thanks! > > >> > >> > > >> > >> > > >> > >> > > >> > >> adrian > > >> > >> > > >> > >> > > >> > >> > > >> > >> On 19 June 2013 01:28, Gennady Proskurin wrote: > > >> > >> > Previous working revision was r251541 > > >> > >> > So: > > >> > >> > r251541 works > > >> > >> > r251945 does not work > > >> > >> > > > >> > >> > On Wed, Jun 19, 2013 at 01:07:04AM -0700, Adrian Chadd wrote: > > >> > >> >> Hi! > > >> > >> >> > > >> > >> >> Great! It looks like you definitely hit this more often than i do! > > >> > >> >> > > >> > >> >> Can you tell me which revision @ 8 june you were at? or go back to > > >> > >> >> something on 8-june, verify it works, then tell me which revision? > > >> > >> >> > > >> > >> >> Let's fix this ASAP! > > >> > >> >> > > >> > >> >> Thanks! > > >> > >> >> > > >> > >> >> > > >> > >> >> > > >> > >> >> adrian > > >> > >> >> > > >> > >> >> On 19 June 2013 00:28, Gennady Proskurin wrote: > > >> > >> >> > Replying to random ath commit. > > >> > >> >> > > > >> > >> >> > Now my ath wireless device does not work. It was broken some time after 8 Jun > > >> > >> >> > (after my last update at 8 Jun it worked, now after today's update to r251945 > > >> > >> >> > it does not). > > >> > >> >> > > > >> > >> >> > It spams log and console with messages: > > >> > >> >> > > > >> > >> >> > Jun 19 10:04:27 gpr kernel: ath0: stuck beacon; resetting (bmiss count 4) > > >> > >> >> > Jun 19 10:04:58 gpr last message repeated 101 times > > >> > >> >> > Jun 19 10:05:42 gpr last message repeated 143 times > > >> > >> >> > Jun 19 10:05:42 gpr kernel: ath0: ath_raw_xmit: sc_inreset_cnt > 0; bailing > > >> > >> >> > Jun 19 10:05:42 gpr kernel: ath0: stuck beacon; resetting (bmiss count 4) > > >> > >> >> > Jun 19 10:05:47 gpr last message repeated 11 times > > >> > >> >> > Jun 19 10:05:47 gpr kernel: ath0: ath_raw_xmit: sc_inreset_cnt > 0; bailing > > >> > >> >> > Jun 19 10:05:47 gpr kernel: ath0: ath_raw_xmit: sc_inreset_cnt > 0; bailing > > >> > >> >> > Jun 19 10:05:47 gpr kernel: ath0: stuck beacon; resetting (bmiss count 4) > > >> > >> >> > Jun 19 10:05:53 gpr last message repeated 19 times > > >> > >> >> > ... > > >> > >> >> > Jun 19 10:06:20 gpr kernel: ath0: stuck beacon; resetting (bmiss count 4) > > >> > >> >> > Jun 19 10:06:21 gpr last message repeated 4 times > > >> > >> >> > Jun 19 10:06:22 gpr kernel: ath0: ath_tx_should_swq_frame: f0:4f:7c:fc:b3:22: Node is asleep; sending mgmt (type=0, subtype=176) > > >> > >> >> > Jun 19 10:06:22 gpr kernel: ath0: ath_tx_should_swq_frame: f0:4f:7c:fc:b3:22: Node is asleep; sending mgmt (type=0, subtype=176) > > >> > >> >> > Jun 19 10:06:22 gpr kernel: ath0: stuck beacon; resetting (bmiss count 4) > > >> > >> >> > Jun 19 10:06:23 gpr kernel: ath0: stuck beacon; resetting (bmiss count 4) > > >> > >> >> > Jun 19 10:06:23 gpr kernel: ath0: ath_tx_node_wakeup: an=0xffffff8002322000: node was already awake > > >> > >> >> > Jun 19 10:06:24 gpr kernel: ath0: stuck beacon; resetting (bmiss count 4) > > >> > >> >> > Jun 19 10:06:25 gpr kernel: ath0: stuck beacon; resetting (bmiss count 4) > > >> > >> >> > > > >> > >> >> > > > >> > >> >> > # uname -a > > >> > >> >> > FreeBSD gpr.nnz-home.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r251945+1330981: > > >> > >> >> > Wed Jun 19 08:09:32 MSK 2013 > > >> > >> >> > gpr@gpr.nnz-home.ru:/usr/obj/usr/src/freebsd-head/sys/GPR amd64 > > >> > >> >> > > > >> > >> >> > Boot log device info: > > >> > >> >> > Jun 19 10:04:18 gpr kernel: ath0: mem 0xfbdf0000-0xfbdfffff irq 19 at device 10.0 on pci0 > > >> > >> >> > Jun 19 10:04:18 gpr kernel: ath0: AR2413 mac 7.9 RF2413 phy 4.5 > > >> > >> >> > Jun 19 10:04:18 gpr kernel: ath0: 2GHz radio: 0x0000; 5GHz radio: 0x0056 > > >> > >> >> > > > >> > >> >> > # pciconf -lv > > >> > >> >> > ath0@pci0:0:10:0: class=0x020000 card=0x2051168c chip=0x0013168c rev=0x01 hdr=0x00 > > >> > >> >> > vendor = 'Atheros Communications Inc.' > > >> > >> >> > device = 'AR5212/AR5213 Wireless Network Adapter' > > >> > >> >> > class = network > > >> > >> >> > subclass = ethernet > > >> > >> >> > > > >> > >> >> > # rc.conf > > >> > >> >> > wlans_ath0="wlan0" > > >> > >> >> > create_args_wlan0="wlandev ath0 wlanmode hostap" > > >> > >> >> > ifconfig_wlan0="10.X.X.X/24" > > >> > >> >> > hostapd_enable="YES" > > >> > >> >> > > > >> > >> >> > I can do additional tests or submit more info, if necessary. > > >> > >> >> > > > >> > >> >> > On Fri, Jun 14, 2013 at 08:15:28AM +0000, Adrian Chadd wrote: > > >> > >> >> >> Author: adrian > > >> > >> >> >> Date: Fri Jun 14 08:15:28 2013 > > >> > >> >> >> New Revision: 251741 > > >> > >> >> >> URL: http://svnweb.freebsd.org/changeset/base/251741 > > >> > >> >> >> > > >> > >> >> >> Log: > > >> > >> >> >> The AR9300 HAL uses this config to program AR_PHY_SWITCH_COM_2 on AR9485 > > >> > >> >> >> NICs which have bluetooth coexistence enabled. > > >> > >> >> >> > > >> > >> >> >> The WB225 NIC has the common antenna switch configuration set to 0x0 which > > >> > >> >> >> disables all external switch bit setting. This obviously won't work when > > >> > >> >> >> doing coexistence. > > >> > >> >> >> > > >> > >> >> >> This value is a magic value from the windows .inf files. It _looks_ right > > >> > >> >> >> but I haven't yet verified it - unfortunately my AR9285+AR3012 BT combo > > >> > >> >> >> has an earlier BT device which doesn't actually _have_ firmware on it. > > >> > >> >> >> So I have to fix ath3kfw to handle loading in firmware into the newer > > >> > >> >> >> NICs before I can finish testing this. > > >> > >> >> >> > > >> > >> >> >> This may not hold true for CUS198, which is another custom AR9485 board. > > >> > >> >> >> > > >> > >> >> >> Modified: > > >> > >> >> >> head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c > > >> > >> >> >> > > >> > >> >> >> Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c > > >> > >> >> >> ============================================================================== > > >> > >> >> >> --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Fri Jun 14 08:13:21 2013 (r251740) > > >> > >> >> >> +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Fri Jun 14 08:15:28 2013 (r251741) > > >> > >> >> >> @@ -249,6 +249,9 @@ ar9300_attach_freebsd_ops(struct ath_hal > > >> > >> >> >> /* LNA diversity functions */ > > >> > >> >> >> ah->ah_divLnaConfGet = ar9300_ant_div_comb_get_config; > > >> > >> >> >> ah->ah_divLnaConfSet = ar9300_ant_div_comb_set_config; > > >> > >> >> >> + > > >> > >> >> >> + /* Setup HAL configuration defaults */ > > >> > >> >> >> + ah->ah_config.ath_hal_ant_ctrl_comm2g_switch_enable = 0x000bbb88; > > >> > >> >> >> } > > >> > >> >> >> > > >> > >> >> >> HAL_BOOL > > >> > >> >> >> _______________________________________________ > > >> > >> >> >> svn-src-head@freebsd.org mailing list > > >> > >> >> >> http://lists.freebsd.org/mailman/listinfo/svn-src-head > > >> > >> >> >> To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" > > >> > >> >> >> > > >> > >> >> > > >> > >> > > >> > > > >> > > >