Revision 11261,
4.4 KB
checked in by ara_t, 7 years ago
(diff) |
update: self-build-broadcom-wl
|
-
Since Linux 4.7, the enum ieee80211_band is no longer used
This shall cause no problem's since both enums ieee80211_band
and nl80211_band were added in the same commit:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c
This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*
Reference:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3
This patch is based on
https://github.com/archlinuxcn/repo/tree/f4d6cff1cacf8dad13006fade5f96bc2cf020a9b/broadcom-wl-dkms .
old
|
new
|
static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] |
236 | 236 | #endif |
237 | 237 | |
238 | 238 | #define CHAN2G(_channel, _freq, _flags) { \ |
239 | | .band = IEEE80211_BAND_2GHZ, \ |
| 239 | .band = NL80211_BAND_2GHZ, \ |
240 | 240 | .center_freq = (_freq), \ |
241 | 241 | .hw_value = (_channel), \ |
242 | 242 | .flags = (_flags), \ |
… |
… |
static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] |
245 | 245 | } |
246 | 246 | |
247 | 247 | #define CHAN5G(_channel, _flags) { \ |
248 | | .band = IEEE80211_BAND_5GHZ, \ |
| 248 | .band = NL80211_BAND_5GHZ, \ |
249 | 249 | .center_freq = 5000 + (5 * (_channel)), \ |
250 | 250 | .hw_value = (_channel), \ |
251 | 251 | .flags = (_flags), \ |
… |
… |
static struct ieee80211_channel __wl_5gh |
379 | 379 | }; |
380 | 380 | |
381 | 381 | static struct ieee80211_supported_band __wl_band_2ghz = { |
382 | | .band = IEEE80211_BAND_2GHZ, |
| 382 | .band = NL80211_BAND_2GHZ, |
383 | 383 | .channels = __wl_2ghz_channels, |
384 | 384 | .n_channels = ARRAY_SIZE(__wl_2ghz_channels), |
385 | 385 | .bitrates = wl_g_rates, |
… |
… |
static struct ieee80211_supported_band _ |
387 | 387 | }; |
388 | 388 | |
389 | 389 | static struct ieee80211_supported_band __wl_band_5ghz_a = { |
390 | | .band = IEEE80211_BAND_5GHZ, |
| 390 | .band = NL80211_BAND_5GHZ, |
391 | 391 | .channels = __wl_5ghz_a_channels, |
392 | 392 | .n_channels = ARRAY_SIZE(__wl_5ghz_a_channels), |
393 | 393 | .bitrates = wl_a_rates, |
… |
… |
static struct ieee80211_supported_band _ |
395 | 395 | }; |
396 | 396 | |
397 | 397 | static struct ieee80211_supported_band __wl_band_5ghz_n = { |
398 | | .band = IEEE80211_BAND_5GHZ, |
| 398 | .band = NL80211_BAND_5GHZ, |
399 | 399 | .channels = __wl_5ghz_n_channels, |
400 | 400 | .n_channels = ARRAY_SIZE(__wl_5ghz_n_channels), |
401 | 401 | .bitrates = wl_a_rates, |
… |
… |
static s32 wl_alloc_wdev(struct device * |
1876 | 1876 | wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX; |
1877 | 1877 | #endif |
1878 | 1878 | wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC); |
1879 | | wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz; |
1880 | | wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; |
| 1879 | wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz; |
| 1880 | wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; |
1881 | 1881 | wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; |
1882 | 1882 | wdev->wiphy->cipher_suites = __wl_cipher_suites; |
1883 | 1883 | wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites); |
… |
… |
static s32 wl_inform_single_bss(struct w |
2000 | 2000 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) |
2001 | 2001 | freq = ieee80211_channel_to_frequency(notif_bss_info->channel, |
2002 | 2002 | (notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ? |
2003 | | IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ); |
| 2003 | NL80211_BAND_2GHZ : NL80211_BAND_5GHZ); |
2004 | 2004 | #else |
2005 | 2005 | freq = ieee80211_channel_to_frequency(notif_bss_info->channel); |
2006 | 2006 | #endif |
… |
… |
wl_notify_connect_status(struct wl_cfg80 |
2116 | 2116 | return err; |
2117 | 2117 | } |
2118 | 2118 | chan = wf_chspec_ctlchan(chanspec); |
2119 | | band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ; |
| 2119 | band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ; |
2120 | 2120 | freq = ieee80211_channel_to_frequency(chan, band); |
2121 | 2121 | channel = ieee80211_get_channel(wiphy, freq); |
2122 | 2122 | cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL); |
… |
… |
static void wl_ch_to_chanspec(struct iee |
2250 | 2250 | join_params->params.chanspec_list[0] = |
2251 | 2251 | ieee80211_frequency_to_channel(chan->center_freq); |
2252 | 2252 | |
2253 | | if (chan->band == IEEE80211_BAND_2GHZ) { |
| 2253 | if ( (int) chan->band == (int) NL80211_BAND_2GHZ) { |
2254 | 2254 | chanspec |= WL_CHANSPEC_BAND_2G; |
2255 | 2255 | } |
2256 | | else if (chan->band == IEEE80211_BAND_5GHZ) { |
| 2256 | else if ( (int) chan->band == (int) NL80211_BAND_5GHZ) { |
2257 | 2257 | chanspec |= WL_CHANSPEC_BAND_5G; |
2258 | 2258 | } |
2259 | 2259 | else { |
… |
… |
static s32 wl_update_wiphybands(struct w |
2885 | 2885 | |
2886 | 2886 | if (phy == 'n' || phy == 'a' || phy == 'v') { |
2887 | 2887 | wiphy = wl_to_wiphy(wl); |
2888 | | wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n; |
| 2888 | wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n; |
2889 | 2889 | } |
2890 | 2890 | |
2891 | 2891 | return err; |
Note: See
TracBrowser
for help on using the repository browser.