wok-current view broadcom-wl64/stuff/3.8.0.patch @ rev 24556

updated flatpress (0.1010.2 -> 1.2.1)
author Hans-G?nter Theisgen
date Fri Feb 25 14:05:00 2022 +0100 (2022-02-25)
parents
children
line source
1 Description: Kernel 3.8 compatibility
2 Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702788
3 Last-Update: 2013-03-08
5 --- a/amd64/src/include/bcmutils.h
6 +++ b/amd64/src/include/bcmutils.h
7 @@ -555,7 +555,11 @@
8 extern void prhex(const char *msg, uchar *buf, uint len);
10 extern bcm_tlv_t *BCMROMFN(bcm_next_tlv)(bcm_tlv_t *elt, int *buflen);
11 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
12 extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key);
13 +#else
14 +extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(const void *buf, int buflen, uint key);
15 +#endif
16 extern bcm_tlv_t *BCMROMFN(bcm_parse_ordered_tlvs)(void *buf, int buflen, uint key);
18 extern const char *bcmerrorstr(int bcmerror);
19 --- a/amd64/src/wl/sys/wl_cfg80211.c
20 +++ b/amd64/src/wl/sys/wl_cfg80211.c
21 @@ -754,7 +754,11 @@
22 else
23 memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN);
25 - wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
26 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
27 + wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
28 +#else
29 + wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size);
30 +#endif
32 err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
33 if (err) {
34 @@ -2054,9 +2058,14 @@
35 struct bcm_tlv *tim;
36 u16 beacon_interval;
37 s32 dtim_period;
38 - size_t ie_len;
39 - u8 *ie;
40 s32 err = 0;
41 + size_t ie_len;
42 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
43 + u8 *ie;
44 +#else
45 + const u8 *ie;
46 + const struct cfg80211_bss_ies *ies;
47 +#endif
49 ssid = &wl->profile->ssid;
50 bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
51 @@ -2086,8 +2095,22 @@
52 beacon_interval = cpu_to_le16(bi->beacon_period);
53 } else {
54 WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid));
55 - ie = bss->information_elements;
56 - ie_len = bss->len_information_elements;
57 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
58 + ie = bss->information_elements;
59 + ie_len = bss->len_information_elements;
60 +#else
61 + rcu_read_lock();
62 + ies = (const struct cfg80211_bss_ies*)rcu_dereference(bss->ies);
63 + if (!ies) {
64 + /* This should never happen */
65 + rcu_read_unlock();
66 + err = -EIO;
67 + goto update_bss_info_out;
68 + }
69 + ie = ies->data;
70 + ie_len = (size_t)(ies->len);
71 + rcu_read_unlock();
72 +#endif
73 beacon_interval = bss->beacon_interval;
74 cfg80211_put_bss(bss);
75 }