003-linux47.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. Since Linux 4.7, the enum ieee80211_band is no longer used
  2. This shall cause no problem's since both enums ieee80211_band
  3. and nl80211_band were added in the same commit:
  4. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c
  5. This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*
  6. Reference:
  7. https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3
  8. --- a/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-13 11:57:36.159340297 -0500
  9. +++ b/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-13 11:58:18.442323435 -0500
  10. @@ -236,7 +236,7 @@
  11. #endif
  12. #define CHAN2G(_channel, _freq, _flags) { \
  13. - .band = IEEE80211_BAND_2GHZ, \
  14. + .band = NL80211_BAND_2GHZ, \
  15. .center_freq = (_freq), \
  16. .hw_value = (_channel), \
  17. .flags = (_flags), \
  18. @@ -245,7 +245,7 @@
  19. }
  20. #define CHAN5G(_channel, _flags) { \
  21. - .band = IEEE80211_BAND_5GHZ, \
  22. + .band = NL80211_BAND_5GHZ, \
  23. .center_freq = 5000 + (5 * (_channel)), \
  24. .hw_value = (_channel), \
  25. .flags = (_flags), \
  26. @@ -379,7 +379,7 @@
  27. };
  28. static struct ieee80211_supported_band __wl_band_2ghz = {
  29. - .band = IEEE80211_BAND_2GHZ,
  30. + .band = NL80211_BAND_2GHZ,
  31. .channels = __wl_2ghz_channels,
  32. .n_channels = ARRAY_SIZE(__wl_2ghz_channels),
  33. .bitrates = wl_g_rates,
  34. @@ -387,7 +387,7 @@
  35. };
  36. static struct ieee80211_supported_band __wl_band_5ghz_a = {
  37. - .band = IEEE80211_BAND_5GHZ,
  38. + .band = NL80211_BAND_5GHZ,
  39. .channels = __wl_5ghz_a_channels,
  40. .n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
  41. .bitrates = wl_a_rates,
  42. @@ -395,7 +395,7 @@
  43. };
  44. static struct ieee80211_supported_band __wl_band_5ghz_n = {
  45. - .band = IEEE80211_BAND_5GHZ,
  46. + .band = NL80211_BAND_5GHZ,
  47. .channels = __wl_5ghz_n_channels,
  48. .n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
  49. .bitrates = wl_a_rates,
  50. @@ -1876,8 +1876,8 @@
  51. wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
  52. #endif
  53. wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
  54. - wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
  55. - wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a;
  56. + wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
  57. + wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a;
  58. wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
  59. wdev->wiphy->cipher_suites = __wl_cipher_suites;
  60. wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
  61. @@ -2000,7 +2000,7 @@
  62. #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
  63. freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
  64. (notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
  65. - IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
  66. + NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
  67. #else
  68. freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
  69. #endif
  70. @@ -2116,7 +2116,7 @@
  71. return err;
  72. }
  73. chan = wf_chspec_ctlchan(chanspec);
  74. - band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
  75. + band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
  76. freq = ieee80211_channel_to_frequency(chan, band);
  77. channel = ieee80211_get_channel(wiphy, freq);
  78. cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
  79. @@ -2250,10 +2250,10 @@
  80. join_params->params.chanspec_list[0] =
  81. ieee80211_frequency_to_channel(chan->center_freq);
  82. - if (chan->band == IEEE80211_BAND_2GHZ) {
  83. + if (chan->band == NL80211_BAND_2GHZ) {
  84. chanspec |= WL_CHANSPEC_BAND_2G;
  85. }
  86. - else if (chan->band == IEEE80211_BAND_5GHZ) {
  87. + else if (chan->band == NL80211_BAND_5GHZ) {
  88. chanspec |= WL_CHANSPEC_BAND_5G;
  89. }
  90. else {
  91. @@ -2885,7 +2885,7 @@
  92. if (phy == 'n' || phy == 'a' || phy == 'v') {
  93. wiphy = wl_to_wiphy(wl);
  94. - wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
  95. + wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
  96. }
  97. return err;