1 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
2 --- bcmwl-6.30.223.30+bdcom.orig/src/src/wl/sys/wl_linux.c 2013-04-23 12:31:31.011588881 +0200
3 +++ bcmwl-6.30.223.30+bdcom/src/src/wl/sys/wl_linux.c 2013-05-20 18:27:18.830187333 +0200
5 wl_tkip_printstats(wl_info_t *wl, bool group_key)
7 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 14)
8 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
9 + struct seq_file sfile;
10 + struct seq_file *debug_buf = &sfile;
17 @@ -3242,7 +3247,11 @@
18 wl->tkipmodops->print_stats(debug_buf, wl->tkip_ucast_data);
21 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
22 + printk("%s: TKIP stats from module: %s\n", debug_buf->buf, group_key?"Bcast":"Ucast");
24 printk("%s: TKIP stats from module: %s\n", debug_buf, group_key?"Bcast":"Ucast");
29 @@ -3401,17 +3410,24 @@
33 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
35 wl_proc_read(char *buffer, char **start, off_t offset, int length, int *eof, void *data)
38 +wl_proc_read (struct file *filp, char __user *buffer, size_t length, loff_t *data)
41 wl_info_t * wl = (wl_info_t *)data;
42 int bcmerror, to_user;
45 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
53 WL_ERROR(("%s: Not enough return buf space\n", __FUNCTION__));
54 @@ -3424,8 +3440,13 @@
58 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
60 wl_proc_write(struct file *filp, const char *buff, unsigned long length, void *data)
63 +wl_proc_write (struct file *filp, const char __user *buff, size_t length, loff_t *data)
66 wl_info_t * wl = (wl_info_t *)data;
68 @@ -3455,19 +3476,34 @@
72 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 10, 0)
73 +static const struct file_operations wl_fops = {
74 + .owner = THIS_MODULE,
75 + .read = wl_proc_read,
76 + .write = wl_proc_write,
81 wl_reg_proc_entry(wl_info_t *wl)
84 sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
85 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
86 if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
87 WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
89 + if ((wl->proc_entry = proc_create(tmp, 0644, NULL, &wl_fops)) == NULL) {
90 + WL_ERROR(("%s: proc_create %s failed\n", __FUNCTION__, tmp));
95 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
96 wl->proc_entry->read_proc = wl_proc_read;
97 wl->proc_entry->write_proc = wl_proc_write;
98 wl->proc_entry->data = wl;