File broadcom-sta-6.30.223.271-r4-linux-4.7.patch of Package broadcom-wl

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