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

  • amd64/src/wl/sys/wl_cfg80211_hybrid.c

    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] 
    236236#endif                           
    237237 
    238238#define CHAN2G(_channel, _freq, _flags) {                       \ 
    239         .band                   = IEEE80211_BAND_2GHZ,          \ 
     239        .band                   = NL80211_BAND_2GHZ,            \ 
    240240        .center_freq            = (_freq),                      \ 
    241241        .hw_value               = (_channel),                   \ 
    242242        .flags                  = (_flags),                     \ 
    static s8 wl_dbg_estr[][WL_DBG_ESTR_MAX] 
    245245} 
    246246 
    247247#define CHAN5G(_channel, _flags) {                              \ 
    248         .band                   = IEEE80211_BAND_5GHZ,          \ 
     248        .band                   = NL80211_BAND_5GHZ,            \ 
    249249        .center_freq            = 5000 + (5 * (_channel)),      \ 
    250250        .hw_value               = (_channel),                   \ 
    251251        .flags                  = (_flags),                     \ 
    static struct ieee80211_channel __wl_5gh 
    379379}; 
    380380 
    381381static struct ieee80211_supported_band __wl_band_2ghz = { 
    382         .band = IEEE80211_BAND_2GHZ, 
     382        .band = NL80211_BAND_2GHZ, 
    383383        .channels = __wl_2ghz_channels, 
    384384        .n_channels = ARRAY_SIZE(__wl_2ghz_channels), 
    385385        .bitrates = wl_g_rates, 
    static struct ieee80211_supported_band _ 
    387387}; 
    388388 
    389389static struct ieee80211_supported_band __wl_band_5ghz_a = { 
    390         .band = IEEE80211_BAND_5GHZ, 
     390        .band = NL80211_BAND_5GHZ, 
    391391        .channels = __wl_5ghz_a_channels, 
    392392        .n_channels = ARRAY_SIZE(__wl_5ghz_a_channels), 
    393393        .bitrates = wl_a_rates, 
    static struct ieee80211_supported_band _ 
    395395}; 
    396396 
    397397static struct ieee80211_supported_band __wl_band_5ghz_n = { 
    398         .band = IEEE80211_BAND_5GHZ, 
     398        .band = NL80211_BAND_5GHZ, 
    399399        .channels = __wl_5ghz_n_channels, 
    400400        .n_channels = ARRAY_SIZE(__wl_5ghz_n_channels), 
    401401        .bitrates = wl_a_rates, 
    static s32 wl_alloc_wdev(struct device * 
    18761876        wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX; 
    18771877#endif 
    18781878        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;  
    18811881        wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM; 
    18821882        wdev->wiphy->cipher_suites = __wl_cipher_suites; 
    18831883        wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites); 
    static s32 wl_inform_single_bss(struct w 
    20002000#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39) 
    20012001        freq = ieee80211_channel_to_frequency(notif_bss_info->channel, 
    20022002                (notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ? 
    2003                 IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ); 
     2003                NL80211_BAND_2GHZ : NL80211_BAND_5GHZ); 
    20042004#else 
    20052005        freq = ieee80211_channel_to_frequency(notif_bss_info->channel); 
    20062006#endif 
    wl_notify_connect_status(struct wl_cfg80 
    21162116                                return err; 
    21172117                        } 
    21182118                        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; 
    21202120                        freq = ieee80211_channel_to_frequency(chan, band); 
    21212121                        channel = ieee80211_get_channel(wiphy, freq); 
    21222122                        cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL); 
    static void wl_ch_to_chanspec(struct iee 
    22502250                join_params->params.chanspec_list[0] = 
    22512251                    ieee80211_frequency_to_channel(chan->center_freq); 
    22522252 
    2253                 if (chan->band == IEEE80211_BAND_2GHZ) { 
     2253                if ( (int) chan->band == (int) NL80211_BAND_2GHZ) { 
    22542254                        chanspec |= WL_CHANSPEC_BAND_2G; 
    22552255                } 
    2256                 else if (chan->band == IEEE80211_BAND_5GHZ) { 
     2256                else if ( (int) chan->band == (int) NL80211_BAND_5GHZ) { 
    22572257                        chanspec |= WL_CHANSPEC_BAND_5G; 
    22582258                } 
    22592259                else { 
    static s32 wl_update_wiphybands(struct w 
    28852885 
    28862886        if (phy == 'n' || phy == 'a' || phy == 'v') { 
    28872887                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; 
    28892889        } 
    28902890 
    28912891        return err; 
Note: See TracBrowser for help on using the repository browser.