wok-current view broadcom-wl/stuff/3.14.0.patch @ rev 20321

Fix busybox, etherboot & mgetty
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sun May 20 21:26:43 2018 +0200 (2018-05-20)
parents
children 564f7f9745bd
line source
1 --- src/wl/sys/wl_linux.c
2 +++ src/wl/sys/wl_linux.c
3 @@ -3180,6 +3180,7 @@
4 {
5 char tmp[32];
6 sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
8 if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
9 WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
10 ASSERT(0);
11 @@ -3188,5 +3189,17 @@
12 wl->proc_entry->read_proc = wl_proc_read;
13 wl->proc_entry->write_proc = wl_proc_write;
14 wl->proc_entry->data = wl;
15 +#else
16 + static const struct file_operations wl_proc_fops = {
17 + .owner = THIS_MODULE,
18 + .read = wl_proc_read,
19 + .write = wl_proc_write,
20 + };
21 + if ((wl->proc_entry = proc_create(tmp, 0644, NULL,&wl_proc_fops)) == NULL) {
22 + WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
23 + ASSERT(0);
24 + return -1;
25 + }
26 +#endif
27 return 0;
28 }
29 --- src/wl/sys/wl_cfg80211.c
30 +++ src/wl/sys/wl_cfg80211.c
31 @@ -1892,7 +1892,11 @@
32 wl_get_assoc_ies(wl);
33 memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
34 wl_update_bss_info(wl);
35 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0)
36 cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL
37 );
38 +#else
39 + cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, G
40 FP_KERNEL);
41 +#endif
42 set_bit(WL_STATUS_CONNECTED, &wl->status);
43 wl->profile->active = true;
44 }
45 @@ -2112,7 +2116,11 @@
46 rcu_read_unlock();
47 #endif
48 beacon_interval = bss->beacon_interval;
49 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
50 cfg80211_put_bss(bss);
51 +#else
52 + cfg80211_put_bss(wl_to_wiphy(wl), bss);
53 +#endif
54 }
56 tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);