rpms/wl-kmod/F-19 broadcom-wl-5.100.82.112-kernel-3.10.patch, NONE, 1.1 wl-kmod.spec, 1.82, 1.83

Nicolas Viéville nvieville at rpmfusion.org
Wed Jul 24 09:24:19 CEST 2013


Author: nvieville

Update of /cvs/nonfree/rpms/wl-kmod/F-19
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv31580

Modified Files:
	wl-kmod.spec 
Added Files:
	broadcom-wl-5.100.82.112-kernel-3.10.patch 
Log Message:
* Tue Jul 23 2013 Nicolas Vieville <nicolas.vieville at univ-valenciennes.fr> - 5.100.82.112-11
- Added patch to build for kernel >= 3.10


broadcom-wl-5.100.82.112-kernel-3.10.patch:
 wl_linux.c |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)

--- NEW FILE broadcom-wl-5.100.82.112-kernel-3.10.patch ---
diff -Naur hybrid-portsrc_x86_32-v5_100_82_112.orig/src/wl/sys/wl_linux.c hybrid-portsrc_x86_32-v5_100_82_112/src/wl/sys/wl_linux.c
--- hybrid-portsrc_x86_32-v5_100_82_112.orig/src/wl/sys/wl_linux.c	2012-11-07 17:59:01.000000000 +0100
+++ hybrid-portsrc_x86_32-v5_100_82_112/src/wl/sys/wl_linux.c	2013-07-03 07:52:45.570402687 +0200
@@ -2964,7 +2964,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) {
@@ -3123,11 +3123,19 @@
 	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)
 {
 	wl_info_t * wl = (wl_info_t *)data;
+#else
+static int
+wl_proc_read(struct seq_file *seq, void *offset)
+{
+	wl_info_t * wl = (wl_info_t *)seq->private;
+#endif
 	int bcmerror, to_user;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	int len;
 
 	if (offset > 0) {
@@ -3139,17 +3147,33 @@
 		WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
 		return 0;
 	}
+#endif
 	WL_LOCK(wl);
 	bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	len = sprintf(buffer, "%d\n", to_user);
+#endif
 	WL_UNLOCK(wl);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 	return len;
+#else
+	seq_printf(seq, "%d\n", to_user);
+	return bcmerror;
+#endif
 }
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 static int
 wl_proc_write(struct file *filp, const char __user *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 *ppos)
+{
+	struct seq_file *seq = filp->private_data;
+	wl_info_t * wl = (wl_info_t *)seq->private;
+#endif
 	int from_user = 0;
 	int bcmerror;
 
@@ -3160,7 +3184,11 @@
 	}
 	if (copy_from_user(&from_user, buff, 1)) {
 		WL_ERROR(("%s: copy from user failed\n", __FUNCTION__));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
 		return -EIO;
+#else
+		return -EFAULT;
+#endif
 	}
 
 	if (from_user >= 0x30)
@@ -3174,21 +3202,47 @@
 		WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
 		return -EIO;
 	}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+	*ppos += length;
+#endif
 	return length;
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
+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_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 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_data(tmp, 0644, NULL, &wl_fops, wl)) == NULL) {
+		WL_ERROR(("%s: proc_create_data %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;
 }


Index: wl-kmod.spec
===================================================================
RCS file: /cvs/nonfree/rpms/wl-kmod/F-19/wl-kmod.spec,v
retrieving revision 1.82
retrieving revision 1.83
diff -u -r1.82 -r1.83
--- wl-kmod.spec	13 Jul 2013 08:02:39 -0000	1.82
+++ wl-kmod.spec	24 Jul 2013 07:24:19 -0000	1.83
@@ -3,11 +3,11 @@
 # "buildforkernels newest" macro for just that build; immediately after
 # queuing that build enable the macro again for subsequent builds; that way
 # a new akmod package will only get build when a new one is actually needed
-%global buildforkernels newest
+%global buildforkernels current
 
 Name:       wl-kmod
 Version:    5.100.82.112
-Release:    10%{?dist}.8
+Release:    11%{?dist}
 Summary:    Kernel module for Broadcom wireless devices
 Group:      System Environment/Kernel
 License:    Redistributable, no modification permitted
@@ -25,6 +25,7 @@
 Patch7:     broadcom-wl-5.100.82.112-wext_workaround.patch
 Patch8:     broadcom-wl-5.100.82.112-kernel-3.8.patch
 Patch9:     broadcom-wl-5.100.82.112-kernel-3.9.patch
+Patch10:    broadcom-wl-5.100.82.112-kernel-3.10.patch
 
 BuildRequires:  %{_bindir}/kmodtool
 
@@ -62,16 +63,17 @@
 %else
  tar xzf %{SOURCE1}
 %endif
-%patch0 -p1 -b .license
-%patch1 -p1 -b .kernel-3.2
-%patch2 -p1 -b .kernel-3.4
-%patch3 -p1 -b .cfg80211
-%patch4 -p1 -b .kernel-3.6
-%patch5 -p1 -b .recent_kernel_semaphore
-%patch6 -p1 -b .recent_kernel_ioctl
-%patch7 -p1 -b .wext_workaround.patch
-%patch8 -p1 -b .kernel-3.8
-%patch9 -p1 -b .kernel-3.9
+%patch0  -p1 -b .license
+%patch1  -p1 -b .kernel-3.2
+%patch2  -p1 -b .kernel-3.4
+%patch3  -p1 -b .cfg80211
+%patch4  -p1 -b .kernel-3.6
+%patch5  -p1 -b .recent_kernel_semaphore
+%patch6  -p1 -b .recent_kernel_ioctl
+%patch7  -p1 -b .wext_workaround.patch
+%patch8  -p1 -b .kernel-3.8
+%patch9  -p1 -b .kernel-3.9
+%patch10 -p1 -b .kernel-3.10
 popd
 
 for kernel_version in %{?kernel_versions} ; do
@@ -101,6 +103,9 @@
 rm -rf $RPM_BUILD_ROOT
 
 %changelog
+* Tue Jul 23 2013 Nicolas Vieville <nicolas.vieville at univ-valenciennes.fr> - 5.100.82.112-11
+- Added patch to build for kernel >= 3.10
+
 * Sat Jul 13 2013 Nicolas Chauvet <kwizart at gmail.com> - 5.100.82.112-10.8
 - Rebuilt for kernel
 


More information about the rpmfusion-commits mailing list