add .gitignore and make it buildable on current linux-next

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
This commit is contained in:
Icenowy Zheng 2017-02-25 18:31:16 +08:00
parent d019573693
commit 89c045ff47
10 changed files with 188 additions and 70 deletions

97
.gitignore vendored Normal file
View File

@ -0,0 +1,97 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# Normal rules
#
.*
*.o
*.o.*
*.a
*.s
*.ko
*.so
*.so.dbg
*.mod.c
*.i
*.lst
*.symtypes
*.order
modules.builtin
*.elf
*.bin
*.gz
*.bz2
*.lzma
*.xz
*.lzo
*.patch
*.gcno
*.rej
*.porig
*.orig
#
# Top-level generic files
#
/tags
/TAGS
/linux
/vmlinux
/vmlinuz
/System.map
/Module.markers
/Module.symvers
#
# Debian directory (make deb-pkg)
#
/debian/
#
# git files that we don't want to ignore even it they are dot-files
#
!.gitignore
!.mailmap
#
# Generated include files
#
include/config
include/generated
arch/*/include/generated
# stgit generated dirs
patches-*
# quilt's files
patches
series
# cscope files
cscope.*
ncscope.*
# gnu global files
GPATH
GRTAGS
GSYMS
GTAGS
*.orig
*~
\#*#
#
# Leavings from module signing
#
extra_certificates
signing_key.priv
signing_key.x509
x509.genkey

View File

@ -14,7 +14,7 @@ EXTRA_CFLAGS += -Wno-unused-parameter
EXTRA_CFLAGS += -Wno-unused-function
EXTRA_CFLAGS += -Wno-unused
#EXTRA_CFLAGS += -Wno-uninitialized
#EXTRA_CFLAGS += -Wno-error=date-time # Fix compile error on gcc 4.9 and later
EXTRA_CFLAGS += -Wno-error=date-time # Fix compile error on gcc 4.9 and later
EXTRA_CFLAGS += -I$(src)/include
EXTRA_CFLAGS += -I$(src)/hal/phydm
@ -63,8 +63,8 @@ CONFIG_ANTENNA_DIVERSITY = n
CONFIG_TDLS = n
CONFIG_WIFI_MONITOR = n
######################## Wake On Lan ##########################
CONFIG_WOWLAN = y
CONFIG_GPIO_WAKEUP = y
CONFIG_WOWLAN = n
CONFIG_GPIO_WAKEUP = n
CONFIG_WAKEUP_GPIO_IDX = default
CONFIG_HIGH_ACTIVE = n
CONFIG_PNO_SUPPORT = n
@ -73,7 +73,7 @@ CONFIG_AP_WOWLAN = n
######### Notify SDIO Host Keep Power During Syspend ##########
CONFIG_RTW_SDIO_PM_KEEP_POWER = y
###################### Platform Related #######################
CONFIG_PLATFORM_I386_PC = n
CONFIG_PLATFORM_I386_PC = y
CONFIG_PLATFORM_ANDROID_X86 = n
CONFIG_PLATFORM_ANDROID_INTEL_X86 = n
CONFIG_PLATFORM_JB_X86 = n
@ -113,7 +113,7 @@ CONFIG_PLATFORM_ARM_SUN8I_W5P1 = n
CONFIG_PLATFORM_ACTIONS_ATM702X = n
CONFIG_PLATFORM_ACTIONS_ATV5201 = n
CONFIG_PLATFORM_ACTIONS_ATM705X = n
CONFIG_PLATFORM_ARM_SUN50IW1P1 = y
CONFIG_PLATFORM_ARM_SUN50IW1P1 = n
CONFIG_PLATFORM_ARM_RTD299X = n
CONFIG_PLATFORM_ARM_SPREADTRUM_6820 = n
CONFIG_PLATFORM_ARM_SPREADTRUM_8810 = n

View File

@ -3992,11 +3992,11 @@ hal_btcoex_AntIsolationConfig_ParaFile(
_rtw_memset(pHalData->para_file_buf , 0 , MAX_PARA_FILE_BUF_LEN);
rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
rtw_merge_string(file__path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
if (rtw_is_file_readable(file_path) == _TRUE)
if (rtw_is_file_readable(file__path) == _TRUE)
{
rlen = rtw_retrieve_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
rlen = rtw_retrieve_from_file(file__path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0)
{
rtStatus = _SUCCESS;

View File

@ -27,7 +27,7 @@
//#define CONFIG_GTK_OL_DBG
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
char file_path[PATH_LENGTH_MAX];
char file__path[PATH_LENGTH_MAX];
#endif
void dump_chip_info(HAL_VERSION ChipVersion)

View File

@ -2920,8 +2920,8 @@ int rtw_is_phy_file_readable(const char *hal_file_name)
{
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
if (hal_file_name) {
rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, hal_file_name);
return rtw_is_file_readable(file_path);
rtw_merge_string(file__path, PATH_LENGTH_MAX, rtw_phy_file_path, hal_file_name);
return rtw_is_file_readable(file__path);
}
#endif
return _FALSE;
@ -2946,11 +2946,11 @@ phy_ConfigMACWithParaFile(
if ((pHalData->mac_reg_len == 0) && (pHalData->mac_reg == NULL))
{
rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
rtw_merge_string(file__path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
if (rtw_is_file_readable(file_path) == _TRUE)
if (rtw_is_file_readable(file__path) == _TRUE)
{
rlen = rtw_retrieve_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
rlen = rtw_retrieve_from_file(file__path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0)
{
rtStatus = _SUCCESS;
@ -3045,11 +3045,11 @@ phy_ConfigBBWithParaFile(
if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL))
{
rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
rtw_merge_string(file__path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
if (rtw_is_file_readable(file_path) == _TRUE)
if (rtw_is_file_readable(file__path) == _TRUE)
{
rlen = rtw_retrieve_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
rlen = rtw_retrieve_from_file(file__path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0)
{
rtStatus = _SUCCESS;
@ -3497,11 +3497,11 @@ phy_ConfigBBWithPgParaFile(
_rtw_memset(pHalData->para_file_buf, 0, MAX_PARA_FILE_BUF_LEN);
if (pHalData->bb_phy_reg_pg == NULL) {
rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
rtw_merge_string(file__path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
if (rtw_is_file_readable(file_path) == _TRUE)
if (rtw_is_file_readable(file__path) == _TRUE)
{
rlen = rtw_retrieve_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
rlen = rtw_retrieve_from_file(file__path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0)
{
rtStatus = _SUCCESS;
@ -3558,11 +3558,11 @@ phy_ConfigBBWithMpParaFile(
if ((pHalData->bb_phy_reg_mp_len == 0) && (pHalData->bb_phy_reg_mp == NULL))
{
rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
rtw_merge_string(file__path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
if (rtw_is_file_readable(file_path) == _TRUE)
if (rtw_is_file_readable(file__path) == _TRUE)
{
rlen = rtw_retrieve_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
rlen = rtw_retrieve_from_file(file__path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0)
{
rtStatus = _SUCCESS;
@ -3694,11 +3694,11 @@ PHY_ConfigRFWithParaFile(
if ((pBufLen != NULL) && (*pBufLen == 0) && (pBuf == NULL))
{
rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
rtw_merge_string(file__path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
if (rtw_is_file_readable(file_path) == _TRUE)
if (rtw_is_file_readable(file__path) == _TRUE)
{
rlen = rtw_retrieve_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
rlen = rtw_retrieve_from_file(file__path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0)
{
rtStatus = _SUCCESS;
@ -3972,11 +3972,11 @@ PHY_ConfigRFWithTxPwrTrackParaFile(
if ((pHalData->rf_tx_pwr_track_len == 0) && (pHalData->rf_tx_pwr_track == NULL))
{
rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
rtw_merge_string(file__path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
if (rtw_is_file_readable(file_path) == _TRUE)
if (rtw_is_file_readable(file__path) == _TRUE)
{
rlen = rtw_retrieve_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
rlen = rtw_retrieve_from_file(file__path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0)
{
rtStatus = _SUCCESS;
@ -4344,11 +4344,11 @@ PHY_ConfigRFWithPowerLimitTableParaFile(
_rtw_memset(pHalData->para_file_buf, 0, MAX_PARA_FILE_BUF_LEN);
if (pHalData->rf_tx_pwr_lmt == NULL) {
rtw_merge_string(file_path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
rtw_merge_string(file__path, PATH_LENGTH_MAX, rtw_phy_file_path, pFileName);
if (rtw_is_file_readable(file_path) == _TRUE)
if (rtw_is_file_readable(file__path) == _TRUE)
{
rlen = rtw_retrieve_from_file(file_path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
rlen = rtw_retrieve_from_file(file__path, pHalData->para_file_buf, MAX_PARA_FILE_BUF_LEN);
if (rlen > 0)
{
rtStatus = _SUCCESS;

View File

@ -286,7 +286,7 @@
/*
* Debug Related Config
*/
#define CONFIG_DEBUG
//#define CONFIG_DEBUG
#ifdef CONFIG_DEBUG
#define DBG 1 /* for ODM & BTCOEX debug */

