RTL8192DU: update to efc8508

This commit is contained in:
Carlos Garcés 2017-04-17 08:51:42 +02:00 committed by Christian Hewitt
parent 93a4014582
commit cb8337e3ea
3 changed files with 1 additions and 255 deletions

View File

@ -17,7 +17,7 @@
################################################################################ ################################################################################
PKG_NAME="RTL8192DU" PKG_NAME="RTL8192DU"
PKG_VERSION="9e7eb15" PKG_VERSION="efc8508"
PKG_ARCH="any" PKG_ARCH="any"
PKG_LICENSE="GPL" PKG_LICENSE="GPL"
PKG_SITE="https://github.com/lwfinger/rtl8192du" PKG_SITE="https://github.com/lwfinger/rtl8192du"

View File

@ -1,236 +0,0 @@
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);

View File

@ -1,18 +0,0 @@
diff -Naur a/os_dep/ioctl_cfg80211.c b/os_dep/ioctl_cfg80211.c
--- a/os_dep/ioctl_cfg80211.c 2016-09-11 01:51:12.796375013 +0100
+++ b/os_dep/ioctl_cfg80211.c 2016-09-11 01:52:39.942348529 +0100
@@ -1425,7 +1425,14 @@
}
else
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,8,0)
+ struct cfg80211_scan_info info = {
+ .aborted = aborted
+ };
+ cfg80211_scan_done(pwdev_priv->scan_request, &info);
+#else
cfg80211_scan_done(pwdev_priv->scan_request, aborted);
+#endif
}
pwdev_priv->scan_request = NULL;