wok-6.x view broadcom-wl/stuff/3.14.0.patch @ rev 24944
updated n2n (2.4 -> 3.0)
author | Hans-G?nter Theisgen |
---|---|
date | Fri Apr 22 16:44:33 2022 +0100 (2022-04-22) |
parents | fb26906597c0 |
children |
line source
1 --- a/amd64/src/wl/sys/wl_linux.c
2 +++ a/amd64/src/wl/sys/wl_linux.c
3 @@ -1192,7 +1192,11 @@
4 #else
5 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 29))
7 +#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 17, 0))
8 dev = alloc_netdev(sizeof(wl_if_t), name, ether_setup);
9 +#else
10 + dev = alloc_netdev(sizeof(wl_if_t), name, NET_NAME_UNKNOWN, ether_setup);
11 +#endif
12 wlif = netdev_priv(dev);
13 if (!dev) {
14 #else
15 @@ -3180,6 +3184,7 @@
16 {
17 char tmp[32];
18 sprintf(tmp, "%s%d", HYBRID_PROC, wl->pub->unit);
19 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
20 if ((wl->proc_entry = create_proc_entry(tmp, 0644, NULL)) == NULL) {
21 WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
22 ASSERT(0);
23 @@ -3188,5 +3193,17 @@
24 wl->proc_entry->read_proc = wl_proc_read;
25 wl->proc_entry->write_proc = wl_proc_write;
26 wl->proc_entry->data = wl;
27 +#else
28 + static const struct file_operations wl_proc_fops = {
29 + .owner = THIS_MODULE,
30 + .read = wl_proc_read,
31 + .write = wl_proc_write,
32 + };
33 + if ((wl->proc_entry = proc_create(tmp, 0644, NULL,&wl_proc_fops)) == NULL) {
34 + WL_ERROR(("%s: create_proc_entry %s failed\n", __FUNCTION__, tmp));
35 + ASSERT(0);
36 + return -1;
37 + }
38 +#endif
39 return 0;
40 }
41 --- a/amd64/src/wl/sys/wl_cfg80211.c
42 +++ a/amd64/src/wl/sys/wl_cfg80211.c
43 @@ -1838,8 +1838,13 @@
44 mgmt->u.beacon.capab_info, &bi->BSSID));
46 signal = notif_bss_info->rssi * 100;
47 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
48 if (!cfg80211_inform_bss_frame(wiphy, channel, mgmt,
49 le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL)) {
50 +#else
51 + if (!cfg80211_inform_bss_frame(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, mgmt,
52 + le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL)) {
53 +#endif
54 WL_ERR(("cfg80211_inform_bss_frame error\n"));
55 kfree(notif_bss_info);
56 return -EINVAL;
57 @@ -1857,6 +1862,12 @@
58 u32 event = EVENT_TYPE(e);
59 u16 flags = EVENT_FLAGS(e);
60 u32 status = EVENT_STATUS(e);
61 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
62 + struct ieee80211_channel *channel = NULL;
63 + struct wiphy *wiphy;
64 + u32 chanspec, chan;
65 + u32 freq, band;
66 +#endif
68 WL_DBG(("\n"));
70 @@ -1868,7 +1879,11 @@
71 }
72 else if ((event == WLC_E_LINK && ~(flags & WLC_EVENT_MSG_LINK)) ||
73 event == WLC_E_DEAUTH_IND || event == WLC_E_DISASSOC_IND) {
74 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
75 cfg80211_disconnected(ndev, 0, NULL, 0, GFP_KERNEL);
76 +#else
77 + cfg80211_disconnected(ndev, 0, NULL, 0, false, GFP_KERNEL);
78 +#endif
79 clear_bit(WL_STATUS_CONNECTED, &wl->status);
80 wl_link_down(wl);
81 wl_init_prof(wl->profile);
82 @@ -1892,7 +1907,21 @@
83 wl_get_assoc_ies(wl);
84 memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
85 wl_update_bss_info(wl);
86 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 15, 0)
87 + wiphy = wl_to_wiphy(wl);
88 + err = wl_dev_intvar_get(ndev, "chanspec", &chanspec);
89 + if (err) {
90 + WL_ERR(("Could not get chanspec, err %d\n", err));
91 + return err;
92 + }
93 + chan = wf_chspec_ctlchan(chanspec);
94 + band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
95 + freq = ieee80211_channel_to_frequency(chan, band);
96 + channel = ieee80211_get_channel(wiphy, freq);
97 + cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
98 +#else
99 cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, GFP_KERNEL);
100 +#endif
101 set_bit(WL_STATUS_CONNECTED, &wl->status);
102 wl->profile->active = true;
103 }
104 @@ -2112,7 +2141,11 @@
105 rcu_read_unlock();
106 #endif
107 beacon_interval = bss->beacon_interval;
108 +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 9, 0)
109 cfg80211_put_bss(bss);
110 +#else
111 + cfg80211_put_bss(wl_to_wiphy(wl), bss);
112 +#endif
113 }
115 tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);