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