From owner-freebsd-wireless@freebsd.org Sat Sep 2 10:22:21 2017 Return-Path: Delivered-To: freebsd-wireless@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 8713AE0B76A for ; Sat, 2 Sep 2017 10:22:21 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: from mail-qk0-x235.google.com (mail-qk0-x235.google.com [IPv6:2607:f8b0:400d:c09::235]) (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 3798280B57 for ; Sat, 2 Sep 2017 10:22:21 +0000 (UTC) (envelope-from mizhka@gmail.com) Received: by mail-qk0-x235.google.com with SMTP id k126so9023354qkb.4 for ; Sat, 02 Sep 2017 03:22:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=e8moyYaonuRkiIUPvUysjAv1DnFdY1RhRdLGP5vdE1U=; b=UWiD7rC/MhJnGu0J/BldfrIR7HEo4t7Evzd1IHzxZaZXIYmx3qYJn/V+MRNsTRWgR1 NrWqlBeH8XMEJi8V+YtgyJz8dT/laTT502ST4G3xcbPBg5FnyzlLVFYDTs+LhMkiYplX x4+e/lgRoJ3ow9ytTQ3podQ0cEocOE5dT+AGa6THyUyqofpdLUe7piMCRnjKg2eOTFaD qGHcVnZmYDtCiUuTJtOC+CWhFgCRAwj+YINuQZ7+W1e/xtI5AwAQ9mSR/A7T53qvGc+U k9dhlYn5GTBVKOvdJRdT6X1Rv0lDqPfAXodzy7BFnS7PnbrSORJohoOg+7Hmtk8tV0Ad t7yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=e8moyYaonuRkiIUPvUysjAv1DnFdY1RhRdLGP5vdE1U=; b=UYpvuRZiOVkBgnC3OrNqRRbowwlXh/nXLYtTpHtyUJTbv9IZk3q9n1SNzKMWSK88hz bcQQUO5qLBOGacd44NXKhFNCdoyjIQD+tl+cA3ejsZnhyNroyz67aAbKsIYNMDg1+OFs Sw2x1D5NiNewFf3s/k0HukffsjTxhGLfn2cf7VvHFv57OxTsO/sQylSLbr9TbnfwFNFH RUU+dTFkpUrk00MxYn0iylwN5YHO5/aQJ4nWxvgiraDpj5Bc0Rh3lN3MYSQ0Igq8htGH CHigZPCBbXdmty4MXMg9lFzpUf1hNq7nT9jlq/An4VawCcOYyOVxTg/cHks4x32faV3d ZBJQ== X-Gm-Message-State: AHPjjUj1UchY+kDtPgTxJy4c68Y11IaUbPgFh3onsYEBRQBEFdMUIsa4 JwuDWp7JYmplvlNu8oCMEmEZIOs4DQ== X-Google-Smtp-Source: ADKCNb6uPqI5Ub0OaWVPssdIWvrWKIpZepCS3cAJWpCFCDoJ/tvh3n6NgPBVk4zSW96nTXef70XCU+qc6Vsyy7/au28= X-Received: by 10.55.55.204 with SMTP id e195mr6093669qka.68.1504347740451; Sat, 02 Sep 2017 03:22:20 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.85.101 with HTTP; Sat, 2 Sep 2017 03:22:19 -0700 (PDT) Received: by 10.140.85.101 with HTTP; Sat, 2 Sep 2017 03:22:19 -0700 (PDT) In-Reply-To: References: <68.D0.25924.050D9A95@dnvrco-omsmta02> From: Michael Zhilin Date: Sat, 2 Sep 2017 13:22:19 +0300 Message-ID: Subject: Re: Adding wifi source code To: Thomas Mueller Cc: freebsd-wireless Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.23 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: Sat, 02 Sep 2017 10:22:21 -0000 Hi, May be it not best material, but blog of adrian@ is really helpful: http://adrianchadd.blogspot.com.tr/?m=3D1 Best regards, Michael 2 =D1=81=D0=B5=D0=BD=D1=82. 2017 =D0=B3. 11:11 =D0=94=D0=9F =D0=BF=D0=BE=D0= =BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C "Thomas Mueller" = =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB: > > Here's a pdf giving a decent overview: > > https://www.bsdcan.org/2006/papers/freebsd.device.driver.slides.pdf > > > But, the FreeBSD handbook also goes over the process as well. > > > https://www.freebsd.org/doc/en_US.ISO8859-1/books/arch- > handbook/driverbasics.html > > > For the guy that took Linux drivers, you might want to look into the > Linux > > Emulator, that would be the easiest path especially if those Linux > drivers > > includes a lot of Linux specific headers. > > > The NetBSD drivers should be a bit easier to port. > > > Best, > > Owen > > I downloaded it but haven't read yet. > > Actually, it's the arch-handbook, not in the regular FreeBSD handbook. > > Thanks for the leads! > > > I was planning on also porting over the Atheros AR9271 driver from NetB= SD > > (athn(4) /usr/src/sys/dev/usb/if_athn_usb.c), but not until I finish th= e > > current device I am working on. It might not be for a while though. The= re > > is likely a lot of shared code with ath(4) on FreeBSD > > (/usr/src/sys/dev/athn). NetBSD seems to separate all code between USB > and > > PCI, whereas FreeBSD combines drivers. Let me know if I can help out, a= s > I > > already own this device and would be willing to test out code or > > troubleshoot with you. > > > I am currently working on another driver from Linux to FreeBSD. The cor= e > > concepts are the same, but a lot of code is in different order. FreeBSD > > drivers have an attach function that assign function pointers to the > softc > > struct. The Linux equivalent is in DRIVERNAME_ops. In my case, this: > > http://src.illumos.org/source/xref/linux-master/drivers/net/ > wireless/realtek/rtlwifi/rtl8188ee/sw.c#224 > > > Hope this helps. But yes, would love to work on AR9271! > > What is the rtl8188ee? Maybe I'd recognize the brand and model. > > I have Hiro H50191, which uses rsu driver. > > That last URL looks like something related to Illumos and OpenIndiana. > > My Atheros AR9271 is (quasi-)USB, an inseparable part of the motherboard > in contrast to the Hiro H50191 which is a USB-stick wireless adapter. > > It has sometimes worked on NetBSD, but more often would fail to load > firmware. > > On latest NetBSD-current, it stops the kernel from booting unless I > disable it or comment out in kernel config. GENERIC kernel reboots > immediately without showing any messages. > > OpenBSD also has AR9271 driver and Realtek re. I have NetBSD > installations but no OpenBSD. > > I would like, at first, if possible, when I have a driver to build, to > build the module rather than the whole kernel every time. > > I am familiar with C and C++ but think I need to brush up. Any online > leads/references? > > Tom > > _______________________________________________ > freebsd-wireless@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-wireless > To unsubscribe, send any mail to "freebsd-wireless-unsubscribe@freebsd.or= g > " >