From owner-freebsd-wireless@FreeBSD.ORG Sun Jan 15 20:10:12 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E7E8106566C for ; Sun, 15 Jan 2012 20:10:12 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 694628FC15 for ; Sun, 15 Jan 2012 20:10:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0FKACdO090445 for ; Sun, 15 Jan 2012 20:10:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0FKACbH090444; Sun, 15 Jan 2012 20:10:12 GMT (envelope-from gnats) Date: Sun, 15 Jan 2012 20:10:12 GMT Message-Id: <201201152010.q0FKACbH090444@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: Adrian Chadd Cc: Subject: Re: kern/163318: [ath] ath(4) stops working X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Adrian Chadd 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: Sun, 15 Jan 2012 20:10:12 -0000 The following reply was made to PR kern/163318; it has been noted by GNATS. From: Adrian Chadd To: Joel Dahl Cc: bug-followup@freebsd.org Subject: Re: kern/163318: [ath] ath(4) stops working Date: Sun, 15 Jan 2012 12:10:02 -0800 Hi, So I want to establish whether the scan logic has hung, or whether the scan logic has completed but left the interface hung. How's your C? Would you mind doing some quick hacking: * add a new variable in struct ath_softc, call it "sc_in_scan"; * set it to 1 in ath_scan_start (don't add any locks) * set it to 0 in ath_scan_end (don't add any locks) * edit the 'txagg' sysctl code in if_ath_sysctl.c to print out the value of sc_in_scan; Then verify that it's working as advertised: * sysctl dev.ath.0.txagg=1 and check dmesg - sc_in_scan should be 0; * do a manual scan (ifconfig wlan0 scan) and then redo the above sysctl - it should be 1. The "normal" scan will keep the interface in "scan" mode for the duration of all channel checks. But for bgscan, it quickly brings the interface in and out of scan mode, for each channel that's being scanned. What i hope to see is: * sc_in_scan stays 0 during normal operation; * when your interface is hung, sc_in_scan is 1. Once we've established that, we can continue to go digging into the scan code. Thanks! Adrian From owner-freebsd-wireless@FreeBSD.ORG Mon Jan 16 01:30:23 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00E09106564A; Mon, 16 Jan 2012 01:30:23 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C76038FC19; Mon, 16 Jan 2012 01:30:22 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0G1UMB6090802; Mon, 16 Jan 2012 01:30:22 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0G1UMuu090792; Mon, 16 Jan 2012 01:30:22 GMT (envelope-from linimon) Date: Mon, 16 Jan 2012 01:30:22 GMT Message-Id: <201201160130.q0G1UMuu090792@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-wireless@FreeBSD.org From: linimon@FreeBSD.org Cc: Subject: Re: kern/163559: [ath] kernel panic AH_DEBUG X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 16 Jan 2012 01:30:23 -0000 Old Synopsis: kernel panic AH_DEBUG New Synopsis: [ath] kernel panic AH_DEBUG Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless Responsible-Changed-By: linimon Responsible-Changed-When: Mon Jan 16 01:29:48 UTC 2012 Responsible-Changed-Why: reclassify. http://www.freebsd.org/cgi/query-pr.cgi?pr=163559 From owner-freebsd-wireless@FreeBSD.ORG Mon Jan 16 08:39:37 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FD3F1065670; Mon, 16 Jan 2012 08:39:37 +0000 (UTC) (envelope-from monthadar@gmail.com) Received: from mail-tul01m020-f182.google.com (mail-tul01m020-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id B598C8FC0A; Mon, 16 Jan 2012 08:39:36 +0000 (UTC) Received: by obcwo16 with SMTP id wo16so911854obc.13 for ; Mon, 16 Jan 2012 00:39:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5QKKbaHhHnIWchqd7NjUFhBAIkZlfl9u+veFbUNdUEw=; b=IJjzJnCX2639E616wJ4Jc1mBcfH0QvAA7wLdcX/QabAyXx7E4gl7pXiZnWFsq78UqM W95mB0lBhrJMP5GeVTMCUfBxxCpJCXzkLQR7/0eHwK+H7qFeIIP8lRfKsFGu+6vpq4U9 Y+VV3krZU5ixAm1EB+uAE/tssCzusWBXOBLFQ= MIME-Version: 1.0 Received: by 10.50.217.168 with SMTP id oz8mr9295439igc.24.1326703175745; Mon, 16 Jan 2012 00:39:35 -0800 (PST) Received: by 10.50.213.74 with HTTP; Mon, 16 Jan 2012 00:39:35 -0800 (PST) In-Reply-To: <201201112003.44891.bschmidt@freebsd.org> References: <201201112003.44891.bschmidt@freebsd.org> Date: Mon, 16 Jan 2012 09:39:35 +0100 Message-ID: From: Monthadar Al Jaberi To: Bernhard Schmidt Content-Type: multipart/mixed; boundary=14dae934053783400c04b6a127c5 Cc: freebsd-wireless@freebsd.org Subject: Re: 11s mesh path setup problem X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 16 Jan 2012 08:39:37 -0000 --14dae934053783400c04b6a127c5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Wed, Jan 11, 2012 at 8:03 PM, Bernhard Schmidt wr= ote: > On Wednesday 11 January 2012 18:23:29 Adrian Chadd wrote: >> Hi! >> >> I've just done a bit of a code review. Here are my comments: sorry for late answer here is a a better formated patch. >> >> * ether_sprintf() can't be implemented the way you've implemented it - >> it just won't work at all in a multithreaded, concurrent environment. >> We'll have to find an alternative way. >> >> Maybe something like: >> >> char * >> ether_sprintf2(const u_char *ap, char *buf, int len) >> { >> =A0 =A0 .. do things to buf, rather than the static buf. >> } >> >> Then maybe this'd work: >> >> char a[32], b[32]; >> IEEE80211_NOTE(..., ether_sprintf2(addr1, a, 32), ether_sprintf2(addr2, = a, 32)); >> >> does that make sense? > > Isn't there an example in net80211 with %D? > printf("%6D %6D", addr1, ":", addr2, ":"); > > The saner alternative is to call printf() multiple times, see ieee80211_d= ump_pkt() as an example. But that means we have to modify for example ieee80211_note_mac function? > > -- > Bernhard --=20 Monthadar Al Jaberi --14dae934053783400c04b6a127c5 Content-Type: text/x-patch; charset=US-ASCII; name="patch_11s_4_nodes_in_line_goodformated.patch" Content-Disposition: attachment; filename="patch_11s_4_nodes_in_line_goodformated.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gxh8r69p0 ZGlmZiAtLWdpdCBhL3N5cy9uZXQvaW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0tZ2l0IGEvc3lzL25ldDgwMjExL2ll ZWU4MDIxMV9tZXNoLmMgYi9zeXMvbmV0ODAyMTEvaWVlZTgwMjExX21lc2guYwppbmRleCBjZmZm ZDg3Li42YWRjNDVhIDEwMDY0NAotLS0gYS9zeXMvbmV0ODAyMTEvaWVlZTgwMjExX21lc2guYwor KysgYi9zeXMvbmV0ODAyMTEvaWVlZTgwMjExX21lc2guYwpAQCAtMzM2LDYgKzMzNiwxNCBAQCBt ZXNoX3J0X2ZsdXNoX2ludmFsaWQoc3RydWN0IGllZWU4MDIxMXZhcCAqdmFwKQogCQlpZiAoKHJ0 LT5ydF9mbGFncyAmIElFRUU4MDIxMV9NRVNIUlRfRkxBR1NfVkFMSUQpID09IDAgJiYKIAkJICAg IHRpY2tzIC0gcnQtPnJ0X2NydGltZSA+PSBtcy0+bXNfcHBhdGgtPm1wcF9pbmFjdCkKIAkJCW1l c2hfcnRfZGVsKG1zLCBydCk7CisJCWVsc2UgeworCQkJcnQtPnJ0X2xpZmV0aW1lIC09IDEwMDsg LyogZGVjcmVhc2UgbGlmZXRpbWUgKi8KKwkJCWlmKHJ0LT5ydF9saWZldGltZSA8PSAwKXsKKwkJ CQlydC0+cnRfZmxhZ3MgJj0KKwkJCQkgICAgfklFRUU4MDIxMV9NRVNIUlRfRkxBR1NfVkFMSUQ7 IC8qIGludmFsaWRhdGUgKi8KKwkJCQltZXNoX3J0X2RlbChtcywgcnQpOworCQkJfQorCQl9CiAJ fQogCU1FU0hfUlRfVU5MT0NLKG1zKTsKIH0K --14dae934053783400c04b6a127c5-- From owner-freebsd-wireless@FreeBSD.ORG Mon Jan 16 11:07:16 2012 Return-Path: Delivered-To: freebsd-wireless@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 181FE1065672 for ; Mon, 16 Jan 2012 11:07:16 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0580C8FC0A for ; Mon, 16 Jan 2012 11:07:16 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0GB7FQO057824 for ; Mon, 16 Jan 2012 11:07:15 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0GB7FLZ057822 for freebsd-wireless@FreeBSD.org; Mon, 16 Jan 2012 11:07:15 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 16 Jan 2012 11:07:15 GMT Message-Id: <201201161107.q0GB7FLZ057822@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-wireless@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-wireless@FreeBSD.org X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 16 Jan 2012 11:07:16 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o bin/164102 wireless hostapd not configured for 802.11n o kern/163759 wireless [ath] ath(4) "stops working" in hostap mode o kern/163724 wireless [mwl] [patch] NULL check before dereference o kern/163719 wireless [ath] ath interface do not receive multicast o kern/163689 wireless [ath] TX timeouts when sending probe/mgmt frames durin o kern/163574 wireless [net80211] overly-frequent HT occupancy changes o kern/163573 wireless [ath] hostap mode TX buffer hang o kern/163559 wireless [ath] kernel panic AH_DEBUG o kern/163318 wireless [ath] ath(4) stops working o kern/163312 wireless [panic] [ath driver] kernel panic: page fault with ath o kern/163082 wireless [ath] ar9285 diversity fixes o kern/162648 wireless [ath] AR9227 ADC DC calibration failure o kern/162647 wireless [ath] 11n TX aggregation session / TX hang o kern/161293 wireless [iwn] hang at startup when starting network o kern/161035 wireless [ieee80211] Incorrect number describing 11ng MCS rate o kern/160391 wireless [ieee80211] [patch] Panic in mesh mode o kern/160296 wireless [zyd] [panic] 802.11 usb device reboots system on 'ifc o misc/160176 wireless [mips] [panic] Kernel panic on AR7161 platform with AR o kern/157449 wireless [ath] MAC address conflict causes system to freeze o kern/157243 wireless [ath] investigate beacon TX (AP) / RX (STA) when under o kern/156904 wireless [ath] AR9285 antenna diversity algorithm is buggy and o kern/156884 wireless [ath] ath instablity o kern/156327 wireless [bwn] bwn driver causes 20%-50% packet loss o kern/156322 wireless [wpi] no ahdemo support for if_wpi o kern/156321 wireless [ath] ahdemo doesn't work with if_ath o kern/155498 wireless [ral] ral(4) needs to be resynced with OpenBSD's to ga o kern/155100 wireless [ath] ath driver on busy channel: "stuck beacon" p kern/154598 wireless [ath] Atheros 5424/2424 can't connect to WPA network o kern/154567 wireless [ath] ath(4) lot of bad series(0) o kern/154327 wireless [ath] AR5416 in station mode hangs when transmitting f o kern/154284 wireless [ath] Modern ath wifi cards (such as AR9285) have miss o kern/154153 wireless [ath] AR5213 + MIPS + WPA group key packet corruption o kern/153448 wireless [ath] ath networking device loses association after a o kern/152750 wireless [ath] ath0 lot of bad series hwrate o kern/151198 wireless [ath] ath/5416 fails bgscan with "ath0: ath_chan_set: o kern/149786 wireless [bwn] bwn on Dell Inspiron 1150: connections stall o kern/149516 wireless [ath] ath(4) hostap with fake MAC/BSSID results in sta o kern/149373 wireless [realtek/atheros]: None of my network card working o kern/148322 wireless [ath] Triggering atheros wifi beacon misses in hostap o kern/148317 wireless [ath] FreeBSD 7.x hostap memory leak in net80211 or At o kern/148078 wireless [ath] wireless networking stops functioning o kern/145826 wireless [panic] [ath] Unable to configure adhoc mode on ath0/w o kern/144987 wireless [wpi] [panic] injecting packets with wlaninject using o bin/144109 wireless hostapd(8) uses the MAC of the wireless interface, but o conf/143079 wireless hostapd(8) startup missing multi wlan functionality p kern/140567 wireless [ath] [patch] ath is not worked on my notebook PC o kern/140245 wireless [ath] [panic] Kernel panic during network activity on o kern/137592 wireless [ath] panic - 7-STABLE (Aug 7, 2009 UTC) crashes on ne p bin/137484 wireless [patch] Integer overflow in wpa_supplicant(8) base64 e o kern/136943 wireless [wpi] [lor] wpi0_com_lock / wpi0 o kern/136836 wireless [ath] atheros card stops functioning after about 12 ho o kern/132722 wireless [ath] Wifi ath0 associates fine with AP, but DHCP or I o bin/131549 wireless ifconfig(8) can't clear 'monitor' mode on the wireless o kern/126475 wireless [ath] [panic] ath pcmcia card inevitably panics under o kern/125721 wireless [ath] Terrible throughput/high ping latency with Ubiqu o kern/125617 wireless [ath] [panic] ath(4) related panic o kern/125501 wireless [ath] atheros cardbus driver hangs o kern/125332 wireless [ath] [panic] crash under any non-tiny networking unde o kern/124767 wireless [iwi] Wireless connection using iwi0 driver (Intel 220 o kern/124753 wireless [ieee80211] net80211 discards power-save queue packets o docs/120456 wireless ath(4) needs to specify requirement on wlan_scan_sta o kern/119513 wireless [ath] [irq] inserting dlink dwl-g630 wireless card res o kern/116747 wireless [ndis] FreeBSD 7.0-CURRENT crash with Dell TrueMobile f kern/105348 wireless [ath] ath device stopps TX 64 problems total. From owner-freebsd-wireless@FreeBSD.ORG Mon Jan 16 19:46:47 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8EA83106566B; Mon, 16 Jan 2012 19:46:47 +0000 (UTC) (envelope-from monthadar@gmail.com) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 39EF48FC0C; Mon, 16 Jan 2012 19:46:46 +0000 (UTC) Received: by iagz16 with SMTP id z16so6133760iag.13 for ; Mon, 16 Jan 2012 11:46:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xxlgzQxEdXzuzlXVR9sckiDsoyQwn2NoC38NTPA7/qc=; b=TGYqCFnG7YGkv5ZLKAPkA6pWMr+wPW7G2neBECtJMx/Zue/nNTcWLpmVmhZkoF7+Kc ZK0w9UtJFW7NAeEpkyvtGhALb8/0Y8CUreXHQTgS0NFLKOUh/oDJt4VA4LiwvC4RLzq/ cbqqbIKbZ8hmDq6y1Q0DkeAIX48nnCYql0lEE= MIME-Version: 1.0 Received: by 10.50.196.228 with SMTP id ip4mr14071673igc.28.1326743206629; Mon, 16 Jan 2012 11:46:46 -0800 (PST) Received: by 10.50.213.74 with HTTP; Mon, 16 Jan 2012 11:46:46 -0800 (PST) In-Reply-To: References: <201201112003.44891.bschmidt@freebsd.org> Date: Mon, 16 Jan 2012 20:46:46 +0100 Message-ID: From: Monthadar Al Jaberi To: Bernhard Schmidt Content-Type: multipart/mixed; boundary=bcaec554da6a8a0fac04b6aa79d8 Cc: freebsd-wireless@freebsd.org Subject: Re: 11s mesh path setup problem X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Mon, 16 Jan 2012 19:46:47 -0000 --bcaec554da6a8a0fac04b6aa79d8 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Mon, Jan 16, 2012 at 9:39 AM, Monthadar Al Jaberi wrote: > On Wed, Jan 11, 2012 at 8:03 PM, Bernhard Schmidt = wrote: >> On Wednesday 11 January 2012 18:23:29 Adrian Chadd wrote: >>> Hi! >>> >>> I've just done a bit of a code review. Here are my comments: > > sorry for late answer here is a a better formated patch. > >>> >>> * ether_sprintf() can't be implemented the way you've implemented it - >>> it just won't work at all in a multithreaded, concurrent environment. >>> We'll have to find an alternative way. >>> >>> Maybe something like: >>> >>> char * >>> ether_sprintf2(const u_char *ap, char *buf, int len) >>> { >>> =A0 =A0 .. do things to buf, rather than the static buf. >>> } >>> >>> Then maybe this'd work: >>> >>> char a[32], b[32]; >>> IEEE80211_NOTE(..., ether_sprintf2(addr1, a, 32), ether_sprintf2(addr2,= a, 32)); >>> >>> does that make sense? >> >> Isn't there an example in net80211 with %D? >> printf("%6D %6D", addr1, ":", addr2, ":"); Ok here is a patch just for fixing ieee80211_hwmp IEEE80211_NOTE function calls before my patch. does it look okej? >> >> The saner alternative is to call printf() multiple times, see ieee80211_= dump_pkt() as an example. > > But that means we have to modify for example ieee80211_note_mac function? > >> >> -- >> Bernhard > > > > -- > Monthadar Al Jaberi --=20 Monthadar Al Jaberi --bcaec554da6a8a0fac04b6aa79d8 Content-Type: text/x-patch; charset=US-ASCII; name="ieee80211_note_format.patch" Content-Disposition: attachment; filename="ieee80211_note_format.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gxhwl7b51 ZGlmZiAtLWdpdCBhL3N5cy9uZXQ4MDIxMS9pZWVlODAyMTFfaHdtcC5jIGIvc3lzL25ldDgwMjEx L2llZWU4MDIxMV9od21wLmMKaW5kZXggOTNhOWU1NS4uNzBmN2ZhNiAxMDA2NDQKLS0tIGEvc3lz L25ldDgwMjExL2llZWU4MDIxMV9od21wLmMKKysrIGIvc3lzL25ldDgwMjExL2llZWU4MDIxMV9o d21wLmMKQEAgLTMzLDE1ICszMywxNSBAQCBfX0ZCU0RJRCgiJEZyZWVCU0QkIik7CiAKIC8qCiAg KiBJRUVFIDgwMi4xMXMgSHlicmlkIFdpcmVsZXNzIE1lc2ggUHJvdG9jb2wsIEhXTVAuCi0gKiAK KyAqCiAgKiBCYXNlZCBvbiBNYXJjaCAyMDA5LCBEMy4wIDgwMi4xMXMgZHJhZnQgc3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iAJCQl9Cg== --bcaec554da6a8a0fac04b6aa79d8-- From owner-freebsd-wireless@FreeBSD.ORG Tue Jan 17 19:00:30 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9D19F106564A for ; Tue, 17 Jan 2012 19:00:30 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 8CC178FC1E for ; Tue, 17 Jan 2012 19:00:30 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0HJ0Uou064732 for ; Tue, 17 Jan 2012 19:00:30 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0HJ0Urr064730; Tue, 17 Jan 2012 19:00:30 GMT (envelope-from gnats) Date: Tue, 17 Jan 2012 19:00:30 GMT Message-Id: <201201171900.q0HJ0Urr064730@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: Joel Dahl Cc: Subject: Re: kern/163318: [ath] ath(4) stops working X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Joel Dahl 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: Tue, 17 Jan 2012 19:00:30 -0000 The following reply was made to PR kern/163318; it has been noted by GNATS. From: Joel Dahl To: Adrian Chadd Cc: bug-followup@freebsd.org Subject: Re: kern/163318: [ath] ath(4) stops working Date: Tue, 17 Jan 2012 19:50:57 +0100 On 15-01-2012 12:10, Adrian Chadd wrote: > Hi, > > So I want to establish whether the scan logic has hung, or whether the > scan logic has completed but left the interface hung. > > How's your C? Would you mind doing some quick hacking: > > * add a new variable in struct ath_softc, call it "sc_in_scan"; > * set it to 1 in ath_scan_start (don't add any locks) > * set it to 0 in ath_scan_end (don't add any locks) > * edit the 'txagg' sysctl code in if_ath_sysctl.c to print out the > value of sc_in_scan; > > Then verify that it's working as advertised: > > * sysctl dev.ath.0.txagg=1 and check dmesg - sc_in_scan should be 0; > * do a manual scan (ifconfig wlan0 scan) and then redo the above > sysctl - it should be 1. Hm. I did the above changes and rebuilt my kernel. If I do sysctl dev.ath0.txagg=1, sc_in_scan is 0 just as expected. If I do a manual scan right after, it is still set to 0. ...or was I supposed to _only_ do ifconfig wlan0 scan once the interface has died? -- Joel From owner-freebsd-wireless@FreeBSD.ORG Tue Jan 17 19:00:36 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1BD881065673 for ; Tue, 17 Jan 2012 19:00:36 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0A5258FC23 for ; Tue, 17 Jan 2012 19:00:36 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0HJ0ZOr064787 for ; Tue, 17 Jan 2012 19:00:35 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0HJ0Z0t064784; Tue, 17 Jan 2012 19:00:35 GMT (envelope-from gnats) Date: Tue, 17 Jan 2012 19:00:35 GMT Message-Id: <201201171900.q0HJ0Z0t064784@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: Adrian Chadd Cc: Subject: Re: kern/163318: [ath] ath(4) stops working X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Adrian Chadd 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: Tue, 17 Jan 2012 19:00:36 -0000 The following reply was made to PR kern/163318; it has been noted by GNATS. From: Adrian Chadd To: Joel Dahl Cc: bug-followup@freebsd.org Subject: Re: kern/163318: [ath] ath(4) stops working Date: Tue, 17 Jan 2012 10:53:42 -0800 On 17 January 2012 10:50, Joel Dahl wrote: >> Then verify that it's working as advertised: >> >> * sysctl dev.ath.0.txagg=1 and check dmesg - sc_in_scan should be 0; >> * do a manual scan (ifconfig wlan0 scan) and then redo the above >> sysctl - it should be 1. > > Hm. I did the above changes and rebuilt my kernel. If I do sysctl > dev.ath0.txagg=1, sc_in_scan is 0 just as expected. If I do a manual scan > right after, it is still set to 0. right. Can you check the sc_in_scan value _during_ an ifconfig wlan0 scan ? (ie, whilst it's running.) You'll have to be ninja-fast. I just want to verify that it's actually working.. > ...or was I supposed to _only_ do ifconfig wlan0 scan once the interface has > died? The above is just to verify that it's working. Once that's done, check sc_in_scan once the interface has hung. I'm testing the hypothesis that the scan logic is "hung" somehow and that is why the interface never comes out of STA power save mode. Adrian From owner-freebsd-wireless@FreeBSD.ORG Tue Jan 17 21:00:33 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 141D9106572F for ; Tue, 17 Jan 2012 21:00:33 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 02D7C8FC18 for ; Tue, 17 Jan 2012 21:00:33 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0HL0WMX076522 for ; Tue, 17 Jan 2012 21:00:32 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0HL0WVW076521; Tue, 17 Jan 2012 21:00:32 GMT (envelope-from gnats) Date: Tue, 17 Jan 2012 21:00:32 GMT Message-Id: <201201172100.q0HL0WVW076521@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: Joel Dahl Cc: Subject: Re: kern/163318: [ath] ath(4) stops working X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Joel Dahl 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: Tue, 17 Jan 2012 21:00:33 -0000 The following reply was made to PR kern/163318; it has been noted by GNATS. From: Joel Dahl To: Adrian Chadd Cc: bug-followup@freebsd.org Subject: Re: kern/163318: [ath] ath(4) stops working Date: Tue, 17 Jan 2012 21:56:16 +0100 On 17-01-2012 10:53, Adrian Chadd wrote: > On 17 January 2012 10:50, Joel Dahl wrote: > >> Then verify that it's working as advertised: > >> > >> * sysctl dev.ath.0.txagg=1 and check dmesg - sc_in_scan should be 0; > >> * do a manual scan (ifconfig wlan0 scan) and then redo the above > >> sysctl - it should be 1. > > > > Hm. I did the above changes and rebuilt my kernel. If I do sysctl > > dev.ath0.txagg=1, sc_in_scan is 0 just as expected. If I do a manual scan > > right after, it is still set to 0. > > right. Can you check the sc_in_scan value _during_ an ifconfig wlan0 > scan ? (ie, whilst it's running.) > > You'll have to be ninja-fast. > > I just want to verify that it's actually working.. Yes, it's set to 1 for a very short period during the scan. So it seems to work like it should. > > ...or was I supposed to _only_ do ifconfig wlan0 scan once the interface has > > died? > > The above is just to verify that it's working. Once that's done, check > sc_in_scan once the interface has hung. > > I'm testing the hypothesis that the scan logic is "hung" somehow and > that is why the interface never comes out of STA power save mode. I'll check this next. -- Joel From owner-freebsd-wireless@FreeBSD.ORG Wed Jan 18 05:50:13 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C040B106566B for ; Wed, 18 Jan 2012 05:50:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 90DFC8FC0A for ; Wed, 18 Jan 2012 05:50:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0I5oDeR070890 for ; Wed, 18 Jan 2012 05:50:13 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0I5oDC4070888; Wed, 18 Jan 2012 05:50:13 GMT (envelope-from gnats) Date: Wed, 18 Jan 2012 05:50:13 GMT Message-Id: <201201180550.q0I5oDC4070888@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: Joel Dahl Cc: Subject: Re: kern/163318: [ath] ath(4) stops working X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Joel Dahl 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: Wed, 18 Jan 2012 05:50:13 -0000 The following reply was made to PR kern/163318; it has been noted by GNATS. From: Joel Dahl To: adrian.chadd@gmail.com Cc: bug-followup@freebsd.org Subject: Re: kern/163318: [ath] ath(4) stops working Date: Wed, 18 Jan 2012 06:40:07 +0100 I left the machine on during the night and when I came back the interface had hung as usual. So I checked the output from sysctl dev.ath.0.txagg=1 but sc_in_scan is still 0... -- Joel From owner-freebsd-wireless@FreeBSD.ORG Wed Jan 18 22:30:10 2012 Return-Path: Delivered-To: freebsd-wireless@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7AF10106564A for ; Wed, 18 Jan 2012 22:30:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 4F4328FC0A for ; Wed, 18 Jan 2012 22:30:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q0IMUAKo042748 for ; Wed, 18 Jan 2012 22:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q0IMUAGB042745; Wed, 18 Jan 2012 22:30:10 GMT (envelope-from gnats) Date: Wed, 18 Jan 2012 22:30:10 GMT Message-Id: <201201182230.q0IMUAGB042745@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org From: Joel Dahl Cc: Subject: Re: kern/163318: [ath] ath(4) stops working X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Joel Dahl 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: Wed, 18 Jan 2012 22:30:10 -0000 The following reply was made to PR kern/163318; it has been noted by GNATS. From: Joel Dahl To: Adrian Chadd Cc: bug-followup@freebsd.org Subject: Re: kern/163318: [ath] ath(4) stops working Date: Wed, 18 Jan 2012 23:27:48 +0100 I can't even remember if I've reported this before, but when ath died a couple of minutes ago I got this in dmesg: ath0: device timeout ath0: ath_reset_grablock: didn't finish after 10 iterations ath0: ath_reset_grablock: warning, recursive reset path! ath0: ath_chan_set: concurrent reset! Danger! Just FYI, -- Joel From owner-freebsd-wireless@FreeBSD.ORG Wed Jan 18 22:36:22 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7872106568B; Wed, 18 Jan 2012 22:36:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 515288FC12; Wed, 18 Jan 2012 22:36:22 +0000 (UTC) Received: by vcbfl17 with SMTP id fl17so4824063vcb.13 for ; Wed, 18 Jan 2012 14:36:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=rXt1Klf2ZkjeyfS10Yy2WPDTHyloYHEltzRxcOnGFJE=; b=sObHJIvPndwOIetcF4+Hvz1nUBP7LErQRzcSD/F5QFFMnWo2Dg7fpzbwKdmIQQkv4M 0OAbvBNIn3qhaE7z2CVq0AdDh2JLMzWE4QHK3WQvOaHMnyPirt7WRDfPVR/Ki51UxpWt 1KXjuZVGRHlB7fqs7Jxpu5xBY53a/q4uLV0Bo= MIME-Version: 1.0 Received: by 10.220.156.134 with SMTP id x6mr14177137vcw.17.1326926181632; Wed, 18 Jan 2012 14:36:21 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Wed, 18 Jan 2012 14:36:21 -0800 (PST) In-Reply-To: <201201182230.q0IMUAGB042745@freefall.freebsd.org> References: <201201182230.q0IMUAGB042745@freefall.freebsd.org> Date: Wed, 18 Jan 2012 14:36:21 -0800 X-Google-Sender-Auth: e-U4H5BW1l4phWj82m0RvTJ9llg Message-ID: From: Adrian Chadd To: Joel Dahl Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-wireless@freebsd.org Subject: Re: kern/163318: [ath] ath(4) stops working X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 18 Jan 2012 22:36:22 -0000 but does this concurrent reset happen every time? adrian From owner-freebsd-wireless@FreeBSD.ORG Wed Jan 18 23:28:00 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 291D8106566B; Wed, 18 Jan 2012 23:28:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id BE8F98FC14; Wed, 18 Jan 2012 23:27:59 +0000 (UTC) Received: by vbbey12 with SMTP id ey12so3783953vbb.13 for ; Wed, 18 Jan 2012 15:27:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=tXJwyWpD3i8d6+XNX7aCa1tnwSL8XfTVX1LOgAR6rro=; b=QQkgj2mGQ9Esfhnpqe/rHn8pJl6ejHe9mNbniRgKGjs6wwo0w6ylpVk1hAz+R5/NIE 8AX0hYqw1im16YHH7LTCi1G9JBvPvqmE5YHxkHMV4Q556uiIVr54yZD+oPvZZljkKlHV YgDfeh+oryZz8W75OgjlXmOxqhz7ErzMepr/k= MIME-Version: 1.0 Received: by 10.52.30.81 with SMTP id q17mr1738239vdh.115.1326929278995; Wed, 18 Jan 2012 15:27:58 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Wed, 18 Jan 2012 15:27:58 -0800 (PST) In-Reply-To: <20120118231913.GR11137@goofy01.vnodelab.local> References: <201201182230.q0IMUAGB042745@freefall.freebsd.org> <20120118231913.GR11137@goofy01.vnodelab.local> Date: Wed, 18 Jan 2012 15:27:58 -0800 X-Google-Sender-Auth: RPMys26S5gmJDfMGwu7mbeftza0 Message-ID: From: Adrian Chadd To: Joel Dahl Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-wireless@freebsd.org Subject: Re: kern/163318: [ath] ath(4) stops working X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 18 Jan 2012 23:28:00 -0000 On 18 January 2012 15:19, Joel Dahl wrote: > On 18-01-2012 14:36, Adrian Chadd wrote: > > but does this concurrent reset happen every time? > > Nope. OK. Let me see if I can add some more debugging around the code areas that change the power saving flag. Adrian From owner-freebsd-wireless@FreeBSD.ORG Wed Jan 18 23:34:47 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 15C591065677 for ; Wed, 18 Jan 2012 23:34:47 +0000 (UTC) (envelope-from joel@freebsd.org) Received: from mail.vnode.se (mail.vnode.se [62.119.52.80]) by mx1.freebsd.org (Postfix) with ESMTP id C4B788FC1A for ; Wed, 18 Jan 2012 23:34:46 +0000 (UTC) Received: from mail.vnode.se (localhost [127.0.0.1]) by mail.vnode.se (Postfix) with ESMTP id 1AA0DE3F07A; Thu, 19 Jan 2012 00:19:17 +0100 (CET) X-Virus-Scanned: amavisd-new at vnode.se Received: from mail.vnode.se ([127.0.0.1]) by mail.vnode.se (mail.vnode.se [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LP6UdK0FMFRr; Thu, 19 Jan 2012 00:19:15 +0100 (CET) Received: from goofy01.vnodelab.local (unknown [212.247.52.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.vnode.se (Postfix) with ESMTPSA id E78F2E3F079; Thu, 19 Jan 2012 00:19:14 +0100 (CET) Date: Thu, 19 Jan 2012 00:19:13 +0100 From: Joel Dahl To: Adrian Chadd Message-ID: <20120118231913.GR11137@goofy01.vnodelab.local> References: <201201182230.q0IMUAGB042745@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-wireless@freebsd.org Subject: Re: kern/163318: [ath] ath(4) stops working X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 18 Jan 2012 23:34:47 -0000 On 18-01-2012 14:36, Adrian Chadd wrote: > but does this concurrent reset happen every time? Nope. -- Joel From owner-freebsd-wireless@FreeBSD.ORG Sat Jan 21 00:38:55 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 937CB1065673; Sat, 21 Jan 2012 00:38:55 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 29F218FC1C; Sat, 21 Jan 2012 00:38:54 +0000 (UTC) Received: by vbbey12 with SMTP id ey12so1229437vbb.13 for ; Fri, 20 Jan 2012 16:38:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=dZWoxGoZwpaYoCAo3Z9M80ysHSSEgJFAGQ99PjMaqR8=; b=UNfMphTBm9IoGRl/K/+70Vmeju7P8GKfRqCACzdM6gLdnrb/4ph4I1JUrPwh5SHZZ8 D9TYEboYtz/G5tENehKpAGRPpCo1KOBBwNpDytgY6rvCSq8+HOYcy40b98zMVFd5fl+1 GYzxehNqJbUZRbBOxClDb2DJ54auCnJfxRAto= MIME-Version: 1.0 Received: by 10.52.30.81 with SMTP id q17mr5879029vdh.115.1327106334322; Fri, 20 Jan 2012 16:38:54 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.36.5 with HTTP; Fri, 20 Jan 2012 16:38:54 -0800 (PST) In-Reply-To: References: <201201112003.44891.bschmidt@freebsd.org> Date: Fri, 20 Jan 2012 16:38:54 -0800 X-Google-Sender-Auth: L9u4fRXNxLUZ4A0PNX1fTxss9G4 Message-ID: From: Adrian Chadd To: Monthadar Al Jaberi Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-wireless@freebsd.org, Bernhard Schmidt Subject: Re: 11s mesh path setup problem X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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, 21 Jan 2012 00:38:55 -0000 Committed in r230408. Thanks! adrian On 16 January 2012 11:46, Monthadar Al Jaberi wrote: > On Mon, Jan 16, 2012 at 9:39 AM, Monthadar Al Jaberi > wrote: > > On Wed, Jan 11, 2012 at 8:03 PM, Bernhard Schmidt > wrote: > >> On Wednesday 11 January 2012 18:23:29 Adrian Chadd wrote: > >>> Hi! > >>> > >>> I've just done a bit of a code review. Here are my comments: > > > > sorry for late answer here is a a better formated patch. > > > >>> > >>> * ether_sprintf() can't be implemented the way you've implemented it - > >>> it just won't work at all in a multithreaded, concurrent environment. > >>> We'll have to find an alternative way. > >>> > >>> Maybe something like: > >>> > >>> char * > >>> ether_sprintf2(const u_char *ap, char *buf, int len) > >>> { > >>> .. do things to buf, rather than the static buf. > >>> } > >>> > >>> Then maybe this'd work: > >>> > >>> char a[32], b[32]; > >>> IEEE80211_NOTE(..., ether_sprintf2(addr1, a, 32), > ether_sprintf2(addr2, a, 32)); > >>> > >>> does that make sense? > >> > >> Isn't there an example in net80211 with %D? > >> printf("%6D %6D", addr1, ":", addr2, ":"); > > Ok here is a patch just for fixing ieee80211_hwmp IEEE80211_NOTE > function calls before my patch. > does it look okej? > > >> > >> The saner alternative is to call printf() multiple times, see > ieee80211_dump_pkt() as an example. > > > > But that means we have to modify for example ieee80211_note_mac function? > > > >> > >> -- > >> Bernhard > > > > > > > > -- > > Monthadar Al Jaberi > > > > -- > Monthadar Al Jaberi > From owner-freebsd-wireless@FreeBSD.ORG Sat Jan 21 23:46:46 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2ED4C106564A for ; Sat, 21 Jan 2012 23:46:46 +0000 (UTC) (envelope-from guru@unixarea.de) Received: from ms16-1.1blu.de (ms16-1.1blu.de [89.202.0.34]) by mx1.freebsd.org (Postfix) with ESMTP id B0FE68FC08 for ; Sat, 21 Jan 2012 23:46:45 +0000 (UTC) Received: from [88.217.22.222] (helo=localhost.my.domain) by ms16-1.1blu.de with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Roijl-0002Js-Cw for freebsd-wireless@freebsd.org; Sat, 21 Jan 2012 22:44:37 +0100 Received: from localhost.my.domain (localhost [127.0.0.1]) by localhost.my.domain (8.14.4/8.14.3) with ESMTP id q0LLiZKT002535 for ; Sat, 21 Jan 2012 22:44:35 +0100 (CET) (envelope-from guru@unixarea.de) Received: (from guru@localhost) by localhost.my.domain (8.14.4/8.14.3/Submit) id q0LLiZq9002534 for freebsd-wireless@freebsd.org; Sat, 21 Jan 2012 22:44:35 +0100 (CET) (envelope-from guru@unixarea.de) X-Authentication-Warning: localhost.my.domain: guru set sender to guru@unixarea.de using -f Date: Sat, 21 Jan 2012 22:44:34 +0100 From: Matthias Apitz To: freebsd-wireless@freebsd.org Message-ID: <20120121214434.GA2494@tinyCurrent> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Operating-System: FreeBSD 9.0-CURRENT r214444 (i386) User-Agent: Mutt/1.5.21 (2010-09-15) X-Con-Id: 51246 X-Originating-IP: 88.217.22.222 Subject: iwi0: UP/DOWN in WPA-PSK mode X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz 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, 21 Jan 2012 23:46:46 -0000 Hello, I've changed my AP at home from WEP to WPA2 and since this one of my stations facing after some while (~90 minutes) the problem of UP and DOWN; in /var/log/messages it looks like this: Jan 21 22:00:09 Perlach wpa_supplicant[485]: CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys Jan 21 22:00:09 Perlach kernel: wlan0: link state changed to DOWN Jan 21 22:00:09 Perlach wpa_supplicant[485]: Trying to associate with 00:13:f7:0d:08:48 (SSID='tarara' freq=2442 MHz) Jan 21 22:00:09 Perlach wpa_supplicant[485]: Associated with 00:13:f7:0d:08:48 Jan 21 22:00:09 Perlach kernel: wlan0: link state changed to UP Jan 21 22:00:12 Perlach wpa_supplicant[485]: WPA: Key negotiation completed with 00:13:f7:0d:08:48 [PTK=CCMP GTK=CCMP] Jan 21 22:00:12 Perlach wpa_supplicant[485]: CTRL-EVENT-CONNECTED - Connection to 00:13:f7:0d:08:48 completed (reauth) [id=0 id_str=] Jan 21 22:00:18 Perlach wpa_supplicant[485]: CTRL-EVENT-DISCONNECTED - Disconnect event - remove keys Jan 21 22:00:18 Perlach kernel: wlan0: link state changed to DOWN Jan 21 22:00:18 Perlach wpa_supplicant[485]: Trying to associate with 00:13:f7:0d:08:48 (SSID='tarara' freq=2442 MHz) The system runs 9-CURRENT from October 2010 (r214444) and did not show this problem in WEP mode; wpa_supplicant lines are simple: ctrl_interface=/var/run/wpa_supplicant ctrl_interface_group=wheel eapol_version=1 ap_scan=1 fast_reauth=1 network={ ssid="tarara" key_mgmt=WPA-PSK psk="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" } Killing the dhclient(8) processes and restart # dhclient wlan0 helps to get out of this loop of UP/DOWN. Any ideas or should I file a bug report? Thanks matthias -- Matthias Apitz t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.unixarea.de/ UNIX since V7 on PDP-11 | UNIX on mainframe since ESER 1055 (IBM /370) UNIX on x86 since SVR4.2 UnixWare 2.1.2 | FreeBSD since 2.2.5