From owner-freebsd-wireless@FreeBSD.ORG Mon Aug 5 11:06:55 2013 Return-Path: Delivered-To: freebsd-wireless@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 522F2F95 for ; Mon, 5 Aug 2013 11:06:55 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 30A8D25B6 for ; Mon, 5 Aug 2013 11:06:55 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r75B6tLx036274 for ; Mon, 5 Aug 2013 11:06:55 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r75B6sJr036272 for freebsd-wireless@FreeBSD.org; Mon, 5 Aug 2013 11:06:54 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 5 Aug 2013 11:06:54 GMT Message-Id: <201308051106.r75B6sJr036272@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 Subject: Current problem reports assigned to 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: Mon, 05 Aug 2013 11:06:55 -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 kern/180816 wireless [iwl] Intel Centrino Wireless-N 2200 not supported o kern/179847 wireless [ath] [patch] Update regdomain in ath drivers includin o kern/179709 wireless [ath] Atheros 5212 does not work: stuck beacon; resett o kern/179547 wireless [ath] Add AR9485 custom board fixes (CUS198) o kern/179482 wireless [ath] [patch] Fix AR9462 external LNA configuration o kern/179269 wireless [ath] [AR9285] RX antenna diversity is not functioning o kern/179232 wireless [ath] panic in ath o kern/178986 wireless [ath] Change mac address of ath(4) is not reflected wh o kern/178492 wireless [ath] ath0 (AR9287) panic o kern/178491 wireless [ath] ath0 (AR9287) stuck beacon o kern/178477 wireless [ath] missed beacon / soft reset in STA mode results i o kern/178470 wireless [panic][ath] bss vap can and does change o kern/178411 wireless [ral] [panic] FreeBSD kernel crash in rt2860 o kern/178379 wireless [net80211] [ath] WPA rekey on the STA side fails when o kern/178378 wireless [net80211] crypto state isn't reset during a reassocia o kern/178263 wireless [ath] review the use of ic_freq / ic_ieee / ic_flags / o kern/177847 wireless [ath] With TPC enabled, TX power values aren't clamped o kern/177846 wireless [ath] [net80211] net80211 TX power limit isn't correct o conf/177688 wireless WiFi regodmains information is inconsistent between "e o kern/177530 wireless [ath] ath driver isn't 32 bit int clean o kern/177465 wireless [iwn] 20%-100% packet loss with iwn driver o kern/177451 wireless [ieee80211] page fault in ieee80211_tx_mgt_timeout o kern/176238 wireless [ath] [patch] Correct buffer size calculation and simp o kern/176201 wireless [net80211] [patch] 11n station includes unrelated ht p o kern/176104 wireless [iwn] iwn0: iwn_intr: fatal firmware error o kern/175722 wireless [ath]lot of bad seriesx hwrate in kernel messages o kern/175446 wireless [ath] high volumes of PHY errors lead to BB/MAC hangs o kern/175227 wireless [ath] beacon timers aren't necessarily reprogrammed af o kern/175183 wireless [iwn] iwn(4) becomes unresponsive during initial confi o kern/175053 wireless [iwn] iwn firmware error on 9-stable with Ultimate-N 6 o kern/174891 wireless [ieee80211] struct ieee80211_node is freed during acti o kern/174722 wireless [wlan] can't use channel 12 and 13 (14) with my wifi i o kern/174661 wireless [wlan] lost alias on wlan interface o kern/174283 wireless [net80211] panics in ieee80211_ff_age() and ieee80211_ o kern/174276 wireless [ath] if_ath memory modified after free o kern/174273 wireless [net80211] taking down a net80211 node with active fas o kern/173917 wireless [iwn] wpa-supplicant issues on iwn o kern/173898 wireless [iwn] [patch] iwn(4) DOES support 6235 chip. o kern/173883 wireless [ath] ath0: unable to attach - pci issue? o kern/173711 wireless [ath] powerd kills ath on the Asus EeePC 1005HA o kern/173342 wireless PS-Poll isn't working o kern/173336 wireless [ath] Atheros card improper device poweroff handling o o kern/172955 wireless [ath] 11n does not work in adhoc mode o kern/172706 wireless [wpi] wpi0 fails to load firmware when using country o kern/172672 wireless [ubt] Bluetooth device recognised but not working o kern/172661 wireless hostapd(8) securing wireless adapter in HostAP mode is o kern/172338 wireless [ath] [net80211] CCMP IV transmit counters are not cor o kern/171598 wireless [ath] TP-Link TL-WN951N W-LAN PCI Adapter 300 MBit stu o kern/171235 wireless [ath] ath loses connection, system freezes on netif re o kern/170889 wireless [ath] ath driver uses some uninitilized memory o kern/170620 wireless [ath] LOR and deadlock when multiple vaps are used o kern/170573 wireless [iwi] Intel 2200BG iwi NIC hangs with need multicast c o kern/170513 wireless [ath] ath logs: ath_tx_aggr_comp_aggr: AR5416 bug: o kern/170433 wireless [ath] TX hang after a stuck beacon message with active o kern/170397 wireless [ath] [patch] Uninitialized variables in ah_eeprom_928 o kern/170302 wireless [ath] 802.11n frames are not being transmitted with mu o kern/170281 wireless [ath] 802.11n locks up on aggregation setup (ampdutx) o kern/170098 wireless [ath] [net80211] VAPs (Virtual access points) with Ath o kern/170066 wireless [ral] ral(4) rt61pci Linksys freezes the machine as so o kern/169432 wireless [ath] BAR TX hang when aggregation session is reset du p kern/169362 wireless [ath] AR5416: radar pulse PHY errors sometimes include o kern/169336 wireless [ath] ANI isn't triggering in a busy/noisy environment o kern/169199 wireless [ath] Cannot set up static ip addresses for wireless w o kern/169084 wireless [ath] suspend/resume doesn't cause a rescan; the assoc o kern/168530 wireless [ath] Broken WEP probably o kern/168393 wireless AR9285: suspend/resume sometimes fails o kern/168170 wireless [net80211] ieee80211_send_bar() doesn't complete corre o kern/167870 wireless [ath] adhoc wifi client does not join an existing IBSS o kern/167834 wireless [ath] kickpcu; 'handled 0 packets' o kern/167828 wireless [iwn] iwn(4) doesn't recover automatically after firmw o kern/167798 wireless ifconfig(8): problem with "ifconfig list scan" command o kern/167491 wireless [ath] TID != hardware queue TID in ath_tx_aggr_comp_ag o kern/167113 wireless [ath] AR5210: "stuck" TX seems to be occuring, without o kern/167080 wireless [ath] channel switch on another VAP break channel setu o kern/166684 wireless [ath] [net80211] mgmtrate/mcastrate isn't updated base p kern/166642 wireless [ieee80211] [patch] in 802.11n mode for FreeBSD AP, ha o kern/166641 wireless [ieee80211] [patch] mbuf/cluster leak in AP mode in 80 p kern/166357 wireless [ath] 802.11n TX stall when the first frame in the BAW o kern/166286 wireless [net80211] [ath] initial switch to HT40 isn't causing p kern/166190 wireless [ath] TX hangs and frames stuck in TX queue o kern/166086 wireless [Patch][ath] Reflect state of rfkill switch in a sysct o kern/165969 wireless [ath] Slower performance in adhoc mode vs Client/AP mo o kern/165966 wireless [ath] ath0: device timeout on SMP machines due to race o kern/165895 wireless [ath] overly busy cabq can tie up all tx buffers o kern/165870 wireless [bwn] bwn driver does not attach on HP Pavilion dv9420 o kern/165866 wireless [ath] TX hangs, requiring a "scan" to properly reset t o kern/165849 wireless [ath] [hang] network ath driver freeze o kern/165595 wireless [ipw] ipw(4): Can't load firmare for ipw2200bg o kern/165543 wireless [ath] ath0 endless scanning of channels without connec o kern/165517 wireless [net80211] bgscan isn't triggered when invalid beacons o kern/165475 wireless [ath] operational mode change doesn't poke the underly o kern/165382 wireless [kernel] taskqueue_unblock doesn't unblock currently q o kern/165306 wireless [ath] race conditions between scanning and beacon time o kern/165220 wireless [ath] "ath_rx_tasklet: sc_inreset_cnt > 0; skipping" m o kern/165214 wireless [ieee80211] Kernel panic in ieee80211_output.c:2505 o kern/165212 wireless [ath] No WiFi on Acer Aspire One 751h (Atheros AR5BHB6 o kern/165149 wireless [ath] [net80211] Ping with data length more than iv_fr o kern/165146 wireless [net80211] Net802.11 Fragment number is assigned 1 (sh o kern/165060 wireless [ath] vap->iv_bss race conditions causing crashes insi o kern/165021 wireless [ath] ath device timeout during scan/attach, if wlan_c o kern/164721 wireless [ath] ath device timeouts o kern/164382 wireless [ath] crash when down/deleting a vap - inside ieee8021 o kern/164365 wireless [iwi] iwi0: UP/DOWN in 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 p kern/163312 wireless [panic] [ath driver] kernel panic: page fault with ath o kern/163237 wireless [ath] AR5416 as HostAP. Delays among clients when a cl 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/153594 wireless [wlan] netif/devd race 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/146426 wireless [mwl] 802.11n rates not possible on mwl o kern/146425 wireless [mwl] mwl dropping all packets during and after high u 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 kern/144755 wireless [wlan] netif/devd race 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 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 kern/121061 wireless [ath] [panic] panic while ejecting ath(4)-adapter duri 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 172 problems total. From owner-freebsd-wireless@FreeBSD.ORG Mon Aug 5 15:58:35 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3DB78F26; Mon, 5 Aug 2013 15:58:35 +0000 (UTC) (envelope-from qinchenchong@gmail.com) Received: from mail-vb0-x234.google.com (mail-vb0-x234.google.com [IPv6:2607:f8b0:400c:c02::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BD02724E3; Mon, 5 Aug 2013 15:58:34 +0000 (UTC) Received: by mail-vb0-f52.google.com with SMTP id f12so2956146vbg.25 for ; Mon, 05 Aug 2013 08:58:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=TMdOrqRGXjQTg9n+zgjjnd7ls8Re3bKSi3jbHmRAzJ0=; b=wUBLuaO89RjIx9q7mrfRG4atYs/XTZd1dI0rXLZaHbmOOGBnP29uZJfoORNSKDWQrS 7z+S/qrAbjWbsbQNXAPFHWCyyazYYGpmz2V1UzVMrfdnSaQIkFwHkDV2VvqQU07BPKg0 x0NoKEVRmEt5yTxxQoQbmxbZ4DD3VNNx9pO6rsFuaCDW5U8qJ66/GLSyzQ23Acz0a1ii 90NxUaFZjaWKgpsoYI3aock5tzAQsqvuaO5r6l9JB6E2CD0I2Onnv60gzyU9FQ8utUq2 bKa3G+QPi6xRUxY2Af0BW3/aStLHNgfG4J9R4YZNpBFqIbu3JwpCz5zDJHhoDbrBBkf2 iYRw== MIME-Version: 1.0 X-Received: by 10.58.200.73 with SMTP id jq9mr6028400vec.53.1375718313942; Mon, 05 Aug 2013 08:58:33 -0700 (PDT) Received: by 10.220.57.142 with HTTP; Mon, 5 Aug 2013 08:58:33 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Aug 2013 23:58:33 +0800 Message-ID: Subject: Re: Chenchong's work on net80211_ratectl From: Chenchong Qin To: Adrian Chadd Content-Type: multipart/mixed; boundary=047d7bd6b90069e7a604e3356150 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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: Mon, 05 Aug 2013 15:58:35 -0000 --047d7bd6b90069e7a604e3356150 Content-Type: text/plain; charset=ISO-8859-1 Hi! Here is my work done these days on porting ath_rate_sample to net80211. It has not been finished yet. _complete_ and _update_ are to be added. _complete_ is really a tricky thing. We have to provide rc algos with rc information during the frame completion period. Different rc algos may need different rc information. What makes things more thornier is that different drivers provide different rc information in different ways. So, it seems we need a unified way to provide the rc information during completion of a frame. I'm browsing mac80211 these days to see what Linux do about _complete_. And, looking forward to your commets! Thanks! Chenchong On Sat, Aug 3, 2013 at 1:30 AM, Adrian Chadd wrote: > Well just remember you can always ask me/us questions! > > What's your latest diff against -HEAD? Maybe I can start looking at > including parts of it in the tree. > > > > > -adrian > > On 2 August 2013 09:17, Chenchong Qin wrote: > > Hi! > > > > These days, I'm taking a further look at what Linux done for the > > _completion_ of a > > frame. Some updates will be posted here later. > > > > And, with ir_rates, we can return/fill an rc array rather than just > > returning the rix. > > > > Thanks! > > > > Chenchong > > > > > > > > > > > > On Thu, Aug 1, 2013 at 12:21 AM, Adrian Chadd > wrote: > >> > >> Boo! > >> > >> Do you have another update? > >> > >> > >> > >> -adrian > >> > >> On 24 July 2013 06:44, Adrian Chadd wrote: > >> > On 24 July 2013 06:38, Chenchong Qin wrote: > >> >> > >> >> My pleasure! > >> >> > >> >> It's also against HEAD. > >> >> > >> >> Thanks! > >> > > >> > Ok. This is looking great! > >> > > >> > Next - we need to update the rate control API to now populate an rc > >> > array rather than just returning the rix. > >> > > >> > This is the tricky part - as we're going to have to modify all the > >> > drivers that use the rate control API to use this. > >> > Which is fine, as there's only a handful. It's just annoying. > >> > > >> > Then we have to provide the rate control information during frame > >> > _completion_, so the rate control code knows which transmission rates > >> > succeeded or failed. I'm still not sure what to do about it here. > >> > Maybe do something like Linux and attach TX rate control and > >> > completion information as an mbuf tag? > >> > > >> > _Then_ we can start doing interesting thing with it. :) > >> > > >> > > >> > > >> > -adrian > > > > > --047d7bd6b90069e7a604e3356150 Content-Type: application/octet-stream; name="20130805-net80211-ratectl.diff" Content-Disposition: attachment; filename="20130805-net80211-ratectl.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hjzv0cx60 SW5kZXg6IGllZWU4MDIxMV9yY19zYW1wbGUuYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBpZWVlODAyMTFfcmNf c2FtcGxlLmMJKHJldmlzaW9uIDApCisrKyBpZWVlODAyMTFfcmNfc2FtcGxlLmMJKHJldmlzaW9u I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it7CisjaWYgTlVNX1BBQ0tFVF9TSVpFX0JJTlMgPiAxCisJaWYgKHNpemUgPD0gcGFja2V0X3Np emVfYmluc1swXSkKKwkJcmV0dXJuIDA7CisjZW5kaWYKKyNpZiBOVU1fUEFDS0VUX1NJWkVfQklO UyA+IDIKKwlpZiAoc2l6ZSA8PSBwYWNrZXRfc2l6ZV9iaW5zWzFdKQorCQlyZXR1cm4gMTsKKyNl bmRpZgorI2lmIE5VTV9QQUNLRVRfU0laRV9CSU5TID4gMworCWlmIChzaXplIDw9IHBhY2tldF9z aXplX2JpbnNbMl0pCisJCXJldHVybiAyOworI2VuZGlmCisjaWYgTlVNX1BBQ0tFVF9TSVpFX0JJ TlMgPiA0CisjZXJyb3IgImFkZCBzdXBwb3J0IGZvciBtb3JlIHBhY2tldCBzaXplcyIKKyNlbmRp ZgorCXJldHVybiBOVU1fUEFDS0VUX1NJWkVfQklOUy0xOworfQorCisvKgorICogQ2FsY3VsYXRl IHRoZSB0cmFuc21pdCBkdXJhdGlvbiBvZiBhIGZyYW1lLgorICovCitzdGF0aWMgdW5zaWduZWQg Y2FsY191c2Vjc191bmljYXN0X3BhY2tldChpbnQgbGVuZ3RoLAorCQkJCWludCByaXgsIGludCBz aG9ydF9yZXRyaWVzLAorCQkJCWludCBsb25nX3JldHJpZXMsIGludCBpc19odDQwKQoreworCS8q IFhYWCBub3QgZG9uZSB5ZXQgKi8KK30KKworI2VuZGlmIC8qIF9ORVQ4MDIxMV9JRUVFODAyMTFf UkFURUNUTF9TQU1QTEVfSF8gKi8KSW5kZXg6IGllZWU4MDIxMV9yY19zYW1wbGVfdHhzY2hlZC5o Cj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT0KLS0tIGllZWU4MDIxMV9yY19zYW1wbGVfdHhzY2hlZC5oCShyZXZpc2lvbiAw KQorKysgaWVlZTgwMjExX3JjX3NhbXBsZV90eHNjaGVkLmgJKHJldmlzaW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ID8gMjMgOiAoKChfcikgPT0gNzgpID8gMjQg OiAoKChfcikgPT0gMTA0KSA/IDI1IDogXAorCSgoKF9yKSA9PSAxMTcpID8gMjYgOiAoKChfcikg PT0gMTMwKT8gMjcgOiAwKSkpKSkpKSkKKyNkZWZpbmUgTkczKF9yKSBcCisJKCgoX3IpID09IDE5 LjUpICA/IDI4IDogKCgoX3IpID09IDM5KSA/IDI5IDogKCgoX3IpID09IDU4LjUpICA/IDMwIDog XAorCSgoKF9yKSA9PSA3OCkgID8gMzEgOiAoKChfcikgPT0gMTE3KSA/IDMyIDogKCgoX3IpID09 IDE1NikgPyAzMyA6IFwKKwkoKChfcikgPT0gMTc1LjUpID8gMzQgOiAoKChfcikgPT0gMTk1KT8g MzUgOiAwKSkpKSkpKSkKKworc3RhdGljIGNvbnN0IHN0cnVjdCB0eHNjaGVkdWxlIHNlcmllc18x MW5nW10gPSB7CisJeyAzLEcoIDEpLCAzLEcoICAxKSwgMCxHKCAgMSksIDAsRyggMSkgfSwgICAg ICAgLyogICAxTWIvcyAqLworCXsgNCxHKCAyKSwgMyxHKCAgMSksIDQsRyggIDEpLCAwLEcoIDEp IH0sICAgICAgIC8qICAgMk1iL3MgKi8KKwl7IDQsRyg1LjUpLDMsRyggIDIpLCA0LEcoICAxKSwg MixHKCAxKSB9LCAgICAgICAvKiA1LjVNYi9zICovCisJeyA0LEcoMTEpLCAzLEcoNS41KSwgNCxH KCAgMiksIDIsRyggMSkgfSwgICAgICAgLyogIDExTWIvcyAqLworCXsgNCxHKCA2KSwgMyxHKDUu NSksIDQsRyggIDIpLCAyLEcoIDEpIH0sICAgICAgIC8qICAgNk1iL3MgKi8KKwl7IDQsRyggOSks IDMsRyggIDYpLCA0LEcoNS41KSwgMixHKCAxKSB9LCAgICAgICAvKiAgIDlNYi9zICovCisJeyA0 LEcoMTIpLCAzLEcoIDExKSwgNCxHKDUuNSksIDIsRyggMSkgfSwgICAgICAgLyogIDEyTWIvcyAq LworCXsgNCxHKDE4KS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NYi9zICovCisJ eyA0LE5HMSggIDY1KSwgMyxORzEoNTguNSksIDQsTkcxKCAgNTIpLCAyLE5HMSggMTMpIH0sICAv KiAgNjVNYi9zICovCisKKwkvKiAyIHN0cmVhbSByYXRlcyAqLworCisJeyAzLE5HMiggIDEzKSwg MyxORzIoICAxMyksIDAsTkcyKCAgMTMpLCAwLE5HMiggMTMpIH0sICAvKiAgMTNNYi9zICovCisJ eyA0LE5HMiggIDI2KSwgMyxORzIoICAxMyksIDQsTkcyKCAgMTMpLCAwLE5HMiggMTMpIH0sICAv KiAgMjZNYi9zICovCisJeyA0LE5HMiggIDM5KSwgMyxORzIoICAyNiksIDQsTkcyKCAgMTMpLCAy LE5HMiggMTMpIH0sICAvKiAgMzlNYi9zICovCisJeyA0LE5HMiggIDUyKSwgMyxORzIoICAzOSks IDQsTkcyKCAgMjYpLCAyLE5HMiggMTMpIH0sICAvKiAgNTJNYi9zICovCisJeyA0LE5HMiggIDc4 KSwgMyxORzIoICA1MiksIDQsTkcyKCAgMzkpLCAyLE5HMiggMTMpIH0sICAvKiAgNzhNYi9zICov CisJeyA0LE5HMiggMTA0KSwgMyxORzIoICA3OCksIDQsTkcyKCAgNTIpLCAyLE5HMiggMTMpIH0s ICAvKiAxMDRNYi9zICovCisJeyA0LE5HMiggMTE3KSwgMyxORzIoIDEwNCksIDQsTkcyKCAgNzgp LCAyLE5HMiggMjYpIH0sICAvKiAxMTdNYi9zICovCisJeyA0LE5HMiggMTMwKSwgMyxORzIoIDEx NyksIDQsTkcyKCAxMDQpLCAyLE5HMiggMjYpIH0sICAvKiAxMzBNYi9zICovCisKKwkvKiAzIHN0 cmVhbSByYXRlcyAqLworCisJeyAzLE5HMygxOS41KSwgMyxORzMoMTkuNSksIDAsTkczKDE5LjUp LCAwLE5HMygxOS41KSB9LCAgLyogIDE5TWIvcyAqLworCXsgMyxORzMoICAzOSksIDMsTkczKDE5 LjUpLCAwLE5HMygxOS41KSwgMCxORzMoMTkuNSkgfSwgIC8qICAzOU1iL3MgKi8KKwl7IDMsTkcz KDU4LjUpLCAzLE5HMyggIDM5KSwgMCxORzMoMTkuNSksIDAsTkczKDE5LjUpIH0sICAvKiAgNThN Yi9zICovCisJeyAzLE5HMyggIDc4KSwgMyxORzMoNTguNSksIDAsTkczKCAgMzkpLCAwLE5HMygx OS41KSB9LCAgLyogIDc4TWIvcyAqLworCXsgMyxORzMoIDExNyksIDMsTkczKCAgNzgpLCAwLE5H Myg1OC41KSwgMCxORzMoMTkuNSkgfSwgIC8qIDExN01iL3MgKi8KKwl7IDMsTkczKCAxNTYpLCAz LE5HMyggMTE3KSwgMCxORzMoICA3OCksIDAsTkczKDE5LjUpIH0sICAvKiAgMTU2TWIvcyAqLwor CXsgMyxORzMoMTc1LjUpLCAzLE5HMyggMTU2KSwgMCxORzMoIDExNyksIDAsTkczKCAgMzkpIH0s ICAvKiAgMTc1TWIvcyAqLworCXsgMyxORzMoIDE5NSksIDMsTkczKCAxOTUpLCAwLE5HMyggMTU2 KSwgMCxORzMoNTguNSkgfSwgIC8qIDE5NU1iL3MgKi8KKworfTsKKyN1bmRlZiBHCisjdW5kZWYg TkczCisjdW5kZWYgTkcyCisjdW5kZWYgTkcxCisKKyNkZWZpbmUgSChfcikgXAorICAgICgoKF9y KSA9PSAzKSAgID8gMCA6ICgoKF9yKSA9PSA0LjUpID8gMSA6ICgoKF9yKSA9PSA2KSAgPyAyIDog XAorICAgICgoKF9yKSA9PSA5KSAgID8gMyA6ICgoKF9yKSA9PSAxMikgID8gNCA6ICgoKF9yKSA9 PSAxOCkgPyA1IDogXAorICAgICgoKF9yKSA9PSAyNCkgID8gNiA6ICgoKF9yKSA9PSAyNykgID8g NyA6IDApKSkpKSkpKQorc3RhdGljIGNvbnN0IHN0cnVjdCB0eHNjaGVkdWxlIHNlcmllc19oYWxm W10gPSB7CisJeyAzLEgoIDMpLCAzLEgoICAzKSwgMCxIKCAgMyksIDAsSCggMykgfSwJLyogICAz TWIvcyAqLworCXsgNCxIKD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sgNCxRKCAgIDMp LDMsUSgxLjUpLCA0LFEoMS41KSwgMCxRKDEuNSkgfSwJLyogICAzTWIvcyAqLworCXsgNCxRKCA0 LjUpLDMsUSggIDMpLCA0LFEoMS41KSwgMixRKDEuNSkgfSwJLyogNC41TWIvcyAqLworCXsgNCxR KCAgIDYpLDMsUSg0LjUpLCA0LFEoICAzKSwgMixRKDEuNSkgfSwJLyogICA2TWIvcyAqLworCXsg NCxRKCAgIDkpLDMsUSggIDYpLCA0LFEoNC41KSwgMixRKDEuNSkgfSwJLyogICA5TWIvcyAqLwor CXsgNCxRKCAgMTIpLDMsUSggIDkpLCA0LFEoICA2KSwgMixRKCAgMykgfSwJLyogIDEyTWIvcyAq LworCXsgNCxRKDEzLjUpLDMsUSggMTIpLCA0LFEoICA5KSwgMixRKCAgNikgfQkvKjEzLjVNYi9z ICovCit9OworI3VuZGVmIFEKKworI2VuZGlmCkluZGV4OiBpZWVlODAyMTFfcmF0ZWN0bC5jCj09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT0KLS0tIGllZWU4MDIxMV9yYXRlY3RsLmMJKHJldmlzaW9uIDI1NDgyNikKKysrIGll ZWU4MDIxMV9yYXRlY3RsLmMJKHJldmlzaW9uIDI1NTUzOSkKQEAgLTEsNSArMSw2IEBACiAvKi0K ICAqIENvcHlyaWdodCAoYykgMjAxMCBSdWkgUGF1bG8gPHJwYXVsb0BGcmVlQlNELm9yZz4KKyAq IENvcHlyaWdodCAoYykgMjAxMyBDaGVuY2hvbmcgUWluIDxjY3FpbkBGcmVlQlNELm9yZz4KICAq IEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgKgogICogUmVkaXN0cmlidXRpb24gYW5kIHVzZSBpbiBz b3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CkBAIC00OSw2ICs1MCwzMyBA QAogCiBNQUxMT0NfREVGSU5FKE1fODAyMTF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069e7a604e3356150-- From owner-freebsd-wireless@FreeBSD.ORG Mon Aug 5 16:03:44 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id E28ED124 for ; Mon, 5 Aug 2013 16:03:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x22f.google.com (mail-we0-x22f.google.com [IPv6:2a00:1450:400c:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 751A0250B for ; Mon, 5 Aug 2013 16:03:44 +0000 (UTC) Received: by mail-we0-f175.google.com with SMTP id q58so2581124wes.6 for ; Mon, 05 Aug 2013 09:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=xly9GoSi8wvmfL1zDOPFbbcjWRdnIVlkZkQjOTjb6f4=; b=RU+LEzqplpNbi246q1r6XIjEPK6tH9XP+dSeGTfJ7J6ZJ7IvukbhmdR9SLHzxAw/Tt pjTDwEWrbJ51QshHW6CQrKLc/bDtNEFeqkNjICFuHEci7EFRqFfOiuQIHvFsuQXuOyDz YQVI7z3U+qecFK6d05Ag25RQLBmE1SzBy3pyGu+K5tfx/UEuflXf7l0+NuYnLnxNWw8X vYbM55wNjUydiou0yJl+6wHp/ECp3ARRgefteQCEDgrKA//IgbsAw0TfrOBazfzytydD 4AXNP+oZohfg6+46NPhXT5+NLaNhhxX5vK+imLmQii3ryTJkIWYW/fmfVB0zW+qLqmlS 4kHA== MIME-Version: 1.0 X-Received: by 10.180.14.105 with SMTP id o9mr7274330wic.30.1375718622752; Mon, 05 Aug 2013 09:03:42 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Mon, 5 Aug 2013 09:03:42 -0700 (PDT) In-Reply-To: References: Date: Mon, 5 Aug 2013 09:03:42 -0700 X-Google-Sender-Auth: CS_pWtIwAcutTHDuCILQ8lA0g1Y Message-ID: Subject: Re: Chenchong's work on net80211_ratectl From: Adrian Chadd To: Chenchong Qin Content-Type: text/plain; charset=ISO-8859-1 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: Mon, 05 Aug 2013 16:03:44 -0000 Hi! Great! So what's the problem with complete? Linux just provides all the information that the NIC supplies - how many attempts were made, how many attempts failed, which rate suceeded, etc. It looks a lot like it was designed around the requirements for the atheros driver (that has the most interesting information available) and other NICs just have to fake it somehow. -adrian On 5 August 2013 08:58, Chenchong Qin wrote: > Hi! > > Here is my work done these days on porting ath_rate_sample to net80211. It > has not been finished yet. _complete_ and _update_ are to be added. > > _complete_ is really a tricky thing. We have to provide rc algos with rc > information > during the frame completion period. Different rc algos may need different rc > information. What makes things more thornier is that different drivers > provide > different rc information in different ways. So, it seems we need a unified > way to > provide the rc information during completion of a frame. > > I'm browsing mac80211 these days to see what Linux do about _complete_. And, > looking forward to your commets! > > Thanks! > > Chenchong > > > On Sat, Aug 3, 2013 at 1:30 AM, Adrian Chadd wrote: >> >> Well just remember you can always ask me/us questions! >> >> What's your latest diff against -HEAD? Maybe I can start looking at >> including parts of it in the tree. >> >> >> >> >> -adrian >> >> On 2 August 2013 09:17, Chenchong Qin wrote: >> > Hi! >> > >> > These days, I'm taking a further look at what Linux done for the >> > _completion_ of a >> > frame. Some updates will be posted here later. >> > >> > And, with ir_rates, we can return/fill an rc array rather than just >> > returning the rix. >> > >> > Thanks! >> > >> > Chenchong >> > >> > >> > >> > >> > >> > On Thu, Aug 1, 2013 at 12:21 AM, Adrian Chadd >> > wrote: >> >> >> >> Boo! >> >> >> >> Do you have another update? >> >> >> >> >> >> >> >> -adrian >> >> >> >> On 24 July 2013 06:44, Adrian Chadd wrote: >> >> > On 24 July 2013 06:38, Chenchong Qin wrote: >> >> >> >> >> >> My pleasure! >> >> >> >> >> >> It's also against HEAD. >> >> >> >> >> >> Thanks! >> >> > >> >> > Ok. This is looking great! >> >> > >> >> > Next - we need to update the rate control API to now populate an rc >> >> > array rather than just returning the rix. >> >> > >> >> > This is the tricky part - as we're going to have to modify all the >> >> > drivers that use the rate control API to use this. >> >> > Which is fine, as there's only a handful. It's just annoying. >> >> > >> >> > Then we have to provide the rate control information during frame >> >> > _completion_, so the rate control code knows which transmission rates >> >> > succeeded or failed. I'm still not sure what to do about it here. >> >> > Maybe do something like Linux and attach TX rate control and >> >> > completion information as an mbuf tag? >> >> > >> >> > _Then_ we can start doing interesting thing with it. :) >> >> > >> >> > >> >> > >> >> > -adrian >> > >> > > > From owner-freebsd-wireless@FreeBSD.ORG Mon Aug 5 17:23:44 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 08AB6C6E for ; Mon, 5 Aug 2013 17:23:44 +0000 (UTC) (envelope-from cg@cgross.info) Received: from alpha.kreiz-it.fr (alpha.kreiz-it.fr [IPv6:2001:41d0:8:dda6::1]) by mx1.freebsd.org (Postfix) with ESMTP id 6080E29D9 for ; Mon, 5 Aug 2013 17:23:43 +0000 (UTC) Received: from DirTech (lnr56-1-82-246-51-185.fbx.proxad.net [82.246.51.185]) by alpha.kreiz-it.fr (Postfix) with ESMTPSA id AC5767D2 for ; Mon, 5 Aug 2013 19:23:40 +0200 (CEST) From: "Cedric GROSS" To: Subject: [iwn] Review split 5 Date: Mon, 5 Aug 2013 19:23:39 +0200 Message-ID: <002d01ce9200$88b19dc0$9a14d940$@info> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_002E_01CE9211.4C3A6DC0" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac6SAIZdljfO0IPRSRigV5IKf5HFEA== Content-Language: fr X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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: Mon, 05 Aug 2013 17:23:44 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_002E_01CE9211.4C3A6DC0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hello, Here is another split. This one update if_iwnvar.h with new structure for later but also modify iwn_softc for context selection. Context will be used later when PAN context will be set in next diff. uCode TLV detection has been updated also. Cedric ------=_NextPart_000_002E_01CE9211.4C3A6DC0 Content-Type: application/octet-stream; name="context.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="context.patch" Index: sys/dev/iwn/if_iwn.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= --- sys/dev/iwn/if_iwn.c (revision 253965)=0A= +++ sys/dev/iwn/if_iwn.c (working copy)=0A= @@ -1,4 +1,6 @@=0A= /*-=0A= + * Copyright (c) 2013 Cedric GROSS =0A= + * Copyright (c) 2011 Intel Corporation=0A= * Copyright (c) 2007-2009=0A= * Damien Bergamini =0A= * Copyright (c) 2008=0A= @@ -521,6 +523,7 @@=0A= /* Read hardware revision and attach. */=0A= sc->hw_type =3D (IWN_READ(sc, IWN_HW_REV) >> IWN_HW_REV_TYPE_SHIFT)=0A= & IWN_HW_REV_TYPE_MASK;=0A= + sc->subdevice_id=3Dpci_get_subdevice(dev);=0A= if (sc->hw_type =3D=3D IWN_HW_REV_TYPE_4965)=0A= error =3D iwn4965_attach(sc, pci_get_device(dev));=0A= else=0A= @@ -894,19 +897,27 @@=0A= {=0A= struct iwn_vap *ivp;=0A= struct ieee80211vap *vap;=0A= + uint8_t mac1[IEEE80211_ADDR_LEN];=0A= + struct iwn_softc *sc =3D ic->ic_ifp->if_softc;=0A= =0A= if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */=0A= return NULL;=0A= +=0A= + IEEE80211_ADDR_COPY(mac1, mac);=0A= +=0A= ivp =3D (struct iwn_vap *) malloc(sizeof(struct iwn_vap),=0A= M_80211_VAP, M_NOWAIT | M_ZERO);=0A= if (ivp =3D=3D NULL)=0A= return NULL;=0A= vap =3D &ivp->iv_vap;=0A= - ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac);=0A= + ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac1);=0A= + ivp->ctx =3D IWN_RXON_BSS_CTX;=0A= + IEEE80211_ADDR_COPY(ivp->macaddr, mac1);=0A= vap->iv_bmissthreshold =3D 10; /* override default */=0A= /* Override with driver methods. */=0A= ivp->iv_newstate =3D vap->iv_newstate;=0A= vap->iv_newstate =3D iwn_newstate;=0A= + sc->ivap[IWN_RXON_BSS_CTX] =3D vap;=0A= =0A= ieee80211_ratectl_init(vap);=0A= /* Complete setup. */=0A= @@ -2325,6 +2336,8 @@=0A= IWN_LOCK(sc);=0A= callout_stop(&sc->calib_to);=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= +=0A= switch (nstate) {=0A= case IEEE80211_S_ASSOC:=0A= if (vap->iv_state !=3D IEEE80211_S_RUN)=0A= @@ -2338,8 +2351,8 @@=0A= * !AUTH -> AUTH transition requires state reset to handle=0A= * reassociations correctly.=0A= */=0A= - sc->rxon.associd =3D 0;=0A= - sc->rxon.filter &=3D ~htole32(IWN_FILTER_BSS);=0A= + sc->rxon->associd =3D 0;=0A= + sc->rxon->filter &=3D ~htole32(IWN_FILTER_BSS);=0A= sc->calib.state =3D IWN_CALIB_STATE_INIT;=0A= =0A= if ((error =3D iwn_auth(sc, vap)) !=3D 0) {=0A= @@ -3681,7 +3694,7 @@=0A= =0A= if (IEEE80211_IS_MULTICAST(wh->i_addr1) ||=0A= type !=3D IEEE80211_FC0_TYPE_DATA)=0A= - tx->id =3D sc->broadcast_id;=0A= + tx->id =3D IWN5000_ID_BROADCAST;=0A= else=0A= tx->id =3D wn->id;=0A= =0A= @@ -3712,7 +3725,7 @@=0A= tx->data_ntries =3D 15;=0A= tx->lifetime =3D htole32(IWN_LIFETIME_INFINITE);=0A= tx->rate =3D iwn_rate_to_plcp(sc, ni, rate);=0A= - if (tx->id =3D=3D sc->broadcast_id) {=0A= + if (tx->id =3D=3D IWN5000_ID_BROADCAST) {=0A= /* Group or management frame. */=0A= tx->linkq =3D 0;=0A= /* XXX Alternate between antenna A and B? */=0A= @@ -3919,7 +3932,7 @@=0A= =0A= tx->len =3D htole16(totlen);=0A= tx->tid =3D 0;=0A= - tx->id =3D sc->broadcast_id;=0A= + tx->id =3D IWN5000_ID_BROADCAST;=0A= tx->rts_ntries =3D params->ibp_try1;=0A= tx->data_ntries =3D params->ibp_try0;=0A= tx->lifetime =3D htole32(IWN_LIFETIME_INFINITE);=0A= @@ -4353,9 +4366,11 @@=0A= =0A= DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__);=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= +=0A= memset(&node, 0, sizeof node);=0A= IEEE80211_ADDR_COPY(node.macaddr, ifp->if_broadcastaddr);=0A= - node.id =3D sc->broadcast_id;=0A= + node.id =3D IWN5000_ID_BROADCAST;=0A= DPRINTF(sc, IWN_DEBUG_RESET, "%s: adding broadcast node\n", __func__);=0A= if ((error =3D ops->add_node(sc, &node, async)) !=3D 0)=0A= return error;=0A= @@ -4364,7 +4379,7 @@=0A= txant =3D IWN_LSB(sc->txchainmask);=0A= =0A= memset(&linkq, 0, sizeof linkq);=0A= - linkq.id =3D sc->broadcast_id;=0A= + linkq.id =3D IWN5000_ID_BROADCAST;=0A= linkq.antmsk_1stream =3D txant;=0A= linkq.antmsk_2stream =3D IWN_ANT_AB;=0A= linkq.ampdu_max =3D 64;=0A= @@ -4536,8 +4551,9 @@=0A= int i, c, grp, maxpwr;=0A= uint8_t chan;=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= /* Retrieve current channel from last RXON. */=0A= - chan =3D sc->rxon.chan;=0A= + chan =3D sc->rxon->chan;=0A= DPRINTF(sc, IWN_DEBUG_RESET, "setting TX power for channel %d\n",=0A= chan);=0A= =0A= @@ -4896,8 +4912,8 @@=0A= =0A= #ifdef notyet=0A= /* XXX Disable RX chains with no antennas connected. */=0A= - sc->rxon.rxchain =3D htole16(IWN_RXCHAIN_SEL(sc->chainmask));=0A= - (void)iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 1);=0A= + sc->rxon->rxchain =3D htole16(IWN_RXCHAIN_SEL(sc->chainmask));=0A= + (void)iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 1);=0A= #endif=0A= =0A= /* Enable power-saving mode if requested by user. */=0A= @@ -5426,21 +5442,22 @@=0A= }=0A= =0A= /* Set mode, channel, RX filter and enable RX. */=0A= - memset(&sc->rxon, 0, sizeof (struct iwn_rxon));=0A= - IEEE80211_ADDR_COPY(sc->rxon.myaddr, IF_LLADDR(ifp));=0A= - IEEE80211_ADDR_COPY(sc->rxon.wlap, IF_LLADDR(ifp));=0A= - sc->rxon.chan =3D ieee80211_chan2ieee(ic, ic->ic_curchan);=0A= - sc->rxon.flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= + memset(sc->rxon, 0, sizeof (struct iwn_rxon));=0A= + IEEE80211_ADDR_COPY(sc->rxon->myaddr, IF_LLADDR(ifp));=0A= + IEEE80211_ADDR_COPY(sc->rxon->wlap, IF_LLADDR(ifp));=0A= + sc->rxon->chan =3D ieee80211_chan2ieee(ic, ic->ic_curchan);=0A= + sc->rxon->flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= if (IEEE80211_IS_CHAN_2GHZ(ic->ic_curchan))=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= switch (ic->ic_opmode) {=0A= case IEEE80211_M_STA:=0A= - sc->rxon.mode =3D IWN_MODE_STA;=0A= - sc->rxon.filter =3D htole32(IWN_FILTER_MULTICAST);=0A= + sc->rxon->mode =3D IWN_MODE_STA;=0A= + sc->rxon->filter =3D htole32(IWN_FILTER_MULTICAST);=0A= break;=0A= case IEEE80211_M_MONITOR:=0A= - sc->rxon.mode =3D IWN_MODE_MONITOR;=0A= - sc->rxon.filter =3D htole32(IWN_FILTER_MULTICAST |=0A= + sc->rxon->mode =3D IWN_MODE_MONITOR;=0A= + sc->rxon->filter =3D htole32(IWN_FILTER_MULTICAST |=0A= IWN_FILTER_CTL | IWN_FILTER_PROMISC);=0A= break;=0A= default:=0A= @@ -5447,18 +5464,18 @@=0A= /* Should not get there. */=0A= break;=0A= }=0A= - sc->rxon.cck_mask =3D 0x0f; /* not yet negotiated */=0A= - sc->rxon.ofdm_mask =3D 0xff; /* not yet negotiated */=0A= - sc->rxon.ht_single_mask =3D 0xff;=0A= - sc->rxon.ht_dual_mask =3D 0xff;=0A= - sc->rxon.ht_triple_mask =3D 0xff;=0A= + sc->rxon->cck_mask =3D 0x0f; /* not yet negotiated */=0A= + sc->rxon->ofdm_mask =3D 0xff; /* not yet negotiated */=0A= + sc->rxon->ht_single_mask =3D 0xff;=0A= + sc->rxon->ht_dual_mask =3D 0xff;=0A= + sc->rxon->ht_triple_mask =3D 0xff;=0A= rxchain =3D=0A= IWN_RXCHAIN_VALID(sc->rxchainmask) |=0A= IWN_RXCHAIN_MIMO_COUNT(2) |=0A= IWN_RXCHAIN_IDLE_COUNT(2);=0A= - sc->rxon.rxchain =3D htole16(rxchain);=0A= + sc->rxon->rxchain =3D htole16(rxchain);=0A= DPRINTF(sc, IWN_DEBUG_RESET, "%s: setting configuration\n", __func__);=0A= - error =3D iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 0);=0A= + error =3D iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 0);=0A= if (error !=3D 0) {=0A= device_printf(sc->sc_dev, "%s: RXON command failed\n",=0A= __func__);=0A= @@ -5529,6 +5546,7 @@=0A= =0A= DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__);=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= buf =3D malloc(IWN_SCAN_MAXSZ, M_DEVBUF, M_NOWAIT | M_ZERO);=0A= if (buf =3D=3D NULL) {=0A= device_printf(sc->sc_dev,=0A= @@ -5560,7 +5578,7 @@=0A= =0A= tx =3D (struct iwn_cmd_data *)(hdr + 1);=0A= tx->flags =3D htole32(IWN_TX_AUTO_SEQ);=0A= - tx->id =3D sc->broadcast_id;=0A= + tx->id =3D IWN5000_ID_BROADCAST;=0A= tx->lifetime =3D htole32(IWN_LIFETIME_INFINITE);=0A= =0A= if (IEEE80211_IS_CHAN_5GHZ(ic->ic_curchan)) {=0A= @@ -5570,7 +5588,7 @@=0A= } else {=0A= hdr->flags =3D htole32(IWN_RXON_24GHZ | IWN_RXON_AUTO);=0A= if (sc->hw_type =3D=3D IWN_HW_REV_TYPE_4965 &&=0A= - sc->rxon.associd && sc->rxon.chan > 14)=0A= + sc->rxon->associd && sc->rxon->chan > 14)=0A= tx->rate =3D htole32(0xd);=0A= else {=0A= /* Send probe requests at 1Mbps. */=0A= @@ -5629,7 +5647,7 @@=0A= } else if (IEEE80211_IS_CHAN_5GHZ(c)) {=0A= chan->rf_gain =3D 0x3b;=0A= chan->active =3D htole16(24);=0A= - if (sc->rxon.associd)=0A= + if (sc->rxon->associd)=0A= chan->passive =3D htole16(78);=0A= else=0A= chan->passive =3D htole16(110);=0A= @@ -5642,7 +5660,7 @@=0A= } else {=0A= chan->rf_gain =3D 0x28;=0A= chan->active =3D htole16(36);=0A= - if (sc->rxon.associd)=0A= + if (sc->rxon->associd)=0A= chan->passive =3D htole16(88);=0A= else=0A= chan->passive =3D htole16(120);=0A= @@ -5681,31 +5699,32 @@=0A= =0A= DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__);=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= /* Update adapter configuration. */=0A= - IEEE80211_ADDR_COPY(sc->rxon.bssid, ni->ni_bssid);=0A= - sc->rxon.chan =3D ieee80211_chan2ieee(ic, ni->ni_chan);=0A= - sc->rxon.flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= + IEEE80211_ADDR_COPY(sc->rxon->bssid, ni->ni_bssid);=0A= + sc->rxon->chan =3D ieee80211_chan2ieee(ic, ni->ni_chan);=0A= + sc->rxon->flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= if (ic->ic_flags & IEEE80211_F_SHSLOT)=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_SHSLOT);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_SHSLOT);=0A= if (ic->ic_flags & IEEE80211_F_SHPREAMBLE)=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_SHPREAMBLE);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_SHPREAMBLE);=0A= if (IEEE80211_IS_CHAN_A(ni->ni_chan)) {=0A= - sc->rxon.cck_mask =3D 0;=0A= - sc->rxon.ofdm_mask =3D 0x15;=0A= + sc->rxon->cck_mask =3D 0;=0A= + sc->rxon->ofdm_mask =3D 0x15;=0A= } else if (IEEE80211_IS_CHAN_B(ni->ni_chan)) {=0A= - sc->rxon.cck_mask =3D 0x03;=0A= - sc->rxon.ofdm_mask =3D 0;=0A= + sc->rxon->cck_mask =3D 0x03;=0A= + sc->rxon->ofdm_mask =3D 0;=0A= } else {=0A= /* Assume 802.11b/g. */=0A= - sc->rxon.cck_mask =3D 0x0f;=0A= - sc->rxon.ofdm_mask =3D 0x15;=0A= + sc->rxon->cck_mask =3D 0x0f;=0A= + sc->rxon->ofdm_mask =3D 0x15;=0A= }=0A= DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x cck %x ofdm %x\n",=0A= - sc->rxon.chan, sc->rxon.flags, sc->rxon.cck_mask,=0A= - sc->rxon.ofdm_mask);=0A= - error =3D iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 1);=0A= + sc->rxon->chan, sc->rxon->flags, sc->rxon->cck_mask,=0A= + sc->rxon->ofdm_mask);=0A= + error =3D iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 1);=0A= if (error !=3D 0) {=0A= device_printf(sc->sc_dev, "%s: RXON command failed, error %d\n",=0A= __func__, error);=0A= @@ -5747,6 +5766,7 @@=0A= =0A= DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__);=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= if (ic->ic_opmode =3D=3D IEEE80211_M_MONITOR) {=0A= /* Link LED blinks while monitoring. */=0A= iwn_set_led(sc, IWN_LED_LINK, 5, 5);=0A= @@ -5759,26 +5779,26 @@=0A= }=0A= =0A= /* Update adapter configuration. */=0A= - IEEE80211_ADDR_COPY(sc->rxon.bssid, ni->ni_bssid);=0A= - sc->rxon.associd =3D htole16(IEEE80211_AID(ni->ni_associd));=0A= - sc->rxon.chan =3D ieee80211_chan2ieee(ic, ni->ni_chan);=0A= - sc->rxon.flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= + IEEE80211_ADDR_COPY(sc->rxon->bssid, ni->ni_bssid);=0A= + sc->rxon->associd =3D htole16(IEEE80211_AID(ni->ni_associd));=0A= + sc->rxon->chan =3D ieee80211_chan2ieee(ic, ni->ni_chan);=0A= + sc->rxon->flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= if (ic->ic_flags & IEEE80211_F_SHSLOT)=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_SHSLOT);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_SHSLOT);=0A= if (ic->ic_flags & IEEE80211_F_SHPREAMBLE)=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_SHPREAMBLE);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_SHPREAMBLE);=0A= if (IEEE80211_IS_CHAN_A(ni->ni_chan)) {=0A= - sc->rxon.cck_mask =3D 0;=0A= - sc->rxon.ofdm_mask =3D 0x15;=0A= + sc->rxon->cck_mask =3D 0;=0A= + sc->rxon->ofdm_mask =3D 0x15;=0A= } else if (IEEE80211_IS_CHAN_B(ni->ni_chan)) {=0A= - sc->rxon.cck_mask =3D 0x03;=0A= - sc->rxon.ofdm_mask =3D 0;=0A= + sc->rxon->cck_mask =3D 0x03;=0A= + sc->rxon->ofdm_mask =3D 0;=0A= } else {=0A= /* Assume 802.11b/g. */=0A= - sc->rxon.cck_mask =3D 0x0f;=0A= - sc->rxon.ofdm_mask =3D 0x15;=0A= + sc->rxon->cck_mask =3D 0x0f;=0A= + sc->rxon->ofdm_mask =3D 0x15;=0A= }=0A= if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) {=0A= htflags |=3D IWN_RXON_HT_PROTMODE(ic->ic_curhtprotmode);=0A= @@ -5795,11 +5815,11 @@=0A= if (IEEE80211_IS_CHAN_HT40D(ni->ni_chan))=0A= htflags |=3D IWN_RXON_HT_HT40MINUS;=0A= }=0A= - sc->rxon.flags |=3D htole32(htflags);=0A= - sc->rxon.filter |=3D htole32(IWN_FILTER_BSS);=0A= + sc->rxon->flags |=3D htole32(htflags);=0A= + sc->rxon->filter |=3D htole32(IWN_FILTER_BSS);=0A= DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x\n",=0A= - sc->rxon.chan, sc->rxon.flags);=0A= - error =3D iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 1);=0A= + sc->rxon->chan, sc->rxon->flags);=0A= + error =3D iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 1);=0A= if (error !=3D 0) {=0A= device_printf(sc->sc_dev,=0A= "%s: could not update configuration, error %d\n", __func__,=0A= @@ -6781,6 +6801,25 @@=0A= sc->noise_gain =3D tmp + 1;=0A= }=0A= break;=0A= + case IWN_FW_TLV_PAN:=0A= + sc->sc_flags |=3D IWN_FLAG_PAN_SUPPORT;=0A= + DPRINTF(sc, IWN_DEBUG_RESET,"PAN Support found : %d\n", 1);=0A= + break;=0A= + case IWN_FW_TLV_FLAGS :=0A= + sc->tlv_feature_flags =3D htole32(*ptr);=0A= + break;=0A= + case IWN_FW_TLV_PBREQ_MAXLEN:=0A= + case IWN_FW_TLV_RUNT_EVTLOG_PTR:=0A= + case IWN_FW_TLV_RUNT_EVTLOG_SIZE:=0A= + case IWN_FW_TLV_RUNT_ERRLOG_PTR:=0A= + case IWN_FW_TLV_INIT_EVTLOG_PTR:=0A= + case IWN_FW_TLV_INIT_EVTLOG_SIZE:=0A= + case IWN_FW_TLV_INIT_ERRLOG_PTR:=0A= + case IWN_FW_TLV_WOWLAN_INST:=0A= + case IWN_FW_TLV_WOWLAN_DATA:=0A= + DPRINTF(sc, IWN_DEBUG_RESET,=0A= + "TLV type %d reconized but not handled\n", le16toh(tlv->type));=0A= + break;=0A= default:=0A= DPRINTF(sc, IWN_DEBUG_RESET,=0A= "TLV type %d not handled\n", le16toh(tlv->type));=0A= Index: sys/dev/iwn/if_iwnvar.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= --- sys/dev/iwn/if_iwnvar.h (revision 253965)=0A= +++ sys/dev/iwn/if_iwnvar.h (working copy)=0A= @@ -2,6 +2,8 @@=0A= /* $OpenBSD: if_iwnvar.h,v 1.18 2010/04/30 16:06:46 damien Exp $ */=0A= =0A= /*-=0A= + * Copyright (c) 2013 Cedric GROSS =0A= + * Copyright (c) 2011 Intel Corporation=0A= * Copyright (c) 2007, 2008=0A= * Damien Bergamini =0A= * Copyright (c) 2008 Sam Leffler, Errno Consulting=0A= @@ -18,7 +20,39 @@=0A= * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT = OF=0A= * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.=0A= */=0A= +enum iwn_rxon_ctx_id {=0A= + IWN_RXON_BSS_CTX,=0A= + IWN_RXON_PAN_CTX,=0A= + IWN_NUM_RXON_CTX=0A= +};=0A= =0A= +struct iwn_pan_slot {=0A= + uint16_t time;=0A= + uint8_t type;=0A= + uint8_t reserved;=0A= +} __packed;=0A= +=0A= +struct iwn_pan_params_cmd {=0A= + uint16_t flags;=0A= +#define IWN_PAN_PARAMS_FLG_SLOTTED_MODE (1 << 3)=0A= +=0A= + uint8_t reserved;=0A= + uint8_t num_slots;=0A= + struct iwn_pan_slot slots[10];=0A= +} __packed;=0A= +=0A= +struct iwn_led_mode=0A= +{=0A= + uint8_t led_cur_mode;=0A= + uint64_t led_cur_bt;=0A= + uint64_t led_last_bt;=0A= + uint64_t led_cur_tpt;=0A= + uint64_t led_last_tpt;=0A= + uint64_t led_bt_diff;=0A= + int led_cur_time;=0A= + int led_last_time;=0A= +};=0A= +=0A= struct iwn_rx_radiotap_header {=0A= struct ieee80211_radiotap_header wr_ihdr;=0A= uint64_t wr_tsft;=0A= @@ -191,6 +225,10 @@=0A= =0A= int (*iv_newstate)(struct ieee80211vap *,=0A= enum ieee80211_state, int);=0A= + int ctx;=0A= + int beacon_int;=0A= + uint8_t macaddr[IEEE80211_ADDR_LEN];=0A= +=0A= };=0A= #define IWN_VAP(_vap) ((struct iwn_vap *)(_vap))=0A= =0A= @@ -210,8 +248,11 @@=0A= #define IWN_FLAG_HAS_11N (1 << 6)=0A= #define IWN_FLAG_ENH_SENS (1 << 7)=0A= #define IWN_FLAG_ADV_BTCOEX (1 << 8)=0A= +#define IWN_FLAG_PAN_SUPPORT (1 << 9)=0A= =0A= uint8_t hw_type;=0A= + /* subdevice_id used to adjust configuration */=0A= + uint16_t subdevice_id;=0A= =0A= struct iwn_ops ops;=0A= const char *fwname;=0A= @@ -272,7 +313,7 @@=0A= int calib_cnt;=0A= struct iwn_calib_state calib;=0A= struct callout watchdog_to;=0A= -=0A= + struct callout ct_kill_exit_to;=0A= struct iwn_fw_info fw;=0A= struct iwn_calib_info calibcmd[5];=0A= uint32_t errptr;=0A= @@ -280,7 +321,12 @@=0A= struct iwn_rx_stat last_rx_stat;=0A= int last_rx_valid;=0A= struct iwn_ucode_info ucode_info;=0A= - struct iwn_rxon rxon;=0A= + struct iwn_rxon rx_on[IWN_NUM_RXON_CTX];=0A= + struct iwn_rxon *rxon;=0A= + int ctx;=0A= + struct ieee80211vap *ivap[IWN_NUM_RXON_CTX];=0A= +=0A= + uint8_t uc_scan_progress;=0A= uint32_t rawtemp;=0A= int temp;=0A= int noise;=0A= @@ -295,11 +341,14 @@=0A= char eeprom_domain[4];=0A= uint32_t eeprom_crystal;=0A= int16_t eeprom_temp;=0A= + int16_t eeprom_temp_high;=0A= int16_t eeprom_voltage;=0A= int8_t maxpwr2GHz;=0A= int8_t maxpwr5GHz;=0A= int8_t maxpwr[IEEE80211_CHAN_MAX];=0A= =0A= + uint32_t tlv_feature_flags;=0A= +=0A= int32_t temp_off;=0A= uint32_t int_mask;=0A= uint8_t ntxchains;=0A= @@ -309,6 +358,7 @@=0A= uint8_t chainmask;=0A= =0A= int sc_tx_timer;=0A= + int sc_scan_timer;=0A= =0A= struct ieee80211_tx_ampdu *qid2tap[IWN5000_NTXQUEUES];=0A= =0A= @@ -323,9 +373,21 @@=0A= void (*sc_addba_stop)(struct ieee80211_node *,=0A= struct ieee80211_tx_ampdu *);=0A= =0A= + struct iwn_led_mode sc_led;=0A= =0A= struct iwn_rx_radiotap_header sc_rxtap;=0A= struct iwn_tx_radiotap_header sc_txtap;=0A= +=0A= + /* The power save level originally configured by user */=0A= + int desired_pwrsave_level;=0A= +=0A= + /* The current power save level, this may differ from the configured = value due to=0A= + * thermal throttling etc.=0A= + * */=0A= + int current_pwrsave_level;=0A= +=0A= + /* For specifique params */=0A= + struct iwn_base_params *base_params;=0A= };=0A= =0A= #define IWN_LOCK_INIT(_sc) \=0A= ------=_NextPart_000_002E_01CE9211.4C3A6DC0-- From owner-freebsd-wireless@FreeBSD.ORG Mon Aug 5 18:19:25 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 74262237 for ; Mon, 5 Aug 2013 18:19:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0D1EB2E1B for ; Mon, 5 Aug 2013 18:19:24 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id j17so1854516wiw.11 for ; Mon, 05 Aug 2013 11:19:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=5gFWFn28hwHdvdr+hVy3pPSb2OvMbkhyP1kqQe3BWxg=; b=dwzYNeP4RNZ6MHkzTbyYvT3kmQiTgnKC4lvqtByKtWuaEo/0jgyYEzruFGRVFii/VR z3DasGEE6kDwI/+l0c1HjIqKLzSjex3NfjkHkhwP9LhfuQ5eYIBSVbzTlREquk6xUO4Q /WjE7jfAq5LzzjBmswDqJsFbQItBAmczceaPJNRsS065Ki384KYoloF4hpp9VGXFgo1J xQq8KtYS87Rn4FZ4ho0cFdYOw6DsPl/SLUntfQVvJpB2SIz/G8b4TG1RTk8kRiUB2wna H/u9zapAg6ylkGHvr8ffzRihniNQkn6FAAgzhKD102W/V9vISjGtojxjDsBydP4/uK7c 0wwQ== MIME-Version: 1.0 X-Received: by 10.180.14.105 with SMTP id o9mr7649402wic.30.1375726763391; Mon, 05 Aug 2013 11:19:23 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Mon, 5 Aug 2013 11:19:23 -0700 (PDT) In-Reply-To: <002d01ce9200$88b19dc0$9a14d940$@info> References: <002d01ce9200$88b19dc0$9a14d940$@info> Date: Mon, 5 Aug 2013 11:19:23 -0700 X-Google-Sender-Auth: IxX4nXPbScrWnmx1OIPE4iIkYQA Message-ID: Subject: Re: [iwn] Review split 5 From: Adrian Chadd To: Cedric GROSS Content-Type: text/plain; charset=ISO-8859-1 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: Mon, 05 Aug 2013 18:19:25 -0000 .. so what's this PAN context stuff? -adrian On 5 August 2013 10:23, Cedric GROSS wrote: > Hello, > > > > Here is another split. > > > > This one update if_iwnvar.h with new structure for later but also modify > iwn_softc for context selection. > > Context will be used later when PAN context will be set in next diff. > > > > uCode TLV detection has been updated also. > > > > Cedric > > > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Mon Aug 5 23:32:17 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 73116E59; Mon, 5 Aug 2013 23:32:17 +0000 (UTC) (envelope-from cg@cgross.info) Received: from alpha.kreiz-it.fr (alpha.kreiz-it.fr [178.32.219.166]) by mx1.freebsd.org (Postfix) with ESMTP id 3CD9A2DBC; Mon, 5 Aug 2013 23:32:16 +0000 (UTC) Received: from DirTech (lnr56-1-82-246-51-185.fbx.proxad.net [82.246.51.185]) by alpha.kreiz-it.fr (Postfix) with ESMTPSA id 1D22381B; Tue, 6 Aug 2013 01:32:09 +0200 (CEST) From: "Cedric GROSS" To: "'Adrian Chadd'" References: <002d01ce9200$88b19dc0$9a14d940$@info> In-Reply-To: Subject: RE: [iwn] Review split 5 Date: Tue, 6 Aug 2013 01:32:06 +0200 Message-ID: <000601ce9234$010f07c0$032d1740$@info> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac6SCFOVl1DcdAWBRWyCukEsCwf6CQAKxOvg Content-Language: fr 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: Mon, 05 Aug 2013 23:32:17 -0000 I haven't investigate a lot but it's seems it's requirement for HOSTAP = and WiFi direct (P2P) > -----Message d'origine----- > De=A0: adrian.chadd@gmail.com [mailto:adrian.chadd@gmail.com] De la = part > de Adrian Chadd > Envoy=E9=A0: lundi 5 ao=FBt 2013 20:19 > =C0=A0: Cedric GROSS > Cc=A0: freebsd-wireless@freebsd.org > Objet=A0: Re: [iwn] Review split 5 >=20 > .. so what's this PAN context stuff? >=20 >=20 >=20 > -adrian >=20 > On 5 August 2013 10:23, Cedric GROSS wrote: > > Hello, > > > > > > > > Here is another split. > > > > > > > > This one update if_iwnvar.h with new structure for later but also > > modify iwn_softc for context selection. > > > > Context will be used later when PAN context will be set in next = diff. > > > > > > > > uCode TLV detection has been updated also. > > > > > > > > Cedric > > > > > > _______________________________________________ > > freebsd-wireless@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > > To unsubscribe, send any mail to "freebsd-wireless- > unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Tue Aug 6 14:56:32 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 85F4B8C6; Tue, 6 Aug 2013 14:56:32 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-ob0-x234.google.com (mail-ob0-x234.google.com [IPv6:2607:f8b0:4003:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 29B2A22D1; Tue, 6 Aug 2013 14:56:29 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id up14so1053652obb.39 for ; Tue, 06 Aug 2013 07:56:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type; bh=yU0fGDPPLy0tXl9dYBvITDie3N/tmZ7tRPSrJEM60H4=; b=eoaXcZFAPbuUq36Wh/j+Yt8IMhI8wHQF/IyQAnvWQ6Hj6eGWbdOrLg1j3XMJ5Sp9dv Y+liSG7ncAlzQUwQOYCfDl4J73drdDp6ihHYG16Vif+sXYCKX+XTnPaed073gj9X3q4p irQXL9nWoj/Xw6cAkEQ1exg22UnLLNSs5/nKRPmz56OZPFe4BymEDjSPi4Xh53hoWf4Z eTvj3YIoLCANT/uP9ZrTGDGqHhclw7Uu1L+Q0co2clcIjee7D3kYYzG+qTysmrai6owA xLiypQz/OGJ1la0V3Byqpx113K8JwNbVWFMKV8sVn5le0W4sZtXZTm0qInSP7l4TWgvF lT5w== MIME-Version: 1.0 X-Received: by 10.60.131.232 with SMTP id op8mr1290188oeb.75.1375800988263; Tue, 06 Aug 2013 07:56:28 -0700 (PDT) Received: by 10.182.128.36 with HTTP; Tue, 6 Aug 2013 07:56:28 -0700 (PDT) Date: Tue, 6 Aug 2013 16:56:28 +0200 Message-ID: Subject: wireless networking probelm with WEP From: Oliver Pinter To: freebsd-wireless@freebsd.org, stable@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Cc: adrien@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: Tue, 06 Aug 2013 14:56:32 -0000 Hi All! I run in to problem, what described in some more place: http://149.20.54.209/showthread.php?t=39724 . The concrete problem is: when I use FreeBSD with WEP, there are no RX traffic received. So, when I probed a DHCP request, then here are no response from DHCP server. The OS is: FreeBSD 9.2-BETA2 (freebsd-stable). From owner-freebsd-wireless@FreeBSD.ORG Wed Aug 7 02:53:11 2013 Return-Path: Delivered-To: freebsd-wireless@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id CA4E9DEB; Wed, 7 Aug 2013 02:53:11 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9F0542091; Wed, 7 Aug 2013 02:53:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r772rBk5040156; Wed, 7 Aug 2013 02:53:11 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r772rB9U040155; Wed, 7 Aug 2013 02:53:11 GMT (envelope-from linimon) Date: Wed, 7 Aug 2013 02:53:11 GMT Message-Id: <201308070253.r772rB9U040155@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-wireless@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: kern/181100: [bwi] Turning up bwi0 crashes / deadlocks the kernel 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: Wed, 07 Aug 2013 02:53:11 -0000 Old Synopsis: Turning up bwi0 crashes / deadlocks the kernel New Synopsis: [bwi] Turning up bwi0 crashes / deadlocks the kernel Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless Responsible-Changed-By: linimon Responsible-Changed-When: Wed Aug 7 02:52:45 UTC 2013 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=181100 From owner-freebsd-wireless@FreeBSD.ORG Wed Aug 7 10:52:41 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1A49F5CF; Wed, 7 Aug 2013 10:52:41 +0000 (UTC) (envelope-from cg@cgross.info) Received: from alpha.kreiz-it.fr (alpha.kreiz-it.fr [IPv6:2001:41d0:8:dda6::1]) by mx1.freebsd.org (Postfix) with ESMTP id D65982050; Wed, 7 Aug 2013 10:52:40 +0000 (UTC) Received: from DirTech (lnr56-1-82-246-51-185.fbx.proxad.net [82.246.51.185]) by alpha.kreiz-it.fr (Postfix) with ESMTPSA id 02C4BA81; Wed, 7 Aug 2013 12:52:38 +0200 (CEST) From: "Cedric GROSS" To: "'Oliver Pinter'" References: In-Reply-To: Subject: RE: wireless networking probelm with WEP Date: Wed, 7 Aug 2013 12:52:34 +0200 Message-ID: <002701ce935c$3b087f50$b1197df0$@info> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac6StTLWKY9fxSKDTIaIjE4H5xptrwApmpZA Content-Language: fr Cc: stable@freebsd.org, 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: Wed, 07 Aug 2013 10:52:41 -0000 > De=A0: owner-freebsd-wireless@freebsd.org [mailto:owner-freebsd- > wireless@freebsd.org] De la part de Oliver Pinter > Envoy=E9=A0: mardi 6 ao=FBt 2013 16:56 > =C0=A0: freebsd-wireless@freebsd.org; stable@freebsd.org > Cc=A0: adrien@freebsd.org > Objet=A0: wireless networking probelm with WEP >=20 > Hi All! Hello Oliver, >=20 > I run in to problem, what described in some more place: > http://149.20.54.209/showthread.php?t=3D39724 . >=20 > The concrete problem is: when I use FreeBSD with WEP, there are no RX > traffic received. Why using WEP ? It's a security hole. How is the network configured ? At boot time or by hand ? > So, when I probed a DHCP request, then here are no response from DHCP > server. >=20 > The OS is: FreeBSD 9.2-BETA2 (freebsd-stable). > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless- > unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Wed Aug 7 12:45:05 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 449C262E; Wed, 7 Aug 2013 12:45:05 +0000 (UTC) (envelope-from oliver.pntr@gmail.com) Received: from mail-ob0-x22d.google.com (mail-ob0-x22d.google.com [IPv6:2607:f8b0:4003:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 047CC2912; Wed, 7 Aug 2013 12:45:04 +0000 (UTC) Received: by mail-ob0-f173.google.com with SMTP id ta17so3526616obb.4 for ; Wed, 07 Aug 2013 05:45:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=T5CKuxLOjbXYvJ0wwLrzNMQXt8dPPWtq514B4SJHkT8=; b=xw7m4qxu2JmTLNpBSxpCLJwaXra/jBXRXQzc3pt2VUU911eCykQiagg9SmKXfkKZAZ 00lfF0N0UKfbqqZHFaoyNWnCbFB2BwCwfCiIdp7pLAWWK39xfUbCPDBErlAi204Y48pR 7FxeS3inf5owua8u9OonvFNiuLzrjdtHEALCiA9VvEQPIfBg0NEK+lwKbR4uwRQNXIB6 GUtkkSRyRD9gLWT7ZNNbZS/lYGz6rAi1pCcN6FvBrKEjy8sPvcWzUAo5uPKaAWM9eQBr K3E+Dj862OlsF4rwvnqV4cKdAavBkVVm+CgTk6zk0myw2uvuYh6SFVLlfkfCGAPqvuYJ Oeew== MIME-Version: 1.0 X-Received: by 10.60.52.244 with SMTP id w20mr347037oeo.30.1375879504093; Wed, 07 Aug 2013 05:45:04 -0700 (PDT) Received: by 10.182.128.36 with HTTP; Wed, 7 Aug 2013 05:45:04 -0700 (PDT) In-Reply-To: <002701ce935c$3b087f50$b1197df0$@info> References: <002701ce935c$3b087f50$b1197df0$@info> Date: Wed, 7 Aug 2013 14:45:04 +0200 Message-ID: Subject: Re: wireless networking probelm with WEP From: Oliver Pinter To: Cedric GROSS Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: stable@freebsd.org, 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: Wed, 07 Aug 2013 12:45:05 -0000 On 8/7/13, Cedric GROSS wrote: >> De : owner-freebsd-wireless@freebsd.org [mailto:owner-freebsd- >> wireless@freebsd.org] De la part de Oliver Pinter >> Envoy=E9 : mardi 6 ao=FBt 2013 16:56 >> =C0 : freebsd-wireless@freebsd.org; stable@freebsd.org >> Cc : adrien@freebsd.org >> Objet : wireless networking probelm with WEP >> >> Hi All! > > > Hello Oliver, > >> >> I run in to problem, what described in some more place: >> http://149.20.54.209/showthread.php?t=3D39724 . >> >> The concrete problem is: when I use FreeBSD with WEP, there are no RX >> traffic received. > > Why using WEP ? It's a security hole. Because there is no other. > > How is the network configured ? At boot time or by hand ? Both. And now I try to debug, why not work... So I'm now deep in the kernel source. > > >> So, when I probed a DHCP request, then here are no response from DHCP >> server. >> >> The OS is: FreeBSD 9.2-BETA2 (freebsd-stable). >> _______________________________________________ >> freebsd-wireless@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-wireless >> To unsubscribe, send any mail to "freebsd-wireless- >> unsubscribe@freebsd.org" > > From owner-freebsd-wireless@FreeBSD.ORG Thu Aug 8 05:14:25 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 960F5DD9 for ; Thu, 8 Aug 2013 05:14:25 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x232.google.com (mail-wi0-x232.google.com [IPv6:2a00:1450:400c:c05::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2E7112537 for ; Thu, 8 Aug 2013 05:14:25 +0000 (UTC) Received: by mail-wi0-f178.google.com with SMTP id j17so172148wiw.11 for ; Wed, 07 Aug 2013 22:14:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=cXNYHtYx9In9zUQFZadQnd0ZpsKLX9MkJEqxllMxpn0=; b=QnLApz4TNgcYphrgB9rmqoVLctRImxweMSzKu8/RBMtPTX6a84GCJLy35I990InxHC j/A6Jk1pFTBHh/uePnQMNNHWiLjTyNCaUFOOWARhh7UD4DnPq3Oejw537f9CzN1NOSF+ 7wPGlN5tCaQXZ/h6Ta+V5wKfotM4dxbfghuqdHhKQ/TuUDk2nR3iNSoHVMeslvN+9iC3 iJRYLuAsfVTv0wm20bJ202Gdh0+5isKIbg/O22eFzBJEvqzDUVX8+COxVz8Bq01XWlTC VdOncLnfd3N25ZWEYlvu0G2dwIzPcnarPT6xCs4A9VfU/lJBSh8yFJFB1wCA4B27DGNy VMtg== MIME-Version: 1.0 X-Received: by 10.194.201.202 with SMTP id kc10mr2410559wjc.1.1375938863291; Wed, 07 Aug 2013 22:14:23 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Wed, 7 Aug 2013 22:14:23 -0700 (PDT) In-Reply-To: <000601ce9234$010f07c0$032d1740$@info> References: <002d01ce9200$88b19dc0$9a14d940$@info> <000601ce9234$010f07c0$032d1740$@info> Date: Wed, 7 Aug 2013 22:14:23 -0700 X-Google-Sender-Auth: _z7469Uv3IY21xNP5XLCNIgW6aU Message-ID: Subject: Re: [iwn] Review split 5 From: Adrian Chadd To: Cedric GROSS Content-Type: text/plain; charset=ISO-8859-1 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: Thu, 08 Aug 2013 05:14:25 -0000 Hiya! So, you removed sc->broadcast_id and replaced it with IWN5000_BROADCAST_ID. You need to undo that and go back to using sc->broadcast_id; the broadcast id is different between the 4965 and 5000 (and later, I bet.) So please go and fix that! Thanks, -adrian (I'm going to spin up a 4965 now just to check how -HEAD works.) From owner-freebsd-wireless@FreeBSD.ORG Thu Aug 8 05:51:13 2013 Return-Path: Delivered-To: freebsd-wireless@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 231797C3; Thu, 8 Aug 2013 05:51:13 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EC4C82758; Thu, 8 Aug 2013 05:51:12 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r785pCQS081217; Thu, 8 Aug 2013 05:51:12 GMT (envelope-from adrian@freefall.freebsd.org) Received: (from adrian@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r785pCmr081216; Thu, 8 Aug 2013 05:51:12 GMT (envelope-from adrian) Date: Thu, 8 Aug 2013 05:51:12 GMT Message-Id: <201308080551.r785pCmr081216@freefall.freebsd.org> To: adrian@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-wireless@FreeBSD.org From: adrian@FreeBSD.org Subject: Re: kern/181132: [iwn] stream calculation is wrong for the Intel 4965 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: Thu, 08 Aug 2013 05:51:13 -0000 Synopsis: [iwn] stream calculation is wrong for the Intel 4965 Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless Responsible-Changed-By: adrian Responsible-Changed-When: Thu Aug 8 05:51:05 UTC 2013 Responsible-Changed-Why: Changing to owner http://www.freebsd.org/cgi/query-pr.cgi?pr=181132 From owner-freebsd-wireless@FreeBSD.ORG Thu Aug 8 06:00:01 2013 Return-Path: Delivered-To: freebsd-wireless@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 906D0ACC for ; Thu, 8 Aug 2013 06:00:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7E8EC27AC for ; Thu, 8 Aug 2013 06:00:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r78601DX081471 for ; Thu, 8 Aug 2013 06:00:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r78601dY081470; Thu, 8 Aug 2013 06:00:01 GMT (envelope-from gnats) Date: Thu, 8 Aug 2013 06:00:01 GMT Message-Id: <201308080600.r78601dY081470@freefall.freebsd.org> To: freebsd-wireless@FreeBSD.org Cc: From: dfilter@FreeBSD.ORG (dfilter service) Subject: Re: kern/181132: commit references a PR X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: dfilter service 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: Thu, 08 Aug 2013 06:00:01 -0000 The following reply was made to PR kern/181132; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: kern/181132: commit references a PR Date: Thu, 8 Aug 2013 05:52:54 +0000 (UTC) Author: adrian Date: Thu Aug 8 05:52:41 2013 New Revision: 254085 URL: http://svnweb.freebsd.org/changeset/base/254085 Log: Cap the number of streams supported to two for now. I haven't yet reviewed the Intel driver(s) in more depth to see if there are 1x1 NICs that report they support 2 transmit/receive chains.. if so then we'll have to update this. Tested: * Intel 4965, which is a 2x2 device with 3 RX and 2 TX chains. PR: kern/181132 Modified: head/sys/dev/iwn/if_iwn.c Modified: head/sys/dev/iwn/if_iwn.c ============================================================================== --- head/sys/dev/iwn/if_iwn.c Thu Aug 8 05:41:55 2013 (r254084) +++ head/sys/dev/iwn/if_iwn.c Thu Aug 8 05:52:41 2013 (r254085) @@ -638,6 +638,20 @@ iwn_attach(device_t dev) if (sc->sc_flags & IWN_FLAG_HAS_11N) { ic->ic_rxstream = sc->nrxchains; ic->ic_txstream = sc->ntxchains; + + /* + * The NICs we currently support cap out at 2x2 support + * separate from the chains being used. + * + * This is a total hack to work around that until some + * per-device method is implemented to return the + * actual stream support. + */ + if (ic->ic_rxstream > 2) + ic->ic_rxstream = 2; + if (ic->ic_txstream > 2) + ic->ic_txstream = 2; + ic->ic_htcaps = IEEE80211_HTCAP_SMPS_OFF /* SMPS mode disabled */ | IEEE80211_HTCAP_SHORTGI20 /* short GI in 20MHz */ _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Thu Aug 8 10:43:18 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BD7E7D3F; Thu, 8 Aug 2013 10:43:18 +0000 (UTC) (envelope-from cg@cgross.info) Received: from alpha.kreiz-it.fr (alpha.kreiz-it.fr [IPv6:2001:41d0:8:dda6::1]) by mx1.freebsd.org (Postfix) with ESMTP id 06BB2273D; Thu, 8 Aug 2013 10:43:18 +0000 (UTC) Received: from DirTech (lnr56-1-82-246-51-185.fbx.proxad.net [82.246.51.185]) by alpha.kreiz-it.fr (Postfix) with ESMTPSA id 1A608C92; Thu, 8 Aug 2013 12:43:15 +0200 (CEST) From: "Cedric GROSS" To: "'Adrian Chadd'" References: <002d01ce9200$88b19dc0$9a14d940$@info> <000601ce9234$010f07c0$032d1740$@info> In-Reply-To: Subject: RE: [iwn] Review split 5 Date: Thu, 8 Aug 2013 12:43:11 +0200 Message-ID: <004801ce9424$15c88780$41599680$@info> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0049_01CE9434.D9515780" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac6T9ikIDLRopjqPSaKrx4jQPIEBqQALcIpA Content-Language: fr 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: Thu, 08 Aug 2013 10:43:18 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0049_01CE9434.D9515780 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable > -----Message d'origine----- > De=A0: adrian.chadd@gmail.com [mailto:adrian.chadd@gmail.com] De la = part > de Adrian Chadd > Envoy=E9=A0: jeudi 8 ao=FBt 2013 07:14 > =C0=A0: Cedric GROSS > Cc=A0: freebsd-wireless@freebsd.org > Objet=A0: Re: [iwn] Review split 5 >=20 > Hiya! >=20 > So, you removed sc->broadcast_id and replaced it with > IWN5000_BROADCAST_ID. You need to undo that and go back to using > sc->broadcast_id; the broadcast id is different between the 4965 and > 5000 (and later, I bet.) Oh.. Year, of course. >=20 > So please go and fix that! Done. >=20 > Thanks, >=20 >=20 >=20 > -adrian >=20 > (I'm going to spin up a 4965 now just to check how -HEAD works.) ------=_NextPart_000_0049_01CE9434.D9515780 Content-Type: application/octet-stream; name="context.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="context.patch" Index: sys/dev/iwn/if_iwn.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= --- sys/dev/iwn/if_iwn.c (revision 254091)=0A= +++ sys/dev/iwn/if_iwn.c (working copy)=0A= @@ -1,4 +1,6 @@=0A= /*-=0A= + * Copyright (c) 2013 Cedric GROSS =0A= + * Copyright (c) 2011 Intel Corporation=0A= * Copyright (c) 2007-2009=0A= * Damien Bergamini =0A= * Copyright (c) 2008=0A= @@ -521,6 +523,7 @@=0A= /* Read hardware revision and attach. */=0A= sc->hw_type =3D (IWN_READ(sc, IWN_HW_REV) >> IWN_HW_REV_TYPE_SHIFT)=0A= & IWN_HW_REV_TYPE_MASK;=0A= + sc->subdevice_id=3Dpci_get_subdevice(dev);=0A= if (sc->hw_type =3D=3D IWN_HW_REV_TYPE_4965)=0A= error =3D iwn4965_attach(sc, pci_get_device(dev));=0A= else=0A= @@ -908,19 +911,27 @@=0A= {=0A= struct iwn_vap *ivp;=0A= struct ieee80211vap *vap;=0A= + uint8_t mac1[IEEE80211_ADDR_LEN];=0A= + struct iwn_softc *sc =3D ic->ic_ifp->if_softc;=0A= =0A= if (!TAILQ_EMPTY(&ic->ic_vaps)) /* only one at a time */=0A= return NULL;=0A= +=0A= + IEEE80211_ADDR_COPY(mac1, mac);=0A= +=0A= ivp =3D (struct iwn_vap *) malloc(sizeof(struct iwn_vap),=0A= M_80211_VAP, M_NOWAIT | M_ZERO);=0A= if (ivp =3D=3D NULL)=0A= return NULL;=0A= vap =3D &ivp->iv_vap;=0A= - ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac);=0A= + ieee80211_vap_setup(ic, vap, name, unit, opmode, flags, bssid, mac1);=0A= + ivp->ctx =3D IWN_RXON_BSS_CTX;=0A= + IEEE80211_ADDR_COPY(ivp->macaddr, mac1);=0A= vap->iv_bmissthreshold =3D 10; /* override default */=0A= /* Override with driver methods. */=0A= ivp->iv_newstate =3D vap->iv_newstate;=0A= vap->iv_newstate =3D iwn_newstate;=0A= + sc->ivap[IWN_RXON_BSS_CTX] =3D vap;=0A= =0A= ieee80211_ratectl_init(vap);=0A= /* Complete setup. */=0A= @@ -2339,6 +2350,8 @@=0A= IWN_LOCK(sc);=0A= callout_stop(&sc->calib_to);=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= +=0A= switch (nstate) {=0A= case IEEE80211_S_ASSOC:=0A= if (vap->iv_state !=3D IEEE80211_S_RUN)=0A= @@ -2352,8 +2365,8 @@=0A= * !AUTH -> AUTH transition requires state reset to handle=0A= * reassociations correctly.=0A= */=0A= - sc->rxon.associd =3D 0;=0A= - sc->rxon.filter &=3D ~htole32(IWN_FILTER_BSS);=0A= + sc->rxon->associd =3D 0;=0A= + sc->rxon->filter &=3D ~htole32(IWN_FILTER_BSS);=0A= sc->calib.state =3D IWN_CALIB_STATE_INIT;=0A= =0A= if ((error =3D iwn_auth(sc, vap)) !=3D 0) {=0A= @@ -4367,6 +4380,8 @@=0A= =0A= DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__);=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= +=0A= memset(&node, 0, sizeof node);=0A= IEEE80211_ADDR_COPY(node.macaddr, ifp->if_broadcastaddr);=0A= node.id =3D sc->broadcast_id;=0A= @@ -4550,8 +4565,9 @@=0A= int i, c, grp, maxpwr;=0A= uint8_t chan;=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= /* Retrieve current channel from last RXON. */=0A= - chan =3D sc->rxon.chan;=0A= + chan =3D sc->rxon->chan;=0A= DPRINTF(sc, IWN_DEBUG_RESET, "setting TX power for channel %d\n",=0A= chan);=0A= =0A= @@ -4910,8 +4926,8 @@=0A= =0A= #ifdef notyet=0A= /* XXX Disable RX chains with no antennas connected. */=0A= - sc->rxon.rxchain =3D htole16(IWN_RXCHAIN_SEL(sc->chainmask));=0A= - (void)iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 1);=0A= + sc->rxon->rxchain =3D htole16(IWN_RXCHAIN_SEL(sc->chainmask));=0A= + (void)iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 1);=0A= #endif=0A= =0A= /* Enable power-saving mode if requested by user. */=0A= @@ -5440,21 +5456,22 @@=0A= }=0A= =0A= /* Set mode, channel, RX filter and enable RX. */=0A= - memset(&sc->rxon, 0, sizeof (struct iwn_rxon));=0A= - IEEE80211_ADDR_COPY(sc->rxon.myaddr, IF_LLADDR(ifp));=0A= - IEEE80211_ADDR_COPY(sc->rxon.wlap, IF_LLADDR(ifp));=0A= - sc->rxon.chan =3D ieee80211_chan2ieee(ic, ic->ic_curchan);=0A= - sc->rxon.flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= + memset(sc->rxon, 0, sizeof (struct iwn_rxon));=0A= + IEEE80211_ADDR_COPY(sc->rxon->myaddr, IF_LLADDR(ifp));=0A= + IEEE80211_ADDR_COPY(sc->rxon->wlap, IF_LLADDR(ifp));=0A= + sc->rxon->chan =3D ieee80211_chan2ieee(ic, ic->ic_curchan);=0A= + sc->rxon->flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= if (IEEE80211_IS_CHAN_2GHZ(ic->ic_curchan))=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= switch (ic->ic_opmode) {=0A= case IEEE80211_M_STA:=0A= - sc->rxon.mode =3D IWN_MODE_STA;=0A= - sc->rxon.filter =3D htole32(IWN_FILTER_MULTICAST);=0A= + sc->rxon->mode =3D IWN_MODE_STA;=0A= + sc->rxon->filter =3D htole32(IWN_FILTER_MULTICAST);=0A= break;=0A= case IEEE80211_M_MONITOR:=0A= - sc->rxon.mode =3D IWN_MODE_MONITOR;=0A= - sc->rxon.filter =3D htole32(IWN_FILTER_MULTICAST |=0A= + sc->rxon->mode =3D IWN_MODE_MONITOR;=0A= + sc->rxon->filter =3D htole32(IWN_FILTER_MULTICAST |=0A= IWN_FILTER_CTL | IWN_FILTER_PROMISC);=0A= break;=0A= default:=0A= @@ -5461,18 +5478,18 @@=0A= /* Should not get there. */=0A= break;=0A= }=0A= - sc->rxon.cck_mask =3D 0x0f; /* not yet negotiated */=0A= - sc->rxon.ofdm_mask =3D 0xff; /* not yet negotiated */=0A= - sc->rxon.ht_single_mask =3D 0xff;=0A= - sc->rxon.ht_dual_mask =3D 0xff;=0A= - sc->rxon.ht_triple_mask =3D 0xff;=0A= + sc->rxon->cck_mask =3D 0x0f; /* not yet negotiated */=0A= + sc->rxon->ofdm_mask =3D 0xff; /* not yet negotiated */=0A= + sc->rxon->ht_single_mask =3D 0xff;=0A= + sc->rxon->ht_dual_mask =3D 0xff;=0A= + sc->rxon->ht_triple_mask =3D 0xff;=0A= rxchain =3D=0A= IWN_RXCHAIN_VALID(sc->rxchainmask) |=0A= IWN_RXCHAIN_MIMO_COUNT(2) |=0A= IWN_RXCHAIN_IDLE_COUNT(2);=0A= - sc->rxon.rxchain =3D htole16(rxchain);=0A= + sc->rxon->rxchain =3D htole16(rxchain);=0A= DPRINTF(sc, IWN_DEBUG_RESET, "%s: setting configuration\n", __func__);=0A= - error =3D iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 0);=0A= + error =3D iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 0);=0A= if (error !=3D 0) {=0A= device_printf(sc->sc_dev, "%s: RXON command failed\n",=0A= __func__);=0A= @@ -5543,6 +5560,7 @@=0A= =0A= DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__);=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= buf =3D malloc(IWN_SCAN_MAXSZ, M_DEVBUF, M_NOWAIT | M_ZERO);=0A= if (buf =3D=3D NULL) {=0A= device_printf(sc->sc_dev,=0A= @@ -5584,7 +5602,7 @@=0A= } else {=0A= hdr->flags =3D htole32(IWN_RXON_24GHZ | IWN_RXON_AUTO);=0A= if (sc->hw_type =3D=3D IWN_HW_REV_TYPE_4965 &&=0A= - sc->rxon.associd && sc->rxon.chan > 14)=0A= + sc->rxon->associd && sc->rxon->chan > 14)=0A= tx->rate =3D htole32(0xd);=0A= else {=0A= /* Send probe requests at 1Mbps. */=0A= @@ -5643,7 +5661,7 @@=0A= } else if (IEEE80211_IS_CHAN_5GHZ(c)) {=0A= chan->rf_gain =3D 0x3b;=0A= chan->active =3D htole16(24);=0A= - if (sc->rxon.associd)=0A= + if (sc->rxon->associd)=0A= chan->passive =3D htole16(78);=0A= else=0A= chan->passive =3D htole16(110);=0A= @@ -5656,7 +5674,7 @@=0A= } else {=0A= chan->rf_gain =3D 0x28;=0A= chan->active =3D htole16(36);=0A= - if (sc->rxon.associd)=0A= + if (sc->rxon->associd)=0A= chan->passive =3D htole16(88);=0A= else=0A= chan->passive =3D htole16(120);=0A= @@ -5695,31 +5713,32 @@=0A= =0A= DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__);=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= /* Update adapter configuration. */=0A= - IEEE80211_ADDR_COPY(sc->rxon.bssid, ni->ni_bssid);=0A= - sc->rxon.chan =3D ieee80211_chan2ieee(ic, ni->ni_chan);=0A= - sc->rxon.flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= + IEEE80211_ADDR_COPY(sc->rxon->bssid, ni->ni_bssid);=0A= + sc->rxon->chan =3D ieee80211_chan2ieee(ic, ni->ni_chan);=0A= + sc->rxon->flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= if (ic->ic_flags & IEEE80211_F_SHSLOT)=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_SHSLOT);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_SHSLOT);=0A= if (ic->ic_flags & IEEE80211_F_SHPREAMBLE)=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_SHPREAMBLE);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_SHPREAMBLE);=0A= if (IEEE80211_IS_CHAN_A(ni->ni_chan)) {=0A= - sc->rxon.cck_mask =3D 0;=0A= - sc->rxon.ofdm_mask =3D 0x15;=0A= + sc->rxon->cck_mask =3D 0;=0A= + sc->rxon->ofdm_mask =3D 0x15;=0A= } else if (IEEE80211_IS_CHAN_B(ni->ni_chan)) {=0A= - sc->rxon.cck_mask =3D 0x03;=0A= - sc->rxon.ofdm_mask =3D 0;=0A= + sc->rxon->cck_mask =3D 0x03;=0A= + sc->rxon->ofdm_mask =3D 0;=0A= } else {=0A= /* Assume 802.11b/g. */=0A= - sc->rxon.cck_mask =3D 0x0f;=0A= - sc->rxon.ofdm_mask =3D 0x15;=0A= + sc->rxon->cck_mask =3D 0x0f;=0A= + sc->rxon->ofdm_mask =3D 0x15;=0A= }=0A= DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x cck %x ofdm %x\n",=0A= - sc->rxon.chan, sc->rxon.flags, sc->rxon.cck_mask,=0A= - sc->rxon.ofdm_mask);=0A= - error =3D iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 1);=0A= + sc->rxon->chan, sc->rxon->flags, sc->rxon->cck_mask,=0A= + sc->rxon->ofdm_mask);=0A= + error =3D iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 1);=0A= if (error !=3D 0) {=0A= device_printf(sc->sc_dev, "%s: RXON command failed, error %d\n",=0A= __func__, error);=0A= @@ -5761,6 +5780,7 @@=0A= =0A= DPRINTF(sc, IWN_DEBUG_TRACE, "->%s begin\n", __func__);=0A= =0A= + sc->rxon =3D &sc->rx_on[IWN_RXON_BSS_CTX];=0A= if (ic->ic_opmode =3D=3D IEEE80211_M_MONITOR) {=0A= /* Link LED blinks while monitoring. */=0A= iwn_set_led(sc, IWN_LED_LINK, 5, 5);=0A= @@ -5773,26 +5793,26 @@=0A= }=0A= =0A= /* Update adapter configuration. */=0A= - IEEE80211_ADDR_COPY(sc->rxon.bssid, ni->ni_bssid);=0A= - sc->rxon.associd =3D htole16(IEEE80211_AID(ni->ni_associd));=0A= - sc->rxon.chan =3D ieee80211_chan2ieee(ic, ni->ni_chan);=0A= - sc->rxon.flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= + IEEE80211_ADDR_COPY(sc->rxon->bssid, ni->ni_bssid);=0A= + sc->rxon->associd =3D htole16(IEEE80211_AID(ni->ni_associd));=0A= + sc->rxon->chan =3D ieee80211_chan2ieee(ic, ni->ni_chan);=0A= + sc->rxon->flags =3D htole32(IWN_RXON_TSF | IWN_RXON_CTS_TO_SELF);=0A= if (IEEE80211_IS_CHAN_2GHZ(ni->ni_chan))=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_AUTO | IWN_RXON_24GHZ);=0A= if (ic->ic_flags & IEEE80211_F_SHSLOT)=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_SHSLOT);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_SHSLOT);=0A= if (ic->ic_flags & IEEE80211_F_SHPREAMBLE)=0A= - sc->rxon.flags |=3D htole32(IWN_RXON_SHPREAMBLE);=0A= + sc->rxon->flags |=3D htole32(IWN_RXON_SHPREAMBLE);=0A= if (IEEE80211_IS_CHAN_A(ni->ni_chan)) {=0A= - sc->rxon.cck_mask =3D 0;=0A= - sc->rxon.ofdm_mask =3D 0x15;=0A= + sc->rxon->cck_mask =3D 0;=0A= + sc->rxon->ofdm_mask =3D 0x15;=0A= } else if (IEEE80211_IS_CHAN_B(ni->ni_chan)) {=0A= - sc->rxon.cck_mask =3D 0x03;=0A= - sc->rxon.ofdm_mask =3D 0;=0A= + sc->rxon->cck_mask =3D 0x03;=0A= + sc->rxon->ofdm_mask =3D 0;=0A= } else {=0A= /* Assume 802.11b/g. */=0A= - sc->rxon.cck_mask =3D 0x0f;=0A= - sc->rxon.ofdm_mask =3D 0x15;=0A= + sc->rxon->cck_mask =3D 0x0f;=0A= + sc->rxon->ofdm_mask =3D 0x15;=0A= }=0A= if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) {=0A= htflags |=3D IWN_RXON_HT_PROTMODE(ic->ic_curhtprotmode);=0A= @@ -5809,11 +5829,11 @@=0A= if (IEEE80211_IS_CHAN_HT40D(ni->ni_chan))=0A= htflags |=3D IWN_RXON_HT_HT40MINUS;=0A= }=0A= - sc->rxon.flags |=3D htole32(htflags);=0A= - sc->rxon.filter |=3D htole32(IWN_FILTER_BSS);=0A= + sc->rxon->flags |=3D htole32(htflags);=0A= + sc->rxon->filter |=3D htole32(IWN_FILTER_BSS);=0A= DPRINTF(sc, IWN_DEBUG_STATE, "rxon chan %d flags %x\n",=0A= - sc->rxon.chan, sc->rxon.flags);=0A= - error =3D iwn_cmd(sc, IWN_CMD_RXON, &sc->rxon, sc->rxonsz, 1);=0A= + sc->rxon->chan, sc->rxon->flags);=0A= + error =3D iwn_cmd(sc, IWN_CMD_RXON, sc->rxon, sc->rxonsz, 1);=0A= if (error !=3D 0) {=0A= device_printf(sc->sc_dev,=0A= "%s: could not update configuration, error %d\n", __func__,=0A= @@ -6795,6 +6815,25 @@=0A= sc->noise_gain =3D tmp + 1;=0A= }=0A= break;=0A= + case IWN_FW_TLV_PAN:=0A= + sc->sc_flags |=3D IWN_FLAG_PAN_SUPPORT;=0A= + DPRINTF(sc, IWN_DEBUG_RESET,"PAN Support found : %d\n", 1);=0A= + break;=0A= + case IWN_FW_TLV_FLAGS :=0A= + sc->tlv_feature_flags =3D htole32(*ptr);=0A= + break;=0A= + case IWN_FW_TLV_PBREQ_MAXLEN:=0A= + case IWN_FW_TLV_RUNT_EVTLOG_PTR:=0A= + case IWN_FW_TLV_RUNT_EVTLOG_SIZE:=0A= + case IWN_FW_TLV_RUNT_ERRLOG_PTR:=0A= + case IWN_FW_TLV_INIT_EVTLOG_PTR:=0A= + case IWN_FW_TLV_INIT_EVTLOG_SIZE:=0A= + case IWN_FW_TLV_INIT_ERRLOG_PTR:=0A= + case IWN_FW_TLV_WOWLAN_INST:=0A= + case IWN_FW_TLV_WOWLAN_DATA:=0A= + DPRINTF(sc, IWN_DEBUG_RESET,=0A= + "TLV type %d reconized but not handled\n", le16toh(tlv->type));=0A= + break;=0A= default:=0A= DPRINTF(sc, IWN_DEBUG_RESET,=0A= "TLV type %d not handled\n", le16toh(tlv->type));=0A= Index: sys/dev/iwn/if_iwnvar.h=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= --- sys/dev/iwn/if_iwnvar.h (revision 254091)=0A= +++ sys/dev/iwn/if_iwnvar.h (working copy)=0A= @@ -2,6 +2,8 @@=0A= /* $OpenBSD: if_iwnvar.h,v 1.18 2010/04/30 16:06:46 damien Exp $ */=0A= =0A= /*-=0A= + * Copyright (c) 2013 Cedric GROSS =0A= + * Copyright (c) 2011 Intel Corporation=0A= * Copyright (c) 2007, 2008=0A= * Damien Bergamini =0A= * Copyright (c) 2008 Sam Leffler, Errno Consulting=0A= @@ -18,7 +20,39 @@=0A= * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT = OF=0A= * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.=0A= */=0A= +enum iwn_rxon_ctx_id {=0A= + IWN_RXON_BSS_CTX,=0A= + IWN_RXON_PAN_CTX,=0A= + IWN_NUM_RXON_CTX=0A= +};=0A= =0A= +struct iwn_pan_slot {=0A= + uint16_t time;=0A= + uint8_t type;=0A= + uint8_t reserved;=0A= +} __packed;=0A= +=0A= +struct iwn_pan_params_cmd {=0A= + uint16_t flags;=0A= +#define IWN_PAN_PARAMS_FLG_SLOTTED_MODE (1 << 3)=0A= +=0A= + uint8_t reserved;=0A= + uint8_t num_slots;=0A= + struct iwn_pan_slot slots[10];=0A= +} __packed;=0A= +=0A= +struct iwn_led_mode=0A= +{=0A= + uint8_t led_cur_mode;=0A= + uint64_t led_cur_bt;=0A= + uint64_t led_last_bt;=0A= + uint64_t led_cur_tpt;=0A= + uint64_t led_last_tpt;=0A= + uint64_t led_bt_diff;=0A= + int led_cur_time;=0A= + int led_last_time;=0A= +};=0A= +=0A= struct iwn_rx_radiotap_header {=0A= struct ieee80211_radiotap_header wr_ihdr;=0A= uint64_t wr_tsft;=0A= @@ -191,6 +225,10 @@=0A= =0A= int (*iv_newstate)(struct ieee80211vap *,=0A= enum ieee80211_state, int);=0A= + int ctx;=0A= + int beacon_int;=0A= + uint8_t macaddr[IEEE80211_ADDR_LEN];=0A= +=0A= };=0A= #define IWN_VAP(_vap) ((struct iwn_vap *)(_vap))=0A= =0A= @@ -210,8 +248,11 @@=0A= #define IWN_FLAG_HAS_11N (1 << 6)=0A= #define IWN_FLAG_ENH_SENS (1 << 7)=0A= #define IWN_FLAG_ADV_BTCOEX (1 << 8)=0A= +#define IWN_FLAG_PAN_SUPPORT (1 << 9)=0A= =0A= uint8_t hw_type;=0A= + /* subdevice_id used to adjust configuration */=0A= + uint16_t subdevice_id;=0A= =0A= struct iwn_ops ops;=0A= const char *fwname;=0A= @@ -272,7 +313,7 @@=0A= int calib_cnt;=0A= struct iwn_calib_state calib;=0A= struct callout watchdog_to;=0A= -=0A= + struct callout ct_kill_exit_to;=0A= struct iwn_fw_info fw;=0A= struct iwn_calib_info calibcmd[5];=0A= uint32_t errptr;=0A= @@ -280,7 +321,12 @@=0A= struct iwn_rx_stat last_rx_stat;=0A= int last_rx_valid;=0A= struct iwn_ucode_info ucode_info;=0A= - struct iwn_rxon rxon;=0A= + struct iwn_rxon rx_on[IWN_NUM_RXON_CTX];=0A= + struct iwn_rxon *rxon;=0A= + int ctx;=0A= + struct ieee80211vap *ivap[IWN_NUM_RXON_CTX];=0A= +=0A= + uint8_t uc_scan_progress;=0A= uint32_t rawtemp;=0A= int temp;=0A= int noise;=0A= @@ -295,11 +341,14 @@=0A= char eeprom_domain[4];=0A= uint32_t eeprom_crystal;=0A= int16_t eeprom_temp;=0A= + int16_t eeprom_temp_high;=0A= int16_t eeprom_voltage;=0A= int8_t maxpwr2GHz;=0A= int8_t maxpwr5GHz;=0A= int8_t maxpwr[IEEE80211_CHAN_MAX];=0A= =0A= + uint32_t tlv_feature_flags;=0A= +=0A= int32_t temp_off;=0A= uint32_t int_mask;=0A= uint8_t ntxchains;=0A= @@ -309,6 +358,7 @@=0A= uint8_t chainmask;=0A= =0A= int sc_tx_timer;=0A= + int sc_scan_timer;=0A= =0A= struct ieee80211_tx_ampdu *qid2tap[IWN5000_NTXQUEUES];=0A= =0A= @@ -323,9 +373,21 @@=0A= void (*sc_addba_stop)(struct ieee80211_node *,=0A= struct ieee80211_tx_ampdu *);=0A= =0A= + struct iwn_led_mode sc_led;=0A= =0A= struct iwn_rx_radiotap_header sc_rxtap;=0A= struct iwn_tx_radiotap_header sc_txtap;=0A= +=0A= + /* The power save level originally configured by user */=0A= + int desired_pwrsave_level;=0A= +=0A= + /* The current power save level, this may differ from the configured = value due to=0A= + * thermal throttling etc.=0A= + * */=0A= + int current_pwrsave_level;=0A= +=0A= + /* For specifique params */=0A= + struct iwn_base_params *base_params;=0A= };=0A= =0A= #define IWN_LOCK_INIT(_sc) \=0A= ------=_NextPart_000_0049_01CE9434.D9515780-- From owner-freebsd-wireless@FreeBSD.ORG Fri Aug 9 09:15:32 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 7BB81114 for ; Fri, 9 Aug 2013 09:15:32 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 444E62999 for ; Fri, 9 Aug 2013 09:15:32 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:acd9:718:8db4:b823]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id F04A64AC1C for ; Fri, 9 Aug 2013 13:15:23 +0400 (MSK) Date: Fri, 9 Aug 2013 13:15:17 +0400 From: Lev Serebryakov X-Priority: 3 (Normal) Message-ID: <402688630.20130809131517@serebryakov.spb.ru> To: freebsd-wireless@freebsd.org Subject: r254093 wi-fi related instability MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: Fri, 09 Aug 2013 09:15:32 -0000 Hello, Freebsd-wireless. I've updated my router with ath AP to r254093 (from version r253356) and it reboots every 10-15 minutes when it has WiFi clients assocated and working. I didn't have details yet, as I need to attach full-featured serial console to it, but it will be later today or tomorrow. -- // Black Lion AKA Lev Serebryakov From owner-freebsd-wireless@FreeBSD.ORG Fri Aug 9 13:06:44 2013 Return-Path: Delivered-To: freebsd-wireless@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0020C1CC; Fri, 9 Aug 2013 13:06:43 +0000 (UTC) (envelope-from linimon@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C94D326C8; Fri, 9 Aug 2013 13:06:43 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r79D6hih091747; Fri, 9 Aug 2013 13:06:43 GMT (envelope-from linimon@freefall.freebsd.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r79D6hDO091746; Fri, 9 Aug 2013 13:06:43 GMT (envelope-from linimon) Date: Fri, 9 Aug 2013 13:06:43 GMT Message-Id: <201308091306.r79D6hDO091746@freefall.freebsd.org> To: linimon@FreeBSD.org, freebsd-bugs@FreeBSD.org, freebsd-wireless@FreeBSD.org From: linimon@FreeBSD.org Subject: Re: kern/181161: [wl] config a old compaq wl-110 wireless card make kernel panic 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: Fri, 09 Aug 2013 13:06:44 -0000 Old Synopsis: config a old compaq wl-110 wireless card make kernel panic New Synopsis: [wl] config a old compaq wl-110 wireless card make kernel panic Responsible-Changed-From-To: freebsd-bugs->freebsd-wireless Responsible-Changed-By: linimon Responsible-Changed-When: Fri Aug 9 13:06:23 UTC 2013 Responsible-Changed-Why: Over to maintainer(s). http://www.freebsd.org/cgi/query-pr.cgi?pr=181161 From owner-freebsd-wireless@FreeBSD.ORG Fri Aug 9 14:12:13 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id C9EB0ECF; Fri, 9 Aug 2013 14:12:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x236.google.com (mail-wi0-x236.google.com [IPv6:2a00:1450:400c:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 3C4132A81; Fri, 9 Aug 2013 14:12:13 +0000 (UTC) Received: by mail-wi0-f182.google.com with SMTP id hi8so1676115wib.9 for ; Fri, 09 Aug 2013 07:12:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=dQvnHL1qq7i+D4f1bWz+J76906RpbNMEmmpqrKxaI6I=; b=XE49XzdspFDg6rNIZQZmq1z+YEHcC/f4RBIpc3smQHIzIUvBFF8MCKFbfADJ8ADgu1 JutfH/4v6BcCqp3ZwEmhn/FLNaiGQldUQHRIxLN4bO0TyF/E+j6eOAsPyzhwF6a+3N9g B4240uKQUtlCeISwyMYMi8XPydfccjbLjOyeQkTIZqkuwfVJqCenvY+I3ZqorNchcm5V hw7BHgx+Q3XQY8ogYCAUX867fIUo5JyN6ii7SZHic59gsiSX04ZHeRAvD81gYFGd/oyt JE5/13h81M/WPizKT+R7WgNRxm55R8KgLNGoFKbRpxa8pc5J72b7aKS8FSxdBLSqNIxM 02pQ== MIME-Version: 1.0 X-Received: by 10.180.8.42 with SMTP id o10mr531394wia.0.1376057531231; Fri, 09 Aug 2013 07:12:11 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Fri, 9 Aug 2013 07:12:11 -0700 (PDT) In-Reply-To: <402688630.20130809131517@serebryakov.spb.ru> References: <402688630.20130809131517@serebryakov.spb.ru> Date: Fri, 9 Aug 2013 07:12:11 -0700 X-Google-Sender-Auth: ChY2U1tLs_5Ojnvjnxalf7tC4uE Message-ID: Subject: Re: r254093 wi-fi related instability From: Adrian Chadd To: Lev Serebryakov Content-Type: text/plain; charset=ISO-8859-1 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: Fri, 09 Aug 2013 14:12:13 -0000 Hm! Interesting! Yes, please get me some panic information. Thanks! -adrian On 9 August 2013 02:15, Lev Serebryakov wrote: > Hello, Freebsd-wireless. > > I've updated my router with ath AP to r254093 (from version r253356) and it > reboots every 10-15 minutes when it has WiFi clients assocated and working. > I didn't have details yet, as I need to attach full-featured serial console > to it, but it will be later today or tomorrow. > > -- > // Black Lion AKA Lev Serebryakov > > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.org" From owner-freebsd-wireless@FreeBSD.ORG Fri Aug 9 15:36:04 2013 Return-Path: Delivered-To: wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 84EB2228 for ; Fri, 9 Aug 2013 15:36:04 +0000 (UTC) (envelope-from gnn@neville-neil.com) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5C83C2F08 for ; Fri, 9 Aug 2013 15:36:03 +0000 (UTC) Received: from [209.249.190.124] (port=55907 helo=gnnmac.hudson-trading.com) by vps.hungerhost.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.80.1) (envelope-from ) id 1V7ojS-0001Nh-Ba; Fri, 09 Aug 2013 11:36:02 -0400 From: George Neville-Neil Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Subject: Testing the latest on Centrino 2200... Date: Fri, 9 Aug 2013 11:36:07 -0400 Message-Id: <363F176D-BC4E-45B5-8A6D-4A622D07B926@neville-neil.com> To: wireless@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 6.5 \(1508\)) X-Mailer: Apple Mail (2.1508) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - neville-neil.com X-Get-Message-Sender-Via: vps.hungerhost.com: authenticated_id: gnn@neville-neil.com 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: Fri, 09 Aug 2013 15:36:04 -0000 Howdy, If you're doing patches off list/github please included me in the = testers for the latest iwn/iwl stuff. I have an x230 with a Centrino N-2200. Best, George From owner-freebsd-wireless@FreeBSD.ORG Fri Aug 9 15:37:41 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0D33925C for ; Fri, 9 Aug 2013 15:37:41 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22e.google.com (mail-wg0-x22e.google.com [IPv6:2a00:1450:400c:c00::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 986EB2F19 for ; Fri, 9 Aug 2013 15:37:40 +0000 (UTC) Received: by mail-wg0-f46.google.com with SMTP id k13so3632206wgh.1 for ; Fri, 09 Aug 2013 08:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=WbgbYjmTp6iGAkcelDG5SvK9l202tk8ahZ1FEpKCwaA=; b=tZXMPYy8Wt0kj4FFkA04nUnD1Hdf3IqfAY04uiaVJoPqtvT1o/2eqiRT3gcBCU+7/s The012MvcNv4Dyv6BgblG4KxauPUo0RcEYZq9wckikvncp3N7lNjJPMeykmhqPzILcEa NplAhDXQfi9WAINV37wJd3omKb/wKt/EmlSuI3SgMiC6SEFPGv/kxlymSLzrppGvUnbX svb2KsjIVgxbA1KEvqRJIwapuRlcr835S4qOxFzDQaUy36ad3vJeg1CbxWuGG/rqCwP/ 1O8oUyzNzQ6ox0bbMXmpRwg1tY3QskCjdUR7/vS6L8u3UEcp+cE97HB4bEwqUC9njoKB Aepg== MIME-Version: 1.0 X-Received: by 10.180.20.116 with SMTP id m20mr690789wie.46.1376062658945; Fri, 09 Aug 2013 08:37:38 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.217.116.136 with HTTP; Fri, 9 Aug 2013 08:37:38 -0700 (PDT) In-Reply-To: <004801ce9424$15c88780$41599680$@info> References: <002d01ce9200$88b19dc0$9a14d940$@info> <000601ce9234$010f07c0$032d1740$@info> <004801ce9424$15c88780$41599680$@info> Date: Fri, 9 Aug 2013 08:37:38 -0700 X-Google-Sender-Auth: Nj1yqd9WLDDYENRfUnqVVV8olt4 Message-ID: Subject: Re: [iwn] Review split 5 From: Adrian Chadd To: Cedric GROSS Content-Type: text/plain; charset=ISO-8859-1 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: Fri, 09 Aug 2013 15:37:41 -0000 On 8 August 2013 03:43, Cedric GROSS wrote: >> So please go and fix that! > > Done. Cool. I'll test this out on the 4965 and 5100 today/tomorrow and get back to you. -adrian From owner-freebsd-wireless@FreeBSD.ORG Sat Aug 10 14:10:39 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 743E7979; Sat, 10 Aug 2013 14:10:39 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [46.4.40.135]) by mx1.freebsd.org (Postfix) with ESMTP id C21292EAB; Sat, 10 Aug 2013 14:10:38 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:acd9:718:8db4:b823]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id A847C4AC58; Sat, 10 Aug 2013 18:10:36 +0400 (MSK) Date: Sat, 10 Aug 2013 18:10:30 +0400 From: Lev Serebryakov X-Priority: 3 (Normal) Message-ID: <928191240.20130810181030@serebryakov.spb.ru> To: Adrian Chadd Subject: Re: r254093 wi-fi related instability In-Reply-To: References: <402688630.20130809131517@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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, 10 Aug 2013 14:10:39 -0000 Hello, Adrian. You wrote 9 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2013 =D0=B3., 18:12:= 11: AC> Hm! Interesting! Yes, please get me some panic information. Could not reproduce panic yet, but have one problem. At some point of test (my typical not-limited UDP stream from AP to client) AP says: ath0: ath_tx_tid_drain_print: norm: node 0xffffff8000f85000: bf=3D0xffffff8= 00083dc70: addbaw=3D0, dobaw=3D1, seqno=3D1323, retry=3D0 ath0: ath_tx_tid_drain_print: node 0xffffff8000f85000: bf=3D0xffffff800083d= c70: txq[1] axq_depth=3D1, axq_aggr_depth=3D1 ath0: ath_tx_tid_drain_print: node 0xffffff8000f85000: bf=3D0xffffff800083d= c70: tid txq_depth=3D128 hwq_depth=3D2, bar_wait=3D0, isfiltered=3D0 ath0: ath_tx_tid_drain_print: node 0xffffff8000f85000: tid 0: sched=3D1, pa= used=3D0, incomp=3D0, baw_head=3D5, baw_tail=3D64 txa_start=3D1264, ni_txse= qs=3D1451 FRDS 00:15:6d:85:5f:fc->c4:85:08:3f:9e:c2(00:15:6d:85:5f:fc) data QoS [TID = 0] WEP [IV 4d e6 00 3a 00 00 KID 0] 0M 8842 0000 c485 083f 9ec2 0015 6d85 5ffc 0015 6d85 5ffc b052 0000 9ec2 4de6= 0020 3a00 0000 aaaa 0300 0000 0800 4500 05da c572 0000 4011 2008 c0a8 8701= c0a8 8746 5b58 1389 05c6 f538 00a1 3d2e 5206 490b 0007 481a 0000 0000 0000= 0001 0000 1389 0000 0000 11e1 a300 fff6 d840 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 And after that rate drops to non-N one (100-150Mbit/s of UDP traffic from AP to client before this event, 28-20Mbit/s after without any recovery for tens of minutes!). It looks like re-negotiation of HT parameters are broken somehow. --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-wireless@FreeBSD.ORG Sat Aug 10 14:45:27 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DE272BB2; Sat, 10 Aug 2013 14:45:27 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 9B5382037; Sat, 10 Aug 2013 14:45:27 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (89.112.15.178.pppoe.eltel.net [89.112.15.178]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id 744EA4AC58; Sat, 10 Aug 2013 18:45:25 +0400 (MSK) Date: Sat, 10 Aug 2013 18:44:58 +0400 From: Lev Serebryakov X-Priority: 3 (Normal) Message-ID: <444161433.20130810184458@serebryakov.spb.ru> To: Adrian Chadd Subject: Re: r254093 wi-fi related instability In-Reply-To: References: <402688630.20130809131517@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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, 10 Aug 2013 14:45:27 -0000 Hello, Adrian. You wrote 9 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2013 =D0=B3., 18:12:= 11: AC> Hm! Interesting! Yes, please get me some panic information. CABOOM! Fatal trap 12: page fault while in kernel mode cpuid =3D 1; apic id =3D 01 fault virtual address =3D 0x0 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff802ef251 stack pointer =3D 0x28:0xffffff812205f850 frame pointer =3D 0x28:0xffffff812205f8c0 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 0 (ath0 taskq) trap number =3D 12 panic: page fault cpuid =3D 1 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xffffff812205f= 400 kdb_backtrace() at kdb_backtrace+0x39/frame 0xffffff812205f4b0 panic() at panic+0x155/frame 0xffffff812205f530 trap_fatal() at trap_fatal+0x37a/frame 0xffffff812205f590 trap_pfault() at trap_pfault+0x257/frame 0xffffff812205f630 trap() at trap+0x454/frame 0xffffff812205f790 calltrap() at calltrap+0x8/frame 0xffffff812205f790 --- trap 0xc, rip =3D 0xffffffff802ef251, rsp =3D 0xffffff812205f850, rbp = =3D 0xffffff812205f8c0 --- ath_transmit() at ath_transmit+0x2e1/frame 0xffffff812205f8c0 ieee80211_vap_pkt_send_dest() at ieee80211_vap_pkt_send_dest+0x236/frame 0x= ffffff812205f910 ieee80211_vap_transmit() at ieee80211_vap_transmit+0x1e9/frame 0xffffff8122= 05f950 pwrsave_flushq() at pwrsave_flushq+0x19f/frame 0xffffff812205f9a0 hostap_input() at hostap_input+0x8a9/frame 0xffffff812205fa30 ath_rx_pkt() at ath_rx_pkt+0x3fa/frame 0xffffff812205faa0 ath_rx_proc() at ath_rx_proc+0x290/frame 0xffffff812205fb30 taskqueue_run_locked() at taskqueue_run_locked+0xe6/frame 0xffffff812205fb80 taskqueue_thread_loop() at taskqueue_thread_loop+0xa8/frame 0xffffff812205f= bb0 fork_exit() at fork_exit+0x75/frame 0xffffff812205fbf0 fork_trampoline() at fork_trampoline+0xe/frame 0xffffff812205fbf0 --- trap 0, rip =3D 0, rsp =3D 0xffffff812205fcb0, rbp =3D 0 --- Unfortunately, it is NanoBSD-based system, so here ate no debugging sysmbols or kernel core :( --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-wireless@FreeBSD.ORG Sat Aug 10 19:04:04 2013 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D71348E3; Sat, 10 Aug 2013 19:04:04 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 5820E2AF3; Sat, 10 Aug 2013 19:04:04 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:acd9:718:8db4:b823]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPSA id DAC184AC1C; Sat, 10 Aug 2013 23:03:59 +0400 (MSK) Date: Sat, 10 Aug 2013 23:03:52 +0400 From: Lev Serebryakov X-Priority: 3 (Normal) Message-ID: <396163053.20130810230352@serebryakov.spb.ru> To: Adrian Chadd , freebsd-wireless@freebsd.org Subject: Re: r254093 wi-fi related instability In-Reply-To: <928191240.20130810181030@serebryakov.spb.ru> References: <402688630.20130809131517@serebryakov.spb.ru> <928191240.20130810181030@serebryakov.spb.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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, 10 Aug 2013 19:04:04 -0000 Hello, Lev. You wrote 10 =D0=B0=D0=B2=D0=B3=D1=83=D1=81=D1=82=D0=B0 2013 =D0=B3., 18:10= :30: LS> Could not reproduce panic yet, but have one problem. At some point of = test LS> (my typical not-limited UDP stream from AP to client) AP says: One more strangeness (could not repeat crash yet): ath0: ath_tx_tid_drain_print: norm: node 0xffffff8000f85000: bf=3D0xffffff8= 00083de08: addbaw=3D0, dobaw=3D1, seqno=3D2308, retry=3D0 ath0: ath_tx_tid_drain_print: node 0xffffff8000f85000: bf=3D0xffffff800083d= e08: txq[1] axq_depth=3D2, axq_aggr_depth=3D2 ath0: ath_tx_tid_drain_print: node 0xffffff8000f85000: bf=3D0xffffff800083d= e08: tid txq_depth=3D129 hwq_depth=3D2, bar_wait=3D0, isfiltered=3D0 ath0: ath_tx_tid_drain_print: node 0xffffff8000f85000: tid 0: sched=3D1, pa= used=3D0, incomp=3D0, baw_head=3D40, baw_tail=3D104 txa_start=3D2244, ni_tx= seqs=3D2437 FRDS 00:15:6d:85:5f:fc->c4:85:08:3f:9e:c2(00:15:6d:85:5f:fc) data QoS [TID = 0] WEP [IV f8 37 00 4c 00 00 KID 0] 0M 8842 0000 c485 083f 9ec2 0015 6d85 5ffc 0015 6d85 5ffc 4090 0000 9ec2 f837= 0020 4c00 0000 aaaa 0300 0000 0800 4500 05da 2e6b 0000 4011 b70f c0a8 8701= c0a8 8746 4f44 1389 05c6 1129 01bf 7285 5206 8d7a 0007 13d6 0000 0000 0000= 0001 0000 1389 0000 0000 11e1 a300 fffa 81c0 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637 3839 3031 3233 3435 3637= 3839 3031 3233 3435 3637 3839 ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! ath0: ath_tx_normal_comp: filtered?! And after that traffic completely stalls forever (at least for 120 seconds, after which I reset adapter with down/up cycle). --=20 // Black Lion AKA Lev Serebryakov