View File

@ -523,7 +523,7 @@ static inline u32 rtw_phydm_ability_get(_adapter *adapter)
#ifdef CONFIG_LOAD_PHY_PARA_FROM_FILE
extern char *rtw_phy_file_path;
extern char file_path[PATH_LENGTH_MAX];
extern char file__path[PATH_LENGTH_MAX];
#define GetLineFromBuffer(buffer) strsep(&buffer, "\r\n")
#endif

View File

@ -184,7 +184,7 @@ extern void rtl871x_cedbg(const char *fmt, ...);
#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
#elif defined PLATFORM_LINUX
#define _dbgdump printk
#define _seqdump seq_printf
#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
#elif defined PLATFORM_FREEBSD
#define _dbgdump printf
#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)

View File

@ -89,7 +89,7 @@ static const u32 rtw_cipher_suites[] = {
}
#define CHAN2G(_channel, _freq, _flags) { \
.band = IEEE80211_BAND_2GHZ, \
.band = NL80211_BAND_2GHZ, \
.center_freq = (_freq), \
.hw_value = (_channel), \
.flags = (_flags), \
@ -98,7 +98,7 @@ static const u32 rtw_cipher_suites[] = {
}
#define CHAN5G(_channel, _flags) { \
.band = IEEE80211_BAND_5GHZ, \
.band = NL80211_BAND_5GHZ, \
.center_freq = 5000 + (5 * (_channel)), \
.hw_value = (_channel), \
.flags = (_flags), \
@ -215,18 +215,18 @@ void rtw_5g_rates_init(struct ieee80211_rate *rates)
}
struct ieee80211_supported_band *rtw_spt_band_alloc(
enum ieee80211_band band
int 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;
@ -250,12 +250,12 @@ struct ieee80211_supported_band *rtw_spt_band_alloc(
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);
@ -275,13 +275,13 @@ void rtw_spt_band_free(struct ieee80211_supported_band *spt_band)
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
@ -874,7 +874,11 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter)
cfg80211_connect_result(padapter->pnetdev, NULL, NULL, 0, NULL, 0,
WLAN_STATUS_UNSPECIFIED_FAILURE, GFP_ATOMIC/*GFP_KERNEL*/);
else if(pwdev->sme_state==CFG80211_SME_CONNECTED)
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, GFP_ATOMIC);
#else
cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, false, GFP_ATOMIC);
#endif
//else
//DBG_8192C("pwdev->sme_state=%d\n", pwdev->sme_state);
@ -883,7 +887,11 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter)
if (check_fwstate(&padapter->mlmepriv, _FW_LINKED)) {
DBG_871X(FUNC_ADPT_FMT" call cfg80211_disconnected\n", FUNC_ADPT_ARG(padapter));
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, GFP_ATOMIC);
#else
cfg80211_disconnected(padapter->pnetdev, 0, NULL, 0, false, GFP_ATOMIC);
#endif
} else {
DBG_871X(FUNC_ADPT_FMT" call cfg80211_connect_result\n", FUNC_ADPT_ARG(padapter));
cfg80211_connect_result(padapter->pnetdev, NULL, NULL, 0, NULL, 0,
@ -2017,6 +2025,9 @@ exit:
void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
{
struct rtw_wdev_priv *pwdev_priv = adapter_wdev_data(adapter);
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 7, 0)
struct cfg80211_scan_info scan_info;
#endif
_irqL irqL;
_enter_critical_bh(&pwdev_priv->scan_req_lock, &irqL);
@ -2032,7 +2043,13 @@ void rtw_cfg80211_indicate_scan_done(_adapter *adapter, bool aborted)
}
else
{
#if LINUX_VERSION_CODE <= KERNEL_VERSION(4, 7, 0)
cfg80211_scan_done(pwdev_priv->scan_request, aborted);
#else
memset(&scan_info, 0, sizeof(scan_info));
scan_info.aborted = aborted;
cfg80211_scan_done(pwdev_priv->scan_request, &scan_info);
#endif
}
pwdev_priv->scan_request = NULL;
@ -6237,7 +6254,7 @@ int rtw_cfg80211_set_mgnt_wpsp2pie(struct net_device *net, char *buf, int len,
}
static void rtw_cfg80211_init_ht_capab_ex(_adapter *padapter, struct ieee80211_sta_ht_cap *ht_cap, enum ieee80211_band band, u8 rf_type)
static void rtw_cfg80211_init_ht_capab_ex(_adapter *padapter, struct ieee80211_sta_ht_cap *ht_cap, int band, u8 rf_type)
{
struct registry_priv *pregistrypriv = &padapter->registrypriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@ -6257,9 +6274,9 @@ static void rtw_cfg80211_init_ht_capab_ex(_adapter *padapter, struct ieee80211_s
/* RX STBC */
if (TEST_FLAG(phtpriv->stbc_cap, STBC_HT_ENABLE_RX)) {
/*rtw_rx_stbc 0: disable, bit(0):enable 2.4g, bit(1):enable 5g*/
if (IEEE80211_BAND_2GHZ == band)
if (NL80211_BAND_2GHZ == band)
stbc_rx_enable = (pregistrypriv->rx_stbc & BIT(0))?_TRUE:_FALSE;
if (IEEE80211_BAND_5GHZ == band)
if (NL80211_BAND_5GHZ == band)
stbc_rx_enable = (pregistrypriv->rx_stbc & BIT(1))?_TRUE:_FALSE;
if (stbc_rx_enable) {
@ -6285,7 +6302,7 @@ static void rtw_cfg80211_init_ht_capab_ex(_adapter *padapter, struct ieee80211_s
}
}
static void rtw_cfg80211_init_ht_capab(_adapter *padapter, struct ieee80211_sta_ht_cap *ht_cap, enum ieee80211_band band, u8 rf_type)
static void rtw_cfg80211_init_ht_capab(_adapter *padapter, struct ieee80211_sta_ht_cap *ht_cap, int band, u8 rf_type)
{
#define MAX_BIT_RATE_40MHZ_MCS23 450 /* Mbps */
#define MAX_BIT_RATE_40MHZ_MCS15 300 /* Mbps */
@ -6310,7 +6327,7 @@ static void rtw_cfg80211_init_ht_capab(_adapter *padapter, struct ieee80211_sta_
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
@ -6353,15 +6370,15 @@ void rtw_cfg80211_init_wiphy(_adapter *padapter)
DBG_8192C("%s:rf_type=%d\n", __func__, rf_type);
if (IsSupported24G(padapter->registrypriv.wireless_mode)) {
bands = wiphy->bands[IEEE80211_BAND_2GHZ];
bands = wiphy->bands[NL80211_BAND_2GHZ];
if(bands)
rtw_cfg80211_init_ht_capab(padapter, &bands->ht_cap, IEEE80211_BAND_2GHZ, rf_type);
rtw_cfg80211_init_ht_capab(padapter, &bands->ht_cap, NL80211_BAND_2GHZ, rf_type);
}
#ifdef CONFIG_IEEE80211_BAND_5GHZ
#ifdef CONFIG_NL80211_BAND_5GHZ
if (IsSupported5G(padapter->registrypriv.wireless_mode)) {
bands = wiphy->bands[IEEE80211_BAND_5GHZ];
bands = wiphy->bands[NL80211_BAND_5GHZ];
if(bands)
rtw_cfg80211_init_ht_capab(padapter, &bands->ht_cap, IEEE80211_BAND_5GHZ, rf_type);
rtw_cfg80211_init_ht_capab(padapter, &bands->ht_cap, NL80211_BAND_5GHZ, rf_type);
}
#endif
/* init regulary domain */
@ -6449,11 +6466,11 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
wiphy->n_cipher_suites = ARRAY_SIZE(rtw_cipher_suites);
if (IsSupported24G(adapter->registrypriv.wireless_mode))
wiphy->bands[IEEE80211_BAND_2GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_2GHZ);
wiphy->bands[NL80211_BAND_2GHZ] = rtw_spt_band_alloc(NL80211_BAND_2GHZ);
#ifdef CONFIG_IEEE80211_BAND_5GHZ
#ifdef CONFIG_NL80211_BAND_5GHZ
if (IsSupported5G(adapter->registrypriv.wireless_mode))
wiphy->bands[IEEE80211_BAND_5GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_5GHZ);
wiphy->bands[NL80211_BAND_5GHZ] = rtw_spt_band_alloc(NL80211_BAND_5GHZ);
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,38) && LINUX_VERSION_CODE < KERNEL_VERSION(3,0,0))
@ -6605,13 +6622,13 @@ void rtw_wiphy_free(struct wiphy *wiphy)
DBG_871X(FUNC_WIPHY_FMT"\n", FUNC_WIPHY_ARG(wiphy));
if (wiphy->bands[IEEE80211_BAND_2GHZ]) {
rtw_spt_band_free(wiphy->bands[IEEE80211_BAND_2GHZ]);
wiphy->bands[IEEE80211_BAND_2GHZ] = NULL;
if (wiphy->bands[NL80211_BAND_2GHZ]) {
rtw_spt_band_free(wiphy->bands[NL80211_BAND_2GHZ]);
wiphy->bands[NL80211_BAND_2GHZ] = NULL;
}
if (wiphy->bands[IEEE80211_BAND_5GHZ]) {
rtw_spt_band_free(wiphy->bands[IEEE80211_BAND_5GHZ]);
wiphy->bands[IEEE80211_BAND_5GHZ] = NULL;
if (wiphy->bands[NL80211_BAND_5GHZ]) {
rtw_spt_band_free(wiphy->bands[NL80211_BAND_5GHZ]);
wiphy->bands[NL80211_BAND_5GHZ] = NULL;
}
wiphy_free(wiphy);
@ -6727,7 +6744,11 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3, 11, 0)) || defined(COMPAT_KERNEL_RELEASE)
if (wdev->current_bss) {
DBG_871X(FUNC_ADPT_FMT" clear current_bss by cfg80211_disconnected\n", FUNC_ADPT_ARG(adapter));
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 2, 0)
cfg80211_disconnected(adapter->pnetdev, 0, NULL, 0, GFP_ATOMIC);
#else
cfg80211_disconnected(adapter->pnetdev, 0, NULL, 0, false, GFP_ATOMIC);
#endif
}
#endif

View File

@ -151,7 +151,7 @@ static void _rtw_reg_apply_beaconing_flags(struct wiphy *wiphy,
u32 bandwidth = 0;
int r;
for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
for (band = 0; band < NUM_NL80211_BANDS; band++) {
if (!wiphy->bands[band])
continue;
@ -205,9 +205,9 @@ static void _rtw_reg_apply_active_scan_flags(struct wiphy *wiphy,
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 @@ static void _rtw_reg_apply_radar_flags(struct wiphy *wiphy)
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];
@ -316,7 +316,7 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy)
u32 freq;
// all channels disable
for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
for (i = 0; i < NUM_NL80211_BANDS; i++) {
sband = wiphy->bands[i];
if (sband) {
@ -364,7 +364,7 @@ static void _rtw_reg_apply_flags(struct wiphy *wiphy)
u16 channel;
u32 freq;
for (i = 0; i < IEEE80211_NUM_BANDS; i++) {
for (i = 0; i < NUM_NL80211_BANDS; i++) {
sband = wiphy->bands[i];
if (sband)