From owner-freebsd-wireless@FreeBSD.ORG Sun Sep 8 15:18:59 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 B3805C7E; Sun, 8 Sep 2013 15:18:59 +0000 (UTC) (envelope-from qinchenchong@gmail.com) Received: from mail-vc0-x234.google.com (mail-vc0-x234.google.com [IPv6:2607:f8b0:400c:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4F37B22D6; Sun, 8 Sep 2013 15:18:59 +0000 (UTC) Received: by mail-vc0-f180.google.com with SMTP id gf11so3386248vcb.11 for ; Sun, 08 Sep 2013 08:18:58 -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=PK2L8N9HmsxN3W7Wgx/CXG+4/W0k99xWaMSoyMBbk/M=; b=yh2LhpPV5JnZyJoVq3iB3wDGiH4C1HsjSFYB2+D4rYgIkg09jKmDGcABy/Pq/TSsji wwC0Y8RqP1QZu+YR/XFTumzRGN7heTXa/2yChwWmxiK/VHGMP6SmE0nAJKZcutGAuDr4 NZXBohrIvzfE/DWNXO+d3eMYJv8NGSl7Sks/ZwFbh/BTE5HWiWuXWXh1ICu+F+0PRr27 482qGDPkif6vUWQuXwUJEhCfb60sw5FOvWXamIJhBLAHcu6+fILmYjLDU4UIO2PTQxid BzGbZWy9ZywaafVRtLx0ygAq8uFke8Tas5/kNwzdoJ3DZQ3Sxz1wCpTYbJBKSKvqmjj4 uOwg== MIME-Version: 1.0 X-Received: by 10.58.136.4 with SMTP id pw4mr13061243veb.10.1378653538006; Sun, 08 Sep 2013 08:18:58 -0700 (PDT) Received: by 10.220.182.68 with HTTP; Sun, 8 Sep 2013 08:18:57 -0700 (PDT) In-Reply-To: References: Date: Sun, 8 Sep 2013 23:18:57 +0800 Message-ID: Subject: Re: Chenchong's work on net80211_ratectl From: Chenchong Qin To: Adrian Chadd Content-Type: multipart/mixed; boundary=047d7b5dba6866be5904e5e0ca7e 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: Sun, 08 Sep 2013 15:18:59 -0000 --047d7b5dba6866be5904e5e0ca7e Content-Type: text/plain; charset=ISO-8859-1 Hi! I've added the common ratectl state as an mbuf tag! After days of frustration (compile errors, boot failed, kernel panics, suddenly kernel freezing...), it seems that ath now can use 11n-aware net80211 ratectl api to do rate control. Attachment[0] is the diff of modifications to dev/ath. Changes to net80211 is minor this time. Just add some debug msgs to it. Please reference my gsoc svn repo . It's worth mentioning that sometimes the kernel will "freezing" (it looks like all things stop working, screen is freezing, keyboard and mouse are not responding) after wireless stuff start working for a while. At first, I consider it caused by my modification to ath. But this strange thing can also happen in a head kernel (r255382). Attachment[1] is some useful messages just before it happens. By the way, I use a AR9227 device. And, I found that, for aggregation scenario, ath gathers tx information and update the ratectl states. So, what we can do to net80211 to let it support aggregation? Thanks! Chenchong On Tue, Sep 3, 2013 at 9:29 AM, Chenchong Qin wrote: > OK! > > Thanks! :-) > > Chenchong > > > On Tue, Sep 3, 2013 at 1:56 AM, Adrian Chadd wrote: > >> Hi! >> >> You can declare an mbuf tag and use that. Look at M_TXCB in net80211 and >> how mbuf tags are added. >> >> I've long thought about adding a net80211 mbuf tag to represent -all- of >> the tx related state - TX callback, rate control, rate completion, >> aggregation state, retry count, etc. That way all the drivers can use it. >> >> >> >> -adrian >> >> > --047d7b5dba6866be5904e5e0ca7e Content-Type: application/octet-stream; name="20130908-net80211-ratectl-ath.diff" Content-Disposition: attachment; filename="20130908-net80211-ratectl-ath.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hlcenjjb0 SW5kZXg6IGlmX2F0aC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGlmX2F0aC5jCShyZXZpc2lvbiAyNTQ4MjYp CisrKyBpZl9hdGguYwkod29ya2luZyBjb3B5KQpAQCAtODIsNiArODIsOCBAQAogCiAjaW5jbHVk ZSA8bmV0ODAyMTEvaWVlZTgwMjExX3Zhci5oPgogI2luY2x1ZGUgPG5ldDgwMjExL2llZWU4MDIx MV9yZWdkb21haW4uaD4KKworI2luY2x1ZGUgPG5ldDgwMjExL2llZWU4MDIxMV9yYXRlY3RsLmg+ CiAjaWZkZWYgSUVFRTgwMjExX1NVUFBPUlRfU1VQRVJHCiAjaW5jbHVkZSA8bmV0ODAyMTEvaWVl ZTgwMjExX3N1cGVyZy5oPgogI2VuZGlmCkBAIC0zMjIsNiArMzI0LDcgQEAKIAlzYy0+c2NfYWgg PSBhaDsKIAlzYy0+c2NfaW52YWxpZCA9IDA7CS8qIHJlYWR5IHRvIGdvLCBlbmFibGUgaW50ZXJy dXB0IGhhbmRsaW5nICovCiAjaWZkZWYJQVRIX0RFQlVHCisJYXRoX2RlYnVnIHw9IEFUSF9ERUJV R19OT0RFOyAKIAlzYy0+c2NfZGVidWcgPSBhdGhfZGVidWc7CiAjZW5kaWYKIApAQCAtMTM4MCw2 ICsxMzgzLDE2IEBACiAJfQogCUFUSF9VTkxPQ0soc2MpOwogCisJdWludDMyX3QgY2FwcyA9IDA7 CisJaWYgKHNjLT5zY19tcnJldHJ5KQorCQljYXBzIHw9IElFRUU4MDIxMV9SQVRFQ1RMX0NBUF9N UlI7CisJaWYgKHNjLT5zY19tcnJwcm90KQorCQljYXBzIHw9IElFRUU4MDIxMV9SQVRFQ1RMX0NB UF9NUlJQUk9UO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QlhdGhf cmNbaV0udHhfcG93ZXJfY2FwID0gcmNbaV0udHhfcG93ZXJfY2FwOworCQlhdGhfcmNbaV0ubWF4 NG1zZnJhbWVsZW4gPSByY1tpXS5tYXg0bXNmcmFtZWxlbjsKKwkJCisJCURQUklOVEYoc2MsIEFU SF9ERUJVR19TV19UWF9BR0dSLAorCQkgICAgIiVzOiBpPSVkLCByYXRlPTB4JXgsIGZsYWdzPTB4 JXgsIG1heDRtcz0lZFxuIiwKKwkJICAgIF9fZnVuY19fLCBpLCByYXRlLCByY1tpXS5mbGFncywg cmNbaV0ubWF4NG1zZnJhbWVsZW4pOworCX0KKworI2lmIDAKIAlmb3IgKGkgPSAwOyBpIDwgQVRI X1JDX05VTTsgaSsrKSB7CiAJCXJjW2ldLmZsYWdzID0gMDsKIAkJaWYgKHJjW2ldLnRyaWVzID09 IDApCkBAIC0zMjUsNiArMzYxLDcgQEAKIAkJICAgICIlczogaT0lZCwgcmF0ZT0weCV4LCBmbGFn cz0weCV4LCBtYXg0bXM9JWRcbiIsCiAJCSAgICBfX2Z1bmNfXywgaSwgcmF0ZSwgcmNbaV0uZmxh Z3MsIHJjW2ldLm1heDRtc2ZyYW1lbGVuKTsKIAl9CisjZW5kaWYKIH0KIAogLyoK --047d7b5dba6866be5904e5e0ca7e Content-Type: application/octet-stream; name="freezing.log" Content-Disposition: attachment; filename="freezing.log" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hlcenmmm1 CnFpbmNoZW5jaG9uZ0BmcmVlYnNkOi9ob21lL3FpbmNoZW5jaG9uZyAlCnFpbmNoZW5jaG9uZ0Bm cmVlYnNkOi9ob21lL3FpbmNoZW5jaG9uZyAlIHN2biBpbmZvIC91c3Ivc3JjLwpQYXRoOiAvdXNy L3NyYwpXb3JraW5nIENvcHkgUm9vdCBQYXRoOiAvdXNyL3NyYwpVUkw6IGh0dHA6Ly9zdm4uZnJl ZWJzZC5vcmcvYmFzZS9oZWFkClJlcG9zaXRvcnkgUm9vdDogaHR0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NBTD4KICAgICBtZWRpYTogSUVFRSA4MDIuMTEgV2lyZWxlc3MgRXRo ZXJuZXQgYXV0b3NlbGVjdCAoYXV0b3NlbGVjdCkKICAgICBzdGF0dXM6IG5vIGNhcnJpZXIKICAg ICBzc2lkIElDVF9XYXZlTEFOIGNoYW5uZWwgMTEgKDI0NjIgTUh6IDExZykKICAgICByZWdkb21h aW4gMzI5MjQgY291bnRyeSBDTiBpbmRvb3IgZWNtIGF1dGhtb2RlIE9QRU4gcHJpdmFjeSBPRkYK ICAgICB0eHBvd2VyIDIwIGJtaXNzIDcgc2NhbnZhbGlkIDYwIHByb3Rtb2RlIENUUyB3bWUgYnVy c3QgYmludHZhbCAyMDAKcWluY2hlbmNob25nQGZyZWVic2Q6L2hvbWUvcWluY2hlbmNob25nICUg CgoqKiBUaGVuIGl0IGZyZWV6ZXMuIDotKAo= --047d7b5dba6866be5904e5e0ca7e-- From owner-freebsd-wireless@FreeBSD.ORG Mon Sep 9 11:06:58 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 1D7E8E84 for ; Mon, 9 Sep 2013 11:06:58 +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 F21442A15 for ; Mon, 9 Sep 2013 11:06:57 +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 r89B6vFc028737 for ; Mon, 9 Sep 2013 11:06:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r89B6vIr027801 for freebsd-wireless@FreeBSD.org; Mon, 9 Sep 2013 11:06:57 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 9 Sep 2013 11:06:57 GMT Message-Id: <201309091106.r89B6vIr027801@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, 09 Sep 2013 11:06:58 -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/181898 wireless [iwn] [patch] Centrino Advanced-N 6235 with latest iwn o kern/181694 wireless [iwn] [patch] Initialize hardware in iwn(4) resume cod o kern/181161 wireless [wl] config a old compaq wl-110 wireless card make ker o kern/181132 wireless [iwn] stream calculation is wrong for the Intel 4965 o kern/181100 wireless [bwi] Turning up bwi0 crashes / deadlocks the kernel 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/170411 wireless [ath] Uninitialized variables in if_ath.c 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 178 problems total. From owner-freebsd-wireless@FreeBSD.ORG Wed Sep 11 17:29:25 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 003FE8BD; Wed, 11 Sep 2013 17:29:24 +0000 (UTC) (envelope-from qinchenchong@gmail.com) Received: from mail-vc0-x22a.google.com (mail-vc0-x22a.google.com [IPv6:2607:f8b0:400c:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 90C632A9D; Wed, 11 Sep 2013 17:29:24 +0000 (UTC) Received: by mail-vc0-f170.google.com with SMTP id kw10so6415795vcb.15 for ; Wed, 11 Sep 2013 10:29:23 -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=4Ef5sV9OUfCzOB4MqT7OakXsb3giOAdrjRM6xmSKjxU=; b=eb/w/mbpIxLQVLMkpgTTjbiODjAZus4j1bCeYTFs+rPaud4UPMrpb7t0CE1z9PS6wl obAZ5e/DpV279hWuNyth+7TmlFqjZ9OhXvaaIuylIKkYA+RFinFeG+1hYH1/jgIjilQQ ua8VPt2MDIX00dR35yAs+V1+jdIeYAmQ29yqNHvgFRoszQNjDknK6zqkYw2tbvfR3zQU f933EG8+VCKpaDn5HAtiq6HD/ZvjSkbGmbOJat3z7dyD1QWh7yJlS0zRJaHEj3eM/kBN T8RBkh5Pv8vfeJqoypynTHr9WJCuTkRuGXu/po9EKshSvxXDRE5k7MSrRZ4zqpwIO/V4 Jj9w== MIME-Version: 1.0 X-Received: by 10.52.34.109 with SMTP id y13mr1945771vdi.8.1378920563685; Wed, 11 Sep 2013 10:29:23 -0700 (PDT) Received: by 10.220.182.68 with HTTP; Wed, 11 Sep 2013 10:29:23 -0700 (PDT) In-Reply-To: References: Date: Thu, 12 Sep 2013 01:29:23 +0800 Message-ID: Subject: Re: Chenchong's work on net80211_ratectl From: Chenchong Qin To: Adrian Chadd Content-Type: multipart/mixed; boundary=20cf30780c5c5f629404e61ef669 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: Wed, 11 Sep 2013 17:29:25 -0000 --20cf30780c5c5f629404e61ef669 Content-Type: text/plain; charset=ISO-8859-1 Hi! I've added some aggregation support here! At first I intend to pass subframe informations(nframes, per-subframe length etc.) to the ratectl api. But it seems to be a paradox that rate lookup must be performed before the ampdu is formed (aggregation limit based on the rate control decision is need) and subframe informations can be obtain only after the ampdu is formed. So, I add a new ieee80211_rc_info flag to ieee80211_ratectl to let it distinguish aggregation and non-aggregation scenarios. If rate lookup is called in an aggregation scenario, this flag is set. Then, ratectl algo knows that it's now finding rates for an ampdu and the framelen which records len of the first frame can be ignored. When it comes to complete period, tx status that shows number of subframes been sent and number of subframes been successfully received is passed to the ratectl api. I also get a question here - whether one tx that doesn't perform rate lookup will call the complete procedure? Thanks! Chenchong On Sun, Sep 8, 2013 at 11:18 PM, Chenchong Qin wrote: > Hi! > > I've added the common ratectl state as an mbuf tag! > > After days of frustration (compile errors, boot failed, kernel panics, > suddenly kernel freezing...), it seems that ath now can use 11n-aware > net80211 ratectl api to do rate control. Attachment[0] is the diff of > modifications to dev/ath. Changes to net80211 is minor this time. Just add > some debug msgs to it. Please reference my gsoc svn repo > . > > It's worth mentioning that sometimes the kernel will "freezing" (it looks > like all things stop working, screen is freezing, keyboard and mouse are > not responding) after wireless stuff start working for a while. At first, I > consider it caused by my modification to ath. But this strange thing can > also happen in a head kernel (r255382). Attachment[1] is some useful > messages just before it happens. By the way, I use a AR9227 device. > > And, I found that, for aggregation scenario, ath gathers tx information > and update the ratectl states. So, what we can do to net80211 to let it > support aggregation? > > Thanks! > > Chenchong > > > On Tue, Sep 3, 2013 at 9:29 AM, Chenchong Qin wrote: > >> OK! >> >> Thanks! :-) >> >> Chenchong >> >> >> On Tue, Sep 3, 2013 at 1:56 AM, Adrian Chadd wrote: >> >>> Hi! >>> >>> You can declare an mbuf tag and use that. Look at M_TXCB in net80211 and >>> how mbuf tags are added. >>> >>> I've long thought about adding a net80211 mbuf tag to represent -all- of >>> the tx related state - TX callback, rate control, rate completion, >>> aggregation state, retry count, etc. That way all the drivers can use it. >>> >>> >>> >>> -adrian >>> >>> >> > --20cf30780c5c5f629404e61ef669 Content-Type: application/octet-stream; name="20130911-net80211-ratectl-ath.diff" Content-Disposition: attachment; filename="20130911-net80211-ratectl-ath.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hlgtn9ja2 SW5kZXg6IGlmX2F0aF90eF9odC5jCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGlmX2F0aF90eF9odC5jCShyZXZp c2lvbiAyNTQ4MjYpCisrKyBpZl9hdGhfdHhfaHQuYwkod29ya2luZyBjb3B5KQpAQCAtNjQsNiAr NjQsOCBAQAogCiAjaW5jbHVkZSA8bmV0ODAyMTEvaWVlZTgwMjExX3Zhci5oPgogI2luY2x1ZGUg PG5ldDgwMjExL2llZWU4MDIxMV9yZWdkb21haW4uaD4KKworI2luY2x1ZGUgPG5ldDgwMjExL2ll ZWU4MDIxMV9yYXRlY3RsLmg+CiAjaWZkZWYgSUVFRTgwMjExX1NVUFBPUlRfU1VQRVJHCiAjaW5j bHVkZSA8bmV0ODAyMTEvaWVlZTgw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yYXRl KTsKKwkJCXJjX2luZm8tPmlyaV9mbGFncyAmPSB+SUVFRTgwMjExX1JBVEVDVExfSU5GT19BR0dS OwkKKwkJCWllZWU4MDIxMV9yYXRlY3RsX3R4X2NvbXBsZXRlKG5pLT5uaV92YXAsIG5pLCByY19p bmZvKTsKIAkJfQogCQlhdGhfdHhfZGVmYXVsdF9jb21wKHNjLCBiZiwgMCk7CiAJfSBlbHNlCkBA IC01NTc0LDkgKzU2MTQsMTUgQEAKIAogCWFuLT5hbl9tY2FzdHJpeCA9IGF0aF90eF9maW5kcml4 KHNjLCB0cC0+bWNhc3RyYXRlKTsKIAlhbi0+YW5fbWdtdHJpeCA9IGF0aF90eF9maW5kcml4KHNj LCB0cC0+bWdtdHJhdGUpOwotCisjaWYgMAogCWF0aF9yYXRlX25ld2Fzc29jKHNjLCBhbiwgaXNu ZXcpOworI2VuZGlmCiAKKwlEUFJJTlRGKHNjLCBBVEhfREVCVUdfTk9ERSwgIiVzOiBuZXdhc3Nv YyBpcyBuZXc6ICVkXG4iLAorCQkJX19mdW5jX18sIGlzbmV3KTsKKwlpZiAoaXNuZXcpCisJCWll ZWU4MDIxMV9yYXRlY3RsX25vZGVfaW5pdChuaSk7CisKIAlpZiAoaXNuZXcgJiYKIAkgICAgKHZh cC0+aXZfZmxhZ3MgJiBJRUVFODAyMTFfRl9QUklWQUNZKSA9PSAwICYmIHNjLT5zY19oYXNjbHJr ZXkgJiYKIAkgICAgbmktPm5pX3VjYXN0a2V5LndrX2tleWl4ID09IElFRUU4MDIxMV9LRVlJWF9O T05FKQo= --20cf30780c5c5f629404e61ef669-- From owner-freebsd-wireless@FreeBSD.ORG Wed Sep 11 18:05:44 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 CBAE8809 for ; Wed, 11 Sep 2013 18:05:44 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-x235.google.com (mail-pb0-x235.google.com [IPv6:2607:f8b0:400e:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 941352CFD for ; Wed, 11 Sep 2013 18:05:44 +0000 (UTC) Received: by mail-pb0-f53.google.com with SMTP id up15so9404801pbc.26 for ; Wed, 11 Sep 2013 11:05:44 -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=QuZZVX7+Pz+L2IEhJX9InSabuL4s3J9dsrv1mTj4Psw=; b=qRSn3KBNGmeT3bMs5M+f491/ibKOUw/JU/xKnoK7fDxyLdYM/RnjQ2lOzviisf0mq5 TpBOzjMc56AmRLz1+79fAAd5K0PNC0ywaPjlWByAPMPH+cmAwGBHHhw8lxzaNT6hhfVa dydKL4TJsLHjW3MI5KbraqhmHqFZwwfEbSfuADw+7tnUvfYNRGO7z4s40pWhxZO9yfKV I1nTgp5HMUQWHzAcSAWIZZIUOG9dZSQ26Zd4qisRtVXZXr6NCKIVQQsBVG03lnzjir9N XFcfkFygQwAx3C2tyrB4+CKIHZfxJLRVZgnlywK+4YeZQdkJytBDS2F2lB+Dtcn6Zt7h 1Qhg== MIME-Version: 1.0 X-Received: by 10.66.218.98 with SMTP id pf2mr5182268pac.120.1378922744269; Wed, 11 Sep 2013 11:05:44 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.70.126.71 with HTTP; Wed, 11 Sep 2013 11:05:44 -0700 (PDT) In-Reply-To: References: Date: Wed, 11 Sep 2013 11:05:44 -0700 X-Google-Sender-Auth: Jh--m4gPo-PaQaITi4km_1uSJSk Message-ID: Subject: Re: Chenchong's work on net80211_ratectl From: Adrian Chadd To: Chenchong Qin Content-Type: text/plain; charset=ISO-8859-1 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: Wed, 11 Sep 2013 18:05:45 -0000 Hi, For now, yes, you have to assume that you won't always get a response for a rate lookup. The buffer may be sent with NOACK set, it may be deleted during a channel change or scan, etc. And yes - the rate control lookup stuff for aggregate frames is a bit messy. It would be nice for the rate control code to return the rate _and_ the maximum aggregate size, in case the aggregation selection wants to cap how long frames are at the given choice. -adrian On 11 September 2013 10:29, Chenchong Qin wrote: > Hi! > > I've added some aggregation support here! > > At first I intend to pass subframe informations(nframes, per-subframe > length etc.) > to the ratectl api. But it seems to be a paradox that rate lookup must be > performed > before the ampdu is formed (aggregation limit based on the rate control > decision > is need) and subframe informations can be obtain only after the ampdu is > formed. > So, I add a new ieee80211_rc_info flag to ieee80211_ratectl to let it > distinguish > aggregation and non-aggregation scenarios. If rate lookup is called in an > aggregation > scenario, this flag is set. Then, ratectl algo knows that it's now finding > rates for an > ampdu and the framelen which records len of the first frame can be > ignored. When > it comes to complete period, tx status that shows number of subframes been > sent > and number of subframes been successfully received is passed to the > ratectl api. > > I also get a question here - whether one tx that doesn't perform rate > lookup will call > the complete procedure? > > Thanks! > > Chenchong > > > On Sun, Sep 8, 2013 at 11:18 PM, Chenchong Qin wrote: > >> Hi! >> >> I've added the common ratectl state as an mbuf tag! >> >> After days of frustration (compile errors, boot failed, kernel panics, >> suddenly kernel freezing...), it seems that ath now can use 11n-aware >> net80211 ratectl api to do rate control. Attachment[0] is the diff of >> modifications to dev/ath. Changes to net80211 is minor this time. Just add >> some debug msgs to it. Please reference my gsoc svn repo >> . >> >> It's worth mentioning that sometimes the kernel will "freezing" (it looks >> like all things stop working, screen is freezing, keyboard and mouse are >> not responding) after wireless stuff start working for a while. At first, I >> consider it caused by my modification to ath. But this strange thing can >> also happen in a head kernel (r255382). Attachment[1] is some useful >> messages just before it happens. By the way, I use a AR9227 device. >> >> And, I found that, for aggregation scenario, ath gathers tx information >> and update the ratectl states. So, what we can do to net80211 to let it >> support aggregation? >> >> Thanks! >> >> Chenchong >> >> >> On Tue, Sep 3, 2013 at 9:29 AM, Chenchong Qin wrote: >> >>> OK! >>> >>> Thanks! :-) >>> >>> Chenchong >>> >>> >>> On Tue, Sep 3, 2013 at 1:56 AM, Adrian Chadd wrote: >>> >>>> Hi! >>>> >>>> You can declare an mbuf tag and use that. Look at M_TXCB in net80211 >>>> and how mbuf tags are added. >>>> >>>> I've long thought about adding a net80211 mbuf tag to represent -all- >>>> of the tx related state - TX callback, rate control, rate completion, >>>> aggregation state, retry count, etc. That way all the drivers can use it. >>>> >>>> >>>> >>>> -adrian >>>> >>>> >>> >> > From owner-freebsd-wireless@FreeBSD.ORG Thu Sep 12 03:35:33 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 2834EF55 for ; Thu, 12 Sep 2013 03:35:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x233.google.com (mail-wg0-x233.google.com [IPv6:2a00:1450:400c:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id BA9D62B69 for ; Thu, 12 Sep 2013 03:35:32 +0000 (UTC) Received: by mail-wg0-f51.google.com with SMTP id c11so21793wgh.18 for ; Wed, 11 Sep 2013 20:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=2alkMWoxZnWDs3dIGmeQn7cEwbZXdyn5dZ04TwliaLs=; b=O1dht0ll6/gPpPgT2MF7YL2CyHJ2riiaelqPccXqxUWzKXx6UZ4Lb0GoEfNxlrz/K8 Qh2PnLdxGeq0dk4B3MTIoLS7LETqh/CC2IDQMRyN4gMcDYrDrMvFk8PFKKdAcNZ47gS7 Qj8wvkCmPKQvS1wx+zSLKOhT7RYAvdQRQ8FoKqheh0l5ilXzyruIA1GRJ7Pplnw5F7R1 c9qwAEi5ElRz2PZMWCnlnk2DxOOZqaOoMnVYADAmc8Wtp+A/+9ngC5VEQ/9r0sK2FZg4 wm0IYGD4VM5n/vefDFq2P6nMgGW07ZlRyE3SlOrdGkiJMa5ws3hnD7SEctEJqU6MdMBB 1MzQ== MIME-Version: 1.0 X-Received: by 10.194.205.164 with SMTP id lh4mr92091wjc.46.1378956930702; Wed, 11 Sep 2013 20:35:30 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Wed, 11 Sep 2013 20:35:30 -0700 (PDT) Date: Wed, 11 Sep 2013 20:35:30 -0700 X-Google-Sender-Auth: oQLgA9O6prk_7eJkMhtNwE6oChY Message-ID: Subject: iwn wiki page From: Adrian Chadd To: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 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: Thu, 12 Sep 2013 03:35:33 -0000 Hiya! I've started an iwn(4) wiki page: https://wiki.freebsd.org/dev/iwn(4) I'm mainly trying to capture the supported list of hardware and what's missing in the driver. What I've discovered tonight - The intel NIC in this Lenovo X230 (Centrino 6205) doesn't have bluetooth support, so we shouldn't be sending it bluetooth commands. I'll commit something that let's us easily disable sending bluetooth commands. This is required for FreeBSD-10 because it's an instant crash if we don't do it. However, Cedric - this means you're going to have to update your driver to take this change into account. Thanks, -adrian From owner-freebsd-wireless@FreeBSD.ORG Thu Sep 12 04:00: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 ECF6535F for ; Thu, 12 Sep 2013 04:00:27 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x22b.google.com (mail-we0-x22b.google.com [IPv6:2a00:1450:400c:c03::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8BDFD2C6F for ; Thu, 12 Sep 2013 04:00:27 +0000 (UTC) Received: by mail-we0-f171.google.com with SMTP id t61so7606085wes.16 for ; Wed, 11 Sep 2013 21:00:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=LqvcT+e8xa7lr0zt8eUWWVlV3De4j0jqyK+ffMBbFF0=; b=kHa8JYlD/bghiCqAXCLzH3fM7TMGEDbkxXlklshV4X2x4HNf9dYnJAIa8EuJ52pWnr 2gsO5nmcd278NvDCgXrInsrnFsJeU1sBWamY45Ltg8eNi/ndDD9bTtEFJ74DOmv01ohz ARCYNGk5Uct1jt7eCTWx0QzIpP6G/j8BD9/uJAgAu0zBIWbQ4AyrijhFrPjd+Go/ffRU aEL04CGF+hdbNp5KzxiC5ElysSyQGYZUhBhtmQESLKM/JiraB4IP0DUx4KAfc19YfqD+ VR11xvBlKcQGNugZzLb/bklgtCXnyJU6hDPnmGMYwHN6XqUOJ3TC7e6tbLq0rFTGbeW2 GBkg== MIME-Version: 1.0 X-Received: by 10.194.80.39 with SMTP id o7mr4395967wjx.39.1378958425831; Wed, 11 Sep 2013 21:00:25 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Wed, 11 Sep 2013 21:00:25 -0700 (PDT) Date: Wed, 11 Sep 2013 21:00:25 -0700 X-Google-Sender-Auth: 0E0609YWLgc6T2cRcwWc6vDrSUA Message-ID: Subject: [iwn] how do we tell the difference between the 6200/6205 and 6230/6235? From: Adrian Chadd To: "freebsd-wireless@freebsd.org" , Cedric GROSS Content-Type: text/plain; charset=ISO-8859-1 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: Thu, 12 Sep 2013 04:00:28 -0000 Hiya, According to the intel website, the 6200/6205 do not have bluetooth, but the 6230/6235 do. Now, I don't know yet whether they support external bluetooth coex but I guess for now we can just not send the setup commands. So, how do we distinguish between these NICs? There only seems to be a small subset of hardware IDs in the driver.. thanks, -adrian From owner-freebsd-wireless@FreeBSD.ORG Thu Sep 12 04:32:30 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 66A88592; Thu, 12 Sep 2013 04:32:30 +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 2EA2A2DD9; Thu, 12 Sep 2013 04:32:30 +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 9963144C; Thu, 12 Sep 2013 06:32:27 +0200 (CEST) From: "Cedric GROSS" To: "'Adrian Chadd'" , References: In-Reply-To: Subject: RE: [iwn] how do we tell the difference between the 6200/6205 and 6230/6235? Date: Thu, 12 Sep 2013 06:32:23 +0200 Message-ID: <000901ceaf71$155c9f80$4015de80$@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: Ac6vbKIG6hqK+1OyRkGqJs3Qp9WjPwAA02Wg Content-Language: fr 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, 12 Sep 2013 04:32:30 -0000 >De=A0: adrian.chadd@gmail.com [mailto:adrian.chadd@gmail.com] De la = part de Adrian Chadd >Envoy=E9=A0: jeudi 12 septembre 2013 06:00 >=C0=A0: freebsd-wireless@freebsd.org; Cedric GROSS >Objet=A0: [iwn] how do we tell the difference between the 6200/6205 and 6230/6235? > >Hiya, > >According to the intel website, the 6200/6205 do not have bluetooth, = but the 6230/6235 do. > >Now, I don't know yet whether they support external bluetooth coex but = I guess for now we can just not send the setup >commands. > >So, how do we distinguish between these NICs? There only seems to be a small subset of hardware IDs in the driver.. We need to test subdevice ID, it's why I register all subdevice ID in if_iwn_devid.h. If you have a look in my last full diff, you will see that driver configuration is based on that (iwn_config_specific in if_iwn.c).=20 > >thanks, > > >-adrian Cedric From owner-freebsd-wireless@FreeBSD.ORG Thu Sep 12 04:41:12 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 79F756C6; Thu, 12 Sep 2013 04:41:12 +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 451BC2E5B; Thu, 12 Sep 2013 04:41:12 +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 F25A0456; Thu, 12 Sep 2013 06:41:04 +0200 (CEST) From: "Cedric GROSS" To: "'Adrian Chadd'" , References: In-Reply-To: Subject: RE: iwn wiki page Date: Thu, 12 Sep 2013 06:41:01 +0200 Message-ID: <000c01ceaf72$49bda160$dd38e420$@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: Ac6vaSzlYdY+QfckQIKsIcvCFOcndQACAdKg Content-Language: fr 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, 12 Sep 2013 04:41:12 -0000 > -----Message d'origine----- > De=A0: owner-freebsd-wireless@freebsd.org [mailto:owner-freebsd- > wireless@freebsd.org] De la part de Adrian Chadd > Envoy=E9=A0: jeudi 12 septembre 2013 05:36 > =C0=A0: freebsd-wireless@freebsd.org > Objet=A0: iwn wiki page >=20 > Hiya! >=20 > I've started an iwn(4) wiki page: >=20 > https://wiki.freebsd.org/dev/iwn(4) >=20 > I'm mainly trying to capture the supported list of hardware and what's > missing in the driver. >=20 > What I've discovered tonight - The intel NIC in this Lenovo X230 > (Centrino > 6205) doesn't have bluetooth support, so we shouldn't be sending it > bluetooth commands. >=20 > I'll commit something that let's us easily disable sending bluetooth > commands. This is required for FreeBSD-10 because it's an instant = crash > if we don't do it. >=20 > However, Cedric - this means you're going to have to update your = driver > to take this change into account. Yep, was the problem with George's NIC. (See thread "patch for intel centrino ?" in August this year) Modification is easy if we merge all my work on "parameters".=20 Adrian : did you look at split 6 ? I think remain 2 or may be 3 split to = be at same level as my version. >=20 > Thanks, >=20 >=20 > -adrian Cedric From owner-freebsd-wireless@FreeBSD.ORG Thu Sep 12 05:27:00 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 709D8F70; Thu, 12 Sep 2013 05:27:00 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x236.google.com (mail-wg0-x236.google.com [IPv6:2a00:1450:400c:c00::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DC5E12079; Thu, 12 Sep 2013 05:26:59 +0000 (UTC) Received: by mail-wg0-f54.google.com with SMTP id m15so82218wgh.21 for ; Wed, 11 Sep 2013 22:26:58 -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=5XwcEGn9zY8AnirL8yIqDlvNU5ElpHdieRib8YhE5eA=; b=NP8FEjZnd8xQkNx1pMNesHMtgTY0NdoT4CwCkaDVOhAq6M0bR7/9kLupWXJJr3ejsq CDJukq8/DSnlpWBDLCJ/K56zulsmLVEFBHWRw7LtnRzscaX1pRge8BjRxVpv+MF3EC0U Z4y3BckpBFi52g8zJuJZTCIuKo84+XSMKnXy4cWlD3AY/ZIEEDL3MrNelfbXIz/ib3Ya eftuhEk5ytjwHWkCHWma0B7Xv9+Mxu2hSnJq/S18OdgSlhomLpPgbPdTpBIl+O+WZqi7 7apofetgjy54OTTmEEfgQZikw+J1qJIJuEf+pFGhct3B1AOMr3eqjbs80kvYST/YngBT 525A== MIME-Version: 1.0 X-Received: by 10.180.109.132 with SMTP id hs4mr16374432wib.46.1378963618031; Wed, 11 Sep 2013 22:26:58 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Wed, 11 Sep 2013 22:26:57 -0700 (PDT) In-Reply-To: <000c01ceaf72$49bda160$dd38e420$@info> References: <000c01ceaf72$49bda160$dd38e420$@info> Date: Wed, 11 Sep 2013 22:26:57 -0700 X-Google-Sender-Auth: ZyGl2bNg55Rvr2OoFo15dbtfOg0 Message-ID: Subject: Re: iwn wiki page From: Adrian Chadd To: Cedric GROSS Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Thu, 12 Sep 2013 05:27:00 -0000 The problem now is the freeze for the next release. So I can't merge in huge duffs. Only bug fixes. So, hmm, how can we do that... Adrian On Wednesday, September 11, 2013, Cedric GROSS wrote: > > -----Message d'origine----- > > De : owner-freebsd-wireless@freebsd.org [mailto: > owner-freebsd- > > wireless@freebsd.org ] De la part de Adrian Chadd > > Envoy=E9 : jeudi 12 septembre 2013 05:36 > > =C0 : freebsd-wireless@freebsd.org > > Objet : iwn wiki page > > > > Hiya! > > > > I've started an iwn(4) wiki page: > > > > https://wiki.freebsd.org/dev/iwn(4) > > > > I'm mainly trying to capture the supported list of hardware and what's > > missing in the driver. > > > > What I've discovered tonight - The intel NIC in this Lenovo X230 > > (Centrino > > 6205) doesn't have bluetooth support, so we shouldn't be sending it > > bluetooth commands. > > > > I'll commit something that let's us easily disable sending bluetooth > > commands. This is required for FreeBSD-10 because it's an instant crash > > if we don't do it. > > > > However, Cedric - this means you're going to have to update your driver > > to take this change into account. > > Yep, was the problem with George's NIC. (See thread "patch for intel > centrino ?" in August this year) > Modification is easy if we merge all my work on "parameters". > > Adrian : did you look at split 6 ? I think remain 2 or may be 3 split to = be > at same level as my version. > > > > Thanks, > > > > > > -adrian > > Cedric > > From owner-freebsd-wireless@FreeBSD.ORG Thu Sep 12 19:09:59 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 AB19F82B for ; Thu, 12 Sep 2013 19:09:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 472D62D6E for ; Thu, 12 Sep 2013 19:09:59 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id hj3so254988wib.1 for ; Thu, 12 Sep 2013 12:09:57 -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=Nr6OdCAqmQdiPIEb3kvlXCZ2A42STpgp9OULLWjMHsE=; b=IOMQc2GBYdeCvYw8IZX0plMkHhohwGnSOK+voaBWYoOWIEGTIZjsc/FSLRVZg6Ix0M 3faH/GzDVsR/jeMAH0feB6aYhuVqveWpXm4GmH660vdrc+61k81riiVjdUumzEyEWV87 n0AYj55o394PuGqFY85jWU4FX+mgAWWIibz3PIo681lFGDgR3Z9D49opo14eXcCjMPSx 34LbdVnxsau3Cp6iq163rg9+qjyeNb34uqhi/+wPiAfZQ/7idiV7aVNAegFMzRkyMxoH oPtygTorswh6wAP24aUwg8UtyG4/asdLMCFYIrsJCBJLoHSnf607+FlNuAhMrum5s5Ri o+eQ== MIME-Version: 1.0 X-Received: by 10.180.10.136 with SMTP id i8mr7206385wib.46.1379012997674; Thu, 12 Sep 2013 12:09:57 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Thu, 12 Sep 2013 12:09:57 -0700 (PDT) In-Reply-To: <000c01ceaf72$49bda160$dd38e420$@info> References: <000c01ceaf72$49bda160$dd38e420$@info> Date: Thu, 12 Sep 2013 12:09:57 -0700 X-Google-Sender-Auth: TiXui7CiEDT8fyJvbZy9AcXyzgQ Message-ID: Subject: Re: iwn wiki page From: Adrian Chadd To: Cedric GROSS Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Thu, 12 Sep 2013 19:09:59 -0000 Yeah, but I can't merge that in now given the 10 freeze. I just specifically wonder how to do this. Like, enumerating the individual cards. I may have to use the device id as well as the hardware revision id. -adrian On 11 September 2013 21:41, Cedric GROSS wrote: > > -----Message d'origine----- > > De : owner-freebsd-wireless@freebsd.org [mailto:owner-freebsd- > > wireless@freebsd.org] De la part de Adrian Chadd > > Envoy=E9 : jeudi 12 septembre 2013 05:36 > > =C0 : freebsd-wireless@freebsd.org > > Objet : iwn wiki page > > > > Hiya! > > > > I've started an iwn(4) wiki page: > > > > https://wiki.freebsd.org/dev/iwn(4) > > > > I'm mainly trying to capture the supported list of hardware and what's > > missing in the driver. > > > > What I've discovered tonight - The intel NIC in this Lenovo X230 > > (Centrino > > 6205) doesn't have bluetooth support, so we shouldn't be sending it > > bluetooth commands. > > > > I'll commit something that let's us easily disable sending bluetooth > > commands. This is required for FreeBSD-10 because it's an instant crash > > if we don't do it. > > > > However, Cedric - this means you're going to have to update your driver > > to take this change into account. > > Yep, was the problem with George's NIC. (See thread "patch for intel > centrino ?" in August this year) > Modification is easy if we merge all my work on "parameters". > > Adrian : did you look at split 6 ? I think remain 2 or may be 3 split to = be > at same level as my version. > > > > Thanks, > > > > > > -adrian > > Cedric > > From owner-freebsd-wireless@FreeBSD.ORG Fri Sep 13 09:24:37 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 3F1FE731; Fri, 13 Sep 2013 09:24:37 +0000 (UTC) (envelope-from matthias@petermann-it.de) Received: from mail.s1.d2ux.org (static.209.96.9.5.clients.your-server.de [5.9.96.209]) by mx1.freebsd.org (Postfix) with ESMTP id F061F2421; Fri, 13 Sep 2013 09:24:36 +0000 (UTC) Received: from mail.s1.d2ux.org (mail [10.0.0.3]) by mail.s1.d2ux.org (Postfix) with ESMTP id 6B35884F25BB; Fri, 13 Sep 2013 11:24:29 +0200 (CEST) Received: from mail.s1.d2ux.org ([10.0.0.3]) by mail.s1.d2ux.org (mail.s1.d2ux.org [10.0.0.3]) (amavisd-new, port 10024) with ESMTP id yvTqF3FFwrxm; Fri, 13 Sep 2013 11:24:27 +0200 (CEST) Received: from www.s1.d2ux.org (unknown [10.0.0.4]) by mail.s1.d2ux.org (Postfix) with ESMTP id 764A284F2586; Fri, 13 Sep 2013 11:24:27 +0200 (CEST) Received: from 188.92.33.52 ([188.92.33.52]) by d2ux.org (Horde Framework) with HTTP; Fri, 13 Sep 2013 11:24:27 +0200 Date: Fri, 13 Sep 2013 11:24:27 +0200 Message-ID: <20130913112427.Horde.Lr2e32AbzvcQIrrWuDh-dg1@d2ux.org> From: Matthias Petermann To: freebsd-current@freebsd.org Subject: Centrino Wireless N2230 support User-Agent: Internet Messaging Program (IMP) H5 (6.1.3) Content-Type: text/plain; charset=UTF-8; format=flowed; DelSp=Yes MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Cc: freebsd-wireless@freebsd.org, freebsd-drivers@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, 13 Sep 2013 09:24:37 -0000 Hello, there was some recent discussion[1] on freebsd-wireless and freebsd-drivers about Centrino Wireless N2230[2] support in FreeBSD. I would be curious if there is a working patch somewhere available which builds against 10-current? Thanks in advance & kind regards, Matthias [1] http://lists.freebsd.org/pipermail/freebsd-drivers/2013-July/001570.html [2] http://www.intel.de/content/www/de/de/wireless-products/centrino-wireless-n-2230.html -- Matthias Petermann Ihr Partner für anspruchsvolle IT-Lösungen www.petermann-it.de - lösungsorientiert, innovativ und erfolgreich From owner-freebsd-wireless@FreeBSD.ORG Fri Sep 13 09:34: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 CBA70C43; Fri, 13 Sep 2013 09:34:55 +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 9206F24CF; Fri, 13 Sep 2013 09:34:55 +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 CDCF6877; Fri, 13 Sep 2013 11:34:53 +0200 (CEST) From: "Cedric GROSS" To: "'Matthias Petermann'" References: <20130913112427.Horde.Lr2e32AbzvcQIrrWuDh-dg1@d2ux.org> In-Reply-To: <20130913112427.Horde.Lr2e32AbzvcQIrrWuDh-dg1@d2ux.org> Subject: RE: Centrino Wireless N2230 support Date: Fri, 13 Sep 2013 11:34:50 +0200 Message-ID: <001e01ceb064$80168220$80438660$@info> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: Ac6wYx57eIffdn5TS+mBCYe2mFppYAAAH5nw Content-Language: fr Cc: freebsd-wireless@freebsd.org, freebsd-drivers@freebsd.org, freebsd-current@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, 13 Sep 2013 09:34:55 -0000 Hello, > De : owner-freebsd-drivers@freebsd.org [mailto:owner-freebsd- > drivers@freebsd.org] De la part de Matthias Petermann > Envoy=C3=A9 : vendredi 13 septembre 2013 11:24 > =C3=80 : freebsd-current@freebsd.org > Cc : freebsd-wireless@freebsd.org; freebsd-drivers@freebsd.org > Objet : Centrino Wireless N2230 support >=20 >=20 > Hello, >=20 > there was some recent discussion[1] on freebsd-wireless and freebsd- > drivers about Centrino Wireless N2230[2] support in FreeBSD. >=20 > I would be curious if there is a working patch somewhere available > which builds against 10-current? >=20 Not against 10-current. But if you wish, you could test with my version on github = https://github.com/KreizIT/FreeBSD-IWN Use LKGV branch, should be running with 10-current. Cedric From owner-freebsd-wireless@FreeBSD.ORG Fri Sep 13 16:11:35 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 5B622752; Fri, 13 Sep 2013 16:11:35 +0000 (UTC) (envelope-from qinchenchong@gmail.com) Received: from mail-ve0-x229.google.com (mail-ve0-x229.google.com [IPv6:2607:f8b0:400c:c01::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EBFC52C29; Fri, 13 Sep 2013 16:11:34 +0000 (UTC) Received: by mail-ve0-f169.google.com with SMTP id db12so1194066veb.0 for ; Fri, 13 Sep 2013 09:11: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=7U7KHc//L5+W1lsWWgZeXFHHTBb3pbn++Z9T0VfKA/M=; b=bhCKpBIQSHW7+14PXAhwXpgtGJRlXhV729AsWOOduh4VUfJ9riWYlqqD4dSz44/e+K 69g6ZgiVKMTAuWD7mmC62uQ3j5kQPjqm7u6IponLF4zJx/S3MsuUyweP70jKixqLMwTh 6+opsGZkcCd1M95ACV91CnpCoGJ8vFItgI07AhrDk5QR6nIAMhdvqdENtPFRxZf6J9hf oMa34jD9koZrHGNDsgWmR3YbjKBoy25uZdB12blHm0PvndeXRqbIfMsSDvRBBMvLPaLv +VHG4FeZIkAPRbr/qAEBkxbKpF4JBgqJRZwsIOzIJf5zuednH3RfejzWefamvZVDHD60 4zQA== MIME-Version: 1.0 X-Received: by 10.58.76.199 with SMTP id m7mr733743vew.35.1379088693978; Fri, 13 Sep 2013 09:11:33 -0700 (PDT) Received: by 10.220.182.68 with HTTP; Fri, 13 Sep 2013 09:11:33 -0700 (PDT) In-Reply-To: References: Date: Sat, 14 Sep 2013 00:11:33 +0800 Message-ID: Subject: Re: Chenchong's work on net80211_ratectl From: Chenchong Qin To: Adrian Chadd Content-Type: text/plain; charset=ISO-8859-1 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: Fri, 13 Sep 2013 16:11:35 -0000 Hi! Here is some updates. Another member is added to ieee80211_rc_info to record value of the maximum aggregate size. Then, in aggregation scenario, ratectl algo can inform aggregation selection code of proper maximum aggregate size. Per-vap ratectl statistics is exported through sysctl. When ieee80211_ratectl_init() is called, this statistics api is attached. It's convenient to implement the per-device api -- just traverse the vap list and call per-vap api for each vap. But, we know that ratectl of net80211 provides service to vap-granularity object, not to device directly. So, is it more suitable to implement the per-device api in device driver (i.e. attach per-device api when attaching the device)? Code will be posted later. Thanks! Chenchong On Thu, Sep 12, 2013 at 2:05 AM, Adrian Chadd wrote: > Hi, > > For now, yes, you have to assume that you won't always get a response for > a rate lookup. The buffer may be sent with NOACK set, it may be deleted > during a channel change or scan, etc. > > And yes - the rate control lookup stuff for aggregate frames is a bit > messy. It would be nice for the rate control code to return the rate _and_ > the maximum aggregate size, in case the aggregation selection wants to cap > how long frames are at the given choice. > > > > -adrian > > > > On 11 September 2013 10:29, Chenchong Qin wrote: > >> Hi! >> >> I've added some aggregation support here! >> >> At first I intend to pass subframe informations(nframes, per-subframe >> length etc.) >> to the ratectl api. But it seems to be a paradox that rate lookup must be >> performed >> before the ampdu is formed (aggregation limit based on the rate control >> decision >> is need) and subframe informations can be obtain only after the ampdu is >> formed. >> So, I add a new ieee80211_rc_info flag to ieee80211_ratectl to let it >> distinguish >> aggregation and non-aggregation scenarios. If rate lookup is called in an >> aggregation >> scenario, this flag is set. Then, ratectl algo knows that it's now >> finding rates for an >> ampdu and the framelen which records len of the first frame can be >> ignored. When >> it comes to complete period, tx status that shows number of subframes >> been sent >> and number of subframes been successfully received is passed to the >> ratectl api. >> >> I also get a question here - whether one tx that doesn't perform rate >> lookup will call >> the complete procedure? >> >> Thanks! >> >> Chenchong >> >> >> On Sun, Sep 8, 2013 at 11:18 PM, Chenchong Qin wrote: >> >>> Hi! >>> >>> I've added the common ratectl state as an mbuf tag! >>> >>> After days of frustration (compile errors, boot failed, kernel panics, >>> suddenly kernel freezing...), it seems that ath now can use 11n-aware >>> net80211 ratectl api to do rate control. Attachment[0] is the diff of >>> modifications to dev/ath. Changes to net80211 is minor this time. Just add >>> some debug msgs to it. Please reference my gsoc svn repo >>> . >>> >>> It's worth mentioning that sometimes the kernel will "freezing" (it >>> looks like all things stop working, screen is freezing, keyboard and mouse >>> are not responding) after wireless stuff start working for a while. At >>> first, I consider it caused by my modification to ath. But this strange >>> thing can also happen in a head kernel (r255382). Attachment[1] is some >>> useful messages just before it happens. By the way, I use a AR9227 device. >>> >>> And, I found that, for aggregation scenario, ath gathers tx information >>> and update the ratectl states. So, what we can do to net80211 to let it >>> support aggregation? >>> >>> Thanks! >>> >>> Chenchong >>> >>> >>> On Tue, Sep 3, 2013 at 9:29 AM, Chenchong Qin wrote: >>> >>>> OK! >>>> >>>> Thanks! :-) >>>> >>>> Chenchong >>>> >>>> >>>> On Tue, Sep 3, 2013 at 1:56 AM, Adrian Chadd wrote: >>>> >>>>> Hi! >>>>> >>>>> You can declare an mbuf tag and use that. Look at M_TXCB in net80211 >>>>> and how mbuf tags are added. >>>>> >>>>> I've long thought about adding a net80211 mbuf tag to represent -all- >>>>> of the tx related state - TX callback, rate control, rate completion, >>>>> aggregation state, retry count, etc. That way all the drivers can use it. >>>>> >>>>> >>>>> >>>>> -adrian >>>>> >>>>> >>>> >>> >> > From owner-freebsd-wireless@FreeBSD.ORG Fri Sep 13 19:37:31 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 AAAE367C for ; Fri, 13 Sep 2013 19:37:31 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 359B82CF2 for ; Fri, 13 Sep 2013 19:37:31 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id f12so1593428wgh.14 for ; Fri, 13 Sep 2013 12:37:29 -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=48npdcMhFKKp6HIufvjy2BSDeXHTTAhc2IMR7Rdn2vw=; b=TmjoPQpaX3dkUYHjNyL5c4/3d+RrEW+Dr58LGHIhkRhuV2k2OKIfEBJNnaYFS8Knj5 1uM516pbPIplwuPwoNG3AN2g1gxyME3Gd9wPZpYrHICKxdiwH8x4p2SxjfW3vCplj9ZU V2EG6hCvbuNSQdZaqie9XN3lyhDblrVMPyyCId4T5Aa7jM21yigo+1Nc1lcxVH9UPtYn fgO5aWEd2c5YplqcfJC/LwVIPz1Bu0sxIbJR5ShkTzqxw5WoD+K2uBvMnTqImz3Rtv4B UwopINOiOQM/QUryucPbv1qoC20LDJKZ9f6Pv8mTqPUub6aKaeaIO8rdwxHxJxHXXZPw JS8w== MIME-Version: 1.0 X-Received: by 10.180.211.206 with SMTP id ne14mr3934738wic.30.1379101049592; Fri, 13 Sep 2013 12:37:29 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Fri, 13 Sep 2013 12:37:29 -0700 (PDT) In-Reply-To: References: Date: Fri, 13 Sep 2013 12:37:29 -0700 X-Google-Sender-Auth: udLdDaSNhDI0vIAJv1mYhYaiUHk Message-ID: Subject: Re: Chenchong's work on net80211_ratectl From: Adrian Chadd To: Chenchong Qin Content-Type: text/plain; charset=ISO-8859-1 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: Fri, 13 Sep 2013 19:37:31 -0000 Sweet, thanks! -adrian On 13 September 2013 09:11, Chenchong Qin wrote: > Hi! > > Here is some updates. > > Another member is added to ieee80211_rc_info to record value of the > maximum aggregate size. Then, in aggregation scenario, ratectl algo can > inform aggregation selection code of proper maximum aggregate size. > > Per-vap ratectl statistics is exported through sysctl. When > ieee80211_ratectl_init() is called, this statistics api is attached. It's > convenient to implement the per-device api -- just traverse the vap list > and call per-vap api for each vap. But, we know that ratectl of net80211 > provides service to vap-granularity object, not to device directly. So, is > it more suitable to implement the per-device api in device driver (i.e. > attach per-device api when attaching the device)? > > Code will be posted later. > > Thanks! > > Chenchong > > > On Thu, Sep 12, 2013 at 2:05 AM, Adrian Chadd wrote: > >> Hi, >> >> For now, yes, you have to assume that you won't always get a response for >> a rate lookup. The buffer may be sent with NOACK set, it may be deleted >> during a channel change or scan, etc. >> >> And yes - the rate control lookup stuff for aggregate frames is a bit >> messy. It would be nice for the rate control code to return the rate _and_ >> the maximum aggregate size, in case the aggregation selection wants to cap >> how long frames are at the given choice. >> >> >> >> -adrian >> >> >> >> On 11 September 2013 10:29, Chenchong Qin wrote: >> >>> Hi! >>> >>> I've added some aggregation support here! >>> >>> At first I intend to pass subframe informations(nframes, per-subframe >>> length etc.) >>> to the ratectl api. But it seems to be a paradox that rate lookup must >>> be performed >>> before the ampdu is formed (aggregation limit based on the rate control >>> decision >>> is need) and subframe informations can be obtain only after the ampdu is >>> formed. >>> So, I add a new ieee80211_rc_info flag to ieee80211_ratectl to let it >>> distinguish >>> aggregation and non-aggregation scenarios. If rate lookup is called in >>> an aggregation >>> scenario, this flag is set. Then, ratectl algo knows that it's now >>> finding rates for an >>> ampdu and the framelen which records len of the first frame can be >>> ignored. When >>> it comes to complete period, tx status that shows number of subframes >>> been sent >>> and number of subframes been successfully received is passed to the >>> ratectl api. >>> >>> I also get a question here - whether one tx that doesn't perform rate >>> lookup will call >>> the complete procedure? >>> >>> Thanks! >>> >>> Chenchong >>> >>> >>> On Sun, Sep 8, 2013 at 11:18 PM, Chenchong Qin wrote: >>> >>>> Hi! >>>> >>>> I've added the common ratectl state as an mbuf tag! >>>> >>>> After days of frustration (compile errors, boot failed, kernel panics, >>>> suddenly kernel freezing...), it seems that ath now can use 11n-aware >>>> net80211 ratectl api to do rate control. Attachment[0] is the diff of >>>> modifications to dev/ath. Changes to net80211 is minor this time. Just add >>>> some debug msgs to it. Please reference my gsoc svn repo >>>> . >>>> >>>> It's worth mentioning that sometimes the kernel will "freezing" (it >>>> looks like all things stop working, screen is freezing, keyboard and mouse >>>> are not responding) after wireless stuff start working for a while. At >>>> first, I consider it caused by my modification to ath. But this strange >>>> thing can also happen in a head kernel (r255382). Attachment[1] is some >>>> useful messages just before it happens. By the way, I use a AR9227 device. >>>> >>>> And, I found that, for aggregation scenario, ath gathers tx information >>>> and update the ratectl states. So, what we can do to net80211 to let it >>>> support aggregation? >>>> >>>> Thanks! >>>> >>>> Chenchong >>>> >>>> >>>> On Tue, Sep 3, 2013 at 9:29 AM, Chenchong Qin wrote: >>>> >>>>> OK! >>>>> >>>>> Thanks! :-) >>>>> >>>>> Chenchong >>>>> >>>>> >>>>> On Tue, Sep 3, 2013 at 1:56 AM, Adrian Chadd wrote: >>>>> >>>>>> Hi! >>>>>> >>>>>> You can declare an mbuf tag and use that. Look at M_TXCB in net80211 >>>>>> and how mbuf tags are added. >>>>>> >>>>>> I've long thought about adding a net80211 mbuf tag to represent -all- >>>>>> of the tx related state - TX callback, rate control, rate completion, >>>>>> aggregation state, retry count, etc. That way all the drivers can use it. >>>>>> >>>>>> >>>>>> >>>>>> -adrian >>>>>> >>>>>> >>>>> >>>> >>> >> > From owner-freebsd-wireless@FreeBSD.ORG Sat Sep 14 03:13: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 AE13D68E for ; Sat, 14 Sep 2013 03:13:55 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 453E82D3A for ; Sat, 14 Sep 2013 03:13:55 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id m15so1422444wgh.3 for ; Fri, 13 Sep 2013 20:13:53 -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=Ly8zoP1HrOrMMqMwKSA/NnX0BQE17utcAIVSCEkKMA0=; b=e7wmhErLXvO0KRB5QQrI9H8ea79sqPAWZ9cNmHwqTky49urTLtgsWbzxaUrFL3UtUD KhLbEszp3taiR/itSIDZtrFXPTB5ME8WQq1CeVJMOq2kNsNhZSnymjiSLKpkbpzMpg7U Y+LcniuGqhu+/daJs+IUdxjAGA12HpVGOoCPfEWLFFQxBgM5zFbI+m6iCNDQmzxDNHSr YJ9qf1TDZ4JNIdrnCf/A/sjBtFfDLseYTU/JssA5KNqSuW2xZ+zZmuEXrJ9cLQbSi3dq 0Yze/2XZisIM6zFBsG58jS61mGPOGH4G512qmh397EPx+drxKMtO933QDQ3lMqZijXCH 2cvQ== MIME-Version: 1.0 X-Received: by 10.194.93.3 with SMTP id cq3mr13588700wjb.26.1379128433230; Fri, 13 Sep 2013 20:13:53 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Fri, 13 Sep 2013 20:13:53 -0700 (PDT) In-Reply-To: <000901ceaf71$155c9f80$4015de80$@info> References: <000901ceaf71$155c9f80$4015de80$@info> Date: Fri, 13 Sep 2013 20:13:53 -0700 X-Google-Sender-Auth: bbEure3G76Xsk2JNXhXW8fQ_Le8 Message-ID: Subject: Re: [iwn] how do we tell the difference between the 6200/6205 and 6230/6235? From: Adrian Chadd To: Cedric GROSS Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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: Sat, 14 Sep 2013 03:13:55 -0000 Ok. I'll try to make the merge clashes minimal, but it may be a bit difficult since I want to fix this before 10, but I don't want to merge in your whole patch for 10.0-RELEASE. So merging in the rest of it will have to wait until -HEAD is released for committing again (and that will be in about 3 weeks.) Would you mind resyncing what you have in your git repo against what's in HEAD, so I can roll a diff and check it out? Thanks! -adrian On 11 September 2013 21:32, Cedric GROSS wrote: > >De : adrian.chadd@gmail.com [mailto:adrian.chadd@gmail.com] De la part d= e > Adrian Chadd > >Envoy=E9 : jeudi 12 septembre 2013 06:00 > >=C0 : freebsd-wireless@freebsd.org; Cedric GROSS > >Objet : [iwn] how do we tell the difference between the 6200/6205 and > 6230/6235? > > > >Hiya, > > > >According to the intel website, the 6200/6205 do not have bluetooth, but > the 6230/6235 do. > > > >Now, I don't know yet whether they support external bluetooth coex but I > guess for now we can just not send the setup >commands. > > > >So, how do we distinguish between these NICs? There only seems to be a > small subset of hardware IDs in the driver.. > > We need to test subdevice ID, it's why I register all subdevice ID in > if_iwn_devid.h. > > If you have a look in my last full diff, you will see that driver > configuration is based on that (iwn_config_specific in if_iwn.c). > > > > >thanks, > > > > > >-adrian > > Cedric > > > From owner-freebsd-wireless@FreeBSD.ORG Sat Sep 14 03:52:28 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 490FAAD3; Sat, 14 Sep 2013 03:52:28 +0000 (UTC) (envelope-from qinchenchong@gmail.com) Received: from mail-vc0-x22e.google.com (mail-vc0-x22e.google.com [IPv6:2607:f8b0:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A40192E8C; Sat, 14 Sep 2013 03:52:27 +0000 (UTC) Received: by mail-vc0-f174.google.com with SMTP id gd11so1557287vcb.19 for ; Fri, 13 Sep 2013 20:52:26 -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=5Klv4ugY1tdQsysl54F8VpO1bcaTj7U/8arApj5Wqwc=; b=Fvyis86Z39KUov4tOsCFtSYLN5hG9J2Le+ya/j4/DObYLMROhIvBmH1ajYgC/I2Dxl y1c4hBuIxsmxhnora9mZ4a1fIXVZVAkcjYFJyf1RpA3fSliJd5JKG6M0scm/dx4gMY8u zaosIRh/K0r1ZuG0VwQ6p/a0AjbzKHH8J/4TysrMuh8XDMVl4zo0KxD0OApUFEPzc1cx 2Ar7sZ0CNtceckcQmoIDusUfER75NsBwnmAo15fFNqwazIgU2qQCy4tJ4cZ+u705C5+Z 1UNqt6wnhraPUllB7+n3MDIIkGQ9/MDiQ+MdDKMz4wpspbo76ojyhKr836WGoYUi8kgG 7hHA== MIME-Version: 1.0 X-Received: by 10.52.34.40 with SMTP id w8mr12831376vdi.7.1379130746637; Fri, 13 Sep 2013 20:52:26 -0700 (PDT) Received: by 10.220.182.68 with HTTP; Fri, 13 Sep 2013 20:52:26 -0700 (PDT) In-Reply-To: References: Date: Sat, 14 Sep 2013 11:52:26 +0800 Message-ID: Subject: Re: Chenchong's work on net80211_ratectl From: Chenchong Qin To: Adrian Chadd Content-Type: multipart/mixed; boundary=20cf307cfec04094f304e64fe611 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: Sat, 14 Sep 2013 03:52:28 -0000 --20cf307cfec04094f304e64fe611 Content-Type: text/plain; charset=ISO-8859-1 Hi, Here is latest update. Per-device ratectl statistics is implemented in ath and attached when ath is attaching. Thanks! Chenchong On Sat, Sep 14, 2013 at 3:37 AM, Adrian Chadd wrote: > Sweet, thanks! > > > > -adrian > > > > On 13 September 2013 09:11, Chenchong Qin wrote: > >> Hi! >> >> Here is some updates. >> >> Another member is added to ieee80211_rc_info to record value of the >> maximum aggregate size. Then, in aggregation scenario, ratectl algo can >> inform aggregation selection code of proper maximum aggregate size. >> >> Per-vap ratectl statistics is exported through sysctl. When >> ieee80211_ratectl_init() is called, this statistics api is attached. It's >> convenient to implement the per-device api -- just traverse the vap list >> and call per-vap api for each vap. But, we know that ratectl of net80211 >> provides service to vap-granularity object, not to device directly. So, is >> it more suitable to implement the per-device api in device driver (i.e. >> attach per-device api when attaching the device)? >> >> Code will be posted later. >> >> Thanks! >> >> Chenchong >> >> >> On Thu, Sep 12, 2013 at 2:05 AM, Adrian Chadd wrote: >> >>> Hi, >>> >>> For now, yes, you have to assume that you won't always get a response >>> for a rate lookup. The buffer may be sent with NOACK set, it may be deleted >>> during a channel change or scan, etc. >>> >>> And yes - the rate control lookup stuff for aggregate frames is a bit >>> messy. It would be nice for the rate control code to return the rate _and_ >>> the maximum aggregate size, in case the aggregation selection wants to cap >>> how long frames are at the given choice. >>> >>> >>> >>> -adrian >>> >>> >>> >>> On 11 September 2013 10:29, Chenchong Qin wrote: >>> >>>> Hi! >>>> >>>> I've added some aggregation support here! >>>> >>>> At first I intend to pass subframe informations(nframes, per-subframe >>>> length etc.) >>>> to the ratectl api. But it seems to be a paradox that rate lookup must >>>> be performed >>>> before the ampdu is formed (aggregation limit based on the rate control >>>> decision >>>> is need) and subframe informations can be obtain only after the ampdu >>>> is formed. >>>> So, I add a new ieee80211_rc_info flag to ieee80211_ratectl to let it >>>> distinguish >>>> aggregation and non-aggregation scenarios. If rate lookup is called in >>>> an aggregation >>>> scenario, this flag is set. Then, ratectl algo knows that it's now >>>> finding rates for an >>>> ampdu and the framelen which records len of the first frame can be >>>> ignored. When >>>> it comes to complete period, tx status that shows number of subframes >>>> been sent >>>> and number of subframes been successfully received is passed to the >>>> ratectl api. >>>> >>>> I also get a question here - whether one tx that doesn't perform rate >>>> lookup will call >>>> the complete procedure? >>>> >>>> Thanks! >>>> >>>> Chenchong >>>> >>>> >>>> On Sun, Sep 8, 2013 at 11:18 PM, Chenchong Qin wrote: >>>> >>>>> Hi! >>>>> >>>>> I've added the common ratectl state as an mbuf tag! >>>>> >>>>> After days of frustration (compile errors, boot failed, kernel panics, >>>>> suddenly kernel freezing...), it seems that ath now can use 11n-aware >>>>> net80211 ratectl api to do rate control. Attachment[0] is the diff of >>>>> modifications to dev/ath. Changes to net80211 is minor this time. Just add >>>>> some debug msgs to it. Please reference my gsoc svn repo >>>>> . >>>>> >>>>> It's worth mentioning that sometimes the kernel will "freezing" (it >>>>> looks like all things stop working, screen is freezing, keyboard and mouse >>>>> are not responding) after wireless stuff start working for a while. At >>>>> first, I consider it caused by my modification to ath. But this strange >>>>> thing can also happen in a head kernel (r255382). Attachment[1] is some >>>>> useful messages just before it happens. By the way, I use a AR9227 device. >>>>> >>>>> And, I found that, for aggregation scenario, ath gathers tx >>>>> information and update the ratectl states. So, what we can do to net80211 >>>>> to let it support aggregation? >>>>> >>>>> Thanks! >>>>> >>>>> Chenchong >>>>> >>>>> >>>>> On Tue, Sep 3, 2013 at 9:29 AM, Chenchong Qin wrote: >>>>> >>>>>> OK! >>>>>> >>>>>> Thanks! :-) >>>>>> >>>>>> Chenchong >>>>>> >>>>>> >>>>>> On Tue, Sep 3, 2013 at 1:56 AM, Adrian Chadd wrote: >>>>>> >>>>>>> Hi! >>>>>>> >>>>>>> You can declare an mbuf tag and use that. Look at M_TXCB in net80211 >>>>>>> and how mbuf tags are added. >>>>>>> >>>>>>> I've long thought about adding a net80211 mbuf tag to represent >>>>>>> -all- of the tx related state - TX callback, rate control, rate completion, >>>>>>> aggregation state, retry count, etc. That way all the drivers can use it. >>>>>>> >>>>>>> >>>>>>> >>>>>>> -adrian >>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> > --20cf307cfec04094f304e64fe611 Content-Type: application/octet-stream; name="20130914-net80211-ratectl-ath.diff" Content-Disposition: attachment; filename="20130914-net80211-ratectl-ath.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hlkaqstj0 SW5kZXg6IGRldi9yYWwvcnQyODYwLmMKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gZGV2L3JhbC9ydDI4NjAuYwko cmV2aXNpb24gMjU0ODI2KQorKysgZGV2L3JhbC9ydDI4NjAuYwkod29ya2luZyBjb3B5KQpAQCAt NDg0LDcgKzQ4NCw4IEBACiAJLyogSFcgc3VwcG9ydHMgdXAgdG8gMjU1IFNUQXMgKDAtMjU0KSBp biBIb3N0QVAgYW5kIElCU1MgbW9kZXMgKi8KIAl2YXAtPml2X21heF9haWQgPSBtaW4oSUVFRTgw MjExX0FJRF9NQVgsIFJUMjg2MF9XQ0lEX01BWCk7CiAKLQlpZWVlODAyMTFfcmF0ZWN0bF9pbml0 KHZhcCk7CisJLyogWFhYIFRPRE8gZmlsbCB0aGUgY2FwICovCisJaWVlZTgwMjExX3JhdGVjdGxf aW5pdCh2YXAsIDApOwogCS8qIGNvbXBsZXRlIHNldHVwICovCiAJaWVlZTgwMjExX3ZhcF9hdHRh Y2godmFwLCBpZWVlODAyMTFfbWVkaWFfY2hhbmdlLCBpZWVlODAyMTFfbWVkaWFfc3RhdHVzKTsK IAlpZiAoVEFJTFFfRklSU1QoJmljLT5pY192YXBzKSA9PSB2YXApCkBAIC0xMTIxLDExICsxMTIy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vciB0aGUgY3VycmVu dAorCQkgKiBub2RlLiAKKwkJICogUmF0ZSBjb250cm9sIGFsZ28gY2FuJ3QgY29udHJvbCBUWCBw b3dlciBieSBub3cuCisJCSAqLworCQlyY1tpXS50eF9wb3dlcl9jYXAgPSBpZWVlODAyMTFfZ2V0 X25vZGVfdHhwb3dlcihuaSk7CisJCQorCX0KKwlJRUVFODAyMTFfTk9URShuaS0+bmlfdmFwLCBJ RUVFODAyMTFfTVNHX1JBVEVDVEwsIG5pLAorCSAgICAiJXM6IGZsYWdzOiByY1swXToweCUwOHgs IHJjWzFdOjB4JTA4eCwgIgorCQkicmNbMl06MHglMDh4LCByY1szXToweCUwOHhcbiIsIF9fZnVu Y19fLCAKKwkJcmNbMF0uZmxhZ3MsIHJjWzFdLmZsYWdzLCByY1syXS5mbGFncywgcmNbM10uZmxh Z3MpOworfQorCkluZGV4OiBuZXQ4MDIxMS9pZWVlODAyMTFfcmF0ZWN0bC5oCj09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0K LS0tIG5ldDgwMjExL2llZWU4MDIxMV9yYXRlY3RsLmgJKHJldmlzaW9uIDI1NDgyNikKKysrIG5l dDgwMjExL2llZWU4MDIxMV9yYXRlY3RsLmgJKHdvcmtpbmcgY29weSkKQEAgLTEsNSArMSw2IEBA CiAvKi0KICAqIENvcHlyaWdodCAoYykgMjAxMCBSdWkgUGF1bG8gPHJwYXVsb0BGcmVlQlNELm9y Zz4KKyAqIENvcHlyaWdodCAoYykgMjAxMyBDaGVuY2hvbmcgUWluIDxjY3FpbkBGcmVlQlNELm9y Zz4KICAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuCiAgKgogICogUmVkaXN0cmlidXRpb24gYW5kIHVz ZSBpbiBzb3VyY2UgYW5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CkBAIC0yNCw2ICsy NSw4IEBACiAgKgogICogJEZyZWVCU0QkCi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OworfQorCitzdGF0aWMgdm9pZCBfX2lubGluZQoraWVlZTgwMjExX3JhdGVjdGxf dXBkYXRlX3N0YXQoY29uc3Qgc3RydWN0IGllZWU4MDIxMXZhcCAqdmFwLAorCQljb25zdCBzdHJ1 Y3QgaWVlZTgwMjExX3JjX2luZm8gKnJjX2luZm8pCit7CisJc3RydWN0IGllZWU4MDIxMV9yY19z dGF0ICogaXJzID0gSUVFRTgwMjExX1JBVEVDVExfU1RBVCh2YXApOworCWlycy0+aXJzX3R4Y250 ICs9IHJjX2luZm8tPmlyaV90eGNudDsKKwlpcnMtPmlyc19mYWlsY250ICs9IHJjX2luZm8tPmly aV9mYWlsY250OworCWlycy0+aXJzX3JldHJ5Y250ICs9IHJjX2luZm8tPmlyaV9yZXRyeWNudDsK KwlpcnMtPmlyc19zaG9ydHJldHJ5ICs9IHJjX2luZm8tPmlyaV9zaG9ydHJldHJ5OworCWlycy0+ aXJzX2xvbmdyZXRyeSArPSByY19pbmZvLT5pcmlfbG9uZ3JldHJ5OworfQorCitzdGF0aWMgdm9p ZCBfX2lubGluZQoraWVlZTgwMjExX3JhdGVjdGxfcmNfaW5mb19zZXQoc3RydWN0IGllZWU4MDIx MV9yY19pbmZvICpyY19pbmZvLAorCQl1aW50OF90IHR4Y250LCB1aW50OF90IGZhaWxjbnQsIHVp bnQzMl90IGZyYW1lbGVuLAorCQl1aW50OF90IHNob3J0cmV0cnksIHVpbnQ4X3QgbG9uZ3JldHJ5 LAorCQl1aW50OF90IGZpbmFsdHNpLCB1aW50OF90IHR4cmF0ZSkKK3sKKwlyY19pbmZvLT5pcmlf dHhjbnQgPSB0eGNudDsKKwlyY19pbmZvLT5pcmlfZmFpbGNudCA9IGZhaWxjbnQ7CisJcmNfaW5m by0+aXJpX29rY250ID0gdHhjbnQgLSBmYWlsY250OworCXJjX2luZm8tPmlyaV9mcmFtZWxlbiA9 IGZyYW1lbGVuOworCXJjX2luZm8tPmlyaV9zaG9ydHJldHJ5ID0gc2hvcnRyZ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3NhbXBsZV9kZWluaXQoc3RydWN0IGllZWU4MDIxMXZhcCAqdmFw KQoreworCWZyZWUodmFwLT5pdl9ycywgTV84MDIxMV9SQVRFQ1RMKTsKK30KKworc3RhdGljIGNv bnN0IHN0cnVjdCB0eHNjaGVkdWxlICptcnJfc2NoZWR1bGVzW0lFRUU4MDIxMV9NT0RFX01BWCsy XSA9IHsKKwlOVUxMLAkJLyogSUVFRTgwMjExX01PREVfQVVUTyAqLworCXNlcmllc18xMWEsCS8q IElFRUU4MDIxMV9NT0RFXzExQSAqLworCXNlcmllc18xMWcsCS8qIElFRUU4MDIxMV9NT0RFXzEx QiAqLworCXNlcmllc18xMWcsCS8qIElFRUU4MDIxMV9NT0RFXzExRyAqLworCU5VTEwsCQkvKiBJ RUVFODAyMTFfTU9ERV9GSCAqLworCXNlcmllc18xMWEsCS8qIElFRUU4MDIxMV9NT0RFX1RVUkJP X0EgKi8KKwlzZXJpZXNfMTFnLAkvKiBJRUVFODAyMTFfTU9ERV9UVVJCT19HICovCisJc2VyaWVz XzExYSwJLyogSUVFRTgwMjExX01PREVfU1RVUkJPX0EgKi8KKwlzZXJpZXNfMTFuYSwJLyogSUVF RTgwMjExX01PREVfMTFOQSAqLworCXNlcmllc18xMW5nLAkvKiBJRUVFODAyMTFfTU9ERV8xMU5H ICovCisJc2VyaWVzX2hhbGYsCS8qIElFRUU4MDIxMV9NT0RFX0hBTEYgKi8KKwlzZXJpZXNfcXVh cnRlciwJLyogSUVFRTgwMjExX01PREVfUVVBUlRFUiAqLworfTsKKworc3RhdGljIHZvaWQKK3Nh bXBsZV9ub2RlX2luaXQoc3RydWN0IGllZWU4MDIxMV9ub2RlICpuaSkKK3sKKyNkZWZpbmUJUkFU RShfaXgpCShuaS0+bmlfcmF0ZXMucnNfcmF0ZXNbKF9peCldICYgSUVFRTgwMjExX1JBVEVfVkFM KQorI2RlZmluZQlET1QxMVJBVEUoX2l4KQkocnQtPmluZm9bKF9peCldLmRvdDExUmF0ZSAmIElF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 eyA0LE5BMSggIDI2KSwgMyxOQTEoMTkuNSksIDQsTkExKCA2LjUpLCAyLE5BMSg2LjUpIH0sICAv KiAgMjZNYi9zICovCisJeyA0LE5BMSggIDM5KSwgMyxOQTEoICAyNiksIDQsTkExKDE5LjUpLCAy LE5BMSg2LjUpIH0sICAvKiAgMzlNYi9zICovCisJeyA0LE5BMSggIDUyKSwgMyxOQTEoICAzOSks IDQsTkExKCAgMjYpLCAyLE5BMSg2LjUpIH0sICAvKiAgNTJNYi9zICovCisJeyA0LE5BMSg1OC41 KSwgMyxOQTEoICA1MiksIDQsTkExKCAgMzkpLCAyLE5BMSggMTMpIH0sICAvKjU4LjVNYi9zICov CisJeyA0LE5BMSggIDY1KSwgMyxOQTEoNTguNSksIDQsTkExKCAgNTIpLCAyLE5BMSggMTMpIH0s ICAvKiAgNjVNYi9zICovCisKKwkvKiAyIHN0cmVhbSByYXRlcyAqLworCisJeyAzLE5BMiggIDEz KSwgMyxOQTIoICAxMyksIDAsTkEyKCAgMTMpLCAwLE5BMiggMTMpIH0sICAvKiAgMTNNYi9zICov CisJeyA0LE5BMiggIDI2KSwgMyxOQTIoICAxMyksIDQsTkEyKCAgMTMpLCAwLE5BMiggMTMpIH0s ICAvKiAgMjZNYi9zICovCisJeyA0LE5BMiggIDM5KSwgMyxOQTIoICAyNiksIDQsTkEyKCAgMTMp LCAyLE5BMiggMTMpIH0sICAvKiAgMzlNYi9zICovCisJeyA0LE5BMiggIDUyKSwgMyxOQTIoICAz OSksIDQsTkEyKCAgMjYpLCAyLE5BMiggMTMpIH0sICAvKiAgNTJNYi9zICovCisJeyA0LE5BMigg IDc4KSwgMyxOQTIoICA1MiksIDQsTkEyKCAgMzkpLCAyLE5BMiggMTMpIH0sICAvKiAgNzhNYi9z ICovCisJeyA0LE5BMiggMTA0KSwgMyxOQTIoICA3OCksIDQsTkEyKCAgNTIpLCAyLE5BMiggMTMp IH0sICAvKiAxMDRNYi9zICovCisJeyA0LE5BMiggMTE3KSwgM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SA9PSAxOTUpPyAzNSA6IDApKSkpKSkpKQorCitzdGF0aWMgY29uc3Qgc3RydWN0IHR4c2NoZWR1 bGUgc2VyaWVzXzExbmdbXSA9IHsKKwl7IDMsRyggMSksIDMsRyggIDEpLCAwLEcoICAxKSwgMCxH KCAxKSB9LCAgICAgICAvKiAgIDFNYi9zICovCisJeyA0LEcoIDIpLCAzLEcoICAxKSwgNCxHKCAg MSksIDAsRyggMSkgfSwgICAgICAgLyogICAyTWIvcyAqLworCXsgNCxHKDUuNSksMyxHKCAgMiks IDQsRyggIDEpLCAyLEcoIDEpIH0sICAgICAgIC8qIDUuNU1iL3MgKi8KKwl7IDQsRygxMSksIDMs Ryg1LjUpLCA0LEcoICAyKSwgMixHKCAxKSB9LCAgICAgICAvKiAgMTFNYi9zICovCisJeyA0LEco IDYpLCAzLEcoNS41KSwgNCxHKCAgMiksIDIsRyggMSkgfSwgICAgICAgLyogICA2TWIvcyAqLwor CXsgNCxHKCA5KSwgMyxHKCAgNiksIDQsRyg1LjUpLCAyLEcoIDEpIH0sICAgICAgIC8qICAgOU1i L3MgKi8KKwl7IDQsRygxMiksIDMsRyggMTEpLCA0LEcoNS41KSwgMixHKCAxKSB9LCAgICAgICAv KiAgMTJNYi9zICovCisJeyA0LEcoMTgpLCAzLEcoIDEyKSwgNCxHKCAxMSksIDIsRyggMSkgfSwg ICAgICAgLyogIDE4TWIvcyAqLworCXsgNCxHKDI0KSwgMyxHKCAxOCksIDQsRyggMTIpLCAyLEco IDEpIH0sICAgICAgIC8qICAyNE1iL3MgKi8KKwl7IDQsRygzNiksIDMsRyggMjQpLCA0LEcoIDE4 KSwgMixHKCAxKSB9LCAgICAgICAvKiAgMzZNYi9zICovCisJeyA0LEcoNDgpLCAzLEcoIDM2KSwg NCxHKCAyNCksIDIsRyggMSkgfSwgICAgICAgLyogIDQ4TWIvcyAqLworCXsgNCxHKDU0KSwgMyxH KCA0OCksIDQsRyggMzYpLCAyLEcoIDEpIH0sICAgICAgIC8qIC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HMyggIDc4KSwgMCxORzMoMTkuNSkgfSwgIC8qICAx NTZNYi9zICovCisJeyAzLE5HMygxNzUuNSksIDMsTkczKCAxNTYpLCAwLE5HMyggMTE3KSwgMCxO RzMoICAzOSkgfSwgIC8qICAxNzVNYi9zICovCisJeyAzLE5HMyggMTk1KSwgMyxORzMoIDE5NSks IDAsTkczKCAxNTYpLCAwLE5HMyg1OC41KSB9LCAgLyogMTk1TWIvcyAqLworCit9OworI3VuZGVm IEcKKyN1bmRlZiBORzMKKyN1bmRlZiBORzIKKyN1bmRlZiBORzEKKworI2RlZmluZSBIKF9yKSBc CisgICAgKCgoX3IpID09IDMpICAgPyAwIDogKCgoX3IpID09IDQuNSkgPyAxIDogKCgoX3IpID09 IDYpICA/IDIgOiBcCisgICAgKCgoX3IpID09IDkpICAgPyAzIDogKCgoX3IpID09IDEyKSAgPyA0 IDogKCgoX3IpID09IDE4KSA/IDUgOiBcCisgICAgKCgoX3IpID09IDI0KSAgPyA2IDogKCgoX3Ip ID09IDI3KSAgPyA3IDogMCkpKSkpKSkpCitzdGF0aWMgY29uc3Qgc3RydWN0IHR4c2NoZWR1bGUg c2VyaWVzX2hhbGZbXSA9IHsKKwl7IDMsSCggMyksIDMsSCggIDMpLCAwLEgoICAzKSwgMCxIKCAz KSB9LAkvKiAgIDNNYi9zICovCisJeyA0LEgoNC41KSwzLEgoICAzKSwgNCxIKCAgMyksIDAsSCgg MykgfSwJLyogNC41TWIvcyAqLworCXsgNCxIKCA2KSwgMyxIKCAgMyksIDQsSCggIDMpLCAwLEgo IDMpIH0sCS8qICAgNk1iL3MgKi8KKwl7IDQsSCggOSksIDMsSCggIDYpLCA0LEgoICAzKSwgMixI KCAzKSB9LAkvKiAgIDlNYi9zICovCisJeyA0LEgoMTIpLCAzLEgoICA5KSwgNCxIKCAgNiksIDIs SCggMykgfSwJLyogIDEyTWIvcyAqLworCXsgNCxIKDE4KSwgMyxIKCAxMiksIDQsSCggIDkpLCAy LEgoIDMpIH0sCS8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jdCBpZWVlODAyMTFfcmNfc3RhdCByc3NhZGFwdF9zdGF0OwogCWNvbnN0IHN0cnVjdCBpZWVl ODAyMTF2YXAgKnZhcDsKIAlpbnQJaW50ZXJ2YWw7CQkJLyogdXBkYXRlIGludGVydmFsICh0aWNr cykgKi8KIH07CkluZGV4OiBuZXQ4MDIxMS9pZWVlODAyMTFfYW1yci5oCj09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0t IG5ldDgwMjExL2llZWU4MDIxMV9hbXJyLmgJKHJldmlzaW9uIDI1NDgyNikKKysrIG5ldDgwMjEx L2llZWU4MDIxMV9hbXJyLmgJKHdvcmtpbmcgY29weSkKQEAgLTIwLDYgKzIwLDcgQEAKICNpZm5k ZWYgX05FVDgwMjExX0lFRUU4MDIxMV9BTVJSX0hfCiAjZGVmaW5lIF9ORVQ4MDIxMV9JRUVFODAy MTFfQU1SUl9IXwogCisjaW5jbHVkZSA8bmV0ODAyMTEvaWVlZTgwMjExX3JhdGVjdGwuaD4KIC8q LQogICogTmFpdmUgaW1wbGVtZW50YXRpb24gb2YgdGhlIEFkYXB0aXZlIE11bHRpIFJhdGUgUmV0 cnkgYWxnb3JpdGhtOgogICoKQEAgLTM1LDYgKzM2LDcgQEAKIHN0cnVjdCBpZWVlODAyMTF2YXA7 CiAKIHN0cnVjdCBpZWVlODAyMTFfYW1yciB7CisJc3RydWN0IGllZWU4MDIxMV9yY19zdGF0IGFt cnJfc3RhdDsKIAl1X2ludAlhbXJyX21pbl9zdWNjZXNzX3RocmVzaG9sZDsKIAl1X2ludAlhbXJy X21heF9zdWNjZXNzX3RocmVzaG9sZDsKIAlpbnQJYW1ycl9pbnRlcnZhbDsJCS8qIHVwZGF0ZSBp bnRlcnZhbCAodGlja3MpICovCg== --20cf307cfec04094f304e64fe611-- From owner-freebsd-wireless@FreeBSD.ORG Sat Sep 14 15:21:08 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 34C27BAD for ; Sat, 14 Sep 2013 15:21:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wi0-x235.google.com (mail-wi0-x235.google.com [IPv6:2a00:1450:400c:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B171D2BD9 for ; Sat, 14 Sep 2013 15:21:07 +0000 (UTC) Received: by mail-wi0-f181.google.com with SMTP id ex4so1924909wid.2 for ; Sat, 14 Sep 2013 08:21:05 -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=IxwK+efR59Htrbx9Iv53P6ODxg2ZnWHYZZ5cNmyldP8=; b=OPnb5McARP8FJm2aBG4khF6cylorHekExHMIc0VLLuAH8B/aAD4yQiXzjVmH8bUmis EQhj0WLguPP53qets1rP82K/4yfervghFCPPajuIkAChebXeJf/+UyfAA1+suz406FZZ M6xNuVdyBhG8a0Kyg1vFF0FI8qPXXUFQ8vWyrztTjNCrQLEsA19L4lZ+hGEnTxq6rIl1 RpbtDYWYO5dyykNFD1eBtNa5ZVTA3NPJC2TpsB8qVZO8vAQVe8INOn9ti2xC6l34ejYT 9vDKTNwmMVLi7d1QE5Hy3Gws3aJ+4kN2e6uFAJVFWqDmWEQe5bkmb3ndMmyV5x431Fz1 yq5w== MIME-Version: 1.0 X-Received: by 10.194.158.67 with SMTP id ws3mr15291088wjb.5.1379172065866; Sat, 14 Sep 2013 08:21:05 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.73.133 with HTTP; Sat, 14 Sep 2013 08:21:05 -0700 (PDT) In-Reply-To: References: Date: Sat, 14 Sep 2013 08:21:05 -0700 X-Google-Sender-Auth: 3oONS0qhDBVhfxygjkwwkqSzj24 Message-ID: Subject: Re: Chenchong's work on net80211_ratectl From: Adrian Chadd To: Chenchong Qin Content-Type: text/plain; charset=ISO-8859-1 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: Sat, 14 Sep 2013 15:21:08 -0000 Ah, cool! I see you've only just made the other drivers compile; what's required to make them work? i guess a call to ieee80211_ratectl_rc_info_set() ? Maybe you should add a ieee80211_ratectl_rc_info_set_mbuf() helper that does the "lookup tag; if one exists use it else use a temporary one" code that you put in if_ath.c, if_ath_tx.c. Other than that, this is looking very good! thankyou! -adrian On 13 September 2013 20:52, Chenchong Qin wrote: > Hi, > > Here is latest update. Per-device ratectl statistics is implemented in ath > and attached when ath is attaching. > > Thanks! > > Chenchong > > > On Sat, Sep 14, 2013 at 3:37 AM, Adrian Chadd wrote: > >> Sweet, thanks! >> >> >> >> -adrian >> >> >> >> On 13 September 2013 09:11, Chenchong Qin wrote: >> >>> Hi! >>> >>> Here is some updates. >>> >>> Another member is added to ieee80211_rc_info to record value of the >>> maximum aggregate size. Then, in aggregation scenario, ratectl algo can >>> inform aggregation selection code of proper maximum aggregate size. >>> >>> Per-vap ratectl statistics is exported through sysctl. When >>> ieee80211_ratectl_init() is called, this statistics api is attached. It's >>> convenient to implement the per-device api -- just traverse the vap list >>> and call per-vap api for each vap. But, we know that ratectl of net80211 >>> provides service to vap-granularity object, not to device directly. So, is >>> it more suitable to implement the per-device api in device driver (i.e. >>> attach per-device api when attaching the device)? >>> >>> Code will be posted later. >>> >>> Thanks! >>> >>> Chenchong >>> >>> >>> On Thu, Sep 12, 2013 at 2:05 AM, Adrian Chadd wrote: >>> >>>> Hi, >>>> >>>> For now, yes, you have to assume that you won't always get a response >>>> for a rate lookup. The buffer may be sent with NOACK set, it may be deleted >>>> during a channel change or scan, etc. >>>> >>>> And yes - the rate control lookup stuff for aggregate frames is a bit >>>> messy. It would be nice for the rate control code to return the rate _and_ >>>> the maximum aggregate size, in case the aggregation selection wants to cap >>>> how long frames are at the given choice. >>>> >>>> >>>> >>>> -adrian >>>> >>>> >>>> >>>> On 11 September 2013 10:29, Chenchong Qin wrote: >>>> >>>>> Hi! >>>>> >>>>> I've added some aggregation support here! >>>>> >>>>> At first I intend to pass subframe informations(nframes, per-subframe >>>>> length etc.) >>>>> to the ratectl api. But it seems to be a paradox that rate lookup must >>>>> be performed >>>>> before the ampdu is formed (aggregation limit based on the rate >>>>> control decision >>>>> is need) and subframe informations can be obtain only after the ampdu >>>>> is formed. >>>>> So, I add a new ieee80211_rc_info flag to ieee80211_ratectl to let it >>>>> distinguish >>>>> aggregation and non-aggregation scenarios. If rate lookup is called in >>>>> an aggregation >>>>> scenario, this flag is set. Then, ratectl algo knows that it's now >>>>> finding rates for an >>>>> ampdu and the framelen which records len of the first frame can be >>>>> ignored. When >>>>> it comes to complete period, tx status that shows number of subframes >>>>> been sent >>>>> and number of subframes been successfully received is passed to the >>>>> ratectl api. >>>>> >>>>> I also get a question here - whether one tx that doesn't perform rate >>>>> lookup will call >>>>> the complete procedure? >>>>> >>>>> Thanks! >>>>> >>>>> Chenchong >>>>> >>>>> >>>>> On Sun, Sep 8, 2013 at 11:18 PM, Chenchong Qin >>>> > wrote: >>>>> >>>>>> Hi! >>>>>> >>>>>> I've added the common ratectl state as an mbuf tag! >>>>>> >>>>>> After days of frustration (compile errors, boot failed, kernel >>>>>> panics, suddenly kernel freezing...), it seems that ath now can use >>>>>> 11n-aware net80211 ratectl api to do rate control. Attachment[0] is the >>>>>> diff of modifications to dev/ath. Changes to net80211 is minor this time. >>>>>> Just add some debug msgs to it. Please reference my gsoc svn repo >>>>>> . >>>>>> >>>>>> It's worth mentioning that sometimes the kernel will "freezing" (it >>>>>> looks like all things stop working, screen is freezing, keyboard and mouse >>>>>> are not responding) after wireless stuff start working for a while. At >>>>>> first, I consider it caused by my modification to ath. But this strange >>>>>> thing can also happen in a head kernel (r255382). Attachment[1] is some >>>>>> useful messages just before it happens. By the way, I use a AR9227 device. >>>>>> >>>>>> And, I found that, for aggregation scenario, ath gathers tx >>>>>> information and update the ratectl states. So, what we can do to net80211 >>>>>> to let it support aggregation? >>>>>> >>>>>> Thanks! >>>>>> >>>>>> Chenchong >>>>>> >>>>>> >>>>>> On Tue, Sep 3, 2013 at 9:29 AM, Chenchong Qin >>>>> > wrote: >>>>>> >>>>>>> OK! >>>>>>> >>>>>>> Thanks! :-) >>>>>>> >>>>>>> Chenchong >>>>>>> >>>>>>> >>>>>>> On Tue, Sep 3, 2013 at 1:56 AM, Adrian Chadd wrote: >>>>>>> >>>>>>>> Hi! >>>>>>>> >>>>>>>> You can declare an mbuf tag and use that. Look at M_TXCB in >>>>>>>> net80211 and how mbuf tags are added. >>>>>>>> >>>>>>>> I've long thought about adding a net80211 mbuf tag to represent >>>>>>>> -all- of the tx related state - TX callback, rate control, rate completion, >>>>>>>> aggregation state, retry count, etc. That way all the drivers can use it. >>>>>>>> >>>>>>>> >>>>>>>> >>>>>>>> -adrian >>>>>>>> >>>>>>>> >>>>>>> >>>>>> >>>>> >>>> >>> >> >