From owner-freebsd-net@FreeBSD.ORG Fri Oct 13 15:05:35 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2676A16A597; Fri, 13 Oct 2006 15:05:35 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from server.t-hosting.hu (server.t-hosting.hu [217.20.133.7]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41BB343D70; Fri, 13 Oct 2006 15:05:32 +0000 (GMT) (envelope-from gabor@FreeBSD.org) Received: from localhost (localhost [127.0.0.1]) by server.t-hosting.hu (Postfix) with ESMTP id C6B4499F04D; Fri, 13 Oct 2006 17:05:29 +0200 (CEST) X-Virus-Scanned: amavisd-new at t-hosting.hu Received: from server.t-hosting.hu ([127.0.0.1]) by localhost (server.t-hosting.hu [127.0.0.1]) (amavisd-new, port 10024) with LMTP id woAyeehfczgw; Fri, 13 Oct 2006 17:05:27 +0200 (CEST) Received: from [192.168.2.186] (catv-50635cb6.catv.broadband.hu [80.99.92.182]) by server.t-hosting.hu (Postfix) with ESMTP id 2B28399F04B; Fri, 13 Oct 2006 17:05:27 +0200 (CEST) Message-ID: <452FAB31.5080409@FreeBSD.org> Date: Fri, 13 Oct 2006 17:05:21 +0200 From: =?ISO-8859-1?Q?G=E1bor_K=F6vesd=E1n?= User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Max Laier References: <1160580727.91199@swaggi.com> <200610111832.54869.max@love2party.net> In-Reply-To: <200610111832.54869.max@love2party.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org, Vince , Doug Barton , Paul Schmehl Subject: Re: Intel PRO 3945ABG Wireless X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 13 Oct 2006 15:05:35 -0000 Max Laier wrote: > On Wednesday 11 October 2006 17:32, Yuri Lukin wrote: > >> Doug Barton wrote .. >> >> >>> On Tue, 10 Oct 2006, Paul Schmehl wrote: >>> >>>> Why isn't anyone working on updating it? >>>> >>> This is a volunteer project. No one has volunteered. >>> >>> Doug >>> >> I think there are some that would like to contribute but don't >> know where to begin. I, for one, enjoy wireless networking >> and would like to contribute to the project but I dont >> know the OS internals and don't have any real programming >> experience. Perhaps some basic guidance could set people >> like myself on the right path? I'm not asking for hand-holding, >> just something to start with. >> > > There are three things that need to be done here: > 1) Adapt the bus interface. This is not too much work and should boil > down to a couple of sed(1)s and a few manual edits. Check drivers that > are in OpenBSD and FreeBSD and compare, or just check existing drivers. > The DRIVER(9) manual page and jmg@'s paper[1,2] should provide additional > insight. > 2) Use firmware(9) to load the ucode - as far as I understand the device > needs firmware as well. This shouldn't be much work and can be taken > verbatim from iwi(4). > 3) Adapt the net80211 interface. This one's a bit tricky since OpenBSD > went a different way with their 80211 implementation. Again, looking at > existing drivers (esp. ath(4) as the reference implementation and iwi(4) > as a driver from OpenBSD that was also retrofitted into FreeBSD) should > give an idea what is done how. > > In the end, you won't know what problems you come across until you start > with it. I can help with questions regarding 2 & 3, but will be busy for > the next two months and don't have a 3945 to test with, either. > > [1] http://www.bsdcan.org/2006/papers/freebsd.driver.pdf > [2] http://www.bsdcan.org/2006/papers/freebsd.device.driver.slides.pdf > > I started to port (actually try to port) this driver. I can read and write C, but I don't have any experience and knowledge with kernel drivers and architectural programming. I was able to understand some pieces of the code and made some progress so far, and will try to finish the whole driver, but it is quite difficult to me. Could you give me some feedback, please if I'm going towards the good direction or not? I uploaded my modified files to here: http://gabor.t-hosting.hu/if_wpi.tar What I did so far: - Included the necessary headers and dropped the unnecessary ones - Ported the driver interface (DRIVER_MODULE, MODULE_DEPENDS, wpi_ident, wpi_ident_table[], wpi_methods[], wpi_driver, - Added the necessary functions for wpi_methods[] - Added the following functions in the same manner as used in our if_iwi (with the corresponding macros): static void wpi_radio_on(void *, int); static void wpi_radio_off(void *, int); static void wpi_scanabort(void *, int); static void wpi_scandone(void *, int); static void wpi_scanstart(void *, int); static void wpi_scanchan(void *, int); - Started to port wpi_attach, but that is quite complicated to me yet What I have difficulties with: - wpi_cmd is called differently than iwi_cmd so I have no idea how to handle that - at line 513 (still wpi_cmd) I don't know what macro to use, since there's no equivalent for IWI_CMD_ABORT_SCAN -- Cheers, Gabor