Gentoo Archives: gentoo-commits

From: "Sven Vermeulen (swift)" <swift@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-wireless/broadcom-sta/files: broadcom-sta-6.30.223.141-linux-3.10.0.patch
Date: Mon, 02 Jun 2014 19:55:29
Message-Id: 20140602195524.4C9D62004E@flycatcher.gentoo.org
1 swift 14/06/02 19:55:24
2
3 Added: broadcom-sta-6.30.223.141-linux-3.10.0.patch
4 Log:
5 Add missing patch (bug #511876)
6
7 (Portage version: 2.2.8-r1/cvs/Linux x86_64, signed Manifest commit with key 0x2EDD52403B68AF47)
8
9 Revision Changes Path
10 1.1 net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-wireless/broadcom-sta/files/broadcom-sta-6.30.223.141-linux-3.10.0.patch?rev=1.1&content-type=text/plain
14
15 Index: broadcom-sta-6.30.223.141-linux-3.10.0.patch
16 ===================================================================
17 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
18 --- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200
19 +++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200
20 @@ -3229,7 +3229,12 @@
21 wl_tkip_printstats(wl_info_t *wl, bool group_key)
22 {
23 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
24 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
25 + struct seq_file sfile;
26 + struct seq_file *debug_buf = &sfile;
27 +#else
28 char debug_buf[512];
29 +#endif
30 int idx;
31 if (wl->tkipmodops) {
32 if (group_key) {
33 @@ -3242,7 +3247,11 @@
34 wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
35 else
36 return;
37 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
38 + printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast");
39 +#else
40 printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast");
41 +#endif
42 }
43 #endif
44 }
45 @@ -3401,17 +3410,24 @@
46 return 0;
47 }
48
49 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
50 static int
51 wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
52 +#else
53 +static ssize_t
54 +wl_proc_read (struct file *filp, char __user *buffer, size_t length, loff_t *data)
55 +#endif
56 {
57 wl_info_t * wl = (wl_info_t *)data;
58 int bcmerror, to_user;
59 int len;
60
61 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
62 if (offset > 0) {
63 *eof = 1;
64 return 0;
65 }
66 +#endif
67
68 if (!length) {
69 WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
70 @@ -3424,8 +3440,13 @@
71 return len;
72 }
73
74 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
75 static int
76 wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
77 +#else
78 +static ssize_t
79 +wl_proc_write (struct file *filp, const char __user *buff, size_t length, loff_t *data)
80 +#endif
81 {
82 wl_info_t * wl = (wl_info_t *)data;
83 int from_user = 0;
84 @@ -3455,19 +3476,34 @@
85 return length;
86 }
87
88 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
89 +static const struct file_operations wl_fops = {
90 + .owner = THIS_MODULE,
91 + .read = wl_proc_read,
92 + .write = wl_proc_write,
93 +};
94 +#endif
95 +
96 static int
97 wl_reg_proc_entry(wl_info_t *wl)
98 {
99 char tmp[32];
100 sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
101 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
102 if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
103 WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
104 +#else
105 + if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
106 + WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
107 +#endif
108 ASSERT(0);
109 return -1;
110 }
111 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
112 wl->proc_entry->read_proc = wl_proc_read;
113 wl->proc_entry->write_proc = wl_proc_write;
114 wl->proc_entry->data = wl;
115 +#endif
116 return 0;
117 }
118 #ifdef WLOFFLD