From owner-freebsd-wireless@FreeBSD.ORG Sat Apr 28 08:38:08 2012 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 601B5106564A for ; Sat, 28 Apr 2012 08:38:08 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id 35ED18FC08 for ; Sat, 28 Apr 2012 08:38:08 +0000 (UTC) Received: by dadz14 with SMTP id z14so7084641dad.17 for ; Sat, 28 Apr 2012 01:38:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; bh=XRngM7LUfPUhiQIfqkAVe0Oq9FitnhvFy+xXhJMxoS8=; b=vxNWMXzvk+AU/dsP7U1Mx3YnPgfs+kYIaFGr3r4uuTJTbKviCtw6N6N+I4aUNFKMYT CQagjoOq7vS4xXaAFocBBmF+0fFbsBnz5Br7dY6RHfFtk+He5mYpa2HEo7z3d1ObOXvU PcniO89kZU8WR1nUBrNy/GX6l5DN+7wEo6GZlK93kSd/YFeQt4+I4I7yexhK6rHGQkeV em774r08M6rznfp6JMdJp8lo5xTAQg6vRix1joW21tTLOLKNPotB5eGRNGh5pKyTPAB3 d/v+GjuUyQpXD2GKF3aH54EyR/UrBA0FeWmteaTm2YXiXeKdqL07Bs90ZU9Kwnr9hkif WvsA== MIME-Version: 1.0 Received: by 10.68.197.134 with SMTP id iu6mr5296813pbc.166.1335602287812; Sat, 28 Apr 2012 01:38:07 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.142.101.9 with HTTP; Sat, 28 Apr 2012 01:38:07 -0700 (PDT) Date: Sat, 28 Apr 2012 01:38:07 -0700 X-Google-Sender-Auth: dTJomEno6wC2tLNtbsqvaSZ5wr4 Message-ID: From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Request for testing - ath channel survey support X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 08:38:08 -0000 Hi all, I've implemented a basic, ath(4) driver specific channel survey extension using the diagnostic API. I'd like for this to eventually be made available to net80211. What you need: * freebsd-head as of two minutes ago; * an AR5416 or later NIC (I haven't ported it back to the AR5212 era legacy NICs, and AR5210/AR5211 don't have the needed registers); * built src/tools/tools/ath/athsurvey/ What you get: * a per-second snapshot of the channel busy status - TX busy %, RX busy %, channel busy %, and extension channel busy %. * since 32 samples are kept (and they're done every 1/10th of a second), there's enough history to get 3 seconds of data - so the lower, average and upper values are reported. What's currently broken/unimplemented: * It's not that useful when a channel scan is going on. I'll eventually extend it to be available from the normal userland, so a single snapshot of the channel state can be recorded * Fetching the 'off-channel' state (ie, to compare all the channels at once) * the extension channel counters seem to get thoroughly upset occasionally and report some garbage values. I'll track down why that is and document it, for the mean time don't pay attention to them if you're in a 20MHz wide channel. But with all the above issues (and the TODO list in the commit!), it's still a good indication of exactly how busy the channel is and how much time you're spending RX'ing frames versus RX'ing "other stuff that it can't decode". Those of you in noisy wireless environments would probably benefit from these statistics. Note the difference between how "busy" a channel can get - it can be quite bursty, so you can see a big difference between the lower and upper values. Don't be too frightened, that's to be expected. :) Please report and weirdnesses and crashes that may occur. Finally, if someone would like to port this stuff to the AR5212 HAL, please contact me. It'll be very straight forward to do and you'll also then get survey support for all the 11abg NICs out there. Adrian