mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-30 06:06:43 +00:00
linux: add 4.7 compatability where required
This commit is contained in:
parent
d92b5aecf8
commit
7b49721ccd
@ -0,0 +1,259 @@
|
||||
diff -Naur a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
|
||||
--- a/os_dep/linux/ioctl_cfg80211.c 2016-06-23 13:32:35.544763290 +0100
|
||||
+++ b/os_dep/linux/ioctl_cfg80211.c 2016-06-23 13:33:02.888918609 +0100
|
||||
@@ -57,7 +57,7 @@
|
||||
}
|
||||
|
||||
#define CHAN2G(_channel, _freq, _flags) { \
|
||||
- .band = IEEE80211_BAND_2GHZ, \
|
||||
+ .band = NL80211_BAND_2GHZ, \
|
||||
.center_freq = (_freq), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -66,7 +66,7 @@
|
||||
}
|
||||
|
||||
#define CHAN5G(_channel, _flags) { \
|
||||
- .band = IEEE80211_BAND_5GHZ, \
|
||||
+ .band = NL80211_BAND_5GHZ, \
|
||||
.center_freq = 5000 + (5 * (_channel)), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -166,18 +166,18 @@
|
||||
}
|
||||
|
||||
struct ieee80211_supported_band *rtw_spt_band_alloc(
|
||||
- enum ieee80211_band band
|
||||
+ enum nl80211_band band
|
||||
)
|
||||
{
|
||||
struct ieee80211_supported_band *spt_band = NULL;
|
||||
int n_channels, n_bitrates;
|
||||
|
||||
- if(band == IEEE80211_BAND_2GHZ)
|
||||
+ if(band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
n_channels = RTW_2G_CHANNELS_NUM;
|
||||
n_bitrates = RTW_G_RATES_NUM;
|
||||
}
|
||||
- else if(band == IEEE80211_BAND_5GHZ)
|
||||
+ else if(band == NL80211_BAND_5GHZ)
|
||||
{
|
||||
n_channels = RTW_5G_CHANNELS_NUM;
|
||||
n_bitrates = RTW_A_RATES_NUM;
|
||||
@@ -201,12 +201,12 @@
|
||||
spt_band->n_channels = n_channels;
|
||||
spt_band->n_bitrates = n_bitrates;
|
||||
|
||||
- if(band == IEEE80211_BAND_2GHZ)
|
||||
+ if(band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
rtw_2g_channels_init(spt_band->channels);
|
||||
rtw_2g_rates_init(spt_band->bitrates);
|
||||
}
|
||||
- else if(band == IEEE80211_BAND_5GHZ)
|
||||
+ else if(band == NL80211_BAND_5GHZ)
|
||||
{
|
||||
rtw_5g_channels_init(spt_band->channels);
|
||||
rtw_5g_rates_init(spt_band->bitrates);
|
||||
@@ -226,13 +226,13 @@
|
||||
if(!spt_band)
|
||||
return;
|
||||
|
||||
- if(spt_band->band == IEEE80211_BAND_2GHZ)
|
||||
+ if(spt_band->band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
size = sizeof(struct ieee80211_supported_band)
|
||||
+ sizeof(struct ieee80211_channel)*RTW_2G_CHANNELS_NUM
|
||||
+ sizeof(struct ieee80211_rate)*RTW_G_RATES_NUM;
|
||||
}
|
||||
- else if(spt_band->band == IEEE80211_BAND_5GHZ)
|
||||
+ else if(spt_band->band == NL80211_BAND_5GHZ)
|
||||
{
|
||||
size = sizeof(struct ieee80211_supported_band)
|
||||
+ sizeof(struct ieee80211_channel)*RTW_5G_CHANNELS_NUM
|
||||
@@ -301,12 +301,12 @@
|
||||
/* see 802.11 17.3.8.3.2 and Annex J
|
||||
* there are overlapping channel numbers in 5GHz and 2GHz bands */
|
||||
|
||||
- if (band == IEEE80211_BAND_5GHZ) {
|
||||
+ if (band == NL80211_BAND_5GHZ) {
|
||||
if (chan >= 182 && chan <= 196)
|
||||
return 4000 + chan * 5;
|
||||
else
|
||||
return 5000 + chan * 5;
|
||||
- } else { /* IEEE80211_BAND_2GHZ */
|
||||
+ } else { /* NL80211_BAND_2GHZ */
|
||||
if (chan == 14)
|
||||
return 2484;
|
||||
else if (chan < 14)
|
||||
@@ -391,9 +391,9 @@
|
||||
DBG_871X("%s, got sr, but ssid mismatch, to remove this bss\n", __func__);
|
||||
|
||||
if (pselect_network->Configuration.DSConfig <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, NL80211_BAND_5GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
pselect_bss = cfg80211_get_bss(wiphy, NULL/*notify_channel*/,
|
||||
@@ -424,9 +424,9 @@
|
||||
|
||||
channel = pnetwork->network.Configuration.DSConfig;
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
|
||||
@@ -569,9 +569,9 @@
|
||||
return _FALSE;
|
||||
|
||||
if (pnetwork->Configuration.DSConfig <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, NL80211_BAND_5GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(padapter->rtw_wdev->wiphy, freq);
|
||||
bss = cfg80211_get_bss(padapter->rtw_wdev->wiphy, notify_channel,
|
||||
@@ -626,9 +626,9 @@
|
||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
#endif
|
||||
@@ -3097,9 +3097,9 @@
|
||||
#else /* defined(RTW_USE_CFG80211_STA_EVENT) */
|
||||
channel = pmlmeext->cur_channel;
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
#ifdef COMPAT_KERNEL_RELEASE
|
||||
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
|
||||
@@ -3142,9 +3142,9 @@
|
||||
#else /* defined(RTW_USE_CFG80211_STA_EVENT) */
|
||||
channel = pmlmeext->cur_channel;
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
pmgmt_frame = mgmt_buf;
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pmgmt_frame;
|
||||
@@ -3950,9 +3950,9 @@
|
||||
|
||||
indicate:
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
|
||||
@@ -3990,9 +3990,9 @@
|
||||
|
||||
indicate:
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
|
||||
@@ -4020,9 +4020,9 @@
|
||||
DBG_871X("RTW_Rx:category(%u), action(%u)\n", category, action);
|
||||
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, GFP_ATOMIC);
|
||||
@@ -5199,7 +5199,7 @@
|
||||
#endif
|
||||
};
|
||||
|
||||
-static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum ieee80211_band band, u8 rf_type)
|
||||
+static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum nl80211_band band, u8 rf_type)
|
||||
{
|
||||
|
||||
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
|
||||
@@ -5223,7 +5223,7 @@
|
||||
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
|
||||
|
||||
/*
|
||||
- *hw->wiphy->bands[IEEE80211_BAND_2GHZ]
|
||||
+ *hw->wiphy->bands[NL80211_BAND_2GHZ]
|
||||
*base on ant_num
|
||||
*rx_mask: RX mask
|
||||
*if rx_ant =1 rx_mask[0]=0xff;==>MCS0-MCS7
|
||||
@@ -5268,16 +5268,16 @@
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
|
||||
{
|
||||
- bands = wiphy->bands[IEEE80211_BAND_2GHZ];
|
||||
+ bands = wiphy->bands[NL80211_BAND_2GHZ];
|
||||
if(bands)
|
||||
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_2GHZ, rf_type);
|
||||
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_2GHZ, rf_type);
|
||||
}
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
|
||||
{
|
||||
- bands = wiphy->bands[IEEE80211_BAND_5GHZ];
|
||||
+ bands = wiphy->bands[NL80211_BAND_5GHZ];
|
||||
if(bands)
|
||||
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_5GHZ, rf_type);
|
||||
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_5GHZ, rf_type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5348,9 +5348,9 @@
|
||||
wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites);
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
|
||||
- wiphy->bands[IEEE80211_BAND_2GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_2GHZ);
|
||||
+ wiphy->bands[NL80211_BAND_2GHZ] = rtw_spt_band_alloc(NL80211_BAND_2GHZ);
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
|
||||
- wiphy->bands[IEEE80211_BAND_5GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_5GHZ);
|
||||
+ wiphy->bands[NL80211_BAND_5GHZ] = rtw_spt_band_alloc(NL80211_BAND_5GHZ);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) && LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
|
||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS;
|
||||
@@ -5456,8 +5456,8 @@
|
||||
|
||||
pwdev_priv = wdev_to_priv(wdev);
|
||||
|
||||
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_2GHZ]);
|
||||
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_5GHZ]);
|
||||
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_2GHZ]);
|
||||
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_5GHZ]);
|
||||
|
||||
wiphy_free(wdev->wiphy);
|
||||
|
@ -0,0 +1,236 @@
|
||||
diff -Naur a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c
|
||||
--- a/os_dep/ioctl_cfg80211.c 2016-06-23 13:12:55.005653163 +0100
|
||||
+++ b/os_dep/ioctl_cfg80211.c 2016-06-23 13:13:25.961839084 +0100
|
||||
@@ -47,7 +47,7 @@
|
||||
}
|
||||
|
||||
#define CHAN2G(_channel, _freq, _flags) { \
|
||||
- .band = IEEE80211_BAND_2GHZ, \
|
||||
+ .band = NL80211_BAND_2GHZ, \
|
||||
.center_freq = (_freq), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -56,7 +56,7 @@
|
||||
}
|
||||
|
||||
#define CHAN5G(_channel, _flags) { \
|
||||
- .band = IEEE80211_BAND_5GHZ, \
|
||||
+ .band = NL80211_BAND_5GHZ, \
|
||||
.center_freq = 5000 + (5 * (_channel)), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -155,19 +155,19 @@
|
||||
}
|
||||
|
||||
static struct ieee80211_supported_band *rtw_spt_band_alloc(
|
||||
- enum ieee80211_band band
|
||||
+ enum nl80211_band band
|
||||
)
|
||||
{
|
||||
struct ieee80211_supported_band *spt_band = NULL;
|
||||
int n_channels, n_bitrates;
|
||||
int len;
|
||||
|
||||
- if (band == IEEE80211_BAND_2GHZ)
|
||||
+ if (band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
n_channels = RTW_2G_CHANNELS_NUM;
|
||||
n_bitrates = RTW_G_RATES_NUM;
|
||||
}
|
||||
- else if (band == IEEE80211_BAND_5GHZ)
|
||||
+ else if (band == NL80211_BAND_5GHZ)
|
||||
{
|
||||
n_channels = RTW_5G_CHANNELS_NUM;
|
||||
n_bitrates = RTW_A_RATES_NUM;
|
||||
@@ -190,12 +190,12 @@
|
||||
spt_band->n_channels = n_channels;
|
||||
spt_band->n_bitrates = n_bitrates;
|
||||
|
||||
- if (band == IEEE80211_BAND_2GHZ)
|
||||
+ if (band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
rtw_2g_channels_init(spt_band->channels);
|
||||
rtw_2g_rates_init(spt_band->bitrates);
|
||||
}
|
||||
- else if (band == IEEE80211_BAND_5GHZ)
|
||||
+ else if (band == NL80211_BAND_5GHZ)
|
||||
{
|
||||
rtw_5g_channels_init(spt_band->channels);
|
||||
rtw_5g_rates_init(spt_band->bitrates);
|
||||
@@ -215,13 +215,13 @@
|
||||
if (!spt_band)
|
||||
return;
|
||||
|
||||
- if (spt_band->band == IEEE80211_BAND_2GHZ)
|
||||
+ if (spt_band->band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
size = sizeof(struct ieee80211_supported_band)
|
||||
+ sizeof(struct ieee80211_channel)*RTW_2G_CHANNELS_NUM
|
||||
+ sizeof(struct ieee80211_rate)*RTW_G_RATES_NUM;
|
||||
}
|
||||
- else if (spt_band->band == IEEE80211_BAND_5GHZ)
|
||||
+ else if (spt_band->band == NL80211_BAND_5GHZ)
|
||||
{
|
||||
size = sizeof(struct ieee80211_supported_band)
|
||||
+ sizeof(struct ieee80211_channel)*RTW_5G_CHANNELS_NUM
|
||||
@@ -290,12 +290,12 @@
|
||||
/* see 802.11 17.3.8.3.2 and Annex J
|
||||
* there are overlapping channel numbers in 5GHz and 2GHz bands */
|
||||
|
||||
- if (band == IEEE80211_BAND_5GHZ) {
|
||||
+ if (band == NL80211_BAND_5GHZ) {
|
||||
if (chan >= 182 && chan <= 196)
|
||||
return 4000 + chan * 5;
|
||||
else
|
||||
return 5000 + chan * 5;
|
||||
- } else { /* IEEE80211_BAND_2GHZ */
|
||||
+ } else { /* NL80211_BAND_2GHZ */
|
||||
if (chan == 14)
|
||||
return 2484;
|
||||
else if (chan < 14)
|
||||
@@ -335,9 +335,9 @@
|
||||
|
||||
channel = pnetwork->network.Configuration.DSConfig;
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
|
||||
@@ -435,9 +435,9 @@
|
||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
#endif
|
||||
@@ -2434,9 +2434,9 @@
|
||||
#else /* defined(RTW_USE_CFG80211_STA_EVENT) */
|
||||
channel = pmlmeext->cur_channel;
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, flags);
|
||||
#endif /* defined(RTW_USE_CFG80211_STA_EVENT) */
|
||||
@@ -2463,9 +2463,9 @@
|
||||
#else /* defined(RTW_USE_CFG80211_STA_EVENT) */
|
||||
channel = pmlmeext->cur_channel;
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
pmgmt_frame = mgmt_buf;
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pmgmt_frame;
|
||||
@@ -3148,9 +3148,9 @@
|
||||
|
||||
indicate:
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, flags);
|
||||
}
|
||||
@@ -3172,9 +3172,9 @@
|
||||
|
||||
indicate:
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
rtw_cfg80211_rx_mgmt(padapter, freq, 0, frame, frame_len, flags);
|
||||
}
|
||||
@@ -3199,9 +3199,9 @@
|
||||
DBG_8192D("RTW_Rx:category(%u), action(%u)\n", category, action);
|
||||
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, flags);
|
||||
}
|
||||
@@ -3633,7 +3633,7 @@
|
||||
.mgmt_frame_register = cfg80211_rtw_mgmt_frame_register,
|
||||
};
|
||||
|
||||
-static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum ieee80211_band band, u8 rf_type)
|
||||
+static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum nl80211_band band, u8 rf_type)
|
||||
{
|
||||
|
||||
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
|
||||
@@ -3657,7 +3657,7 @@
|
||||
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
|
||||
|
||||
/*
|
||||
- *hw->wiphy->bands[IEEE80211_BAND_2GHZ]
|
||||
+ *hw->wiphy->bands[NL80211_BAND_2GHZ]
|
||||
*base on ant_num
|
||||
*rx_mask: RX mask
|
||||
*if rx_ant =1 rx_mask[0]=0xff;==>MCS0-MCS7
|
||||
@@ -3701,16 +3701,16 @@
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
|
||||
{
|
||||
- bands = wiphy->bands[IEEE80211_BAND_2GHZ];
|
||||
+ bands = wiphy->bands[NL80211_BAND_2GHZ];
|
||||
if (bands)
|
||||
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_2GHZ, rf_type);
|
||||
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_2GHZ, rf_type);
|
||||
}
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
|
||||
{
|
||||
- bands = wiphy->bands[IEEE80211_BAND_5GHZ];
|
||||
+ bands = wiphy->bands[NL80211_BAND_5GHZ];
|
||||
if (bands)
|
||||
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_5GHZ, rf_type);
|
||||
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_5GHZ, rf_type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3750,9 +3750,9 @@
|
||||
wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites);
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
|
||||
- wiphy->bands[IEEE80211_BAND_2GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_2GHZ);
|
||||
+ wiphy->bands[NL80211_BAND_2GHZ] = rtw_spt_band_alloc(NL80211_BAND_2GHZ);
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
|
||||
- wiphy->bands[IEEE80211_BAND_5GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_5GHZ);
|
||||
+ wiphy->bands[NL80211_BAND_5GHZ] = rtw_spt_band_alloc(NL80211_BAND_5GHZ);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) && LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
|
||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS;
|
||||
@@ -3855,8 +3855,8 @@
|
||||
|
||||
pwdev_priv = wdev_to_priv(wdev);
|
||||
|
||||
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_2GHZ]);
|
||||
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_5GHZ]);
|
||||
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_2GHZ]);
|
||||
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_5GHZ]);
|
||||
|
||||
wiphy_free(wdev->wiphy);
|
||||
|
@ -0,0 +1,346 @@
|
||||
diff -Naur a/os_dep/linux/wifi_regd.c b/os_dep/linux/wifi_regd.c
|
||||
--- a/os_dep/linux/wifi_regd.c 2016-06-23 13:37:11.270350569 +0100
|
||||
+++ b/os_dep/linux/wifi_regd.c 2016-06-23 13:37:39.606515916 +0100
|
||||
@@ -143,7 +143,7 @@
|
||||
static void _rtw_reg_apply_beaconing_flags(struct wiphy *wiphy,
|
||||
enum nl80211_reg_initiator initiator)
|
||||
{
|
||||
- enum ieee80211_band band;
|
||||
+ enum nl80211_band band;
|
||||
struct ieee80211_supported_band *sband;
|
||||
const struct ieee80211_reg_rule *reg_rule;
|
||||
struct ieee80211_channel *ch;
|
||||
@@ -205,9 +205,9 @@
|
||||
u32 bandwidth = 0;
|
||||
int r;
|
||||
|
||||
- if (!wiphy->bands[IEEE80211_BAND_2GHZ])
|
||||
+ if (!wiphy->bands[NL80211_BAND_2GHZ])
|
||||
return;
|
||||
- sband = wiphy->bands[IEEE80211_BAND_2GHZ];
|
||||
+ sband = wiphy->bands[NL80211_BAND_2GHZ];
|
||||
|
||||
/*
|
||||
* If no country IE has been received always enable active scan
|
||||
@@ -258,10 +258,10 @@
|
||||
struct ieee80211_channel *ch;
|
||||
unsigned int i;
|
||||
|
||||
- if (!wiphy->bands[IEEE80211_BAND_5GHZ])
|
||||
+ if (!wiphy->bands[NL80211_BAND_5GHZ])
|
||||
return;
|
||||
|
||||
- sband = wiphy->bands[IEEE80211_BAND_5GHZ];
|
||||
+ sband = wiphy->bands[NL80211_BAND_5GHZ];
|
||||
|
||||
for (i = 0; i < sband->n_channels; i++) {
|
||||
ch = &sband->channels[i];
|
||||
@@ -298,12 +298,12 @@
|
||||
/* see 802.11 17.3.8.3.2 and Annex J
|
||||
* there are overlapping channel numbers in 5GHz and 2GHz bands */
|
||||
|
||||
- if (band == IEEE80211_BAND_5GHZ) {
|
||||
+ if (band == NL80211_BAND_5GHZ) {
|
||||
if (chan >= 182 && chan <= 196)
|
||||
return 4000 + chan * 5;
|
||||
else
|
||||
return 5000 + chan * 5;
|
||||
- } else { /* IEEE80211_BAND_2GHZ */
|
||||
+ } else { /* NL80211_BAND_2GHZ */
|
||||
if (chan == 14)
|
||||
return 2484;
|
||||
else if (chan < 14)
|
||||
@@ -348,11 +348,11 @@
|
||||
if (channel <= 14)
|
||||
freq =
|
||||
rtw_ieee80211_channel_to_frequency(channel,
|
||||
- IEEE80211_BAND_2GHZ);
|
||||
+ NL80211_BAND_2GHZ);
|
||||
else
|
||||
freq =
|
||||
rtw_ieee80211_channel_to_frequency(channel,
|
||||
- IEEE80211_BAND_5GHZ);
|
||||
+ NL80211_BAND_5GHZ);
|
||||
|
||||
ch = ieee80211_get_channel(wiphy, freq);
|
||||
if (ch) {
|
||||
@@ -393,11 +393,11 @@
|
||||
if (channel <= 14)
|
||||
freq =
|
||||
rtw_ieee80211_channel_to_frequency(channel,
|
||||
- IEEE80211_BAND_2GHZ);
|
||||
+ NL80211_BAND_2GHZ);
|
||||
else
|
||||
freq =
|
||||
rtw_ieee80211_channel_to_frequency(channel,
|
||||
- IEEE80211_BAND_5GHZ);
|
||||
+ NL80211_BAND_5GHZ);
|
||||
|
||||
ch = ieee80211_get_channel(wiphy, freq);
|
||||
if (ch) {
|
||||
@@ -544,4 +544,4 @@
|
||||
|
||||
return _rtw_reg_notifier_apply(wiphy, request, reg);
|
||||
}
|
||||
-#endif //CONFIG_IOCTL_CFG80211
|
||||
\ No newline at end of file
|
||||
+#endif //CONFIG_IOCTL_CFG80211
|
||||
diff -Naur a/os_dep/linux/ioctl_cfg80211.c b/os_dep/linux/ioctl_cfg80211.c
|
||||
--- a/os_dep/linux/ioctl_cfg80211.c 2016-06-23 13:37:16.990383918 +0100
|
||||
+++ b/os_dep/linux/ioctl_cfg80211.c 2016-06-23 13:37:48.786569554 +0100
|
||||
@@ -74,7 +74,7 @@
|
||||
}
|
||||
|
||||
#define CHAN2G(_channel, _freq, _flags) { \
|
||||
- .band = IEEE80211_BAND_2GHZ, \
|
||||
+ .band = NL80211_BAND_2GHZ, \
|
||||
.center_freq = (_freq), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -83,7 +83,7 @@
|
||||
}
|
||||
|
||||
#define CHAN5G(_channel, _flags) { \
|
||||
- .band = IEEE80211_BAND_5GHZ, \
|
||||
+ .band = NL80211_BAND_5GHZ, \
|
||||
.center_freq = 5000 + (5 * (_channel)), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -200,18 +200,18 @@
|
||||
}
|
||||
|
||||
struct ieee80211_supported_band *rtw_spt_band_alloc(
|
||||
- enum ieee80211_band band
|
||||
+ enum nl80211_band band
|
||||
)
|
||||
{
|
||||
struct ieee80211_supported_band *spt_band = NULL;
|
||||
int n_channels, n_bitrates;
|
||||
|
||||
- if(band == IEEE80211_BAND_2GHZ)
|
||||
+ if(band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
n_channels = RTW_2G_CHANNELS_NUM;
|
||||
n_bitrates = RTW_G_RATES_NUM;
|
||||
}
|
||||
- else if(band == IEEE80211_BAND_5GHZ)
|
||||
+ else if(band == NL80211_BAND_5GHZ)
|
||||
{
|
||||
n_channels = RTW_5G_CHANNELS_NUM;
|
||||
n_bitrates = RTW_A_RATES_NUM;
|
||||
@@ -235,12 +235,12 @@
|
||||
spt_band->n_channels = n_channels;
|
||||
spt_band->n_bitrates = n_bitrates;
|
||||
|
||||
- if(band == IEEE80211_BAND_2GHZ)
|
||||
+ if(band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
rtw_2g_channels_init(spt_band->channels);
|
||||
rtw_2g_rates_init(spt_band->bitrates);
|
||||
}
|
||||
- else if(band == IEEE80211_BAND_5GHZ)
|
||||
+ else if(band == NL80211_BAND_5GHZ)
|
||||
{
|
||||
rtw_5g_channels_init(spt_band->channels);
|
||||
rtw_5g_rates_init(spt_band->bitrates);
|
||||
@@ -260,13 +260,13 @@
|
||||
if(!spt_band)
|
||||
return;
|
||||
|
||||
- if(spt_band->band == IEEE80211_BAND_2GHZ)
|
||||
+ if(spt_band->band == NL80211_BAND_2GHZ)
|
||||
{
|
||||
size = sizeof(struct ieee80211_supported_band)
|
||||
+ sizeof(struct ieee80211_channel)*RTW_2G_CHANNELS_NUM
|
||||
+ sizeof(struct ieee80211_rate)*RTW_G_RATES_NUM;
|
||||
}
|
||||
- else if(spt_band->band == IEEE80211_BAND_5GHZ)
|
||||
+ else if(spt_band->band == NL80211_BAND_5GHZ)
|
||||
{
|
||||
size = sizeof(struct ieee80211_supported_band)
|
||||
+ sizeof(struct ieee80211_channel)*RTW_5G_CHANNELS_NUM
|
||||
@@ -335,12 +335,12 @@
|
||||
/* see 802.11 17.3.8.3.2 and Annex J
|
||||
* there are overlapping channel numbers in 5GHz and 2GHz bands */
|
||||
|
||||
- if (band == IEEE80211_BAND_5GHZ) {
|
||||
+ if (band == NL80211_BAND_5GHZ) {
|
||||
if (chan >= 182 && chan <= 196)
|
||||
return 4000 + chan * 5;
|
||||
else
|
||||
return 5000 + chan * 5;
|
||||
- } else { /* IEEE80211_BAND_2GHZ */
|
||||
+ } else { /* NL80211_BAND_2GHZ */
|
||||
if (chan == 14)
|
||||
return 2484;
|
||||
else if (chan < 14)
|
||||
@@ -441,9 +441,9 @@
|
||||
DBG_871X("%s, got sr, but ssid mismatch, to remove this bss\n", __func__);
|
||||
|
||||
if (pselect_network->Configuration.DSConfig <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(pselect_network->Configuration.DSConfig, NL80211_BAND_5GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
pselect_bss = cfg80211_get_bss(wiphy, NULL/*notify_channel*/,
|
||||
@@ -475,9 +475,9 @@
|
||||
|
||||
channel = pnetwork->network.Configuration.DSConfig;
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
|
||||
@@ -617,9 +617,9 @@
|
||||
return _FALSE;
|
||||
|
||||
if (pnetwork->Configuration.DSConfig <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(pnetwork->Configuration.DSConfig, NL80211_BAND_5GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(padapter->rtw_wdev->wiphy, freq);
|
||||
bss = cfg80211_get_bss(padapter->rtw_wdev->wiphy, notify_channel,
|
||||
@@ -771,9 +771,9 @@
|
||||
u16 channel = cur_network->network.Configuration.DSConfig;
|
||||
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||
#endif
|
||||
@@ -3400,9 +3400,9 @@
|
||||
#else /* defined(RTW_USE_CFG80211_STA_EVENT) */
|
||||
channel = pmlmeext->cur_channel;
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
#ifdef COMPAT_KERNEL_RELEASE
|
||||
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
|
||||
@@ -3445,9 +3445,9 @@
|
||||
#else /* defined(RTW_USE_CFG80211_STA_EVENT) */
|
||||
channel = pmlmeext->cur_channel;
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
pmgmt_frame = mgmt_buf;
|
||||
pwlanhdr = (struct rtw_ieee80211_hdr *)pmgmt_frame;
|
||||
@@ -4257,9 +4257,9 @@
|
||||
|
||||
indicate:
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
|
||||
@@ -4297,9 +4297,9 @@
|
||||
|
||||
indicate:
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
rtw_cfg80211_rx_mgmt(padapter, freq, 0, pmgmt_frame, frame_len, GFP_ATOMIC);
|
||||
@@ -4327,9 +4327,9 @@
|
||||
DBG_871X("RTW_Rx:category(%u), action(%u)\n", category, action);
|
||||
|
||||
if (channel <= RTW_CH_MAX_2G_CHANNEL)
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||
else
|
||||
- freq = rtw_ieee80211_channel_to_frequency(channel, IEEE80211_BAND_5GHZ);
|
||||
+ freq = rtw_ieee80211_channel_to_frequency(channel, NL80211_BAND_5GHZ);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) || defined(COMPAT_KERNEL_RELEASE)
|
||||
rtw_cfg80211_rx_mgmt(adapter, freq, 0, frame, frame_len, GFP_ATOMIC);
|
||||
@@ -5718,7 +5718,7 @@
|
||||
|
||||
}
|
||||
|
||||
-static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum ieee80211_band band, u8 rf_type)
|
||||
+static void rtw_cfg80211_init_ht_capab(struct ieee80211_sta_ht_cap *ht_cap, enum nl80211_band band, u8 rf_type)
|
||||
{
|
||||
|
||||
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
|
||||
@@ -5742,7 +5742,7 @@
|
||||
ht_cap->mcs.tx_params = IEEE80211_HT_MCS_TX_DEFINED;
|
||||
|
||||
/*
|
||||
- *hw->wiphy->bands[IEEE80211_BAND_2GHZ]
|
||||
+ *hw->wiphy->bands[NL80211_BAND_2GHZ]
|
||||
*base on ant_num
|
||||
*rx_mask: RX mask
|
||||
*if rx_ant =1 rx_mask[0]=0xff;==>MCS0-MCS7
|
||||
@@ -5787,16 +5787,16 @@
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
|
||||
{
|
||||
- bands = wiphy->bands[IEEE80211_BAND_2GHZ];
|
||||
+ bands = wiphy->bands[NL80211_BAND_2GHZ];
|
||||
if(bands)
|
||||
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_2GHZ, rf_type);
|
||||
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_2GHZ, rf_type);
|
||||
}
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
|
||||
{
|
||||
- bands = wiphy->bands[IEEE80211_BAND_5GHZ];
|
||||
+ bands = wiphy->bands[NL80211_BAND_5GHZ];
|
||||
if(bands)
|
||||
- rtw_cfg80211_init_ht_capab(&bands->ht_cap, IEEE80211_BAND_5GHZ, rf_type);
|
||||
+ rtw_cfg80211_init_ht_capab(&bands->ht_cap, NL80211_BAND_5GHZ, rf_type);
|
||||
}
|
||||
|
||||
/* init regulary domain */
|
||||
@@ -5874,9 +5874,9 @@
|
||||
wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites);
|
||||
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11G) */
|
||||
- wiphy->bands[IEEE80211_BAND_2GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_2GHZ);
|
||||
+ wiphy->bands[NL80211_BAND_2GHZ] = rtw_spt_band_alloc(NL80211_BAND_2GHZ);
|
||||
/* if (padapter->registrypriv.wireless_mode & WIRELESS_11A) */
|
||||
- wiphy->bands[IEEE80211_BAND_5GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_5GHZ);
|
||||
+ wiphy->bands[NL80211_BAND_5GHZ] = rtw_spt_band_alloc(NL80211_BAND_5GHZ);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) && LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
|
||||
wiphy->flags |= WIPHY_FLAG_SUPPORTS_SEPARATE_DEFAULT_KEYS;
|
||||
@@ -6071,8 +6071,8 @@
|
||||
if (!wdev)
|
||||
return;
|
||||
|
||||
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_2GHZ]);
|
||||
- rtw_spt_band_free(wdev->wiphy->bands[IEEE80211_BAND_5GHZ]);
|
||||
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_2GHZ]);
|
||||
+ rtw_spt_band_free(wdev->wiphy->bands[NL80211_BAND_5GHZ]);
|
||||
|
||||
wiphy_free(wdev->wiphy);
|
||||
|
@ -17,7 +17,8 @@
|
||||
################################################################################
|
||||
|
||||
PKG_NAME="RTL8812AU"
|
||||
PKG_VERSION="928e27f"
|
||||
# Branch: 4.3.22_beta
|
||||
PKG_VERSION="73b88d5"
|
||||
PKG_REV="1"
|
||||
PKG_ARCH="any"
|
||||
PKG_LICENSE="GPL"
|
||||
|
@ -1,30 +0,0 @@
|
||||
diff -Naur a/os_dep/linux/ioctl_linux.c b/os_dep/linux/ioctl_linux.c
|
||||
--- a/os_dep/linux/ioctl_linux.c 2016-02-07 05:05:49.000000000 -0800
|
||||
+++ b/os_dep/linux/ioctl_linux.c 2016-04-19 12:35:27.647180055 -0700
|
||||
@@ -13908,7 +13908,11 @@
|
||||
static int rtw_ioctl_wext_private(struct net_device *dev, struct ifreq *rq)
|
||||
{
|
||||
#ifdef CONFIG_COMPAT
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
|
||||
+ if(in_compat_syscall())
|
||||
+#else
|
||||
if(is_compat_task())
|
||||
+#endif
|
||||
return rtw_ioctl_compat_wext_private( dev, rq );
|
||||
else
|
||||
#endif // CONFIG_COMPAT
|
||||
diff -Naur a/os_dep/linux/rtw_android.c b/os_dep/linux/rtw_android.c
|
||||
--- a/os_dep/linux/rtw_android.c 2016-02-07 05:05:49.000000000 -0800
|
||||
+++ b/os_dep/linux/rtw_android.c 2016-04-19 12:39:24.551833041 -0700
|
||||
@@ -577,7 +577,11 @@
|
||||
goto exit;
|
||||
}
|
||||
#ifdef CONFIG_COMPAT
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,6,0)
|
||||
+ if (in_compat_syscall()) {
|
||||
+#else
|
||||
if (is_compat_task()) {
|
||||
+#endif
|
||||
/* User space is 32-bit, use compat ioctl */
|
||||
compat_android_wifi_priv_cmd compat_priv_cmd;
|
||||
|
@ -0,0 +1,198 @@
|
||||
diff -Naur a/x86-32/src/wl/sys/wl_cfg80211_hybrid.c b/x86-32/src/wl/sys/wl_cfg80211_hybrid.c
|
||||
--- a/x86-32/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-23 14:26:16.911221749 +0100
|
||||
+++ b/x86-32/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-23 14:26:49.071406220 +0100
|
||||
@@ -236,7 +236,7 @@
|
||||
#endif
|
||||
|
||||
#define CHAN2G(_channel, _freq, _flags) { \
|
||||
- .band = IEEE80211_BAND_2GHZ, \
|
||||
+ .band = NL80211_BAND_2GHZ, \
|
||||
.center_freq = (_freq), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -245,7 +245,7 @@
|
||||
}
|
||||
|
||||
#define CHAN5G(_channel, _flags) { \
|
||||
- .band = IEEE80211_BAND_5GHZ, \
|
||||
+ .band = NL80211_BAND_5GHZ, \
|
||||
.center_freq = 5000 + (5 * (_channel)), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -379,7 +379,7 @@
|
||||
};
|
||||
|
||||
static struct ieee80211_supported_band __wl_band_2ghz = {
|
||||
- .band = IEEE80211_BAND_2GHZ,
|
||||
+ .band = NL80211_BAND_2GHZ,
|
||||
.channels = __wl_2ghz_channels,
|
||||
.n_channels = ARRAY_SIZE(__wl_2ghz_channels),
|
||||
.bitrates = wl_g_rates,
|
||||
@@ -387,7 +387,7 @@
|
||||
};
|
||||
|
||||
static struct ieee80211_supported_band __wl_band_5ghz_a = {
|
||||
- .band = IEEE80211_BAND_5GHZ,
|
||||
+ .band = NL80211_BAND_5GHZ,
|
||||
.channels = __wl_5ghz_a_channels,
|
||||
.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
|
||||
.bitrates = wl_a_rates,
|
||||
@@ -395,7 +395,7 @@
|
||||
};
|
||||
|
||||
static struct ieee80211_supported_band __wl_band_5ghz_n = {
|
||||
- .band = IEEE80211_BAND_5GHZ,
|
||||
+ .band = NL80211_BAND_5GHZ,
|
||||
.channels = __wl_5ghz_n_channels,
|
||||
.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
|
||||
.bitrates = wl_a_rates,
|
||||
@@ -1876,8 +1876,8 @@
|
||||
wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
|
||||
#endif
|
||||
wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
|
||||
- wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
|
||||
- wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a;
|
||||
+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
|
||||
+ wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a;
|
||||
wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
|
||||
wdev->wiphy->cipher_suites = __wl_cipher_suites;
|
||||
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
|
||||
@@ -2000,7 +2000,7 @@
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
|
||||
freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
|
||||
(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
|
||||
- IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
|
||||
+ NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
|
||||
#else
|
||||
freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
|
||||
#endif
|
||||
@@ -2116,7 +2116,7 @@
|
||||
return err;
|
||||
}
|
||||
chan = wf_chspec_ctlchan(chanspec);
|
||||
- band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
|
||||
+ band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
|
||||
freq = ieee80211_channel_to_frequency(chan, band);
|
||||
channel = ieee80211_get_channel(wiphy, freq);
|
||||
cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
|
||||
@@ -2250,10 +2250,10 @@
|
||||
join_params->params.chanspec_list[0] =
|
||||
ieee80211_frequency_to_channel(chan->center_freq);
|
||||
|
||||
- if (chan->band == IEEE80211_BAND_2GHZ) {
|
||||
+ if (chan->band == NL80211_BAND_2GHZ) {
|
||||
chanspec |= WL_CHANSPEC_BAND_2G;
|
||||
}
|
||||
- else if (chan->band == IEEE80211_BAND_5GHZ) {
|
||||
+ else if (chan->band == NL80211_BAND_5GHZ) {
|
||||
chanspec |= WL_CHANSPEC_BAND_5G;
|
||||
}
|
||||
else {
|
||||
@@ -2885,7 +2885,7 @@
|
||||
|
||||
if (phy == 'n' || phy == 'a' || phy == 'v') {
|
||||
wiphy = wl_to_wiphy(wl);
|
||||
- wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
|
||||
+ wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
|
||||
}
|
||||
|
||||
return err;
|
||||
diff -Naur a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c
|
||||
--- a/x86-64/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-23 14:26:22.639254590 +0100
|
||||
+++ b/x86-64/src/wl/sys/wl_cfg80211_hybrid.c 2016-06-23 14:27:01.507477603 +0100
|
||||
@@ -236,7 +236,7 @@
|
||||
#endif
|
||||
|
||||
#define CHAN2G(_channel, _freq, _flags) { \
|
||||
- .band = IEEE80211_BAND_2GHZ, \
|
||||
+ .band = NL80211_BAND_2GHZ, \
|
||||
.center_freq = (_freq), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -245,7 +245,7 @@
|
||||
}
|
||||
|
||||
#define CHAN5G(_channel, _flags) { \
|
||||
- .band = IEEE80211_BAND_5GHZ, \
|
||||
+ .band = NL80211_BAND_5GHZ, \
|
||||
.center_freq = 5000 + (5 * (_channel)), \
|
||||
.hw_value = (_channel), \
|
||||
.flags = (_flags), \
|
||||
@@ -379,7 +379,7 @@
|
||||
};
|
||||
|
||||
static struct ieee80211_supported_band __wl_band_2ghz = {
|
||||
- .band = IEEE80211_BAND_2GHZ,
|
||||
+ .band = NL80211_BAND_2GHZ,
|
||||
.channels = __wl_2ghz_channels,
|
||||
.n_channels = ARRAY_SIZE(__wl_2ghz_channels),
|
||||
.bitrates = wl_g_rates,
|
||||
@@ -387,7 +387,7 @@
|
||||
};
|
||||
|
||||
static struct ieee80211_supported_band __wl_band_5ghz_a = {
|
||||
- .band = IEEE80211_BAND_5GHZ,
|
||||
+ .band = NL80211_BAND_5GHZ,
|
||||
.channels = __wl_5ghz_a_channels,
|
||||
.n_channels = ARRAY_SIZE(__wl_5ghz_a_channels),
|
||||
.bitrates = wl_a_rates,
|
||||
@@ -395,7 +395,7 @@
|
||||
};
|
||||
|
||||
static struct ieee80211_supported_band __wl_band_5ghz_n = {
|
||||
- .band = IEEE80211_BAND_5GHZ,
|
||||
+ .band = NL80211_BAND_5GHZ,
|
||||
.channels = __wl_5ghz_n_channels,
|
||||
.n_channels = ARRAY_SIZE(__wl_5ghz_n_channels),
|
||||
.bitrates = wl_a_rates,
|
||||
@@ -1876,8 +1876,8 @@
|
||||
wdev->wiphy->max_num_pmkids = WL_NUM_PMKIDS_MAX;
|
||||
#endif
|
||||
wdev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) | BIT(NL80211_IFTYPE_ADHOC);
|
||||
- wdev->wiphy->bands[IEEE80211_BAND_2GHZ] = &__wl_band_2ghz;
|
||||
- wdev->wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_a;
|
||||
+ wdev->wiphy->bands[NL80211_BAND_2GHZ] = &__wl_band_2ghz;
|
||||
+ wdev->wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_a;
|
||||
wdev->wiphy->signal_type = CFG80211_SIGNAL_TYPE_MBM;
|
||||
wdev->wiphy->cipher_suites = __wl_cipher_suites;
|
||||
wdev->wiphy->n_cipher_suites = ARRAY_SIZE(__wl_cipher_suites);
|
||||
@@ -2000,7 +2000,7 @@
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 39)
|
||||
freq = ieee80211_channel_to_frequency(notif_bss_info->channel,
|
||||
(notif_bss_info->channel <= CH_MAX_2G_CHANNEL) ?
|
||||
- IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ);
|
||||
+ NL80211_BAND_2GHZ : NL80211_BAND_5GHZ);
|
||||
#else
|
||||
freq = ieee80211_channel_to_frequency(notif_bss_info->channel);
|
||||
#endif
|
||||
@@ -2116,7 +2116,7 @@
|
||||
return err;
|
||||
}
|
||||
chan = wf_chspec_ctlchan(chanspec);
|
||||
- band = (chan <= CH_MAX_2G_CHANNEL) ? IEEE80211_BAND_2GHZ : IEEE80211_BAND_5GHZ;
|
||||
+ band = (chan <= CH_MAX_2G_CHANNEL) ? NL80211_BAND_2GHZ : NL80211_BAND_5GHZ;
|
||||
freq = ieee80211_channel_to_frequency(chan, band);
|
||||
channel = ieee80211_get_channel(wiphy, freq);
|
||||
cfg80211_ibss_joined(ndev, (u8 *)&wl->bssid, channel, GFP_KERNEL);
|
||||
@@ -2250,10 +2250,10 @@
|
||||
join_params->params.chanspec_list[0] =
|
||||
ieee80211_frequency_to_channel(chan->center_freq);
|
||||
|
||||
- if (chan->band == IEEE80211_BAND_2GHZ) {
|
||||
+ if (chan->band == NL80211_BAND_2GHZ) {
|
||||
chanspec |= WL_CHANSPEC_BAND_2G;
|
||||
}
|
||||
- else if (chan->band == IEEE80211_BAND_5GHZ) {
|
||||
+ else if (chan->band == NL80211_BAND_5GHZ) {
|
||||
chanspec |= WL_CHANSPEC_BAND_5G;
|
||||
}
|
||||
else {
|
||||
@@ -2885,7 +2885,7 @@
|
||||
|
||||
if (phy == 'n' || phy == 'a' || phy == 'v') {
|
||||
wiphy = wl_to_wiphy(wl);
|
||||
- wiphy->bands[IEEE80211_BAND_5GHZ] = &__wl_band_5ghz_n;
|
||||
+ wiphy->bands[NL80211_BAND_5GHZ] = &__wl_band_5ghz_n;
|
||||
}
|
||||
|
||||
return err;
|
@ -0,0 +1,48 @@
|
||||
diff -Naur a/kernel/nvidia-uvm/uvm_linux.h a/kernel/nvidia-uvm/uvm_linux.h
|
||||
--- a/kernel/nvidia-uvm/uvm_linux.h 2016-06-23 15:43:00.191459104 +0100
|
||||
+++ b/kernel/nvidia-uvm/uvm_linux.h 2016-06-23 15:43:43.655703055 +0100
|
||||
@@ -563,7 +563,7 @@
|
||||
INIT_RADIX_TREE(tree, GFP_NOWAIT);
|
||||
}
|
||||
|
||||
-static bool radix_tree_empty(struct radix_tree_root *tree)
|
||||
+static bool nv_radix_tree_empty(struct radix_tree_root *tree)
|
||||
{
|
||||
void *dummy;
|
||||
return radix_tree_gang_lookup(tree, &dummy, 0, 1) == 0;
|
||||
diff -Naur a/kernel/nvidia-uvm/uvm8_gpu.c b/kernel/nvidia-uvm/uvm8_gpu.c
|
||||
--- a/kernel/nvidia-uvm/uvm8_gpu.c 2016-06-23 15:42:53.087419218 +0100
|
||||
+++ b/kernel/nvidia-uvm/uvm8_gpu.c 2016-06-23 15:43:26.235605292 +0100
|
||||
@@ -638,7 +638,7 @@
|
||||
gpu->id, uvm_gpu_retained_count(gpu));
|
||||
|
||||
// All channels should have been removed before the retained count went to 0
|
||||
- UVM_ASSERT(radix_tree_empty(&gpu->instance_ptr_table));
|
||||
+ UVM_ASSERT(nv_radix_tree_empty(&gpu->instance_ptr_table));
|
||||
|
||||
// Remove the GPU from the table.
|
||||
uvm_spin_lock_irqsave(&g_uvm_global.gpu_table_lock);
|
||||
diff -Naur a/kernel/nvidia-drm/nvidia-drm-fb.c b/kernel/nvidia-drm/nvidia-drm-fb.c
|
||||
--- a/kernel/nvidia-drm/nvidia-drm-fb.c 2016-06-23 16:06:44.913671941 +0100
|
||||
+++ b/kernel/nvidia-drm/nvidia-drm-fb.c 2016-06-23 16:07:10.469839787 +0100
|
||||
@@ -114,7 +114,7 @@
|
||||
* We don't support any planar format, pick up first buffer only.
|
||||
*/
|
||||
|
||||
- gem = drm_gem_object_lookup(dev, file, cmd->handles[0]);
|
||||
+ gem = drm_gem_object_lookup(file, cmd->handles[0]);
|
||||
|
||||
if (gem == NULL)
|
||||
{
|
||||
diff -Naur a/kernel/nvidia-drm/nvidia-drm-gem.c b/kernel/nvidia-drm/nvidia-drm-gem.c
|
||||
--- a/kernel/nvidia-drm/nvidia-drm-gem.c 2016-06-23 16:06:53.689729630 +0100
|
||||
+++ b/kernel/nvidia-drm/nvidia-drm-gem.c 2016-06-23 16:07:34.029994134 +0100
|
||||
@@ -408,7 +408,7 @@
|
||||
|
||||
mutex_lock(&dev->struct_mutex);
|
||||
|
||||
- gem = drm_gem_object_lookup(dev, file, handle);
|
||||
+ gem = drm_gem_object_lookup(file, handle);
|
||||
|
||||
if (gem == NULL)
|
||||
{
|
Loading…
x
Reference in New Issue
Block a user