blob: 71721e63ed4c2531584ed23364837455cf34c0cd [file] [log] [blame]
Jon West56e83b32021-04-14 12:38:06 -04001--- a/src/wl/sys/wl_cfg80211_hybrid.c
2+++ b/src/wl/sys/wl_cfg80211_hybrid.c
3@@ -49,8 +49,6 @@ u32 wl_dbg_level = WL_DBG_ERR | WL_DBG_I
4 u32 wl_dbg_level = WL_DBG_ERR;
5 #endif
6
7-static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
8- enum nl80211_iftype type, u32 *flags, struct vif_params *params);
9 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
10 static s32
11 wl_cfg80211_scan(struct wiphy *wiphy,
12@@ -461,10 +459,15 @@ wl_dev_ioctl(struct net_device *dev, u32
13 return err;
14 }
15
16+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
17 static s32
18 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
19+ enum nl80211_iftype type, struct vif_params *params)
20+#else
21+wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
22 enum nl80211_iftype type, u32 *flags,
23 struct vif_params *params)
24+#endif
25 {
26 struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
27 struct wireless_dev *wdev;
28@@ -2364,6 +2367,7 @@ wl_bss_roaming_done(struct wl_cfg80211_p
29 memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
30 memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
31 wl_update_bss_info(wl);
32+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
33 cfg80211_roamed(ndev,
34 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
35 &wl->conf->channel,
36@@ -2371,6 +2375,20 @@ wl_bss_roaming_done(struct wl_cfg80211_p
37 (u8 *)&wl->bssid,
38 conn_info->req_ie, conn_info->req_ie_len,
39 conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
40+#else
41+ {
42+ struct cfg80211_roam_info r = {
43+ .channel = &wl->conf->channel,
44+ .bssid = (u8 *)&wl->bssid,
45+ .req_ie = conn_info->req_ie,
46+ .req_ie_len = conn_info->req_ie_len,
47+ .resp_ie = conn_info->resp_ie,
48+ .resp_ie_len = conn_info->resp_ie_len,
49+ };
50+ cfg80211_roamed(ndev, &r, GFP_KERNEL);
51+
52+ }
53+#endif
54 WL_DBG(("Report roaming result\n"));
55
56 set_bit(WL_STATUS_CONNECTED, &wl->status);