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