diff --git a/src/shared/linux_osl.c b/src/shared/linux_osl.c
index 6157d18..54a9ace 100644
--- a/src/shared/linux_osl.c
+++ b/src/shared/linux_osl.c
@@ -932,7 +932,11 @@ osl_getcycles(void)
 	uint cycles;
 
 #if defined(__i386__)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0)
+	cycles = (u32)rdtsc();
+#else
 	rdtscl(cycles);
+#endif
 #else
 	cycles = 0;
 #endif 
@@ -1076,7 +1080,11 @@ osl_os_get_image_block(char *buf, int len, void *image)
 	if (!image)
 		return 0;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+	rdlen = kernel_read(fp, buf, len, &fp->f_pos);
+#else
 	rdlen = kernel_read(fp, fp->f_pos, buf, len);
+#endif
 	if (rdlen > 0)
 		fp->f_pos += rdlen;
 
diff --git a/src/wl/sys/wl_cfg80211_hybrid.c b/src/wl/sys/wl_cfg80211_hybrid.c
index 7b606e0..9a27451 100644
--- a/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
@@ -39,6 +39,10 @@
 #include <proto/802.11.h>
 #include <wl_cfg80211_hybrid.h>
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0)
+#include <linux/sched/signal.h>
+#endif
+
 #define EVENT_TYPE(e) dtoh32((e)->event_type)
 #define EVENT_FLAGS(e) dtoh16((e)->flags)
 #define EVENT_STATUS(e) dtoh32((e)->status)
@@ -50,7 +54,11 @@ u32 wl_dbg_level = WL_DBG_ERR;
 #endif
 
 static s32 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
-           enum nl80211_iftype type, u32 *flags, struct vif_params *params);
+           enum nl80211_iftype type, 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
+           u32 *flags, 
+#endif
+           struct vif_params *params);
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 6, 0)
 static s32
 wl_cfg80211_scan(struct wiphy *wiphy,
@@ -235,6 +243,25 @@ static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] = {
 };
 #endif				
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+#define CHAN2G(_channel, _freq, _flags) {			\
+	.band			= NL80211_BAND_2GHZ,		\
+	.center_freq		= (_freq),			\
+	.hw_value		= (_channel),			\
+	.flags			= (_flags),			\
+	.max_antenna_gain	= 0,				\
+	.max_power		= 30,				\
+}
+
+#define CHAN5G(_channel, _flags) {				\
+	.band			= NL80211_BAND_5GHZ,		\
+	.center_freq		= 5000 + (5 * (_channel)),	\
+	.hw_value		= (_channel),			\
+	.flags			= (_flags),			\
+	.max_antenna_gain	= 0,				\
+	.max_power		= 30,				\
+}
+#else
 #define CHAN2G(_channel, _freq, _flags) {			\
 	.band			= IEEE80211_BAND_2GHZ,		\
 	.center_freq		= (_freq),			\
@@ -252,6 +279,7 @@ static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] = {
 	.max_antenna_gain	= 0,				\
 	.max_power		= 30,				\
 }
+#endif
 
 #define RATE_TO_BASE100KBPS(rate)   (((rate) * 10) / 2)
 #define RATETAB_ENT(_rateid, _flags) \
