From owner-freebsd-questions@FreeBSD.ORG Wed Aug 27 19:16:06 2014 Return-Path: Delivered-To: freebsd-questions@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 ESMTPS id 28E7CDD5; Wed, 27 Aug 2014 19:16:06 +0000 (UTC) Received: from mail-qa0-x236.google.com (mail-qa0-x236.google.com [IPv6:2607:f8b0:400d:c00::236]) (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 CE5D23D94; Wed, 27 Aug 2014 19:16:05 +0000 (UTC) Received: by mail-qa0-f54.google.com with SMTP id k15so667121qaq.13 for ; Wed, 27 Aug 2014 12:16:04 -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=VSjLE6za8W6b/85MwqcHZpkkqM2K85ncLRKtu5AQ/+Y=; b=HnDXwon5dPfdtklB8DQIR4poO6EckTMvyeB/9zWfZNZoGuVuSPVrb+It7X3mQ3BzHo pja8GmaQKHIaEV7ttdC+qFdUK3P8gcXiq/c0KF8ks0bi/RAn5xkCPDWH2xtnXBRPwqU5 g8QBW83gOXyNpJ1qbcXxvfcC4RZ0/h4m1U27GycXMaZvf+mMvWYF1r7gE0S02bWJHNdv rRMflMCiCBS2fUOOoX1OnexKNpCbWtmn6vcvx+IJq7uGCSqgf72PNukULOnqzyXM/SeD GVPZt/51r+IChH6sUnj7cLAyabGHXDwAnSA/inI3U37/ysLsRkwXB5lI9QKVV9V5kUvP a1hw== MIME-Version: 1.0 X-Received: by 10.140.23.37 with SMTP id 34mr56613459qgo.2.1409166964903; Wed, 27 Aug 2014 12:16:04 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.39.139 with HTTP; Wed, 27 Aug 2014 12:16:04 -0700 (PDT) In-Reply-To: References: Date: Wed, 27 Aug 2014 12:16:04 -0700 X-Google-Sender-Auth: _cS2thMJc0h1Yxl0Yxw-4FAmc_U Message-ID: Subject: Re: TL-WN722N support on FreeBSD. From: Adrian Chadd To: atar Content-Type: text/plain; charset=UTF-8 Cc: "freebsd-wireless@freebsd.org" , "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2014 19:16:06 -0000 Hi, The main issue is this: I really don't like the USB driver stuff in the kernel. When I last checked, there was no clean example of a wifi or ethernet driver which handles all of the odd corner cases of things correctly. So you'd end up with things like taskqueues still running whilst the NIC had been pulled out, all sleeping on a wakeup that'll never come, or the ioctl path not really being locked the right way with the rest of the USB driver. I started tinkering with a driver for the AR9170, but I still couldn't get the command handling side of things right. It's tricky because USB is effectively a network protocol, but all the drivers are written assuming register accesses are synchronous. So you end up having to craft some kind of command structure that handles sleeping for commands that it expects a response on from another USB endpoint (eg register reads), but not sleeping for commands that are asynchronous. I gave up because it became "non-fun." So yeah. Almost all of the work is done in the atheros driver side of things. Heck, the AR9271 bits for the HAL are likely just an evenings worth of work for me. I just don't want to deal with the USB side of it. I'm not being paid to do any of the wireless stuff in FreeBSD, so it has to clear the "is it fun" threshold. -a