--- bcmwl-6.30.223.271+bdcom.orig/bcmwl_6.30.223.271+bdcom-0ubuntu3_amd64.buildinfo
+++ bcmwl-6.30.223.271+bdcom/bcmwl_6.30.223.271+bdcom-0ubuntu3_amd64.buildinfo
@@ -0,0 +1,163 @@
+Format: 1.0
+Source: bcmwl
+Binary: bcmwl-kernel-source
+Architecture: amd64
+Version: 6.30.223.271+bdcom-0ubuntu3
+Checksums-Md5:
+ 7890d2d1b077f0edcbdcadd5534d5090 1542706 bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu3_amd64.deb
+Checksums-Sha1:
+ 91e3318fe82b283bd94ab34a54c7367357e3de7c 1542706 bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu3_amd64.deb
+Checksums-Sha256:
+ 30ae529e49a2717ab2de81fcd6884c1bdd683bac9a630263c79445b476a52431 1542706 bcmwl-kernel-source_6.30.223.271+bdcom-0ubuntu3_amd64.deb
+Build-Origin: Ubuntu
+Build-Architecture: amd64
+Build-Date: Mon, 12 Jun 2017 14:45:12 +0000
+Build-Path: /build/bcmwl-vUu6H5/bcmwl-6.30.223.271+bdcom
+Installed-Build-Depends:
+ autoconf (= 2.69-10),
+ automake (= 1:1.15-6ubuntu1),
+ autopoint (= 0.19.8.1-2ubuntu1),
+ autotools-dev (= 20161112.1),
+ base-files (= 9.6ubuntu99),
+ base-passwd (= 3.5.43),
+ bash (= 4.4-5ubuntu1),
+ binutils (= 2.28-4ubuntu1),
+ bsdmainutils (= 9.0.12ubuntu1),
+ bsdutils (= 1:2.29-1ubuntu3),
+ build-essential (= 12.1ubuntu2),
+ bzip2 (= 1.0.6-8.1),
+ coreutils (= 8.26-3ubuntu3),
+ cpp (= 4:6.3.0-2ubuntu1),
+ cpp-6 (= 6.3.0-18ubuntu2),
+ dash (= 0.5.8-2.3ubuntu1),
+ debconf (= 1.5.60ubuntu1),
+ debhelper (= 10.4ubuntu3),
+ debianutils (= 4.8.1.1),
+ dh-autoreconf (= 14),
+ dh-modaliases (= 1:0.4.23),
+ dh-strip-nondeterminism (= 0.034-1),
+ diffutils (= 1:3.5-3),
+ dpkg (= 1.18.24ubuntu1),
+ dpkg-dev (= 1.18.24ubuntu1),
+ e2fslibs (= 1.43.4-2),
+ e2fsprogs (= 1.43.4-2),
+ file (= 1:5.30-1),
+ findutils (= 4.6.0+git+20161106-2),
+ g++ (= 4:6.3.0-2ubuntu1),
+ g++-6 (= 6.3.0-18ubuntu2),
+ gawk (= 1:4.1.4+dfsg-1),
+ gcc (= 4:6.3.0-2ubuntu1),
+ gcc-6 (= 6.3.0-18ubuntu2),
+ gcc-6-base (= 6.3.0-18ubuntu2),
+ gcc-7-base (= 7.1.0-6ubuntu2),
+ gettext (= 0.19.8.1-2ubuntu1),
+ gettext-base (= 0.19.8.1-2ubuntu1),
+ grep (= 2.27-2),
+ groff-base (= 1.22.3-9),
+ gzip (= 1.6-5ubuntu1),
+ hostname (= 3.18),
+ init-system-helpers (= 1.47),
+ intltool-debian (= 0.35.0+20060710.4),
+ libacl1 (= 2.2.52-3build1),
+ libarchive-zip-perl (= 1.59-1),
+ libasan3 (= 6.3.0-18ubuntu2),
+ libatomic1 (= 7.1.0-6ubuntu2),
+ libattr1 (= 1:2.4.47-2build1),
+ libaudit-common (= 1:2.6.6-1ubuntu2),
+ libaudit1 (= 1:2.6.6-1ubuntu2),
+ libblkid1 (= 2.29-1ubuntu3),
+ libbsd0 (= 0.8.3-1),
+ libbz2-1.0 (= 1.0.6-8.1),
+ libc-bin (= 2.24-9ubuntu2),
+ libc-dev-bin (= 2.24-9ubuntu2),
+ libc6 (= 2.24-9ubuntu2),
+ libc6-dev (= 2.24-9ubuntu2),
+ libcap-ng0 (= 0.7.7-3),
+ libcc1-0 (= 7.1.0-6ubuntu2),
+ libcilkrts5 (= 7.1.0-6ubuntu2),
+ libcomerr2 (= 1.43.4-2),
+ libcroco3 (= 0.6.11-3),
+ libdb5.3 (= 5.3.28-12),
+ libdebconfclient0 (= 0.213ubuntu1),
+ libdpkg-perl (= 1.18.24ubuntu1),
+ libfdisk1 (= 2.29-1ubuntu3),
+ libffi6 (= 3.2.1-6),
+ libfile-stripnondeterminism-perl (= 0.034-1),
+ libgcc-6-dev (= 6.3.0-18ubuntu2),
+ libgcc1 (= 1:7.1.0-6ubuntu2),
+ libgcrypt20 (= 1.7.6-2),
+ libgdbm3 (= 1.8.3-14),
+ libglib2.0-0 (= 2.53.1-1),
+ libgmp10 (= 2:6.1.2+dfsg-1),
+ libgomp1 (= 7.1.0-6ubuntu2),
+ libgpg-error0 (= 1.26-2),
+ libicu57 (= 57.1-6),
+ libisl15 (= 0.18-1),
+ libitm1 (= 7.1.0-6ubuntu2),
+ liblsan0 (= 7.1.0-6ubuntu2),
+ liblz4-1 (= 0.0~r131-2ubuntu2),
+ liblzma5 (= 5.2.2-1.2),
+ libmagic-mgc (= 1:5.30-1),
+ libmagic1 (= 1:5.30-1),
+ libmount1 (= 2.29-1ubuntu3),
+ libmpc3 (= 1.0.3-1),
+ libmpfr4 (= 3.1.5-1),
+ libmpx2 (= 7.1.0-6ubuntu2),
+ libncursesw5 (= 6.0+20160625-1ubuntu1),
+ libpam-modules (= 1.1.8-3.2ubuntu3),
+ libpam-modules-bin (= 1.1.8-3.2ubuntu3),
+ libpam-runtime (= 1.1.8-3.2ubuntu3),
+ libpam0g (= 1.1.8-3.2ubuntu3),
+ libpcre3 (= 2:8.39-3),
+ libperl5.24 (= 5.24.1-3ubuntu1),
+ libpipeline1 (= 1.4.1-2),
+ libquadmath0 (= 7.1.0-6ubuntu2),
+ libreadline7 (= 7.0-0ubuntu2),
+ libselinux1 (= 2.6-3build1),
+ libsemanage-common (= 2.6-2build1),
+ libsemanage1 (= 2.6-2build1),
+ libsepol1 (= 2.6-2),
+ libsigsegv2 (= 2.10-5),
+ libsmartcols1 (= 2.29-1ubuntu3),
+ libss2 (= 1.43.4-2),
+ libstdc++-6-dev (= 6.3.0-18ubuntu2),
+ libstdc++6 (= 7.1.0-6ubuntu2),
+ libsystemd0 (= 233-6ubuntu3),
+ libtimedate-perl (= 2.3000-2),
+ libtinfo5 (= 6.0+20160625-1ubuntu1),
+ libtool (= 2.4.6-2),
+ libtsan0 (= 7.1.0-6ubuntu2),
+ libubsan0 (= 7.1.0-6ubuntu2),
+ libudev1 (= 233-6ubuntu3),
+ libunistring0 (= 0.9.3-5.2ubuntu1),
+ libustr-1.0-1 (= 1.0.4-6),
+ libuuid1 (= 2.29-1ubuntu3),
+ libxml2 (= 2.9.4+dfsg1-2.2ubuntu1),
+ linux-libc-dev (= 4.10.0-22.24),
+ login (= 1:4.2-3.2ubuntu2),
+ m4 (= 1.4.18-1),
+ make (= 4.1-9.1),
+ man-db (= 2.7.6.1-2),
+ mawk (= 1.3.3-17ubuntu2),
+ mount (= 2.29-1ubuntu3),
+ multiarch-support (= 2.24-9ubuntu2),
+ ncurses-base (= 6.0+20160625-1ubuntu1),
+ ncurses-bin (= 6.0+20160625-1ubuntu1),
+ passwd (= 1:4.2-3.2ubuntu2),
+ patch (= 2.7.5-1build1),
+ perl (= 5.24.1-3ubuntu1),
+ perl-base (= 5.24.1-3ubuntu1),
+ perl-modules-5.24 (= 5.24.1-3ubuntu1),
+ po-debconf (= 1.0.20),
+ readline-common (= 7.0-0ubuntu2),
+ sed (= 4.4-1),
+ sensible-utils (= 0.0.9),
+ sysvinit-utils (= 2.88dsf-59.8git1),
+ tar (= 1.29b-1.1),
+ util-linux (= 2.29-1ubuntu3),
+ xz-utils (= 5.2.2-1.2),
+ zlib1g (= 1:1.2.11.dfsg-0ubuntu1)
+Environment:
+ DEB_BUILD_OPTIONS="parallel=8"
+ LC_ALL="C.UTF-8"
+ SOURCE_DATE_EPOCH="1497262575"
--- bcmwl-6.30.223.271+bdcom.orig/debian/bcmwl-kernel-source.install.in
+++ bcmwl-6.30.223.271+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-6.30.223.271+bdcom.orig/debian/bcmwl-kernel-source.modaliases
+++ bcmwl-6.30.223.271+bdcom/debian/bcmwl-kernel-source.modaliases
@@ -0,0 +1,20 @@
+alias pci:v000014E4d00004311sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004312sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004313sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004315sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004727sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004328sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004328sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004329sv*sd*bc02sc80i* wl
+alias pci:v000014E4d0000432asv*sd*bc02sc80i* wl
+alias pci:v000014E4d0000432bsv*sd*bc02sc80i* wl
+alias pci:v000014E4d0000432csv*sd*bc02sc80i* wl
+alias pci:v000014E4d0000432dsv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004365sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004353sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004357sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004358sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004359sv*sd*bc02sc80i* wl
+alias pci:v000014E4d00004331sv*sd*bc02sc80i* wl
+alias pci:v000014E4d000043a0sv*sd*bc02sc80i* wl
+alias pci:v000014E4d000043B1sv*sd*bc02sc80i* wl
--- bcmwl-6.30.223.271+bdcom.orig/debian/bcmwl-kernel-source.postinst
+++ bcmwl-6.30.223.271+bdcom/debian/bcmwl-kernel-source.postinst
@@ -0,0 +1,65 @@
+#!/bin/sh
+set -e
+# 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
+
+ARCH=`dpkg --print-architecture`
+case $ARCH in
+    amd64)
+        ARCH="x86_64"
+        ;;
+    lpia)
+        ARCH="i686"
+        ;;
+    i386)
+        ARCH="i686"
+        ;;
+    *)
+        echo "WARNING: unsupported arch: $ARCH"
+        ARCH="$ARCH"
+        ;;
+esac
+
+case "$1" in
+	configure)
+	# Build the kernel module
+	/usr/lib/dkms/common.postinst $PACKAGE_NAME $CVERSION /usr/share/$PACKAGE_NAME $ARCH $2
+	
+	# Create a blacklist file
+	cat > $BLACKLIST_FILE <<EOF
+# Warning: This file is autogenerated by $PACKAGE_NAME. All changes to this file will be lost.
+blacklist b43
+blacklist b43legacy
+blacklist ssb
+blacklist bcm43xx
+blacklist brcm80211
+blacklist brcmfmac
+blacklist brcmsmac
+blacklist bcma
+EOF
+	# If b44 is loaded, append these additional lines
+	if lsmod | grep b44 > /dev/null; then
+		cat >> $BLACKLIST_FILE <<EOF
+blacklist b44
+install wl modprobe -r b43 b44 b43legacy ssb; modprobe --ignore-install wl $CMDLINE_OPTS; modprobe --ignore-install b44
+EOF
+	fi
+
+        # Try to use the module right away
+        rmmod b43 b43legacy ssb bcm43xx brcm80211 brcmfmac brcmsmac bcma 2>/dev/null|| :
+        modprobe wl || :
+	
+	# Update initramfs
+	update-initramfs -u
+	;;
+esac
+
+#DEBHELPER#
--- bcmwl-6.30.223.271+bdcom.orig/debian/bcmwl-kernel-source.postrm
+++ bcmwl-6.30.223.271+bdcom/debian/bcmwl-kernel-source.postrm
@@ -0,0 +1,26 @@
+#!/bin/sh
+set -e
+# 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
+		update-initramfs -u
+
+		# Warn a reboot is needed
+		[ -x /usr/share/update-notifier/notify-reboot-required ] && \
+		    /usr/share/update-notifier/notify-reboot-required || true
+		;;
+esac
+
+#DEBHELPER#
--- bcmwl-6.30.223.271+bdcom.orig/debian/bcmwl-kernel-source.prerm
+++ bcmwl-6.30.223.271+bdcom/debian/bcmwl-kernel-source.prerm
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -e
+# 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 || true
+		echo "Done."
+        ;;
+esac
+
+#DEBHELPER#
--- bcmwl-6.30.223.271+bdcom.orig/debian/changelog
+++ bcmwl-6.30.223.271+bdcom/debian/changelog
@@ -0,0 +1,631 @@
+bcmwl (6.30.223.271+bdcom-0ubuntu7~20.04.2) focal; urgency=medium
+
+  * No change rebuild in security pocket. LP: #1914279.
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com>  Thu, 29 Apr 2021 16:05:27 +0100
+
+bcmwl (6.30.223.271+bdcom-0ubuntu7~20.04.1) focal; urgency=medium
+
+  * debian/dkms.conf.in,
+    debian/patches/0028-add-support-for-linux-5.6.patch (LP: #1872908):
+    - Add support for Linux 5.6.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 04 May 2020 13:23:19 +0200
+
+bcmwl (6.30.223.271+bdcom-0ubuntu5) eoan; urgency=medium
+
+  * debian/dkms.conf.in,
+    debian/patches/0027-add-support-for-linux-5.1.patch (LP: #1827100):
+    - Add support for Linux 5.1.
+
+ -- Seth Forshee <seth.forshee@canonical.com>  Fri, 17 May 2019 15:35:42 -0500
+
+bcmwl (6.30.223.271+bdcom-0ubuntu4) bionic; urgency=medium
+
+  * debian/dkms.conf.in, (LP: #1737744)
+    debian/patches/0025-add-support-for-linux-4.14.patch:
+    debian/patches/0026-add-support-for-linux-4.15.patch:
+    - Add support for Linux 4.12.
+
+ -- Marcelo Henrique Cerri <marcelo.cerri@canonical.com>  Fri, 15 Dec 2017 18:22:18 +0000
+
+bcmwl (6.30.223.271+bdcom-0ubuntu3) artful; urgency=medium
+
+  * debian/dkms.conf.in,
+    debian/patches/0024-add-support-for-linux-4.12.patch:
+    - Add support for Linux 4.12.
+      Thanks to Dmitriy Budnik for reporting the problem and for pointing
+      to part of the solution.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 12 Jun 2017 16:48:01 +0200
+
+bcmwl (6.30.223.271+bdcom-0ubuntu2) zesty; urgency=medium
+
+  * debian/dkms.conf.in,
+    debian/patches/0023-add-support-for-linux-4.11.patch:
+    - Add support for Linux 4.11.
+      Credit for the patch goes to Krzysztof Kolasa.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 20 Mar 2017 16:55:50 +0100
+
+bcmwl (6.30.223.271+bdcom-0ubuntu1) zesty; urgency=medium
+
+  * debian/dkms.conf.in
+    - Drop obsolete patches.
+  * New upstream release:
+    - Client does not ACK auth/assoc responses from Cisco AP3800 (LP: #1647036).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 06 Dec 2016 16:29:07 +0100
+
+bcmwl (6.30.223.248+bdcom-0ubuntu11) yakkety; urgency=medium
+
+  * debian/patches/0020-add-support-for-linux-4.8.patch:
+    - Fix whitespace issue that prevented DKMS from applying the patch.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Fri, 02 Sep 2016 17:41:43 +0200
+
+bcmwl (6.30.223.248+bdcom-0ubuntu10) yakkety; urgency=medium
+
+  * debian/dkms.conf.in,
+    debian/patches/0020-add-support-for-linux-4.8.patch:
+    - Add support for Linux 4.8. Thanks to Krzysztof Kolasa.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 22 Aug 2016 16:17:41 +0200
+
+bcmwl (6.30.223.248+bdcom-0ubuntu9) yakkety; urgency=medium
+
+  * debian/dkms.conf.in,
+    debian/patches/0020-add-support-for-linux-4.7.patch:
+    - Add support for Linux 4.7. Thanks to Vincent Gerris for pointing out
+      the solution.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 04 Aug 2016 16:53:09 +0200
+
+bcmwl (6.30.223.248+bdcom-0ubuntu8) xenial; urgency=medium
+
+  * debian/dkms.conf.in,
+    debian/patches/0020-add-support-for-linux-4.3.patch:
+    - Add support for Linux 4.3.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 16 Nov 2015 18:03:52 +0100
+
+bcmwl (6.30.223.248+bdcom-0ubuntu7) wily; urgency=medium
+
+  * debian/bcmwl-kernel-source.modaliases: really fix matching for model 43b1,
+    apparently modaliases are case-sensitive, and changing ubuntu-drivers
+    to remove that limitation looks like it would negatively affect its
+    performance. (LP: #1498074)
+
+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Mon, 28 Sep 2015 15:46:13 -0400
+
+bcmwl (6.30.223.248+bdcom-0ubuntu6) wily; urgency=medium
+
+  * debian/bcmwl-kernel-source.modaliases: add 43b1 as a matched model in
+    modalises; https://wireless.wiki.kernel.org/en/users/Drivers/b43 says it
+    is supported by the wl driver (this is BCM4352). (LP: #1498074, #1173761)
+
+ -- Mathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>  Tue, 22 Sep 2015 09:52:45 -0400
+
+bcmwl (6.30.223.248+bdcom-0ubuntu5) wily; urgency=medium
+
+  * debian/bcmwl-kernel-source.modaliases: Fine-tune product list as per
+    http://www.broadcom.com/docs/linux_sta/README_6.30.223.248.txt. Thanks
+    Adam Smith! (LP: #1490713)
+  * debian/bcmwl-kernel-source.postrm: Warn that a reboot is needed after
+    removing. Thanks Adam Smith! (LP: #1491070)
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Fri, 18 Sep 2015 10:12:45 +0200
+
+bcmwl (6.30.223.248+bdcom-0ubuntu4.1) wily; urgency=medium
+
+  * Added needed patches for lts kernels (LP: #1415880)
+  * Fixed null pointer reference (LP: #1415880)
+    d/p/0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch
+
+ -- Rafael David Tinoco <rafael.tinoco@canonical.com>  Thu, 10 Sep 2015 10:42:38 -0500
+
+bcmwl (6.30.223.248+bdcom-0ubuntu4) wily; urgency=medium
+
+  * Add support for Linux 4.2
+    debian/patches/0018-cfg80211_disconnected.patch 
+    A successful 4.2 based install depends on EXPORT_SYMBOL(flush_workqueue)
+    which will first appear in linux (4.2.0-3.3).
+
+ -- Tim Gardner <tim.gardner@canonical.com>  Tue, 04 Aug 2015 11:32:12 -0600
+
+bcmwl (6.30.223.248+bdcom-0ubuntu3) wily; urgency=medium
+
+  [ Simon Eisenmann ]
+  * debian/dkms.conf.in
+    debian/patches/0016-repair-make-warnings.patch
+    debian/patches/0017-add-support-for-Linux-4.0.patch
+    - Fixed make warnings
+      Credit for the patch goes to Krzysztof Kolasa.
+    - Add support for Linux 4.0 (LP: #1424676)
+      Credit for the patch goes to Krzysztof Kolasa.
+
+ -- Mario Limonciello <Mario_Limonciello@Dell.com>  Mon, 11 May 2015 18:22:09 -0500
+
+bcmwl (6.30.223.248+bdcom-0ubuntu2) vivid; urgency=medium
+
+  * debian/dkms.conf.in,
+    debian/patches/0014-add-support-for-Linux-3.17.patch,
+    debian/patches/0015-add-support-for-Linux-3.18.patch:
+    - Add support for Linux 3.17 (LP: #1358966).
+      Credit for the patch goes to Brian Norris.
+    - Add support for Linux 3.18 (LP: #1358966).
+      Credit for the patch goes to Krzysztof Kolasa.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 06 Nov 2014 18:43:27 +0100
+
+bcmwl (6.30.223.248+bdcom-0ubuntu1) utopic; urgency=medium
+
+  * New upstream release: (LP: #1342645)
+    - This is an official public release from Broadcom.
+  * debian/dkms.conf.in:
+    - Drop patches for kernels 3.10 (now upstream)
+
+ -- Robert Ancell <robert.ancell@canonical.com>  Fri, 01 Aug 2014 11:09:43 +1200
+
+bcmwl (6.30.223.141+bdcom-0ubuntu4) utopic; urgency=medium
+
+  * debian/patches/0013-gcc.patch:
+    - Fix build with recent version of GCC (LP: #1328858)
+
+ -- Robert Ancell <robert.ancell@canonical.com>  Fri, 01 Aug 2014 10:38:46 +1200
+
+bcmwl (6.30.223.141+bdcom-0ubuntu3) utopic; urgency=medium
+
+  * debian/patches/0012-add-support-for-Linux-3.15.patch:
+    - Add support for Linux 3.15 (LP: #1307744).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 12 May 2014 18:33:36 +0200
+
+bcmwl (6.30.223.141+bdcom-0ubuntu2) trusty; urgency=low
+
+  [ Shuduo Sang ]
+  * 0010-change-the-network-interface-name-from-eth-to-wlan.patch:
+    - Change the network interface name from eth to wlan
+      (LP: #1157136).
+
+  [ Krzysztof Kolasa ]
+  * 0011-do-not-define-__devinit-as-__init-in-linux-3.8-as-__.patch:
+    - Do not define __devinit as __init when dealing with
+      Linux >= 3.8.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Fri, 22 Nov 2013 11:24:36 +0100
+
+bcmwl (6.30.223.141+bdcom-0ubuntu1) saucy; urgency=low
+
+  * New upstream release:
+    - This is an official public release from Broadcom.
+  * debian/dkms.conf.in:
+    - Drop patches for kernels 3.4-3.9 (now upstream)
+      and keep only the one for 3.10.
+  * 0009-add-support-for-linux-3.10.0.patch:
+    - Refresh for the latest upstream release.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 09 Oct 2013 16:24:16 +0200
+
+bcmwl (6.30.223.30+bdcom-0ubuntu3) saucy; urgency=low
+
+  * debian/dkms.conf.in:
+    - Make sure 0009-add-support-for-linux-3.10.0.patch
+      is applied only against Linux 3.10.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 01 Jul 2013 15:22:30 +0200
+
+bcmwl (6.30.223.30+bdcom-0ubuntu2) saucy; urgency=low
+
+  * debian/dkms.conf.in,
+    debian/patches/0009-add-support-for-linux-3.10.0.patch:
+    - Add support for Linux 3.10.
+      Thanks to Maarten Lankhorst for the patch.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 18 Jun 2013 17:40:40 +0200
+
+bcmwl (6.30.223.30+bdcom-0ubuntu1) saucy; urgency=low
+
+  * New upstream release.
+  * debian/dkms.conf.in:
+    - Drop patches for Linux 3.2 and 3.4.
+  * 0006-add-support-for-linux-3.8.0.patch,
+    0007-nl80211-move-scan-API-to-wdev.patch:
+    - Refresh against new release.
+  * 0008-add-support-for-linux-3.9.0.patch:
+    - Add support for Linux 3.9 (LP: #1157880).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 15 May 2013 13:11:43 +0200
+
+bcmwl (6.20.155.1+bdcom-0ubuntu6) raring; urgency=low
+
+  * debian/control:
+    - Drop all the dependencies on the linux-headers.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 17 Jan 2013 16:31:46 +0100
+
+bcmwl (6.20.155.1+bdcom-0ubuntu5) raring; urgency=low
+
+  * 0007-nl80211-move-scan-API-to-wdev.patch:
+   - Move scan API to wdev. This fixes an issue with
+     Linux >= 3.6 (LP: #1098225).
+     Thanks to Robert Hooker for suggesting the patch.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 10 Jan 2013 18:09:48 +0100
+
+bcmwl (6.20.155.1+bdcom-0ubuntu4) raring; urgency=low
+
+  * 0006-add-support-for-linux-3.8.0.patch:
+    - Make sure to pass the correct argument to wl_ch_to_chanspec
+      according to the kernel (LP: #1097729).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 09 Jan 2013 15:28:26 +0100
+
+bcmwl (6.20.155.1+bdcom-0ubuntu3) raring; urgency=low
+
+  * 0006-add-support-for-linux-3.8.0.patch:
+    - Add support for Linux 3.8 (LP: #1095751).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 08 Jan 2013 15:13:17 +0100
+
+bcmwl (6.20.155.1+bdcom-0ubuntu2) raring; urgency=low
+
+  * Drop parsing of src/src/wl/sys/wl_linux.c, as the current upstream version
+    dropped all useful vendor matches in its pci_device_id struct and now has
+    a broken modalias. Keep a static debian/bcmwl-kernel-source.modaliases
+    instead which matches on any Broadcom network device (vendor 14E4 class 02
+    subclass 80). This brings back a proper "Modaliases:" package header.
+    (LP: #1089943)
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Thu, 13 Dec 2012 16:02:24 +0100
+
+bcmwl (6.20.155.1+bdcom-0ubuntu1) raring; urgency=low
+
+  * New upstream release (LP: #923809):
+    - Added 43142 support.
+    - Added 4331 support.
+  * debian/control:
+    - depend on the different flavours of the linux-headers.
+  * Refresh 0002-Makefile.patch and 0001-MODULE_LICENSE.patch.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 11 Dec 2012 17:06:22 +0100
+
+bcmwl (5.100.82.112+bdcom-0ubuntu4) raring; urgency=low
+
+  * debian/bcmwl-kernel-source.postinst: Silence the errors from rmmod about
+    the modules not being loaded. This is fully expected, and just causes
+    confusion, as well as autopkgtest failures.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Wed, 07 Nov 2012 14:54:27 +0100
+
+bcmwl (5.100.82.112+bdcom-0ubuntu3) quantal; urgency=low
+
+  * debian/bcmwl-kernel-source.postinst: Mirror the actions of the installed
+    modprobe.d files, i. e. rmmod the b43 driver and try to modprobe wl, so
+    that this package works right after installation. (LP: #1065827)
+  * debian/bcmwl-kernel-source.postinst: Drop duplicate #DEBHELPER# token. It
+    does not currently expand to anything, but it looks confusing.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Fri, 12 Oct 2012 14:00:38 +0200
+
+bcmwl (5.100.82.112+bdcom-0ubuntu2) quantal; urgency=low
+
+  * 0004-Add-support-for-Linux-3.2.patch:
+    - Make sure the patch can always be applied.
+  * debian/dkms.conf.in:
+    - Always apply all patches (LP: #1020059).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 05 Jul 2012 13:20:00 +0200
+
+bcmwl (5.100.82.112+bdcom-0ubuntu1) quantal; urgency=low
+
+  * New upstream release:
+    - Add Monitor mode.
+    - Add cfg80211 API support. The choice of API is
+      done at compile time. If kernel version >= 2.6.32,
+      cfg80211 is used, otherwise wireless extension
+      is used. (End users should notice little
+      difference.)
+    - Fix problem with triggered a reboot when the
+      wireless was disabled using the function key.
+    - Fix a kernel panic observed on some 64-bit
+      systems.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 20 Jun 2012 13:30:20 +0200
+
+bcmwl (5.100.82.38+bdcom-0ubuntu8) quantal; urgency=low
+
+  * debian/dkms.conf.in:
+    - Make sure to apply 0005-add-support-for-linux-3.4.0.patch.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 18 Jun 2012 12:03:31 +0200
+
+bcmwl (5.100.82.38+bdcom-0ubuntu7) quantal; urgency=low
+
+  * Add 0005-Add-support-for-Linux-3.4.0.patch:
+    - Thanks to Eugene San for the patch (LP: #994255).
+  * debian/dkms.conf.in:
+    - Make sure that both patch 0004 and 0005 are applied
+      when dealing with linux 3.4.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 22 May 2012 13:10:38 +0200
+
+bcmwl (5.100.82.38+bdcom-0ubuntu6.1) precise-proposed; urgency=low
+
+  * debian/bcmwl-kernel-source.postinst:
+    - Blacklist brcmfmac, brcmsmac and bcma so that they don't
+      conflict with the closed driver (LP: #873117)
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 23 Apr 2012 16:11:56 +0200
+
+bcmwl (5.100.82.38+bdcom-0ubuntu6) precise; urgency=high
+
+  * Update to match switch to PAE kernel by default in precise for i386
+    (LP: #986475)
+    - Depend on linux-headers-generic-pae on i386 instead of
+      linux-headers-generic so that the right headers are available to build
+      the driver
+  * Drop long obsolete lpia specific depends on linux-headers-lpia
+
+ -- Scott Kitterman <scott@kitterman.com>  Sat, 21 Apr 2012 02:09:32 -0400
+
+bcmwl (5.100.82.38+bdcom-0ubuntu5) precise; urgency=low
+
+  * Add 0004-Add-support-for-Linux-3.2.patch.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Tue, 22 Nov 2011 18:48:03 +0100
+
+bcmwl (5.100.82.38+bdcom-0ubuntu4) oneiric; urgency=low
+
+  [ Daniel van Vugt ]
+  * debian/bcmwl-kernel-source.prerm:
+    - Don't error out if we can't remove bcmwl module.  LP: #776439
+  * debian/bcmwl-kernel-source.postinst:
+    - Unconditionally update the blacklist (i.e. even on upgrade).
+      LP: #776165 
+
+ -- Michael Terry <mterry@ubuntu.com>  Wed, 01 Jun 2011 13:57:27 -0400
+
+bcmwl (5.100.82.38+bdcom-0ubuntu3) natty; urgency=low
+
+  * debian/bcmwl-kernel-source.postinst: Also blacklist brcm80211, to ensure
+    it actually is getting used. Thanks to Daniel van Vugt for the patch!
+    (LP: #747002)
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Mon, 18 Apr 2011 12:14:43 +0200
+
+bcmwl (5.100.82.38+bdcom-0ubuntu2) natty; urgency=low
+
+  [ Henrik Rydberg ]
+  * debian/patches0003-Make-up-for-missing-init_MUTEX.patch:
+    - Make up for missing init_MUTEX (LP: #700176).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 10 Jan 2011 11:51:03 +0100
+
+bcmwl (5.100.82.38+bdcom-0ubuntu1) natty; urgency=low
+
+  * debian/control:
+    - Update the description.
+  * New upstream release:
+    - Add support for bcm43227 and bcm43228.
+    - Fix issue where iwconfig was sometimes reporting rate incorrectly.
+    - Add support for rfkill in kernels 2.6.31 to 2.6.36.
+    - Add support for scan complete event (SIOCGIWSCAN).
+    - Add EAGAIN (busy signal) to query of scan results.
+    - 4313 PHY fixes to improve throughput stability at different ranges.
+    - Fix interop issues with different APs.
+    - Fix hangs seen during Fn-F2 sequence.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 05 Jan 2011 16:56:18 +0100
+
+bcmwl (5.60.246.2+bdcom-0ubuntu3) natty; urgency=low
+
+  * debian/rules: Fix cleaning to not fall over on the buildds.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Thu, 25 Nov 2010 23:01:51 +0100
+
+bcmwl (5.60.246.2+bdcom-0ubuntu2) natty; urgency=low
+
+  * debian/control: Drop Vcs-Bzr:, that old branch is severely out of date.
+    Using lp:ubuntu/bcmwl now.
+  * debian/rules: Convert to dh 7. Bump debhelper compat level to 7 for that,
+    and drop cdbs dependency.
+  * debian/copyright: Point to versioned GPL license.
+  * debian/bcmwl-kernel-source.{postinst,postrm,prerm}: Add missing "set -e".
+  * debian/bcmwl-kernel-source.{postinst,postrm}: Call update-initramfs
+    without explicit path.
+  * debian/control: Fix spelling error.
+  * debian/control: Drop obsolete "lpia" architecture.
+  * debian/control: Bump Standards-Version to 3.9.1.
+  * Move from separate modalias file package to using a package header:
+    - debian/control, debian/rules, debian/bcmwl-modaliases.install.in: Drop
+      bcmwl-modaliases package.
+    - debian/rules: Build --with modaliases, to invoke dh_modaliases. Build
+      the modalias list to debian/bcmwl-kernel-source.modaliases, where
+      dh_modaliases picks it up.
+    - debian/control: Add XB-Modaliases header.
+    - debian/control: Add Conflicts:/Replaces: bcmwl-modaliases, so that the
+      obsolete modaliases package gets cleaned up on upgrades.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Thu, 25 Nov 2010 20:13:43 +0100
+
+bcmwl (5.60.246.2+bdcom-0ubuntu1) natty; urgency=low
+
+  * Remove 0003-autoconf.h.patch as it's no longer needed.
+  * Remove 0004-mclist.patch as it's no longer needed.
+  * New upstream release:
+   - Add support for kernels up to 2.6.36.
+   - Prevent the system from hanging when using the F2 hot key to
+     enable/disable wireless quickly while wireless is still in the
+     process of re-association with AP (LP: #611575).
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Thu, 21 Oct 2010 13:25:16 +0200
+
+bcmwl (5.60.48.36+bdcom-0ubuntu5) maverick; urgency=low
+
+  * debian/patches/0004-mclist.patch:
+   - Switch over to multicast iterator functions for kernels v2.6.35 and
+     later.  This fixes module building on v2.6.35-1.1.  Conditionalise
+     the patch to support older kernels.  (LP: #590924)
+
+ -- Andy Whitcroft <apw@canonical.com>  Tue, 08 Jun 2010 11:19:05 +0100
+
+bcmwl (5.60.48.36+bdcom-0ubuntu4) maverick; urgency=low
+
+  * debian/patches/0003-autoconf.h.patch:
+    - Do not #include <linux/autoconf.h> in kernels that include it
+      automatically (2.6.15 or higher).  This fixes building on 2.6.33
+      which moved that file to <generated/autoconf.h>.  (LP: #580594)
+
+ -- Anders Kaseorg <andersk@mit.edu>  Fri, 14 May 2010 21:23:45 -0400
+
+bcmwl (5.60.48.36+bdcom-0ubuntu3) lucid; urgency=low
+
+  * Fix control file to support -generic-pae kernel install (LP: #567607) 
+
+ -- Jerone Young <jerone.young@canonical.com>  Tue, 20 Apr 2010 18:44:53 -0500
+
+bcmwl (5.60.48.36+bdcom-0ubuntu2) lucid; urgency=low
+
+  * debian/bcmwl-kernel-source.postinst:
+    - Do not exit after using DKMS if there are no errors.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Mon, 15 Feb 2010 15:57:31 +0100
+
+bcmwl (5.60.48.36+bdcom-0ubuntu1) lucid; urgency=low
+
+  * New upstream release (LP: #432780):
+    - Support up to linux kernel 2.6.31. 2.6.32 support is there
+      also but not tested (although reports from users suggests it
+      works fine).
+    - Support for hidden networks.
+    - Support for rfkill in kernels < 2.6.31.
+    - Setting power level via 'iwconfig eth1 txpower X' is now
+      operational
+    - Add support for 4313.
+    - Additional channels in both 2.4 and 5 Ghz bands.
+    - Fix issue with tkip group keys that caused the following
+      message to repeat often:
+      TKIP: RX tkey->key_idx=2 frame keyidx=1 priv=ffff8800cf80e840
+    - Fix a continuous assoc/disassoc loop (in Ubuntu 8.04)
+      with suspend/resume with WPA2 and wpa_supplicant.
+    - Fix bug affecting Ubuntu 8.04 which prevented from pinging when
+      Linux STA is IBSS creator with WEP.
+    - Fix bug affecting Ubuntu 9.04 which prevented from connecting to
+      hidden networks after suspend/resume.
+    - Fix bug which prevented the driver from associating to AP with
+      when transitioning from AES to TKIP encryption.
+  * debian/patches/0002-Makefile.patch:
+    - Refresh patch.
+  * debian/patches/0003-DEV_WL_IF.patch,
+    0004-broadcom-sta-5.10.91.9-linux-2.6.30.patch,
+    0005-NET_DEVICE_OPS.patch,
+    0006-broadcom-sta-5.10.91.9-linux-2.6.32.patch:
+    - Drop patches as they are now part of the upstream code.
+  * debian/dkms.conf.in:
+    - Remove the lines about the above mentioned patches.
+  * debian/bcmwl-kernel-source.postinst:
+    - Make use of /usr/lib/dkms/common.postinst (LP: #497149).
+  * Bump compat to 5.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Sun, 14 Feb 2010 19:58:58 +0100
+
+bcmwl (5.10.91.9+bdcom-0ubuntu5) lucid; urgency=low
+
+  [ Michael Casadevall ]
+  * debian/patches/0006-broadcom-sta-5.10.91.9-linux-2.6.32.patch:
+    - Fix the build for 2.6.32-HEAD (LP: #458757)
+
+  [ Alberto Milone ] 
+  * debian/dkms.conf.in:
+    - Make sure that Michael's patch is applied only for 2.6.32
+      kernels.
+
+ -- Alberto Milone <alberto.milone@canonical.com>  Wed, 18 Nov 2009 12:48:41 +0100
+
+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 <andersk@mit.edu>  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 <soren@ubuntu.com>  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 <alberto.milone@canonical.com>  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 <alberto.milone@canonical.com>  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 <tim.gardner@canonical.com>  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 <tim.gardner@canonical.com>  Mon, 11 May 2009 16:04:29 +0000
+
+bcmwl (5.10.91.9-1) karmic; urgency=low
+
+  * Initial release
+
+ -- Tim Gardner <tim.gardner@canonical.com>  Fri, 5 Sep 2008 18:15:32 -0400
--- bcmwl-6.30.223.271+bdcom.orig/debian/compat
+++ bcmwl-6.30.223.271+bdcom/debian/compat
@@ -0,0 +1 @@
+7
--- bcmwl-6.30.223.271+bdcom.orig/debian/control
+++ bcmwl-6.30.223.271+bdcom/debian/control
@@ -0,0 +1,20 @@
+Source: bcmwl
+Section: admin
+Priority: optional
+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
+XSBC-Original-Maintainer: Alberto Milone <alberto.milone@canonical.com>
+Standards-Version: 3.9.1
+Build-Depends: debhelper (>= 7.0.50~),
+ dh-modaliases
+
+Package: bcmwl-kernel-source
+Architecture: i386 amd64
+Depends: ${misc:Depends}, dkms, linux-libc-dev, libc6-dev
+XB-Modaliases: ${modaliases}
+Conflicts: bcmwl-modaliases
+Replaces: bcmwl-modaliases
+Description: Broadcom 802.11 Linux STA wireless driver source
+ This package contains Broadcom 802.11 Linux STA wireless driver
+ for use with Broadcom's BCM4311-, BCM4312-, BCM4313-, BCM4321-,
+ BCM4322-, BCM43224-, and BCM43225-, BCM43227- and BCM43228-based
+ hardware.
--- bcmwl-6.30.223.271+bdcom.orig/debian/copyright
+++ bcmwl-6.30.223.271+bdcom/debian/copyright
@@ -0,0 +1,279 @@
+This package was debianized by Tim Gardner <tim.gardner@canonical.com> 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 2 or later, see `/usr/share/common-licenses/GPL-2'.
+
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/dkms.conf.in
+++ bcmwl-6.30.223.271+bdcom/debian/dkms.conf.in
@@ -0,0 +1,23 @@
+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]="0002-Makefile.patch"
+PATCH[1]="0003-Make-up-for-missing-init_MUTEX.patch"
+PATCH[2]="0010-change-the-network-interface-name-from-eth-to-wlan.patch"
+PATCH[3]="0013-gcc.patch"
+PATCH[4]="0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch"
+PATCH[5]="0020-add-support-for-linux-4.3.patch"
+PATCH[6]="0021-add-support-for-Linux-4.7.patch"
+PATCH[7]="0022-add-support-for-Linux-4.8.patch"
+PATCH[8]="0023-add-support-for-Linux-4.11.patch"
+PATCH[9]="0024-add-support-for-Linux-4.12.patch"
+PATCH[10]="0025-add-support-for-Linux-4.14.patch"
+PATCH[11]="0026-add-support-for-Linux-4.15.patch"
+PATCH[12]="0027-add-support-for-linux-5.1.patch"
+PATCH[13]="0028-add-support-for-linux-5.6.patch"
+#PATCH_MATCH[6]="^3.[10-11]"
+AUTOINSTALL="yes"
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0001-MODULE_LICENSE.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0001-MODULE_LICENSE.patch
@@ -0,0 +1,25 @@
+From 2903f0610336ac96411206c9458bd2885d11ea2d Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Tue, 11 Dec 2012 15:51:26 +0100
+Subject: [PATCH 1/2] Make sure that the module licence is "MIXED/Proprietary"
+
+---
+ src/wl/sys/wl_linux.c |    2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index f64496b..af3bea6 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -159,6 +159,8 @@ static int wl_set_radio_block(void *data, bool blocked);
+ static void wl_report_radio_state(wl_info_t *wl);
+ #endif
+ 
++MODULE_LICENSE("MIXED/Proprietary");
++
+ static struct pci_device_id wl_id_table[] =
+ {
+ 	{ PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID,
+-- 
+1.7.9.5
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0002-Makefile.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0002-Makefile.patch
@@ -0,0 +1,38 @@
+From 15bdf69c7c1fc0d674261b08a22c958e4826bc6b Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Tue, 11 Dec 2012 15:55:08 +0100
+Subject: [PATCH 2/2] Make sure to use the binary for the correct architecture
+
+---
+ Makefile |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/Makefile b/Makefile
+index bf30b03..1f9b974 100644
+--- a/Makefile
++++ b/Makefile
+@@ -113,6 +113,12 @@ ifeq ($(APIFINAL),WEXT)
+   $(info Using Wireless Extension API)
+ endif
+ 
++ifeq ($(shell dpkg --print-architecture),amd64)
++BINARCH = x86_64
++else
++BINARCH = i386
++endif
++
+ obj-m              += wl.o
+ 
+ wl-objs            := 
+@@ -125,7 +131,7 @@ EXTRA_CFLAGS       += -I$(src)/src/include
+ EXTRA_CFLAGS       += -I$(src)/src/wl/sys -I$(src)/src/wl/clm/api -I$(src)/src/wl/phy
+ #EXTRA_CFLAGS       += -DBCMDBG_ASSERT
+ 
+-EXTRA_LDFLAGS      := $(src)/lib/wlc_hybrid.o_shipped
++EXTRA_LDFLAGS      := $(src)/lib/wlc_hybrid.o_shipped_$(BINARCH)
+ 
+ KBASE              ?= /lib/modules/`uname -r`
+ KBUILD_DIR         ?= $(KBASE)/build
+-- 
+1.7.9.5
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0003-Make-up-for-missing-init_MUTEX.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0003-Make-up-for-missing-init_MUTEX.patch
@@ -0,0 +1,32 @@
+From 9dab8884095e0710d62c41c45191a85d0dae59b3 Mon Sep 17 00:00:00 2001
+From: Henrik Rydberg <rydberg@euromail.se>
+Date: Sun, 9 Jan 2011 19:47:43 +0100
+Subject: [PATCH] Make up for the missing init_MUTEX
+
+The init_MUTEX is a wrapper for sema_init(), and has been
+deprecated and removed in 2.6.37. In order for the dkms
+package to work also for earlier kernel versions, simply
+define the wrapper if it is missing.
+
+Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
+---
+ src/src/wl/sys/wl_linux.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/src/src/wl/sys/wl_linux.c b/src/src/wl/sys/wl_linux.c
+index c11678f..6f4b7a6 100644
+--- a/src.orig/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -99,6 +99,10 @@ static void wl_dpc_rxwork(struct wl_task *task);
+
+ #endif
+
++#ifndef init_MUTEX
++#define init_MUTEX(sem) sema_init(sem, 1)
++#endif
++
+ static int wl_linux_watchdog(void *ctx);
+ static
+ int wl_found = 0;
+--
+1.7.2.3
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0004-Add-support-for-Linux-3.2.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0004-Add-support-for-Linux-3.2.patch
@@ -0,0 +1,30 @@
+From 038110dd8729531cf052dca43894a1e5605229f4 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Thu, 5 Jul 2012 13:03:14 +0200
+Subject: [PATCH 1/1] Add support for Linux 3.2
+
+
+Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
+---
+ src/wl/sys/wl_linux.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index ac87754..ec51c5b 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -385,7 +385,11 @@ static const struct net_device_ops wl_netdev_ops =
+ #endif
+ 	.ndo_get_stats = wl_get_stats,
+ 	.ndo_set_mac_address = wl_set_mac_address,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)
+ 	.ndo_set_multicast_list = wl_set_multicast_list,
++#else
++	.ndo_set_rx_mode = wl_set_multicast_list,
++#endif
+ 	.ndo_do_ioctl = wl_ioctl
+ };
+ 
+-- 
+1.7.9.5
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0005-add-support-for-linux-3.4.0.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0005-add-support-for-linux-3.4.0.patch
@@ -0,0 +1,15 @@
+From: Eugene San (eugenesan) <eugenesan@gmail.com>
+Subject: [PATCH 1/1] add support for linux 3.4
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -40,7 +40,9 @@
+ #include <linux/pci_ids.h>
+ #define WLC_MAXBSSCFG		1	
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 4, 0)
+ #include <asm/system.h>
++#endif
+ #include <asm/io.h>
+ #include <asm/irq.h>
+ #include <asm/pgtable.h>
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0006-add-support-for-linux-3.8.0.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0006-add-support-for-linux-3.8.0.patch
@@ -0,0 +1,190 @@
+From 165f72491ffe0ffdf21c45ec7d5d29e16e2b6256 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Mon, 25 Mar 2013 14:08:51 +0100
+Subject: [PATCH 1/1] Add support for Linux 3.8
+
+---
+ src/include/bcmutils.h          |    5 +++-
+ src/wl/sys/wl_cfg80211_hybrid.c |   61 +++++++++++++++++++++++++++++++++++++--
+ src/wl/sys/wl_linux.c           |    4 +++
+ 3 files changed, 67 insertions(+), 3 deletions(-)
+
+diff --git a/src/include/bcmutils.h b/src/include/bcmutils.h
+index 494de15..8843d8b 100644
+--- a/src/include/bcmutils.h
++++ b/src/include/bcmutils.h
+@@ -611,11 +611,14 @@ extern void printbig(char *buf);
+ extern void prhex(const char *msg, uchar *buf, uint len);
+ 
+ extern bcm_tlv_t *BCMROMFN(bcm_next_tlv)(bcm_tlv_t *elt, int *buflen);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key);
++#else
++extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(const void *buf, int buflen, uint key);
++#endif
+ extern bcm_tlv_t *BCMROMFN(bcm_parse_ordered_tlvs)(void *buf, int buflen, uint key);
+ 
+ extern const char *bcmerrorstr(int bcmerror);
+-extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key);
+ 
+ typedef uint32 mbool;
+ #define mboolset(mb, bit)		((mb) |= (bit))		
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 7ab4d34..ffa1ceb 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -62,14 +62,25 @@ static int wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
+ static s32 wl_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_code);
+ 
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy,
+            enum nl80211_tx_power_setting type, s32 dbm);
+ #else
++static int wl_cfg80211_set_tx_power(struct wiphy *wiphy,
++           struct wireless_dev *wdev,
++           enum nl80211_tx_power_setting type, int dbm);
++#endif /* 3.8 */
++#else
+ static s32 wl_cfg80211_set_tx_power(struct wiphy *wiphy,
+            enum tx_power_setting type, s32 dbm);
+ #endif
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm);
++#else
++static int wl_cfg80211_get_tx_power(struct wiphy *wiphy,
++		   struct wireless_dev *wdev, int *dbm);
++#endif
+ 
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38)
+ static s32 wl_cfg80211_config_default_key(struct wiphy *wiphy,
+@@ -695,7 +706,11 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
+ 	else
+ 		memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN);
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ 	wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
++#else
++	wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size);
++#endif
+ 
+ 	err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
+ 	if (err) {
+@@ -1050,9 +1065,15 @@ wl_cfg80211_disconnect(struct wiphy *wiphy, struct net_device *dev, u16 reason_c
+ }
+ 
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 36)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ static s32
+ wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum nl80211_tx_power_setting type, s32 dbm)
+ #else
++static int
++wl_cfg80211_set_tx_power(struct wiphy *wiphy, struct wireless_dev *wdev,
++						enum nl80211_tx_power_setting type, int dbm)
++#endif /* 3.8 */
++#else
+ #define NL80211_TX_POWER_AUTOMATIC TX_POWER_AUTOMATIC
+ #define NL80211_TX_POWER_LIMITED TX_POWER_LIMITED
+ #define NL80211_TX_POWER_FIXED TX_POWER_FIXED
+@@ -1103,24 +1124,41 @@ wl_cfg80211_set_tx_power(struct wiphy *wiphy, enum tx_power_setting type, s32 db
+ 	}
+ 	wl->conf->tx_power = dbm;
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ 	return err;
++#else
++	return (int) err;
++#endif
+ }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ static s32 wl_cfg80211_get_tx_power(struct wiphy *wiphy, s32 *dbm)
++#else
++static int wl_cfg80211_get_tx_power(struct wiphy *wiphy,
++			struct wireless_dev *wdev, int *dbm)
++#endif
+ {
+ 	struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
+ 	struct net_device *ndev = wl_to_ndev(wl);
+ 	s32 txpwrdbm;
+ 	u8 result;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ 	s32 err = 0;
+-
++#else
++	int err = 0;
++#endif
+ 	err = wl_dev_intvar_get(ndev, "qtxpower", &txpwrdbm);
+ 	if (err) {
+ 		WL_ERR(("error (%d)\n", err));
+ 		return err;
+ 	}
+ 	result = (u8) (txpwrdbm & ~WL_TXPWR_OVERRIDE);
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ 	*dbm = (s32) bcm_qdbm_to_mw(result);
++#else
++	*dbm = (int) bcm_qdbm_to_mw(result);
++#endif
+ 
+ 	return err;
+ }
+@@ -1949,9 +1987,14 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
+ 	struct wlc_ssid *ssid;
+ 	struct bcm_tlv *tim;
+ 	s32 dtim_period;
++	s32 err = 0;
+ 	size_t ie_len;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ 	u8 *ie;
+-	s32 err = 0;
++#else
++	const u8 *ie;
++	const struct cfg80211_bss_ies *ies;
++#endif
+ 
+ 	ssid = &wl->profile->ssid;
+ 	bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
+@@ -1980,8 +2023,22 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
+ 		ie_len = bi->ie_length;
+ 	} else {
+ 		WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid));
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ 		ie = bss->information_elements;
+ 		ie_len = bss->len_information_elements;
++#else
++		rcu_read_lock();
++		ies = (const struct cfg80211_bss_ies*)rcu_dereference(bss->ies);
++		if (!ies) {
++			/* This should never happen */
++			rcu_read_unlock();
++			err = -EIO;
++			goto update_bss_info_out;
++		}
++		ie = ies->data;
++		ie_len = (size_t)(ies->len);
++		rcu_read_unlock();
++#endif
+ 		cfg80211_put_bss(bss);
+ 	}
+ 
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index e32f5ab..c977549 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -910,7 +910,11 @@ wl_remove(struct pci_dev *pdev)
+ 	pci_set_drvdata(pdev, NULL);
+ }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
+ static struct pci_driver wl_pci_driver = {
++#else
++static struct pci_driver wl_pci_driver __refdata = {
++#endif
+ 	name:		"wl",
+ 	probe:		wl_pci_probe,
+ 	suspend:	wl_suspend,
+-- 
+1.7.9.5
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0007-nl80211-move-scan-API-to-wdev.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0007-nl80211-move-scan-API-to-wdev.patch
@@ -0,0 +1,50 @@
+From da8218544714e47fbbbdfb1335a936a20eee033b Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Thu, 10 Jan 2013 17:48:45 +0100
+Subject: [PATCH 1/1] nl80211: move scan API to wdev
+
+based on linux.wireless commit fd0142844efa85d89017c89227a0f03de1eee327
+by Johannes Berg <johannes.berg@intel.com>.
+
+The new P2P Device will have to be able to scan for P2P search, so move
+scanning to use struct wireless_dev instead of struct net_device.
+---
+ src/wl/sys/wl_cfg80211_hybrid.c |   13 +++++++++++--
+ 1 file changed, 11 insertions(+), 2 deletions(-)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index c54ae87..6a55728 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -46,7 +46,10 @@ u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_INFO;
+ 
+ static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
+            enum nl80211_iftype type, u32 *flags, struct vif_params *params);
+-static s32 wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
++static s32 wl_cfg80211_scan(struct wiphy *wiphy,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
++           struct net_device *ndev,
++#endif
+            struct cfg80211_scan_request *request);
+ static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
+ static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
+@@ -482,9 +485,15 @@ wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
+ }
+ 
+ static s32
+-wl_cfg80211_scan(struct wiphy *wiphy, struct net_device *ndev,
++wl_cfg80211_scan(struct wiphy *wiphy,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0)
++                 struct net_device *ndev,
++#endif
+                  struct cfg80211_scan_request *request)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
++	struct net_device *ndev = request->wdev->netdev;
++#endif
+ 	struct wl_cfg80211_priv *wl = ndev_to_wl(ndev);
+ 	struct cfg80211_ssid *ssids;
+ 	struct wl_cfg80211_scan_req *sr = wl_to_sr(wl);
+-- 
+1.7.9.5
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0008-add-support-for-linux-3.9.0.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0008-add-support-for-linux-3.9.0.patch
@@ -0,0 +1,20 @@
+From 165f72491ffe0ffdf21c45ec7d5d29e16e2b6256 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Mon, 25 Mar 2013 14:08:51 +0100
+Subject: [PATCH 1/1] Add support for Linux 3.9
+
+---
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ a/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2048,7 +2048,11 @@
+ 		ie_len = (size_t)(ies->len);
+ 		rcu_read_unlock();
+ #endif
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
+ 		cfg80211_put_bss(bss);
++#else
++		cfg80211_put_bss(wl_to_wiphy(wl), bss);
++#endif
+ 	}
+ 
+ 	tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0009-add-support-for-linux-3.10.0.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0009-add-support-for-linux-3.10.0.patch
@@ -0,0 +1,129 @@
+From 53c81dd6a3ad5919aef8c25f0589d8a538ddb532 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Wed, 9 Oct 2013 12:46:52 +0200
+Subject: [PATCH 1/1] Add support for Linux 3.10
+
+Thanks to Maarten Lankhorst for the patch.
+---
+ src/wl/sys/wl_linux.c |   82 ++++++++++++++++++++++++++++++++++++++++++++++---
+ 1 file changed, 77 insertions(+), 5 deletions(-)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 521f02e..3ead3c3 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -3235,7 +3235,7 @@ wl_tkip_keyset(wl_info_t *wl, wsec_key_t *key)
+ void
+ wl_tkip_printstats(wl_info_t *wl, bool group_key)
+ {
+-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ 	char debug_buf[512];
+ 	int idx;
+ 	if (wl->tkipmodops) {
+@@ -3408,6 +3408,7 @@ wl_linux_watchdog(void *ctx)
+ 	return 0;
+ }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
+ static int
+ wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
+ {
+@@ -3462,19 +3463,90 @@ wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *d
+ 	return length;
+ }
+ 
++#else
++
++static int
++wl_proc_read(struct seq_file *seq, void *offset)
++{
++	wl_info_t * wl = (wl_info_t *)seq->private;
++	int bcmerror, to_user;
++
++	WL_LOCK(wl);
++	bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
++	WL_UNLOCK(wl);
++
++	seq_printf(seq, "%d\n", to_user);
++	return bcmerror;
++}
++
++static ssize_t wl_proc_write(struct file *file, const char __user *buff,
++			     size_t length, loff_t *ppos)
++{
++	struct seq_file *seq = file->private_data;
++	wl_info_t * wl = (wl_info_t *)seq->private;
++	int bcmerror, from_user = 0;
++
++	if (length != 1) {
++		WL_ERROR(("%s: Invalid data length\n", __FUNCTION__));
++		return -EIO;
++	}
++
++	if (copy_from_user(&from_user, buff, 1)) {
++		WL_ERROR(("%s: copy from user failed\n", __FUNCTION__));
++		return -EFAULT;
++	}
++
++	if (from_user >= 0x30)
++		from_user -= 0x30;
++
++	WL_LOCK(wl);
++	bcmerror = wlc_ioctl(wl->wlc, WLC_SET_MONITOR, &from_user, sizeof(int), NULL);
++	WL_UNLOCK(wl);
++
++	if (bcmerror < 0) {
++		WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
++		return -EIO;
++	}
++	*ppos += length;
++	return length;
++}
++
++static int wl_proc_open(struct inode *inode, struct file *file)
++{
++	return single_open(file, wl_proc_read, PDE_DATA(inode));
++}
++
++static const struct file_operations wl_proc_fops = {
++	.owner = THIS_MODULE,
++	.open = wl_proc_open,
++	.read = seq_read,
++	.write = wl_proc_write,
++	.llseek = seq_lseek,
++	.release = single_release,
++};
++#endif
++
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)
+ {
+ 	char tmp[32];
+ 	sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
+-	if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
++	wl->proc_entry = create_proc_entry(tmp, 0644, NULL);
++	if (wl->proc_entry) {
++		wl->proc_entry->read_proc = wl_proc_read;
++		wl->proc_entry->write_proc = wl_proc_write;
++		wl->proc_entry->data = wl;
++	}
++#else
++	wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_proc_fops, wl);
++#endif
++	if (!wl->proc_entry) {
+ 		WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
+ 		ASSERT(0);
+ 		return -1;
+ 	}
+-	wl->proc_entry->read_proc = wl_proc_read;
+-	wl->proc_entry->write_proc = wl_proc_write;
+-	wl->proc_entry->data = wl;
+ 	return 0;
+ }
+ #ifdef WLOFFLD
+-- 
+1.7.9.5
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0010-change-the-network-interface-name-from-eth-to-wlan.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0010-change-the-network-interface-name-from-eth-to-wlan.patch
@@ -0,0 +1,26 @@
+From c51168b8481e84743b50d3d5cba18a4a0a188448 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Fri, 22 Nov 2013 10:07:33 +0100
+Subject: [PATCH 1/1] Change the network interface name from eth to wlan
+
+Thanks to Shuduo Sang for the patch.
+---
+ src/wl/sys/wl_linux.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 3ead3c3..b662ff7 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -235,7 +235,7 @@ module_param(nompc, int, 0);
+ #define to_str(s) #s
+ #define quote_str(s) to_str(s)
+ 
+-#define BRCM_WLAN_IFNAME eth%d
++#define BRCM_WLAN_IFNAME wlan%d
+ 
+ static char intf_name[IFNAMSIZ] = quote_str(BRCM_WLAN_IFNAME);
+ 
+-- 
+1.7.9.5
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0011-do-not-define-__devinit-as-__init-in-linux-3.8-as-__.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0011-do-not-define-__devinit-as-__init-in-linux-3.8-as-__.patch
@@ -0,0 +1,31 @@
+From 463082d4d3141d89f5d174d4a85800501f71d5db Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Fri, 22 Nov 2013 10:15:22 +0100
+Subject: [PATCH 1/1] Do not define __devinit as __init in linux >= 3.8 as
+ __init was removed
+
+Thanks to Krzysztof Kolasa for the patch.
+---
+ src/include/linuxver.h |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/include/linuxver.h b/src/include/linuxver.h
+index 5548e71..5044739 100644
+--- a/src/include/linuxver.h
++++ b/src/include/linuxver.h
+@@ -169,8 +169,12 @@ typedef irqreturn_t(*FN_ISR) (int irq, void *dev_id, struct pt_regs *ptregs);
+ #define __devexit
+ #endif
+ #ifndef __devinit
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 8, 0)
++#define __devinit
++#else
+ #define __devinit	__init
+ #endif
++#endif
+ #ifndef __devinitdata
+ #define __devinitdata
+ #endif
+-- 
+1.7.9.5
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0012-add-support-for-Linux-3.15.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0012-add-support-for-Linux-3.15.patch
@@ -0,0 +1,46 @@
+From 05dd11abffe27c2fd8f618e79036be026f71b20c Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Mon, 12 May 2014 17:32:44 +0200
+Subject: [PATCH 1/1] Add support for Linux 3.15
+
+Make sure to pass the channel to cfg80211_ibss_joined().
+
+This should fix LP: #1307744
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 3a5e46b..6384e58 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -1841,7 +1841,26 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 			wl_get_assoc_ies(wl);
+ 			memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
+ 			wl_update_bss_info(wl);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
++			{
++				struct wl_bss_info *bi;
++				u16 bss_info_channel;
++				struct ieee80211_channel *channel;
++				u32 freq;
++
++				bi = (struct wl_bss_info *)(wl->extra_buf + 4);
++				bss_info_channel = bi->ctl_ch ? bi->ctl_ch : CHSPEC_CHANNEL(bi->chanspec);
++
++				freq = ieee80211_channel_to_frequency(bss_info_channel,
++					(bss_info_channel <= CH_MAX_2G_CHANNEL) ?
++					IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
++
++				channel = ieee80211_get_channel(wl_to_wiphy(wl), freq);
++				cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
++			}
++#else
+ 			cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
++#endif
+ 			set_bit(WL_STATUS_CONNECTED, &wl->status);
+ 			wl->profile->active = true;
+ 		}
+-- 
+1.9.1
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0013-gcc.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0013-gcc.patch
@@ -0,0 +1,11 @@
+--- a/Makefile	2014-06-26 10:42:08.000000000 +0000
++++ b/Makefile	2014-07-17 22:44:01.662297228 +0000
+@@ -132,6 +132,8 @@
+ EXTRA_CFLAGS       += -I$(src)/src/shared/bcmwifi/include
+ #EXTRA_CFLAGS       += -DBCMDBG_ASSERT -DBCMDBG_ERR
+ 
++EXTRA_CFLAGS       += -Wno-date-time
++
+ EXTRA_LDFLAGS      := $(src)/lib/wlc_hybrid.o_shipped_$(BINARCH)
+ 
+ KBASE              ?= /lib/modules/`uname -r`
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0014-add-support-for-Linux-3.17.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0014-add-support-for-Linux-3.17.patch
@@ -0,0 +1,30 @@
+From 05dd11abffe27c2fd8f618e79036be026f71b20c Mon Sep 17 00:00:00 2001
+From: Brian Norris <computersforpeace@gmail.com>
+Date: Tue, 26 Aug 2014 01:21:19 -0800
+
+Subject: [PATCH] Add support for Linux 3.17
+
+---
+ src/wl/sys/wl_linux.c | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 3a5e46b..6384e58 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -1351,7 +1351,12 @@
+ 	dev->priv = priv_link;
+ #else
+ 
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))
+ 	dev = alloc_netdev(sizeof(priv_link_t), intf_name, ether_setup);
++#else
++	dev = alloc_netdev(sizeof(priv_link_t), intf_name, NET_NAME_UNKNOWN,
++			   ether_setup);
++#endif
+ 	if (!dev) {
+ 		WL_ERROR(("wl%d: %s: alloc_netdev failed\n",
+ 			(wl->pub)?wl->pub->unit:wlif->subunit, __FUNCTION__));
+-- 
+1.9.1
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0015-add-support-for-Linux-3.18.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0015-add-support-for-Linux-3.18.patch
@@ -0,0 +1,37 @@
+From 8b6f3f87c81fa35eef24831e9a93eff1e6e1444f Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Mon, 10 Nov 2014 09:22:09 +0100
+Subject: [PATCH 1/1] Update cfg80211_inform_bss() to use
+ CFG80211_BSS_FTYPE_UNKNOWN
+
+This is only necessary with Linux >= 3.18.
+
+Original author: Krzysztof Kolasa
+Source: https://raw.githubusercontent.com/kolasa/bcmwl-6.30.223.248/master/patches/0015-CFG80211_BSS_FTYPE_UNKNOWN-linux-3.18.0.patch
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index ea0726f..ee0d3a0 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2010,9 +2010,15 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
+ 
+ 	notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+ 	notify_ielen = le32_to_cpu(bi->ie_length);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
+ 	cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
+ 		0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+ 		(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
++#else
++	cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
++		0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
++		(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
++#endif
+ 
+ 	if (unlikely(!cbss))
+ 		return -ENOMEM;
+-- 
+1.9.1
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0016-repair-make-warnings.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0016-repair-make-warnings.patch
@@ -0,0 +1,57 @@
+From 92fc12028553831a87cfa87ffa8d676ab0f60522 Mon Sep 17 00:00:00 2001
+From: Simon Eisenmann <simon@longsleep.org>
+Date: Sat, 14 Mar 2015 15:02:08 +0100
+Subject: [PATCH] Repair make warnings
+
+Orginal author: Krzysztof Kolasa
+Source: https://raw.githubusercontent.com/kolasa/bcmwl-6.30.223.248/9fafc1faa6dc410bf8aba340a7929f404c73d30e/patches/0016-repair-make-warnings.patch
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 13 ++++++++++++-
+ 1 file changed, 12 insertions(+), 1 deletion(-)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index ea0726f..b265e25 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -63,8 +63,13 @@ static s32 wl_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 changed);
+ static s32 wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
+            struct cfg80211_ibss_params *params);
+ static s32 wl_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
+ static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
+            struct net_device *dev, u8 *mac, struct station_info *sinfo);
++#else
++static s32 wl_cfg80211_get_station(struct wiphy *wiphy,
++           struct net_device *dev, const u8 *mac, struct station_info *sinfo);
++#endif
+ static s32 wl_cfg80211_set_power_mgmt(struct wiphy *wiphy,
+            struct net_device *dev, bool enabled, s32 timeout);
+ static int wl_cfg80211_connect(struct wiphy *wiphy, struct net_device *dev,
+@@ -1387,7 +1392,7 @@ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev,
+ 	key_endian_to_host(&key);
+ 
+ 	params.key_len = (u8) min_t(u8, DOT11_MAX_KEY_SIZE, key.len);
+-	memcpy(params.key, key.data, params.key_len);
++	memcpy((char *)params.key, key.data, params.key_len);
+ 
+ 	if ((err = wl_dev_ioctl(dev, WLC_GET_WSEC, &wsec, sizeof(wsec)))) {
+ 		return err;
+@@ -1421,9 +1426,15 @@ wl_cfg80211_get_key(struct wiphy *wiphy, struct net_device *dev,
+ 	return err;
+ }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 16, 0)
+ static s32
+ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
+                         u8 *mac, struct station_info *sinfo)
++#else
++static s32
++wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
++                        const u8 *mac, struct station_info *sinfo)
++#endif
+ {
+ 	struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
+ 	scb_val_t scb_val;
+-- 
+2.1.0
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0017-add-support-for-Linux-4.0.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0017-add-support-for-Linux-4.0.patch
@@ -0,0 +1,40 @@
+From a97b0a39f016589e38706d7d32f902847dcbbf27 Mon Sep 17 00:00:00 2001
+From: Simon Eisenmann <simon@longsleep.org>
+Date: Sat, 14 Mar 2015 15:10:48 +0100
+Subject: [PATCH] Add support for Linux 4.0
+
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index b265e25..425c7c5 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -1452,7 +1452,11 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
+ 		WL_DBG(("Could not get rate (%d)\n", err));
+ 	} else {
+ 		rate = dtoh32(rate);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
+ 		sinfo->filled |= STATION_INFO_TX_BITRATE;
++#else
++		sinfo->filled |= BIT(NL80211_STA_INFO_TX_BITRATE);
++#endif
+ 		sinfo->txrate.legacy = rate * 5;
+ 		WL_DBG(("Rate %d Mbps\n", (rate / 2)));
+ 	}
+@@ -1465,7 +1469,11 @@ wl_cfg80211_get_station(struct wiphy *wiphy, struct net_device *dev,
+ 			return err;
+ 		}
+ 		rssi = dtoh32(scb_val.val);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 0, 0)
+ 		sinfo->filled |= STATION_INFO_SIGNAL;
++#else
++		sinfo->filled |= BIT(NL80211_STA_INFO_SIGNAL);
++#endif
+ 		sinfo->signal = rssi;
+ 		WL_DBG(("RSSI %d dBm\n", rssi));
+ 	}
+-- 
+2.1.0
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0018-cfg80211_disconnected.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0018-cfg80211_disconnected.patch
@@ -0,0 +1,29 @@
+From b14ac6e4b871b5e15f63389ba63d1fc23a54c58b Mon Sep 17 00:00:00 2001
+From: Tim Gardner <tim.gardner@canonical.com>
+Date: Tue, 4 Aug 2015 09:02:10 -0600
+Subject: [PATCH] cfg80211_disconnected
+
+Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
+---
+ bcmwl-6.30.223.248+bdcom/src/src/wl/sys/wl_cfg80211_hybrid.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index ea0726f..0131f01 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2047,7 +2047,11 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 		}
+ 		else if ((event == WLC_E_LINK && ~(flags & WLC_EVENT_MSG_LINK)) ||
+ 			event == WLC_E_DEAUTH_IND || event == WLC_E_DISASSOC_IND) {
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
+ 			cfg80211_disconnected(ndev, 0, NULL, 0, GFP_KERNEL);
++#else
++			cfg80211_disconnected(ndev, 0, NULL, 0, false, GFP_KERNEL);
++#endif
+ 			clear_bit(WL_STATUS_CONNECTED, &wl->status);
+ 			wl_link_down(wl);
+ 			wl_init_prof(wl->profile);
+-- 
+2.5.0
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0019-broadcom-sta-6.30.223.248-3.18-null-pointer-fix.patch
@@ -0,0 +1,27 @@
+Description: Fixing null pointer crash
+
+Origin: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773713
+Bug-Ubuntu: https://launchpad.net/bugs/1415880
+Last-Update: 2015-08-18
+
+---
+ src/wl/sys/wl_linux.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 860b935..295156f 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -2157,8 +2157,8 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
+ 	wlif = WL_DEV_IF(dev);
+ 	wl = WL_INFO(dev);
+ 
++	skb->prev = NULL;
+ 	if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
+-		skb->prev = NULL;
+ 
+ 		TXQ_LOCK(wl);
+ 
+-- 
+1.9.1
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0020-add-support-for-linux-4.3.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0020-add-support-for-linux-4.3.patch
@@ -0,0 +1,27 @@
+From c5c5852b37aa74e39658054ef7ba7b141bbc8ae1 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Mon, 16 Nov 2015 17:32:17 +0100
+Subject: [PATCH 1/1] Add support for Linux 4.3
+
+---
+ src/shared/linux_osl.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+index d540636..e622c5c 100644
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
+@@ -932,6 +932,10 @@ osl_getcycles(void)
+ 	uint cycles;
+ 
+ #if defined(__i386__)
++#ifndef rdtscl
++#define rdtscl(low) \
++ ((low) = (u32)rdtsc())
++#endif
+ 	rdtscl(cycles);
+ #else
+ 	cycles = 0;
+-- 
+1.9.1
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0021-add-support-for-Linux-4.7.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0021-add-support-for-Linux-4.7.patch
@@ -0,0 +1,28 @@
+From a78ab5f4a6990fefdceea5835ad18c566eec5c4d Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Thu, 4 Aug 2016 16:41:57 +0200
+Subject: [PATCH 1/1] Add support for Linux 4.7
+
+---
+ src/src/wl/sys/wl_cfg80211_hybrid.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index ea0726f..e7dc545 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -43,6 +43,11 @@
+ #define EVENT_FLAGS(e) dtoh16((e)->flags)
+ #define EVENT_STATUS(e) dtoh32((e)->status)
+ 
++#ifndef IEEE80211_BAND_2GHZ
++#define IEEE80211_BAND_2GHZ NL80211_BAND_2GHZ
++#define IEEE80211_BAND_5GHZ NL80211_BAND_5GHZ
++#endif
++
+ #ifdef BCMDBG
+ u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_INFO;
+ #else
+-- 
+2.7.4
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0022-add-support-for-Linux-4.8.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0022-add-support-for-Linux-4.8.patch
@@ -0,0 +1,64 @@
+From d3f93542326a06d920c6eb89b703384290d37b8b Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Fri, 2 Sep 2016 17:35:34 +0200
+Subject: [PATCH 1/1] Add support for Linux 4.8
+
+Orginal author: Krzysztof Kolasa
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 2fc71fe..ec5e472 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -2388,8 +2388,16 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 	s32 err = 0;
+ 
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = true,
++		};
++		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
+ 		cfg80211_scan_done(wl->scan_request, true);     
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 
+@@ -2490,7 +2498,14 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 
+ scan_done_out:
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = false,
++		};
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		cfg80211_scan_done(wl->scan_request, false);
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 	rtnl_unlock();
+@@ -2909,7 +2924,14 @@ s32 wl_cfg80211_down(struct net_device *ndev)
+ 	s32 err = 0;
+ 
+ 	if (wl->scan_request) {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
++		struct cfg80211_scan_info info = {
++			.aborted = true,
++		};
++		cfg80211_scan_done(wl->scan_request, &info);
++#else
+ 		cfg80211_scan_done(wl->scan_request, true);	
++#endif
+ 		wl->scan_request = NULL;
+ 	}
+ 
+-- 
+2.7.4
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0023-add-support-for-Linux-4.11.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0023-add-support-for-Linux-4.11.patch
@@ -0,0 +1,44 @@
+From b61d5666d38d0083bc45cef979c5f820aa1d2c07 Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Mon, 20 Mar 2017 10:42:51 +0100
+Subject: [PATCH 1/1] Add support for Linux 4.11
+
+Original author: Krzysztof Kolasa
+---
+ src/include/linuxver.h | 4 ++++
+ src/wl/sys/wl_linux.c  | 2 ++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/include/linuxver.h b/src/include/linuxver.h
+index b05bc32..775fcb6 100644
+--- a/src/include/linuxver.h
++++ b/src/include/linuxver.h
+@@ -144,7 +144,11 @@ typedef irqreturn_t(*FN_ISR) (int irq, void *dev_id, struct pt_regs *ptregs);
+ #endif 
+ 
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 32)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ #include <linux/sched.h>
++#else
++#include <linux/sched/signal.h>
++#endif
+ #endif
+ 
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 0d05100..e8dae45 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -2915,7 +2915,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
+ 	if (skb == NULL) return;
+ 
+ 	skb->dev = wl->monitor_dev;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 11, 0)
+ 	skb->dev->last_rx = jiffies;
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
+ 	skb_reset_mac_header(skb);
+ #else
+-- 
+2.7.4
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0024-add-support-for-Linux-4.12.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0024-add-support-for-Linux-4.12.patch
@@ -0,0 +1,74 @@
+From 54b869424ccc60d72e26278e8349e4804f4dfb6b Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Mon, 12 Jun 2017 12:29:34 +0200
+Subject: [PATCH 1/1] Add support for Linux 4.12
+
+---
+ src/wl/sys/wl_cfg80211_hybrid.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
+index 7b606e0..ecea275 100644
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -50,7 +50,11 @@ u32 wl_dbg_level = WL_DBG_ERR;
+ #endif
+ 
+ static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
+            enum nl80211_iftype type, u32 *flags, struct vif_params *params);
++#else
++           enum nl80211_iftype type, struct vif_params *params);
++#endif
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
+ static s32
+ wl_cfg80211_scan(struct wiphy *wiphy,
+@@ -463,7 +467,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
+ 
+ static s32
+ wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
+                          enum nl80211_iftype type, u32 *flags,
++#else
++                         enum nl80211_iftype type,
++#endif
+    struct vif_params *params)
+ {
+ 	struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
+@@ -2358,12 +2366,16 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+                     const wl_event_msg_t *e, void *data)
+ {
+ 	struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,12,0))
++	struct cfg80211_roam_info roam_info = {};
++#endif
+ 	s32 err = 0;
+ 
+ 	wl_get_assoc_ies(wl);
+ 	memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
+ 	memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
+ 	wl_update_bss_info(wl);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
+ 	cfg80211_roamed(ndev,
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
+ 			&wl->conf->channel,	 
+@@ -2371,6 +2383,16 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
+ 			(u8 *)&wl->bssid,
+ 			conn_info->req_ie, conn_info->req_ie_len,
+ 			conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
++#else
++	roam_info.channel = &wl->conf->channel;
++	roam_info.bssid = (u8 *)&wl->bssid;
++	roam_info.req_ie = conn_info->req_ie;
++	roam_info.req_ie_len = conn_info->req_ie_len;
++	roam_info.resp_ie = conn_info->resp_ie;
++	roam_info.resp_ie_len = conn_info->resp_ie_len;
++
++	cfg80211_roamed(ndev, &roam_info, GFP_KERNEL);
++#endif
+ 	WL_DBG(("Report roaming result\n"));
+ 
+ 	set_bit(WL_STATUS_CONNECTED, &wl->status);
+-- 
+2.7.4
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0025-add-support-for-Linux-4.14.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0025-add-support-for-Linux-4.14.patch
@@ -0,0 +1,29 @@
+From d1dfd471bfc5bb4e9513e8a26ecb11de934dc27e Mon Sep 17 00:00:00 2001
+From: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
+Date: Fri, 15 Dec 2017 17:09:04 +0000
+Subject: [PATCH 25/26] add support for Linux 4.14
+
+Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
+---
+ src/shared/linux_osl.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+index 6157d1832767..318874541d89 100644
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
+@@ -1076,7 +1076,11 @@ osl_os_get_image_block(char *buf, int len, void *image)
+ 	if (!image)
+ 		return 0;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
++	rdlen = kernel_read(fp, buf, len, &fp->f_pos);
++#else
+ 	rdlen = kernel_read(fp, fp->f_pos, buf, len);
++#endif
+ 	if (rdlen > 0)
+ 		fp->f_pos += rdlen;
+ 
+-- 
+2.14.1
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0026-add-support-for-Linux-4.15.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0026-add-support-for-Linux-4.15.patch
@@ -0,0 +1,61 @@
+From cd39fb95882ca7707946848f7dc24d4e2915dbf5 Mon Sep 17 00:00:00 2001
+From: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
+Date: Fri, 15 Dec 2017 18:09:01 +0000
+Subject: [PATCH 26/26] add support for Linux 4.15
+
+Signed-off-by: Marcelo Henrique Cerri <marcelo.cerri@canonical.com>
+---
+ src/wl/sys/wl_linux.c | 16 ++++++++++++++++
+ 1 file changed, 16 insertions(+)
+
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 0d05100cfac7..165ea7c64c86 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -93,7 +93,11 @@ struct iw_statistics *wl_get_wireless_stats(struct net_device *dev);
+ 
+ #include <wlc_wowl.h>
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++static void wl_timer(struct timer_list *tl);
++#else
+ static void wl_timer(ulong data);
++#endif
+ static void _wl_timer(wl_timer_t *t);
+ static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
+ 
+@@ -2298,9 +2302,17 @@ wl_timer_task(wl_task_t *task)
+ }
+ 
+ static void
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++wl_timer(struct timer_list *tl)
++#else
+ wl_timer(ulong data)
++#endif
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++	wl_timer_t *t = from_timer(t, tl, timer);
++#else
+ 	wl_timer_t *t = (wl_timer_t *)data;
++#endif
+ 
+ 	if (!WL_ALL_PASSIVE_ENAB(t->wl))
+ 		_wl_timer(t);
+@@ -2352,9 +2364,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(void *arg), void *arg, const char *tname
+ 
+ 	bzero(t, sizeof(wl_timer_t));
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
++	timer_setup(&t->timer, wl_timer, 0);
++#else
+ 	init_timer(&t->timer);
+ 	t->timer.data = (ulong) t;
+ 	t->timer.function = wl_timer;
++#endif
+ 	t->wl = wl;
+ 	t->fn = fn;
+ 	t->arg = arg;
+-- 
+2.14.1
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0027-add-support-for-linux-5.1.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0027-add-support-for-linux-5.1.patch
@@ -0,0 +1,30 @@
+From 20bb1a6da26c496572ee63d310cdf69a2f1553f8 Mon Sep 17 00:00:00 2001
+From: Seth Forshee <seth.forshee@canonical.com>
+Date: Fri, 17 May 2019 20:32:20 +0000
+Subject: [PATCH] add support for linux 5.1
+
+get_ds() was removed and replaced universally with KERNEL_DS.
+Provide a version of get_ds() to do likewise for 5.1 and later.
+
+Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
+---
+ src/include/linuxver.h | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/src/include/linuxver.h b/src/include/linuxver.h
+index b05bc32..2b88b30 100644
+--- a/src/include/linuxver.h
++++ b/src/include/linuxver.h
+@@ -591,4 +591,9 @@ do {									\
+ #define netdev_priv(dev) dev->priv
+ #endif 
+ 
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0))
++#include <linux/uaccess.h>
++#define get_ds() (KERNEL_DS)
++#endif
++
+ #endif 
+-- 
+2.20.1
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/patches/0028-add-support-for-linux-5.6.patch
+++ bcmwl-6.30.223.271+bdcom/debian/patches/0028-add-support-for-linux-5.6.patch
@@ -0,0 +1,81 @@
+From 03dc9777612be477618f14bf600538f1eb96c0df Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.milone@canonical.com>
+Date: Mon, 4 May 2020 13:17:19 +0200
+Subject: [PATCH 1/1] Add support for linux 5.6
+
+Original patch:
+https://git.archlinux.org/svntogit/community.git/commit/trunk?h=packages/broadcom-wl-dkms&id=e78ab887e946418baac2abcaad24b9df19f22945
+
+Signed-off-by: Alberto Milone <alberto.milone@canonical.com>
+---
+ src/shared/linux_osl.c |  4 ++++
+ src/wl/sys/wl_linux.c  | 15 +++++++++++++++
+ 2 files changed, 19 insertions(+)
+
+diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
+index 6157d18..c6d1aed 100644
+--- a/src/shared/linux_osl.c
++++ b/src/shared/linux_osl.c
+@@ -942,7 +942,11 @@ osl_getcycles(void)
+ void *
+ osl_reg_map(uint32 pa, uint size)
+ {
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++	return (ioremap((unsigned long)pa, (unsigned long)size));
++#else
+ 	return (ioremap_nocache((unsigned long)pa, (unsigned long)size));
++#endif
+ }
+
+ void
+diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
+index 0d05100..8aa60f4 100644
+--- a/src/wl/sys/wl_linux.c
++++ b/src/wl/sys/wl_linux.c
+@@ -582,7 +582,11 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
+ 	}
+ 	wl->bcm_bustype = bustype;
+
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++	if ((wl->regsva = ioremap(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
++#else
+ 	if ((wl->regsva = ioremap_nocache(dev->base_addr, PCI_BAR0_WINSZ)) == NULL) {
++#endif
+ 		WL_ERROR(("wl%d: ioremap() failed\n", unit));
+ 		goto fail;
+ 	}
+@@ -772,7 +776,11 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ 	if ((val & 0x0000ff00) != 0)
+ 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
+ 		bar1_size = pci_resource_len(pdev, 2);
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++		bar1_addr = (uchar *)ioremap(pci_resource_start(pdev, 2),
++#else
+ 		bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
++#endif
+ 			bar1_size);
+ 	wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
+ 		pdev->irq, bar1_addr, bar1_size);
+@@ -3335,12 +3343,19 @@ wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t
+ }
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0)
++static struct proc_ops wl_fops = {
++        .proc_read     = wl_proc_read,
++        .proc_write    = wl_proc_write,
++};
++#else
+ static const struct file_operations wl_fops = {
+ 	.owner	= THIS_MODULE,
+ 	.read	= wl_proc_read,
+ 	.write	= wl_proc_write,
+ };
+ #endif
++#endif
+
+ static int
+ wl_reg_proc_entry(wl_info_t *wl)
+--
+2.25.1
+
--- bcmwl-6.30.223.271+bdcom.orig/debian/rules
+++ bcmwl-6.30.223.271+bdcom/debian/rules
@@ -0,0 +1,36 @@
+#!/usr/bin/make -f
+# Copyright (C) 2009 Alberto Milone
+
+DRIVER_NAME := bcmwl
+VERSION := $(shell dpkg-parsechangelog | grep '^Version:' | cut -d' ' -f2 | cut -d- -f1 | cut -d\: -f2)
+PKG_kernel_src  := bcmwl-kernel-source
+ARCH := $(shell dpkg --print-architecture)
+ifeq ($(ARCH),amd64)
+ARCH_SUFFIX=x86_64
+else
+ARCH_SUFFIX=i386
+endif
+
+%:
+	dh "$@" --with modaliases
+
+# we don't actually build/clean the source here, it's dkms
+override_dh_auto_clean:
+
+override_dh_auto_build:
+
+override_dh_auto_install:
+	# just create .install files from templates.
+	for i in dkms.conf \
+		$(PKG_kernel_src).install; do \
+		sed -e "s|#VERSION#|$(VERSION)|"   \
+			-e "s|#ARCH#|$(ARCH_SUFFIX)|"   \
+			debian/$$i.in > debian/$$i;      \
+	done
+
+override_dh_clean:
+	dh_clean
+
+	rm -f debian/dkms.conf \
+	debian/$(PKG_kernel_src).install \
+	rm -Rf $(CURDIR)/$(PKG_kernel_src)
