update to 6.30.223.141

switch to dkms [release 6.30.223.141-1mamba;Sun Sep 15 2013]
This commit is contained in:
Silvan Calarco 2024-01-05 21:00:34 +01:00
parent 4924e32eb1
commit e52276f9b0
6 changed files with 310 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# broadcom-sta # broadcom-sta
Brooadcom STA driver for BCM4311-, BCM4312-, BCM4321-, and BCM4322- based wireless hardware (http://www.broadcom.com/support/802.11/linux_sta.php).

View File

@ -0,0 +1,15 @@
--- wl/src/wl/sys/wl_linux.c 2010-12-15 03:01:09.000000000 +0100
+++ temp/src/wl/sys/wl_linux.c 2011-03-04 11:02:12.754753700 +0100
@@ -482,7 +482,11 @@
#ifdef WL_ALL_PASSIVE
spin_lock_init(&wl->txq_lock);
#endif
- init_MUTEX(&wl->sem);
+ #ifndef init_MUTEX
+ sema_init(&wl->sem,1);
+ #else
+ init_MUTEX(&wl->sem);
+ #endif
}
if (!(wl->wlc = wlc_attach((void *) wl, vendor, device, unit, wl->piomode,

View File

@ -0,0 +1,12 @@
diff -Nru broadcom-sta-5.100.82.38.orig/src/wl/sys/wl_linux.c broadcom-sta-5.100.82.38/src/wl/sys/wl_linux.c
--- broadcom-sta-5.100.82.38.orig/src/wl/sys/wl_linux.c 2012-02-12 20:16:02.569971038 +0100
+++ broadcom-sta-5.100.82.38/src/wl/sys/wl_linux.c 2012-02-12 20:17:53.804723180 +0100
@@ -323,7 +323,7 @@
#endif
.ndo_get_stats = wl_get_stats,
.ndo_set_mac_address = wl_set_mac_address,
- .ndo_set_multicast_list = wl_set_multicast_list,
+ .ndo_set_rx_mode = wl_set_multicast_list,
.ndo_do_ioctl = wl_ioctl
};

View File

@ -0,0 +1,11 @@
diff -Nru broadcom-sta-5.100.82.38.orig/src/wl/sys/wl_linux.c broadcom-sta-5.100.82.38/src/wl/sys/wl_linux.c
--- broadcom-sta-5.100.82.38.orig/src/wl/sys/wl_linux.c 2012-06-30 21:07:33.834407846 +0200
+++ broadcom-sta-5.100.82.38/src/wl/sys/wl_linux.c 2012-06-30 21:08:16.012014517 +0200
@@ -40,7 +40,6 @@
#include <linux/pci_ids.h>
#define WLC_MAXBSSCFG 1
-#include <asm/system.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/pgtable.h>

View File

@ -0,0 +1,102 @@
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

168
broadcom-sta.spec Normal file
View File

@ -0,0 +1,168 @@
%define broadcom_sta_ver %(echo %version | tr . _)
Name: broadcom-sta
Version: 6.30.223.141
Epoch: 1
Release: 1mamba
Summary: Brooadcom STA driver for BCM4311-, BCM4312-, BCM4321-, and BCM4322- based wireless hardware
Group: System/Kernel and Hardware/Drivers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.broadcom.com/support/802.11/linux_sta.php
Source: http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-%{broadcom_sta_ver}.tar.gz
Source1: http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-%{broadcom_sta_ver}.tar.gz
Patch0: %{name}-5.100.82.38-kernel-2.6.38.patch
Patch1: %{name}-5.100.82.38-kernel-3.2.patch
Patch2: %{name}-5.100.82.38-kernel-3.4.patch
Patch3: broadcom-sta-6.30.223.141-kernel-3.10.patch
License: no OSI Approved
## AUTOBUILDREQ-BEGIN
## AUTOBUILDREQ-END
Requires(post):dkms
Obsoletes: kernel-mamba-64GB-nongpl-wl
Obsoletes: kernel-mamba-64GB-rt-nongpl-wl
Obsoletes: kernel-mamba-nongpl-wl
Obsoletes: kernel-mamba-rt-nongpl-wl
Provides: kernelwireless
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
Brooadcom STA driver for BCM4311-, BCM4312-, BCM4321-, and BCM4322- based wireless hardware (http://www.broadcom.com/support/802.11/linux_sta.php).
%prep
%setup -q -n %{name}-%{version} -c %{name}-%{version} -T
%if "%{target_cpu}" == "x86_64"
tar xzf %{SOURCE1}
%else
tar xzf %{SOURCE0}
%endif
%patch3 -p2
%build
##
## build for KERNEL_TARGET
##
#BUILD_OPTS="CC=%{BUILD_CC} CXX=%{BUILD_CXX} %{_smp_mflags}"
##
## build Broadcom STA driver module (wl.ko)
##
#make -C /usr/src/linux-%{KERNEL_VER}%{?KERNEL_TARGET} M=`pwd`
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
# dkms
install -d -m0755 %{buildroot}%{_prefix}/src/%{name}-%{version}
cp -a * %{buildroot}%{_prefix}/src/%{name}-%{version}
cat > %{buildroot}%{_prefix}/src/%{name}-%{version}/dkms.conf << _EOF
PACKAGE_NAME=%{name}
PACKAGE_VERSION=%{version}
MAKE="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build modules"
CLEAN="make -C \${kernel_source_dir} SUBDIRS=\${dkms_tree}/\${PACKAGE_NAME}/\${PACKAGE_VERSION}/build clean"
BUILT_MODULE_NAME=wl
BUILT_MODULE_LOCATION=.
DEST_MODULE_LOCATION=/extra/drivers/net/
REMAKE_INITRD=no
AUTOINSTALL=yes
_EOF
install -D -m0644 lib/LICENSE.txt %{buildroot}%{_docdir}/broadcom-sta-%{broadcom_sta_ver}/LICENSE.txt
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d/
cat > %{buildroot}%{_sysconfdir}/modprobe.d/wl-%{KERNEL_VER}.conf << __EOF
blacklist b43
blacklist ssb
blacklist bcma
blacklist brcmsmac
__EOF
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%preun
dkms remove -q -m %{name} -v %{version} --all --rpm_safe_upgrade
:
%posttrans
if [ $1 -ge 1 ]; then
# clean any legacy alternatives symlink
dkms remove -q -m %{name} -v %{version} --all --rpm_safe_upgrade
dkms add -q -m %{name} -v %{version}
dkms install -q -m %{name} -v %{version}
fi
:
%files
%defattr(-,root,root)
%{_sysconfdir}/modprobe.d/wl-%{KERNEL_VER}.conf
%dir %{_prefix}/src/%{name}-%{version}
%{_prefix}/src/%{name}-%{version}/*
%{_docdir}/broadcom-sta-%{broadcom_sta_ver}/LICENSE.txt
%changelog
* Sun Sep 15 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 6.30.223.141-1mamba
- update to 6.30.223.141
- switch to dkms
* Fri Jan 04 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-13mamba
- kernel 3.4 rebuild
* Thu Nov 22 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-12mamba
- provide kernelwireless-%{KERNEL_TARGET} instead of kernelwireless
* Mon Nov 05 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-11mamba
- bump release up for milestone2
* Sat Oct 27 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-9mamba
- kernel 3.6 rebuild
* Sat Jun 30 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-8mamba
- automatic update by autodist
* Sun Feb 12 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-7mamba
- automatic update by autodist
* Wed Jan 25 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-6mamba
- automatic update by autodist
* Sun Oct 30 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-5mamba
- also blacklist bcma and brcmsmac modules
* Sat Oct 08 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-4mamba
- rebuilt after kernel configuration changes (3.0.4-3mamba)
* Sun Sep 04 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-3mamba
- automatic update by autodist
* Fri Aug 19 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-2mamba
- automatic update by autodist
* Wed Apr 20 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 5.100.82.38-1mamba
- update to 5.100.82.38
* Mon Feb 07 2011 Silvan Calarco <silvan.calarco@mambasoft.it> 5.60.246.6-2mamba
- automatic update by autodist
* Fri Dec 17 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 5.60.246.6-1mamba
- update to 5.60.246.6
* Thu Dec 16 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 5.60.48.36-2mamba
- automatic rebuild by autodist
* Fri Sep 10 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 5.60.48.36-1mamba
- update to 5.60.48.36
* Wed Jun 30 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 5.10.91.9.3-4mamba
- automatic rebuild by autodist
* Sat Dec 26 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 5.10.91.9.3-3mamba
- automatic rebuild by autodist
* Tue Nov 03 2009 Ercole 'ercolinux' Carpanetto <ercole69@gmail.com> 5.10.91.9.3-2mamba
- fixed the specfile to install the module in the correct path
* Sat Oct 31 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 5.10.91.9.3-1mamba
- update to 5.10.91.9.3
- package split from kernel-nongpl