@@ -1,126 +0,0 @@
1−--- a/src/wl/sys/wl_linux.c 2013-08-01 08:52:22.000000000 +0200
2−+++ b/src/wl/sys/wl_linux.c 2013-09-13 14:25:36.463020788 +0200
3−@@ -910,7 +910,11 @@
4− pci_set_drvdata(pdev, NULL);
5− }
6−
7−+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
8− static struct pci_driver wl_pci_driver = {
9−+#else
10−+static struct pci_driver wl_pci_driver __refdata = {
11−+#endif
12− name: "wl",
13− probe: wl_pci_probe,
14− suspend: wl_suspend,
15−@@ -3235,7 +3239,7 @@
16− void
17− wl_tkip_printstats(wl_info_t *wl, bool group_key)
18− {
19−-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
20−+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
21− char debug_buf[512];
22− int idx;
23− if (wl->tkipmodops) {
24−@@ -3408,6 +3412,7 @@
25− return 0;
26− }
27−
28−+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
29− static int
30− wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
31− {
32−@@ -3462,19 +3467,90 @@
33− return length;
34− }
35−
36−+#else
37−+
38−+static int
39−+wl_proc_read(struct seq_file *seq, void *offset)
40−+{
41−+ wl_info_t * wl = (wl_info_t *)seq->private;
42−+ int bcmerror, to_user;
43−+
44−+ WL_LOCK(wl);
45−+ bcmerror = wlc_ioctl(wl->wlc, WLC_GET_MONITOR, &to_user, sizeof(int), NULL);
46−+ WL_UNLOCK(wl);
47−+
48−+ seq_printf(seq, "%d\n", to_user);
49−+ return bcmerror;
50−+}
51−+
52−+static ssize_t wl_proc_write(struct file *file, const char __user *buff,
53−+ size_t length, loff_t *ppos)
54−+{
55−+ struct seq_file *seq = file->private_data;
56−+ wl_info_t * wl = (wl_info_t *)seq->private;
57−+ int bcmerror, from_user = 0;
58−+
59−+ if (length != 1) {
60−+ WL_ERROR(("%s: Invalid data length\n", __FUNCTION__));
61−+ return -EIO;
62−+ }
63−+
64−+ if (copy_from_user(&from_user, buff, 1)) {
65−+ WL_ERROR(("%s: copy from user failed\n", __FUNCTION__));
66−+ return -EFAULT;
67−+ }
68−+
69−+ if (from_user >= 0x30)
70−+ from_user -= 0x30;
71−+
72−+ WL_LOCK(wl);
73−+ bcmerror = wlc_ioctl(wl->wlc, WLC_SET_MONITOR, &from_user, sizeof(int), NULL);
74−+ WL_UNLOCK(wl);
75−+
76−+ if (bcmerror < 0) {
77−+ WL_ERROR(("%s: SET_MONITOR failed with %d\n", __FUNCTION__, bcmerror));
78−+ return -EIO;
79−+ }
80−+ *ppos += length;
81−+ return length;
82−+}
83−+
84−+static int wl_proc_open(struct inode *inode, struct file *file)
85−+{
86−+ return single_open(file, wl_proc_read, PDE_DATA(inode));
87−+}
88−+
89−+static const struct file_operations wl_proc_fops = {
90−+ .owner = THIS_MODULE,
91−+ .open = wl_proc_open,
92−+ .read = seq_read,
93−+ .write = wl_proc_write,
94−+ .llseek = seq_lseek,
95−+ .release = single_release,
96−+};
97−+#endif
98−+
99− static int
100− wl_reg_proc_entry(wl_info_t *wl)
101− {
102− char tmp[32];
103− sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
104−- if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
105−+
106−+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
107−+ wl->proc_entry = create_proc_entry(tmp, 0644, NULL);
108−+ if (wl->proc_entry) {
109−+ wl->proc_entry->read_proc = wl_proc_read;
110−+ wl->proc_entry->write_proc = wl_proc_write;
111−+ wl->proc_entry->data = wl;
112−+ }
113−+#else
114−+ wl->proc_entry = proc_create_data(tmp, 0644, NULL, &wl_proc_fops, wl);
115−+#endif
116−+ if (!wl->proc_entry) {
117− WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
118− ASSERT(0);
119− return -1;
120− }
121−- wl->proc_entry->read_proc = wl_proc_read;
122−- wl->proc_entry->write_proc = wl_proc_write;
123−- wl->proc_entry->data = wl;
124− return 0;
125− }
126− #ifdef WLOFFLD