source: projects/specs/trunk/nonfree/self-build-broadcom-wl/15-linux47.patch @ 11261

Revision 11261, 4.4 KB checked in by ara_t, 6 years ago (diff)

update: self-build-broadcom-wl

RevLine 
[11261]1Since Linux 4.7, the enum ieee80211_band is no longer used
2
3This shall cause no problem's since both enums ieee80211_band
4and nl80211_band were added in the same commit:
5https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c
6
7This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*
8
9Reference:
10https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3
11
12This patch is based on
13https://github.com/archlinuxcn/repo/tree/f4d6cff1cacf8dad13006fade5f96bc2cf020a9b/broadcom-wl-dkms .
14
15Index: broadcom-sta/amd64/src/wl/sys/wl_cfg80211_hybrid.c
16===================================================================
17--- broadcom-sta.orig/amd64/src/wl/sys/wl_cfg80211_hybrid.c
18+++ broadcom-sta/amd64/src/wl/sys/wl_cfg80211_hybrid.c
19@@ -236,7 +236,7 @@ static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX]
20 #endif                         
21 
22 #define CHAN2G(_channel, _freq, _flags) {                      \
23-       .band                   = IEEE80211_BAND_2GHZ,          \
24+       .band                   = NL80211_BAND_2GHZ,            \
25        .center_freq            = (_freq),                      \
26        .hw_value               = (_channel),                   \
27        .flags                  = (_flags),                     \
28@@ -245,7 +245,7 @@ static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX]
29 }
30 
31 #define CHAN5G(_channel, _flags) {                             \
32-       .band                   = IEEE80211_BAND_5GHZ,          \
33+       .band                   = NL80211_BAND_5GHZ,            \
34        .center_freq            = 5000 + (5 * (_channel)),      \
35        .hw_value               = (_channel),                   \
36        .flags                  = (_flags),                     \
37@@ -379,7 +379,7 @@ static struct ieee80211_channel __wl_5gh
38 };
39 
40 static struct ieee80211_supported_band __wl_band_2ghz = {
41-       .band = IEEE80211_BAND_2GHZ,
42+       .band = NL80211_BAND_2GHZ,
43        .channels = __wl_2ghz_channels,
44        .n_channels = ARRAY_SIZE(__wl_2ghz_channels),
45        .bitrates = wl_g_rates,
46@@ -387,7 +387,7 @@ static struct ieee80211_supported_band _
47 };
48 
49 static struct ieee80211_supported_band __wl_band_5ghz_a = {
50-       .band = IEEE80211_BAND_5GHZ,
51+       .band = NL80211_BAND_5GHZ,
52        .channels = __wl_5ghz_a_channels,
53        .n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
54        .bitrates = wl_a_rates,
55@@ -395,7 +395,7 @@ static struct ieee80211_supported_band _
56 };
57 
58 static struct ieee80211_supported_band __wl_band_5ghz_n = {
59-       .band = IEEE80211_BAND_5GHZ,
60+       .band = NL80211_BAND_5GHZ,
61        .channels = __wl_5ghz_n_channels,
62        .n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
63        .bitrates = wl_a_rates,
64@@ -1876,8 +1876,8 @@ static s32 wl_alloc_wdev(struct device *
65        wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
66 #endif
67        wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
68-       wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
69-       wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a;
70+       wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
71+       wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a;
72        wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
73        wdev->wiphy->cipher_suites = __wl_cipher_suites;
74        wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
75@@ -2000,7 +2000,7 @@ static s32 wl_inform_single_bss(struct w
76 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
77        freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
78                (notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
79-               IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
80+               NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
81 #else
82        freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
83 #endif
84@@ -2116,7 +2116,7 @@ wl_notify_connect_status(struct wl_cfg80
85                                return err;
86                        }
87                        chan = wf_chspec_ctlchan(chanspec);
88-                       band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
89+                       band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
90                        freq = ieee80211_channel_to_frequency(chan, band);
91                        channel = ieee80211_get_channel(wiphy, freq);
92                        cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
93@@ -2250,10 +2250,10 @@ static void wl_ch_to_chanspec(struct iee
94                join_params->params.chanspec_list[0] =
95                    ieee80211_frequency_to_channel(chan->center_freq);
96 
97-               if (chan->band == IEEE80211_BAND_2GHZ) {
98+               if ( (int) chan->band == (int) NL80211_BAND_2GHZ) {
99                        chanspec |= WL_CHANSPEC_BAND_2G;
100                }
101-               else if (chan->band == IEEE80211_BAND_5GHZ) {
102+               else if ( (int) chan->band == (int) NL80211_BAND_5GHZ) {
103                        chanspec |= WL_CHANSPEC_BAND_5G;
104                }
105                else {
106@@ -2885,7 +2885,7 @@ static s32 wl_update_wiphybands(struct w
107 
108        if (phy == 'n' || phy == 'a' || phy == 'v') {
109                wiphy = wl_to_wiphy(wl);
110-               wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
111+               wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
112        }
113 
114        return err;
Note: See TracBrowser for help on using the repository browser.