From d54f8d4adc3a16940d43e04e1cfce1e56c8caf03 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 12 Oct 2022 16:12:42 +0100 Subject: sys-kernel/broadcom-sta-dkms : revision bump --- .../sys-kernel/broadcom-sta-dkms-6.30.223.271-r6 | 14 +++++ .../broadcom-sta-dkms-6.30.223.271-r6.ebuild | 54 ++++++++++++++++ .../broadcom-sta-dkms/files/date-time-error.patch | 21 +++++++ sys-kernel/broadcom-sta-dkms/files/date-time.patch | 11 ++++ .../broadcom-sta-dkms/files/eth-to-wlan.patch | 12 ++++ sys-kernel/broadcom-sta-dkms/files/gcc.patch | 11 ++++ .../broadcom-sta-dkms/files/kernel-5.17.patch | 20 ++++++ .../broadcom-sta-dkms/files/kernel-5.18.patch | 71 ++++++++++++++++++++++ sys-kernel/broadcom-sta-dkms/files/makefile.patch | 14 +++++ 9 files changed, 228 insertions(+) create mode 100644 metadata/md5-cache/sys-kernel/broadcom-sta-dkms-6.30.223.271-r6 create mode 100644 sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r6.ebuild create mode 100644 sys-kernel/broadcom-sta-dkms/files/date-time-error.patch create mode 100644 sys-kernel/broadcom-sta-dkms/files/date-time.patch create mode 100644 sys-kernel/broadcom-sta-dkms/files/eth-to-wlan.patch create mode 100644 sys-kernel/broadcom-sta-dkms/files/gcc.patch create mode 100644 sys-kernel/broadcom-sta-dkms/files/kernel-5.17.patch create mode 100644 sys-kernel/broadcom-sta-dkms/files/kernel-5.18.patch create mode 100644 sys-kernel/broadcom-sta-dkms/files/makefile.patch diff --git a/metadata/md5-cache/sys-kernel/broadcom-sta-dkms-6.30.223.271-r6 b/metadata/md5-cache/sys-kernel/broadcom-sta-dkms-6.30.223.271-r6 new file mode 100644 index 00000000..723040fb --- /dev/null +++ b/metadata/md5-cache/sys-kernel/broadcom-sta-dkms-6.30.223.271-r6 @@ -0,0 +1,14 @@ +DEFINED_PHASES=compile install postinst prerm +DEPEND=sys-kernel/dkms +DESCRIPTION=Broadcom's IEEE 802.11a/b/g/n hybrid Linux device driver source +EAPI=6 +HOMEPAGE=http://www.broadcom.com/support/802.11/ +INHERIT=eutils +KEYWORDS=amd64 +LICENSE=Broadcom +RDEPEND=sys-kernel/dkms +RESTRICT=mirror +SLOT=0 +SRC_URI=amd64? ( http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz ) +_eclasses_=desktop 22952d8f27cac191d75529d4c38e6bfa edos2unix 33e347e171066657f91f8b0c72ec8773 epatch 447396341f5f896d722e435a06f87a4f eqawarn c9847c43b3253a276ae2eabddedab3d7 estack 055c42df72f76a4f45ec92b35e83cd56 eutils 8f942ebdcf04334697649d4a0bf65a32 ltprune 97143780d341cc8d8f1d4c6187a36d29 multilib 5ca4e49abed8e3a2f7b56920eadee157 preserve-libs a8e50acee31b5759b4df1f7707cae54b strip-linguas ac3ee41ee2d31d8c41a77c0838320cc7 toolchain-funcs 441f754fd75cd4fd1fa06fbc17da6144 vcs-clean d271b7bc7e6a009758d7d4ef749174e3 wrapper 4a1902f969e5718126434fc35f3a0d9c +_md5_=0fac8c4bb2334cdf11cc8be600a1343e diff --git a/sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r6.ebuild b/sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r6.ebuild new file mode 100644 index 00000000..4f2e01a3 --- /dev/null +++ b/sys-kernel/broadcom-sta-dkms/broadcom-sta-dkms-6.30.223.271-r6.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 +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 )" + +LICENSE="Broadcom" +KEYWORDS="amd64" +SLOT="0" +RESTRICT="mirror" + +DEPEND="sys-kernel/dkms" +RDEPEND="${DEPEND}" + +PATCHES=( + "${FILESDIR}"/makefile.patch + "${FILESDIR}"/eth-to-wlan.patch + "${FILESDIR}"/gcc.patch + "${FILESDIR}"/date-time.patch + "${FILESDIR}"/date-time-error.patch + "${FILESDIR}"/kernel-4.7-to-kernel-5.10.patch + "${FILESDIR}"/kernel-5.17.patch + "${FILESDIR}"/kernel-5.18.patch +) + +S="${WORKDIR}" + +src_compile(){ + : +} + +src_install() { + dodir usr/src/${P} + insinto usr/src/${P} + doins -r "${S}"/* + doins "${FILESDIR}"/dkms.conf + dodir etc/modprobe.d + insinto etc/modprobe.d + doins "${FILESDIR}"/"${PN}".conf +} + +pkg_postinst() { + dkms add ${PN}/${PV} +} + +pkg_prerm() { + dkms remove ${PN}/${PV} --all +} diff --git a/sys-kernel/broadcom-sta-dkms/files/date-time-error.patch b/sys-kernel/broadcom-sta-dkms/files/date-time-error.patch new file mode 100644 index 00000000..c0e57f43 --- /dev/null +++ b/sys-kernel/broadcom-sta-dkms/files/date-time-error.patch @@ -0,0 +1,21 @@ +--- a/src/wl/sys/wl_linux.c 2015-09-19 00:47:30.000000000 +0200 ++++ b/src/wl/sys/wl_linux.c 2022-08-02 10:16:25.059062466 +0200 +@@ -724,7 +724,7 @@ + WL_ALL_PASSIVE_ENAB(wl) ? ", Passive Mode" : "", EPI_VERSION_STR); + + #ifdef BCMDBG +- printf(" (Compiled in " SRCBASE " at " __TIME__ " on " __DATE__ ")"); ++ printf(" (Compiled in " SRCBASE ")"); + #endif + printf("\n"); + +@@ -2053,8 +2053,7 @@ + void + wl_dump_ver(wl_info_t *wl, struct bcmstrbuf *b) + { +- bcm_bprintf(b, "wl%d: %s %s version %s\n", wl->pub->unit, +- __DATE__, __TIME__, EPI_VERSION_STR); ++ bcm_bprintf(b, "wl%d: version %s\n", wl->pub->unit, EPI_VERSION_STR); + } + + #if defined(BCMDBG) diff --git a/sys-kernel/broadcom-sta-dkms/files/date-time.patch b/sys-kernel/broadcom-sta-dkms/files/date-time.patch new file mode 100644 index 00000000..f93e3f1d --- /dev/null +++ b/sys-kernel/broadcom-sta-dkms/files/date-time.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 +@@ -126,6 +126,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 + + KBASE ?= /lib/modules/`uname -r` diff --git a/sys-kernel/broadcom-sta-dkms/files/eth-to-wlan.patch b/sys-kernel/broadcom-sta-dkms/files/eth-to-wlan.patch new file mode 100644 index 00000000..b23914a0 --- /dev/null +++ b/sys-kernel/broadcom-sta-dkms/files/eth-to-wlan.patch @@ -0,0 +1,12 @@ +diff -urN a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c +--- a/src/wl/sys/wl_linux.c 2013-08-01 09:52:22.000000000 +0300 ++++ b/src/wl/sys/wl_linux.c 2013-09-27 09:20:11.495023471 +0300 +@@ -235,7 +235,7 @@ + #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); + diff --git a/sys-kernel/broadcom-sta-dkms/files/gcc.patch b/sys-kernel/broadcom-sta-dkms/files/gcc.patch new file mode 100644 index 00000000..b5d7e858 --- /dev/null +++ b/sys-kernel/broadcom-sta-dkms/files/gcc.patch @@ -0,0 +1,11 @@ +diff -urN a/src/wl/sys/wl_iw.h b/src/wl/sys/wl_iw.h +--- a/src/wl/sys/wl_iw.h 2013-08-01 09:52:22.000000000 +0300 ++++ b/src/wl/sys/wl_iw.h 2013-09-27 09:36:07.808067913 +0300 +@@ -21,6 +21,7 @@ + #ifndef _wl_iw_h_ + #define _wl_iw_h_ + ++#include + #include + + #include diff --git a/sys-kernel/broadcom-sta-dkms/files/kernel-5.17.patch b/sys-kernel/broadcom-sta-dkms/files/kernel-5.17.patch new file mode 100644 index 00000000..3407c4ec --- /dev/null +++ b/sys-kernel/broadcom-sta-dkms/files/kernel-5.17.patch @@ -0,0 +1,20 @@ +--- a/src/wl/sys/wl_linux.c 2015-09-19 00:47:30.000000000 +0200 ++++ b/src/wl/sys/wl_linux.c 2022-03-22 10:39:20.763751076 +0100 +@@ -3244,7 +3244,7 @@ + static ssize_t + wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp) + { +- wl_info_t * wl = PDE_DATA(file_inode(filp)); ++ wl_info_t * wl = pde_data(file_inode(filp)); + #endif + int bcmerror, len; + int to_user = 0; +@@ -3301,7 +3301,7 @@ + static ssize_t + wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp) + { +- wl_info_t * wl = PDE_DATA(file_inode(filp)); ++ wl_info_t * wl = pde_data(file_inode(filp)); + #endif + int from_user = 0; + int bcmerror; diff --git a/sys-kernel/broadcom-sta-dkms/files/kernel-5.18.patch b/sys-kernel/broadcom-sta-dkms/files/kernel-5.18.patch new file mode 100644 index 00000000..d837429a --- /dev/null +++ b/sys-kernel/broadcom-sta-dkms/files/kernel-5.18.patch @@ -0,0 +1,71 @@ +diff -u -r a/src/shared/linux_osl.c b/src/shared/linux_osl.c +--- a/src/shared/linux_osl.c 2022-05-24 20:51:15.662604980 +0000 ++++ b/src/shared/linux_osl.c 2022-05-24 21:13:38.264472425 +0000 +@@ -599,6 +599,8 @@ + va = kmalloc(size, GFP_ATOMIC | __GFP_ZERO); + if (va) + *pap = (ulong)__virt_to_phys(va); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ va = dma_alloc_coherent(&((struct pci_dev *)osh->pdev)->dev, size, (dma_addr_t*)pap, GFP_ATOMIC); + #else + va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap); + #endif +@@ -612,6 +614,8 @@ + + #ifdef __ARM_ARCH_7A__ + kfree(va); ++#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ dma_free_coherent(&((struct pci_dev *)osh->pdev)->dev, size, va, (dma_addr_t)pa); + #else + pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa); + #endif +@@ -623,7 +627,11 @@ + int dir; + + ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ dir = (direction == DMA_TX)? DMA_TO_DEVICE: DMA_FROM_DEVICE; ++#else + dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; ++#endif + + #if defined(__ARM_ARCH_7A__) && defined(BCMDMASGLISTOSL) + if (dmah != NULL) { +@@ -641,7 +649,11 @@ + ASSERT(totsegs + nsegs <= MAX_DMA_SEGS); + sg->page_link = 0; + sg_set_buf(sg, PKTDATA(osh, skb), PKTLEN(osh, skb)); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ dma_map_single(&((struct pci_dev *)osh->pdev)->dev, PKTDATA(osh, skb), PKTLEN(osh, skb), dir); ++#else + pci_map_single(osh->pdev, PKTDATA(osh, skb), PKTLEN(osh, skb), dir); ++#endif + } + totsegs += nsegs; + totlen += PKTLEN(osh, skb); +@@ -656,7 +668,11 @@ + } + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ return (dma_map_single(&((struct pci_dev *)osh->pdev)->dev, va, size, dir)); ++#else + return (pci_map_single(osh->pdev, va, size, dir)); ++#endif + } + + void BCMFASTPATH +@@ -665,8 +681,13 @@ + int dir; + + ASSERT((osh && (osh->magic == OS_HANDLE_MAGIC))); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ dir = (direction == DMA_TX)? DMA_TO_DEVICE: DMA_FROM_DEVICE; ++ dma_unmap_single(&((struct pci_dev *)osh->pdev)->dev, (uint32)pa, size, dir); ++#else + dir = (direction == DMA_TX)? PCI_DMA_TODEVICE: PCI_DMA_FROMDEVICE; + pci_unmap_single(osh->pdev, (uint32)pa, size, dir); ++#endif + } + + #if defined(BCMDBG_ASSERT) diff --git a/sys-kernel/broadcom-sta-dkms/files/makefile.patch b/sys-kernel/broadcom-sta-dkms/files/makefile.patch new file mode 100644 index 00000000..d5b97fe8 --- /dev/null +++ b/sys-kernel/broadcom-sta-dkms/files/makefile.patch @@ -0,0 +1,14 @@ +--- a/Makefile 2013-04-28 22:42:59.000000000 +0200 ++++ b/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` -- cgit v1.2.3