wok diff broadcom-wl64/stuff/3.8.0.patch @ rev 24586
updated gawk (5.0.1 -> 5.1.1)
author | Hans-G?nter Theisgen |
---|---|
date | Mon Feb 28 09:01:30 2022 +0100 (2022-02-28) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/broadcom-wl64/stuff/3.8.0.patch Mon Feb 28 09:01:30 2022 +0100 1.3 @@ -0,0 +1,75 @@ 1.4 +Description: Kernel 3.8 compatibility 1.5 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702788 1.6 +Last-Update: 2013-03-08 1.7 + 1.8 +--- a/amd64/src/include/bcmutils.h 1.9 ++++ b/amd64/src/include/bcmutils.h 1.10 +@@ -555,7 +555,11 @@ 1.11 + extern void prhex(const char *msg, uchar *buf, uint len); 1.12 + 1.13 + extern bcm_tlv_t *BCMROMFN(bcm_next_tlv)(bcm_tlv_t *elt, int *buflen); 1.14 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) 1.15 + extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key); 1.16 ++#else 1.17 ++extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(const void *buf, int buflen, uint key); 1.18 ++#endif 1.19 + extern bcm_tlv_t *BCMROMFN(bcm_parse_ordered_tlvs)(void *buf, int buflen, uint key); 1.20 + 1.21 + extern const char *bcmerrorstr(int bcmerror); 1.22 +--- a/amd64/src/wl/sys/wl_cfg80211.c 1.23 ++++ b/amd64/src/wl/sys/wl_cfg80211.c 1.24 +@@ -754,7 +754,11 @@ 1.25 + else 1.26 + memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN); 1.27 + 1.28 +- wl_ch_to_chanspec(params->channel, &join_params, &join_params_size); 1.29 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) 1.30 ++ wl_ch_to_chanspec(params->channel, &join_params, &join_params_size); 1.31 ++#else 1.32 ++ wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size); 1.33 ++#endif 1.34 + 1.35 + err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size); 1.36 + if (err) { 1.37 +@@ -2054,9 +2058,14 @@ 1.38 + struct bcm_tlv *tim; 1.39 + u16 beacon_interval; 1.40 + s32 dtim_period; 1.41 +- size_t ie_len; 1.42 +- u8 *ie; 1.43 + s32 err = 0; 1.44 ++ size_t ie_len; 1.45 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) 1.46 ++ u8 *ie; 1.47 ++#else 1.48 ++ const u8 *ie; 1.49 ++ const struct cfg80211_bss_ies *ies; 1.50 ++#endif 1.51 + 1.52 + ssid = &wl->profile->ssid; 1.53 + bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid, 1.54 +@@ -2086,8 +2095,22 @@ 1.55 + beacon_interval = cpu_to_le16(bi->beacon_period); 1.56 + } else { 1.57 + WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid)); 1.58 +- ie = bss->information_elements; 1.59 +- ie_len = bss->len_information_elements; 1.60 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0) 1.61 ++ ie = bss->information_elements; 1.62 ++ ie_len = bss->len_information_elements; 1.63 ++#else 1.64 ++ rcu_read_lock(); 1.65 ++ ies = (const struct cfg80211_bss_ies*)rcu_dereference(bss->ies); 1.66 ++ if (!ies) { 1.67 ++ /* This should never happen */ 1.68 ++ rcu_read_unlock(); 1.69 ++ err = -EIO; 1.70 ++ goto update_bss_info_out; 1.71 ++ } 1.72 ++ ie = ies->data; 1.73 ++ ie_len = (size_t)(ies->len); 1.74 ++ rcu_read_unlock(); 1.75 ++#endif 1.76 + beacon_interval = bss->beacon_interval; 1.77 + cfg80211_put_bss(bss); 1.78 + }