Projects
Essentials
broadcom-wl
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 16
View file
broadcom-wl.changes
Changed
@@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Tue Apr 5 14:40:42 UTC 2022 - manfred.h@gmx.net + +- Add broadcom-wl.linux-5.18.patch as Patch20; this is based on + <https://gist.github.com/joanbm/052d8e951ba63d5eb5b6960bfe4e031a> + +------------------------------------------------------------------- Mon Jan 24 14:52:41 UTC 2022 - manfred.h@gmx.net - Add broadcom-wl.linux-5.17.patch as Patch19
View file
broadcom-wl.spec
Changed
@@ -50,6 +50,7 @@ Patch17: broadcom-wl.linux-5.6.patch Patch18: broadcom-wl.linux-5.9.patch Patch19: broadcom-wl.linux-5.17.patch +Patch20: broadcom-wl.linux-5.18.patch %if %{defined kernel_module_package_buildreqs} BuildRequires: %{kernel_module_package_buildreqs} %endif
View file
broadcom-wl.linux-5.17.patch
Changed
@@ -1,16 +1,14 @@ -diff -rcp broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_linux.c broadcom-wl-6.30.223.271/src/wl/sys/wl_linux.c -*** broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_linux.c Mon Jan 24 15:47:49 2022 ---- broadcom-wl-6.30.223.271/src/wl/sys/wl_linux.c Mon Jan 24 15:50:39 2022 -*************** struct iw_statistics *wl_get_wireless_st -*** 87,92 **** ---- 87,96 ---- - - #include <wl_linux.h> - -+ #if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) -+ #define PDE_DATA pde_data -+ #endif -+ - #if defined(USE_CFG80211) - #include <wl_cfg80211_hybrid.h> - #endif +diff -rup broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_linux.c broadcom-wl-6.30.223.271/src/wl/sys/wl_linux.c +--- broadcom-wl-6.30.223.271.orig/src/wl/sys/wl_linux.c 2022-04-05 13:57:19.093984907 +0200 ++++ broadcom-wl-6.30.223.271/src/wl/sys/wl_linux.c 2022-04-05 13:56:58.757993155 +0200 +@@ -93,6 +93,10 @@ struct iw_statistics *wl_get_wireless_st + + #include <wlc_wowl.h> + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) ++#define PDE_DATA pde_data ++#endif ++ + static void wl_timer( + #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) + struct timer_list *tl
View file
broadcom-wl.linux-5.18.patch
Added
@@ -0,0 +1,101 @@ +diff -rup broadcom-wl-6.30.223.271.orig/src/shared/linux_osl.c broadcom-wl-6.30.223.271/src/shared/linux_osl.c +--- broadcom-wl-6.30.223.271.orig/src/shared/linux_osl.c 2022-04-05 16:28:53.848341440 +0200 ++++ broadcom-wl-6.30.223.271/src/shared/linux_osl.c 2022-04-05 16:35:27.128100434 +0200 +@@ -48,7 +48,11 @@ typedef struct bcm_mem_link { + struct osl_info { + osl_pubinfo_t pub; + uint magic; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ struct pci_dev *pdev; ++#else + void *pdev; ++#endif + atomic_t malloced; + atomic_t pktalloced; + uint failed; +@@ -600,8 +604,12 @@ osl_dma_alloc_consistent(osl_t *osh, uin + if (va) + *pap = (ulong)__virt_to_phys(va); + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ va = dma_alloc_coherent(&osh->pdev->dev, size, (dma_addr_t *)pap, GFP_ATOMIC); ++#else + va = pci_alloc_consistent(osh->pdev, size, (dma_addr_t*)pap); + #endif ++#endif + return va; + } + +@@ -613,8 +621,12 @@ osl_dma_free_consistent(osl_t *osh, void + #ifdef __ARM_ARCH_7A__ + kfree(va); + #else ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ dma_free_coherent(&osh->pdev->dev, size, va, (dma_addr_t)pa); ++#else + pci_free_consistent(osh->pdev, size, va, (dma_addr_t)pa); + #endif ++#endif + } + + uint BCMFASTPATH +@@ -623,7 +635,11 @@ osl_dma_map(osl_t *osh, void *va, uint s + 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) { +@@ -635,13 +651,21 @@ osl_dma_map(osl_t *osh, void *va, uint s + if (skb_is_nonlinear(skb)) { + nsegs = skb_to_sgvec(skb, sg, 0, PKTLEN(osh, skb)); + ASSERT((nsegs > 0) && (totsegs + nsegs <= MAX_DMA_SEGS)); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ dma_map_sg(&osh->pdev->dev, sg, nsegs, dir); ++#else + pci_map_sg(osh->pdev, sg, nsegs, dir); ++#endif + } else { + nsegs = 1; + 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(&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 +680,11 @@ osl_dma_map(osl_t *osh, void *va, uint s + } + #endif + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 18, 0) ++ return (dma_map_single(&osh->pdev->dev, va, size, dir)); ++#else + return (pci_map_single(osh->pdev, va, size, dir)); ++#endif + } + + void BCMFASTPATH +@@ -665,8 +693,13 @@ osl_dma_unmap(osl_t *osh, uint pa, uint + 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(&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)
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.