Date: Thu, 27 Aug 2015 18:45:14 +0200 From: "O. Hartmann" <ohartman@zedat.fu-berlin.de> To: Adrian Chadd <adrian.chadd@gmail.com> Cc: Gleb Smirnoff <glebius@freebsd.org>, "current@freebsd.org" <current@freebsd.org>, "net@freebsd.org" <net@freebsd.org> Subject: Re: [head up!] WiFi drivers changes Message-ID: <20150827184514.7e86e531.ohartman@zedat.fu-berlin.de> In-Reply-To: <20150827183253.55400c5a.ohartman@zedat.fu-berlin.de> References: <20150806151355.GL889@FreeBSD.org> <20150807175226.357b5dce.ohartman@zedat.fu-berlin.de> <CAJ-Vmo=Ejc9H9FeprCp_dfJqWFyD9UPyKS4%2BCu_KpLegUEFsXg@mail.gmail.com> <20150827183253.55400c5a.ohartman@zedat.fu-berlin.de>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/jy+C+SSGd=FpQ_VTbJ3Z_zE Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Thu, 27 Aug 2015 18:32:53 +0200 "O. Hartmann" <ohartman@zedat.fu-berlin.de> schrieb: > Am Fri, 7 Aug 2015 16:50:23 -0700 > Adrian Chadd <adrian.chadd@gmail.com> schrieb: >=20 > > Hi, > >=20 > > Gleb/others doing this: you have 4 days to figure out what's wrong > > with things, or I'm backing all of this work out. > >=20 > > Thanks, > >=20 > >=20 > > -adrian > >=20 > >=20 > > On 7 August 2015 at 08:52, O. Hartmann <ohartman@zedat.fu-berlin.de> wr= ote: > > > Am Thu, 6 Aug 2015 18:13:55 +0300 > > > Gleb Smirnoff <glebius@FreeBSD.org> schrieb: > > > > > >> Hi! > > >> > > >> As part of the "opaque ifnet project" [1], all 802.11 (WiFi) drive= rs > > >> undergo change of not being an interface anymore. Historically in Fr= eeBSD > > >> 802.11 stack, 802.11 devices called if_attach() and created an inter= face. > > >> 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. > > >> > > >> 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. > > >> > > >> The patch is: > > >> > > >> https://reviews.freebsd.org/D2655 > > >> > > >> And the Wiki page for it is: > > >> > > >> https://wiki.freebsd.org/projects/ifnet/net80211 > > >> > > >> 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. > > >> > > >> This is list of drivers that are not tested, due to lack of testers: > > >> > > >> mwl, ipw, bwn, wi, upgt, uath. > > >> > > >> But, as said, changes are mechanical and probability is 95% that > > >> they will work. > > >> > > >> 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. > > >> > > >> 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. > > >> > > >> Now, for the configuration. The sequence of commands you need > > >> to run to configure a WiFi interface doesn't change. As before > > >> it is: > > >> > > >> ifconfig wlan0 create wlandev iwn0 > > >> ifconfig wlan0 $foo > > >> > > >> Your rc.conf doesn't need any changes. As before: > > >> > > >> wlans_iwn0=3D"wlan0" > > >> ifconfig_wlan0=3D"DHCP WPA" > > >> > > >> 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: > > >> > > >> net.wlan.devices: iwn0 > > >> > > >> 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. > > >> > > >> 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? > > >> > > >> I am not sure which path with /etc is better, so seeking for > > >> help with that. > > >> > > > > > > After updating to FreeBSD 11.0-CURRENT #0 r286415: Fri Aug 7 17:22:4= 3 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 > > > 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 > > _______________________________________________ > > freebsd-current@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-current > > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.o= rg" >=20 > Again, > with the most recent changes as of r287211, hostapd doens't start my WiFi= AP anymore > (FreeBSD 11.0-CURRENT #7 r287169: Wed Aug 26 20:26:49 CEST 2015 amd64 doe= s!). Ups, sory, sorry - I forgot on that specific machine (1 of 5) to mergemaster :-(= So, after mergemaster, the new rc scripts also got installed on the AP server and the= interface is again up and running! Regards, oh --Sig_/jy+C+SSGd=FpQ_VTbJ3Z_zE Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJV3z6aAAoJEOgBcD7A/5N8H+wH/A4YCOu0V7CQPAZyJjdA1C2N 5MtxvdKIhpJbdSGkgtr0mCFkGNZyHejo0Rlg0ikiR46QHb4v+oR3OCjfsuzJojMR kITyd92VqvdQoslSB8/GHnBrZScv/que3IeACOuYpQdVwjnuWmiW6smSEMkZkmz6 i+aSIIpRcQpjbnQHqUskNZ7GJX+LUY8IEnBLxP/gd1QOeHoEV2ZhIjsniOBL61s+ mY/9KmDxcCwDFC+obwAU4/0GbLsb85UrIRJ9v3FYZpAT6IQnaUqx5x26SdGzHT2b goTO9aV2gQEfCaYoyJzYfB9pftSHLoYDNff9IQkbiln67dezHZFDVXGbqNChEnc= =9yxY -----END PGP SIGNATURE----- --Sig_/jy+C+SSGd=FpQ_VTbJ3Z_zE--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20150827184514.7e86e531.ohartman>