--- a/x86-32/src/include/bcmutils.h
+++ b/x86-32/src/include/bcmutils.h
@@ -214,7 +214,11 @@ typedef struct bcm_tlv {
 extern int bcm_format_flags(const bcm_bit_desc_t *bd, uint32 flags, char* buf, int len);
 extern int bcm_format_hex(char *str, const void *bytes, int len);
 #endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
 extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key);
+#else
+extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(const void *buf, int buflen, uint key);
+#endif
 
 typedef uint32 mbool;

--- a/x86-32/src/wl/sys/wl_cfg80211.c
+++ b/x86-32/src/wl/sys/wl_cfg80211.c
@@ -702,7 +702,11 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
 	else
 		memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN);
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
 	wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
+#else
+	wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size);
+#endif
 
 	err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
 	if (err) {
@@ -1957,9 +1961,14 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
 	struct wlc_ssid *ssid;
 	struct bcm_tlv *tim;
 	s32 dtim_period;
+	s32 err = 0;
 	size_t ie_len;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
 	u8 *ie;
-	s32 err = 0;
+#else
+	const u8 *ie;
+	const struct cfg80211_bss_ies *ies;
+#endif
 
 	ssid = &wl->profile->ssid;
 	bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
@@ -1988,8 +1997,22 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
 		ie_len = bi->ie_length;
 	} else {
 		WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
 		ie = bss->information_elements;
 		ie_len = bss->len_information_elements;
+#else
+		rcu_read_lock();
+		ies = (const struct cfg80211_bss_ies*)rcu_dereference(bss->ies);
+		if (!ies) {
+			/* This should never happen */
+			rcu_read_unlock();
+			err = -EIO;
+			goto update_bss_info_out;
+		}
+		ie = ies->data;
+		ie_len = (size_t)(ies->len);
+		rcu_read_unlock();
+#endif
 		cfg80211_put_bss(bss);
 	}

--- a/x86-64/src/include/bcmutils.h
+++ b/x86-64/src/include/bcmutils.h
@@ -214,7 +214,11 @@ typedef struct bcm_tlv {
 extern int bcm_format_flags(const bcm_bit_desc_t *bd, uint32 flags, char* buf, int len);
 extern int bcm_format_hex(char *str, const void *bytes, int len);
 #endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
 extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(void *buf, int buflen, uint key);
+#else
+extern bcm_tlv_t *BCMROMFN(bcm_parse_tlvs)(const void *buf, int buflen, uint key);
+#endif
 
 typedef uint32 mbool;

--- a/x86-64/src/wl/sys/wl_cfg80211.c
+++ b/x86-64/src/wl/sys/wl_cfg80211.c
@@ -702,7 +702,11 @@ wl_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
 	else
 		memset(&join_params.params.bssid, 0, ETHER_ADDR_LEN);
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
 	wl_ch_to_chanspec(params->channel, &join_params, &join_params_size);
+#else
+	wl_ch_to_chanspec(params->chandef.chan, &join_params, &join_params_size);
+#endif
 
 	err = wl_dev_ioctl(dev, WLC_SET_SSID, &join_params, join_params_size);
 	if (err) {
@@ -1957,9 +1961,14 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
 	struct wlc_ssid *ssid;
 	struct bcm_tlv *tim;
 	s32 dtim_period;
+	s32 err = 0;
 	size_t ie_len;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
 	u8 *ie;
-	s32 err = 0;
+#else
+	const u8 *ie;
+	const struct cfg80211_bss_ies *ies;
+#endif
 
 	ssid = &wl->profile->ssid;
 	bss = cfg80211_get_bss(wl_to_wiphy(wl), NULL, (s8 *)&wl->bssid,
@@ -1988,8 +1997,22 @@ static s32 wl_update_bss_info(struct wl_cfg80211_priv *wl)
 		ie_len = bi->ie_length;
 	} else {
 		WL_DBG(("Found the AP in the list - BSSID %pM\n", bss->bssid));
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 8, 0)
 		ie = bss->information_elements;
 		ie_len = bss->len_information_elements;
+#else
+		rcu_read_lock();
+		ies = (const struct cfg80211_bss_ies*)rcu_dereference(bss->ies);
+		if (!ies) {
+			/* This should never happen */
+			rcu_read_unlock();
+			err = -EIO;
+			goto update_bss_info_out;
+		}
+		ie = ies->data;
+		ie_len = (size_t)(ies->len);
+		rcu_read_unlock();
+#endif
 		cfg80211_put_bss(bss);
 	}
