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