--- bcmwl-5.10.91.9+bdcom.orig/debian/copyright +++ bcmwl-5.10.91.9+bdcom/debian/copyright @@ -0,0 +1,279 @@ +This package was debianized by Tim Gardner on +Fri, 8 May 2009 12:03:09 -0400 + +Upstream Author(s): + + Broadcom Corporation, http://www.broadcom.com + +Copyright: + + Copyright 2008, Broadcom Corporation + + +License: + +License for the content of src/: + + Copyright 2008, Broadcom Corporation + All Rights Reserved. + + Unless you and Broadcom execute a separate written software license + agreement governing use of this software, this software is licensed to you + under the terms of the GNU General Public License version 2, available at + http://www.gnu.org/licenses/old-licenses/gpl-2.0.html (the "GPL"), with the + following added to such license: + As a special exception, the copyright holders of this software give you + permission to link this software with independent modules, regardless of the + license terms of these independent modules, and to copy and distribute the + resulting executable under terms of your choice, provided that you also meet, + for each linked independent module, the terms and conditions of the license + of that module. An independent module is a module which is not derived from + this software. + + THIS SOFTWARE IS OFFERED "AS IS", AND BROADCOM GRANTS NO WARRANTIES OF ANY + KIND, EXPRESS OR IMPLIED, BY STATUTE, COMMUNICATION OR OTHERWISE. BROADCOM + SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS + FOR A SPECIFIC PURPOSE OR NONINFRINGEMENT CONCERNING THIS SOFTWARE. + + +License for lib/wlc_hybrid.o_shipped_i386, lib/wlc_hybrid.o_shipped_x86_64: + + Copyright 2008, Broadcom Corporation + All Rights Reserved. + + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice (including the next + paragraph) shall be included in all copies or substantial portions of the + Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR + OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + OTHER DEALINGS IN THE SOFTWARE. + + + + SOFTWARE LICENSE AGREEMENT + + Unless you and Broadcom Corporation ("Broadcom") execute a separate written + software license agreement governing use of the accompanying software, this + software is licensed to you under the terms of this Software License + Agreement ("Agreement"). + + ANY USE, REPRODUCTION OR DISTRIBUTION OF THE SOFTWARE CONSTITUTES YOUR + ACCEPTANCE OF THIS AGREEMENT. + + 1. DEFINITIONS. + + 1.1. "Broadcom Product" means any of the proprietary integrated circuit + product(s) sold by Broadcom with which the Software was designed to be + used, or their successors. + + 1.2. "Licensee" means you or if you are accepting on behalf of an entity + then the entity and its affiliates exercising rights under, and + complying with all of the terms of this Agreement. + + 1.3. "Software" shall mean that software made available by Broadcom to + Licensee in binary code form with this Agreement. + + 2. LICENSE GRANT; OWNERSHIP + + 2.1. License Grants. Subject to the terms and conditions of this Agreement, + Broadcom hereby grants to Licensee a non-exclusive, non-transferable, + royalty-free license (i) to use and integrate the Software in conjunction + with any other software; and (ii) to reproduce and distribute the Software + complete, unmodified and only for use with a Broadcom Product. + + 2.2. Restriction on Modification. If and to the extent that the Software is + designed to be compliant with any published communications standard + (including, without limitation, DOCSIS, HomePNA, IEEE, and ITU standards), + Licensee may not make any modifications to the Software that would cause + the Software or the accompanying Broadcom Products to be incompatible with + such standard. + + 2.3. Restriction on Distribution. Licensee shall only distribute the Software + (a) under the terms of this Agreement and a copy of this Agreement + accompanies such distribution, and (b) agrees to defend and indemnify + Broadcom and its licensors from and against any damages, costs, liabilities, + settlement amounts and/or expenses (including attorneys' fees) incurred in + connection with any claim, lawsuit or action by any third party that arises + or results from the use or distribution of any and all Software by the + Licensee except as contemplated herein. + + 2.4. Proprietary Notices. Licensee shall not remove, efface or obscure any + copyright or trademark notices from the Software. Licensee shall include + reproductions of the Broadcom copyright notice with each copy of the + Software, except where such Software is embedded in a manner not readily + accessible to the end user. Licensee acknowledges that any symbols, + trademarks, tradenames, and service marks adopted by Broadcom to identify + the Software belong to Broadcom and that Licensee shall have no rights + therein. + + 2.5. Ownership. Broadcom shall retain all right, title and interest, including + all intellectual property rights, in and to the Software. Licensee hereby + covenants that it will not assert any claim that the Software created by + or for Broadcom infringe any intellectual property right owned or controlled + by Licensee. + + 2.6. No Other Rights Granted; Restrictions. Apart from the license rights + expressly set forth in this Agreement, Broadcom does not grant and Licensee + does not receive any ownership right, title or interest nor any security + interest or other interest in any intellectual property rights relating to + the Software, nor in any copy of any part of the foregoing. Licensee shall + not (i) use, license, sell or otherwise distribute the Software except as + provided in this Agreement, (ii) attempt to reverse engineer, decompile or + disassemble any portion of the Software; or (iii) use the Software or other + material in violation of any applicable law or regulation, including but not + limited to any regulatory agency, such as FCC, rules. + + 3. NO WARRANTY OR SUPPORT + + 3.1. No Warranty. THE SOFTWARE IS OFFERED "AS IS," AND BROADCOM GRANTS AND LICENSEE + RECEIVES NO WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, BY STATUTE, + COMMUNICATION OR CONDUCT WITH LICENSEE, OR OTHERWISE. BROADCOM SPECIFICALLY + DISCLAIMS ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A SPECIFIC + PURPOSE OR NONINFRINGEMENT CONCERNING THE SOFTWARE OR ANY UPGRADES TO OR + DOCUMENTATION FOR THE SOFTWARE. WITHOUT LIMITATION OF THE ABOVE, BROADCOM + GRANTS NO WARRANTY THAT THE SOFTWARE IS ERROR-FREE OR WILL OPERATE WITHOUT + INTERRUPTION, AND GRANTS NO WARRANTY REGARDING ITS USE OR THE RESULTS + THEREFROM INCLUDING, WITHOUT LIMITATION, ITS CORRECTNESS, ACCURACY OR + RELIABILITY. + + 3.2. No Support. Nothing in this agreement shall obligate Broadcom to provide any + support for the Software. Broadcom may, but shall be under no obligation to, + correct any defects in the Software and/or provide updates to licensees of the + Software. Licensee shall make reasonable efforts to promptly report to Broadcom + any defects it finds in the Software, as an aid to creating improved revisions + of the Software. + + 3.3. Dangerous Applications. The Software is not designed, intended, or certified + for use in components of systems intended for the operation of weapons, weapons + systems, nuclear installations, means of mass transportation, aviation, + life-support computers or equipment (including resuscitation equipment and + surgical implants), pollution control, hazardous substances management, or for + any other dangerous application in which the failure of the Software could + create a situation where personal injury or death may occur.  Licensee + understands that use of the Software in such applications is fully at the risk + of Licensee. + + 4. TERM AND TERMINATION + + 4.1. Termination. This Agreement will automatically terminate if Licensee fails to + comply with any of the terms and conditions hereof. In such event, Licensee must + destroy all copies of the Software and all of its component parts. + + 4.2. Effect Of Termination. Upon any termination of this Agreement, the rights and + licenses granted to Licensee under this Agreement shall immediately terminate. + + 4.3. Survival. The rights and obligations under this Agreement which by their nature + should survive termination will remain in effect after expiration or termination + of this Agreement. + + 5. CONFIDENTIALITY + + 5.1. Obligations. Licensee acknowledges and agrees that any documentation relating to + the Software, and any other information (if such other information is identified + as confidential or should be recognized as confidential under the circumstances) + provided to Licensee by Broadcom hereunder (collectively, "Confidential + Information") constitute the confidential and proprietary information of Broadcom, + and that Licensee's protection thereof is an essential condition to Licensee's use + and possession of the Software. Licensee shall retain all Confidential + Information in strict confidence and not disclose it to any third party or use it + in any way except under a written agreement with terms and conditions at least as + protective as the terms of this Section. Licensee will exercise at least the same + amount of diligence in preserving the secrecy of the Confidential Information as + it uses in preserving the secrecy of its own most valuable confidential information, + but in no event less than reasonable diligence. Information shall not be + considered Confidential Information if and to the extent that it: (i) was in the + public domain at the time it was disclosed or has entered the public domain through + no fault of Licensee; (ii) was known to Licensee, without restriction, at the time + of disclosure as proven by the files of Licensee in existence at the time of + disclosure; or (iii) becomes known to Licensee, without restriction, from a source + other than Broadcom without breach of this Agreement by Licensee and otherwise not + in violation of Broadcom's rights. + + 5.2. Return of Confidential Information. Notwithstanding the foregoing, all documents + and other tangible objects containing or representing Broadcom Confidential + Information and all copies thereof which are in the possession of Licensee shall + be and remain the property of Broadcom, and shall be promptly returned to Broadcom + upon written request by Broadcom or upon termination of this Agreement. + + 6. LIMITATION OF LIABILITY + TO THE MAXIMUM EXTENT PERMITTED BY LAW, IN NO EVENT SHALL BROADCOM OR ANY OF + BROADCOM'S LICENSORS HAVE ANY LIABILITY FOR ANY INDIRECT, INCIDENTAL, SPECIAL, OR + CONSEQUENTIAL DAMAGES, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER FOR + BREACH OF CONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE, ARISING OUT OF THIS + AGREEMENT, INCLUDING BUT NOT LIMITED TO LOSS OF PROFITS, EVEN IF SUCH PARTY HAS + BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. In no event will Broadcom's + liability whether in contract, tort (including negligence), or otherwise, exceed + the amount paid by Licensee for Software under this Agreement. THESE LIMITATIONS + SHALL APPLY NOTWITHSTANDING ANY FAILURE OF ESSENTIAL PURPOSE OF ANY LIMITED REMEDY. + + 7. MISCELLANEOUS + + 7.1. Assignment. This Agreement shall be binding upon and inure to the benefit of the + parties and their respective successors and assigns, provided, however that + Licensee may not assign this Agreement or any rights or obligation hereunder, + directly or indirectly, by operation of law or otherwise, without the prior written + consent of Broadcom, and any such attempted assignment shall be void. + Notwithstanding the foregoing, Licensee may assign this Agreement to a successor + to all or substantially all of its business or assets to which this Agreement + relates that is not a competitor of Broadcom. + + 7.2. Governing Law; Venue. This Agreement shall be governed by the laws of California + without regard to any conflict-of-laws rules, and the United Nations Convention on + Contracts for the International Sale of Goods is hereby excluded. The sole + jurisdiction and venue for actions related to the subject matter hereof shall be + the state and federal courts located in the County of Orange, California, and both + parties hereby consent to such jurisdiction and venue. + + 7.3. Severability. All terms and provisions of this Agreement shall, if possible, be + construed in a manner which makes them valid, but in the event any term or + provision of this Agreement is found by a court of competent jurisdiction to be + illegal or unenforceable, the validity or enforceability of the remainder of this + Agreement shall not be affected if the illegal or unenforceable provision does not + materially affect the intent of this Agreement. If the illegal or unenforceable + provision materially affects the intent of the parties to this Agreement, this + Agreement shall become terminated. + + 7.4. Equitable Relief. Licensee hereby acknowledges that its breach of this Agreement + would cause irreparable harm and significant injury to Broadcom that may be + difficult to ascertain and that a remedy at law would be inadequate. Accordingly, + Licensee agrees that Broadcom shall have the right to seek and obtain immediate + injunctive relief to enforce obligations under the Agreement in addition to any + other rights and remedies it may have. + + 7.5. Export Regulations. The parties agree that they shall each comply, at their own + expense, with the U.S. Foreign Corrupt Practices Act and all  import and export + laws, restrictions, national security controls and regulations of the United + States and any applicable foreign agency or authority.  The parties shall not  + import, export or re-export, or authorize the export or re-export of the Software + or any other product, technology, or information that it obtains or learns + hereunder, or any copy or direct product thereof, in violation of any of such + laws, restrictions, or regulations or without any license or approval required + thereunder.  Any and all obligations of the parties to provide the Software or + any other product, technology, or information hereunder shall be subject in all + respects to such laws, restrictions, and regulations. + + 7.6. Waiver. The waiver of, or failure to enforce, any breach or default hereunder + shall not constitute the waiver of any other or subsequent breach or default. + + 7.7. Entire Agreement. This Agreement sets forth the entire Agreement between the + parties and supersedes any and all prior proposals, agreements and + representations between them, whether written or oral concerning the Software. + This Agreement may be changed only by mutual agreement of the parties in writing. + + +The Debian packaging is (C) 2009, Canonical Ltd and is licensed +under the GPL, see `/usr/share/common-licenses/GPL'. + + --- bcmwl-5.10.91.9+bdcom.orig/debian/compat +++ bcmwl-5.10.91.9+bdcom/debian/compat @@ -0,0 +1 @@ +4 --- bcmwl-5.10.91.9+bdcom.orig/debian/bcmwl-kernel-source.postrm +++ bcmwl-5.10.91.9+bdcom/debian/bcmwl-kernel-source.postrm @@ -0,0 +1,21 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007-2008 Mario Limonciello +# Copyright (C) 2009 Alberto Milone + +#DEBHELPER# + +BLACKLIST_FILE=/etc/modprobe.d/blacklist-bcm43.conf + +case "$1" in + remove|purge) + # Remove blacklist file + rm -f $BLACKLIST_FILE + + # Update initramfs + /usr/sbin/update-initramfs -u + ;; +esac + +#DEBHELPER# --- bcmwl-5.10.91.9+bdcom.orig/debian/bcmwl-modaliases.install.in +++ bcmwl-5.10.91.9+bdcom/debian/bcmwl-modaliases.install.in @@ -0,0 +1 @@ +debian/bcmwl usr/share/jockey/modaliases --- bcmwl-5.10.91.9+bdcom.orig/debian/bcmwl-kernel-source.install.in +++ bcmwl-5.10.91.9+bdcom/debian/bcmwl-kernel-source.install.in @@ -0,0 +1,7 @@ +src/lib/wlc_hybrid.o_shipped_#ARCH# usr/src/bcmwl-#VERSION#/lib +src/lib/*.txt usr/src/bcmwl-#VERSION#/lib +src/src/* usr/src/bcmwl-#VERSION#/src +Makefile usr/src/bcmwl-#VERSION# +debian/dkms.conf usr/src/bcmwl-#VERSION# +debian/patches/* usr/src/bcmwl-#VERSION#/patches + --- bcmwl-5.10.91.9+bdcom.orig/debian/bcmwl-kernel-source.postinst +++ bcmwl-5.10.91.9+bdcom/debian/bcmwl-kernel-source.postinst @@ -0,0 +1,114 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007 Mario Limonciello +# Copyright (C) 2009 Alberto Milone + +CVERSION=`dpkg-query -W -f='${Version}' bcmwl-kernel-source | awk -F "-" '{print $1}' | cut -d\: -f2` +MODULES_DIR=$(ls /lib/modules/) +CURRENT_KERNEL=$(uname -r) +BLACKLIST_FILE=/etc/modprobe.d/blacklist-bcm43.conf +PACKAGE_NAME=bcmwl-kernel-source +#DEBHELPER# + +case "$1" in + configure) + # On 1st installation, let us look for a directory + # in /lib/modules which matches `uname -r`. If none + # is found it is possible that buildd is being used + # and that uname -r is giving us the name of the + # kernel used by the buildd machine. + # + # If this is the case we try to build the kernel + # module for each kernel which has a directory in + # /lib/modules. Furthermore we will have to tell + # DKMS which architecture it should build the module + # for (e.g. if the buildd machine is using a + # 2.6.24-23-xen 64bit kernel). + # + # NOTE: if the headers are not installed then the + # module won't be built, as usual + if [ "configure" = "$1" ] && [ -z "$2" ]; then + KERNEL_MATCHES=false + + echo "First Installation: checking all kernels..." + for kerneldir in $MODULES_DIR; do + if [ ${kerneldir} = ${CURRENT_KERNEL} ]; then + # Kernel found + KERNEL_MATCHES=true + break + fi + done + + if [ $KERNEL_MATCHES = false ]; then + # Maybe we are dealing with buildd + echo "Directory for kernel $CURRENT_KERNEL not found in /lib/modules" + case $(dpkg --print-architecture) in + amd64) + FORCE_ARCH=x86_64 + ;; + lpia) + FORCE_ARCH=i686 + ;; + i386) + FORCE_ARCH=i686 + ;; + *) + echo "ERROR: unsupported arch: "$(dpkg --print-architecture) + exit 1 + ;; + esac + + echo "Adding Module to DKMS build system" + dkms add -m bcmwl -v $CVERSION > /dev/null + + for kerneldir in $MODULES_DIR; do + echo "Building initial module for $kerneldir, architecture $FORCE_ARCH" + dkms build -m bcmwl -v $CVERSION -k $kerneldir -a $FORCE_ARCH > /dev/null + echo "Installing initial module for $kerneldir, architecture $FORCE_ARCH" + dkms install -m bcmwl -v $CVERSION -k $kerneldir -a $FORCE_ARCH --force > /dev/null + done + else + echo "Directory for kernel $CURRENT_KERNEL found in /lib/modules" + echo "Adding Module to DKMS build system" + dkms add -m bcmwl -v $CVERSION > /dev/null + echo "Doing initial module build" + dkms build -m bcmwl -v $CVERSION > /dev/null + echo "Installing initial module" + dkms install -m bcmwl -v $CVERSION --force > /dev/null + echo "Done." + fi + else + echo "Adding Module to DKMS build system" + dkms add -m bcmwl -v $CVERSION > /dev/null + echo "Doing initial module build" + dkms build -m bcmwl -v $CVERSION > /dev/null + echo "Installing initial module" + dkms install -m bcmwl -v $CVERSION --force > /dev/null + echo "Done." + fi + + # Create a blacklist file + if [ ! -f $BLACKLIST_FILE ]; then + cat > $BLACKLIST_FILE < /dev/null; then + cat >> $BLACKLIST_FILE <&2 + exit 1 +} + +echo "# Listing generated by bcmwl_supported. Do not edit manually." + +device_ids() { + local filename="$1" + grep PCI_VENDOR_ID_BROADCOM, $filename | + while read line; do + id=${line#*, } + id=${id%%,*} + id=${id#*0x} + echo $id + done +} + + +seen_ids=' ' + +while [ -n "$1" ]; do + filename="$1"; shift + modname="$1"; shift + pkgname="$1"; shift + + orig_ids="$(device_ids "$filename")" + if [ -z "$orig_ids" ]; then + echo "WARNING: No IDs were found from $filename" >&2 + fi + + for id in $orig_ids; do + case "$seen_ids" in + *" $id "*) + # Already seen the ID. + ;; + *) + # Not seen it yet. + seen_ids="${seen_ids}${id} " + + printf "alias pci:v%08Xd%08Xsv*sd*bc*sc*i* %s %s\n" \ + 0x14E4 "0x$id" "$modname" "$pkgname" + ;; + esac + done +done | sort + + --- bcmwl-5.10.91.9+bdcom.orig/debian/bcmwl-kernel-source.prerm +++ bcmwl-5.10.91.9+bdcom/debian/bcmwl-kernel-source.prerm @@ -0,0 +1,18 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007-2008 Mario Limonciello +# Copyright (C) 2009 Alberto Milone + +#DEBHELPER# + +CVERSION=`dpkg-query -W -f='${Version}' bcmwl-kernel-source | awk -F "-" '{print $1}' | cut -d\: -f2` +case "$1" in + remove|upgrade) + echo "Removing all DKMS Modules" + dkms remove -m bcmwl -v $CVERSION --all > /dev/null + echo "Done." + ;; +esac + +#DEBHELPER# --- bcmwl-5.10.91.9+bdcom.orig/debian/control +++ bcmwl-5.10.91.9+bdcom/debian/control @@ -0,0 +1,22 @@ +Source: bcmwl +Section: admin +Priority: optional +Maintainer: Ubuntu Core Developers +XSBC-Original-Maintainer: Alberto Milone +Standards-Version: 3.8.0 +Build-Depends: debhelper (>= 5), cdbs +Vcs-Bzr: https://code.launchpad.net/~broadcom-sta-hackers/broadcom-sta/ubuntu + +Package: bcmwl-kernel-source +Architecture: i386 amd64 lpia +Depends: ${misc:Depends}, dkms, linux-libc-dev, libc6-dev, linux-headers-generic [i386 amd64], linux-headers-lpia [lpia] +Description: Broadcom 802.11 Linux STA wireless driver source + These package contains Broadcom 802.11 Linux STA wireless driver + for use with Broadcom's BCM4311-, BCM4312-, BCM4321-, and + BCM4322-based hardware. + +Package: bcmwl-modaliases +Architecture: i386 amd64 lpia +Description: Modaliases for the Broadcom 802.11 Linux STA driver + The modaliases provide a list of pci id's which makes it possible to + detect the model of a wireless card. --- bcmwl-5.10.91.9+bdcom.orig/debian/dkms.conf.in +++ bcmwl-5.10.91.9+bdcom/debian/dkms.conf.in @@ -0,0 +1,16 @@ +PACKAGE_NAME="bcmwl" +PACKAGE_VERSION="#VERSION#" +CLEAN="rm -f *.*o" + +BUILT_MODULE_NAME[0]="wl" +MAKE[0]="make -C $kernel_source_dir M=$dkms_tree/$PACKAGE_NAME/$PACKAGE_VERSION/build" +DEST_MODULE_LOCATION[0]="/updates" +PATCH[0]="0001-MODULE_LICENSE.patch" +PATCH[1]="0002-Makefile.patch" +PATCH[2]="0003-DEV_WL_IF.patch" +PATCH_MATCH[2]="^2.6.2[9]" +PATCH[3]="0004-broadcom-sta-5.10.91.9-linux-2.6.30.patch" +PATCH_MATCH[3]="^2.6.[30]" +PATCH[4]="0005-NET_DEVICE_OPS.patch" + +AUTOINSTALL="yes" --- bcmwl-5.10.91.9+bdcom.orig/debian/rules +++ bcmwl-5.10.91.9+bdcom/debian/rules @@ -0,0 +1,38 @@ +#!/usr/bin/make -f +# Copyright (C) 2009 Alberto Milone + +include /usr/share/cdbs/1/rules/debhelper.mk + +DRIVER_NAME := bcmwl +VERSION := $(shell dpkg-parsechangelog | grep '^Version:' | cut -d' ' -f2 | cut -d- -f1 | cut -d\: -f2) +PKG_kernel_src := bcmwl-kernel-source +PKG_modaliases := bcmwl-modaliases +ARCH := $(shell dpkg --print-architecture) +ifeq ($(ARCH),amd64) +ARCH_SUFFIX=x86_64 +else +ARCH_SUFFIX=i386 +endif + + +configure/$(PKG_kernel_src):: + #Replace important strings + for i in dkms.conf \ + $(PKG_kernel_src).install \ + $(PKG_modaliases).install; do \ + sed -e "s|#VERSION#|$(VERSION)|" \ + -e "s|#ARCH#|$(ARCH_SUFFIX)|" \ + debian/$$i.in > debian/$$i; \ + done + # Generate the modaliases + $(SHELL) $(CURDIR)/debian/bcmwl_supported \ + $(CURDIR)/src/src/wl/sys/wl_linux.c wl $(PKG_kernel_src) \ + > $(CURDIR)/debian/bcmwl + +clean:: + rm -f debian/dkms.conf \ + debian/$(PKG_kernel_src).install \ + debian/$(PKG_modaliases).install + rm -Rf $(CURDIR)/$(PKG_kernel_src) + rm -f $(CURDIR)/debian/bcmwl + --- bcmwl-5.10.91.9+bdcom.orig/debian/changelog +++ bcmwl-5.10.91.9+bdcom/debian/changelog @@ -0,0 +1,86 @@ +bcmwl (5.10.91.9+bdcom-0ubuntu4) karmic; urgency=low + + * debian/patches/0005-NET_DEVICE_OPS.patch: + - Don’t break build for <= 2.6.30. (LP: #394279) + + -- Anders Kaseorg Wed, 01 Jul 2009 11:05:25 -0400 + +bcmwl (5.10.91.9+bdcom-0ubuntu3) karmic; urgency=low + + * Update for new net_device_ops API (fixes build for 2.6.31). + + -- Soren Hansen Tue, 30 Jun 2009 22:55:18 -0700 + +bcmwl (5.10.91.9+bdcom-0ubuntu2) karmic; urgency=low + + * debian/rules, debian/bcmwl-kernel-source.install.in: + - Install only the binary compiled for the target + architecture. + + -- Alberto Milone Fri, 19 Jun 2009 19:19:02 +0200 + +bcmwl (5.10.91.9+bdcom-0ubuntu1) karmic; urgency=low + + * debian/control: + - Add misc:Depends. + - Update Standards-Version. + - Depend on linux-headers-generic for i386 and amd64 + and on linux-headers-lpia for lpia. + - Limit architectures to i386 amd64 and lpia. + - Set Vcs-Bzr. + - Add new package bcmwl-modaliases. + - Change maintainer to Ubuntu Core Devs and set + original maintainer to myself. + * debian/copyright: + - Add license from the binary library. + * debian/rules + - Switch to CDBS. + - Do not apply any patches. + - Automatically generate debian/dkms.conf and + debian/bcmwl-kernel-source.install. + - Call debian/bcmwl_supported to install + modalias file in /usr/share/jockey/modaliases (LP: #381682) + * src/patches: + - Move patches directory to debian/patches. + * debian/patches/0002-Makefile.patch: + - Replace dpkg-architecture with dpkg --print-architecture + so as not to depend on dpkg-dev. + * debian/dkms.conf.in: + - Handle patches here so that different patches + can be applied to different kernel versions. + * Separate source from debian/. + * debian/bcmwl-kernel-source.postinst: + - Cover the use case of buildd machines and build the + module for the right kernel on 1st installation. + - Create a blacklist file containing b43, b43legacy, ssb + bcm43xx and add workaround for b44 so that it is loaded + after wl (provided that b44 is used). + - Update initramfs. + * debian/bcmwl-kernel-source.postrm: + - Remove blacklist file. + - Update initramfs. + * debian/patches: + - Add 0004-broadcom-sta-5.10.91.9-linux-2.6.30.patch. + * debian/dkms.conf.in: + - Make sure that patch 0004 is applied only to + 2.6.30 kernels. + + -- Alberto Milone Fri, 19 Jun 2009 13:12:39 +0200 + +bcmwl (5.10.91.9-3) karmic; urgency=low + + * Fixed build errors with 2.6.30 + + -- Tim Gardner Tue, 12 May 2009 15:29:06 -0600 + +bcmwl (5.10.91.9-2) karmic; urgency=low + + * Add src/lib/LICENSE.txt to copyright notice. + + -- Tim Gardner Mon, 11 May 2009 16:04:29 +0000 + +bcmwl (5.10.91.9-1) karmic; urgency=low + + * Initial release + + -- Tim Gardner Fri, 5 Sep 2008 18:15:32 -0400 --- bcmwl-5.10.91.9+bdcom.orig/debian/patches/0004-broadcom-sta-5.10.91.9-linux-2.6.30.patch +++ bcmwl-5.10.91.9+bdcom/debian/patches/0004-broadcom-sta-5.10.91.9-linux-2.6.30.patch @@ -0,0 +1,204 @@ +diff -ur hybrid-portsrc-x86_64-v5_10_91_9/src/wl/sys/wl_iw.c wl/src/wl/sys/wl_iw.c +--- hybrid-portsrc-x86_64-v5_10_91_9/src/wl/sys/wl_iw.c 2009-04-22 12:51:58.000000000 -0500 ++++ wl/src/wl/sys/wl_iw.c 2009-05-10 12:09:16.000000000 -0500 +@@ -580,6 +580,7 @@ + range->enc_capa |= IW_ENC_CAPA_CIPHER_TKIP; + range->enc_capa |= IW_ENC_CAPA_CIPHER_CCMP; + range->enc_capa |= IW_ENC_CAPA_WPA2; ++ range->scan_capa = IW_SCAN_CAPA_ESSID; + #endif + + return 0; +@@ -610,7 +611,11 @@ + char *extra + ) + { +- wl_iw_t *iw = dev->priv; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ wl_iw_t *iw = netdev_priv(dev); ++#else ++ wl_iw_t *iw = dev->priv; ++#endif + struct sockaddr *addr = (struct sockaddr *) extra; + int i; + +@@ -635,7 +640,11 @@ + char *extra + ) + { +- wl_iw_t *iw = dev->priv; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ wl_iw_t *iw = netdev_priv(dev); ++#else ++ wl_iw_t *iw = dev->priv; ++#endif + struct sockaddr *addr = (struct sockaddr *) extra; + struct iw_quality *qual = (struct iw_quality *) &addr[iw->spy_num]; + int i; +@@ -1110,7 +1119,11 @@ + char *extra + ) + { +- wl_iw_t *iw = dev->priv; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ wl_iw_t *iw = netdev_priv(dev); ++#else ++ wl_iw_t *iw = dev->priv; ++#endif + + WL_TRACE(("%s: SIOCSIWNICKN\n", dev->name)); + +@@ -1134,7 +1147,11 @@ + char *extra + ) + { +- wl_iw_t *iw = dev->priv; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ wl_iw_t *iw = netdev_priv(dev); ++#else ++ wl_iw_t *iw = dev->priv; ++#endif + + WL_TRACE(("%s: SIOCGIWNICKN\n", dev->name)); + +@@ -1790,7 +1807,11 @@ + int paramid; + int paramval; + int val = 0; +- wl_iw_t *iw = dev->priv; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ wl_iw_t *iw = netdev_priv(dev); ++#else ++ wl_iw_t *iw = dev->priv; ++#endif + + WL_TRACE(("%s: SIOCSIWAUTH\n", dev->name)); + +@@ -1921,7 +1942,11 @@ + int paramid; + int paramval = 0; + int val; +- wl_iw_t *iw = dev->priv; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ wl_iw_t *iw = netdev_priv(dev); ++#else ++ wl_iw_t *iw = dev->priv; ++#endif + + WL_TRACE(("%s: SIOCGIWAUTH\n", dev->name)); + +diff -ur hybrid-portsrc-x86_64-v5_10_91_9/src/wl/sys/wl_linux.c wl/src/wl/sys/wl_linux.c +--- hybrid-portsrc-x86_64-v5_10_91_9/src/wl/sys/wl_linux.c 2009-04-22 12:52:08.000000000 -0500 ++++ wl/src/wl/sys/wl_linux.c 2009-05-10 12:17:09.507872441 -0500 +@@ -53,9 +53,16 @@ + #include + #define WLC_MAXBSSCFG 1 + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++#include ++#endif ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 30) ++#include ++#else + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) + #include + #endif ++#endif + + #include + #include +@@ -130,7 +137,11 @@ + u8 rx_hdr[16], tx_hdr[16]; + }; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++#define WL_DEV_IF(dev) ((wl_if_t*)netdev_priv(dev)) ++#else + #define WL_DEV_IF(dev) ((wl_if_t*)(dev)->priv) ++#endif + #define WL_INFO(dev) ((wl_info_t*)(WL_DEV_IF(dev)->wl)) + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) +@@ -282,6 +293,9 @@ + dev = wlif->dev; + wl->dev = dev; + wl_if_setup(dev); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ wlif = netdev_priv(dev); ++#endif + + dev->base_addr = regs; + +@@ -359,10 +373,20 @@ + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) + +- wl->tkipmodops = ieee80211_get_crypto_ops("TKIP"); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ wl->tkipmodops = lib80211_get_crypto_ops("TKIP"); ++#else ++ wl->tkipmodops = ieee80211_get_crypto_ops("TKIP"); ++#endif + if (wl->tkipmodops == NULL) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ request_module("lib80211"); ++ request_module("lib80211_crypt_tkip"); ++ wl->tkipmodops = lib80211_get_crypto_ops("TKIP"); ++#else + request_module("ieee80211_crypt_tkip"); + wl->tkipmodops = ieee80211_get_crypto_ops("TKIP"); ++#endif + } + #endif + #ifdef CONFIG_WIRELESS_EXT +@@ -666,7 +690,11 @@ + } + + if (wl->monitor) { ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ wl_free_if(wl, (wl_if_t *)netdev_priv(wl->monitor)); ++#else + wl_free_if(wl, (wl_if_t *)(wl->monitor->priv)); ++#endif + wl->monitor = NULL; + } + +@@ -833,7 +861,10 @@ + strncpy(dev->name, name, IFNAMSIZ); + #else + +- dev = alloc_netdev(0, name, ether_setup); ++ dev = alloc_netdev(sizeof(wl_if_t), name, ether_setup); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ wlif = netdev_priv(dev); ++#endif + if (!dev) { + MFREE(wl->osh, wlif, sizeof(wl_if_t)); + WL_ERROR(("wl%d: wl_alloc_if: out of memory, alloc_netdev\n", +@@ -847,7 +878,9 @@ + wlif->wl = wl; + wlif->wlcif = wlcif; + wlif->subunit = subunit; +- dev->priv = wlif; ++#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29) ++ dev->priv = wlif; ++#endif + + if (iftype != WL_IFTYPE_MON && wl->dev && netif_queue_stopped(wl->dev)) + netif_stop_queue(dev); +diff -ur hybrid-portsrc-x86_64-v5_10_91_9/src/wl/sys/wl_linux.h wl/src/wl/sys/wl_linux.h +--- hybrid-portsrc-x86_64-v5_10_91_9/src/wl/sys/wl_linux.h 2009-04-22 12:52:13.000000000 -0500 ++++ wl/src/wl/sys/wl_linux.h 2009-05-10 12:11:17.000000000 -0500 +@@ -85,7 +85,11 @@ + bool resched; + uint32 pci_psstate[16]; + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) +- struct ieee80211_crypto_ops *tkipmodops; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ struct lib80211_crypto_ops *tkipmodops; ++#else ++ struct ieee80211_crypto_ops *tkipmodops; ++#endif + struct ieee80211_tkip_data *tkip_ucast_data; + struct ieee80211_tkip_data *tkip_bcast_data; + #endif --- bcmwl-5.10.91.9+bdcom.orig/debian/patches/0003-DEV_WL_IF.patch +++ bcmwl-5.10.91.9+bdcom/debian/patches/0003-DEV_WL_IF.patch @@ -0,0 +1,220 @@ +index d7aba83..8aa5df8 100644 +--- src/src/wl/sys/wl_iw.c.orig ++++ src/src/wl/sys/wl_iw.c +@@ -58,6 +58,12 @@ extern bool wl_iw_conn_status_str(uint32 event_type, uint32 status, + #define htodchanspec(i) i + #define dtohchanspec(i) i + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++#define WL_DEV_IW(dev) ((wl_iw_t *)netdev_priv(dev)) ++#else ++#define WL_DEV_IW(dev) ((wl_iw_t *)(dev)->priv) ++#endif ++ + #ifdef CONFIG_WIRELESS_EXT + extern struct iw_statistics *wl_get_wireless_stats(struct net_device *dev); + #endif +@@ -610,7 +616,7 @@ wl_iw_set_spy( + char *extra + ) + { +- wl_iw_t *iw = dev->priv; ++ wl_iw_t *iw = WL_DEV_IW(dev); + struct sockaddr *addr = (struct sockaddr *) extra; + int i; + +@@ -635,7 +641,7 @@ wl_iw_get_spy( + char *extra + ) + { +- wl_iw_t *iw = dev->priv; ++ wl_iw_t *iw = WL_DEV_IW(dev); + struct sockaddr *addr = (struct sockaddr *) extra; + struct iw_quality *qual = (struct iw_quality *) &addr[iw->spy_num]; + int i; +@@ -1110,7 +1116,7 @@ wl_iw_set_nick( + char *extra + ) + { +- wl_iw_t *iw = dev->priv; ++ wl_iw_t *iw = WL_DEV_IW(dev); + + WL_TRACE(("%s: SIOCSIWNICKN\n", dev->name)); + +@@ -1134,7 +1140,7 @@ wl_iw_get_nick( + char *extra + ) + { +- wl_iw_t *iw = dev->priv; ++ wl_iw_t *iw = WL_DEV_IW(dev); + + WL_TRACE(("%s: SIOCGIWNICKN\n", dev->name)); + +@@ -1790,7 +1796,7 @@ wl_iw_set_wpaauth( + int paramid; + int paramval; + int val = 0; +- wl_iw_t *iw = dev->priv; ++ wl_iw_t *iw = WL_DEV_IW(dev); + + WL_TRACE(("%s: SIOCSIWAUTH\n", dev->name)); + +@@ -1921,7 +1927,7 @@ wl_iw_get_wpaauth( + int paramid; + int paramval = 0; + int val; +- wl_iw_t *iw = dev->priv; ++ wl_iw_t *iw = WL_DEV_IW(dev); + + WL_TRACE(("%s: SIOCGIWAUTH\n", dev->name)); + +index 0f81236..a8e237a 100644 +--- src/src/wl/sys/wl_linux.c.orig ++++ src/src/wl/sys/wl_linux.c +@@ -53,7 +53,9 @@ + #include + #define WLC_MAXBSSCFG 1 + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++#include ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) + #include + #endif + +@@ -130,8 +132,12 @@ struct ieee80211_tkip_data { + u8 rx_hdr[16], tx_hdr[16]; + }; + +-#define WL_DEV_IF(dev) ((wl_if_t*)(dev)->priv) + #define WL_INFO(dev) ((wl_info_t*)(WL_DEV_IF(dev)->wl)) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++#define WL_DEV_IF(dev) ((wl_if_t*)netdev_priv(dev)) ++#else ++#define WL_DEV_IF(dev) ((wl_if_t*)(dev)->priv) ++#endif + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) + #define WL_ISR(i, d, p) wl_isr((i), (d)) +@@ -357,7 +365,14 @@ wl_attach(uint16 vendor, uint16 device, ulong regs, uint bustype, void *btparam, + } + wlif->dev_registed = TRUE; + +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ ++ wl->tkipmodops = lib80211_get_crypto_ops("TKIP"); ++ if (wl->tkipmodops == NULL) { ++ request_module("lib80211_crypt_tkip"); ++ wl->tkipmodops = lib80211_get_crypto_ops("TKIP"); ++ } ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) + + wl->tkipmodops = ieee80211_get_crypto_ops("TKIP"); + if (wl->tkipmodops == NULL) { +@@ -666,7 +681,7 @@ wl_free(wl_info_t *wl) + } + + if (wl->monitor) { +- wl_free_if(wl, (wl_if_t *)(wl->monitor->priv)); ++ wl_free_if(wl, WL_DEV_IF(wl->monitor)); + wl->monitor = NULL; + } + +@@ -808,6 +823,29 @@ wl_txflowcontrol(wl_info_t *wl, bool state, int prio) + } + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)) ++static wl_if_t *wl_alloc_netdev(wl_info_t *wl) ++{ ++ wl_if_t *wlif; ++ struct net_device *dev; ++ dev = alloc_netdev(sizeof(wl_if_t), name, ether_setup); ++ if (!dev) { ++ WL_ERROR(("wl%d: wl_alloc_if: out of memory, alloc_netdev\n", ++ (wl->pub)?wl->pub->unit:subunit)); ++ return NULL; ++ } ++ wlif = WL_DEV_IF(dev); ++ wlif->dev = dev; ++ return wlif; ++} ++ ++static void wl_free_netdev(wl_if_t *wlif) ++{ ++ if (wlif->dev) ++ free_netdev(wlif->dev); ++} ++#endif ++ + struct wl_if * + wl_alloc_if(wl_info_t *wl, int iftype, uint subunit, struct wlc_if* wlcif) + { +@@ -815,6 +853,8 @@ wl_alloc_if(wl_info_t *wl, int iftype, uint subunit, struct wlc_if* wlcif) + wl_if_t *wlif; + wl_if_t *p; + ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 29)) ++ + if (!(wlif = MALLOC(wl->osh, sizeof(wl_if_t)))) { + WL_ERROR(("wl%d: wl_alloc_if: out of memory, malloced %d bytes\n", + (wl->pub)?wl->pub->unit:subunit, MALLOCED(wl->osh))); +@@ -842,12 +882,20 @@ wl_alloc_if(wl_info_t *wl, int iftype, uint subunit, struct wlc_if* wlcif) + } + #endif + ++ dev->priv = wlif; ++ ++#else ++ wlif = wl_alloc_netdev(wl); ++ if (!wlif) ++ return NULL; ++ dev = wlif->dev; ++#endif ++ + wlif->type = iftype; + wlif->dev = dev; + wlif->wl = wl; + wlif->wlcif = wlcif; + wlif->subunit = subunit; +- dev->priv = wlif; + + if (iftype != WL_IFTYPE_MON && wl->dev && netif_queue_stopped(wl->dev)) + netif_stop_queue(dev); +@@ -881,6 +929,10 @@ wl_free_if(wl_info_t *wl, wl_if_t *wlif) + p->next = p->next->next; + } + ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)) ++ wl_free_netdev(wlif); ++#else ++ + if (wlif->dev) { + #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24)) + MFREE(wl->osh, wlif->dev, sizeof(struct net_device)); +@@ -889,6 +941,8 @@ wl_free_if(wl_info_t *wl, wl_if_t *wlif) + #endif + } + MFREE(wl->osh, wlif, sizeof(wl_if_t)); ++ ++#endif + } + + char * +index 0251e5e..a97efbe 100644 +--- src/src/wl/sys/wl_linux.h.orig ++++ src/src/wl/sys/wl_linux.h +@@ -84,7 +84,11 @@ struct wl_info { + struct net_device *monitor; + bool resched; + uint32 pci_psstate[16]; +-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29) ++ struct lib80211_crypto_ops *tkipmodops; ++ struct lib80211_tkip_data *tkip_ucast_data; ++ struct lib80211_tkip_data *tkip_bcast_data; ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) + struct ieee80211_crypto_ops *tkipmodops; + struct ieee80211_tkip_data *tkip_ucast_data; + struct ieee80211_tkip_data *tkip_bcast_data; --- bcmwl-5.10.91.9+bdcom.orig/debian/patches/0002-Makefile.patch +++ bcmwl-5.10.91.9+bdcom/debian/patches/0002-Makefile.patch @@ -0,0 +1,22 @@ +index 2ef91b1..6d821a0 100644 +--- src/Makefile.orig ++++ src/Makefile +@@ -26,6 +26,12 @@ + # + # $Id: Makefile_kbuild_portsrc,v 1.1.2.4 2008/05/02 18:33:39 Exp $ + ++ifeq ($(shell dpkg --print-architecture),amd64) ++BINARCH = x86_64 ++else ++BINARCH = i386 ++endif ++ + obj-m += wl.o + + wl-objs := +@@ -37,4 +43,4 @@ EXTRA_CFLAGS := + EXTRA_CFLAGS += -I$(src)/src/include + EXTRA_CFLAGS += -I$(src)/src/wl/sys + +-EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped ++EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped_$(BINARCH) --- bcmwl-5.10.91.9+bdcom.orig/debian/patches/0001-MODULE_LICENSE.patch +++ bcmwl-5.10.91.9+bdcom/debian/patches/0001-MODULE_LICENSE.patch @@ -0,0 +1,12 @@ +index 0f81236..c9968df 100644 +--- src/src/wl/sys/wl_linux.c.orig ++++ src/src/wl/sys/wl_linux.c +@@ -163,6 +163,8 @@ struct wl_if *wl_alloc_if(wl_info_t *wl, int iftype, uint unit, struct wlc_if* w + static void wl_free_if(wl_info_t *wl, wl_if_t *wlif); + static void wl_get_driver_info(struct net_device *dev, struct ethtool_drvinfo *info); + ++MODULE_LICENSE("MIXED/Proprietary"); ++ + static struct pci_device_id wl_id_table[] = { + { PCI_VENDOR_ID_BROADCOM, 0x4311, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, + { PCI_VENDOR_ID_BROADCOM, 0x4312, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, --- bcmwl-5.10.91.9+bdcom.orig/debian/patches/0005-NET_DEVICE_OPS.patch +++ bcmwl-5.10.91.9+bdcom/debian/patches/0005-NET_DEVICE_OPS.patch @@ -0,0 +1,64 @@ +--- src/src/wl/sys/wl_linux.c ++++ src/src/wl/sys/wl_linux.c +@@ -214,9 +214,27 @@ + }; + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) ++static const struct net_device_ops wlNetAdpNetDevOps = ++{ ++ .ndo_open = wl_open, ++ .ndo_stop = wl_close, ++ .ndo_start_xmit = wl_start, ++ .ndo_get_stats = wl_get_stats, ++ .ndo_set_mac_address = wl_set_mac_address, ++ .ndo_set_multicast_list = wl_set_multicast_list, ++ .ndo_do_ioctl = wl_ioctl, ++}; ++ + static + void wl_if_setup(struct net_device *dev) + { ++ dev->netdev_ops = &wlNetAdpNetDevOps; ++#else ++static ++void wl_if_setup(struct net_device *dev) ++{ ++ + dev->open = wl_open; + dev->stop = wl_close; + dev->hard_start_xmit = wl_start; +@@ -224,6 +242,7 @@ + dev->set_mac_address = wl_set_mac_address; + dev->set_multicast_list = wl_set_multicast_list; + dev->do_ioctl = wl_ioctl; ++#endif + #ifdef CONFIG_WIRELESS_EXT + #if WIRELESS_EXT < 19 + dev->get_wireless_stats = wl_get_wireless_stats; +only in patch2: +unchanged: +--- src/src/wl/sys/wl_iw.c ++++ src/src/wl/sys/wl_iw.c +@@ -67,6 +67,12 @@ + #define IW_EVENT_IDX(cmd) ((cmd) - IWEVFIRST) + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 31) ++#define DO_IOCTL(dev) dev->netdev_ops->ndo_do_ioctl ++#else ++#define DO_IOCTL(dev) dev->do_ioctl ++#endif ++ + static void swap_key_from_BE( + wl_wsec_key_t *key + ) +@@ -118,7 +124,7 @@ + + fs = get_fs(); + set_fs(get_ds()); +- ret = dev->do_ioctl(dev, &ifr, SIOCDEVPRIVATE); ++ ret = DO_IOCTL(dev)(dev, &ifr, SIOCDEVPRIVATE); + set_fs(fs); + + return ret;