@@ -379,7 +407,11 @@ static struct ieee80211_channel __wl_5ghz_n_channels[] = {
 };
 
 static struct ieee80211_supported_band __wl_band_2ghz = {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+	.band = NL80211_BAND_2GHZ,
+#else
 	.band = IEEE80211_BAND_2GHZ,
+#endif
 	.channels = __wl_2ghz_channels,
 	.n_channels = ARRAY_SIZE(__wl_2ghz_channels),
 	.bitrates = wl_g_rates,
@@ -387,7 +419,11 @@ static struct ieee80211_supported_band __wl_band_2ghz = {
 };
 
 static struct ieee80211_supported_band __wl_band_5ghz_a = {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+	.band = NL80211_BAND_5GHZ,
+#else
 	.band = IEEE80211_BAND_5GHZ,
+#endif
 	.channels = __wl_5ghz_a_channels,
 	.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
 	.bitrates = wl_a_rates,
@@ -395,7 +431,11 @@ static struct ieee80211_supported_band __wl_band_5ghz_a = {
 };
 
 static struct ieee80211_supported_band __wl_band_5ghz_n = {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+	.band = NL80211_BAND_5GHZ,
+#else
 	.band = IEEE80211_BAND_5GHZ,
+#endif
 	.channels = __wl_5ghz_n_channels,
 	.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
 	.bitrates = wl_a_rates,
@@ -463,8 +503,11 @@ wl_dev_ioctl(struct net_device *dev, u32 cmd, void *arg, u32 len)
 
 static s32
 wl_cfg80211_change_iface(struct wiphy *wiphy, struct net_device *ndev,
-                         enum nl80211_iftype type, u32 *flags,
-   struct vif_params *params)
+                         enum nl80211_iftype type,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
+                         u32 *flags,
+#endif
+                         struct vif_params *params)
 {
 	struct wl_cfg80211_priv *wl = wiphy_to_wl(wiphy);
 	struct wireless_dev *wdev;
@@ -1876,8 +1919,13 @@ static s32 wl_alloc_wdev(struct device *dev, struct wireless_dev **rwdev)
 	wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
 #endif
 	wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+	wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
+	wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; 
+#else
 	wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
 	wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; 
+#endif
 	wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
 	wdev->wiphy->cipher_suites = __wl_cipher_suites;
 	wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
@@ -1968,7 +2016,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
 
 	if (dtoh32(bi->length) > WL_BSS_INFO_MAX) {
 		WL_DBG(("Beacon is larger than buffer. Discarding\n"));
-		return err;
+		return -E2BIG;
 	}
 	notif_bss_info = kzalloc(sizeof(*notif_bss_info) + sizeof(*mgmt) - sizeof(u8) +
 	                         WL_BSS_INFO_MAX, GFP_KERNEL);
@@ -1992,28 +2040,38 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
 	beacon_proberesp->capab_info = cpu_to_le16(bi->capability);
 	wl_rst_ie(wl);
 
-	wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
-	wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
-	         offsetof(struct wl_cfg80211_bss_info, frame_buf));
+	err = wl_mrg_ie(wl, ((u8 *) bi) + bi->ie_offset, bi->ie_length);
+	if (err)
+		goto inform_single_bss_out;
+
+	err = wl_cp_ie(wl, beacon_proberesp->variable, WL_BSS_INFO_MAX -
+	               offsetof(struct wl_cfg80211_bss_info, frame_buf));
+	if (err)
+		goto inform_single_bss_out;
+
 	notif_bss_info->frame_len = offsetof(struct ieee80211_mgmt, u.beacon.variable) +
 	                            wl_get_ielen(wl);
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
 		(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+		NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
+#else
 		IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
+#endif
 #else
 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
 #endif
 	if (freq == 0) {
 		WL_ERR(("Invalid channel, fail to chcnage channel to freq\n"));
-		kfree(notif_bss_info);
-		return -EINVAL;
+		err = -EINVAL;
+		goto inform_single_bss_out;
 	}
 	channel = ieee80211_get_channel(wiphy, freq);
 	if (unlikely(!channel)) {
 		WL_ERR(("ieee80211_get_channel error\n"));
-		kfree(notif_bss_info);
-		return -EINVAL;
+		err = -EINVAL;
+		goto inform_single_bss_out;
 	}
 
 	WL_DBG(("SSID : \"%s\", rssi %d, channel %d, capability : 0x04%x, bssid %pM\n",
@@ -2021,28 +2079,35 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
 		mgmt->u.beacon.capab_info, &bi->BSSID));
 
 	signal = notif_bss_info->rssi * 100;
-	cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
-	    le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
-	if (unlikely(!cbss)) {
-		WL_ERR(("cfg80211_inform_bss_frame error\n"));
-		kfree(notif_bss_info);
-		return -EINVAL;
+	if (!wl->scan_request) {
+		cbss = cfg80211_inform_bss_frame(wiphy, channel, mgmt,
+		    le16_to_cpu(notif_bss_info->frame_len), signal, GFP_KERNEL);
+		if (unlikely(!cbss)) {
+			WL_ERR(("cfg80211_inform_bss_frame error\n"));
+			err = -ENOMEM;
+			goto inform_single_bss_out;
+		}
 	}
-
-	notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
-	notify_ielen = le32_to_cpu(bi->ie_length);
+	else {
+		notify_ie = (u8 *)bi + le16_to_cpu(bi->ie_offset);
+		notify_ielen = le32_to_cpu(bi->ie_length);
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
-	cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
-		0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
-		(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+		cbss = cfg80211_inform_bss(wiphy, channel, (const u8 *)(bi->BSSID.octet),
+			0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+			(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
 #else
-	cbss = cfg80211_inform_bss(wiphy, channel, CFG80211_BSS_FTYPE_UNKNOWN, (const u8 *)(bi->BSSID.octet),
-		0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
-		(const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
+		cbss = cfg80211_inform_bss(wiphy, channel, 
+		    wl->active_scan ? CFG80211_BSS_FTYPE_PRESP : CFG80211_BSS_FTYPE_BEACON,
+		    (const u8 *)(bi->BSSID.octet),
+		    0, beacon_proberesp->capab_info, beacon_proberesp->beacon_int,
+		    (const u8 *)notify_ie, notify_ielen, signal, GFP_KERNEL);
 #endif
-
-	if (unlikely(!cbss))
-		return -ENOMEM;
+		if (unlikely(!cbss)) {
+			WL_ERR(("cfg80211_inform_bss error\n"));
+			err = -ENOMEM;
+			goto inform_single_bss_out;
+		}
+	}
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
 	cfg80211_put_bss(wiphy, cbss);
@@ -2050,6 +2115,7 @@ static s32 wl_inform_single_bss(struct wl_cfg80211_priv *wl, struct wl_bss_info
 	cfg80211_put_bss(cbss);
 #endif
 
+inform_single_bss_out:
 	kfree(notif_bss_info);
 
 	return err;
@@ -2116,7 +2182,11 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
 				return err;
 			}
 			chan = wf_chspec_ctlchan(chanspec);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+			band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
+#else
 			band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
+#endif
 			freq = ieee80211_channel_to_frequency(chan, band);
 			channel = ieee80211_get_channel(wiphy, freq);
 			cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
@@ -2250,10 +2320,18 @@ static void wl_ch_to_chanspec(struct ieee80211_channel *chan, struct wl_join_par
 		join_params->params.chanspec_list[0] =
 		    ieee80211_frequency_to_channel(chan->center_freq);
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+		if (chan->band == NL80211_BAND_2GHZ) {
+#else
 		if (chan->band == IEEE80211_BAND_2GHZ) {
+#endif
 			chanspec |= WL_CHANSPEC_BAND_2G;
 		}
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+		else if (chan->band == NL80211_BAND_5GHZ) {
+#else
 		else if (chan->band == IEEE80211_BAND_5GHZ) {
+#endif
 			chanspec |= WL_CHANSPEC_BAND_5G;
 		}
 		else {
@@ -2316,6 +2394,9 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
 		if (err)
 			goto update_bss_info_out;
 
+		bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
+		      ssid->SSID, ssid->SSID_len, WLAN_CAPABILITY_ESS, WLAN_CAPABILITY_ESS);
+
 		ie = ((u8 *)bi) + bi->ie_offset;
 		ie_len = bi->ie_length;
 	} else {
@@ -2328,12 +2409,20 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
 		ie_len = bss->len_information_elements;
 #endif
 		wl->conf->channel = *bss->channel;
+	}
+
+	if (bss) {
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 9, 0)
 		cfg80211_put_bss(wiphy, bss);
 #else
 		cfg80211_put_bss(bss);
 #endif
 	}
+	else {
+		WL_DBG(("Could not update BSS\n"));
+		err = -EINVAL;
+		goto update_bss_info_out;
+	}
 
 	tim = bcm_parse_tlvs(ie, ie_len, WLAN_EID_TIM);
 	if (tim) {
@@ -2358,19 +2447,44 @@ wl_bss_roaming_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
                     const wl_event_msg_t *e, void *data)
 {
 	struct wl_cfg80211_connect_info *conn_info = wl_to_conn(wl);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+	struct cfg80211_roam_info roam_info = {};
+#endif
 	s32 err = 0;
 
-	wl_get_assoc_ies(wl);
+	err = wl_get_assoc_ies(wl);
+	if (err)
+		return err;
+
 	memcpy(wl->profile->bssid, &e->addr, ETHER_ADDR_LEN);
 	memcpy(&wl->bssid, &e->addr, ETHER_ADDR_LEN);
-	wl_update_bss_info(wl);
+
+	err = wl_update_bss_info(wl);
+	if (err)
+		return err;
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 12, 0)
+	roam_info.channel = &wl->conf->channel;
+	roam_info.bssid = (u8*)&wl->bssid;
+	roam_info.req_ie = conn_info->req_ie;
+	roam_info.req_ie_len = conn_info->req_ie_len;
+	roam_info.resp_ie = conn_info->resp_ie;
+	roam_info.resp_ie_len = conn_info->resp_ie_len;
+#endif
+
 	cfg80211_roamed(ndev,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 12, 0)
 #if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39)
 			&wl->conf->channel,	 
 #endif
 			(u8 *)&wl->bssid,
 			conn_info->req_ie, conn_info->req_ie_len,
-			conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
+			conn_info->resp_ie, conn_info->resp_ie_len, 
+#else
+			&roam_info,
+#endif
+			GFP_KERNEL);
+
 	WL_DBG(("Report roaming result\n"));
 
 	set_bit(WL_STATUS_CONNECTED, &wl->status);
@@ -2386,8 +2500,17 @@ wl_bss_connect_done(struct wl_cfg80211_priv *wl, struct net_device *ndev,
 	s32 err = 0;
 
 	if (wl->scan_request) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+		struct cfg80211_scan_info info = {
+			.aborted = true,
+		};
+#endif
 		WL_DBG(("%s: Aborting scan\n", __FUNCTION__));
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+		cfg80211_scan_done(wl->scan_request, &info);     
+#else
 		cfg80211_scan_done(wl->scan_request, true);     
+#endif
 		wl->scan_request = NULL;
 	}
 
@@ -2488,7 +2611,14 @@ wl_notify_scan_status(struct wl_cfg80211_priv *wl, struct net_device *ndev,
 
 scan_done_out:
 	if (wl->scan_request) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+		struct cfg80211_scan_info info = {
+			.aborted = false,
+		};
+		cfg80211_scan_done(wl->scan_request, &info);
+#else
 		cfg80211_scan_done(wl->scan_request, false);
+#endif
 		wl->scan_request = NULL;
 	}
 	rtnl_unlock();
@@ -2885,7 +3015,11 @@ static s32 wl_update_wiphybands(struct wl_cfg80211_priv *wl)
 
 	if (phy == 'n' || phy == 'a' || phy == 'v') {
 		wiphy = wl_to_wiphy(wl);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 7, 0)
+		wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
+#else
 		wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
+#endif
 	}
 
 	return err;
@@ -2913,7 +3047,14 @@ s32 wl_cfg80211_down(struct net_device *ndev)
 	s32 err = 0;
 
 	if (wl->scan_request) {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)
+		struct cfg80211_scan_info info = {
+			.aborted = true,
+		};
+		cfg80211_scan_done(wl->scan_request, &info);
+#else
 		cfg80211_scan_done(wl->scan_request, true);	
+#endif
 		wl->scan_request = NULL;
 	}
 
diff --git a/src/wl/sys/wl_linux.c b/src/wl/sys/wl_linux.c
index 0d05100..660a8ac 100644
--- a/src/wl/sys/wl_linux.c
+++ b/src/wl/sys/wl_linux.c
@@ -93,7 +93,11 @@ struct iw_statistics *wl_get_wireless_stats(struct net_device *dev);
 
 #include <wlc_wowl.h>
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+static void wl_timer(struct timer_list *tl);
+#else
 static void wl_timer(ulong data);
+#endif
 static void _wl_timer(wl_timer_t *t);
 static struct net_device *wl_alloc_linux_if(wl_if_t *wlif);
 
@@ -207,6 +211,7 @@ module_param(macaddr, charp, S_IRUGO);
 
 static int nompc = 0;
 module_param(nompc, int, 0);
+MODULE_LICENSE("Mixed/Proprietary");
 
 #ifdef quote_str
 #undef quote_str
@@ -724,7 +729,11 @@ wl_attach(uint16 vendor, uint16 device, ulong regs,
 		WL_ALL_PASSIVE_ENAB(wl) ?  ", Passive Mode" : "", EPI_VERSION_STR);
 
 #ifdef BCMDBG
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9)
 	printf(" (Compiled in " SRCBASE " at " __TIME__ " on " __DATE__ ")");
+#else 
+	printf(" (Compiled in " SRCBASE ")");
+#endif 
 #endif 
 	printf("\n");
 
@@ -771,9 +780,9 @@ wl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 	pci_read_config_dword(pdev, 0x40, &val);
 	if ((val & 0x0000ff00) != 0)
 		pci_write_config_dword(pdev, 0x40, val & 0xffff00ff);
-		bar1_size = pci_resource_len(pdev, 2);
-		bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
-			bar1_size);
+	bar1_size = pci_resource_len(pdev, 2);
+	bar1_addr = (uchar *)ioremap_nocache(pci_resource_start(pdev, 2),
+		bar1_size);
 	wl = wl_attach(pdev->vendor, pdev->device, pci_resource_start(pdev, 0), PCI_BUS, pdev,
 		pdev->irq, bar1_addr, bar1_size);
 
@@ -2053,8 +2062,13 @@ wl_osl_pcie_rc(struct wl_info *wl, uint op, int param)
 void
 wl_dump_ver(wl_info_t *wl, struct bcmstrbuf *b)
 {
+#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9)
 	bcm_bprintf(b, "wl%d: %s %s version %s\n", wl->pub->unit,
 		__DATE__, __TIME__, EPI_VERSION_STR);
+#else
+	bcm_bprintf(b, "wl%d: version %s\n", wl->pub->unit,
+		EPI_VERSION_STR);
+#endif
 }
 
 #if defined(BCMDBG)
@@ -2165,8 +2179,13 @@ wl_start(struct sk_buff *skb, struct net_device *dev)
 	wlif = WL_DEV_IF(dev);
 	wl = WL_INFO(dev);
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 18, 0)
+	skb->prev = NULL;
+#endif
 	if (WL_ALL_PASSIVE_ENAB(wl) || (WL_RTR() && WL_CONFIG_SMP())) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
 		skb->prev = NULL;
+#endif
 
 		TXQ_LOCK(wl);
 
@@ -2297,10 +2316,17 @@ wl_timer_task(wl_task_t *task)
 	atomic_dec(&t->wl->callbacks);
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+static void
+wl_timer(struct timer_list *tl)
+{
+	wl_timer_t *t = (wl_timer_t *)tl;
+#else
 static void
 wl_timer(ulong data)
 {
 	wl_timer_t *t = (wl_timer_t *)data;
+#endif
 
 	if (!WL_ALL_PASSIVE_ENAB(t->wl))
 		_wl_timer(t);
@@ -2352,9 +2378,13 @@ wl_init_timer(wl_info_t *wl, void (*fn)(void *arg), void *arg, const char *tname
 
 	bzero(t, sizeof(wl_timer_t));
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 15, 0)
+	timer_setup(&t->timer, wl_timer, 0);
+#else
 	init_timer(&t->timer);
 	t->timer.data = (ulong) t;
 	t->timer.function = wl_timer;
+#endif
 	t->wl = wl;
 	t->fn = fn;
 	t->arg = arg;
@@ -2915,7 +2945,9 @@ wl_monitor(wl_info_t *wl, wl_rxsts_t *rxsts, void *p)
 	if (skb == NULL) return;
 
 	skb->dev = wl->monitor_dev;
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(4, 10, 0)
 	skb->dev->last_rx = jiffies;
+#endif
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 22)
 	skb_reset_mac_header(skb);
 #else
