From owner-freebsd-net@freebsd.org Fri Aug 7 15:55:52 2015 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C88569B6D93 for ; Fri, 7 Aug 2015 15:55:52 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id AC68DBD7 for ; Fri, 7 Aug 2015 15:55:52 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: by mailman.ysv.freebsd.org (Postfix) id A808A9B6D91; Fri, 7 Aug 2015 15:55:52 +0000 (UTC) Delivered-To: net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A73999B6D8F; Fri, 7 Aug 2015 15:55:52 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61642BD3; Fri, 7 Aug 2015 15:55:52 +0000 (UTC) (envelope-from ohartman@zedat.fu-berlin.de) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.85) with esmtp (envelope-from ) id <1ZNjwe-003sXw-UA>; Fri, 07 Aug 2015 17:52:32 +0200 Received: from x5ce19e09.dyn.telefonica.de ([92.225.158.9] helo=thor.walstatt.dynvpn.de) by inpost2.zedat.fu-berlin.de (Exim 4.85) with esmtpsa (envelope-from ) id <1ZNjwe-001QJa-Lo>; Fri, 07 Aug 2015 17:52:32 +0200 Date: Fri, 7 Aug 2015 17:52:26 +0200 From: "O. Hartmann" To: Gleb Smirnoff Cc: current@FreeBSD.org, net@FreeBSD.org Subject: Re: [head up!] WiFi drivers changes Message-ID: <20150807175226.357b5dce.ohartman@zedat.fu-berlin.de> In-Reply-To: <20150806151355.GL889@FreeBSD.org> References: <20150806151355.GL889@FreeBSD.org> Organization: FU Berlin X-Mailer: Claws Mail 3.12.0 (GTK+ 2.24.28; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/gULIh7eANco_/+9qGeRV.Lj"; protocol="application/pgp-signature" X-Originating-IP: 92.225.158.9 X-ZEDAT-Hint: A X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Aug 2015 15:55:52 -0000 --Sig_/gULIh7eANco_/+9qGeRV.Lj Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Thu, 6 Aug 2015 18:13:55 +0300 Gleb Smirnoff schrieb: > Hi! >=20 > As part of the "opaque ifnet project" [1], all 802.11 (WiFi) drivers > undergo change of not being an interface anymore. Historically in FreeBSD > 802.11 stack, 802.11 devices called if_attach() and created an interface. > Later this was generalized and real functioning interface is created by > net80211 stack. However, remnant of parent interface remained. If you > are running Intel Centrino wireless, then you got iwn0 interface and > wlan0 interface. However, the former doesn't do anything. You can't > assign addresses to it or modify any of it parameters. Or you can > modify them, but that affects nothing. >=20 > This superfluous ifnet on the list entangles the net80211 stack and > also is on the way of [1]. So, decision was made to remove it. I > already did preparatory commits back in May, and now it is time to > finish that. >=20 > The patch is: >=20 > https://reviews.freebsd.org/D2655 >=20 > And the Wiki page for it is: >=20 > https://wiki.freebsd.org/projects/ifnet/net80211 >=20 > The patch modifies every driver, and diff is bulky. However, changes > are mechanical and simple, most drivers appeared to work after first > run. Most converted drivers are tested to work. >=20 > This is list of drivers that are not tested, due to lack of testers: >=20 > mwl, ipw, bwn, wi, upgt, uath. >=20 > But, as said, changes are mechanical and probability is 95% that > they will work. >=20 > The only complex one is ndis(4). It could be broken by conversion. > Since I already got a tester volunteer, I will fix it quickly if > anything happens. >=20 > Another untrivial one is wtap(4), which is not connected to the > build and appeared to be broken even before conversion. Anyway, > I made it compilable. >=20 > Now, for the configuration. The sequence of commands you need > to run to configure a WiFi interface doesn't change. As before > it is: >=20 > ifconfig wlan0 create wlandev iwn0 > ifconfig wlan0 $foo >=20 > Your rc.conf doesn't need any changes. As before: >=20 > wlans_iwn0=3D"wlan0" > ifconfig_wlan0=3D"DHCP WPA" >=20 > However, iwn0 disappeared from the 'ifconfig -l'. It is still > in devinfo, or in dmesg. For the sake of installers or other > configuration software, a sysctl is provided: >=20 > net.wlan.devices: iwn0 >=20 > The /etc subsystem needs to be tweaked. Previously the wlan(4) > interfaces were created in childif_create(), and the script > did check for presence of parent interface. In my patch I > provided wlans_up(), that doesn't check. The code in D2655 > now works correctly both on patched and on unpatched kernel. >=20 > Alternatively, I could tweak childif_create() to use net.wlan.devices > instead of 'ifconfig -l'. Or, to use them both, to work on older > and on newer kernels? >=20 > I am not sure which path with /etc is better, so seeking for > help with that. >=20 After updating to FreeBSD 11.0-CURRENT #0 r286415: Fri Aug 7 17:22:43 CEST= 2015 amd64, several APs won't startup anymore: [...] Starting hostapd. Configuration file: /etc/hostapd.conf bsd_set_if_media: SIOCSIFMEDIA Device not configured bsd_init: failed to set operation mode bsd driver initialization failed. wlan0: interface state UNINITIALIZED->DISABLED wlan0: AP-DISABLED=20 hostapd_free_hapd_data: Interface wlan0 wasn't started ELOOP: remaining socket: sock=3D5 eloop_data=3D0x801c47100 user_data=3D0x0 = handler=3D0x41a0e0 /etc/rc.d/hostapd: WARNING: failed to start hostapd --Sig_/gULIh7eANco_/+9qGeRV.Lj Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJVxNQ6AAoJEOgBcD7A/5N80vQH/iKOxzn4MoL9dHu640DVuCiD CjKYZF7HyqhQ5j1TiGrBk+9rM+7n5FtLVchPMpnIcrF310Yf7LDlo4UNnnLNjOTG HG5+BneqCY3XpveWfVyQ5PjHjKUQ+sw64Lm+OBN7Bb4WvqdPpECpOUBwXBc9oF8D 3ZDE9u7uOGFMbYsb+F0Pj4+GfmPJZKWSWztwWai5fvOOBJZgF7MbVZ+vUEQ6Va4g bPUKmWYXW62JA/QarPRrgPgfMBDcdG1c/bIIIIecpwspY5YzHft2/9iN+9ke81YK yJ1iI4MQf2y+pF3whZX7EYQjBpLb1Jfg7WlIpZxOxZ1LW4mxZmeX0yWeyN6eD3o= =S8pt -----END PGP SIGNATURE----- --Sig_/gULIh7eANco_/+9qGeRV.Lj--