Projects
Essentials
broadcom-wl
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 19
View file
broadcom-wl.changes
Changed
@@ -1,4 +1,13 @@ ------------------------------------------------------------------- +Wed Nov 22 2023 - Stephan Hemeier <Sauerlandlinux@gmx.de> + +- Add broadcom-wl-linux-6.5.patch +- Add broadcom-sta-6.30.223.271-Fix-mac-address-setting.patch +- Add broadcom-sta-6.30.223.271-Fix-fall-through-warnings.patch +- Add isprint.patch +- Add ueficert to work with secure boot + +------------------------------------------------------------------- Wed Nov 9 11:43:18 UTC 2022 - manfred.h@gmx.net - Fix Url for the original driver package
View file
broadcom-wl.spec
Changed
@@ -2,7 +2,7 @@ # # spec file for package broadcom-wl # -# Copyright (c) 2017-2022 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017-2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,7 +15,8 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # - +# norootforbuild +# needssslcertforbuild #!BuildIgnore: enough-build-resources %define underversion 6_30_223_271 @@ -30,7 +31,7 @@ Summary: Wireless driver for Broadcom 43xx series of chips License: SUSE-NonFree Group: System/Kernel -Url: http://www.broadcom.com/site-search?filterspagescontent_typetype=and&filterspagescontent_typevalues=Downloads&page=1&per_page=10&q=802.11%20linux%20sta%20wireless%20driver +Url: https://www.broadcom.com/site-search?filterspagescontent_typetype=and&filterspagescontent_typevalues=Downloads&page=1&per_page=10&q=802.11%20linux%20sta%20wireless%20driver Source0: hybrid-v35%{driverarch}-nodebug-pcoem-%{underversion}.tar.gz Source1: README.SUSE Source2: broadcom-wl-blacklist @@ -42,6 +43,9 @@ Patch5: broadcom-sta-6.30.223.271-r2-linux-4.3-v2.patch Patch6: broadcom-sta-6.30.223.271-r4-linux-4.7.patch Patch7: broadcom-sta-6.30.223.271-r4-linux-4.8.patch +Patch8: isprint.patch +Patch9: broadcom-sta-6.30.223.271-Fix-fall-through-warnings.patch +Patch10: broadcom-sta-6.30.223.271-Fix-mac-address-setting.patch Patch11: broadcom-wl.linux-4.11.patch Patch12: broadcom-wl.linux-4.12.patch Patch14: broadcom-wl.linux-4.14.patch @@ -53,9 +57,20 @@ Patch20: broadcom-wl.linux-5.18.patch Patch21: broadcom-wl.linux-6.0.patch Patch22: broadcom-wl.linux-6.1.patch +Patch23: broadcom-wl.linux-6.5.patch + %if %{defined kernel_module_package_buildreqs} BuildRequires: %{kernel_module_package_buildreqs} %endif + +%if 0%{?sle_version} >= 150400 +BuildRequires: kernel-syms-rt +%endif + +%if 0%{?suse_version} > 1500 +BuildRequires: suse-module-tools-scriptlets +%endif + %ifarch x86_64 %if 0%{?suse_version} >= 1210 BuildRequires: libelf-devel @@ -66,7 +81,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build ExclusiveArch: %{ix86} x86_64 %if %{defined kernel_module_package} -%kernel_module_package +%kernel_module_package -n broadcom-wl -x debug -x trace -c %_sourcedir/_projectcert.crt -p %_sourcedir/preamble %endif %description @@ -116,6 +131,8 @@ # Kernel module export INSTALL_MOD_PATH=%{buildroot} export INSTALL_MOD_DIR=updates +export BRP_PESIGN_FILES='*.ko' +export BRP_PESIGN_COMPRESS_MODULE="xz" for flavor in %{flavors_to_build}; do make -C %{_prefix}/src/linux-obj/%{_target_cpu}/$flavor modules_install \ M=$PWD/obj/$flavor
View file
broadcom-sta-6.30.223.271-Fix-fall-through-warnings.patch
Added
@@ -0,0 +1,34 @@ +From: Diego Escalante Urrelo <diegoe@gnome.org> +Date: Thu, 23 Jul 2020 15:51:06 -0500 +Subject: wl: Fix fall through warnings +MIME-Version: 1.0 +Content-Type: text/plain; charset="utf-8" +Content-Transfer-Encoding: 8bit + +Add a gcc special comment to solve a -Wimplicit-fallthrough warning: + +src/wl/sys/wl_cfg80211_hybrid.h:52:5: warning: this statement may fall through -Wimplicit-fallthrough= + 52 | if (wl_dbg_level & WL_DBG_DBG) { \ + | ^ +src/wl/sys/wl_cfg80211_hybrid.c:817:3: note: in expansion of macro ‘WL_DBG’ + 817 | WL_DBG(("network eap\n")); + | ^~~~~~ +src/wl/sys/wl_cfg80211_hybrid.c:820:2: note: here + 820 | default: + | ^~~~~~~ +--- + amd64/src/wl/sys/wl_cfg80211_hybrid.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c +index fd2430e..195c0e4 100644 +--- a/src/wl/sys/wl_cfg80211_hybrid.c ++++ b/src/wl/sys/wl_cfg80211_hybrid.c +@@ -790,6 +790,7 @@ wl_set_auth_type(struct net_device *dev, struct cfg80211_connect_params *sme) + break; + case NL80211_AUTHTYPE_NETWORK_EAP: + WL_DBG(("network eap\n")); ++ /* falls through */ + default: + val = 2; + WL_ERR(("invalid auth type (%d)\n", sme->auth_type));
View file
broadcom-sta-6.30.223.271-Fix-mac-address-setting.patch
Added
@@ -0,0 +1,51 @@ +From: Diego Escalante Urrelo <diegoe@gnome.org> +Date: Tue, 28 Jul 2020 11:19:37 -0500 +Subject: wl: Fix mac address setting + +The function was returning BCM_UNSUPPORTED (-23) when the device did not +allow for mac address changes. This however corresponds to "too many +files open" so userspace was getting conflicting info on what was +happening. Example: + + $ ip link set wlp3s0 address 3c:15:c2:cf:29:dd + RTNETLINK answers: Too many open files in system + +Now the function properly returns -EADDRNOTAVAIL instead. + +This fixes the popular error where NetworkManager is unable to connect +to wifi networks when wifi.scan-rand-mac-addr=yes (the default) or other +mac-addr options are in use (see the work around supplied by +wpasupplicant in /usr/lib/NetworkManager/conf.d/no-mac-addr-change.conf) + +Also, the function was incorrectly changing the `net_device->dev_addr` +even when the hardware had not been able to change it. +--- + amd64/src/wl/sys/wl_linux.c | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c +index 4f5e43a..acdac06 100644 +--- a/src/wl/sys/wl_linux.c ++++ bsrc/wl/sys/wl_linux.c +@@ -1848,15 +1848,17 @@ wl_set_mac_address(struct net_device *dev, void *addr) + WL_TRACE(("wl%d: wl_set_mac_address\n", wl->pub->unit)); + + WL_LOCK(wl); +- +- bcopy(sa->sa_data, dev->dev_addr, ETHER_ADDR_LEN); + err = wlc_iovar_op(wl->wlc, "cur_etheraddr", NULL, 0, sa->sa_data, ETHER_ADDR_LEN, + IOV_SET, (WL_DEV_IF(dev))->wlcif); + WL_UNLOCK(wl); +- if (err) ++ if (err) { + WL_ERROR(("wl%d: wl_set_mac_address: error setting MAC addr override\n", + wl->pub->unit)); +- return err; ++ return OSL_ERROR(err); ++ } else { ++ bcopy(sa->sa_data, dev->dev_addr, ETHER_ADDR_LEN); ++ return 0; ++ } + } + + static void
View file
broadcom-wl.linux-5.17.patch
Changed
@@ -1,14 +1,81 @@ -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 +From: Eduard Bloch <blade@debian.org> +Date: Sun, 8 May 2022 23:03:35 +0200 +Subject: wl: Update for linux-5.17+ deprecations + +Update for various deprecated APIs. + +Original SVN information: + 6.30.223.271-29: add patch for linux 5.17 + git-svn-id: file:///srv/repos/svn-community/svn@1171161 9fca08f4-af9d-4005-b8df-a31f2cc04f65 + heftig committed on 23 Mar + +Co-Authored-By: Diego Escalante Urrelo <diegoe@gnome.org> +Based-on: https://raw.githubusercontent.com/archlinux/svntogit-community/master/broadcom-wl-dkms/trunk/012-linux517.patch +--- + amd64/src/wl/sys/wl_linux.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c +index a63cc4d..46e5ce5 100644 +--- a/src/wl/sys/wl_linux.c ++++ b/src/wl/sys/wl_linux.c +@@ -647,7 +647,11 @@ wl_attach(uint16 vendor, uint16 device, ulong regs, + WL_ERROR(("wl%d: Error setting MAC ADDRESS\n", unit)); + } + #endif ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) + bcopy(&wl->pub->cur_etheraddr, dev->dev_addr, ETHER_ADDR_LEN); ++#else ++ eth_hw_addr_set(dev, wl->pub->cur_etheraddr.octet); ++#endif + + online_cpus = 1; + +@@ -1858,7 +1862,11 @@ wl_set_mac_address(struct net_device *dev, void *addr) + wl->pub->unit)); + return OSL_ERROR(err); + } else { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) + bcopy(sa->sa_data, dev->dev_addr, ETHER_ADDR_LEN); ++#else ++ eth_hw_addr_set(dev, sa->sa_data); ++#endif + return 0; + } + } +@@ -3030,7 +3038,11 @@ _wl_add_monitor_if(wl_task_t *task) + else + dev->type = ARPHRD_IEEE80211_RADIOTAP; - #include <wlc_wowl.h> ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) + bcopy(wl->dev->dev_addr, dev->dev_addr, ETHER_ADDR_LEN); ++#else ++ eth_hw_addr_set(dev, wl->dev->dev_addr); ++#endif -+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 17, 0) -+#define PDE_DATA pde_data + #if defined(WL_USE_NETDEV_OPS) + dev->netdev_ops = &wl_netdev_monitor_ops; +@@ -3311,7 +3323,11 @@ wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, voi + static ssize_t + wl_proc_read(struct file *filp, char __user *buffer, size_t length, loff_t *offp) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) + wl_info_t * wl = PDE_DATA(file_inode(filp)); ++#else ++ wl_info_t * wl = pde_data(file_inode(filp)); ++#endif + #endif + int bcmerror, len; + int to_user = 0; +@@ -3368,7 +3384,11 @@ wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *d + static ssize_t + wl_proc_write(struct file *filp, const char __user *buff, size_t length, loff_t *offp) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 17, 0) + wl_info_t * wl = PDE_DATA(file_inode(filp)); ++#else ++ wl_info_t * wl = pde_data(file_inode(filp)); +#endif -+ - static void wl_timer( - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0) - struct timer_list *tl + #endif + int from_user = 0; + int bcmerror;
View file
broadcom-wl.linux-6.5.patch
Added
@@ -0,0 +1,192 @@ +From 706489688523d4af9ce4422137e4bfdb2f70aab9 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Joan=20Bruguera=20Mic=C3=B3?= <joanbrugueram@gmail.com> +Date: Sat, 5 Aug 2023 20:54:12 +0000 +Subject: PATCH Tentative patch for broadcom-wl 6.30.223.271 driver for Linux 6.5-rc1 + +Applies on top of all the patches applied to broadcom-wl-dkms 6.30.223.271-36 on Arch Linux + +On Linux 6.5, due to commit 2d47c6956ab3 ("ubsan: Tighten UBSAN_BOUNDS +on GCC"), flexible trailing arrays declared like `whatever_t foo1;` +will generate warnings when CONFIG_UBSAN & co. is enabled, such as: + + UBSAN: array-index-out-of-bounds in /var/lib/dkms/broadcom-wl/6.30.223.271/build/src/wl/sys/wl_linux.c:1919:4 + index 2 is out of range for type 'ether_addr 1' + CPU: 8 PID: 131 Comm: kworker/8:1 Tainted: P OE ... + Hardware name: ... + Workqueue: ipv6_addrconf addrconf_dad_work + Call Trace: + <TASK> + dump_stack_lvl+0x47/0x60 + __ubsan_handle_out_of_bounds+0xc7/0x100 + _wl_set_multicast_list+0x372/0x710 wl b2d4dadbf09aee67f0822b96bf7f4b96338be49b + ? __dev_mc_add+0xb3/0x150 + ... + +This was technically always wrong, but was detected now because of the +commit above, and because Ubuntu 23.04 enables CONFIG_UBSAN by default. +Thanks to Satadru Pramanik for the heads-up & report. + +Migrate them to the standard C99 syntax `whatever_t foo;` to fix it. +(Quite a few trailing one-element arrays remain unchanged, either +because they are never used, or never accessed past the first element) + +Reported-by: Satadru Pramanik <satadru@gmail.com> +Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d47c6956ab3c8b580a59d7704aab3e2a4882b6c +Link: https://lwn.net/Articles/936728/ +--- + src/include/bcmutils.h | 2 +- + src/include/wlioctl.h | 10 +++++----- + src/wl/sys/wl_cfg80211_hybrid.c | 4 ++-- + src/wl/sys/wl_cfg80211_hybrid.h | 8 ++++---- + src/wl/sys/wl_iw.c | 4 ++-- + 5 files changed, 14 insertions(+), 14 deletions(-) + +diff --git a/src/include/bcmutils.h b/src/include/bcmutils.h +index 5fafe3d..7ad55ae 100644 +--- a/src/include/bcmutils.h ++++ b/src/include/bcmutils.h +@@ -558,7 +558,7 @@ typedef struct bcm_bit_desc_ex { + typedef struct bcm_tlv { + uint8 id; + uint8 len; +- uint8 data1; ++ uint8 data; + } bcm_tlv_t; + + #define bcm_valid_tlv(elt, buflen) ((buflen) >= 2 && (int)(buflen) >= (int)(2 + (elt)->len)) +diff --git a/src/include/wlioctl.h b/src/include/wlioctl.h +index 2c05c7c..62be93d 100644 +--- a/src/include/wlioctl.h ++++ b/src/include/wlioctl.h +@@ -91,7 +91,7 @@ typedef struct wl_scan_results { + uint32 buflen; + uint32 version; + uint32 count; +- wl_bss_info_t bss_info1; ++ wl_bss_info_t bss_info; + } wl_scan_results_t; + + #define WL_MAXRATES_IN_SET 16 +@@ -129,7 +129,7 @@ typedef struct wl_uint32_list { + + uint32 count; + +- uint32 element1; ++ uint32 element; + } wl_uint32_list_t; + + typedef struct wl_assoc_params { +@@ -247,7 +247,7 @@ typedef struct _pmkid { + + typedef struct _pmkid_list { + uint32 npmkid; +- pmkid_t pmkid1; ++ pmkid_t pmkid; + } pmkid_list_t; + + typedef struct _pmkid_cand { +@@ -257,7 +257,7 @@ typedef struct _pmkid_cand { + + typedef struct _pmkid_cand_list { + uint32 npmkid_cand; +- pmkid_cand_t pmkid_cand1; ++ pmkid_cand_t pmkid_cand; + } pmkid_cand_list_t; + + typedef struct { +@@ -278,7 +278,7 @@ typedef struct channel_info { + + struct maclist { + uint count; +- struct ether_addr ea1; ++ struct ether_addr ea; + }; + + typedef struct wl_ioctl { +diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c +index c0dbae2..7926f2a 100644 +--- a/src/wl/sys/wl_cfg80211_hybrid.c ++++ b/src/wl/sys/wl_cfg80211_hybrid.c +@@ -1584,7 +1584,7 @@ wl_cfg80211_del_pmksa(struct wiphy *wiphy, struct net_device *dev, + struct cfg80211_pmksa *pmksa) + { + struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy); +- struct _pmkid_list pmkid; ++ struct { pmkid_t pmkid1; } pmkid; + s32 err = 0; + int i; + +@@ -1992,7 +1992,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info + WL_DBG(("Beacon is larger than buffer. Discarding\n")); + return err; + } +- notif_bss_info = kzalloc(sizeof(*notif_bss_info) + sizeof(*mgmt) - sizeof(u8) + ++ notif_bss_info = kzalloc(sizeof(*notif_bss_info) + sizeof(*mgmt) + + WL_BSS_INFO_MAX, GFP_KERNEL); + if (!notif_bss_info) { + WL_ERR(("notif_bss_info alloc failed\n")); +diff --git a/src/wl/sys/wl_cfg80211_hybrid.h b/src/wl/sys/wl_cfg80211_hybrid.h +index bc6f3ad..e117897 100644 +--- a/src/wl/sys/wl_cfg80211_hybrid.h ++++ b/src/wl/sys/wl_cfg80211_hybrid.h +@@ -103,7 +103,7 @@ struct beacon_proberesp { + __le64 timestamp; + __le16 beacon_int; + __le16 capab_info; +- u8 variable0; ++ u8 variable; + } __attribute__ ((packed)); + + struct wl_cfg80211_conf { +@@ -126,7 +126,7 @@ struct wl_cfg80211_bss_info { + u16 channel; + s16 rssi; + u16 frame_len; +- u8 frame_buf1; ++ u8 frame_buf; + }; + + struct wl_cfg80211_scan_req { +@@ -142,7 +142,7 @@ struct wl_cfg80211_event_q { + struct list_head eq_list; + u32 etype; + wl_event_msg_t emsg; +- s8 edata1; ++ s8 edata; + }; + + struct wl_cfg80211_security { +@@ -174,7 +174,7 @@ struct wl_cfg80211_assoc_ielen { + + struct wl_cfg80211_pmk_list { + pmkid_list_t pmkids; +- pmkid_t fooMAXPMKID - 1; ++ pmkid_t fooMAXPMKID; + }; + + struct wl_cfg80211_priv { +diff --git a/src/wl/sys/wl_iw.c b/src/wl/sys/wl_iw.c +index e346b15..e28de40 100644 +--- a/src/wl/sys/wl_iw.c ++++ b/src/wl/sys/wl_iw.c +@@ -1875,7 +1875,7 @@ wl_iw_set_encodeext( + #if WIRELESS_EXT > 17 + struct { + pmkid_list_t pmkids; +- pmkid_t fooMAXPMKID-1; ++ pmkid_t fooMAXPMKID; + } pmkid_list; + static int + wl_iw_set_pmksa( +@@ -1898,7 +1898,7 @@ wl_iw_set_pmksa( + bzero((char *)&pmkid_list, sizeof(pmkid_list)); + } + if (iwpmksa->cmd == IW_PMKSA_REMOVE) { +- pmkid_list_t pmkid, *pmkidptr; ++ struct { pmkid_t pmkid1; } pmkid, *pmkidptr; + pmkidptr = &pmkid; + bcopy(&iwpmksa->bssid.sa_data0, &pmkidptr->pmkid0.BSSID, ETHER_ADDR_LEN); + bcopy(&iwpmksa->pmkid0, &pmkidptr->pmkid0.PMKID, WPA2_PMKID_LEN); +-- +2.41.0 +
View file
isprint.patch
Added
@@ -0,0 +1,13 @@ +diff -U 3 -H -d -r -N -- a/src/wl/sys/wl_iw.h b/src/wl/sys/wl_iw.h +--- a/src/wl/sys/wl_iw.h 2015-09-19 00:47:30.000000000 +0200 ++++ b/src/wl/sys/wl_iw.h 2022-09-23 22:37:47.234437371 +0200 +@@ -70,7 +70,9 @@ + #define WL_IW_RSSI_EXCELLENT -57 + #define WL_IW_RSSI_INVALID 0 + #define MAX_WX_STRING 80 ++#ifndef isprint + #define isprint(c) bcm_isprint(c) ++#endif + #define WL_IW_SET_ACTIVE_SCAN (SIOCIWFIRSTPRIV+1) + #define WL_IW_GET_RSSI (SIOCIWFIRSTPRIV+3) + #define WL_IW_SET_PASSIVE_SCAN (SIOCIWFIRSTPRIV+5)
View file
preamble
Added
@@ -0,0 +1,2 @@ +Enhances: kernel-%1 +Requires: kernel-%1
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
.