mirror of
https://github.com/chinawrj/rtl8812au
synced 2025-01-10 16:17:44 +00:00
commit
37aa584934
5
Makefile
5
Makefile
@ -14,7 +14,7 @@ EXTRA_CFLAGS += -Wno-unused-parameter
|
|||||||
EXTRA_CFLAGS += -Wno-unused-function
|
EXTRA_CFLAGS += -Wno-unused-function
|
||||||
EXTRA_CFLAGS += -Wno-unused
|
EXTRA_CFLAGS += -Wno-unused
|
||||||
EXTRA_CFLAGS += -Wno-date-time
|
EXTRA_CFLAGS += -Wno-date-time
|
||||||
EXTRA_CFLAGS += -Wno-misleading-indentation
|
#EXTRA_CFLAGS += -Wno-misleading-indentation
|
||||||
#EXTRA_CFLAGS += -Wno-uninitialized
|
#EXTRA_CFLAGS += -Wno-uninitialized
|
||||||
|
|
||||||
GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
|
GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
|
||||||
@ -48,6 +48,7 @@ CONFIG_PCI_HCI = n
|
|||||||
CONFIG_SDIO_HCI = n
|
CONFIG_SDIO_HCI = n
|
||||||
CONFIG_GSPI_HCI = n
|
CONFIG_GSPI_HCI = n
|
||||||
########################## Features ###########################
|
########################## Features ###########################
|
||||||
|
CONFIG_NET_NS = y
|
||||||
CONFIG_MP_INCLUDED = y
|
CONFIG_MP_INCLUDED = y
|
||||||
CONFIG_POWER_SAVING = n
|
CONFIG_POWER_SAVING = n
|
||||||
CONFIG_USB_AUTOSUSPEND = n
|
CONFIG_USB_AUTOSUSPEND = n
|
||||||
@ -64,7 +65,7 @@ CONFIG_CALIBRATE_TX_POWER_TO_MAX = y
|
|||||||
CONFIG_RTW_ADAPTIVITY_EN = disable
|
CONFIG_RTW_ADAPTIVITY_EN = disable
|
||||||
CONFIG_RTW_ADAPTIVITY_MODE = normal
|
CONFIG_RTW_ADAPTIVITY_MODE = normal
|
||||||
CONFIG_SIGNAL_SCALE_MAPPING = n
|
CONFIG_SIGNAL_SCALE_MAPPING = n
|
||||||
CONFIG_80211W = n
|
CONFIG_80211W = y
|
||||||
CONFIG_REDUCE_TX_CPU_LOADING = n
|
CONFIG_REDUCE_TX_CPU_LOADING = n
|
||||||
CONFIG_BR_EXT = y
|
CONFIG_BR_EXT = y
|
||||||
CONFIG_TDLS = n
|
CONFIG_TDLS = n
|
||||||
|
@ -336,7 +336,6 @@ u16 rtw_get_efuse_mask_arraylen(PADAPTER pAdapter)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef RTW_HALMAC
|
#ifdef RTW_HALMAC
|
||||||
#include "../../hal/hal_halmac.h"
|
#include "../../hal/hal_halmac.h"
|
||||||
|
|
||||||
@ -386,7 +385,6 @@ void EFUSE_GetEfuseDefinition(PADAPTER adapter, u8 efusetype, u8 type, void *out
|
|||||||
struct dvobj_priv *d;
|
struct dvobj_priv *d;
|
||||||
u32 v32 = 0;
|
u32 v32 = 0;
|
||||||
|
|
||||||
|
|
||||||
d = adapter_to_dvobj(adapter);
|
d = adapter_to_dvobj(adapter);
|
||||||
|
|
||||||
if (adapter->HalFunc.EFUSEGetEfuseDefinition) {
|
if (adapter->HalFunc.EFUSEGetEfuseDefinition) {
|
||||||
@ -414,7 +412,6 @@ u8 rtw_efuse_access(PADAPTER adapter, u8 write, u16 addr, u16 cnts, u8 *data)
|
|||||||
u32 size, i;
|
u32 size, i;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
|
||||||
d = adapter_to_dvobj(adapter);
|
d = adapter_to_dvobj(adapter);
|
||||||
err = rtw_halmac_get_physical_efuse_size(d, &size);
|
err = rtw_halmac_get_physical_efuse_size(d, &size);
|
||||||
if (err)
|
if (err)
|
||||||
@ -715,7 +712,6 @@ VOID hal_ReadEFuse_BT_logic_map(
|
|||||||
u16 i, total, used;
|
u16 i, total, used;
|
||||||
u8 efuse_usage;
|
u8 efuse_usage;
|
||||||
|
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
/* Do NOT excess total size of EFuse table. Added by Roger, 2008.11.10. */
|
/* Do NOT excess total size of EFuse table. Added by Roger, 2008.11.10. */
|
||||||
/* */
|
/* */
|
||||||
@ -830,7 +826,6 @@ exit:
|
|||||||
rtw_mfree(efuseTbl, EFUSE_BT_MAP_LEN);
|
rtw_mfree(efuseTbl, EFUSE_BT_MAP_LEN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static u8 hal_EfusePartialWriteCheck(
|
static u8 hal_EfusePartialWriteCheck(
|
||||||
PADAPTER padapter,
|
PADAPTER padapter,
|
||||||
u8 efuseType,
|
u8 efuseType,
|
||||||
@ -873,7 +868,6 @@ static u8 hal_EfusePartialWriteCheck(
|
|||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static u8 hal_EfusePgPacketWrite2ByteHeader(
|
static u8 hal_EfusePgPacketWrite2ByteHeader(
|
||||||
PADAPTER padapter,
|
PADAPTER padapter,
|
||||||
u8 efuseType,
|
u8 efuseType,
|
||||||
@ -940,7 +934,6 @@ static u8 hal_EfusePgPacketWrite2ByteHeader(
|
|||||||
return _TRUE;
|
return _TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static u8 hal_EfusePgPacketWrite1ByteHeader(
|
static u8 hal_EfusePgPacketWrite1ByteHeader(
|
||||||
PADAPTER pAdapter,
|
PADAPTER pAdapter,
|
||||||
u8 efuseType,
|
u8 efuseType,
|
||||||
@ -953,7 +946,6 @@ static u8 hal_EfusePgPacketWrite1ByteHeader(
|
|||||||
u16 efuse_addr = *pAddr;
|
u16 efuse_addr = *pAddr;
|
||||||
u8 repeatcnt = 0;
|
u8 repeatcnt = 0;
|
||||||
|
|
||||||
|
|
||||||
/* RTW_INFO("%s\n", __FUNCTION__); */
|
/* RTW_INFO("%s\n", __FUNCTION__); */
|
||||||
pg_header = ((pTargetPkt->offset << 4) & 0xf0) | pTargetPkt->word_en;
|
pg_header = ((pTargetPkt->offset << 4) & 0xf0) | pTargetPkt->word_en;
|
||||||
|
|
||||||
@ -996,7 +988,6 @@ static u8 hal_EfusePgPacketWriteHeader(
|
|||||||
return bRet;
|
return bRet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static u8
|
static u8
|
||||||
Hal_EfuseWordEnableDataWrite(
|
Hal_EfuseWordEnableDataWrite(
|
||||||
PADAPTER padapter,
|
PADAPTER padapter,
|
||||||
@ -1010,7 +1001,6 @@ Hal_EfuseWordEnableDataWrite(
|
|||||||
u8 badworden = 0x0F;
|
u8 badworden = 0x0F;
|
||||||
u8 tmpdata[PGPKT_DATA_SIZE];
|
u8 tmpdata[PGPKT_DATA_SIZE];
|
||||||
|
|
||||||
|
|
||||||
/* RTW_INFO("%s: efuse_addr=%#x word_en=%#x\n", __FUNCTION__, efuse_addr, word_en); */
|
/* RTW_INFO("%s: efuse_addr=%#x word_en=%#x\n", __FUNCTION__, efuse_addr, word_en); */
|
||||||
_rtw_memset(tmpdata, 0xFF, PGPKT_DATA_SIZE);
|
_rtw_memset(tmpdata, 0xFF, PGPKT_DATA_SIZE);
|
||||||
|
|
||||||
@ -1116,7 +1106,6 @@ u8 EfusePgPacketWrite_BT(
|
|||||||
return _TRUE;
|
return _TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#else /* !RTW_HALMAC */
|
#else /* !RTW_HALMAC */
|
||||||
/* ------------------------------------------------------------------------------ */
|
/* ------------------------------------------------------------------------------ */
|
||||||
#define REG_EFUSE_CTRL 0x0030
|
#define REG_EFUSE_CTRL 0x0030
|
||||||
@ -1469,7 +1458,6 @@ EFUSE_Write1Byte(
|
|||||||
}
|
}
|
||||||
} /* EFUSE_Write1Byte */
|
} /* EFUSE_Write1Byte */
|
||||||
|
|
||||||
|
|
||||||
/* 11/16/2008 MH Read one byte from real Efuse. */
|
/* 11/16/2008 MH Read one byte from real Efuse. */
|
||||||
u8
|
u8
|
||||||
efuse_OneByteRead(
|
efuse_OneByteRead(
|
||||||
@ -1555,7 +1543,6 @@ efuse_OneByteWrite(
|
|||||||
/* -----------------e-fuse reg ctrl --------------------------------- */
|
/* -----------------e-fuse reg ctrl --------------------------------- */
|
||||||
/* address */
|
/* address */
|
||||||
|
|
||||||
|
|
||||||
efuseValue = rtw_read32(pAdapter, EFUSE_CTRL);
|
efuseValue = rtw_read32(pAdapter, EFUSE_CTRL);
|
||||||
efuseValue |= (BIT21 | BIT31);
|
efuseValue |= (BIT21 | BIT31);
|
||||||
efuseValue &= ~(0x3FFFF);
|
efuseValue &= ~(0x3FFFF);
|
||||||
@ -1627,7 +1614,6 @@ Efuse_PgPacketWrite(IN PADAPTER pAdapter,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
Efuse_PgPacketWrite_BT(IN PADAPTER pAdapter,
|
Efuse_PgPacketWrite_BT(IN PADAPTER pAdapter,
|
||||||
IN u8 offset,
|
IN u8 offset,
|
||||||
@ -1642,7 +1628,6 @@ Efuse_PgPacketWrite_BT(IN PADAPTER pAdapter,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
u8
|
u8
|
||||||
Efuse_WordEnableDataWrite(IN PADAPTER pAdapter,
|
Efuse_WordEnableDataWrite(IN PADAPTER pAdapter,
|
||||||
IN u16 efuse_addr,
|
IN u16 efuse_addr,
|
||||||
@ -2087,7 +2072,6 @@ efuse_ShadowRead4Byte(
|
|||||||
|
|
||||||
} /* efuse_ShadowRead4Byte */
|
} /* efuse_ShadowRead4Byte */
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
* Function: efuse_ShadowWrite1Byte
|
* Function: efuse_ShadowWrite1Byte
|
||||||
* efuse_ShadowWrite2Byte
|
* efuse_ShadowWrite2Byte
|
||||||
@ -2135,7 +2119,6 @@ efuse_ShadowWrite2Byte(
|
|||||||
|
|
||||||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter);
|
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(pAdapter);
|
||||||
|
|
||||||
|
|
||||||
pHalData->efuse_eeprom_data[Offset] = Value & 0x00FF;
|
pHalData->efuse_eeprom_data[Offset] = Value & 0x00FF;
|
||||||
pHalData->efuse_eeprom_data[Offset + 1] = Value >> 8;
|
pHalData->efuse_eeprom_data[Offset + 1] = Value >> 8;
|
||||||
|
|
||||||
@ -2157,7 +2140,6 @@ efuse_ShadowWrite4Byte(
|
|||||||
|
|
||||||
} /* efuse_ShadowWrite1Byte */
|
} /* efuse_ShadowWrite1Byte */
|
||||||
|
|
||||||
|
|
||||||
/*-----------------------------------------------------------------------------
|
/*-----------------------------------------------------------------------------
|
||||||
* Function: EFUSE_ShadowRead
|
* Function: EFUSE_ShadowRead
|
||||||
*
|
*
|
||||||
@ -2225,7 +2207,6 @@ EFUSE_ShadowWrite(
|
|||||||
if (pAdapter->registrypriv.mp_mode == 0)
|
if (pAdapter->registrypriv.mp_mode == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
if (Type == 1)
|
if (Type == 1)
|
||||||
efuse_ShadowWrite1Byte(pAdapter, Offset, (u8)Value);
|
efuse_ShadowWrite1Byte(pAdapter, Offset, (u8)Value);
|
||||||
else if (Type == 2)
|
else if (Type == 2)
|
||||||
@ -2344,7 +2325,6 @@ void EFUSE_ShadowMapUpdate(
|
|||||||
u8 *efuse_map = NULL;
|
u8 *efuse_map = NULL;
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
|
||||||
mapLen = EEPROM_MAX_SIZE;
|
mapLen = EEPROM_MAX_SIZE;
|
||||||
efuse_map = pHalData->efuse_eeprom_data;
|
efuse_map = pHalData->efuse_eeprom_data;
|
||||||
/* efuse default content is 0xFF */
|
/* efuse default content is 0xFF */
|
||||||
|
@ -77,7 +77,6 @@
|
|||||||
|
|
||||||
#endif /* CONFIG_WAPI_SUPPORT */
|
#endif /* CONFIG_WAPI_SUPPORT */
|
||||||
|
|
||||||
|
|
||||||
static const u32 rtw_cipher_suites[] = {
|
static const u32 rtw_cipher_suites[] = {
|
||||||
WLAN_CIPHER_SUITE_WEP40,
|
WLAN_CIPHER_SUITE_WEP40,
|
||||||
WLAN_CIPHER_SUITE_WEP104,
|
WLAN_CIPHER_SUITE_WEP104,
|
||||||
@ -196,7 +195,6 @@ static struct ieee80211_channel rtw_5ghz_a_channels[] = {
|
|||||||
CHAN5G(216, 0),
|
CHAN5G(216, 0),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void rtw_2g_channels_init(struct ieee80211_channel *channels)
|
void rtw_2g_channels_init(struct ieee80211_channel *channels)
|
||||||
{
|
{
|
||||||
_rtw_memcpy((void *)channels, (void *)rtw_2ghz_channels,
|
_rtw_memcpy((void *)channels, (void *)rtw_2ghz_channels,
|
||||||
@ -471,7 +469,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
|
|||||||
}
|
}
|
||||||
/* _exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL); */
|
/* _exit_critical_bh(&pwdev_priv->scan_req_lock, &irqL); */
|
||||||
|
|
||||||
|
|
||||||
channel = pnetwork->network.Configuration.DSConfig;
|
channel = pnetwork->network.Configuration.DSConfig;
|
||||||
freq = rtw_ch2freq(channel);
|
freq = rtw_ch2freq(channel);
|
||||||
notify_channel = ieee80211_get_channel(wiphy, freq);
|
notify_channel = ieee80211_get_channel(wiphy, freq);
|
||||||
@ -524,7 +521,6 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(_adapter *padapter, struct wlan_net
|
|||||||
_rtw_memcpy(pwlanhdr->addr2, pnetwork->network.MacAddress, ETH_ALEN);
|
_rtw_memcpy(pwlanhdr->addr2, pnetwork->network.MacAddress, ETH_ALEN);
|
||||||
_rtw_memcpy(pwlanhdr->addr3, pnetwork->network.MacAddress, ETH_ALEN);
|
_rtw_memcpy(pwlanhdr->addr3, pnetwork->network.MacAddress, ETH_ALEN);
|
||||||
|
|
||||||
|
|
||||||
/* pbuf += sizeof(struct rtw_ieee80211_hdr_3addr); */
|
/* pbuf += sizeof(struct rtw_ieee80211_hdr_3addr); */
|
||||||
len = sizeof(struct rtw_ieee80211_hdr_3addr);
|
len = sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||||
_rtw_memcpy((pbuf + len), pnetwork->network.IEs, pnetwork->network.IELength);
|
_rtw_memcpy((pbuf + len), pnetwork->network.IEs, pnetwork->network.IELength);
|
||||||
@ -754,10 +750,10 @@ void rtw_cfg80211_indicate_connect(_adapter *padapter)
|
|||||||
}
|
}
|
||||||
|
|
||||||
check_bss:
|
check_bss:
|
||||||
if (!rtw_cfg80211_check_bss(padapter))
|
if (!rtw_cfg80211_check_bss(padapter)){
|
||||||
RTW_PRINT(FUNC_ADPT_FMT" BSS not found !!\n", FUNC_ADPT_ARG(padapter));
|
RTW_PRINT(FUNC_ADPT_FMT" BSS not found !!\n", FUNC_ADPT_ARG(padapter));
|
||||||
|
|
||||||
if (rtw_to_roam(padapter) > 0) {
|
}else if (rtw_to_roam(padapter) > 0) {
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 39) || defined(COMPAT_KERNEL_RELEASE)
|
||||||
struct wiphy *wiphy = pwdev->wiphy;
|
struct wiphy *wiphy = pwdev->wiphy;
|
||||||
struct ieee80211_channel *notify_channel;
|
struct ieee80211_channel *notify_channel;
|
||||||
@ -894,7 +890,6 @@ void rtw_cfg80211_indicate_disconnect(_adapter *padapter, u16 reason, u8 locally
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_param *param, u32 param_len)
|
static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, struct ieee_param *param, u32 param_len)
|
||||||
{
|
{
|
||||||
@ -6497,6 +6492,10 @@ static void rtw_cfg80211_preinit_wiphy(_adapter *adapter, struct wiphy *wiphy)
|
|||||||
wiphy->bands[IEEE80211_BAND_5GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_5GHZ);
|
wiphy->bands[IEEE80211_BAND_5GHZ] = rtw_spt_band_alloc(IEEE80211_BAND_5GHZ);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(CONFIG_NET_NS)
|
||||||
|
wiphy->flags |= WIPHY_FLAG_NETNS_OK;
|
||||||
|
#endif //CONFIG_NET_NS
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 38) && LINUX_VERSION_CODE < KERNEL_VERSION(3, 0, 0))
|
||||||
#if defined(CONFIG_NET_NS)
|
#if defined(CONFIG_NET_NS)
|
||||||
wiphy->flags |= WIPHY_FLAG_NETNS_OK;
|
wiphy->flags |= WIPHY_FLAG_NETNS_OK;
|
||||||
@ -6597,6 +6596,7 @@ static struct cfg80211_ops rtw_cfg80211_ops = {
|
|||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 6, 0))
|
||||||
.set_channel = cfg80211_rtw_set_channel,
|
.set_channel = cfg80211_rtw_set_channel,
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* .auth = cfg80211_rtw_auth, */
|
/* .auth = cfg80211_rtw_auth, */
|
||||||
/* .assoc = cfg80211_rtw_assoc, */
|
/* .assoc = cfg80211_rtw_assoc, */
|
||||||
#endif /* CONFIG_AP_MODE */
|
#endif /* CONFIG_AP_MODE */
|
||||||
|
@ -183,8 +183,6 @@ static void find_ns(struct ieee80211_radiotap_iterator *iterator,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ieee80211_radiotap_iterator_next - return next radiotap parser iterator arg
|
* ieee80211_radiotap_iterator_next - return next radiotap parser iterator arg
|
||||||
* @iterator: radiotap_iterator to move to next arg (if any)
|
* @iterator: radiotap_iterator to move to next arg (if any)
|
||||||
@ -366,4 +364,3 @@ int rtw_ieee80211_radiotap_iterator_next(
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1919,12 +1919,10 @@ static int readFile(struct file *fp, char *buf, int len)
|
|||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
while (sum < len) {
|
while (sum < len) {
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0))
|
||||||
rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos);
|
rlen = kernel_read(fp, buf + sum, len - sum, &fp->f_pos);
|
||||||
#else
|
#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0))
|
||||||
rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos);
|
rlen = __vfs_read(fp, buf + sum, len - sum, &fp->f_pos);
|
||||||
#endif
|
|
||||||
#else
|
#else
|
||||||
rlen = fp->f_op->read(fp, buf + sum, len - sum, &fp->f_pos);
|
rlen = fp->f_op->read(fp, buf + sum, len - sum, &fp->f_pos);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user