summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Vihrov2017-01-29 12:22:37 +0200
committerAndrey Vihrov2017-01-29 12:22:37 +0200
commit59616dc85bc0bcbdf69e1573b6ef2c897fe6b199 (patch)
treee2e06f9d5453a7797c75d63f55a75bf53e1cdfcf
parentc0a906612b75c7ef0eb3c85ad2e296581152df55 (diff)
downloadaur-59616dc85bc0bcbdf69e1573b6ef2c897fe6b199.tar.gz
Add patch from Debian to fix kernel warnings
-rw-r--r--.SRCINFO8
-rw-r--r--005-debian-fix-kernel-warnings.patch161
-rw-r--r--PKGBUILD10
-rw-r--r--dkms.conf.in1
4 files changed, 173 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 77eadee8b3e1..f548d55f17bf 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,9 +1,9 @@
# Generated by mksrcinfo v8
-# Sat Jan 14 12:17:18 UTC 2017
+# Sun Jan 29 10:20:34 UTC 2017
pkgbase = broadcom-wl-dkms
pkgdesc = Broadcom 802.11 Linux STA wireless driver
pkgver = 6.30.223.271
- pkgrel = 10
+ pkgrel = 11
url = https://www.broadcom.com/support/download-search/?pf=Wireless+LAN+Infrastructure
install = broadcom-wl-dkms.install
arch = i686
@@ -17,12 +17,14 @@ pkgbase = broadcom-wl-dkms
source = 002-rdtscl.patch
source = 003-linux47.patch
source = 004-linux48.patch
+ source = 005-debian-fix-kernel-warnings.patch
sha256sums = b97bc588420d1542f73279e71975ccb5d81d75e534e7b5717e01d6e6adf6a283
- sha256sums = a453cfd7c8ad5b04afa6a55189b445356090b52fd480c2b5ec843bfeec72b9bf
+ sha256sums = 2ffa76c0422801977a802c87423b3404f1de4dfe75a01bec7629acf300a074e9
sha256sums = 32e505a651fdb9fd5e4870a9d6de21dd703dead768c2b3340a2ca46671a5852f
sha256sums = 4ea03f102248beb8963ad00bd3e36e67519a90fa39244db065e74038c98360dd
sha256sums = 30ce1d5e8bf78aee487d0f3ac76756e1060777f70ed1a9cf95215c3a52cfbe2e
sha256sums = 09d709df0c764118ca43117f5c096163d9669a28170da8476d4b8211bd225d2e
+ sha256sums = 2306a59f9e7413f35a0669346dcd05ef86fa37c23b566dceb0c6dbee67e4d299
source_i686 = https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_271.tar.gz
sha256sums_i686 = 4f8b70b293ac8cc5c70e571ad5d1878d0f29d133a46fe7869868d9c19b5058cd
source_x86_64 = https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz
diff --git a/005-debian-fix-kernel-warnings.patch b/005-debian-fix-kernel-warnings.patch
new file mode 100644
index 000000000000..e9bf66a959b8
--- /dev/null
+++ b/005-debian-fix-kernel-warnings.patch
@@ -0,0 +1,161 @@
+--- a/src/wl/sys/wl_cfg80211_hybrid.c
++++ b/src/wl/sys/wl_cfg80211_hybrid.c
+@@ -1968,7 +1968,7 @@
+
+ if (dtoh32(bi->length) > WL_BSS_INFO_MAX) {
+ WL_DBG(("Beacon is larger than buffer. Discarding\n"));
+- return err;
++ return -E2BIG;
+ }
+ notif_bss_info = kzalloc(sizeof(*notif_bss_info) + sizeof(*mgmt) - sizeof(u8) +
+ WL_BSS_INFO_MAX, GFP_KERNEL);
+@@ -1992,9 +1992,15 @@
+ beacon_proberesp->capab_info = cpu_to_le16(bi->capability);
+ wl_rst_ie(wl);
+
+- wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
+- wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
++ err = wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
++ if (err)
++ goto inform_single_bss_out;
++
++ err = wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
+ offsetof(struct wl_cfg80211_bss_info, frame_buf));
++ if (err)
++ goto inform_single_bss_out;
++
+ notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) +
+ wl_get_ielen(wl);
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
+@@ -2006,14 +2012,14 @@
+ #endif
+ if (freq == 0) {
+ WL_ERR(("Invalid channel, fail to chcnage channel to freq\n"));
+- kfree(notif_bss_info);
+- return -EINVAL;
++ err = -EINVAL;
++ goto inform_single_bss_out;
+ }
+ channel = ieee80211_get_channel(wiphy, freq);
+ if (unlikely(!channel)) {
+ WL_ERR(("ieee80211_get_channel error\n"));
+- kfree(notif_bss_info);
+- return -EINVAL;
++ err = -EINVAL;
++ goto inform_single_bss_out;
+ }
+
+ WL_DBG(("SSID : \"%s\", rssi %d, channel %d, capability : 0x04%x, bssid %pM\n",
+@@ -2021,28 +2027,37 @@
+ mgmt->u.beacon.capab_info, &bi->BSSID));
+
+ signal = notif_bss_info->rssi * 100;
+- cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
+- le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
+- if (unlikely(!cbss)) {
+- WL_ERR(("cfg80211_inform_bss_frame error\n"));
+- kfree(notif_bss_info);
+- return -EINVAL;
+- }
+
+- notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+- notify_ielen = le32_to_cpu(bi->ie_length);
++ if (!wl->scan_request) {
++ cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
++ le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
++ if (unlikely(!cbss)) {
++ WL_ERR(("cfg80211_inform_bss_frame error\n"));
++ err = -ENOMEM;
++ goto inform_single_bss_out;
++ }
++ } else {
++ 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);
++ 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);
++ cbss = cfg80211_inform_bss(wiphy, channel,
++ wl->active_scan ?
++ CFG80211_BSS_FTYPE_PRESP : CFG80211_BSS_FTYPE_BEACON,
++ (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;
++ if (unlikely(!cbss)) {
++ WL_ERR(("cfg80211_inform_bss error\n"));
++ err = -ENOMEM;
++ goto inform_single_bss_out;
++ }
++ }
+
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
+ cfg80211_put_bss(wiphy, cbss);
+@@ -2050,6 +2065,7 @@
+ cfg80211_put_bss(cbss);
+ #endif
+
++inform_single_bss_out:
+ kfree(notif_bss_info);
+
+ return err;
+@@ -2316,6 +2332,9 @@
+ if (err)
+ goto update_bss_info_out;
+
++ bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
++ ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
++
+ ie = ((u8 *)bi) + bi->ie_offset;
+ ie_len = bi->ie_length;
+ } else {
+@@ -2328,11 +2347,18 @@
+ ie_len = bss->len_information_elements;
+ #endif
+ wl->conf->channel = *bss->channel;
++ }
++
++ if (bss) {
+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
+ cfg80211_put_bss(wiphy, bss);
+ #else
+ cfg80211_put_bss(bss);
+ #endif
++ } else {
++ WL_DBG(("Could not update BSS\n"));
++ err = -EINVAL;
++ goto update_bss_info_out;
+ }
+
+ tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
+@@ -2360,10 +2386,17 @@
+ struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
+ s32 err = 0;
+
+- wl_get_assoc_ies(wl);
++ err = wl_get_assoc_ies(wl);
++ if (err)
++ return err;
++
+ memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
+ memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
+- wl_update_bss_info(wl);
++
++ err = wl_update_bss_info(wl);
++ if (err)
++ return err;
++
+ cfg80211_roamed(ndev,
+ #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
+ &wl->conf->channel,
diff --git a/PKGBUILD b/PKGBUILD
index 9e53c3949d90..ca344b1bf951 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -4,7 +4,7 @@
pkgname=broadcom-wl-dkms
pkgver=6.30.223.271
-pkgrel=10
+pkgrel=11
pkgdesc="Broadcom 802.11 Linux STA wireless driver"
arch=('i686' 'x86_64')
url="https://www.broadcom.com/support/download-search/?pf=Wireless+LAN+Infrastructure"
@@ -17,15 +17,17 @@ source=('broadcom-wl-dkms.conf'
'001-null-pointer-fix.patch'
'002-rdtscl.patch'
'003-linux47.patch'
- '004-linux48.patch')
+ '004-linux48.patch'
+ '005-debian-fix-kernel-warnings.patch')
source_i686=("https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35-nodebug-pcoem-${pkgver//./_}.tar.gz")
source_x86_64=("https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-${pkgver//./_}.tar.gz")
sha256sums=('b97bc588420d1542f73279e71975ccb5d81d75e534e7b5717e01d6e6adf6a283'
- 'a453cfd7c8ad5b04afa6a55189b445356090b52fd480c2b5ec843bfeec72b9bf'
+ '2ffa76c0422801977a802c87423b3404f1de4dfe75a01bec7629acf300a074e9'
'32e505a651fdb9fd5e4870a9d6de21dd703dead768c2b3340a2ca46671a5852f'
'4ea03f102248beb8963ad00bd3e36e67519a90fa39244db065e74038c98360dd'
'30ce1d5e8bf78aee487d0f3ac76756e1060777f70ed1a9cf95215c3a52cfbe2e'
- '09d709df0c764118ca43117f5c096163d9669a28170da8476d4b8211bd225d2e')
+ '09d709df0c764118ca43117f5c096163d9669a28170da8476d4b8211bd225d2e'
+ '2306a59f9e7413f35a0669346dcd05ef86fa37c23b566dceb0c6dbee67e4d299')
sha256sums_i686=('4f8b70b293ac8cc5c70e571ad5d1878d0f29d133a46fe7869868d9c19b5058cd')
sha256sums_x86_64=('5f79774d5beec8f7636b59c0fb07a03108eef1e3fd3245638b20858c714144be')
diff --git a/dkms.conf.in b/dkms.conf.in
index 6fa394fd4066..e88a67c369e2 100644
--- a/dkms.conf.in
+++ b/dkms.conf.in
@@ -6,4 +6,5 @@ PATCH[0]="001-null-pointer-fix.patch"
PATCH[1]="002-rdtscl.patch"
PATCH[2]="003-linux47.patch"
PATCH[3]="004-linux48.patch"
+PATCH[4]="005-debian-fix-kernel-warnings.patch"
AUTOINSTALL="yes"