wok rev 20390
broadcom-wl: update 3.14.0.patch
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Jun 23 13:39:05 2018 +0200 (2018-06-23) |
parents | de4496326d61 |
children | 129e0f37d676 |
files | broadcom-wl/stuff/3.14.0.patch |
line diff
1.1 --- a/broadcom-wl/stuff/3.14.0.patch Sat Jun 23 12:16:43 2018 +0200 1.2 +++ b/broadcom-wl/stuff/3.14.0.patch Sat Jun 23 13:39:05 2018 +0200 1.3 @@ -1,6 +1,18 @@ 1.4 --- a/amd64/src/wl/sys/wl_linux.c 1.5 +++ a/amd64/src/wl/sys/wl_linux.c 1.6 -@@ -3180,6 +3180,7 @@ 1.7 +@@ -1192,7 +1192,11 @@ 1.8 + #else 1.9 + #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29)) 1.10 + 1.11 ++#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0)) 1.12 + dev = alloc_netdev(sizeof(wl_if_t), name, ether_setup); 1.13 ++#else 1.14 ++ dev = alloc_netdev(sizeof(wl_if_t), name, NET_NAME_UNKNOWN, ether_setup); 1.15 ++#endif 1.16 + wlif = netdev_priv(dev); 1.17 + if (!dev) { 1.18 + #else 1.19 +@@ -3180,6 +3184,7 @@ 1.20 { 1.21 char tmp[32]; 1.22 sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit); 1.23 @@ -8,7 +20,7 @@ 1.24 if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) { 1.25 WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp)); 1.26 ASSERT(0); 1.27 -@@ -3188,5 +3189,17 @@ 1.28 +@@ -3188,5 +3193,17 @@ 1.29 wl->proc_entry->read_proc = wl_proc_read; 1.30 wl->proc_entry->write_proc = wl_proc_write; 1.31 wl->proc_entry->data = wl; 1.32 @@ -28,15 +40,76 @@ 1.33 } 1.34 --- a/amd64/src/wl/sys/wl_cfg80211.c 1.35 +++ a/amd64/src/wl/sys/wl_cfg80211.c 1.36 -@@ -1892,7 +1892,11 @@ 1.37 +@@ -1838,8 +1838,13 @@ 1.38 + mgmt->u.beacon.capab_info, &bi->BSSID)); 1.39 + 1.40 + signal = notif_bss_info->rssi * 100; 1.41 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0) 1.42 + if (!cfg80211_inform_bss_frame(wiphy, channel, mgmt, 1.43 + le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL)) { 1.44 ++#else 1.45 ++ if (!cfg80211_inform_bss_frame(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, mgmt, 1.46 ++ le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL)) { 1.47 ++#endif 1.48 + WL_ERR(("cfg80211_inform_bss_frame error\n")); 1.49 + kfree(notif_bss_info); 1.50 + return -EINVAL; 1.51 +@@ -1857,6 +1862,12 @@ 1.52 + u32 event = EVENT_TYPE(e); 1.53 + u16 flags = EVENT_FLAGS(e); 1.54 + u32 status = EVENT_STATUS(e); 1.55 ++#if LINUX_VERSION_CODE => KERNEL_VERSION(3, 15, 0) 1.56 ++ struct ieee80211_channel *channel = NULL; 1.57 ++ struct wiphy *wiphy; 1.58 ++ u32 chanspec, chan; 1.59 ++ u32 freq, band; 1.60 ++#endif 1.61 + 1.62 + WL_DBG(("\n")); 1.63 + 1.64 +@@ -1868,7 +1879,11 @@ 1.65 + } 1.66 + else if ((event == WLC_E_LINK && ~(flags & WLC_EVENT_MSG_LINK)) || 1.67 + event == WLC_E_DEAUTH_IND || event == WLC_E_DISASSOC_IND) { 1.68 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0) 1.69 + cfg80211_disconnected(ndev, 0, NULL, 0, GFP_KERNEL); 1.70 ++#else 1.71 ++ cfg80211_disconnected(ndev, 0, NULL, 0, false, GFP_KERNEL); 1.72 ++#endif 1.73 + clear_bit(WL_STATUS_CONNECTED, &wl->status); 1.74 + wl_link_down(wl); 1.75 + wl_init_prof(wl->profile); 1.76 +@@ -1892,7 +1907,21 @@ 1.77 wl_get_assoc_ies(wl); 1.78 memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN); 1.79 wl_update_bss_info(wl); 1.80 -+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) 1.81 ++#if LINUX_VERSION_CODE => KERNEL_VERSION(3, 15, 0) 1.82 ++ wiphy = wl_to_wiphy(wl); 1.83 ++ err = wl_dev_intvar_get(ndev, "chanspec", &chanspec); 1.84 ++ if (err) { 1.85 ++ WL_ERR(("Could not get chanspec, err %d\n", err)); 1.86 ++ return err; 1.87 ++ } 1.88 ++ chan = wf_chspec_ctlchan(chanspec); 1.89 ++ band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; 1.90 ++ freq = ieee80211_channel_to_frequency(chan, band); 1.91 ++ channel = ieee80211_get_channel(wiphy, freq); 1.92 ++ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL); 1.93 ++#else 1.94 cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL); 1.95 -+#else 1.96 -+ cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL); 1.97 +#endif 1.98 set_bit(WL_STATUS_CONNECTED, &wl->status); 1.99 wl->profile->active = true; 1.100 } 1.101 +@@ -2112,7 +2141,11 @@ 1.102 + rcu_read_unlock(); 1.103 + #endif 1.104 + beacon_interval = bss->beacon_interval; 1.105 ++#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0) 1.106 + cfg80211_put_bss(bss); 1.107 ++#else 1.108 ++ cfg80211_put_bss(wl_to_wiphy(wl), bss); 1.109 ++#endif 1.110 + } 1.111 + 1.112 + tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);