Dear Maintainer,

after a long period of inactivity, I decided to NMU this package with
the mentioned fixes and also kernel 4.0 support.

The NMU is not effective yet, the package is in the 10-day DELAYED queue
so you have lots of times to abort this action by uploading an official
version.

Interdiff is attached.

Best Regards,
Eduard.
diff -Nurd broadcom-sta-6.30.223.248.orig/debian/changelog 
broadcom-sta-6.30.223.248/debian/changelog
--- broadcom-sta-6.30.223.248.orig/debian/changelog     2014-12-07 
15:07:56.000000000 +0100
+++ broadcom-sta-6.30.223.248/debian/changelog  2015-04-29 12:35:54.000000000 
+0200
@@ -1,3 +1,13 @@
+broadcom-sta (6.30.223.248-3.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Added Canonical patches to support Linux kernel versions up to 4.0.0
+    (closes: #773713)
+  * Set some variables right for kernel-package/module-assistant usage, 
+    to build correctly against headers without having to boot that kernel
+
+ -- Eduard Bloch <bl...@debian.org>  Wed, 29 Apr 2015 11:50:17 +0200
+
 broadcom-sta (6.30.223.248-3) unstable; urgency=medium
 
   * Synced supported chipsets list with README.txt file (Closes: #762954).
diff -Nurd 
broadcom-sta-6.30.223.248.orig/debian/patches/10-0015-add-support-for-Linux-3.18.patch
 
broadcom-sta-6.30.223.248/debian/patches/10-0015-add-support-for-Linux-3.18.patch
--- 
broadcom-sta-6.30.223.248.orig/debian/patches/10-0015-add-support-for-Linux-3.18.patch
      1970-01-01 01:00:00.000000000 +0100
+++ 
broadcom-sta-6.30.223.248/debian/patches/10-0015-add-support-for-Linux-3.18.patch
   2015-04-29 11:57:53.000000000 +0200
@@ -0,0 +1,38 @@
+From 8b6f3f87c81fa35eef24831e9a93eff1e6e1444f Mon Sep 17 00:00:00 2001
+From: Alberto Milone <alberto.mil...@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.
+Modified by Eduard Bloch <bl...@debian.org> to align with Debian package 
broadcom-sta patches.
+
+Original author: Krzysztof Kolasa
+Original 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/amd64/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/amd64/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
+
diff -Nurd 
broadcom-sta-6.30.223.248.orig/debian/patches/11-0016-repair-make-warnings.patch
 broadcom-sta-6.30.223.248/debian/patches/11-0016-repair-make-warnings.patch
--- 
broadcom-sta-6.30.223.248.orig/debian/patches/11-0016-repair-make-warnings.patch
    1970-01-01 01:00:00.000000000 +0100
+++ broadcom-sta-6.30.223.248/debian/patches/11-0016-repair-make-warnings.patch 
2015-04-29 11:58:30.000000000 +0200
@@ -0,0 +1,59 @@
+From 92fc12028553831a87cfa87ffa8d676ab0f60522 Mon Sep 17 00:00:00 2001
+From: Simon Eisenmann <si...@longsleep.org>
+Date: Sat, 14 Mar 2015 15:02:08 +0100
+Subject: [PATCH] Repair make warnings
+
+Modified by Eduard Bloch <bl...@debian.org> to align with Debian package 
broadcom-sta patches.
+
+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/amd64/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/amd64/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
+
diff -Nurd 
broadcom-sta-6.30.223.248.orig/debian/patches/12-0017-add-support-for-Linux-4.0.patch
 
broadcom-sta-6.30.223.248/debian/patches/12-0017-add-support-for-Linux-4.0.patch
--- 
broadcom-sta-6.30.223.248.orig/debian/patches/12-0017-add-support-for-Linux-4.0.patch
       1970-01-01 01:00:00.000000000 +0100
+++ 
broadcom-sta-6.30.223.248/debian/patches/12-0017-add-support-for-Linux-4.0.patch
    2015-04-29 11:59:24.000000000 +0200
@@ -0,0 +1,42 @@
+From a97b0a39f016589e38706d7d32f902847dcbbf27 Mon Sep 17 00:00:00 2001
+From: Simon Eisenmann <si...@longsleep.org>
+Date: Sat, 14 Mar 2015 15:10:48 +0100
+Subject: [PATCH] Add support for Linux 4.0
+
+Modified by Eduard Bloch <bl...@debian.org> to align with Debian package 
broadcom-sta patches.
+
+---
+ 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/amd64/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/amd64/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
+
diff -Nurd broadcom-sta-6.30.223.248.orig/debian/patches/series 
broadcom-sta-6.30.223.248/debian/patches/series
--- broadcom-sta-6.30.223.248.orig/debian/patches/series        2014-12-07 
14:18:59.000000000 +0100
+++ broadcom-sta-6.30.223.248/debian/patches/series     2015-04-29 
11:53:46.000000000 +0200
@@ -8,3 +8,6 @@
 07-fix_procfs_handling.patch
 08-enable_error_traces.patch
 09-fix_system_hang_when_deleting_monitor.patch
+10-0015-add-support-for-Linux-3.18.patch
+11-0016-repair-make-warnings.patch
+12-0017-add-support-for-Linux-4.0.patch
diff -Nurd broadcom-sta-6.30.223.248.orig/debian/rules.modules 
broadcom-sta-6.30.223.248/debian/rules.modules
--- broadcom-sta-6.30.223.248.orig/debian/rules.modules 2014-10-20 
17:50:25.000000000 +0200
+++ broadcom-sta-6.30.223.248/debian/rules.modules      2015-04-29 
12:11:01.000000000 +0200
@@ -8,7 +8,7 @@
 
 kdist_clean: prep-deb-files
        dh_clean
-       $(MAKE) clean KBUILD=$(KSRC) KVER=$(KVERS)
+       $(MAKE) clean "KBUILD_DIR=$(KSRC)" "KVER=$(KVERS)"
 
 kdist_config: prep-deb-files
 
@@ -17,7 +17,7 @@
        dh_testroot
        dh_prep
        # Build and install the module
-       make -C $(KSRC) M=$(CURDIR)
+       $(MAKE) "KBUILD_DIR=$(KSRC)" "KVER=$(KVERS)"
        install -D -m 0644 wl.ko 
debian/$(PACKAGE)-$(KVERS)/lib/modules/$(KVERS)/kernel/drivers/net/wireless/wl.ko
        dh_installdocs
        dh_installchangelogs

Reply via email to