rev |
line source |
shann@25643
|
1 From 0b888bf115612074df99654140a1980111c29748 Mon Sep 17 00:00:00 2001
|
shann@25643
|
2 From: Antoine Cotten <tonio.cotten@gmail.com>
|
shann@25643
|
3 Date: Fri, 7 Jul 2017 15:17:47 +0200
|
shann@25643
|
4 Subject: [PATCH] Apply patch from Debian bug #867258
|
shann@25643
|
5
|
shann@25643
|
6 Compile fix with kernel 4.12
|
shann@25643
|
7 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=867258
|
shann@25643
|
8 ---
|
shann@25643
|
9 src/wl/sys/wl_cfg80211_hybrid.c | 29 +++++++++++++++++++++++++----
|
shann@25643
|
10 1 file changed, 25 insertions(+), 4 deletions(-)
|
shann@25643
|
11
|
shann@25643
|
12 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
|
shann@25643
|
13 index c46944a..1a9840a 100644
|
shann@25643
|
14 --- a/src/wl/sys/wl_cfg80211_hybrid.c
|
shann@25643
|
15 +++ b/src/wl/sys/wl_cfg80211_hybrid.c
|
shann@25643
|
16 @@ -53,7 +53,11 @@ u32 wl_dbg_level = WL_DBG_ERR;
|
shann@25643
|
17 #endif
|
shann@25643
|
18
|
shann@25643
|
19 static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
|
shann@25643
|
20 - enum nl80211_iftype type, u32 *flags, struct vif_params *params);
|
shann@25643
|
21 + enum nl80211_iftype type,
|
shann@25643
|
22 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
shann@25643
|
23 + u32 *flags,
|
shann@25643
|
24 +#endif
|
shann@25643
|
25 + struct vif_params *params);
|
shann@25643
|
26 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
|
shann@25643
|
27 static s32
|
shann@25643
|
28 wl_cfg80211_scan(struct wiphy *wiphy,
|
shann@25643
|
29 @@ -466,8 +470,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
|
shann@25643
|
30
|
shann@25643
|
31 static s32
|
shann@25643
|
32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
|
shann@25643
|
33 - enum nl80211_iftype type, u32 *flags,
|
shann@25643
|
34 - struct vif_params *params)
|
shann@25643
|
35 + enum nl80211_iftype type,
|
shann@25643
|
36 +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
|
shann@25643
|
37 + u32 *flags,
|
shann@25643
|
38 +#endif
|
shann@25643
|
39 + struct vif_params *params)
|
shann@25643
|
40 {
|
shann@25643
|
41 struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
|
shann@25643
|
42 struct wireless_dev *wdev;
|
shann@25643
|
43 @@ -2387,6 +2394,15 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
|
shann@25643
|
44 const wl_event_msg_t *e, void *data)
|
shann@25643
|
45 {
|
shann@25643
|
46 struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
|
shann@25643
|
47 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
shann@25643
|
48 + struct cfg80211_roam_info roam_info = {
|
shann@25643
|
49 + .bssid = wl->profile->bssid,
|
shann@25643
|
50 + .req_ie = conn_info->req_ie,
|
shann@25643
|
51 + .req_ie_len = conn_info->req_ie_len,
|
shann@25643
|
52 + .resp_ie = conn_info->resp_ie,
|
shann@25643
|
53 + .resp_ie_len = conn_info->resp_ie_len,
|
shann@25643
|
54 + };
|
shann@25643
|
55 +#endif
|
shann@25643
|
56 s32 err = 0;
|
shann@25643
|
57
|
shann@25643
|
58 err = wl_get_assoc_ies(wl);
|
shann@25643
|
59 @@ -2401,12 +2417,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
|
shann@25643
|
60 return err;
|
shann@25643
|
61
|
shann@25643
|
62 cfg80211_roamed(ndev,
|
shann@25643
|
63 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
|
shann@25643
|
64 + &roam_info,
|
shann@25643
|
65 +#else
|
shann@25643
|
66 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
|
shann@25643
|
67 &wl->conf->channel,
|
shann@25643
|
68 #endif
|
shann@25643
|
69 (u8 *)&wl->bssid,
|
shann@25643
|
70 conn_info->req_ie, conn_info->req_ie_len,
|
shann@25643
|
71 - conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
|
shann@25643
|
72 + conn_info->resp_ie, conn_info->resp_ie_len,
|
shann@25643
|
73 +#endif
|
shann@25643
|
74 + GFP_KERNEL);
|
shann@25643
|
75 WL_DBG(("Report roaming result\n"));
|
shann@25643
|
76
|
shann@25643
|
77 set_bit(WL_STATUS_CONNECTED, &wl->status);
|
shann@25643
|
78
|