From owner-freebsd-wireless@FreeBSD.ORG Sat Nov 9 17:40:34 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 C1923E8C for ; Sat, 9 Nov 2013 17:40:34 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x22e.google.com (mail-qc0-x22e.google.com [IPv6:2607:f8b0:400d:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 84F732A6A for ; Sat, 9 Nov 2013 17:40:34 +0000 (UTC) Received: by mail-qc0-f174.google.com with SMTP id s13so277257qcv.5 for ; Sat, 09 Nov 2013 09:40:33 -0800 (PST) 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:content-type; bh=GBrXu2mV0WKpChN0C+DqSUttN1Pngr2/fx6JoVVTz0g=; b=mBBvA9n3T1XkuqYIlnbdac5SjEMQ6Vrl2I5kXpI9QzFJPp3f4e6FBFWV+a8TuTuqf3 MSdcFJZb0zbd+IaPyX775eE+j2j+OHa/AZtqrjTqyrIyU+wPMDz+Avz8uDHOwRcgATc7 lTYC8VpVwyC/ZY0mjqLlcMNPRF9iDVwS6ah7aap7EhyGie3uFdQSoKsZOXVIJj4bVrVw Qv4CCEnV//+27P0sfNyNKI76WUNeLFeN7uZ8LDrDDjzhqrBk9Niu4MSaQt6zA4DMgveW lzYrVlFv4iZnN1fqMIcKT17+IyX9iVBRcJcsBy4Hp+jE7q2dGqaQs22aS8+jdEmS3Jyx eJ3Q== MIME-Version: 1.0 X-Received: by 10.224.64.200 with SMTP id f8mr34438211qai.55.1384018833179; Sat, 09 Nov 2013 09:40:33 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Sat, 9 Nov 2013 09:40:33 -0800 (PST) In-Reply-To: References: Date: Sat, 9 Nov 2013 09:40:33 -0800 X-Google-Sender-Auth: s7gMTWa2lBxplPa96OXZ_46LfkI Message-ID: Subject: Re: [iwn] round four - 5100 works, 21xx works, EAPOL fixes, rate selection 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.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, 09 Nov 2013 17:40:34 -0000 followup: * 6205 works * 6230 works * 6200 works * 2230 works * 1030 works * 5100 works What i haven't yet tested: * 4965, mostly because I'm scared to * Whichever NIC Eitan has, as he has it and I don't (2200?) * (and obviously whatever other NICs exist that I don't have) What doesn't work: * Centrino 100 - EEPROM read failure, then kernel hang * 6150, 6235, 6250 - all have a variant on firmware panic or failed calibration upload. So, the 6xxx NICs that don't work should be easy to solve - they should already have (somewhat) worked with -HEAD. The Centrino 100 is a bit more of a special case. If you have any of the above NICs that work or that I haven't yet tested, I'd really appreciate it if you could spin up the latest diff with the latest net80211 code. It should behave quite a bit better. Thanks! -adrian On 8 November 2013 23:46, Adrian Chadd wrote: > Argh, why am I still hacking on the iwn(4) driver. > > So, I saw a lot of broken stuff. This patch fixes some. > > http://people.freebsd.org/~adrian/iwn/20131108-iwn-update-works-full-5100-11.diff > > You have to update sys/net80211 and sys/dev/iwn to the latest version > in HEAD before you apply this diff. > > What's committed: > > * AMRR wasn't correctly initializing the initial rate, so it thought > it was starting at MCS15 but it was in fact starting at MCS0. This > caused hilarity. > > * AMRR should be selecting a "mostly ok" rate, not MCS15. So, this was > also fixed. > > What's in this patch: > > * EAPOL frames were going out at the normal data rate, rather than > going out at the management rate. Like ath(4), override this. Once I > fixed AMRR to set the initial rate from MCS0 to the "best initial > rate" it chose MCS15 and this failed. It showed up as the initial > association suceeding but the auth exchange failed, logging a > "pre-shared key may be incorrect" message. Sigh. So, like ath(4), > detect if it's EAPOL and if so override. > > * If an AMPDU frame TX failed the firmware doesn't send up a > compressed-BA notification as it doesn't receive one. > iwn_ampdu_tx_done() doesn't do any rate control notification - that is > left up to the compressed BA RX function. So, if an entire A-MPDU > transmit failed, there'd be no notification of such - and the rate > control code never got notified of said failures! Thus it would never > back off the rate. So, if the whole frame transmission failed, just > notify the rate control code so it correctly backs off the rate > selection. > > With this, things are .. more stable. The whole A-MPDU handling needs > a lot of work to make as correct as the ath(4) driver, but that is so > not in the scope of what I'm doing here. > > > > -adrian