From owner-freebsd-wireless@FreeBSD.ORG Sat Nov 30 21:53:51 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 ESMTPS id 2C71524F for ; Sat, 30 Nov 2013 21:53:51 +0000 (UTC) Received: from mail-qe0-x22c.google.com (mail-qe0-x22c.google.com [IPv6:2607:f8b0:400d:c02::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E16DD1C7B for ; Sat, 30 Nov 2013 21:53:50 +0000 (UTC) Received: by mail-qe0-f44.google.com with SMTP id nd7so11009778qeb.17 for ; Sat, 30 Nov 2013 13:53:50 -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=+kYYafOvKbhhOMgNeCVCkXtoXddNUQ94ZPau+JghkcE=; b=pOgRAPxT2SFCtmrYobaupkKlgZM0gHy3qIjBhkBIatGf8ibNvEiHWXX10SoGzS7yRv TBAD8unmr2BaTven6pb3BllHScuyJukdHFBlvEFfX9Vr5oqguRx0wTHdUQeXgLQ2IIui iJzge0KkjmsXMvEs5wGp9uZYVLQTL5tdtSoJw34llQLu6WT+OQR+2Eoq01ry346xto2G AbtnafJ8DAEKH69o+WWF5F75dUEdTMDXKm0JTmY8gKu2tCOInIfbmiHGFt8iy1SnCexx 3bcwRS6UytaBhHTUKDnoVhgS6SqqMuDn7EhxM2rKyJktmB+pXMyaXBkRoUjs/CnHZqgZ Z4Kg== MIME-Version: 1.0 X-Received: by 10.224.98.200 with SMTP id r8mr100665052qan.26.1385848430046; Sat, 30 Nov 2013 13:53:50 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.53.200 with HTTP; Sat, 30 Nov 2013 13:53:50 -0800 (PST) Date: Sat, 30 Nov 2013 13:53:50 -0800 X-Google-Sender-Auth: _wqK_coXzUIgdQeIc7nJU3LK5H0 Message-ID: Subject: [iwn] scan fixes! From: Adrian Chadd To: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.16 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, 30 Nov 2013 21:53:51 -0000 Hi! Here's a bunch of scan fixes: http://people.freebsd.org/~adrian/iwn/20131130-iwn-scan-fixes-1.diff There's a few things in here: * Add extra code to verify A-MPDU TX sequence numbers make sense; * Fetch the flags TLV from the firmware if it provides it; * CRC threshold changes for the later NICs (apparently to prevent firmware crashes? Who knows!); * Track if a scan command is in flight and if so, don't issue another RXON or SCAN until it's finished or we reset the NIC; * Lots of changes to the scan command values - set passive/active/dwell correctly, set a maximum dwell time. It turns out that we were doing a lot of very bad things in the scan command and if you squinted at the firmware incorrectly, it could just plain never return from a scan on a passive channel. I've tested this on my 5100 and the scan stability has improved. The main issue I see here now is the net80211 related scan issue, not the driver scan issue. There's one driver issue I think still exists - where the session disassociates during an active scan. I'm not yet sure why this. There are some other things to fix - I'll post patches to that once I've committed this scan stuff. Specifically - iwlwifi on Linux does a single-channel scan (to a different frequency band to the active one) occasionally to reset/retune the radio. I'll look into this later. Thanks! -adrian