From owner-freebsd-wireless@FreeBSD.ORG Sun Jan 4 04:46:15 2015 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.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4C40C77 for ; Sun, 4 Jan 2015 04:46:15 +0000 (UTC) Received: from mail-wi0-x22a.google.com (mail-wi0-x22a.google.com [IPv6:2a00:1450:400c:c05::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6EA2A301B for ; Sun, 4 Jan 2015 04:46:15 +0000 (UTC) Received: by mail-wi0-f170.google.com with SMTP id bs8so2363369wib.5 for ; Sat, 03 Jan 2015 20:46:12 -0800 (PST) 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=9oqlGrvMFu/VBs9GMEvxfhqzLRu2awPkUt2TsjT0apw=; b=s8iNS5MNEHkAjlebtlBsULF5Ro+CKjGz0BUTLmTleamzVtUDhX23ZrKdy2+Iq1T2LH zeod1aOzoFkmBh5AioUjMvb2aLD9FspmpYaflBPoU9Lgsf3EG/ADBtSLe3vS/RkTCn82 L+RGhaZ3F+2HL6xK1oTC9zjyR4pb0emlHvY4h6HrK2f7nQgCFoAzF/DCZCLUj1Mq/5jO 8XMW4FJT7wPrk01Wf6zfxKeGxNaLPexNWqKfCCNyfSYCYg7K7eKLRDPdOQRvmetf/gfj PNlLVz6i9U8fdwc+h6bn9WSKPU/co3iSq7NNKVcgLGtCe7KipvkZPmTh00QxAaQOwNQ+ T0pw== MIME-Version: 1.0 X-Received: by 10.194.24.103 with SMTP id t7mr166826817wjf.15.1420346772825; Sat, 03 Jan 2015 20:46:12 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Sat, 3 Jan 2015 20:46:12 -0800 (PST) Date: Sat, 3 Jan 2015 20:46:12 -0800 X-Google-Sender-Auth: 9uyNATB8Tqp4SvSPeF23--jim-c Message-ID: Subject: [rft] net80211 scan overhaul, pass 1 From: Adrian Chadd To: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.18-1 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, 04 Jan 2015 04:46:15 -0000 hi all, I've started overhauling the net80211 scan infrastructure so it can support fully-offloaded scan firmware (like the intel iwn(4) NICs, and the upcoming 7260 driver I'm hacking on.) I'd like this patch tested: https://people.freebsd.org/~adrian/net80211/20150103-net80211-scan-overhaul-1.diff This splits the scan code into two halves - the generic bits that drive when and what to do about scanning, and the bits that implement the software scanner. The software scanner is the bit that schedules channel changes, listens for probe response frames, adds them to the scan cache, aborts and goes back to the original channel when needed. It also tells the drivers that scanning is about to happen, so the driver can prepare to go off-channel for a bit. For the intel NICs (and other things, i'm sure) that do full scan offload, we just say "Hey, scan these channels, here's the SSIDs to actively probe for, tell me when you're done" and you get back probe response frames or scan command results with all the relevant information. The wireless stack doesn't have to control the process so fine-grained - as far as the stack and network interface is concerned, it's still associated and traffic is still queued as per normal. The NIC firmware itself takes care of scheduling the off-channel scan bits, sending the sleep frames as it goes off-channel temporarily, etc. It's supposed to be very transparent. We don't even have to send probe request frames during scanning - the firmware will do that for us. This work doesn't do all work required - it's just going to refactor out the scan bits. I still have to turn it into methods that intel and such can be overridden. I still have to go through and plumb the VAP power save state work so we don't actually send sleep/wakeup frames. All of that is done for us in the firmware. So I'd appreciate this getting some testing by FreeBSD-HEAD wifi users. If you see any issues then please let me know. I'm going to commit it in a couple of days so I can continue along the path of refactoring out this stuff and turning it into methods that the iwn and future drivers can override to implement their own scanning module. Thanks! -adrian