bcmwl-kernel-source and linux kernel 4.7

Javad Karabi karabijavad at gmail.com
Thu Jun 30 07:57:12 UTC 2016


it looks like IEEE80211_BAND_2GHZ/IEEE80211_BAND_5GHZ, has been renamed
to NL80211_BAND_2GHZ/NL80211_BAND_5GHZ

i have tested the below patch on my machine, and i am able to successfully
build, and use, my wireless adapter with it



diff --git a/src/wl/sys/wl_cfg80211_hybrid.c
b/src/wl/sys/wl_cfg80211_hybrid.c
index de0cc4b..b58268c 100644
--- a/src/wl/sys/wl_cfg80211_hybrid.c
+++ b/src/wl/sys/wl_cfg80211_hybrid.c
@@ -234,7 +234,7 @@ static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] = {
 #endif

 #define CHAN2G(_channel, _freq, _flags) { \
- .band = IEEE80211_BAND_2GHZ, \
+ .band = NL80211_BAND_2GHZ, \
  .center_freq = (_freq), \
  .hw_value = (_channel), \
  .flags = (_flags), \
@@ -243,7 +243,7 @@ static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] = {
 }

 #define CHAN5G(_channel, _flags) { \
- .band = IEEE80211_BAND_5GHZ, \
+ .band = NL80211_BAND_5GHZ, \
  .center_freq = 5000 + (5 * (_channel)), \
  .hw_value = (_channel), \
  .flags = (_flags), \
@@ -377,7 +377,7 @@ static struct ieee80211_channel __wl_5ghz_n_channels[]
= {
 };

 static struct ieee80211_supported_band __wl_band_2ghz = {
- .band = IEEE80211_BAND_2GHZ,
+ .band = NL80211_BAND_2GHZ,
  .channels = __wl_2ghz_channels,
  .n_channels = ARRAY_SIZE(__wl_2ghz_channels),
  .bitrates = wl_g_rates,
@@ -385,7 +385,7 @@ static struct ieee80211_supported_band __wl_band_2ghz =
{
 };

 static struct ieee80211_supported_band __wl_band_5ghz_a = {
- .band = IEEE80211_BAND_5GHZ,
+ .band = NL80211_BAND_5GHZ,
  .channels = __wl_5ghz_a_channels,
  .n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
  .bitrates = wl_a_rates,
@@ -393,7 +393,7 @@ static struct ieee80211_supported_band __wl_band_5ghz_a
= {
 };

 static struct ieee80211_supported_band __wl_band_5ghz_n = {
- .band = IEEE80211_BAND_5GHZ,
+ .band = NL80211_BAND_5GHZ,
  .channels = __wl_5ghz_n_channels,
  .n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
  .bitrates = wl_a_rates,
@@ -1874,8 +1874,8 @@ 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);
- wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
- wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a;
+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
+ wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a;
  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);
@@ -1998,7 +1998,7 @@ static s32 wl_inform_single_bss(struct
wl_cfg80211_priv *wl, struct wl_bss_info
 #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) ?
- IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
+ NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
 #else
  freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
 #endif
@@ -2112,7 +2112,7 @@ wl_notify_connect_status(struct wl_cfg80211_priv *wl,
struct net_device *ndev,

  freq = ieee80211_channel_to_frequency(bss_info_channel,
  (bss_info_channel <= CH_MAX_2G_CHANNEL) ?
- IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
+ NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);

  channel = ieee80211_get_channel(wl_to_wiphy(wl), freq);
  cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
@@ -2247,10 +2247,10 @@ 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 (chan->band == IEEE80211_BAND_2GHZ) {
+ if (chan->band == NL80211_BAND_2GHZ) {
  chanspec |= WL_CHANSPEC_BAND_2G;
  }
- else if (chan->band == IEEE80211_BAND_5GHZ) {
+ else if (chan->band == NL80211_BAND_5GHZ) {
  chanspec |= WL_CHANSPEC_BAND_5G;
  }
  else {
@@ -2876,7 +2876,7 @@ static s32 wl_update_wiphybands(struct
wl_cfg80211_priv *wl)

  if (phy == 'n' || phy == 'a' || phy == 'v') {
  wiphy = wl_to_wiphy(wl);
- wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
+ wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
  }

  return err;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20160630/cbe032c8/attachment.html>


More information about the Ubuntu-devel-discuss mailing list