From af4fcd1f820540ed2e67dfc656b7cf7ce95e5e16 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 4 Apr 2018 13:08:47 +0100 Subject: net-wireless/broadcom-sta : add compatibility with recent kernels --- .../broadcom-sta-dkms-6.30.223.271-r1.ebuild | 58 ---- .../broadcom-sta-dkms-6.30.223.271-r2.ebuild | 59 ++++ .../files/broadcom-sta-6.30.223.141-license.patch | 10 - .../broadcom-sta-6.30.223.141-linux-3.10.0.patch | 102 ------ .../broadcom-sta-6.30.223.141-linux-3.15.patch | 17 - .../broadcom-sta-6.30.223.141-linux-recent.patch | 126 -------- .../broadcom-sta-6.30.223.248-linux-3.17.patch | 29 -- .../broadcom-sta-6.30.223.248-linux-3.18.patch | 30 -- ...adcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch | 350 --------------------- .../broadcom-sta-6.30.223.248-r3-linux-4.0.patch | 26 -- .../broadcom-sta-6.30.223.248-r4-linux-4.2.patch | 16 - .../broadcom-sta-6.30.223.271-r2-linux-4.3.patch | 12 - .../broadcom-sta-6.30.223.271-r4-linux-4.15.patch | 63 ++++ .../broadcom-sta-6.30.223.30-linux-3.10.0.patch | 102 ------ .../broadcom-sta-6.30.223.30-linux-3.9.0.patch | 17 - .../files/broadcom-sta-6.30.223.30-makefile.patch | 14 - .../files/broadcom-sta-dkms-6.30.223.30-conf.patch | 22 -- .../files/broadcom-sta-dkms-6.30.223.30.patch | 16 - 18 files changed, 122 insertions(+), 947 deletions(-) delete mode 100644 sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r1.ebuild create mode 100644 sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r2.ebuild delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-license.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-3.15.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-recent.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-linux-3.17.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-linux-3.18.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r4-linux-4.2.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.271-r2-linux-4.3.patch create mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-makefile.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-dkms-6.30.223.30-conf.patch delete mode 100644 sys-kernel/broadcom-sta-dkms/files/broadcom-sta-dkms-6.30.223.30.patch (limited to 'sys-kernel/broadcom-sta-dkms') diff --git a/sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r1.ebuild b/sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r1.ebuild deleted file mode 100644 index 1cabceeb..00000000 --- a/sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r1.ebuild +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI=5 -inherit eutils - -DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver source" -HOMEPAGE="http://www.broadcom.com/support/802.11/" -SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35" -SRC_URI="amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz ) - http://www.broadcom.com/docs/linux_sta/README_${PV}.txt -> README-${P}.txt" - -LICENSE="Broadcom" -KEYWORDS="amd64" -SLOT="0" -RESTRICT="mirror" - -DEPEND="sys-kernel/dkms" -RDEPEND="${DEPEND}" - -S="${WORKDIR}" - -src_prepare() { - cp "${FILESDIR}"/dkms.conf "${S}" || die - - epatch \ - "${FILESDIR}/broadcom-sta-6.30.223.141-makefile.patch" \ - "${FILESDIR}/broadcom-sta-6.30.223.141-eth-to-wlan.patch" \ - "${FILESDIR}/broadcom-sta-6.30.223.141-gcc.patch" \ - "${FILESDIR}/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch" \ - "${FILESDIR}/broadcom-sta-6.30.223.271-r1-linux-3.18.patch" \ - "${FILESDIR}/broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch" \ - "${FILESDIR}/broadcom-sta-6.30.223.271-r4-linux-4.7.patch" \ - "${FILESDIR}/broadcom-sta-6.30.223.271-r4-linux-4.8.patch" \ - "${FILESDIR}/broadcom-sta-6.30.223.271-r4-linux-4.11.patch" \ - "${FILESDIR}/broadcom-sta-6.30.223.271-r4-linux-4.12.patch" - - epatch_user -} - -src_compile(){ - : -} - -src_install() { - dodir /usr/src/${P} - insinto /usr/src/${P} - doins -r "${S}"/* -} - -pkg_postinst() { - dkms add ${PN}/${PV} -} - -pkg_prerm() { - dkms remove ${PN}/${PV} --all -} diff --git a/sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r2.ebuild b/sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r2.ebuild new file mode 100644 index 00000000..fb55cb82 --- /dev/null +++ b/sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r2.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils + +DESCRIPTION="Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver source" +HOMEPAGE="http://www.broadcom.com/support/802.11/" +SRC_BASE="http://www.broadcom.com/docs/linux_sta/hybrid-v35" +SRC_URI="amd64? ( ${SRC_BASE}_64-nodebug-pcoem-${PV//\./_}.tar.gz ) + http://www.broadcom.com/docs/linux_sta/README_${PV}.txt -> README-${P}.txt" + +LICENSE="Broadcom" +KEYWORDS="amd64" +SLOT="0" +RESTRICT="mirror" + +DEPEND="sys-kernel/dkms" +RDEPEND="${DEPEND}" + +S="${WORKDIR}" + +src_prepare() { + cp "${FILESDIR}"/dkms.conf "${S}" || die + + epatch \ + "${FILESDIR}/broadcom-sta-6.30.223.141-makefile.patch" \ + "${FILESDIR}/broadcom-sta-6.30.223.141-eth-to-wlan.patch" \ + "${FILESDIR}/broadcom-sta-6.30.223.141-gcc.patch" \ + "${FILESDIR}/broadcom-sta-6.30.223.248-r3-Wno-date-time.patch" \ + "${FILESDIR}/broadcom-sta-6.30.223.271-r1-linux-3.18.patch" \ + "${FILESDIR}/broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch" \ + "${FILESDIR}/broadcom-sta-6.30.223.271-r4-linux-4.7.patch" \ + "${FILESDIR}/broadcom-sta-6.30.223.271-r4-linux-4.8.patch" \ + "${FILESDIR}/broadcom-sta-6.30.223.271-r4-linux-4.11.patch" \ + "${FILESDIR}/broadcom-sta-6.30.223.271-r4-linux-4.12.patch" \ + "${FILESDIR}/broadcom-sta-6.30.223.271-r4-linux-4.15.patch" + + epatch_user +} + +src_compile(){ + : +} + +src_install() { + dodir usr/src/${P} + insinto usr/src/${P} + doins -r "${S}"/* +} + +pkg_postinst() { + dkms add ${PN}/${PV} +} + +pkg_prerm() { + dkms remove ${PN}/${PV} --all +} diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-license.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-license.patch deleted file mode 100644 index cd467090..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-license.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/wl/sys/wl_linux.c 2013-08-01 08:52:22.000000000 +0200 -+++ b/src/wl/sys/wl_linux.c 2013-09-13 14:26:42.613839899 +0200 -@@ -225,6 +225,7 @@ - - static int nompc = 0; - module_param(nompc, int, 0); -+MODULE_LICENSE("Mixed/Proprietary"); - - #ifdef quote_str - #undef quote_str diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch deleted file mode 100644 index c575f289..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch +++ /dev/null @@ -1,102 +0,0 @@ -diff -Naur bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c ---- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200 -+++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200 -@@ -3229,7 +3229,12 @@ - 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(3, 10, 0) -+ struct seq_file sfile; -+ struct seq_file *debug_buf = &sfile; -+#else - char debug_buf[512]; -+#endif - int idx; - if (wl->tkipmodops) { - if (group_key) { -@@ -3242,7 +3247,11 @@ - wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data); - else - return; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) -+ printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast"); -+#else - printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast"); -+#endif - } - #endif - } -@@ -3401,17 +3410,24 @@ - 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) -+#else -+static ssize_t -+wl_proc_read (struct file *filp, char __user *buffer, size_t length, loff_t *data) -+#endif - { - wl_info_t * wl = (wl_info_t *)data; - int bcmerror, to_user; - int len; - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) - if (offset > 0) { - *eof = 1; - return 0; - } -+#endif - - if (!length) { - WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__)); -@@ -3424,8 +3440,13 @@ - return len; - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) - static int - wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data) -+#else -+static ssize_t -+wl_proc_write (struct file *filp, const char __user *buff, size_t length, loff_t *data) -+#endif - { - wl_info_t * wl = (wl_info_t *)data; - int from_user = 0; -@@ -3455,19 +3476,34 @@ - return length; - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) -+static const struct file_operations wl_fops = { -+ .owner = THIS_MODULE, -+ .read = wl_proc_read, -+ .write = wl_proc_write, -+}; -+#endif -+ - static int - wl_reg_proc_entry(wl_info_t *wl) - { - char tmp[32]; - sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) - if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) { - WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp)); -+#else -+ if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) { -+ WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp)); -+#endif - ASSERT(0); - return -1; - } -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) - wl->proc_entry->read_proc = wl_proc_read; - wl->proc_entry->write_proc = wl_proc_write; - wl->proc_entry->data = wl; -+#endif - return 0; - } - #ifdef WLOFFLD diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-3.15.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-3.15.patch deleted file mode 100644 index 5596c0eb..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-3.15.patch +++ /dev/null @@ -1,17 +0,0 @@ -Add channel parameter to cfg80211_ibss_joined call - ---- a/src/wl/sys/wl_cfg80211_hybrid.c -+++ b/src/wl/sys/wl_cfg80211_hybrid.c -@@ -1841,7 +1841,12 @@ 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) - cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL); -+#else -+ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, -+ &wl->conf->channel, GFP_KERNEL); -+#endif - set_bit(WL_STATUS_CONNECTED, &wl->status); - wl->profile->active = true; - } diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-recent.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-recent.patch deleted file mode 100644 index 97a331a2..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.141-linux-recent.patch +++ /dev/null @@ -1,126 +0,0 @@ ---- a/src/wl/sys/wl_linux.c 2013-08-01 08:52:22.000000000 +0200 -+++ b/src/wl/sys/wl_linux.c 2013-09-13 14:25:36.463020788 +0200 -@@ -910,7 +910,11 @@ - 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, -@@ -3235,7 +3239,7 @@ - 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 +3412,7 @@ - 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 +3467,90 @@ - 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 diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-linux-3.17.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-linux-3.17.patch deleted file mode 100644 index 6ee00923..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-linux-3.17.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 5f7db08c046bd31b162a102ca868fa334a0357b9 Mon Sep 17 00:00:00 2001 -From: Michael Marineau -Date: Sat, 20 Sep 2014 12:49:43 -0700 -Subject: [PATCH] linux 3.17 - -http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c835a677331495cf137a7f8a023463afd9f032f8 ---- - 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 1622127..11c4ec2 100644 ---- a/src/wl/sys/wl_linux.c -+++ b/src/wl/sys/wl_linux.c -@@ -1308,7 +1308,11 @@ wl_alloc_linux_if(wl_if_t *wlif) - 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.8.5.5 - diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-linux-3.18.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-linux-3.18.patch deleted file mode 100644 index 4860912d..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-linux-3.18.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 5aae9ccfda6dfc680403b4a5ff9a36dcd5331dfd Mon Sep 17 00:00:00 2001 -From: Michael Marineau -Date: Tue, 11 Nov 2014 15:17:46 -0800 -Subject: [PATCH] linux 3.18 - -http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5bc8c1f2b070bab82ed738f98ecfac725e33c57f ---- - src/wl/sys/wl_cfg80211_hybrid.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c -index 514a892..e3ebef2 100644 ---- a/src/wl/sys/wl_cfg80211_hybrid.c -+++ b/src/wl/sys/wl_cfg80211_hybrid.c -@@ -2010,7 +2010,11 @@ 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); -- cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet), -+ cbss = cfg80211_inform_bss(wiphy, channel, -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0) -+ CFG80211_BSS_FTYPE_UNKNOWN, -+#endif -+ (const u8 *)(bi->BSSID.octet), - 0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int, - (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL); - --- -2.0.4 - diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch deleted file mode 100644 index 7fe63199..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r3-linux-3.15-3.18.patch +++ /dev/null @@ -1,350 +0,0 @@ ---- a/src/wl/sys/wl_cfg80211_hybrid.c 2014-06-26 12:42:08.000000000 +0200 -+++ b/src/wl/sys/wl_cfg80211_hybrid.c 2015-01-22 01:43:25.378920452 +0100 -@@ -63,8 +63,13 @@ - 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 @@ - 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 @@ - 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; -@@ -2010,9 +2021,15 @@ - - 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; -@@ -2071,7 +2088,26 @@ - 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; - } -@@ -2629,7 +2665,15 @@ - - void wl_cfg80211_detach(struct net_device *ndev) - { -- struct wl_cfg80211_priv *wl = ndev_to_wl(ndev); -+ struct wl_cfg80211_priv *wl; -+ struct wireless_dev *wdev; -+ -+ wdev = ndev->ieee80211_ptr; -+ if (wdev == NULL) { -+ printk(KERN_ERR "[%s()] in ndev=%p: IEEE80211ptr=%p\n", __FUNCTION__, ndev, wdev); -+ return; -+ } -+ wl = ndev_to_wl(ndev); - - wl_deinit_cfg80211_priv(wl); - wl_free_wdev(wl); ---- a/src/wl/sys/wl_dbg.h 2014-06-26 12:42:08.000000000 +0200 -+++ b/src/wl/sys/wl_dbg.h 2015-01-22 01:43:25.379920462 +0100 -@@ -55,10 +55,12 @@ - - #define WL_NONE(args) - -+#define FORCE_TRACE_LEVEL(fmt, ...) do { printk(KERN_ERR fmt, ## __VA_ARGS__); } while (0) /* ## is GCC specific syntax to remove comma when single arg */ -+ - #ifdef BCMDBG_ERR - #define WL_ERROR(args) WL_PRINT(args) - #else --#define WL_ERROR(args) -+#define WL_ERROR(args) FORCE_TRACE_LEVEL args - #endif - #define WL_TRACE(args) - #define WL_APSTA_UPDN(args) ---- a/src/wl/sys/wl_linux.c 2014-06-26 12:42:08.000000000 +0200 -+++ b/src/wl/sys/wl_linux.c 2015-01-22 01:44:58.580453805 +0100 -@@ -878,7 +878,7 @@ - static SIMPLE_DEV_PM_OPS(wl_pm_ops, wl_suspend, wl_resume); - #endif - --static struct pci_driver wl_pci_driver = { -+static struct pci_driver wl_pci_driver __refdata = { - .name = "wl", - .probe = wl_pci_probe, - .remove = __devexit_p(wl_remove), -@@ -1270,6 +1270,7 @@ - MFREE(wl->osh, wlif->dev, sizeof(struct net_device)); - #else - free_netdev(wlif->dev); -+ wlif->dev = NULL; - #endif - } - -@@ -1307,7 +1308,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__)); -@@ -1651,11 +1657,7 @@ - } - - WL_LOCK(wl); -- if (!capable(CAP_NET_ADMIN)) { -- bcmerror = BCME_EPERM; -- } else { -- bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif); -- } -+ bcmerror = wlc_ioctl(wl->wlc, ioc.cmd, buf, ioc.len, wlif->wlcif); - WL_UNLOCK(wl); - - done1: -@@ -2157,8 +2159,8 @@ - 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); - -@@ -2455,8 +2457,10 @@ - p80211msg_t *phdr; - - len = sizeof(p80211msg_t) + oskb->len - D11_PHY_HDR_LEN; -- if ((skb = dev_alloc_skb(len)) == NULL) -+ if ((skb = dev_alloc_skb(len)) == NULL) { -+ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__)); - return; -+ } - - skb_put(skb, len); - phdr = (p80211msg_t*)skb->data; -@@ -2535,8 +2539,10 @@ - rtap_len = sizeof(wl_radiotap_ht_brcm_2_t); - - len = rtap_len + (oskb->len - D11_PHY_HDR_LEN); -- if ((skb = dev_alloc_skb(len)) == NULL) -+ if ((skb = dev_alloc_skb(len)) == NULL) { -+ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__)); - return; -+ } - - skb_put(skb, len); - -@@ -2664,8 +2670,10 @@ - len += amsdu_len; - } - -- if ((skb = dev_alloc_skb(len)) == NULL) -+ if ((skb = dev_alloc_skb(len)) == NULL) { -+ WL_ERROR(("in %s:%d [%s()] dev_alloc_skb() failure!", __FILE__, __LINE__, __FUNCTION__)); - return; -+ } - - skb_put(skb, len); - -@@ -2990,7 +2998,7 @@ - } - - void --wl_set_monitor(wl_info_t *wl, int val) -+wl_set_monitor(wl_info_t *wl, int val) /* public => is called by wlc_hybrid.o_shipped */ - { - const char *devname; - wl_if_t *wlif; -@@ -3224,42 +3232,75 @@ - #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) -+{ -+ wl_info_t * wl = (wl_info_t *)data; - #else - static ssize_t --wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *data) --#endif -+wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp) - { -- wl_info_t * wl = (wl_info_t *)data; -- int to_user; -- int len; -+ wl_info_t * wl = PDE_DATA(file_inode(filp)); -+#endif -+ int bcmerror, len; -+ int to_user = 0; -+ char tmp[8]; - - #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) - if (offset > 0) { - *eof = 1; - return 0; - } -+#else -+ if (*offp > 0) { /* for example, stop: cat /proc/brcm_monitor0 */ -+ return 0; /* 0 <=> EOF */ -+ } - #endif - -- if (!length) { -- WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__)); -- return 0; -- } - WL_LOCK(wl); -- wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL); -- len = sprintf(buffer, "%d\n", to_user); -- WL_UNLOCK(wl); -- return len; -+ bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL); -+ WL_UNLOCK(wl); -+ -+ if (bcmerror != BCME_OK) { -+ WL_ERROR(("%s: GET_MONITOR failed with %d\n", __FUNCTION__, bcmerror)); -+ return -EIO; -+ } -+ -+ len = snprintf(tmp, ARRAY_SIZE(tmp), "%d\n", to_user); -+ tmp[ARRAY_SIZE(tmp) - 1] = '\0'; -+ if (len >= ARRAY_SIZE(tmp)) { -+ printk(KERN_ERR "%s:%d [%s()] output would be truncated (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len); -+ return -ERANGE; -+ } -+ else if (len < 0) { -+ printk(KERN_ERR "%s:%d [%s()] unable to convert value (ret=%d)!", __FILE__, __LINE__, __FUNCTION__, len); -+ return len; -+ } -+ if (length < len) { -+ printk(KERN_ERR "%s:%d [%s()] user buffer is too small (at least=%d ; user=%d)!", __FILE__, __LINE__, __FUNCTION__, len, (int)length); -+ return -EMSGSIZE; -+ } -+ if (copy_to_user(buffer, tmp, len) != 0) { -+ printk(KERN_ERR "%s:%d [%s()] unable to copy data!", __FILE__, __LINE__, __FUNCTION__); -+ return -EFAULT; -+ } -+ -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) -+ *offp += len; -+#endif -+ -+ return len; - } - - #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) - static int - wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data) -+{ -+ wl_info_t * wl = (wl_info_t *)data; - #else - static ssize_t --wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *data) --#endif -+wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp) - { -- wl_info_t * wl = (wl_info_t *)data; -+ wl_info_t * wl = PDE_DATA(file_inode(filp)); -+#endif - int from_user = 0; - int bcmerror; - -@@ -3270,7 +3311,11 @@ - } - if (copy_from_user(&from_user, buff, 1)) { - WL_ERROR(("%s: copy from user failed\n", __FUNCTION__)); -- return -EIO; -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) -+ return -EIO; -+#else -+ return -EFAULT; -+#endif - } - - if (from_user >= 0x30) -@@ -3280,10 +3325,15 @@ - bcmerror = wlc_ioctl(wl->wlc, WLC_SET_MONITOR, &from_user, sizeof(int), NULL); - WL_UNLOCK(wl); - -- if (bcmerror < 0) { -+ if (bcmerror != BCME_OK) { - WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror)); - return -EIO; - } -+ -+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)) && 0 /* no need to update offset because this file should only trigger action... */ -+ *offp += length; -+#endif -+ - return length; - } - -@@ -3304,8 +3354,8 @@ - if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) { - WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp)); - #else -- if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) { -- WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp)); -+ if ((wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) { -+ WL_ERROR(("%s: proc_create_data %s failed\n", __FUNCTION__, tmp)); - #endif - ASSERT(0); - return -1; diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch deleted file mode 100644 index 6d18c19b..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r3-linux-4.0.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- src/wl/sys/wl_cfg80211_hybrid.c.orig 2015-04-27 11:08:10.252439465 +0000 -+++ src/wl/sys/wl_cfg80211_hybrid.c 2015-04-27 11:10:52.454433122 +0000 -@@ -1441,7 +1441,11 @@ wl_cfg80211_get_station(struct wiphy *wi - 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))); - } -@@ -1454,7 +1458,11 @@ wl_cfg80211_get_station(struct wiphy *wi - 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)); - } diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r4-linux-4.2.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r4-linux-4.2.patch deleted file mode 100644 index 9e9f8a15..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.248-r4-linux-4.2.patch +++ /dev/null @@ -1,16 +0,0 @@ -diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c -index ea0726f..1541dad 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, false, GFP_KERNEL); -+#else - cfg80211_disconnected(ndev, 0, NULL, 0, GFP_KERNEL); -+#endif - clear_bit(WL_STATUS_CONNECTED, &wl->status); - wl_link_down(wl); - wl_init_prof(wl->profile); diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.271-r2-linux-4.3.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.271-r2-linux-4.3.patch deleted file mode 100644 index 7869dbf6..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.271-r2-linux-4.3.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -ruN a/src/shared/linux_osl.c b/src/shared/linux_osl.c ---- a/src/shared/linux_osl.c 2015-11-26 12:16:23.343091098 -0800 -+++ b/src/shared/linux_osl.c 2015-11-26 12:17:08.657092739 -0800 -@@ -932,7 +932,7 @@ - uint cycles; - - #if defined(__i386__) -- rdtscl(cycles); -+ cycles = (u32)native_read_tsc(); - #else - cycles = 0; - #endif diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch new file mode 100644 index 00000000..91c4d895 --- /dev/null +++ b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.271-r4-linux-4.15.patch @@ -0,0 +1,63 @@ +diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c +index 489c9f5..f8278ad 100644 +--- a/src/wl/sys/wl_linux.c ++++ b/src/wl/sys/wl_linux.c +@@ -93,7 +93,11 @@ + + #include + ++#ifdef HAVE_TIMER_SETUP ++static void wl_timer(struct timer_list *list); ++#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); + +@@ -2296,12 +2300,17 @@ + + atomic_dec(&t->wl->callbacks); + } +- ++#ifdef HAVE_TIMER_SETUP ++static void ++wl_timer(struct timer_list *list) ++{ ++ wl_timer_t *t = from_timer(t,list,timer); ++#else + static void + wl_timer(ulong data) + { + wl_timer_t *t = (wl_timer_t *)data; +- ++#endif + if (!WL_ALL_PASSIVE_ENAB(t->wl)) + _wl_timer(t); + else +@@ -2351,10 +2360,13 @@ + } + + bzero(t, sizeof(wl_timer_t)); +- ++#ifdef HAVE_TIMER_SETUP ++ 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; +diff --git a/src/wl/sys/wl_linux.h b/src/wl/sys/wl_linux.h +index 489c9f5..f8278ad 100644 +--- a/src/wl/sys/wl_linux.h ++++ b/src/wl/sys/wl_linux.h +@@ -190,3 +190,7 @@ + extern struct net_device * wl_netdev_get(wl_info_t *wl); + + #endif ++ ++#if defined(timer_setup) && defined(from_timer) ++#define HAVE_TIMER_SETUP ++#endif diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch deleted file mode 100644 index c575f289..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-linux-3.10.0.patch +++ /dev/null @@ -1,102 +0,0 @@ -diff -Naur bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c ---- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200 -+++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200 -@@ -3229,7 +3229,12 @@ - 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(3, 10, 0) -+ struct seq_file sfile; -+ struct seq_file *debug_buf = &sfile; -+#else - char debug_buf[512]; -+#endif - int idx; - if (wl->tkipmodops) { - if (group_key) { -@@ -3242,7 +3247,11 @@ - wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data); - else - return; -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) -+ printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast"); -+#else - printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast"); -+#endif - } - #endif - } -@@ -3401,17 +3410,24 @@ - 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) -+#else -+static ssize_t -+wl_proc_read (struct file *filp, char __user *buffer, size_t length, loff_t *data) -+#endif - { - wl_info_t * wl = (wl_info_t *)data; - int bcmerror, to_user; - int len; - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) - if (offset > 0) { - *eof = 1; - return 0; - } -+#endif - - if (!length) { - WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__)); -@@ -3424,8 +3440,13 @@ - return len; - } - -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) - static int - wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data) -+#else -+static ssize_t -+wl_proc_write (struct file *filp, const char __user *buff, size_t length, loff_t *data) -+#endif - { - wl_info_t * wl = (wl_info_t *)data; - int from_user = 0; -@@ -3455,19 +3476,34 @@ - return length; - } - -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0) -+static const struct file_operations wl_fops = { -+ .owner = THIS_MODULE, -+ .read = wl_proc_read, -+ .write = wl_proc_write, -+}; -+#endif -+ - static int - wl_reg_proc_entry(wl_info_t *wl) - { - char tmp[32]; - sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit); -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) - if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) { - WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp)); -+#else -+ if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) { -+ WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp)); -+#endif - ASSERT(0); - return -1; - } -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0) - wl->proc_entry->read_proc = wl_proc_read; - wl->proc_entry->write_proc = wl_proc_write; - wl->proc_entry->data = wl; -+#endif - return 0; - } - #ifdef WLOFFLD diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch deleted file mode 100644 index a6e3d3d1..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-linux-3.9.0.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- src.orig/wl/sys/wl_cfg80211_hybrid.c -+++ src/wl/sys/wl_cfg80211_hybrid.c -@@ -2013,8 +2013,12 @@ - ie_len = (size_t)(ies->len); - rcu_read_unlock(); - #endif -- cfg80211_put_bss(bss); -- } -+#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); - if (tim) { diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-makefile.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-makefile.patch deleted file mode 100644 index 09c495d2..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-6.30.223.30-makefile.patch +++ /dev/null @@ -1,14 +0,0 @@ ---- Makefile.old 2013-04-28 22:42:59.000000000 +0200 -+++ Makefile 2013-04-28 22:45:53.000000000 +0200 -@@ -128,9 +128,9 @@ - - EXTRA_LDFLAGS := $(src)/lib/wlc_hybrid.o_shipped - --KBASE ?= /lib/modules/`uname -r` -+KBASE ?= /lib/modules/${KV_FULL} - KBUILD_DIR ?= $(KBASE)/build --MDEST_DIR ?= $(KBASE)/kernel/drivers/net/wireless -+MDEST_DIR ?= ${D}$(KBASE)/kernel/drivers/net/wireless - - all: - KBUILD_NOPEDANTIC=1 make -C $(KBUILD_DIR) M=`pwd` diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-dkms-6.30.223.30-conf.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-dkms-6.30.223.30-conf.patch deleted file mode 100644 index 1e09637f..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-dkms-6.30.223.30-conf.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -Nur a/kernel/dkms.conf b/kernel/dkms.conf ---- a/kernel/dkms.conf 2016-09-02 02:32:09.000000000 +0100 -+++ b/kernel/dkms.conf 2016-10-23 17:36:01.946597121 +0100 -@@ -1,12 +1,20 @@ --PACKAGE_NAME="broadcom-sta" --PACKAGE_VERSION="__VERSION_STRING" -+PACKAGE_NAME="broadcom-sta-dkms" -+PACKAGE_VERSION="6.30.223.30" - AUTOINSTALL="yes" - - # By default, DKMS will add KERNELRELEASE to the make command line; however, - # this will cause the kernel module build to infer that it was invoked via - # Kbuild directly instead of DKMS. The dkms(8) manual page recommends quoting - # the 'make' command name to suppress this behavior. --MAKE[0]="'make' -j__JOBS NV_EXCLUDE_BUILD_MODULES='__EXCLUDE_MODULES' KERNEL_UNAME=${kernelver} modules" -+MAKE[0]="'make' -j`nproc` NV_EXCLUDE_BUILD_MODULES='__EXCLUDE_MODULES' KERNEL_UNAME=${kernelver} modules" - - # The list of kernel modules will be generated by nvidia-installer at runtime. --__DKMS_MODULES -+BUILT_MODULE_NAME[0]="wl" -+DEST_MODULE_LOCATION[0]="/kernel/net/video" -+ diff --git a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-dkms-6.30.223.30.patch b/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-dkms-6.30.223.30.patch deleted file mode 100644 index 260337a6..00000000 --- a/sys-kernel/broadcom-sta-dkms/files/broadcom-sta-dkms-6.30.223.30.patch +++ /dev/null @@ -1,16 +0,0 @@ ---- a/kernel/dkms.conf 2016-10-24 01:00:27.259770140 +0300 -+++ b/kernel/dkms.conf 2016-10-24 01:00:30.057770215 +0300 -@@ -1,10 +1,10 @@ --PACKAGE_NAME="bcmwl" --PACKAGE_VERSION="6.30.223.30+bdcom" -+PACKAGE_NAME="broadcom-sta-dkms" -+PACKAGE_VERSION="6.30.223.30" - 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" -+DEST_MODULE_LOCATION[0]="/kernel/net/wireless" - PATCH[0]="0001-MODULE_LICENSE.patch" - PATCH[1]="0002-Makefile.patch" - PATCH[2]="0003-Make-up-for-missing-init_MUTEX.patch" -- cgit v1.2.3