From owner-freebsd-wireless@FreeBSD.ORG Sun Aug 31 11:28:07 2014 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 6783C388; Sun, 31 Aug 2014 11:28:07 +0000 (UTC) Received: from mail-wi0-x231.google.com (mail-wi0-x231.google.com [IPv6:2a00:1450:400c:c05::231]) (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 A639B1AF0; Sun, 31 Aug 2014 11:28:06 +0000 (UTC) Received: by mail-wi0-f177.google.com with SMTP id cc10so4631773wib.16 for ; Sun, 31 Aug 2014 04:28:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:content-transfer-encoding:subject:references:from :in-reply-to:message-id:date:cc:to:mime-version; bh=0PzhcYESR9v4wR4uac8/0Co1P7fE6qSQhr9itiNK2dQ=; b=HKkBnPo3O5t//fdeYTtJF8uVd8iRzCZ9U4hhf8t3SSh3EvAW6fmrHOvuGrIxdKSB2V E01hGYStuHk1canziBbLDZN0Yx/o/jS0tiYO7hN9z/1qrZhLc4mGix3uyQTXhavTjtLK G8qjg4CI9lBBNfnyhB1GbQFCcxbqu1MSBz8zV8yd27VMR/waLxaM510rME58jvgtJorE s8Xmkbu1SO0vhz2FY/pDtUKg+wACsXvGHA71bV5pFD8R33HaW1QNcIamtwrquLHEscJP dcO8DBgasiWPl/mu/Gy86jSjIFDV4yDsiRhLqVjRek9FExGGLFz0X9EXALAHV5ySPwcv LYCQ== X-Received: by 10.194.122.6 with SMTP id lo6mr25146174wjb.17.1409484484805; Sun, 31 Aug 2014 04:28:04 -0700 (PDT) Received: from [192.168.20.2] ([62.219.134.104]) by mx.google.com with ESMTPSA id sh3sm14353624wic.23.2014.08.31.04.28.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 31 Aug 2014 04:28:02 -0700 (PDT) Subject: Re: TL-WN722N support on FreeBSD. References: From: atar In-Reply-To: Message-Id: <73C363A9-5608-4A2B-B9F3-D96E8BA93050@gmail.com> Date: Sun, 31 Aug 2014 05:40:48 +0300 To: Adrian Chadd Mime-Version: 1.0 (1.0) X-Mailer: iPod Mail (10B500) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-wireless@freebsd.org" , "freebsd-questions@freebsd.org" 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, 31 Aug 2014 11:28:07 -0000 Here's additional place where FreeBSD has lack of support: USB based printer= s. Here's a citation from the FreeBSD handbook (page no. 251): > USB interfaces, named for the Universal Serial Bus, can run at even faster= speeds than parallel or RS-232 serial interfaces. Cables are simple and che= ap. USB is superior to RS-232 Serial and to Parallel for printing, but it is= not as well supported under UNIX systems. A way to avoid this problem is to= purchase a printer that has both a USB interface and a Parallel interface, a= s many printers do. >=20 >> Hi, >>=20 >> The main issue is this: I really don't like the USB driver stuff in the k= ernel. >>=20 >> 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. >>=20 >> 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." >>=20 >> 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. >>=20 >> I'm not being paid to do any of the wireless stuff in FreeBSD, so it >> has to clear the "is it fun" threshold. >>=20 >>=20 >> -a