From owner-freebsd-current@freebsd.org Sun Oct 25 19:54:50 2015 Return-Path: Delivered-To: freebsd-current@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 325AA87D5 for ; Sun, 25 Oct 2015 19:54:50 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0286F1C0E; Sun, 25 Oct 2015 19:54:50 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by pasz6 with SMTP id z6so165611435pas.2; Sun, 25 Oct 2015 12:54:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=sFhCVOT14nHsUiXcgi2lcab2Uf3ele06+b3qBxkaMhw=; b=KJJVvCPz+JIDP/E5b5oApgLlPiY679DbS0BnYHuKgC49EnzVEZ5gPq60ghEBd1eud7 HtSetSCiHKx7tvWXZKY7Po2IEDaz6rnxhfCaexuXHYVZK16+7+OD9H4stgUtCTYNqq7G +oleSJEZT8sKX0R5mRHA3kbCsaTZsqS0lbAwQNWjYExpcdnLYMYttaojUKbirmpf0tkU zROuLQcgU9lXJfEXiR5t/0JlYQATkM/KY/8qP9jJ4z/8Mjmvlxk4F/JRmIbJMOn7et06 wm6p8jyk17eL5wy1zgvjByx1jMZR6nVtv8mKwKvGXDpFQUkITb6f+W/vvhwO3nSkmpu9 GH2g== X-Received: by 10.66.132.37 with SMTP id or5mr36917202pab.5.1445802889485; Sun, 25 Oct 2015 12:54:49 -0700 (PDT) Received: from [192.168.20.7] (c-24-16-212-205.hsd1.wa.comcast.net. [24.16.212.205]) by smtp.gmail.com with ESMTPSA id y5sm29825413pbt.77.2015.10.25.12.54.48 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 25 Oct 2015 12:54:49 -0700 (PDT) Subject: Re: What changed in rc.d infrastructure in last months? Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Content-Type: text/plain; charset=utf-8 From: NGie Cooper X-Priority: 3 (Normal) In-Reply-To: <606144753.20151025224636@serebryakov.spb.ru> Date: Sun, 25 Oct 2015 12:54:48 -0700 Cc: freebsd-current Content-Transfer-Encoding: quoted-printable Message-Id: References: <16610120144.20151025222025@serebryakov.spb.ru> <28FF29D6-A2D9-46C0-A419-DB433BB9F54A@gmail.com> <606144753.20151025224636@serebryakov.spb.ru> To: lev@FreeBSD.org X-Mailer: Apple Mail (2.2104) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Oct 2015 19:54:50 -0000 > On Oct 25, 2015, at 12:46, Lev Serebryakov wrote: >=20 > Hello NGie, >=20 > Sunday, October 25, 2015, 10:39:51 PM, you wrote: >=20 >=20 >> It=E2=80=99s documented here: >=20 >> On the other hand, if you want to configure your = wireless >> interface with hostapd(8), you need to add ``HOSTAP'' = to the >> ifconfig_ variable. hostapd(8) will use = the >> settings from /etc/hostapd-.conf > I understand this, and as you can see from my config samples, I'm = using > exactly this feature. >=20 > I'm wonder why ifconfig & hostapd try to start TWICE now for same > interaface in course of normal boot now. It was not case in, say, = r285355. These commits are probably why =E2=80=94 in particular now all net80211 = devices post-r287394/r287398 are being restarted via /etc/pccard_ether, = which will trigger /etc/rc.d/netif (which doesn=E2=80=99t make sense = because iwn, etc _aren=E2=80=99t_ pcmcia devices). Sidenote, fixing bug 202726 might fix this case with [serial] boot. = I=E2=80=99ll need to double-check the rcorder and get back to you on = that. Thanks, -NGie ------------------------------------------------------------------------ r287398 | glebius | 2015-09-02 07:38:16 -0700 (Wed, 02 Sep 2015) | 4 = lines Add iwm(4), that was missing in r287394. Submitted by: Shawn Webb ------------------------------------------------------------------------ r287394 | glebius | 2015-09-02 05:46:42 -0700 (Wed, 02 Sep 2015) | 11 = lines Fix dynamic attach/detach of 802.11 devices after r287197: o In pccard_ether add code to start children of a 802.11 device, that are configured in rc.conf. o In devd.conf provide a regex matching all 802.11 devices, and on match run pccard_ether to spawn children. PR: 202784 Submitted by: In collaboration with: "Oleg V. Nauman" ------------------------------------------------------------------------ r287197 | glebius | 2015-08-27 01:56:39 -0700 (Thu, 27 Aug 2015) | 43 = lines Replay r286410. Change KPI of how device drivers that provide wireless connectivity interact with the net80211 stack. Historical background: originally wireless devices created an interface, just like Ethernet devices do. Name of an interface matched the name of the driver that created. Later, wlan(4) layer was introduced, and the wlanX interfaces become the actual interface, leaving original ones as "a parent interface" of wlanX. Kernelwise, the KPI between net80211 = layer and a driver became a mix of methods that pass a pointer to struct ifnet as identifier and methods that pass pointer to struct ieee80211com. From user point of view, the parent interface just hangs on in the ifconfig list, and user can't do anything useful with it. Now, the struct ifnet goes away. The struct ieee80211com is the only KPI between a device driver and net80211. Details: - The struct ieee80211com is embedded into drivers softc. - Packets are sent via new ic_transmit method, which is very much like the previous if_transmit. - Bringing parent up/down is done via new ic_parent method, which = notifies driver about any changes: number of wlan(4) interfaces, number of them in promisc or allmulti state. - Device specific ioctls (if any) are received on new ic_ioctl method. - Packets/errors accounting are done by the stack. In certain cases, = when driver experiences errors and can not attribute them to any specific interface, driver updates ic_oerrors or ic_ierrors counters. Details on interface configuration with new world order: - A sequence of commands needed to bring up wireless DOESN"T change. - /etc/rc.conf parameters DON'T change. - List of devices that can be used to create wlan(4) interfaces is now provided by net.wlan.devices sysctl. Most drivers in this change were converted by me, except of wpi(4), that was done by Andriy Voskoboinyk. Big thanks to Kevin Lo for testing changes to at least 8 drivers. Thanks to pluknet@, Oliver Hartmann, Olivier Cochard, gjb@, mmoll@, op@ and lev@, who also participated in testing. Reviewed by: adrian Sponsored by: Netflix Sponsored by: Nginx, Inc.=