wok-current diff broadcom-wl/stuff/003-linux47.patch @ rev 25673

Up broadcom-wl drivers, add miss driver for mesa-dri (iris, crocus, virtio)
author Stanislas Leduc <shann@slitaz.org>
date Mon Mar 04 16:57:21 2024 +0000 (4 months ago)
parents
children
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/broadcom-wl/stuff/003-linux47.patch	Mon Mar 04 16:57:21 2024 +0000
     1.3 @@ -0,0 +1,109 @@
     1.4 +Since Linux 4.7, the enum ieee80211_band is no longer used
     1.5 +
     1.6 +This shall cause no problem's since both enums ieee80211_band
     1.7 +and nl80211_band were added in the same commit:
     1.8 +https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=13ae75b103e07304a34ab40c9136e9f53e06475c
     1.9 +
    1.10 +This patch refactors the references of IEEE80211_BAND_* to NL80211_BAND_*
    1.11 +
    1.12 +Reference:
    1.13 +https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit?id=57fbcce37be7c1d2622b56587c10ade00e96afa3
    1.14 +
    1.15 +--- a/src/wl/sys/wl_cfg80211_hybrid.c	2016-06-13 11:57:36.159340297 -0500
    1.16 ++++ b/src/wl/sys/wl_cfg80211_hybrid.c	2016-06-13 11:58:18.442323435 -0500
    1.17 +@@ -236,7 +236,7 @@
    1.18 + #endif				
    1.19 + 
    1.20 + #define CHAN2G(_channel, _freq, _flags) {			\
    1.21 +-	.band			= IEEE80211_BAND_2GHZ,		\
    1.22 ++	.band			= NL80211_BAND_2GHZ,		\
    1.23 + 	.center_freq		= (_freq),			\
    1.24 + 	.hw_value		= (_channel),			\
    1.25 + 	.flags			= (_flags),			\
    1.26 +@@ -245,7 +245,7 @@
    1.27 + }
    1.28 + 
    1.29 + #define CHAN5G(_channel, _flags) {				\
    1.30 +-	.band			= IEEE80211_BAND_5GHZ,		\
    1.31 ++	.band			= NL80211_BAND_5GHZ,		\
    1.32 + 	.center_freq		= 5000 + (5 * (_channel)),	\
    1.33 + 	.hw_value		= (_channel),			\
    1.34 + 	.flags			= (_flags),			\
    1.35 +@@ -379,7 +379,7 @@
    1.36 + };
    1.37 + 
    1.38 + static struct ieee80211_supported_band __wl_band_2ghz = {
    1.39 +-	.band = IEEE80211_BAND_2GHZ,
    1.40 ++	.band = NL80211_BAND_2GHZ,
    1.41 + 	.channels = __wl_2ghz_channels,
    1.42 + 	.n_channels = ARRAY_SIZE(__wl_2ghz_channels),
    1.43 + 	.bitrates = wl_g_rates,
    1.44 +@@ -387,7 +387,7 @@
    1.45 + };
    1.46 + 
    1.47 + static struct ieee80211_supported_band __wl_band_5ghz_a = {
    1.48 +-	.band = IEEE80211_BAND_5GHZ,
    1.49 ++	.band = NL80211_BAND_5GHZ,
    1.50 + 	.channels = __wl_5ghz_a_channels,
    1.51 + 	.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
    1.52 + 	.bitrates = wl_a_rates,
    1.53 +@@ -395,7 +395,7 @@
    1.54 + };
    1.55 + 
    1.56 + static struct ieee80211_supported_band __wl_band_5ghz_n = {
    1.57 +-	.band = IEEE80211_BAND_5GHZ,
    1.58 ++	.band = NL80211_BAND_5GHZ,
    1.59 + 	.channels = __wl_5ghz_n_channels,
    1.60 + 	.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
    1.61 + 	.bitrates = wl_a_rates,
    1.62 +@@ -1876,8 +1876,8 @@
    1.63 + 	wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
    1.64 + #endif
    1.65 + 	wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
    1.66 +-	wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
    1.67 +-	wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a; 
    1.68 ++	wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
    1.69 ++	wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a; 
    1.70 + 	wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
    1.71 + 	wdev->wiphy->cipher_suites = __wl_cipher_suites;
    1.72 + 	wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
    1.73 +@@ -2000,7 +2000,7 @@
    1.74 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
    1.75 + 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
    1.76 + 		(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
    1.77 +-		IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
    1.78 ++		NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
    1.79 + #else
    1.80 + 	freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
    1.81 + #endif
    1.82 +@@ -2116,7 +2116,7 @@
    1.83 + 				return err;
    1.84 + 			}
    1.85 + 			chan = wf_chspec_ctlchan(chanspec);
    1.86 +-			band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
    1.87 ++			band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
    1.88 + 			freq = ieee80211_channel_to_frequency(chan, band);
    1.89 + 			channel = ieee80211_get_channel(wiphy, freq);
    1.90 + 			cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
    1.91 +@@ -2250,10 +2250,10 @@
    1.92 + 		join_params->params.chanspec_list[0] =
    1.93 + 		    ieee80211_frequency_to_channel(chan->center_freq);
    1.94 + 
    1.95 +-		if (chan->band == IEEE80211_BAND_2GHZ) {
    1.96 ++		if (chan->band == NL80211_BAND_2GHZ) {
    1.97 + 			chanspec |= WL_CHANSPEC_BAND_2G;
    1.98 + 		}
    1.99 +-		else if (chan->band == IEEE80211_BAND_5GHZ) {
   1.100 ++		else if (chan->band == NL80211_BAND_5GHZ) {
   1.101 + 			chanspec |= WL_CHANSPEC_BAND_5G;
   1.102 + 		}
   1.103 + 		else {
   1.104 +@@ -2885,7 +2885,7 @@
   1.105 + 
   1.106 + 	if (phy == 'n' || phy == 'a' || phy == 'v') {
   1.107 + 		wiphy = wl_to_wiphy(wl);
   1.108 +-		wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
   1.109 ++		wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
   1.110 + 	}
   1.111 + 
   1.112 + 	return err;