From owner-freebsd-wireless@FreeBSD.ORG Fri Apr 15 10:50:15 2011 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8009106564A for ; Fri, 15 Apr 2011 10:50:15 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 801348FC12 for ; Fri, 15 Apr 2011 10:50:15 +0000 (UTC) Received: by wyf23 with SMTP id 23so2555962wyf.13 for ; Fri, 15 Apr 2011 03:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=sTAHVuLy5kLaT+listOydiBw5dzO1GgY4Z8yuvmD8Do=; b=aUlykJfXtrmoHMNQaIeNGyGrEWW1W+BgwVadhWsuREZ0VukjLS4WvZTRRIMyDL/uRz 0abMY+pSxV/d/UiFYwH8XEm67TeMvPrGFalZ0bYiRhcUkKAAmWPrlfhKg5rDhuDvFa9k nPhsk57eIEAdyQtdJCNeNfrZ1KjQCHIpo7Cqc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=tLBr/Jt+WWyffnb1QqItWOjVpP4im4HN0msRAtDEtA0GePgbRyfv3Xpy6JypbcPPoa nAixRG7s0ssvblziL6ed6HOZbIRHN9/7Pka9vJjwTmCItARUOFSY89qUctOiHWJn84vp vNputQcMnqQKDvDPHimDnGcDlbi+rGipGGGuo= MIME-Version: 1.0 Received: by 10.227.202.139 with SMTP id fe11mr1880209wbb.169.1302864614364; Fri, 15 Apr 2011 03:50:14 -0700 (PDT) Received: by 10.227.174.13 with HTTP; Fri, 15 Apr 2011 03:50:14 -0700 (PDT) Date: Fri, 15 Apr 2011 18:50:14 +0800 Message-ID: From: Adrian Chadd To: freebsd-wireless@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Getting -HEAD net80211 modules building under -8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 15 Apr 2011 10:50:16 -0000 Hi, The subject says it all. I'm trying to do this for people who would like to take advantage of net80211 on -8 so they don't have to upgrade to get newer stuff. (And so I can leave my netbook at -8 and not have to upgrade.) Here's what I've done so far to get a module to build. I'd like to try and commit whatever's needed to get it to build without too much evilness. Firstly, I needed to move /usr/src/sys/net80211 out of the way, as the include's are #include and the search path is: cc -O2 -pipe -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc -I. -I@ -I@/contrib/altq ... .. and this obviously isn't any good for what needs to happen here. I wonder if it's possible to modify the early include path to include -I../.. so the correct net80211 headers are included. The patches so far: sys/modules/wlan/Makefile hackery: Index: Makefile =================================================================== --- Makefile (revision 220650) +++ Makefile (working copy) @@ -15,6 +15,8 @@ SRCS+= bus_if.h device_if.h opt_inet.h opt_inet6.h opt_ipx.h opt_wlan.h \ opt_ddb.h +CFLAGS+= -I../.. + .if !defined(KERNBUILDDIR) opt_wlan.h: echo "#define IEEE80211_DEBUG 1" > ${.TARGET} .. build hackery: (adrian) eeepc:/data/1/adrian/head-2/sys/modules/wlan% cat /data/1/bin/build make MODULES_OVERRIDE="wlan wlan_acl wlan_amrr wlan_ccmp wlan_rssadapt wlan_tkip wlan_wep wlan_xauth" KMODDIR="/boot/kernel" KMODOWN='adrian' KMODGRP='adrian' SYSDIR=/home/adrian/work/freebsd/releng-8.0/sys $@ .. and hackery to the ioctl interface: Index: ieee80211_ioctl.c =================================================================== --- ieee80211_ioctl.c (revision 220650) +++ ieee80211_ioctl.c (working copy) @@ -3251,7 +3251,11 @@ void *ioctl; IEEE80211_LOCK(ic); +#if __FreeBSD_version < 900000 + if_purgemaddrs(parent); +#else if_delallmulti(parent); +#endif ioctl = parent->if_ioctl; /* XXX WAR if_allmulti */ parent->if_ioctl = NULL; TAILQ_FOREACH(vap, &ic->ic_vaps, iv_next) {