1 diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
2 index da36405..d3741eb 100644
3 --- a/src/wl/sys/wl_cfg80211_hybrid.c
4 +++ b/src/wl/sys/wl_cfg80211_hybrid.c
5 @@ -53,7 +53,11 @@ u32 wl_dbg_level = WL_DBG_ERR;
8 static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
9 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
10 + enum nl80211_iftype type, struct vif_params *params);
12 enum nl80211_iftype type, u32 *flags, struct vif_params *params);
14 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
16 wl_cfg80211_scan(struct wiphy *wiphy,
17 @@ -466,7 +470,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
20 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
21 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
22 + enum nl80211_iftype type,
24 enum nl80211_iftype type, u32 *flags,
26 struct vif_params *params)
28 struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
29 @@ -2361,6 +2369,20 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
30 const wl_event_msg_t *e, void *data)
32 struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
33 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
34 + struct cfg80211_bss *bss;
35 + struct wlc_ssid *ssid;
36 + ssid = &wl->profile->ssid;
37 + bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
38 + ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
39 + struct cfg80211_roam_info roam_info = {
41 + .req_ie = conn_info->req_ie,
42 + .req_ie_len = conn_info->req_ie_len,
43 + .resp_ie = conn_info->resp_ie,
44 + .resp_ie_len = conn_info->resp_ie_len,
50 @@ -2368,12 +2390,17 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
51 memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
52 wl_update_bss_info(wl);
54 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
57 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
61 conn_info->req_ie, conn_info->req_ie_len,
62 - conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
63 + conn_info->resp_ie, conn_info->resp_ie_len,
66 WL_DBG(("Report roaming result\n"));
68 set_bit(WL_STATUS_CONNECTED, &wl->status);