mirror of
https://github.com/Mange/rtl8192eu-linux-driver
synced 2024-12-24 13:01:44 +00:00
Merge pull request #250 from CGarces/remove_windows_code
Remove code from other platforms
This commit is contained in:
commit
41fddb43b3
1
Makefile
1
Makefile
@ -2221,7 +2221,6 @@ rtk_core := core/rtw_cmd.o \
|
||||
core/rtw_security.o \
|
||||
core/rtw_debug.o \
|
||||
core/rtw_io.o \
|
||||
core/rtw_ioctl_query.o \
|
||||
core/rtw_ioctl_set.o \
|
||||
core/rtw_ieee80211.o \
|
||||
core/rtw_mlme.o \
|
||||
|
@ -164,15 +164,6 @@ static sint _rtw_init_evt_priv(struct evt_priv *pevtpriv)
|
||||
|
||||
pevtpriv->c2h_mem = pevtpriv->allocated_c2h_mem + 4\
|
||||
- ((u32)(pevtpriv->allocated_c2h_mem) & 3);
|
||||
#ifdef PLATFORM_OS_XP
|
||||
pevtpriv->pc2h_mdl = IoAllocateMdl((u8 *)pevtpriv->c2h_mem, C2H_MEM_SZ , FALSE, FALSE, NULL);
|
||||
|
||||
if (pevtpriv->pc2h_mdl == NULL) {
|
||||
res = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
MmBuildMdlForNonPagedPool(pevtpriv->pc2h_mdl);
|
||||
#endif
|
||||
#endif /* end of CONFIG_SDIO_HCI */
|
||||
|
||||
_rtw_init_queue(&(pevtpriv->evt_queue));
|
||||
|
@ -47,10 +47,6 @@ jackson@realtek.com.tw
|
||||
#include <drv_types.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_PLATFORM_RTL8197D)
|
||||
#define rtw_le16_to_cpu(val) val
|
||||
#define rtw_le32_to_cpu(val) val
|
||||
|
@ -1,166 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#define _RTW_IOCTL_QUERY_C_
|
||||
|
||||
#include <drv_types.h>
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
/*
|
||||
* Added for WPA2-PSK, by Annie, 2005-09-20.
|
||||
* */
|
||||
u8
|
||||
query_802_11_capability(
|
||||
_adapter *Adapter,
|
||||
u8 *pucBuf,
|
||||
u32 *pulOutLen
|
||||
)
|
||||
{
|
||||
static NDIS_802_11_AUTHENTICATION_ENCRYPTION szAuthEnc[] = {
|
||||
{Ndis802_11AuthModeOpen, Ndis802_11EncryptionDisabled},
|
||||
{Ndis802_11AuthModeOpen, Ndis802_11Encryption1Enabled},
|
||||
{Ndis802_11AuthModeShared, Ndis802_11EncryptionDisabled},
|
||||
{Ndis802_11AuthModeShared, Ndis802_11Encryption1Enabled},
|
||||
{Ndis802_11AuthModeWPA, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPA, Ndis802_11Encryption3Enabled},
|
||||
{Ndis802_11AuthModeWPAPSK, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPAPSK, Ndis802_11Encryption3Enabled},
|
||||
{Ndis802_11AuthModeWPANone, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPANone, Ndis802_11Encryption3Enabled},
|
||||
{Ndis802_11AuthModeWPA2, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPA2, Ndis802_11Encryption3Enabled},
|
||||
{Ndis802_11AuthModeWPA2PSK, Ndis802_11Encryption2Enabled},
|
||||
{Ndis802_11AuthModeWPA2PSK, Ndis802_11Encryption3Enabled}
|
||||
};
|
||||
static ULONG ulNumOfPairSupported = sizeof(szAuthEnc) / sizeof(NDIS_802_11_AUTHENTICATION_ENCRYPTION);
|
||||
NDIS_802_11_CAPABILITY *pCap = (NDIS_802_11_CAPABILITY *)pucBuf;
|
||||
u8 *pucAuthEncryptionSupported = (u8 *) pCap->AuthenticationEncryptionSupported;
|
||||
|
||||
|
||||
pCap->Length = sizeof(NDIS_802_11_CAPABILITY);
|
||||
if (ulNumOfPairSupported > 1)
|
||||
pCap->Length += (ulNumOfPairSupported - 1) * sizeof(NDIS_802_11_AUTHENTICATION_ENCRYPTION);
|
||||
|
||||
pCap->Version = 2;
|
||||
pCap->NoOfPMKIDs = NUM_PMKID_CACHE;
|
||||
pCap->NoOfAuthEncryptPairsSupported = ulNumOfPairSupported;
|
||||
|
||||
if (sizeof(szAuthEnc) <= 240) /* 240 = 256 - 4*4 */ { /* SecurityInfo.szCapability: only 256 bytes in size. */
|
||||
memcpy(pucAuthEncryptionSupported, (u8 *)szAuthEnc, sizeof(szAuthEnc));
|
||||
*pulOutLen = pCap->Length;
|
||||
return _TRUE;
|
||||
} else {
|
||||
*pulOutLen = 0;
|
||||
return _FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIATION_INFORMATION pAssocInfo)
|
||||
{
|
||||
struct wlan_network *tgt_network;
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct security_priv *psecuritypriv = &(padapter->securitypriv);
|
||||
WLAN_BSSID_EX *psecnetwork = (WLAN_BSSID_EX *)&pmlmepriv->cur_network.network;
|
||||
u8 *pDest = (u8 *)pAssocInfo + sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
||||
unsigned char i, *auth_ie, *supp_ie;
|
||||
|
||||
/* NdisZeroMemory(pAssocInfo, sizeof(NDIS_802_11_ASSOCIATION_INFORMATION)); */
|
||||
memset(pAssocInfo, 0, sizeof(NDIS_802_11_ASSOCIATION_INFORMATION));
|
||||
/* pAssocInfo->Length = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION); */
|
||||
|
||||
/* ------------------------------------------------------ */
|
||||
/* Association Request related information */
|
||||
/* ------------------------------------------------------ */
|
||||
/* Req_1. AvailableRequestFixedIEs */
|
||||
if (psecnetwork != NULL) {
|
||||
|
||||
pAssocInfo->AvailableRequestFixedIEs |= NDIS_802_11_AI_REQFI_CAPABILITIES | NDIS_802_11_AI_REQFI_CURRENTAPADDRESS;
|
||||
pAssocInfo->RequestFixedIEs.Capabilities = (unsigned short) *&psecnetwork->IEs[10];
|
||||
memcpy(pAssocInfo->RequestFixedIEs.CurrentAPAddress,
|
||||
&psecnetwork->MacAddress, 6);
|
||||
|
||||
pAssocInfo->OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING | _FW_LINKED) == _TRUE) {
|
||||
|
||||
if (psecuritypriv->ndisauthtype >= Ndis802_11AuthModeWPA2)
|
||||
pDest[0] = 48; /* RSN Information Element */
|
||||
else
|
||||
pDest[0] = 221; /* WPA(SSN) Information Element */
|
||||
|
||||
supp_ie = &psecuritypriv->supplicant_ie[0];
|
||||
|
||||
i = 13; /* 0~11 is fixed information element */
|
||||
while ((i < supp_ie[0]) && (i < 256)) {
|
||||
if ((unsigned char)supp_ie[i] == pDest[0]) {
|
||||
memcpy((u8 *)(pDest),
|
||||
&supp_ie[i],
|
||||
supp_ie[1 + i] + 2);
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
i = i + supp_ie[i + 1] + 2;
|
||||
if (supp_ie[1 + i] == 0)
|
||||
i = i + 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
pAssocInfo->RequestIELength += (2 + supp_ie[1 + i]); /* (2 + psecnetwork->IEs[1+i]+4); */
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* ------------------------------------------------------ */
|
||||
/* Association Response related information */
|
||||
/* ------------------------------------------------------ */
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_LINKED) == _TRUE) {
|
||||
tgt_network = &(pmlmepriv->cur_network);
|
||||
if (tgt_network != NULL) {
|
||||
pAssocInfo->AvailableResponseFixedIEs =
|
||||
NDIS_802_11_AI_RESFI_CAPABILITIES
|
||||
| NDIS_802_11_AI_RESFI_ASSOCIATIONID
|
||||
;
|
||||
|
||||
pAssocInfo->ResponseFixedIEs.Capabilities = (unsigned short) *&tgt_network->network.IEs[10];
|
||||
pAssocInfo->ResponseFixedIEs.StatusCode = 0;
|
||||
pAssocInfo->ResponseFixedIEs.AssociationId = (unsigned short) tgt_network->aid;
|
||||
|
||||
pDest = (u8 *)pAssocInfo + sizeof(NDIS_802_11_ASSOCIATION_INFORMATION) + pAssocInfo->RequestIELength;
|
||||
auth_ie = &psecuritypriv->authenticator_ie[0];
|
||||
|
||||
|
||||
i = auth_ie[0] - 12;
|
||||
if (i > 0) {
|
||||
memcpy((u8 *)&pDest[0], &auth_ie[1], i);
|
||||
pAssocInfo->ResponseIELength = i;
|
||||
}
|
||||
|
||||
|
||||
pAssocInfo->OffsetResponseIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION) + pAssocInfo->RequestIELength;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return _TRUE;
|
||||
}
|
||||
#endif
|
@ -190,84 +190,6 @@ exit:
|
||||
return ret;
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 rtw_pnp_set_power_wakeup(_adapter *padapter)
|
||||
{
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
|
||||
res = rtw_setstandby_cmd(padapter, 0);
|
||||
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
u8 rtw_pnp_set_power_sleep(_adapter *padapter)
|
||||
{
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
/* DbgPrint("+rtw_pnp_set_power_sleep\n"); */
|
||||
|
||||
res = rtw_setstandby_cmd(padapter, 1);
|
||||
|
||||
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_reload_defaults(_adapter *padapter, NDIS_802_11_RELOAD_DEFAULTS reloadDefaults)
|
||||
{
|
||||
|
||||
|
||||
|
||||
/* SecClearAllKeys(Adapter); */
|
||||
/* 8711 CAM was not for En/Decrypt only */
|
||||
/* so, we can't clear all keys. */
|
||||
/* should we disable WPAcfg (ox0088) bit 1-2, instead of clear all CAM */
|
||||
|
||||
/* TO DO... */
|
||||
|
||||
|
||||
return _TRUE;
|
||||
}
|
||||
|
||||
u8 set_802_11_test(_adapter *padapter, NDIS_802_11_TEST *test)
|
||||
{
|
||||
u8 ret = _TRUE;
|
||||
|
||||
|
||||
switch (test->Type) {
|
||||
case 1:
|
||||
NdisMIndicateStatus(padapter->hndis_adapter, NDIS_STATUS_MEDIA_SPECIFIC_INDICATION, (PVOID)&test->AuthenticationEvent, test->Length - 8);
|
||||
NdisMIndicateStatusComplete(padapter->hndis_adapter);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
NdisMIndicateStatus(padapter->hndis_adapter, NDIS_STATUS_MEDIA_SPECIFIC_INDICATION, (PVOID)&test->RssiTrigger, sizeof(NDIS_802_11_RSSI));
|
||||
NdisMIndicateStatusComplete(padapter->hndis_adapter);
|
||||
break;
|
||||
|
||||
default:
|
||||
ret = _FALSE;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
u8 rtw_set_802_11_pmkid(_adapter *padapter, NDIS_802_11_PMKID *pmkid)
|
||||
{
|
||||
u8 ret = _SUCCESS;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
u8 rtw_set_802_11_bssid(_adapter *padapter, u8 *bssid)
|
||||
{
|
||||
_irqL irqL;
|
||||
|
@ -14,9 +14,6 @@
|
||||
*****************************************************************************/
|
||||
#define _RTW_MP_C_
|
||||
#include <drv_types.h>
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
#include <sys/unistd.h> /* for RFHIGHPID */
|
||||
#endif
|
||||
|
||||
#include "../hal/phydm/phydm_precomp.h"
|
||||
#if defined(CONFIG_RTL8723B) || defined(CONFIG_RTL8821A)
|
||||
@ -124,64 +121,6 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv)
|
||||
|
||||
}
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#if 0
|
||||
void mp_wi_callback(
|
||||
IN NDIS_WORK_ITEM *pwk_item,
|
||||
IN PVOID cntx
|
||||
)
|
||||
{
|
||||
_adapter *padapter = (_adapter *)cntx;
|
||||
struct mp_priv *pmppriv = &padapter->mppriv;
|
||||
struct mp_wi_cntx *pmp_wi_cntx = &pmppriv->wi_cntx;
|
||||
|
||||
/* Execute specified action. */
|
||||
if (pmp_wi_cntx->curractfunc != NULL) {
|
||||
LARGE_INTEGER cur_time;
|
||||
ULONGLONG start_time, end_time;
|
||||
NdisGetCurrentSystemTime(&cur_time); /* driver version */
|
||||
start_time = cur_time.QuadPart / 10; /* The return value is in microsecond */
|
||||
|
||||
pmp_wi_cntx->curractfunc(padapter);
|
||||
|
||||
NdisGetCurrentSystemTime(&cur_time); /* driver version */
|
||||
end_time = cur_time.QuadPart / 10; /* The return value is in microsecond */
|
||||
|
||||
}
|
||||
|
||||
NdisAcquireSpinLock(&(pmp_wi_cntx->mp_wi_lock));
|
||||
pmp_wi_cntx->bmp_wi_progress = _FALSE;
|
||||
NdisReleaseSpinLock(&(pmp_wi_cntx->mp_wi_lock));
|
||||
|
||||
if (pmp_wi_cntx->bmpdrv_unload)
|
||||
NdisSetEvent(&(pmp_wi_cntx->mp_wi_evt));
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
static int init_mp_priv_by_os(struct mp_priv *pmp_priv)
|
||||
{
|
||||
struct mp_wi_cntx *pmp_wi_cntx;
|
||||
|
||||
if (pmp_priv == NULL)
|
||||
return _FAIL;
|
||||
|
||||
pmp_priv->rx_testcnt = 0;
|
||||
pmp_priv->rx_testcnt1 = 0;
|
||||
pmp_priv->rx_testcnt2 = 0;
|
||||
|
||||
pmp_priv->tx_testcnt = 0;
|
||||
pmp_priv->tx_testcnt1 = 0;
|
||||
|
||||
pmp_wi_cntx = &pmp_priv->wi_cntx
|
||||
pmp_wi_cntx->bmpdrv_unload = _FALSE;
|
||||
pmp_wi_cntx->bmp_wi_progress = _FALSE;
|
||||
pmp_wi_cntx->curractfunc = NULL;
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#if 0
|
||||
static int init_mp_priv_by_os(struct mp_priv *pmp_priv)
|
||||
@ -2055,18 +1994,6 @@ void SetPacketTx(PADAPTER padapter)
|
||||
pmp_priv->tx.PktTxThread = NULL;
|
||||
}
|
||||
#endif
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
{
|
||||
struct proc *p;
|
||||
struct thread *td;
|
||||
pmp_priv->tx.PktTxThread = kproc_kthread_add(mp_xmit_packet_thread, pmp_priv,
|
||||
&p, &td, RFHIGHPID, 0, "MPXmitThread", "MPXmitThread");
|
||||
|
||||
if (pmp_priv->tx.PktTxThread < 0)
|
||||
RTW_INFO("Create PktTx Thread Fail !!!!!\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
Rtw_MPSetMacTxEDCA(padapter);
|
||||
exit:
|
||||
return;
|
||||
|
@ -42,9 +42,6 @@ NDIS_STATUS oid_rt_wireless_mode_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* **************** oid_rtl_seg_81_87_80 section start **************** */
|
||||
NDIS_STATUS oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
struct bb_reg_param *pbbreg;
|
||||
u16 offset;
|
||||
u32 value;
|
||||
@ -78,9 +75,6 @@ NDIS_STATUS oid_rt_pro_write_bb_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
struct bb_reg_param *pbbreg;
|
||||
u16 offset;
|
||||
u32 value;
|
||||
@ -114,9 +108,6 @@ NDIS_STATUS oid_rt_pro_read_bb_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
struct rf_reg_param *pbbreg;
|
||||
u8 path;
|
||||
u8 offset;
|
||||
@ -156,9 +147,6 @@ NDIS_STATUS oid_rt_pro_write_rf_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
struct rf_reg_param *pbbreg;
|
||||
u8 path;
|
||||
u8 offset;
|
||||
@ -203,9 +191,6 @@ NDIS_STATUS oid_rt_pro_read_rf_reg_hdl(struct oid_par_priv *poid_par_priv)
|
||||
* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 ratevalue;/* 4 */
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -234,9 +219,6 @@ NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 mode;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -271,9 +253,6 @@ exit:
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
@ -293,9 +272,6 @@ NDIS_STATUS oid_rt_pro_stop_test_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 Channel;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -328,9 +304,6 @@ NDIS_STATUS oid_rt_pro_set_channel_direct_call_hdl(struct oid_par_priv *poid_par
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_set_bandwidth_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u16 bandwidth;
|
||||
u16 channel_offset;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
@ -363,9 +336,6 @@ NDIS_STATUS oid_rt_set_bandwidth_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 antenna;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -395,9 +365,6 @@ NDIS_STATUS oid_rt_pro_set_antenna_bb_hdl(struct oid_par_priv *poid_par_priv)
|
||||
|
||||
NDIS_STATUS oid_rt_pro_set_tx_power_control_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 tx_pwr_idx;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -530,9 +497,6 @@ NDIS_STATUS oid_rt_pro_reset_rx_packet_received_hdl(struct oid_par_priv *poid_pa
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
@ -552,9 +516,6 @@ NDIS_STATUS oid_rt_reset_phy_rx_packet_count_hdl(struct oid_par_priv *poid_par_p
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
@ -579,9 +540,6 @@ NDIS_STATUS oid_rt_get_phy_rx_packet_received_hdl(struct oid_par_priv *poid_par_
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
@ -607,9 +565,6 @@ NDIS_STATUS oid_rt_get_phy_rx_packet_crc32_error_hdl(struct oid_par_priv *poid_p
|
||||
/* **************** oid_rtl_seg_81_80_20 section end **************** */
|
||||
NDIS_STATUS oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 bStartTest;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -642,9 +597,6 @@ NDIS_STATUS oid_rt_pro_set_continuous_tx_hdl(struct oid_par_priv *poid_par_priv)
|
||||
|
||||
NDIS_STATUS oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 bStartTest;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -677,9 +629,6 @@ NDIS_STATUS oid_rt_pro_set_single_carrier_tx_hdl(struct oid_par_priv *poid_par_p
|
||||
|
||||
NDIS_STATUS oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 bStartTest;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -712,9 +661,6 @@ NDIS_STATUS oid_rt_pro_set_carrier_suppression_tx_hdl(struct oid_par_priv *poid_
|
||||
|
||||
NDIS_STATUS oid_rt_pro_set_single_tone_tx_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 bStartTest;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -743,9 +689,6 @@ NDIS_STATUS oid_rt_pro_trigger_gpio_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
if (poid_par_priv->type_of_oid != SET_OID)
|
||||
@ -765,9 +708,6 @@ NDIS_STATUS oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv)
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
PNDIS_802_11_SSID pssid;
|
||||
@ -801,9 +741,7 @@ NDIS_STATUS oid_rt_pro8711_join_bss_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
pRW_Reg RegRWStruct;
|
||||
u32 offset, width;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
@ -846,9 +784,7 @@ NDIS_STATUS oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
pRW_Reg RegRWStruct;
|
||||
u32 offset, width, value;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
@ -902,9 +838,6 @@ NDIS_STATUS oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv)
|
||||
NDIS_STATUS oid_rt_pro_burst_read_register_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#if 0
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
pBurst_RW_Reg pBstRwReg;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -933,9 +866,6 @@ NDIS_STATUS oid_rt_pro_burst_read_register_hdl(struct oid_par_priv *poid_par_pri
|
||||
NDIS_STATUS oid_rt_pro_burst_write_register_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#if 0
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
pBurst_RW_Reg pBstRwReg;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -966,10 +896,6 @@ NDIS_STATUS oid_rt_pro_write_txcmd_hdl(struct oid_par_priv *poid_par_priv)
|
||||
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
TX_CMD_Desc *TxCmd_Info;
|
||||
|
||||
|
||||
@ -999,9 +925,7 @@ NDIS_STATUS oid_rt_pro_write_txcmd_hdl(struct oid_par_priv *poid_par_priv)
|
||||
NDIS_STATUS oid_rt_pro_read16_eeprom_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#if 0
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
pEEPROM_RWParam pEEPROM;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -1031,9 +955,6 @@ NDIS_STATUS oid_rt_pro_read16_eeprom_hdl(struct oid_par_priv *poid_par_priv)
|
||||
NDIS_STATUS oid_rt_pro_write16_eeprom_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#if 0
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
pEEPROM_RWParam pEEPROM;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -1126,9 +1047,6 @@ NDIS_STATUS oid_rt_rd_attrib_mem_hdl(struct oid_par_priv *poid_par_priv)
|
||||
struct io_queue *pio_queue = (struct io_queue *)Adapter->pio_queue;
|
||||
struct intf_hdl *pintfhdl = &pio_queue->intf;
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
@ -1166,9 +1084,6 @@ NDIS_STATUS oid_rt_wr_attrib_mem_hdl(struct oid_par_priv *poid_par_priv)
|
||||
struct io_queue *pio_queue = (struct io_queue *)Adapter->pio_queue;
|
||||
struct intf_hdl *pintfhdl = &pio_queue->intf;
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
@ -1202,9 +1117,6 @@ NDIS_STATUS oid_rt_pro_set_rf_intfs_hdl(struct oid_par_priv *poid_par_priv)
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
|
||||
@ -1287,9 +1199,6 @@ NDIS_STATUS oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
|
||||
@ -1310,9 +1219,6 @@ NDIS_STATUS oid_rt_pro_set_data_rate_ex_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ----------------------------------------------------------------------------- */
|
||||
NDIS_STATUS oid_rt_get_thermal_meter_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
u8 thermal = 0;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -1341,9 +1247,6 @@ NDIS_STATUS oid_rt_pro_read_tssi_hdl(struct oid_par_priv *poid_par_priv)
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
|
||||
@ -1380,9 +1283,6 @@ NDIS_STATUS oid_rt_pro_read_tssi_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
@ -1412,9 +1312,6 @@ NDIS_STATUS oid_rt_pro_set_power_tracking_hdl(struct oid_par_priv *poid_par_priv
|
||||
NDIS_STATUS oid_rt_pro_set_basic_rate_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#if 0
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u32 ratevalue;
|
||||
u8 datarates[NumRates];
|
||||
int i;
|
||||
@ -1513,9 +1410,6 @@ NDIS_STATUS oid_rt_pro_h2c_set_rate_table_hdl(struct oid_par_priv *poid_par_priv
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
struct setratable_parm *prate_table;
|
||||
@ -1687,9 +1581,6 @@ NDIS_STATUS oid_rt_pro_add_sta_info_hdl(struct oid_par_priv *poid_par_priv)
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
struct sta_info *psta = NULL;
|
||||
@ -1731,9 +1622,6 @@ NDIS_STATUS oid_rt_pro_dele_sta_info_hdl(struct oid_par_priv *poid_par_priv)
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
struct sta_info *psta = NULL;
|
||||
@ -1866,9 +1754,6 @@ NDIS_STATUS oid_rt_pro_query_dr_variable_hdl(struct oid_par_priv *poid_par_priv)
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
DR_VARIABLE_STRUCT *pdrv_var;
|
||||
@ -1930,9 +1815,7 @@ NDIS_STATUS oid_rt_pro_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
PEFUSE_ACCESS_STRUCT pefuse;
|
||||
u8 *data;
|
||||
u16 addr = 0, cnts = 0, max_available_size = 0;
|
||||
@ -1971,9 +1854,7 @@ NDIS_STATUS oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
PEFUSE_ACCESS_STRUCT pefuse;
|
||||
u8 *data;
|
||||
u16 addr = 0, cnts = 0, max_available_size = 0;
|
||||
@ -2008,9 +1889,7 @@ NDIS_STATUS oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
PPGPKT_STRUCT ppgpkt;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -2053,9 +1932,7 @@ NDIS_STATUS oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_get_efuse_current_size_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
u16 size;
|
||||
u8 ret;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
@ -2119,9 +1996,6 @@ NDIS_STATUS oid_rt_pro_efuse_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
u8 *data;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
@ -2170,10 +2044,6 @@ NDIS_STATUS oid_rt_set_crystal_cap_hdl(struct oid_par_priv *poid_par_priv)
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
u32 crystal_cap = 0;
|
||||
|
||||
|
||||
@ -2200,9 +2070,7 @@ NDIS_STATUS oid_rt_set_crystal_cap_hdl(struct oid_par_priv *poid_par_priv)
|
||||
|
||||
NDIS_STATUS oid_rt_set_rx_packet_type_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
u8 rx_pkt_type;
|
||||
/* u32 rcr_val32; */
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
@ -2282,9 +2150,6 @@ NDIS_STATUS oid_rt_pro_set_tx_agc_offset_hdl(struct oid_par_priv *poid_par_priv)
|
||||
#if 0
|
||||
PADAPTER Adapter = (PADAPTER)(poid_par_priv->adapter_context);
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
|
||||
u32 txagc;
|
||||
@ -2460,9 +2325,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
|
||||
/* ------------------------------------------------------------------------------ */
|
||||
NDIS_STATUS oid_rt_set_power_down_hdl(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
#ifdef PLATFORM_OS_XP
|
||||
_irqL oldirql;
|
||||
#endif
|
||||
|
||||
u8 bpwrup;
|
||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
@ -2108,10 +2108,6 @@ void rtw_init_pwrctrl_priv(PADAPTER padapter)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
pwrctrlpriv->pnp_current_pwr_state = NdisDeviceStateD0;
|
||||
#endif
|
||||
|
||||
_init_pwrlock(&pwrctrlpriv->lock);
|
||||
_init_pwrlock(&pwrctrlpriv->check_32k_lock);
|
||||
pwrctrlpriv->rf_pwrstate = rf_on;
|
||||
|
@ -17,13 +17,6 @@
|
||||
#include <drv_types.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_NEW_SIGNAL_STAT_PROCESS
|
||||
static void rtw_signal_stat_timer_hdl(void *ctx);
|
||||
|
||||
|
@ -2129,8 +2129,6 @@ BIP_exit:
|
||||
return res;
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
#if defined(CONFIG_TDLS)
|
||||
/* compress 512-bits */
|
||||
static int sha256_compress(struct sha256_state_rtk *md, unsigned char *buf)
|
||||
@ -2406,7 +2404,7 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem,
|
||||
sha256_vector(2, _addr, _len, mac);
|
||||
}
|
||||
#endif /* CONFIG_TDLS */
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
/**
|
||||
* sha256_prf - SHA256-based Pseudo-Random Function (IEEE 802.11r, 8.5.1.5.2)
|
||||
* @key: Key for PRF
|
||||
@ -2420,7 +2418,6 @@ static void hmac_sha256_vector(u8 *key, size_t key_len, size_t num_elem,
|
||||
* This function is used to derive new, cryptographically separate keys from a
|
||||
* given key.
|
||||
*/
|
||||
#ifndef PLATFORM_FREEBSD /* Baron */
|
||||
#if defined(CONFIG_TDLS)
|
||||
static void sha256_prf(u8 *key, size_t key_len, char *label,
|
||||
u8 *data, size_t data_len, u8 *buf, size_t buf_len)
|
||||
@ -2459,7 +2456,6 @@ static void sha256_prf(u8 *key, size_t key_len, char *label,
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif /* PLATFORM_FREEBSD Baron */
|
||||
|
||||
/* AES tables*/
|
||||
const u32 Te0[256] = {
|
||||
@ -2638,7 +2634,6 @@ const u8 rcons[] = {
|
||||
*
|
||||
* @return the number of rounds for the given cipher key size.
|
||||
*/
|
||||
#ifndef PLATFORM_FREEBSD /* Baron */
|
||||
static void rijndaelKeySetupEnc(u32 rk[/*44*/], const u8 cipherKey[])
|
||||
{
|
||||
int i;
|
||||
@ -2855,7 +2850,6 @@ int omac1_aes_128(const u8 *key, const u8 *data, size_t data_len, u8 *mac)
|
||||
{
|
||||
return omac1_aes_128_vector(key, 1, &data, &data_len, mac);
|
||||
}
|
||||
#endif /* PLATFORM_FREEBSD Baron */
|
||||
|
||||
#ifdef CONFIG_RTW_MESH_AEK
|
||||
/* for AES-SIV */
|
||||
|
@ -16,13 +16,6 @@
|
||||
|
||||
#include <drv_types.h>
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
bool test_st_match_rule(_adapter *adapter, u8 *local_naddr, u8 *local_port, u8 *remote_naddr, u8 *remote_port)
|
||||
{
|
||||
if (ntohs(*((u16 *)local_port)) == 5001 || ntohs(*((u16 *)remote_port)) == 5001)
|
||||
|
@ -17,10 +17,6 @@
|
||||
#include <drv_types.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
#endif
|
||||
|
||||
|
||||
static u8 P802_1H_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0xf8 };
|
||||
static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
|
||||
|
@ -23,10 +23,7 @@
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define rsprintf snprintf
|
||||
#define rstrncat(dst, src, src_size) strncat(dst, src, src_size)
|
||||
#elif defined(PLATFORM_WINDOWS)
|
||||
#define rsprintf sprintf_s
|
||||
#endif
|
||||
|
||||
#define DCMD_Printf DBG_BT_INFO
|
||||
|
||||
#ifdef bEnable
|
||||
|
@ -29,12 +29,6 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
|
||||
(unsigned long)padapter);
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
#ifdef CONFIG_RX_INDICATE_QUEUE
|
||||
TASK_INIT(&precvpriv->rx_indicate_tasklet, 0, rtw_rx_indicate_tasklet, padapter);
|
||||
#endif /* CONFIG_RX_INDICATE_QUEUE */
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||
#ifdef PLATFORM_LINUX
|
||||
precvpriv->int_in_urb = usb_alloc_urb(0, GFP_KERNEL);
|
||||
@ -93,7 +87,6 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
|
||||
|
||||
precvpriv->free_recv_buf_queue_cnt = NR_RECVBUFF;
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD)
|
||||
|
||||
skb_queue_head_init(&precvpriv->rx_skb_queue);
|
||||
|
||||
@ -122,11 +115,6 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
|
||||
#endif /* CONFIG_PREALLOC_RX_SKB_BUFFER */
|
||||
|
||||
if (pskb) {
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
pskb->dev = padapter->pifp;
|
||||
#else
|
||||
pskb->dev = padapter->pnetdev;
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
#ifndef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
tmpaddr = (SIZE_PTR)pskb->data;
|
||||
@ -139,8 +127,6 @@ int usb_init_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
|
||||
}
|
||||
#endif /* CONFIG_PREALLOC_RECV_SKB */
|
||||
|
||||
#endif /* defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) */
|
||||
|
||||
exit:
|
||||
|
||||
return res;
|
||||
@ -198,27 +184,6 @@ void usb_free_recv_priv(_adapter *padapter, u16 ini_in_buf_sz)
|
||||
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
struct sk_buff *pskb;
|
||||
while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue)))
|
||||
rtw_skb_free(pskb);
|
||||
|
||||
#if !defined(CONFIG_USE_USB_BUFFER_ALLOC_RX)
|
||||
rtw_skb_queue_purge(&precvpriv->free_recv_skb_queue);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_RX_INDICATE_QUEUE
|
||||
struct mbuf *m;
|
||||
for (;;) {
|
||||
IF_DEQUEUE(&precvpriv->rx_indicate_queue, m);
|
||||
if (m == NULL)
|
||||
break;
|
||||
rtw_os_pkt_free(m);
|
||||
}
|
||||
mtx_destroy(&precvpriv->rx_indicate_queue.ifq_mtx);
|
||||
#endif /* CONFIG_RX_INDICATE_QUEUE */
|
||||
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
}
|
||||
|
||||
#ifdef CONFIG_FW_C2H_REG
|
||||
|
@ -19,119 +19,73 @@
|
||||
/*@
|
||||
* 2011/03/15 MH Add for different IC HW image file selection. code size consideration.
|
||||
* */
|
||||
#if RT_PLATFORM == PLATFORM_LINUX
|
||||
|
||||
#if (DEV_BUS_TYPE == RT_PCI_INTERFACE)
|
||||
/* @For 92C */
|
||||
#define RTL8192CE_HWIMG_SUPPORT 1
|
||||
#define RTL8192CE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192CU_HWIMG_SUPPORT 0
|
||||
#define RTL8192CU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 92D */
|
||||
#define RTL8192DE_HWIMG_SUPPORT 1
|
||||
#define RTL8192DE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192DU_HWIMG_SUPPORT 0
|
||||
#define RTL8192DU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 8723 */
|
||||
#define RTL8723E_HWIMG_SUPPORT 1
|
||||
#define RTL8723U_HWIMG_SUPPORT 0
|
||||
#define RTL8723S_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 88E */
|
||||
#define RTL8188EE_HWIMG_SUPPORT 0
|
||||
#define RTL8188EU_HWIMG_SUPPORT 0
|
||||
#define RTL8188ES_HWIMG_SUPPORT 0
|
||||
|
||||
#elif (DEV_BUS_TYPE == RT_USB_INTERFACE)
|
||||
/* @For 92C */
|
||||
#define RTL8192CE_HWIMG_SUPPORT 0
|
||||
#define RTL8192CE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192CU_HWIMG_SUPPORT 1
|
||||
#define RTL8192CU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 92D */
|
||||
#define RTL8192DE_HWIMG_SUPPORT 0
|
||||
#define RTL8192DE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192DU_HWIMG_SUPPORT 1
|
||||
#define RTL8192DU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 8723 */
|
||||
#define RTL8723E_HWIMG_SUPPORT 0
|
||||
#define RTL8723U_HWIMG_SUPPORT 1
|
||||
#define RTL8723S_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 88E */
|
||||
#define RTL8188EE_HWIMG_SUPPORT 0
|
||||
#define RTL8188EU_HWIMG_SUPPORT 0
|
||||
#define RTL8188ES_HWIMG_SUPPORT 0
|
||||
|
||||
#elif (DEV_BUS_TYPE == RT_SDIO_INTERFACE)
|
||||
/* @For 92C */
|
||||
#define RTL8192CE_HWIMG_SUPPORT 0
|
||||
#define RTL8192CE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192CU_HWIMG_SUPPORT 1
|
||||
#define RTL8192CU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 92D */
|
||||
#define RTL8192DE_HWIMG_SUPPORT 0
|
||||
#define RTL8192DE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192DU_HWIMG_SUPPORT 1
|
||||
#define RTL8192DU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 8723 */
|
||||
#define RTL8723E_HWIMG_SUPPORT 0
|
||||
#define RTL8723U_HWIMG_SUPPORT 0
|
||||
#define RTL8723S_HWIMG_SUPPORT 1
|
||||
|
||||
/* @For 88E */
|
||||
#define RTL8188EE_HWIMG_SUPPORT 0
|
||||
#define RTL8188EU_HWIMG_SUPPORT 0
|
||||
#define RTL8188ES_HWIMG_SUPPORT 0
|
||||
#endif
|
||||
|
||||
#else /* PLATFORM_WINDOWS & MacOSX */
|
||||
|
||||
#if (DEV_BUS_TYPE == RT_PCI_INTERFACE)
|
||||
/* @For 92C */
|
||||
#define RTL8192CE_HWIMG_SUPPORT 1
|
||||
#define RTL8192CE_TEST_HWIMG_SUPPORT 1
|
||||
#define RTL8192CU_HWIMG_SUPPORT 1
|
||||
#define RTL8192CU_TEST_HWIMG_SUPPORT 1
|
||||
#define RTL8192CE_HWIMG_SUPPORT 1
|
||||
#define RTL8192CE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192CU_HWIMG_SUPPORT 0
|
||||
#define RTL8192CU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 92D */
|
||||
#define RTL8192DE_HWIMG_SUPPORT 1
|
||||
#define RTL8192DE_TEST_HWIMG_SUPPORT 1
|
||||
#define RTL8192DU_HWIMG_SUPPORT 1
|
||||
#define RTL8192DU_TEST_HWIMG_SUPPORT 1
|
||||
#define RTL8192DE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192DU_HWIMG_SUPPORT 0
|
||||
#define RTL8192DU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
#if defined(UNDER_CE)
|
||||
/* @For 8723 */
|
||||
#define RTL8723E_HWIMG_SUPPORT 0
|
||||
#define RTL8723U_HWIMG_SUPPORT 0
|
||||
#define RTL8723S_HWIMG_SUPPORT 1
|
||||
/* @For 8723 */
|
||||
#define RTL8723E_HWIMG_SUPPORT 1
|
||||
#define RTL8723U_HWIMG_SUPPORT 0
|
||||
#define RTL8723S_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 88E */
|
||||
#define RTL8188EE_HWIMG_SUPPORT 0
|
||||
#define RTL8188EU_HWIMG_SUPPORT 0
|
||||
#define RTL8188ES_HWIMG_SUPPORT 0
|
||||
/* @For 88E */
|
||||
#define RTL8188EE_HWIMG_SUPPORT 0
|
||||
#define RTL8188EU_HWIMG_SUPPORT 0
|
||||
#define RTL8188ES_HWIMG_SUPPORT 0
|
||||
|
||||
#else
|
||||
#elif (DEV_BUS_TYPE == RT_USB_INTERFACE)
|
||||
/* @For 92C */
|
||||
#define RTL8192CE_HWIMG_SUPPORT 0
|
||||
#define RTL8192CE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192CU_HWIMG_SUPPORT 1
|
||||
#define RTL8192CU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 8723 */
|
||||
#define RTL8723E_HWIMG_SUPPORT 1
|
||||
/* @#define RTL_8723E_TEST_HWIMG_SUPPORT 1 */
|
||||
#define RTL8723U_HWIMG_SUPPORT 1
|
||||
/* @#define RTL_8723U_TEST_HWIMG_SUPPORT 1 */
|
||||
#define RTL8723S_HWIMG_SUPPORT 1
|
||||
/* @#define RTL_8723S_TEST_HWIMG_SUPPORT 1 */
|
||||
/* @For 92D */
|
||||
#define RTL8192DE_HWIMG_SUPPORT 0
|
||||
#define RTL8192DE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192DU_HWIMG_SUPPORT 1
|
||||
#define RTL8192DU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 88E */
|
||||
#define RTL8188EE_HWIMG_SUPPORT 1
|
||||
#define RTL8188EU_HWIMG_SUPPORT 1
|
||||
#define RTL8188ES_HWIMG_SUPPORT 1
|
||||
#endif
|
||||
/* @For 8723 */
|
||||
#define RTL8723E_HWIMG_SUPPORT 0
|
||||
#define RTL8723U_HWIMG_SUPPORT 1
|
||||
#define RTL8723S_HWIMG_SUPPORT 0
|
||||
|
||||
#endif
|
||||
/* @For 88E */
|
||||
#define RTL8188EE_HWIMG_SUPPORT 0
|
||||
#define RTL8188EU_HWIMG_SUPPORT 0
|
||||
#define RTL8188ES_HWIMG_SUPPORT 0
|
||||
|
||||
#elif (DEV_BUS_TYPE == RT_SDIO_INTERFACE)
|
||||
/* @For 92C */
|
||||
#define RTL8192CE_HWIMG_SUPPORT 0
|
||||
#define RTL8192CE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192CU_HWIMG_SUPPORT 1
|
||||
#define RTL8192CU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 92D */
|
||||
#define RTL8192DE_HWIMG_SUPPORT 0
|
||||
#define RTL8192DE_TEST_HWIMG_SUPPORT 0
|
||||
#define RTL8192DU_HWIMG_SUPPORT 1
|
||||
#define RTL8192DU_TEST_HWIMG_SUPPORT 0
|
||||
|
||||
/* @For 8723 */
|
||||
#define RTL8723E_HWIMG_SUPPORT 0
|
||||
#define RTL8723U_HWIMG_SUPPORT 0
|
||||
#define RTL8723S_HWIMG_SUPPORT 1
|
||||
|
||||
/* @For 88E */
|
||||
#define RTL8188EE_HWIMG_SUPPORT 0
|
||||
#define RTL8188EU_HWIMG_SUPPORT 0
|
||||
#define RTL8188ES_HWIMG_SUPPORT 0
|
||||
|
||||
#endif /* @__INC_HW_IMG_H */
|
||||
|
@ -31,45 +31,6 @@
|
||||
#define _FALSE FALSE
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
typedef signed char s8;
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef signed short s16;
|
||||
typedef unsigned short u16;
|
||||
|
||||
typedef signed long s32;
|
||||
typedef unsigned long u32;
|
||||
|
||||
typedef unsigned int uint;
|
||||
typedef signed int sint;
|
||||
|
||||
|
||||
typedef signed long long s64;
|
||||
typedef unsigned long long u64;
|
||||
|
||||
#ifdef NDIS50_MINIPORT
|
||||
|
||||
#define NDIS_MAJOR_VERSION 5
|
||||
#define NDIS_MINOR_VERSION 0
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef NDIS51_MINIPORT
|
||||
|
||||
#define NDIS_MAJOR_VERSION 5
|
||||
#define NDIS_MINOR_VERSION 1
|
||||
|
||||
#endif
|
||||
|
||||
typedef NDIS_PROC proc_t;
|
||||
|
||||
typedef LONG atomic_t;
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/version.h>
|
||||
#include <linux/types.h>
|
||||
@ -148,50 +109,6 @@ enum {
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
|
||||
typedef signed char s8;
|
||||
typedef unsigned char u8;
|
||||
|
||||
typedef signed short s16;
|
||||
typedef unsigned short u16;
|
||||
|
||||
typedef signed int s32;
|
||||
typedef unsigned int u32;
|
||||
|
||||
typedef unsigned int uint;
|
||||
typedef signed int sint;
|
||||
typedef long atomic_t;
|
||||
|
||||
typedef signed long long s64;
|
||||
typedef unsigned long long u64;
|
||||
#define IN
|
||||
#define OUT
|
||||
#define VOID void
|
||||
#define NDIS_OID uint
|
||||
#define NDIS_STATUS uint
|
||||
|
||||
#ifndef PVOID
|
||||
typedef void *PVOID;
|
||||
/* #define PVOID (void *) */
|
||||
#endif
|
||||
typedef u32 dma_addr_t;
|
||||
#define UCHAR u8
|
||||
#define USHORT u16
|
||||
#define UINT u32
|
||||
#define ULONG u32
|
||||
|
||||
typedef void (*proc_t)(void *);
|
||||
|
||||
typedef unsigned int __kernel_size_t;
|
||||
typedef int __kernel_ssize_t;
|
||||
|
||||
typedef __kernel_size_t SIZE_T;
|
||||
typedef __kernel_ssize_t SSIZE_T;
|
||||
#define FIELD_OFFSET(s, field) ((SSIZE_T)&((s *)(0))->field)
|
||||
|
||||
#endif
|
||||
|
||||
#define MEM_ALIGNMENT_OFFSET (sizeof (SIZE_T))
|
||||
#define MEM_ALIGNMENT_PADDING (sizeof(SIZE_T) - 1)
|
||||
|
||||
|
@ -92,50 +92,46 @@
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(PLATFORM_WINDOWS) || defined(PLATFORM_MPIXEL) || defined(PLATFORM_FREEBSD)
|
||||
/*
|
||||
* inside the kernel, we can use nicknames;
|
||||
* outside of it, we must avoid POSIX namespace pollution...
|
||||
*/
|
||||
#define cpu_to_le64 __cpu_to_le64
|
||||
#define le64_to_cpu __le64_to_cpu
|
||||
#define cpu_to_le32 __cpu_to_le32
|
||||
#define le32_to_cpu __le32_to_cpu
|
||||
#define cpu_to_le16 __cpu_to_le16
|
||||
#define le16_to_cpu __le16_to_cpu
|
||||
#define cpu_to_be64 __cpu_to_be64
|
||||
#define be64_to_cpu __be64_to_cpu
|
||||
#define cpu_to_be32 __cpu_to_be32
|
||||
#define be32_to_cpu __be32_to_cpu
|
||||
#define cpu_to_be16 __cpu_to_be16
|
||||
#define be16_to_cpu __be16_to_cpu
|
||||
#define cpu_to_le64p __cpu_to_le64p
|
||||
#define le64_to_cpup __le64_to_cpup
|
||||
#define cpu_to_le32p __cpu_to_le32p
|
||||
#define le32_to_cpup __le32_to_cpup
|
||||
#define cpu_to_le16p __cpu_to_le16p
|
||||
#define le16_to_cpup __le16_to_cpup
|
||||
#define cpu_to_be64p __cpu_to_be64p
|
||||
#define be64_to_cpup __be64_to_cpup
|
||||
#define cpu_to_be32p __cpu_to_be32p
|
||||
#define be32_to_cpup __be32_to_cpup
|
||||
#define cpu_to_be16p __cpu_to_be16p
|
||||
#define be16_to_cpup __be16_to_cpup
|
||||
#define cpu_to_le64s __cpu_to_le64s
|
||||
#define le64_to_cpus __le64_to_cpus
|
||||
#define cpu_to_le32s __cpu_to_le32s
|
||||
#define le32_to_cpus __le32_to_cpus
|
||||
#define cpu_to_le16s __cpu_to_le16s
|
||||
#define le16_to_cpus __le16_to_cpus
|
||||
#define cpu_to_be64s __cpu_to_be64s
|
||||
#define be64_to_cpus __be64_to_cpus
|
||||
#define cpu_to_be32s __cpu_to_be32s
|
||||
#define be32_to_cpus __be32_to_cpus
|
||||
#define cpu_to_be16s __cpu_to_be16s
|
||||
#define be16_to_cpus __be16_to_cpus
|
||||
#endif
|
||||
|
||||
/*
|
||||
* inside the kernel, we can use nicknames;
|
||||
* outside of it, we must avoid POSIX namespace pollution...
|
||||
*/
|
||||
#define cpu_to_le64 __cpu_to_le64
|
||||
#define le64_to_cpu __le64_to_cpu
|
||||
#define cpu_to_le32 __cpu_to_le32
|
||||
#define le32_to_cpu __le32_to_cpu
|
||||
#define cpu_to_le16 __cpu_to_le16
|
||||
#define le16_to_cpu __le16_to_cpu
|
||||
#define cpu_to_be64 __cpu_to_be64
|
||||
#define be64_to_cpu __be64_to_cpu
|
||||
#define cpu_to_be32 __cpu_to_be32
|
||||
#define be32_to_cpu __be32_to_cpu
|
||||
#define cpu_to_be16 __cpu_to_be16
|
||||
#define be16_to_cpu __be16_to_cpu
|
||||
#define cpu_to_le64p __cpu_to_le64p
|
||||
#define le64_to_cpup __le64_to_cpup
|
||||
#define cpu_to_le32p __cpu_to_le32p
|
||||
#define le32_to_cpup __le32_to_cpup
|
||||
#define cpu_to_le16p __cpu_to_le16p
|
||||
#define le16_to_cpup __le16_to_cpup
|
||||
#define cpu_to_be64p __cpu_to_be64p
|
||||
#define be64_to_cpup __be64_to_cpup
|
||||
#define cpu_to_be32p __cpu_to_be32p
|
||||
#define be32_to_cpup __be32_to_cpup
|
||||
#define cpu_to_be16p __cpu_to_be16p
|
||||
#define be16_to_cpup __be16_to_cpup
|
||||
#define cpu_to_le64s __cpu_to_le64s
|
||||
#define le64_to_cpus __le64_to_cpus
|
||||
#define cpu_to_le32s __cpu_to_le32s
|
||||
#define le32_to_cpus __le32_to_cpus
|
||||
#define cpu_to_le16s __cpu_to_le16s
|
||||
#define le16_to_cpus __le16_to_cpus
|
||||
#define cpu_to_be64s __cpu_to_be64s
|
||||
#define be64_to_cpus __be64_to_cpus
|
||||
#define cpu_to_be32s __cpu_to_be32s
|
||||
#define be32_to_cpus __be32_to_cpus
|
||||
#define cpu_to_be16s __cpu_to_be16s
|
||||
#define be16_to_cpus __be16_to_cpus
|
||||
|
||||
/*
|
||||
* Handle ntohl and suches. These have various compatibility
|
||||
@ -164,15 +160,11 @@
|
||||
extern __u32 ntohl(__u32);
|
||||
extern __u32 htonl(__u32);
|
||||
#else /* defined(PLATFORM_LINUX) || (defined (__GLIBC__) && __GLIBC__ >= 2) */
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern unsigned long int ntohl(unsigned long int);
|
||||
extern unsigned long int htonl(unsigned long int);
|
||||
#endif
|
||||
extern unsigned long int ntohl(unsigned long int);
|
||||
extern unsigned long int htonl(unsigned long int);
|
||||
#endif
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern unsigned short int ntohs(unsigned short int);
|
||||
extern unsigned short int htons(unsigned short int);
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ >= 2) && defined(__OPTIMIZE__) || defined(PLATFORM_MPIXEL)
|
||||
|
||||
@ -193,15 +185,4 @@
|
||||
|
||||
#endif /* OPTIMIZE */
|
||||
|
||||
|
||||
#if defined(PLATFORM_WINDOWS)
|
||||
|
||||
#define htonl(x) __cpu_to_be32(x)
|
||||
#define ntohl(x) __be32_to_cpu(x)
|
||||
#define htons(x) __cpu_to_be16(x)
|
||||
#define ntohs(x) __be16_to_cpu(x)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* _LINUX_BYTEORDER_GENERIC_H */
|
||||
|
@ -104,33 +104,23 @@ __inline static __u64 __arch__swab64(__u64 x)
|
||||
#define __swab64(x) __fswab64(x)
|
||||
#endif /* __swab16 */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
__inline static __u16 __fswab16(__u16 x)
|
||||
#else
|
||||
__inline static const __u16 __fswab16(__u16 x)
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
{
|
||||
return __arch__swab16(x);
|
||||
}
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
__inline static __u32 __fswab32(__u32 x)
|
||||
#else
|
||||
__inline static const __u32 __fswab32(__u32 x)
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
{
|
||||
return __arch__swab32(x);
|
||||
}
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(PLATFORM_WINDOWS)
|
||||
#define swab16 __swab16
|
||||
#define swab32 __swab32
|
||||
#define swab64 __swab64
|
||||
#define swab16p __swab16p
|
||||
#define swab32p __swab32p
|
||||
#define swab64p __swab64p
|
||||
#define swab16s __swab16s
|
||||
#define swab32s __swab32s
|
||||
#define swab64s __swab64s
|
||||
#endif
|
||||
#define swab16 __swab16
|
||||
#define swab32 __swab32
|
||||
#define swab64 __swab64
|
||||
#define swab16p __swab16p
|
||||
#define swab32p __swab32p
|
||||
#define swab64p __swab64p
|
||||
#define swab16s __swab16s
|
||||
#define swab32s __swab32s
|
||||
#define swab64s __swab64s
|
||||
|
||||
#endif /* _LINUX_BYTEORDER_SWAB_H */
|
||||
|
@ -18,14 +18,6 @@
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <drv_types_xp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <drv_types_ce.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <drv_types_linux.h>
|
||||
#endif
|
||||
|
@ -16,11 +16,7 @@
|
||||
#define __DRV_CONF_H__
|
||||
#include "autoconf.h"
|
||||
#include "hal_ic_cfg.h"
|
||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
|
||||
#endif
|
||||
#define CONFIG_RSSI_PRIORITY
|
||||
#ifdef CONFIG_RTW_REPEATER_SON
|
||||
#ifndef CONFIG_AP
|
||||
|
@ -34,14 +34,6 @@
|
||||
#include <net/arp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <drv_types_xp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <drv_types_ce.h>
|
||||
#endif
|
||||
|
||||
typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
|
||||
|
||||
#include <rtw_debug.h>
|
||||
@ -87,7 +79,6 @@ typedef struct _ADAPTER _adapter, ADAPTER, *PADAPTER;
|
||||
#include <rtw_io.h>
|
||||
#include <rtw_ioctl.h>
|
||||
#include <rtw_ioctl_set.h>
|
||||
#include <rtw_ioctl_query.h>
|
||||
#include <rtw_ioctl_rtl.h>
|
||||
#include <osdep_intf.h>
|
||||
#include <rtw_eeprom.h>
|
||||
@ -1146,40 +1137,12 @@ struct dvobj_priv {
|
||||
u8 *usb_vendor_req_buf;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
/* related device objects */
|
||||
PDEVICE_OBJECT pphysdevobj;/* pPhysDevObj; */
|
||||
PDEVICE_OBJECT pfuncdevobj;/* pFuncDevObj; */
|
||||
PDEVICE_OBJECT pnextdevobj;/* pNextDevObj; */
|
||||
|
||||
u8 nextdevstacksz;/* unsigned char NextDeviceStackSize; */ /* = (CHAR)CEdevice->pUsbDevObj->StackSize + 1; */
|
||||
|
||||
/* urb for control diescriptor request */
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
struct _URB_CONTROL_DESCRIPTOR_REQUEST descriptor_urb;
|
||||
PUSB_CONFIGURATION_DESCRIPTOR pconfig_descriptor;/* UsbConfigurationDescriptor; */
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
WCHAR active_path[MAX_ACTIVE_REG_PATH]; /* adapter regpath */
|
||||
USB_EXTENSION usb_extension;
|
||||
|
||||
_nic_hdl pipehdls_r8192c[0x10];
|
||||
#endif
|
||||
|
||||
u32 config_descriptor_len;/* ULONG UsbConfigurationDescriptorLength; */
|
||||
#endif/* PLATFORM_WINDOWS */
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct usb_interface *pusbintf;
|
||||
struct usb_device *pusbdev;
|
||||
#endif/* PLATFORM_LINUX */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
struct usb_interface *pusbintf;
|
||||
struct usb_device *pusbdev;
|
||||
#endif/* PLATFORM_FREEBSD */
|
||||
|
||||
#endif/* CONFIG_USB_HCI */
|
||||
|
||||
@ -1510,16 +1473,6 @@ struct _ADAPTER {
|
||||
void (*intf_start)(_adapter *adapter);
|
||||
void (*intf_stop)(_adapter *adapter);
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
_nic_hdl hndis_adapter;/* hNdisAdapter(NDISMiniportAdapterHandle); */
|
||||
_nic_hdl hndis_config;/* hNdisConfiguration; */
|
||||
NDIS_STRING fw_img;
|
||||
|
||||
u32 NdisPacketFilter;
|
||||
u8 MCList[MAX_MCAST_LIST_NUM][6];
|
||||
u32 MCAddrCount;
|
||||
#endif /* end of PLATFORM_WINDOWS */
|
||||
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
_nic_hdl pnetdev;
|
||||
@ -1556,11 +1509,6 @@ struct _ADAPTER {
|
||||
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
_nic_hdl pifp;
|
||||
int bup;
|
||||
_lock glock;
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
u8 mac_addr[ETH_ALEN];
|
||||
int net_closed;
|
||||
|
||||
|
@ -1,86 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __DRV_TYPES_CE_H__
|
||||
#define __DRV_TYPES_CE_H__
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
|
||||
#include <Sdcardddk.h>
|
||||
|
||||
#define MAX_ACTIVE_REG_PATH 256
|
||||
|
||||
#define MAX_MCAST_LIST_NUM 32
|
||||
|
||||
|
||||
|
||||
/* for ioctl */
|
||||
#define MAKE_DRIVER_VERSION(_MainVer, _MinorVer) ((((u32)(_MainVer))<<16)+_MinorVer)
|
||||
|
||||
#define NIC_HEADER_SIZE 14 /* !< can be moved to typedef.h */
|
||||
#define NIC_MAX_PACKET_SIZE 1514 /* !< can be moved to typedef.h */
|
||||
#define NIC_MAX_SEND_PACKETS 10 /* max number of send packets the MiniportSendPackets function can accept, can be moved to typedef.h */
|
||||
#define NIC_VENDOR_DRIVER_VERSION MAKE_DRIVER_VERSION(0, 001) /* !< can be moved to typedef.h */
|
||||
#define NIC_MAX_PACKET_SIZE 1514 /* !< can be moved to typedef.h */
|
||||
|
||||
typedef struct _MP_REG_ENTRY {
|
||||
|
||||
NDIS_STRING RegName; /* variable name text */
|
||||
BOOLEAN bRequired; /* 1->required, 0->optional */
|
||||
|
||||
u8 Type; /* NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString */
|
||||
uint FieldOffset; /* offset to MP_ADAPTER field */
|
||||
uint FieldSize; /* size (in bytes) of the field */
|
||||
|
||||
#ifdef UNDER_AMD64
|
||||
u64 Default;
|
||||
#else
|
||||
u32 Default; /* default value to use */
|
||||
#endif
|
||||
|
||||
u32 Min; /* minimum value allowed */
|
||||
u32 Max; /* maximum value allowed */
|
||||
} MP_REG_ENTRY, *PMP_REG_ENTRY;
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
typedef struct _USB_EXTENSION {
|
||||
LPCUSB_FUNCS _lpUsbFuncs;
|
||||
USB_HANDLE _hDevice;
|
||||
PVOID pAdapter;
|
||||
|
||||
#if 0
|
||||
USB_ENDPOINT_DESCRIPTOR _endpACLIn;
|
||||
USB_ENDPOINT_DESCRIPTOR _endpACLOutHigh;
|
||||
USB_ENDPOINT_DESCRIPTOR _endpACLOutNormal;
|
||||
|
||||
USB_PIPE pPipeIn;
|
||||
USB_PIPE pPipeOutNormal;
|
||||
USB_PIPE pPipeOutHigh;
|
||||
#endif
|
||||
|
||||
} USB_EXTENSION, *PUSB_EXTENSION;
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _OCTET_STRING {
|
||||
u8 *Octet;
|
||||
u16 Length;
|
||||
} OCTET_STRING, *POCTET_STRING;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -28,15 +28,6 @@
|
||||
#endif /* CONFIG_PLATFORM_SPRD */
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <wdm.h>
|
||||
#include <ntddsd.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <sdcardddk.h>
|
||||
#endif
|
||||
|
||||
#define RTW_SDIO_CLK_33M 33000000
|
||||
#define RTW_SDIO_CLK_40M 40000000
|
||||
#define RTW_SDIO_CLK_80M 80000000
|
||||
@ -57,22 +48,6 @@ typedef struct sdio_data {
|
||||
u8 sd3_bus_mode;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PDEVICE_OBJECT pphysdevobj;
|
||||
PDEVICE_OBJECT pfuncdevobj;
|
||||
PDEVICE_OBJECT pnextdevobj;
|
||||
SDBUS_INTERFACE_STANDARD sdbusinft;
|
||||
u8 nextdevstacksz;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
SD_DEVICE_HANDLE hDevice;
|
||||
SD_CARD_RCA sd_rca;
|
||||
SD_CARD_INTERFACE card_intf;
|
||||
BOOLEAN enableIsarWithStatus;
|
||||
WCHAR active_path[MAX_ACTIVE_REG_PATH];
|
||||
SD_HOST_BLOCK_CAPABILITY sd_host_blk_cap;
|
||||
#endif
|
||||
} SDIO_DATA, *PSDIO_DATA;
|
||||
|
||||
#define dvobj_to_sdio_func(d) ((d)->intf_data.func)
|
||||
|
@ -1,88 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __DRV_TYPES_XP_H__
|
||||
#define __DRV_TYPES_XP_H__
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
|
||||
|
||||
|
||||
#define MAX_MCAST_LIST_NUM 32
|
||||
|
||||
|
||||
|
||||
/* for ioctl */
|
||||
#define MAKE_DRIVER_VERSION(_MainVer, _MinorVer) ((((u32)(_MainVer))<<16)+_MinorVer)
|
||||
|
||||
#define NIC_HEADER_SIZE 14 /* !< can be moved to typedef.h */
|
||||
#define NIC_MAX_PACKET_SIZE 1514 /* !< can be moved to typedef.h */
|
||||
#define NIC_MAX_SEND_PACKETS 10 /* max number of send packets the MiniportSendPackets function can accept, can be moved to typedef.h */
|
||||
#define NIC_VENDOR_DRIVER_VERSION MAKE_DRIVER_VERSION(0, 001) /* !< can be moved to typedef.h */
|
||||
#define NIC_MAX_PACKET_SIZE 1514 /* !< can be moved to typedef.h */
|
||||
|
||||
|
||||
#undef ON_VISTA
|
||||
/* added by Jackson */
|
||||
#ifndef ON_VISTA
|
||||
/*
|
||||
* Bus driver versions
|
||||
* */
|
||||
|
||||
#define SDBUS_DRIVER_VERSION_1 0x100
|
||||
#define SDBUS_DRIVER_VERSION_2 0x200
|
||||
|
||||
#define SDP_FUNCTION_TYPE 4
|
||||
#define SDP_BUS_DRIVER_VERSION 5
|
||||
#define SDP_BUS_WIDTH 6
|
||||
#define SDP_BUS_CLOCK 7
|
||||
#define SDP_BUS_INTERFACE_CONTROL 8
|
||||
#define SDP_HOST_BLOCK_LENGTH 9
|
||||
#define SDP_FUNCTION_BLOCK_LENGTH 10
|
||||
#define SDP_FN0_BLOCK_LENGTH 11
|
||||
#define SDP_FUNCTION_INT_ENABLE 12
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct _MP_REG_ENTRY {
|
||||
|
||||
NDIS_STRING RegName; /* variable name text */
|
||||
BOOLEAN bRequired; /* 1->required, 0->optional */
|
||||
|
||||
u8 Type; /* NdisParameterInteger/NdisParameterHexInteger/NdisParameterStringle/NdisParameterMultiString */
|
||||
uint FieldOffset; /* offset to MP_ADAPTER field */
|
||||
uint FieldSize; /* size (in bytes) of the field */
|
||||
|
||||
#ifdef UNDER_AMD64
|
||||
u64 Default;
|
||||
#else
|
||||
u32 Default; /* default value to use */
|
||||
#endif
|
||||
|
||||
u32 Min; /* minimum value allowed */
|
||||
u32 Max; /* maximum value allowed */
|
||||
} MP_REG_ENTRY, *PMP_REG_ENTRY;
|
||||
|
||||
|
||||
typedef struct _OCTET_STRING {
|
||||
u8 *Octet;
|
||||
u16 Length;
|
||||
} OCTET_STRING, *POCTET_STRING;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
@ -1,25 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __SDIO_OSINTF_H__
|
||||
#define __SDIO_OSINTF_H__
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
extern NDIS_STATUS ce_sd_get_dev_hdl(PADAPTER padapter);
|
||||
SD_API_STATUS ce_sd_int_callback(SD_DEVICE_HANDLE hDevice, PADAPTER padapter);
|
||||
extern void sd_setup_irs(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
#endif
|
@ -15,16 +15,6 @@
|
||||
#ifndef __IEEE80211_H
|
||||
#define __IEEE80211_H
|
||||
|
||||
|
||||
#ifndef CONFIG_RTL8711FW
|
||||
|
||||
#if defined PLATFORM_OS_XP
|
||||
#include <ntstrsafe.h>
|
||||
#endif
|
||||
#else
|
||||
|
||||
#endif
|
||||
|
||||
#define MGMT_QUEUE_NUM 5
|
||||
|
||||
#define ETH_ALEN 6
|
||||
@ -423,7 +413,6 @@ struct ieee_ibss_seq {
|
||||
_list list;
|
||||
};
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) || defined(PLATFORM_FREEBSD)
|
||||
|
||||
struct rtw_ieee80211_hdr {
|
||||
u16 frame_ctl;
|
||||
@ -496,55 +485,6 @@ struct rtw_ieee80211s_hdr {
|
||||
u32 rann_interval;
|
||||
u32 rann_metric;
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
struct rtw_ieee80211_hdr {
|
||||
u16 frame_ctl;
|
||||
u16 duration_id;
|
||||
u8 addr1[ETH_ALEN];
|
||||
u8 addr2[ETH_ALEN];
|
||||
u8 addr3[ETH_ALEN];
|
||||
u16 seq_ctl;
|
||||
u8 addr4[ETH_ALEN];
|
||||
};
|
||||
|
||||
struct rtw_ieee80211_hdr_3addr {
|
||||
u16 frame_ctl;
|
||||
u16 duration_id;
|
||||
u8 addr1[ETH_ALEN];
|
||||
u8 addr2[ETH_ALEN];
|
||||
u8 addr3[ETH_ALEN];
|
||||
u16 seq_ctl;
|
||||
};
|
||||
|
||||
|
||||
struct rtw_ieee80211_hdr_qos {
|
||||
struct rtw_ieee80211_hdr wlan_hdr;
|
||||
u16 qc;
|
||||
};
|
||||
|
||||
struct rtw_ieee80211_hdr_3addr_qos {
|
||||
struct rtw_ieee80211_hdr_3addr wlan_hdr;
|
||||
u16 qc;
|
||||
};
|
||||
|
||||
struct eapol {
|
||||
u8 snap[6];
|
||||
u16 ethertype;
|
||||
u8 version;
|
||||
u8 type;
|
||||
u16 length;
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
enum eap_type {
|
||||
EAP_PACKET = 0,
|
||||
@ -654,7 +594,6 @@ enum eap_type {
|
||||
|
||||
#define P80211_OUI_LEN 3
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8711FW) || defined(PLATFORM_FREEBSD)
|
||||
|
||||
struct ieee80211_snap_hdr {
|
||||
|
||||
@ -665,24 +604,6 @@ struct ieee80211_snap_hdr {
|
||||
|
||||
} __attribute__((packed));
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
struct ieee80211_snap_hdr {
|
||||
|
||||
u8 dsap; /* always 0xAA */
|
||||
u8 ssap; /* always 0xAA */
|
||||
u8 ctrl; /* always 0x03 */
|
||||
u8 oui[P80211_OUI_LEN]; /* organizational universal id */
|
||||
|
||||
};
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
|
||||
|
||||
#define WLAN_FC_GET_TYPE(fc) ((fc) & RTW_IEEE80211_FCTL_FTYPE)
|
||||
@ -1065,7 +986,6 @@ struct ieee80211_frag_entry {
|
||||
u8 dst_addr[ETH_ALEN];
|
||||
};
|
||||
|
||||
#ifndef PLATFORM_FREEBSD /* Baron BSD has already defined */
|
||||
struct ieee80211_stats {
|
||||
uint tx_unicast_frames;
|
||||
uint tx_multicast_frames;
|
||||
@ -1089,7 +1009,7 @@ struct ieee80211_stats {
|
||||
uint rx_message_in_msg_fragments;
|
||||
uint rx_message_in_bad_msg_fragments;
|
||||
};
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
struct ieee80211_softmac_stats {
|
||||
uint rx_ass_ok;
|
||||
uint rx_ass_err;
|
||||
@ -1147,24 +1067,6 @@ struct ieee80211_security {
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
struct ieee80211_security {
|
||||
u16 active_key:2,
|
||||
enabled:1,
|
||||
auth_mode:2,
|
||||
auth_algo:4,
|
||||
unicast_uses_group:1;
|
||||
u8 key_sizes[WEP_KEYS];
|
||||
u8 keys[WEP_KEYS][WEP_KEY_LEN];
|
||||
u8 level;
|
||||
u16 flags;
|
||||
} ;
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
802.11 data frame from AP
|
||||
@ -1219,24 +1121,6 @@ struct ieee80211_info_element {
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
struct ieee80211_info_element_hdr {
|
||||
u8 id;
|
||||
u8 len;
|
||||
} ;
|
||||
|
||||
struct ieee80211_info_element {
|
||||
u8 id;
|
||||
u8 len;
|
||||
u8 data[0];
|
||||
} ;
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* These are the data types that can make up management packets
|
||||
*
|
||||
@ -1300,57 +1184,6 @@ struct ieee80211_assoc_response_frame {
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct ieee80211_authentication {
|
||||
struct ieee80211_header_data header;
|
||||
u16 algorithm;
|
||||
u16 transaction;
|
||||
u16 status;
|
||||
/* struct ieee80211_info_element_hdr info_element; */
|
||||
} ;
|
||||
|
||||
|
||||
struct ieee80211_probe_response {
|
||||
struct ieee80211_header_data header;
|
||||
u32 time_stamp[2];
|
||||
u16 beacon_interval;
|
||||
u16 capability;
|
||||
struct ieee80211_info_element info_element;
|
||||
} ;
|
||||
|
||||
struct ieee80211_probe_request {
|
||||
struct ieee80211_header_data header;
|
||||
/*struct ieee80211_info_element info_element;*/
|
||||
} ;
|
||||
|
||||
struct ieee80211_assoc_request_frame {
|
||||
struct rtw_ieee80211_hdr_3addr header;
|
||||
u16 capability;
|
||||
u16 listen_interval;
|
||||
/* u8 current_ap[ETH_ALEN]; */
|
||||
struct ieee80211_info_element_hdr info_element;
|
||||
} ;
|
||||
|
||||
struct ieee80211_assoc_response_frame {
|
||||
struct rtw_ieee80211_hdr_3addr header;
|
||||
u16 capability;
|
||||
u16 status;
|
||||
u16 aid;
|
||||
/* struct ieee80211_info_element info_element; supported rates */
|
||||
};
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
struct ieee80211_txb {
|
||||
u8 nr_frags;
|
||||
u8 encrypted;
|
||||
@ -1445,8 +1278,6 @@ join_res:
|
||||
> 0: TID
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_FREEBSD /* Baron BSD has already defined */
|
||||
|
||||
enum ieee80211_state {
|
||||
|
||||
/* the card is not linked at all */
|
||||
@ -1485,7 +1316,6 @@ enum ieee80211_state {
|
||||
IEEE80211_LINKED_SCANNING,
|
||||
|
||||
};
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
|
||||
#define DEFAULT_FTS 2346
|
||||
@ -1498,12 +1328,6 @@ enum ieee80211_state {
|
||||
#define PORT_FMT "%u"
|
||||
#define PORT_ARG(x) ntohs(*((u16 *)(x)))
|
||||
|
||||
#ifdef PLATFORM_FREEBSD /* Baron change func to macro */
|
||||
#define is_multicast_mac_addr(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff))
|
||||
#define is_broadcast_mac_addr(Addr) ((((Addr[0]) & 0xff) == 0xff) && (((Addr[1]) & 0xff) == 0xff) && \
|
||||
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
|
||||
(((Addr[5]) & 0xff) == 0xff))
|
||||
#else
|
||||
extern __inline int is_multicast_mac_addr(const u8 *addr)
|
||||
{
|
||||
return (addr[0] != 0xff) && (0x01 & addr[0]);
|
||||
@ -1520,7 +1344,6 @@ extern __inline int is_zero_mac_addr(const u8 *addr)
|
||||
return ((addr[0] == 0x00) && (addr[1] == 0x00) && (addr[2] == 0x00) && \
|
||||
(addr[3] == 0x00) && (addr[4] == 0x00) && (addr[5] == 0x00));
|
||||
}
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
|
||||
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
|
||||
@ -1729,9 +1552,8 @@ enum rtw_ieee80211_wnm_actioncode {
|
||||
|
||||
#define OUI_MICROSOFT 0x0050f2 /* Microsoft (also used in Wi-Fi specs)
|
||||
* 00:50:F2 */
|
||||
#ifndef PLATFORM_FREEBSD /* Baron BSD has defined */
|
||||
#define WME_OUI_TYPE 2
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
#define WME_OUI_TYPE 2
|
||||
|
||||
#define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0
|
||||
#define WME_OUI_SUBTYPE_PARAMETER_ELEMENT 1
|
||||
#define WME_OUI_SUBTYPE_TSPEC_ELEMENT 2
|
||||
|
@ -57,26 +57,6 @@ struct intf_priv {
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
/* below is for io_rwmem... */
|
||||
PMDL pmdl;
|
||||
PSDBUS_REQUEST_PACKET sdrp;
|
||||
PSDBUS_REQUEST_PACKET recv_sdrp;
|
||||
PSDBUS_REQUEST_PACKET xmit_sdrp;
|
||||
|
||||
PIRP piorw_irp;
|
||||
|
||||
#endif
|
||||
#ifdef CONFIG_USB_HCI
|
||||
PURB piorw_urb;
|
||||
PIRP piorw_irp;
|
||||
u8 io_irp_cnt;
|
||||
u8 bio_irp_pending;
|
||||
_sema io_retevt;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
|
||||
@ -136,11 +116,6 @@ void rtw_set_rtnl_lock_holder(struct dvobj_priv *dvobj, _thread_hdl_ thd_hdl);
|
||||
|
||||
#endif /* PLATFORM_LINUX */
|
||||
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
extern int rtw_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data);
|
||||
#endif
|
||||
|
||||
void rtw_ips_dev_unload(_adapter *padapter);
|
||||
|
||||
#ifdef CONFIG_IPS
|
||||
|
@ -36,11 +36,6 @@
|
||||
#undef _FALSE
|
||||
#define _FALSE 0
|
||||
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
#include <osdep_service_bsd.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
#include <linux/version.h>
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 11, 0))
|
||||
@ -50,14 +45,6 @@
|
||||
#include <osdep_service_linux.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <osdep_service_xp.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <osdep_service_ce.h>
|
||||
#endif
|
||||
|
||||
/* #include <rtw_byteorder.h> */
|
||||
|
||||
#ifndef BIT
|
||||
@ -264,9 +251,7 @@ void rtw_list_splice(_list *list, _list *head);
|
||||
void rtw_list_splice_init(_list *list, _list *head);
|
||||
void rtw_list_splice_tail(_list *list, _list *head);
|
||||
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern void rtw_list_delete(_list *plist);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
void rtw_hlist_head_init(rtw_hlist_head *h);
|
||||
void rtw_hlist_add_head(rtw_hlist_node *n, rtw_hlist_head *h);
|
||||
@ -280,9 +265,7 @@ extern void _rtw_up_sema(_sema *sema);
|
||||
extern u32 _rtw_down_sema(_sema *sema);
|
||||
extern void _rtw_mutex_init(_mutex *pmutex);
|
||||
extern void _rtw_mutex_free(_mutex *pmutex);
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern void _rtw_spinlock_init(_lock *plock);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
extern void _rtw_spinlock(_lock *plock);
|
||||
extern void _rtw_spinunlock(_lock *plock);
|
||||
extern void _rtw_spinlock_ex(_lock *plock);
|
||||
@ -345,9 +328,6 @@ static __inline void thread_enter(char *name)
|
||||
#ifdef PLATFORM_LINUX
|
||||
allow_signal(SIGTERM);
|
||||
#endif
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
printf("%s", "RTKTHREAD_enter");
|
||||
#endif
|
||||
}
|
||||
void thread_exit(_completion *comp);
|
||||
void _rtw_init_completion(_completion *comp);
|
||||
@ -387,19 +367,7 @@ __inline static void flush_signals_thread(void)
|
||||
|
||||
__inline static _OS_STATUS res_to_status(sint res)
|
||||
{
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined (PLATFORM_MPIXEL) || defined (PLATFORM_FREEBSD)
|
||||
return res;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
if (res == _SUCCESS)
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
else
|
||||
return NDIS_STATUS_FAILURE;
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
@ -420,16 +388,6 @@ __inline static int rtw_bug_check(void *parg1, void *parg2, void *parg3, void *p
|
||||
{
|
||||
int ret = _TRUE;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
if (((uint)parg1) <= 0x7fffffff ||
|
||||
((uint)parg2) <= 0x7fffffff ||
|
||||
((uint)parg3) <= 0x7fffffff ||
|
||||
((uint)parg4) <= 0x7fffffff) {
|
||||
ret = _FALSE;
|
||||
KeBugCheckEx(0x87110000, (ULONG_PTR)parg1, (ULONG_PTR)parg2, (ULONG_PTR)parg3, (ULONG_PTR)parg4);
|
||||
}
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
||||
}
|
||||
@ -556,12 +514,7 @@ extern int rtw_is_file_readable_with_size(const char *path, u32 *sz);
|
||||
extern int rtw_retrieve_from_file(const char *path, u8 *buf, u32 sz);
|
||||
extern int rtw_store_to_file(const char *path, u8 *buf, u32 sz);
|
||||
|
||||
|
||||
#ifndef PLATFORM_FREEBSD
|
||||
extern void rtw_free_netdev(struct net_device *netdev);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
|
||||
extern u64 rtw_division64(u64 x, u64 y);
|
||||
extern u32 rtw_random32(void);
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,200 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef __OSDEP_CE_SERVICE_H_
|
||||
#define __OSDEP_CE_SERVICE_H_
|
||||
|
||||
|
||||
#include <ndis.h>
|
||||
#include <ntddndis.h>
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#include "SDCardDDK.h"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usbdi.h>
|
||||
#endif
|
||||
|
||||
typedef HANDLE _sema;
|
||||
typedef LIST_ENTRY _list;
|
||||
typedef NDIS_STATUS _OS_STATUS;
|
||||
|
||||
typedef NDIS_SPIN_LOCK _lock;
|
||||
|
||||
typedef HANDLE _rwlock; //Mutex
|
||||
|
||||
typedef u32 _irqL;
|
||||
|
||||
typedef NDIS_HANDLE _nic_hdl;
|
||||
|
||||
struct rtw_timer_list {
|
||||
NDIS_MINIPORT_TIMER ndis_timer;
|
||||
void (*function)(void *);
|
||||
void *arg;
|
||||
};
|
||||
|
||||
struct __queue {
|
||||
LIST_ENTRY queue;
|
||||
_lock lock;
|
||||
};
|
||||
|
||||
typedef NDIS_PACKET _pkt;
|
||||
typedef NDIS_BUFFER _buffer;
|
||||
typedef struct __queue _queue;
|
||||
|
||||
typedef HANDLE _thread_hdl_;
|
||||
typedef DWORD thread_return;
|
||||
typedef void* thread_context;
|
||||
typedef NDIS_WORK_ITEM _workitem;
|
||||
|
||||
|
||||
|
||||
#define SEMA_UPBND (0x7FFFFFFF) //8192
|
||||
|
||||
__inline static _list *get_prev(_list *list)
|
||||
{
|
||||
return list->Blink;
|
||||
}
|
||||
|
||||
__inline static _list *get_next(_list *list)
|
||||
{
|
||||
return list->Flink;
|
||||
}
|
||||
|
||||
__inline static _list *get_list_head(_queue *queue)
|
||||
{
|
||||
return (&(queue->queue));
|
||||
}
|
||||
|
||||
#define LIST_CONTAINOR(ptr, type, member) CONTAINING_RECORD(ptr, type, member)
|
||||
|
||||
__inline static void _enter_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static void _exit_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
|
||||
__inline static void _enter_hwio_critical(_rwlock *prwlock, _irqL *pirqL)
|
||||
{
|
||||
WaitForSingleObject(*prwlock, INFINITE );
|
||||
|
||||
}
|
||||
|
||||
__inline static void _exit_hwio_critical(_rwlock *prwlock, _irqL *pirqL)
|
||||
{
|
||||
ReleaseMutex(*prwlock);
|
||||
}
|
||||
|
||||
__inline static void rtw_list_delete(_list *plist)
|
||||
{
|
||||
RemoveEntryList(plist);
|
||||
InitializeListHead(plist);
|
||||
}
|
||||
|
||||
static inline void timer_hdl(
|
||||
IN PVOID SystemSpecific1,
|
||||
IN PVOID FunctionContext,
|
||||
IN PVOID SystemSpecific2,
|
||||
IN PVOID SystemSpecific3)
|
||||
{
|
||||
_timer *timer = (_timer *)FunctionContext;
|
||||
|
||||
timer->function(timer->arg);
|
||||
}
|
||||
|
||||
static inline void _init_timer(_timer *ptimer, _nic_hdl nic_hdl, void *pfunc, void *cntx)
|
||||
{
|
||||
ptimer->function = pfunc;
|
||||
ptimer->arg = cntx;
|
||||
NdisMInitializeTimer(&ptimer->ndis_timer, nic_hdl, timer_hdl, ptimer);
|
||||
}
|
||||
|
||||
static inline void _set_timer(_timer *ptimer, u32 delay_time)
|
||||
{
|
||||
NdisMSetTimer(ptimer, delay_time);
|
||||
}
|
||||
|
||||
static inline void _cancel_timer(_timer *ptimer, u8 *bcancelled)
|
||||
{
|
||||
NdisMCancelTimer(ptimer, bcancelled);
|
||||
}
|
||||
|
||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
||||
{
|
||||
|
||||
NdisInitializeWorkItem(pwork, pfunc, cntx);
|
||||
}
|
||||
|
||||
__inline static void _set_workitem(_workitem *pwork)
|
||||
{
|
||||
NdisScheduleWorkItem(pwork);
|
||||
}
|
||||
|
||||
#define ATOMIC_INIT(i) { (i) }
|
||||
|
||||
//
|
||||
// Global Mutex: can only be used at PASSIVE level.
|
||||
//
|
||||
|
||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
while (NdisInterlockedIncrement((PULONG)&(_MutexCounter)) != 1)\
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
NdisMSleep(10000); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
}
|
||||
|
||||
// limitation of path length
|
||||
#define PATH_LENGTH_MAX MAX_PATH
|
||||
|
||||
//Atomic integer operations
|
||||
#define atomic_t LONG
|
||||
|
||||
#define NDEV_FMT "%s"
|
||||
#define NDEV_ARG(ndev) ""
|
||||
#define ADPT_FMT "%s"
|
||||
#define ADPT_ARG(adapter) ""
|
||||
#define FUNC_NDEV_FMT "%s"
|
||||
#define FUNC_NDEV_ARG(ndev) __func__
|
||||
#define FUNC_ADPT_FMT "%s"
|
||||
#define FUNC_ADPT_ARG(adapter) __func__
|
||||
|
||||
#define STRUCT_PACKED
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -1,210 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __OSDEP_LINUX_SERVICE_H_
|
||||
#define __OSDEP_LINUX_SERVICE_H_
|
||||
|
||||
#include <ndis.h>
|
||||
#include <ntddk.h>
|
||||
#include <ntddndis.h>
|
||||
#include <ntdef.h>
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb.h>
|
||||
#include <usbioctl.h>
|
||||
#include <usbdlib.h>
|
||||
#endif
|
||||
|
||||
typedef KSEMAPHORE _sema;
|
||||
typedef LIST_ENTRY _list;
|
||||
typedef NDIS_STATUS _OS_STATUS;
|
||||
|
||||
|
||||
typedef NDIS_SPIN_LOCK _lock;
|
||||
|
||||
typedef KMUTEX _mutex;
|
||||
|
||||
typedef KIRQL _irqL;
|
||||
|
||||
// USB_PIPE for WINCE , but handle can be use just integer under windows
|
||||
typedef NDIS_HANDLE _nic_hdl;
|
||||
|
||||
struct rtw_timer_list {
|
||||
NDIS_MINIPORT_TIMER ndis_timer;
|
||||
void (*function)(void *);
|
||||
void *arg;
|
||||
};
|
||||
|
||||
struct __queue {
|
||||
LIST_ENTRY queue;
|
||||
_lock lock;
|
||||
};
|
||||
|
||||
typedef NDIS_PACKET _pkt;
|
||||
typedef NDIS_BUFFER _buffer;
|
||||
typedef struct __queue _queue;
|
||||
|
||||
typedef PKTHREAD _thread_hdl_;
|
||||
typedef void thread_return;
|
||||
typedef void* thread_context;
|
||||
|
||||
typedef NDIS_WORK_ITEM _workitem;
|
||||
|
||||
|
||||
#define HZ 10000000
|
||||
#define SEMA_UPBND (0x7FFFFFFF) //8192
|
||||
|
||||
__inline static _list *get_next(_list *list)
|
||||
{
|
||||
return list->Flink;
|
||||
}
|
||||
|
||||
__inline static _list *get_list_head(_queue *queue)
|
||||
{
|
||||
return (&(queue->queue));
|
||||
}
|
||||
|
||||
|
||||
#define LIST_CONTAINOR(ptr, type, member) CONTAINING_RECORD(ptr, type, member)
|
||||
|
||||
|
||||
__inline static _enter_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _exit_critical(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
|
||||
__inline static _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static void _enter_critical_bh(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprAcquireSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static void _exit_critical_bh(_lock *plock, _irqL *pirqL)
|
||||
{
|
||||
NdisDprReleaseSpinLock(plock);
|
||||
}
|
||||
|
||||
__inline static _enter_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||
{
|
||||
KeWaitForSingleObject(pmutex, Executive, KernelMode, FALSE, NULL);
|
||||
}
|
||||
|
||||
|
||||
__inline static _exit_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||
{
|
||||
KeReleaseMutex(pmutex, FALSE);
|
||||
}
|
||||
|
||||
|
||||
__inline static void rtw_list_delete(_list *plist)
|
||||
{
|
||||
RemoveEntryList(plist);
|
||||
InitializeListHead(plist);
|
||||
}
|
||||
|
||||
static inline void timer_hdl(
|
||||
IN PVOID SystemSpecific1,
|
||||
IN PVOID FunctionContext,
|
||||
IN PVOID SystemSpecific2,
|
||||
IN PVOID SystemSpecific3)
|
||||
{
|
||||
_timer *timer = (_timer *)FunctionContext;
|
||||
|
||||
timer->function(timer->arg);
|
||||
}
|
||||
|
||||
static inline void _init_timer(_timer *ptimer, _nic_hdl nic_hdl, void *pfunc, void *cntx)
|
||||
{
|
||||
ptimer->function = pfunc;
|
||||
ptimer->arg = cntx;
|
||||
NdisMInitializeTimer(&ptimer->ndis_timer, nic_hdl, timer_hdl, ptimer);
|
||||
}
|
||||
|
||||
static inline void _set_timer(_timer *ptimer, u32 delay_time)
|
||||
{
|
||||
NdisMSetTimer(ptimer, delay_time);
|
||||
}
|
||||
|
||||
static inline void _cancel_timer(_timer *ptimer, u8 *bcancelled)
|
||||
{
|
||||
NdisMCancelTimer(ptimer, bcancelled);
|
||||
}
|
||||
|
||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, PVOID cntx)
|
||||
{
|
||||
|
||||
NdisInitializeWorkItem(pwork, pfunc, cntx);
|
||||
}
|
||||
|
||||
__inline static void _set_workitem(_workitem *pwork)
|
||||
{
|
||||
NdisScheduleWorkItem(pwork);
|
||||
}
|
||||
|
||||
|
||||
#define ATOMIC_INIT(i) { (i) }
|
||||
|
||||
//
|
||||
// Global Mutex: can only be used at PASSIVE level.
|
||||
//
|
||||
|
||||
#define ACQUIRE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
while (NdisInterlockedIncrement((PULONG)&(_MutexCounter)) != 1)\
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
NdisMSleep(10000); \
|
||||
} \
|
||||
}
|
||||
|
||||
#define RELEASE_GLOBAL_MUTEX(_MutexCounter) \
|
||||
{ \
|
||||
NdisInterlockedDecrement((PULONG)&(_MutexCounter)); \
|
||||
}
|
||||
|
||||
// limitation of path length
|
||||
#define PATH_LENGTH_MAX MAX_PATH
|
||||
|
||||
//Atomic integer operations
|
||||
#define atomic_t LONG
|
||||
|
||||
|
||||
#define NDEV_FMT "%s"
|
||||
#define NDEV_ARG(ndev) ""
|
||||
#define ADPT_FMT "%s"
|
||||
#define ADPT_ARG(adapter) ""
|
||||
#define FUNC_NDEV_FMT "%s"
|
||||
#define FUNC_NDEV_ARG(ndev) __func__
|
||||
#define FUNC_ADPT_FMT "%s"
|
||||
#define FUNC_ADPT_ARG(adapter) __func__
|
||||
|
||||
#define STRUCT_PACKED
|
||||
|
||||
#endif
|
||||
|
@ -22,18 +22,14 @@
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
@ -17,24 +17,20 @@
|
||||
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#else
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
#elif defined(CONFIG_PCI_HCI)
|
||||
|
@ -18,28 +18,24 @@
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#else
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
#define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
#define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifdef CONFIG_PLATFORM_NOVATEK_NT72668
|
||||
#undef MAX_RECVBUF_SZ
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifdef CONFIG_PLATFORM_NOVATEK_NT72668
|
||||
#undef MAX_RECVBUF_SZ
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
@ -22,22 +22,18 @@
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
@ -22,22 +22,18 @@
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
@ -21,23 +21,19 @@
|
||||
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#else
|
||||
#ifdef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
#define MAX_RECVBUF_SZ (16384) /* 16k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
|
||||
#endif
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16k - 92E RX BUF :16K */
|
||||
#endif
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
@ -22,22 +22,18 @@
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
@ -22,22 +22,18 @@
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
/* #define MAX_RECVBUF_SZ (32768) */ /* 32k */
|
||||
/* #define MAX_RECVBUF_SZ (16384) */ /* 16K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
@ -18,27 +18,23 @@
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
#define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768) /*32k*/
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (24576) */ /* 24k */
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifdef CONFIG_PLATFORM_NOVATEK_NT72668
|
||||
#undef MAX_RECVBUF_SZ
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PREALLOC_RX_SKB_BUFFER
|
||||
#define MAX_RECVBUF_SZ (rtw_rtkm_get_buff_size()) /*depend rtkm*/
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (32768) /*32k*/
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (24576) */ /* 24k */
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifdef CONFIG_PLATFORM_NOVATEK_NT72668
|
||||
#undef MAX_RECVBUF_SZ
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k < 16k */
|
||||
#endif /* CONFIG_PLATFORM_NOVATEK_NT72668 */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
@ -18,23 +18,19 @@
|
||||
#if defined(CONFIG_USB_HCI)
|
||||
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024) /* 8K+1k */
|
||||
#else
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (24576) */ /* 24k */
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PLATFORM_MSTAR
|
||||
#define MAX_RECVBUF_SZ (8192) /* 8K */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#define MAX_RECVBUF_SZ (32768) /* 32k */
|
||||
#endif
|
||||
/* #define MAX_RECVBUF_SZ (24576) */ /* 24k */
|
||||
/* #define MAX_RECVBUF_SZ (20480) */ /* 20K */
|
||||
/* #define MAX_RECVBUF_SZ (10240) */ /* 10K */
|
||||
/* #define MAX_RECVBUF_SZ (15360) */ /* 15k < 16k */
|
||||
/* #define MAX_RECVBUF_SZ (8192+1024) */ /* 8K+1k */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000) /* about 4K */
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
|
@ -34,22 +34,18 @@
|
||||
|
||||
/* recv_buffer must be large than usb agg size */
|
||||
#ifndef MAX_RECVBUF_SZ
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define MAX_RECVBUF_SZ (8192+1024)
|
||||
#else /* !PLATFORM_OS_CE */
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PLATFORM_NOVATEK_NT72668
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k */
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
/* use 16k to workaround for HISILICON platform */
|
||||
#define MAX_RECVBUF_SZ (16384)
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (32768)
|
||||
#endif
|
||||
#ifndef CONFIG_MINIMAL_MEMORY_USAGE
|
||||
#ifdef CONFIG_PLATFORM_NOVATEK_NT72668
|
||||
#define MAX_RECVBUF_SZ (15360) /* 15k */
|
||||
#elif defined(CONFIG_PLATFORM_HISILICON)
|
||||
/* use 16k to workaround for HISILICON platform */
|
||||
#define MAX_RECVBUF_SZ (16384)
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000)
|
||||
#define MAX_RECVBUF_SZ (32768)
|
||||
#endif
|
||||
#endif /* PLATFORM_OS_CE */
|
||||
#else
|
||||
#define MAX_RECVBUF_SZ (4000)
|
||||
#endif
|
||||
#endif /* !MAX_RECVBUF_SZ */
|
||||
|
||||
/* rtl8822bu_ops.c */
|
||||
|
@ -26,11 +26,7 @@
|
||||
#define MAX_RSPSZ 512
|
||||
#define MAX_EVTSZ 1024
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#define CMDBUFF_ALIGN_SZ 4
|
||||
#else
|
||||
#define CMDBUFF_ALIGN_SZ 512
|
||||
#endif
|
||||
#define CMDBUFF_ALIGN_SZ 512
|
||||
|
||||
struct cmd_obj {
|
||||
_adapter *padapter;
|
||||
@ -114,9 +110,6 @@ struct evt_priv {
|
||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
||||
u8 *c2h_mem;
|
||||
u8 *allocated_c2h_mem;
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PMDL pc2h_mdl;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
};
|
||||
|
@ -28,37 +28,18 @@ enum {
|
||||
|
||||
#define DRIVER_PREFIX "RTW: "
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
extern void rtl871x_cedbg(const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#define RTW_PRINT do {} while (0)
|
||||
#define RTW_ERR do {} while (0)
|
||||
#define RTW_WARN do {} while (0)
|
||||
#define RTW_INFO do {} while (0)
|
||||
#define RTW_DBG do {} while (0)
|
||||
#define RTW_PRINT_SEL do {} while (0)
|
||||
#define _RTW_PRINT do {} while (0)
|
||||
#define _RTW_ERR do {} while (0)
|
||||
#define _RTW_WARN do {} while (0)
|
||||
#define _RTW_INFO do {} while (0)
|
||||
#define _RTW_DBG do {} while (0)
|
||||
#define _RTW_PRINT_SEL do {} while (0)
|
||||
#else
|
||||
#define RTW_PRINT(x, ...) do {} while (0)
|
||||
#define RTW_ERR(x, ...) do {} while (0)
|
||||
#define RTW_WARN(x,...) do {} while (0)
|
||||
#define RTW_INFO(x,...) do {} while (0)
|
||||
#define RTW_DBG(x,...) do {} while (0)
|
||||
#define RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
#define _RTW_PRINT(x, ...) do {} while (0)
|
||||
#define _RTW_ERR(x, ...) do {} while (0)
|
||||
#define _RTW_WARN(x,...) do {} while (0)
|
||||
#define _RTW_INFO(x,...) do {} while (0)
|
||||
#define _RTW_DBG(x,...) do {} while (0)
|
||||
#define _RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
#endif
|
||||
#define RTW_PRINT(x, ...) do {} while (0)
|
||||
#define RTW_ERR(x, ...) do {} while (0)
|
||||
#define RTW_WARN(x,...) do {} while (0)
|
||||
#define RTW_INFO(x,...) do {} while (0)
|
||||
#define RTW_DBG(x,...) do {} while (0)
|
||||
#define RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
#define _RTW_PRINT(x, ...) do {} while (0)
|
||||
#define _RTW_ERR(x, ...) do {} while (0)
|
||||
#define _RTW_WARN(x,...) do {} while (0)
|
||||
#define _RTW_INFO(x,...) do {} while (0)
|
||||
#define _RTW_DBG(x,...) do {} while (0)
|
||||
#define _RTW_PRINT_SEL(x,...) do {} while (0)
|
||||
|
||||
#define RTW_INFO_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
|
||||
#define RTW_DBG_DUMP(_TitleString, _HexData, _HexDataLen) do {} while (0)
|
||||
@ -73,26 +54,12 @@ extern void rtl871x_cedbg(const char *fmt, ...);
|
||||
#undef _dbgdump
|
||||
#undef _seqdump
|
||||
|
||||
#if defined(PLATFORM_WINDOWS) && defined(PLATFORM_OS_XP)
|
||||
#define _dbgdump DbgPrint
|
||||
#define KERN_CONT
|
||||
#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
|
||||
#elif defined(PLATFORM_WINDOWS) && defined(PLATFORM_OS_CE)
|
||||
#define _dbgdump rtl871x_cedbg
|
||||
#define KERN_CONT
|
||||
#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
|
||||
#elif defined PLATFORM_LINUX
|
||||
#if defined PLATFORM_LINUX
|
||||
#define _dbgdump printk
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
|
||||
#define KERN_CONT
|
||||
#endif
|
||||
#define _seqdump seq_printf
|
||||
#elif defined PLATFORM_FREEBSD
|
||||
#define _dbgdump printf
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24))
|
||||
#define KERN_CONT
|
||||
#endif
|
||||
#define _seqdump(sel, fmt, arg...) _dbgdump(fmt, ##arg)
|
||||
#endif
|
||||
|
||||
void RTW_BUF_DUMP_SEL(uint _loglevel, void *sel, u8 *_titlestring,
|
||||
|
@ -18,9 +18,6 @@
|
||||
|
||||
#define NUM_IOREQ 8
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#define MAX_PROT_SZ 64
|
||||
#endif
|
||||
#ifdef PLATFORM_LINUX
|
||||
#define MAX_PROT_SZ (64-16)
|
||||
#endif
|
||||
@ -137,27 +134,9 @@ struct io_req {
|
||||
u8 *pbuf;
|
||||
_sema sema;
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#ifdef CONFIG_USB_HCI
|
||||
/* URB handler for rtw_write_mem */
|
||||
USB_TRANSFER usb_transfer_write_mem;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void (*_async_io_callback)(_adapter *padater, struct io_req *pio_req, u8 *cnxt);
|
||||
u8 *cnxt;
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PMDL pmdl;
|
||||
PIRP pirp;
|
||||
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
PSDBUS_REQUEST_PACKET sdrp;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
};
|
||||
|
||||
struct intf_hdl {
|
||||
|
@ -15,69 +15,6 @@
|
||||
#ifndef _RTW_IOCTL_H_
|
||||
#define _RTW_IOCTL_H_
|
||||
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
/* 00 - Success
|
||||
* 11 - Error */
|
||||
#define STATUS_SUCCESS (0x00000000L)
|
||||
#define STATUS_PENDING (0x00000103L)
|
||||
|
||||
#define STATUS_UNSUCCESSFUL (0xC0000001L)
|
||||
#define STATUS_INSUFFICIENT_RESOURCES (0xC000009AL)
|
||||
#define STATUS_NOT_SUPPORTED (0xC00000BBL)
|
||||
|
||||
#define NDIS_STATUS_SUCCESS ((NDIS_STATUS)STATUS_SUCCESS)
|
||||
#define NDIS_STATUS_PENDING ((NDIS_STATUS)STATUS_PENDING)
|
||||
#define NDIS_STATUS_NOT_RECOGNIZED ((NDIS_STATUS)0x00010001L)
|
||||
#define NDIS_STATUS_NOT_COPIED ((NDIS_STATUS)0x00010002L)
|
||||
#define NDIS_STATUS_NOT_ACCEPTED ((NDIS_STATUS)0x00010003L)
|
||||
#define NDIS_STATUS_CALL_ACTIVE ((NDIS_STATUS)0x00010007L)
|
||||
|
||||
#define NDIS_STATUS_FAILURE ((NDIS_STATUS)STATUS_UNSUCCESSFUL)
|
||||
#define NDIS_STATUS_RESOURCES ((NDIS_STATUS)STATUS_INSUFFICIENT_RESOURCES)
|
||||
#define NDIS_STATUS_CLOSING ((NDIS_STATUS)0xC0010002L)
|
||||
#define NDIS_STATUS_BAD_VERSION ((NDIS_STATUS)0xC0010004L)
|
||||
#define NDIS_STATUS_BAD_CHARACTERISTICS ((NDIS_STATUS)0xC0010005L)
|
||||
#define NDIS_STATUS_ADAPTER_NOT_FOUND ((NDIS_STATUS)0xC0010006L)
|
||||
#define NDIS_STATUS_OPEN_FAILED ((NDIS_STATUS)0xC0010007L)
|
||||
#define NDIS_STATUS_DEVICE_FAILED ((NDIS_STATUS)0xC0010008L)
|
||||
#define NDIS_STATUS_MULTICAST_FULL ((NDIS_STATUS)0xC0010009L)
|
||||
#define NDIS_STATUS_MULTICAST_EXISTS ((NDIS_STATUS)0xC001000AL)
|
||||
#define NDIS_STATUS_MULTICAST_NOT_FOUND ((NDIS_STATUS)0xC001000BL)
|
||||
#define NDIS_STATUS_REQUEST_ABORTED ((NDIS_STATUS)0xC001000CL)
|
||||
#define NDIS_STATUS_RESET_IN_PROGRESS ((NDIS_STATUS)0xC001000DL)
|
||||
#define NDIS_STATUS_CLOSING_INDICATING ((NDIS_STATUS)0xC001000EL)
|
||||
#define NDIS_STATUS_NOT_SUPPORTED ((NDIS_STATUS)STATUS_NOT_SUPPORTED)
|
||||
#define NDIS_STATUS_INVALID_PACKET ((NDIS_STATUS)0xC001000FL)
|
||||
#define NDIS_STATUS_OPEN_LIST_FULL ((NDIS_STATUS)0xC0010010L)
|
||||
#define NDIS_STATUS_ADAPTER_NOT_READY ((NDIS_STATUS)0xC0010011L)
|
||||
#define NDIS_STATUS_ADAPTER_NOT_OPEN ((NDIS_STATUS)0xC0010012L)
|
||||
#define NDIS_STATUS_NOT_INDICATING ((NDIS_STATUS)0xC0010013L)
|
||||
#define NDIS_STATUS_INVALID_LENGTH ((NDIS_STATUS)0xC0010014L)
|
||||
#define NDIS_STATUS_INVALID_DATA ((NDIS_STATUS)0xC0010015L)
|
||||
#define NDIS_STATUS_BUFFER_TOO_SHORT ((NDIS_STATUS)0xC0010016L)
|
||||
#define NDIS_STATUS_INVALID_OID ((NDIS_STATUS)0xC0010017L)
|
||||
#define NDIS_STATUS_ADAPTER_REMOVED ((NDIS_STATUS)0xC0010018L)
|
||||
#define NDIS_STATUS_UNSUPPORTED_MEDIA ((NDIS_STATUS)0xC0010019L)
|
||||
#define NDIS_STATUS_GROUP_ADDRESS_IN_USE ((NDIS_STATUS)0xC001001AL)
|
||||
#define NDIS_STATUS_FILE_NOT_FOUND ((NDIS_STATUS)0xC001001BL)
|
||||
#define NDIS_STATUS_ERROR_READING_FILE ((NDIS_STATUS)0xC001001CL)
|
||||
#define NDIS_STATUS_ALREADY_MAPPED ((NDIS_STATUS)0xC001001DL)
|
||||
#define NDIS_STATUS_RESOURCE_CONFLICT ((NDIS_STATUS)0xC001001EL)
|
||||
#define NDIS_STATUS_NO_CABLE ((NDIS_STATUS)0xC001001FL)
|
||||
|
||||
#define NDIS_STATUS_INVALID_SAP ((NDIS_STATUS)0xC0010020L)
|
||||
#define NDIS_STATUS_SAP_IN_USE ((NDIS_STATUS)0xC0010021L)
|
||||
#define NDIS_STATUS_INVALID_ADDRESS ((NDIS_STATUS)0xC0010022L)
|
||||
#define NDIS_STATUS_VC_NOT_ACTIVATED ((NDIS_STATUS)0xC0010023L)
|
||||
#define NDIS_STATUS_DEST_OUT_OF_ORDER ((NDIS_STATUS)0xC0010024L) /* cause 27 */
|
||||
#define NDIS_STATUS_VC_NOT_AVAILABLE ((NDIS_STATUS)0xC0010025L) /* cause 35, 45 */
|
||||
#define NDIS_STATUS_CELLRATE_NOT_AVAILABLE ((NDIS_STATUS)0xC0010026L) /* cause 37 */
|
||||
#define NDIS_STATUS_INCOMPATABLE_QOS ((NDIS_STATUS)0xC0010027L) /* cause 49 */
|
||||
#define NDIS_STATUS_AAL_PARAMS_UNSUPPORTED ((NDIS_STATUS)0xC0010028L) /* cause 93 */
|
||||
#define NDIS_STATUS_NO_ROUTE_TO_DESTINATION ((NDIS_STATUS)0xC0010029L) /* cause 3 */
|
||||
#endif /* #ifndef PLATFORM_WINDOWS */
|
||||
|
||||
|
||||
#ifndef OID_802_11_CAPABILITY
|
||||
#define OID_802_11_CAPABILITY 0x0d010122
|
||||
#endif
|
||||
@ -147,144 +84,6 @@ struct oid_obj_priv {
|
||||
NDIS_STATUS(*oidfuns)(struct oid_par_priv *poid_par_priv);
|
||||
};
|
||||
|
||||
#if (defined(CONFIG_MP_INCLUDED) && defined(_RTW_MP_IOCTL_C_)) || \
|
||||
(defined(PLATFORM_WINDOWS) && defined(_RTW_IOCTL_RTL_C_))
|
||||
static NDIS_STATUS oid_null_function(struct oid_par_priv *poid_par_priv)
|
||||
{
|
||||
return NDIS_STATUS_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
int TranslateNdisPsToRtPs(IN NDIS_802_11_POWER_MODE ndisPsMode);
|
||||
|
||||
/* OID Handler for Segment 1 */
|
||||
NDIS_STATUS oid_gen_supported_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_hardware_status_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_media_supported_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_media_in_use_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_lookahead_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_frame_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_link_speed_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_transmit_buffer_space_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_receive_buffer_space_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_transmit_block_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_receive_block_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_vendor_id_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_vendor_description_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_current_packet_filter_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_current_lookahead_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_driver_version_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_total_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_protocol_options_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_mac_options_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_media_connect_status_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_maximum_send_packets_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_vendor_driver_version_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 2 */
|
||||
NDIS_STATUS oid_gen_physical_medium_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
/* OID Handler for Segment 3 */
|
||||
NDIS_STATUS oid_gen_xmit_ok_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_rcv_ok_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_xmit_error_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_rcv_error_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_gen_rcv_no_buffer_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 4 */
|
||||
NDIS_STATUS oid_802_3_permanent_address_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_current_address_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_multicast_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_maximum_list_size_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_mac_options_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 5 */
|
||||
NDIS_STATUS oid_802_3_rcv_error_alignment_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_one_collision_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_more_collisions_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 6 */
|
||||
NDIS_STATUS oid_802_3_xmit_deferred_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_max_collisions_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_rcv_overrun_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_underrun_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_heartbeat_failure_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_times_crs_lost_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_3_xmit_late_collisions_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 7 */
|
||||
NDIS_STATUS oid_pnp_capabilities_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_set_power_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_query_power_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_add_wake_up_pattern_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_remove_wake_up_pattern_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_wake_up_pattern_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_pnp_enable_wake_up_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 8 */
|
||||
NDIS_STATUS oid_802_11_bssid_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_ssid_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_infrastructure_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_add_wep_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_remove_wep_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_disassociate_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_authentication_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_privacy_filter_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_bssid_list_scan_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_encryption_status_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_reload_defaults_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_add_key_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_remove_key_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_association_information_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_test_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_media_stream_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_capability_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_pmkid_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* OID Handler for Segment 9 */
|
||||
NDIS_STATUS oid_802_11_network_types_supported_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_network_type_in_use_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_tx_power_level_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rssi_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rssi_trigger_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_fragmentation_threshold_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rts_threshold_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_number_of_antennas_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_rx_antenna_selected_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_tx_antenna_selected_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_supported_rates_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_desired_rates_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_configuration_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_power_mode_hdl(struct oid_par_priv *poid_par_priv);
|
||||
NDIS_STATUS oid_802_11_bssid_list_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment 10 */
|
||||
NDIS_STATUS oid_802_11_statistics_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
|
||||
/* OID Handler for Segment ED */
|
||||
NDIS_STATUS oid_rt_mh_vender_id_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
||||
void Set_802_3_MULTICAST_LIST(ADAPTER *pAdapter, UCHAR *MCListbuf, ULONG MCListlen, BOOLEAN bAcceptAllMulticast);
|
||||
|
||||
#endif/* end of PLATFORM_WINDOWS */
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined(CONFIG_WIRELESS_EXT)
|
||||
extern struct iw_handler_def rtw_handlers_def;
|
||||
#endif
|
||||
|
@ -1,25 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef _RTW_IOCTL_QUERY_H_
|
||||
#define _RTW_IOCTL_QUERY_H_
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 query_802_11_capability(_adapter *padapter, u8 *pucBuf, u32 *pulOutLen);
|
||||
u8 query_802_11_association_information(_adapter *padapter, PNDIS_802_11_ASSOCIATION_INFORMATION pAssocInfo);
|
||||
#endif
|
||||
|
||||
|
||||
#endif
|
@ -24,28 +24,6 @@ typedef struct _BSSIDInfo {
|
||||
} BSSIDInfo, *PBSSIDInfo;
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
typedef struct _NDIS_802_11_PMKID {
|
||||
u32 Length;
|
||||
u32 BSSIDInfoCount;
|
||||
BSSIDInfo BSSIDInfo[1];
|
||||
} NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 rtw_set_802_11_reload_defaults(_adapter *padapter, NDIS_802_11_RELOAD_DEFAULTS reloadDefaults);
|
||||
u8 rtw_set_802_11_test(_adapter *padapter, NDIS_802_11_TEST *test);
|
||||
u8 rtw_set_802_11_pmkid(_adapter *pdapter, NDIS_802_11_PMKID *pmkid);
|
||||
|
||||
u8 rtw_pnp_set_power_sleep(_adapter *padapter);
|
||||
u8 rtw_pnp_set_power_wakeup(_adapter *padapter);
|
||||
|
||||
void rtw_pnp_resume_wk(void *context);
|
||||
void rtw_pnp_sleep_wk(void *context);
|
||||
|
||||
#endif
|
||||
|
||||
u8 rtw_set_802_11_authentication_mode(_adapter *pdapter, NDIS_802_11_AUTHENTICATION_MODE authmode);
|
||||
u8 rtw_set_802_11_bssid(_adapter *padapter, u8 *bssid);
|
||||
u8 rtw_set_802_11_add_wep(_adapter *padapter, NDIS_802_11_WEP *wep);
|
||||
|
@ -39,13 +39,7 @@ struct mp_xmit_frame {
|
||||
u8 *mem_addr;
|
||||
u32 sz[8];
|
||||
|
||||
#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX)
|
||||
PURB pxmit_urb[8];
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PIRP pxmit_irp[8];
|
||||
#endif
|
||||
|
||||
u8 bpending[8];
|
||||
sint ac_tag[8];
|
||||
@ -66,21 +60,6 @@ struct mp_wiparam {
|
||||
|
||||
typedef void(*wi_act_func)(void *padapter);
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
struct mp_wi_cntx {
|
||||
u8 bmpdrv_unload;
|
||||
|
||||
/* Work Item */
|
||||
NDIS_WORK_ITEM mp_wi;
|
||||
NDIS_EVENT mp_wi_evt;
|
||||
_lock mp_wi_lock;
|
||||
u8 bmp_wi_progress;
|
||||
wi_act_func curractfunc;
|
||||
/* Variable needed in each implementation of CurrActFunc. */
|
||||
struct mp_wiparam param;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct mp_tx {
|
||||
u8 stop;
|
||||
u32 count, sended;
|
||||
@ -383,31 +362,6 @@ struct mp_priv {
|
||||
struct wlan_network mp_network;
|
||||
NDIS_802_11_MAC_ADDRESS network_macaddr;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u32 rx_testcnt;
|
||||
u32 rx_testcnt1;
|
||||
u32 rx_testcnt2;
|
||||
u32 tx_testcnt;
|
||||
u32 tx_testcnt1;
|
||||
|
||||
struct mp_wi_cntx wi_cntx;
|
||||
|
||||
u8 h2c_result;
|
||||
u8 h2c_seqnum;
|
||||
u16 h2c_cmdcode;
|
||||
u8 h2c_resp_parambuf[512];
|
||||
_lock h2c_lock;
|
||||
_lock wkitm_lock;
|
||||
u32 h2c_cmdcnt;
|
||||
NDIS_EVENT h2c_cmd_evt;
|
||||
NDIS_EVENT c2h_set;
|
||||
NDIS_EVENT h2c_clr;
|
||||
NDIS_EVENT cpwm_int;
|
||||
|
||||
NDIS_EVENT scsir_full_evt;
|
||||
NDIS_EVENT scsiw_empty_evt;
|
||||
#endif
|
||||
|
||||
u8 *pallocated_mp_xmitframe_buf;
|
||||
u8 *pmp_xmtframe_buf;
|
||||
_queue free_mp_xmitqueue;
|
||||
|
@ -73,24 +73,7 @@ typedef struct _DR_VARIABLE_STRUCT_ {
|
||||
/* int mp_start_joinbss(_adapter *padapter, NDIS_802_11_SSID *pssid); */
|
||||
|
||||
/* void _irqlevel_changed_(_irqL *irqlevel, BOOLEANunsigned char bLower); */
|
||||
#ifdef PLATFORM_OS_XP
|
||||
static void _irqlevel_changed_(_irqL *irqlevel, u8 bLower)
|
||||
{
|
||||
|
||||
if (bLower == LOWER) {
|
||||
*irqlevel = KeGetCurrentIrql();
|
||||
|
||||
if (*irqlevel > PASSIVE_LEVEL)
|
||||
KeLowerIrql(PASSIVE_LEVEL);
|
||||
} else {
|
||||
if (KeGetCurrentIrql() == PASSIVE_LEVEL)
|
||||
KeRaiseIrql(DISPATCH_LEVEL, irqlevel);
|
||||
}
|
||||
|
||||
}
|
||||
#else
|
||||
#define _irqlevel_changed_(a, b)
|
||||
#endif
|
||||
|
||||
/* oid_rtl_seg_81_80_00 */
|
||||
NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv *poid_par_priv);
|
||||
|
@ -19,20 +19,6 @@
|
||||
#define RTW_RX_MSDU_ACT_INDICATE BIT0
|
||||
#define RTW_RX_MSDU_ACT_FORWARD BIT1
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#define NR_RECVBUFF 1024/* 512 */ /* 128 */
|
||||
#else
|
||||
#define NR_RECVBUFF (16)
|
||||
#endif
|
||||
#elif defined(PLATFORM_OS_CE)
|
||||
#ifdef CONFIG_SDIO_HCI
|
||||
#define NR_RECVBUFF (128)
|
||||
#else
|
||||
#define NR_RECVBUFF (4)
|
||||
#endif
|
||||
#else /* PLATFORM_LINUX /PLATFORM_BSD */
|
||||
|
||||
#ifdef CONFIG_SINGLE_RECV_BUF
|
||||
#define NR_RECVBUFF (1)
|
||||
#else
|
||||
@ -53,7 +39,6 @@
|
||||
#ifdef CONFIG_RTW_NAPI
|
||||
#define RTL_NAPI_WEIGHT (32)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RTL8821C) && defined(CONFIG_SDIO_HCI) && defined(CONFIG_RECV_THREAD_MODE)
|
||||
#ifdef NR_RECVBUFF
|
||||
@ -354,18 +339,6 @@ struct recv_priv {
|
||||
|
||||
_adapter *adapter;
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
_nic_hdl RxPktPoolHdl;
|
||||
_nic_hdl RxBufPoolHdl;
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PMDL pbytecnt_mdl;
|
||||
#endif
|
||||
uint counter; /* record the number that up-layer will return to drv; only when counter==0 can we release recv_priv */
|
||||
NDIS_EVENT recv_resource_evt ;
|
||||
#endif
|
||||
|
||||
|
||||
u32 is_any_non_be_pkts;
|
||||
|
||||
u64 rx_bytes;
|
||||
@ -400,14 +373,9 @@ struct recv_priv {
|
||||
#endif /* CONFIG_USB_INTERRUPT_IN_PIPE */
|
||||
|
||||
#endif
|
||||
#if defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD)
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
struct task irq_prepare_beacon_tasklet;
|
||||
struct task recv_tasklet;
|
||||
#else /* PLATFORM_FREEBSD */
|
||||
struct tasklet_struct irq_prepare_beacon_tasklet;
|
||||
struct tasklet_struct recv_tasklet;
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
struct tasklet_struct irq_prepare_beacon_tasklet;
|
||||
struct tasklet_struct recv_tasklet;
|
||||
|
||||
struct sk_buff_head free_recv_skb_queue;
|
||||
struct sk_buff_head rx_skb_queue;
|
||||
#ifdef CONFIG_RTW_NAPI
|
||||
@ -418,8 +386,6 @@ struct recv_priv {
|
||||
struct ifqueue rx_indicate_queue;
|
||||
#endif /* CONFIG_RX_INDICATE_QUEUE */
|
||||
|
||||
#endif /* defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD) */
|
||||
|
||||
u8 *pallocated_recv_buf;
|
||||
u8 *precv_buf; /* 4 alignment */
|
||||
_queue free_recv_buf_queue;
|
||||
@ -533,19 +499,9 @@ struct recv_buf {
|
||||
|
||||
#ifdef CONFIG_USB_HCI
|
||||
|
||||
#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD)
|
||||
PURB purb;
|
||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||
u32 alloc_sz;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PIRP pirp;
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
USB_TRANSFER usb_transfer_read_port;
|
||||
#endif
|
||||
PURB purb;
|
||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||
u32 alloc_sz;
|
||||
|
||||
u8 irp_pending;
|
||||
int transfer_len;
|
||||
@ -554,8 +510,6 @@ struct recv_buf {
|
||||
|
||||
#if defined(PLATFORM_LINUX)
|
||||
_pkt *pskb;
|
||||
#elif defined(PLATFORM_FREEBSD) /* skb solution */
|
||||
struct sk_buff *pskb;
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -192,9 +192,6 @@ struct security_priv {
|
||||
u32 ndisencryptstatus; /* NDIS_802_11_ENCRYPTION_STATUS */
|
||||
|
||||
NDIS_802_11_WEP ndiswep;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
u8 KeyMaterial[16];/* variable length depending on above field. */
|
||||
#endif
|
||||
|
||||
u8 assoc_info[600];
|
||||
u8 szofcapability[256]; /* for wpa2 usage */
|
||||
|
@ -61,17 +61,13 @@
|
||||
#define NR_XMITBUFF (128)
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#define XMITBUF_ALIGN_SZ 4
|
||||
#else
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
#define XMITBUF_ALIGN_SZ 4
|
||||
#ifdef USB_XMITBUF_ALIGN_SZ
|
||||
#define XMITBUF_ALIGN_SZ (USB_XMITBUF_ALIGN_SZ)
|
||||
#else
|
||||
#ifdef USB_XMITBUF_ALIGN_SZ
|
||||
#define XMITBUF_ALIGN_SZ (USB_XMITBUF_ALIGN_SZ)
|
||||
#else
|
||||
#define XMITBUF_ALIGN_SZ 512
|
||||
#endif
|
||||
#define XMITBUF_ALIGN_SZ 512
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@ -597,18 +593,8 @@ struct xmit_buf {
|
||||
u8 bulkout_id; /* for halmac */
|
||||
#endif /* RTW_HALMAC */
|
||||
|
||||
#if defined(PLATFORM_OS_XP) || defined(PLATFORM_LINUX) || defined(PLATFORM_FREEBSD)
|
||||
PURB pxmit_urb[8];
|
||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PIRP pxmit_irp[8];
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
USB_TRANSFER usb_transfer_write_port;
|
||||
#endif
|
||||
|
||||
u8 bpending[8];
|
||||
|
||||
@ -624,11 +610,6 @@ struct xmit_buf {
|
||||
u32 ff_hwaddr;
|
||||
u8 pg_num;
|
||||
u8 agg_num;
|
||||
#ifdef PLATFORM_OS_XP
|
||||
PMDL pxmitbuf_mdl;
|
||||
PIRP pxmitbuf_irp;
|
||||
PSDBUS_REQUEST_PACKET pxmitbuf_sdrp;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
@ -795,15 +776,8 @@ struct xmit_priv {
|
||||
_sema tx_retevt;/* all tx return event; */
|
||||
u8 txirp_cnt;
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
USB_TRANSFER usb_transfer_write_port;
|
||||
/* USB_TRANSFER usb_transfer_write_mem; */
|
||||
#endif
|
||||
#ifdef PLATFORM_LINUX
|
||||
struct tasklet_struct xmit_tasklet;
|
||||
#endif
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
struct task xmit_tasklet;
|
||||
#endif
|
||||
/* per AC pending irp */
|
||||
int beq_cnt;
|
||||
|
@ -25,24 +25,6 @@
|
||||
#include <sdio_ops_linux.h>
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#include <sdio_ops_xp.h>
|
||||
struct async_context {
|
||||
PMDL pmdl;
|
||||
PSDBUS_REQUEST_PACKET sdrp;
|
||||
unsigned char *r_buf;
|
||||
unsigned char *padapter;
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
#include <sdio_ops_ce.h>
|
||||
#endif
|
||||
|
||||
#endif /* PLATFORM_WINDOWS */
|
||||
|
||||
|
||||
extern void sdio_set_intf_ops(_adapter *padapter, struct _io_ops *pops);
|
||||
void dump_sdio_card_info(void *sel, struct dvobj_priv *dvobj);
|
||||
|
@ -1,49 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef _SDIO_OPS_WINCE_H_
|
||||
#define _SDIO_OPS_WINCE_H_
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
|
||||
|
||||
extern u8 sdbus_cmd52r_ce(struct intf_priv *pintfpriv, u32 addr);
|
||||
|
||||
|
||||
extern void sdbus_cmd52w_ce(struct intf_priv *pintfpriv, u32 addr, u8 val8);
|
||||
|
||||
|
||||
uint sdbus_read_blocks_to_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
|
||||
extern uint sdbus_read_bytes_to_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
|
||||
|
||||
extern uint sdbus_write_blocks_from_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf, u8 async);
|
||||
|
||||
extern uint sdbus_write_bytes_from_membuf_ce(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
extern u8 sdbus_func1cmd52r_ce(struct intf_priv *pintfpriv, u32 addr);
|
||||
extern void sdbus_func1cmd52w_ce(struct intf_priv *pintfpriv, u32 addr, u8 val8);
|
||||
extern uint sdbus_read_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata);
|
||||
extern uint sdbus_write_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata);
|
||||
extern void sdio_read_int(_adapter *padapter, u32 addr, u8 sz, void *pdata);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,49 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef _SDIO_OPS_XP_H_
|
||||
#define _SDIO_OPS_XP_H_
|
||||
|
||||
#include <drv_conf.h>
|
||||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
#include <osdep_intf.h>
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
|
||||
|
||||
extern u8 sdbus_cmd52r_xp(struct intf_priv *pintfpriv, u32 addr);
|
||||
|
||||
|
||||
extern void sdbus_cmd52w_xp(struct intf_priv *pintfpriv, u32 addr, u8 val8);
|
||||
|
||||
|
||||
uint sdbus_read_blocks_to_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
|
||||
extern uint sdbus_read_bytes_to_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
|
||||
|
||||
extern uint sdbus_write_blocks_from_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf, u8 async);
|
||||
|
||||
extern uint sdbus_write_bytes_from_membuf_xp(struct intf_priv *pintfpriv, u32 addr, u32 cnt, u8 *pbuf);
|
||||
extern u8 sdbus_func1cmd52r_xp(struct intf_priv *pintfpriv, u32 addr);
|
||||
extern void sdbus_func1cmd52w_xp(struct intf_priv *pintfpriv, u32 addr, u8 val8);
|
||||
extern uint sdbus_read_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata);
|
||||
extern uint sdbus_write_reg(struct intf_priv *pintfpriv, u32 addr, u32 cnt, void *pdata);
|
||||
extern void sdio_read_int(_adapter *padapter, u32 addr, u8 sz, void *pdata);
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
@ -1,25 +0,0 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Copyright(c) 2007 - 2017 Realtek Corporation.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms of version 2 of the GNU General Public License as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
*****************************************************************************/
|
||||
#ifndef __SDIO_OSINTF_H__
|
||||
#define __SDIO_OSINTF_H__
|
||||
|
||||
|
||||
#ifdef PLATFORM_OS_CE
|
||||
extern NDIS_STATUS ce_sd_get_dev_hdl(PADAPTER padapter);
|
||||
SD_API_STATUS ce_sd_int_callback(SD_DEVICE_HANDLE hDevice, PADAPTER padapter);
|
||||
extern void sd_setup_irs(PADAPTER padapter);
|
||||
#endif
|
||||
|
||||
#endif
|
@ -711,10 +711,6 @@ struct rtw_ieee80211_bar {
|
||||
} __attribute__((packed));
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_LINUX) || defined(CONFIG_RTL8712FW) || defined(PLATFORM_FREEBSD)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* struct rtw_ieee80211_ht_cap - HT capabilities
|
||||
*
|
||||
@ -786,77 +782,6 @@ struct ADDBA_request {
|
||||
unsigned short BA_starting_seqctrl;
|
||||
} __attribute__((packed));
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#pragma pack(1)
|
||||
|
||||
struct rtw_ieee80211_ht_cap {
|
||||
unsigned short cap_info;
|
||||
unsigned char ampdu_params_info;
|
||||
unsigned char supp_mcs_set[16];
|
||||
unsigned short extended_ht_cap_info;
|
||||
unsigned int tx_BF_cap_info;
|
||||
unsigned char antenna_selection_info;
|
||||
};
|
||||
|
||||
|
||||
struct ieee80211_ht_addt_info {
|
||||
unsigned char control_chan;
|
||||
unsigned char ht_param;
|
||||
unsigned short operation_mode;
|
||||
unsigned short stbc_param;
|
||||
unsigned char basic_set[16];
|
||||
};
|
||||
|
||||
struct HT_caps_element {
|
||||
union {
|
||||
struct {
|
||||
unsigned short HT_caps_info;
|
||||
unsigned char AMPDU_para;
|
||||
unsigned char MCS_rate[16];
|
||||
unsigned short HT_ext_caps;
|
||||
unsigned int Beamforming_caps;
|
||||
unsigned char ASEL_caps;
|
||||
} HT_cap_element;
|
||||
unsigned char HT_cap[26];
|
||||
};
|
||||
};
|
||||
|
||||
struct HT_info_element {
|
||||
unsigned char primary_channel;
|
||||
unsigned char infos[5];
|
||||
unsigned char MCS_rate[16];
|
||||
};
|
||||
|
||||
struct AC_param {
|
||||
unsigned char ACI_AIFSN;
|
||||
unsigned char CW;
|
||||
unsigned short TXOP_limit;
|
||||
};
|
||||
|
||||
struct WMM_para_element {
|
||||
unsigned char QoS_info;
|
||||
unsigned char reserved;
|
||||
struct AC_param ac_param[4];
|
||||
};
|
||||
|
||||
struct ADDBA_request {
|
||||
unsigned char dialog_token;
|
||||
unsigned short BA_para_set;
|
||||
unsigned short BA_timeout_value;
|
||||
unsigned short BA_starting_seqctrl;
|
||||
};
|
||||
|
||||
|
||||
#pragma pack()
|
||||
|
||||
#endif
|
||||
|
||||
typedef enum _HT_CAP_AMPDU_FACTOR {
|
||||
MAX_AMPDU_FACTOR_8K = 0,
|
||||
MAX_AMPDU_FACTOR_16K = 1,
|
||||
|
@ -269,251 +269,6 @@ typedef struct _NDIS_802_11_TEST {
|
||||
|
||||
#endif /* end of #ifdef PLATFORM_LINUX */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
|
||||
#define NDIS_802_11_LENGTH_SSID 32
|
||||
#define NDIS_802_11_LENGTH_RATES 8
|
||||
#define NDIS_802_11_LENGTH_RATES_EX 16
|
||||
|
||||
typedef unsigned char NDIS_802_11_MAC_ADDRESS[ETH_ALEN];
|
||||
typedef long NDIS_802_11_RSSI; /* in dBm */
|
||||
typedef unsigned char NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */
|
||||
typedef unsigned char NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */
|
||||
|
||||
|
||||
typedef ULONG NDIS_802_11_KEY_INDEX;
|
||||
typedef unsigned long long NDIS_802_11_KEY_RSC;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_SSID {
|
||||
ULONG SsidLength;
|
||||
UCHAR Ssid[32];
|
||||
} NDIS_802_11_SSID, *PNDIS_802_11_SSID;
|
||||
|
||||
typedef enum _NDIS_802_11_NETWORK_TYPE {
|
||||
Ndis802_11FH,
|
||||
Ndis802_11DS,
|
||||
Ndis802_11OFDM5,
|
||||
Ndis802_11OFDM24,
|
||||
Ndis802_11NetworkTypeMax /* not a real type, defined as an upper bound */
|
||||
} NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
|
||||
|
||||
typedef struct _NDIS_802_11_CONFIGURATION_FH {
|
||||
ULONG Length; /* Length of structure */
|
||||
ULONG HopPattern; /* As defined by 802.11, MSB set */
|
||||
ULONG HopSet; /* to one if non-802.11 */
|
||||
ULONG DwellTime; /* units are Kusec */
|
||||
} NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
|
||||
|
||||
|
||||
/*
|
||||
FW will only save the channel number in DSConfig.
|
||||
ODI Handler will convert the channel number to freq. number.
|
||||
*/
|
||||
typedef struct _NDIS_802_11_CONFIGURATION {
|
||||
ULONG Length; /* Length of structure */
|
||||
ULONG BeaconPeriod; /* units are Kusec */
|
||||
ULONG ATIMWindow; /* units are Kusec */
|
||||
ULONG DSConfig; /* channel number */
|
||||
NDIS_802_11_CONFIGURATION_FH FHConfig;
|
||||
} NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
|
||||
|
||||
|
||||
|
||||
typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
|
||||
Ndis802_11IBSS,
|
||||
Ndis802_11Infrastructure,
|
||||
Ndis802_11AutoUnknown,
|
||||
Ndis802_11InfrastructureMax, /* Not a real value, defined as upper bound */
|
||||
Ndis802_11APMode
|
||||
} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_FIXED_IEs {
|
||||
UCHAR Timestamp[8];
|
||||
USHORT BeaconInterval;
|
||||
USHORT Capabilities;
|
||||
} NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
|
||||
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_VARIABLE_IEs {
|
||||
UCHAR ElementID;
|
||||
UCHAR Length;
|
||||
UCHAR data[1];
|
||||
} NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
|
||||
|
||||
|
||||
|
||||
/*
|
||||
|
||||
|
||||
|
||||
Length is the 4 bytes multiples of the sume of
|
||||
sizeof (NDIS_802_11_MAC_ADDRESS) + 2 + sizeof (NDIS_802_11_SSID) + sizeof (ULONG)
|
||||
+ sizeof (NDIS_802_11_RSSI) + sizeof (NDIS_802_11_NETWORK_TYPE) + sizeof (NDIS_802_11_CONFIGURATION)
|
||||
+ sizeof (NDIS_802_11_RATES_EX) + IELength
|
||||
|
||||
Except the IELength, all other fields are fixed length. Therefore, we can define a marco to present the
|
||||
partial sum.
|
||||
|
||||
*/
|
||||
#if 0
|
||||
typedef struct _NDIS_WLAN_BSSID_EX {
|
||||
ULONG Length;
|
||||
NDIS_802_11_MAC_ADDRESS MacAddress;
|
||||
UCHAR Reserved[2];/* [0]: IS beacon frame, [1]:optimum_antenna=>For antenna diversity; */
|
||||
NDIS_802_11_SSID Ssid;
|
||||
ULONG Privacy;
|
||||
NDIS_802_11_RSSI Rssi;
|
||||
NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
|
||||
NDIS_802_11_CONFIGURATION Configuration;
|
||||
NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
|
||||
NDIS_802_11_RATES_EX SupportedRates;
|
||||
ULONG IELength;
|
||||
UCHAR IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
|
||||
} NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_BSSID_LIST_EX {
|
||||
ULONG NumberOfItems;
|
||||
NDIS_WLAN_BSSID_EX Bssid[1];
|
||||
} NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
|
||||
#endif
|
||||
|
||||
typedef enum _NDIS_802_11_AUTHENTICATION_MODE {
|
||||
Ndis802_11AuthModeOpen,
|
||||
Ndis802_11AuthModeShared,
|
||||
Ndis802_11AuthModeAutoSwitch,
|
||||
Ndis802_11AuthModeWPA,
|
||||
Ndis802_11AuthModeWPAPSK,
|
||||
Ndis802_11AuthModeWPANone,
|
||||
Ndis802_11AuthModeMax /* Not a real mode, defined as upper bound */
|
||||
} NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
|
||||
|
||||
typedef enum _NDIS_802_11_WEP_STATUS {
|
||||
Ndis802_11WEPEnabled,
|
||||
Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
|
||||
Ndis802_11WEPDisabled,
|
||||
Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
|
||||
Ndis802_11WEPKeyAbsent,
|
||||
Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
|
||||
Ndis802_11WEPNotSupported,
|
||||
Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
|
||||
Ndis802_11Encryption2Enabled,
|
||||
Ndis802_11Encryption2KeyAbsent,
|
||||
Ndis802_11Encryption3Enabled,
|
||||
Ndis802_11Encryption3KeyAbsent
|
||||
} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
|
||||
NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
|
||||
|
||||
|
||||
#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
|
||||
#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
|
||||
#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
|
||||
|
||||
#define NDIS_802_11_AI_RESFI_CAPABILITIES 1
|
||||
#define NDIS_802_11_AI_RESFI_STATUSCODE 2
|
||||
#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
|
||||
|
||||
typedef struct _NDIS_802_11_AI_REQFI {
|
||||
USHORT Capabilities;
|
||||
USHORT ListenInterval;
|
||||
NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
|
||||
} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
|
||||
|
||||
typedef struct _NDIS_802_11_AI_RESFI {
|
||||
USHORT Capabilities;
|
||||
USHORT StatusCode;
|
||||
USHORT AssociationId;
|
||||
} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
|
||||
|
||||
typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION {
|
||||
ULONG Length;
|
||||
USHORT AvailableRequestFixedIEs;
|
||||
NDIS_802_11_AI_REQFI RequestFixedIEs;
|
||||
ULONG RequestIELength;
|
||||
ULONG OffsetRequestIEs;
|
||||
USHORT AvailableResponseFixedIEs;
|
||||
NDIS_802_11_AI_RESFI ResponseFixedIEs;
|
||||
ULONG ResponseIELength;
|
||||
ULONG OffsetResponseIEs;
|
||||
} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
|
||||
|
||||
typedef enum _NDIS_802_11_RELOAD_DEFAULTS {
|
||||
Ndis802_11ReloadWEPKeys
|
||||
} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
|
||||
|
||||
|
||||
/* Key mapping keys require a BSSID */
|
||||
typedef struct _NDIS_802_11_KEY {
|
||||
ULONG Length; /* Length of this structure */
|
||||
ULONG KeyIndex;
|
||||
ULONG KeyLength; /* length of key in bytes */
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
NDIS_802_11_KEY_RSC KeyRSC;
|
||||
UCHAR KeyMaterial[32]; /* variable length depending on above field */
|
||||
} NDIS_802_11_KEY, *PNDIS_802_11_KEY;
|
||||
|
||||
typedef struct _NDIS_802_11_REMOVE_KEY {
|
||||
ULONG Length; /* Length of this structure */
|
||||
ULONG KeyIndex;
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
} NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
|
||||
|
||||
typedef struct _NDIS_802_11_WEP {
|
||||
ULONG Length; /* Length of this structure */
|
||||
ULONG KeyIndex; /* 0 is the per-client key, 1-N are the global keys */
|
||||
ULONG KeyLength; /* length of key in bytes */
|
||||
UCHAR KeyMaterial[16];/* variable length depending on above field */
|
||||
} NDIS_802_11_WEP, *PNDIS_802_11_WEP;
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST {
|
||||
ULONG Length; /* Length of structure */
|
||||
NDIS_802_11_MAC_ADDRESS Bssid;
|
||||
ULONG Flags;
|
||||
} NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
|
||||
|
||||
typedef enum _NDIS_802_11_STATUS_TYPE {
|
||||
Ndis802_11StatusType_Authentication,
|
||||
Ndis802_11StatusType_MediaStreamMode,
|
||||
Ndis802_11StatusType_PMKID_CandidateList,
|
||||
Ndis802_11StatusTypeMax /* not a real type, defined as an upper bound */
|
||||
} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
|
||||
|
||||
typedef struct _NDIS_802_11_STATUS_INDICATION {
|
||||
NDIS_802_11_STATUS_TYPE StatusType;
|
||||
} NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
|
||||
|
||||
/* mask for authentication/integrity fields */
|
||||
#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
|
||||
#define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
|
||||
#define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
|
||||
#define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
|
||||
#define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
|
||||
|
||||
/* MIC check time, 60 seconds. */
|
||||
#define MIC_CHECK_TIME 60000000
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_EVENT {
|
||||
NDIS_802_11_STATUS_INDICATION Status;
|
||||
NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
|
||||
} NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
|
||||
|
||||
typedef struct _NDIS_802_11_TEST {
|
||||
ULONG Length;
|
||||
ULONG Type;
|
||||
union {
|
||||
NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
|
||||
NDIS_802_11_RSSI RssiTrigger;
|
||||
} tt;
|
||||
} NDIS_802_11_TEST, *PNDIS_802_11_TEST;
|
||||
|
||||
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
#ifndef Ndis802_11APMode
|
||||
#define Ndis802_11APMode (Ndis802_11InfrastructureMax+1)
|
||||
#endif
|
||||
@ -553,10 +308,6 @@ enum bss_type {
|
||||
/* temporally add #pragma pack for structure alignment issue of
|
||||
* WLAN_BSSID_EX and get_WLAN_BSSID_EX_sz()
|
||||
*/
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
typedef struct _WLAN_BSSID_EX {
|
||||
ULONG Length;
|
||||
NDIS_802_11_MAC_ADDRESS MacAddress;
|
||||
@ -573,13 +324,8 @@ typedef struct _WLAN_BSSID_EX {
|
||||
ULONG IELength;
|
||||
UCHAR IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
|
||||
}
|
||||
#ifndef PLATFORM_WINDOWS
|
||||
__attribute__((packed))
|
||||
#endif
|
||||
WLAN_BSSID_EX, *PWLAN_BSSID_EX;
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
#pragma pack(pop)
|
||||
#endif
|
||||
|
||||
#define BSS_EX_IES(bss_ex) ((bss_ex)->IEs)
|
||||
#define BSS_EX_IES_LEN(bss_ex) ((bss_ex)->IELength)
|
||||
@ -627,10 +373,6 @@ struct wlan_network {
|
||||
int aid; /* will only be valid when a BSS is joinned. */
|
||||
int join_res;
|
||||
WLAN_BSSID_EX network; /* must be the last item */
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
unsigned char iebuf[MAX_IE_SZ];
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
enum VRTL_CARRIER_SENSE {
|
||||
@ -671,34 +413,5 @@ enum UAPSD_MAX_SP {
|
||||
* WPA2
|
||||
*/
|
||||
|
||||
#ifndef PLATFORM_OS_CE
|
||||
typedef struct _PMKID_CANDIDATE {
|
||||
NDIS_802_11_MAC_ADDRESS BSSID;
|
||||
ULONG Flags;
|
||||
} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
|
||||
|
||||
typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST {
|
||||
ULONG Version; /* Version of the structure */
|
||||
ULONG NumCandidates; /* No. of pmkid candidates */
|
||||
PMKID_CANDIDATE CandidateList[1];
|
||||
} NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
|
||||
|
||||
|
||||
typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION {
|
||||
NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
|
||||
NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported;
|
||||
|
||||
} NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION;
|
||||
|
||||
typedef struct _NDIS_802_11_CAPABILITY {
|
||||
ULONG Length;
|
||||
ULONG Version;
|
||||
ULONG NoOfPMKIDs;
|
||||
ULONG NoOfAuthEncryptPairsSupported;
|
||||
NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
|
||||
|
||||
} NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* #ifndef WLAN_BSSDEF_H_ */
|
||||
|
@ -25,37 +25,6 @@ struct pkt_file {
|
||||
SIZE_T buf_len;
|
||||
};
|
||||
|
||||
#ifdef PLATFORM_WINDOWS
|
||||
|
||||
#ifdef PLATFORM_OS_XP
|
||||
#ifdef CONFIG_USB_HCI
|
||||
#include <usb.h>
|
||||
#include <usbdlib.h>
|
||||
#include <usbioctl.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
#define NR_XMITFRAME 64
|
||||
#else
|
||||
#define NR_XMITFRAME 128
|
||||
#endif
|
||||
|
||||
#define ETH_ALEN 6
|
||||
|
||||
extern NDIS_STATUS rtw_xmit_entry(
|
||||
IN _nic_hdl cnxt,
|
||||
IN NDIS_PACKET *pkt,
|
||||
IN UINT flags
|
||||
);
|
||||
|
||||
#endif /* PLATFORM_WINDOWS */
|
||||
|
||||
#ifdef PLATFORM_FREEBSD
|
||||
#define NR_XMITFRAME 256
|
||||
extern int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
||||
extern void rtw_xmit_entry_wrap(struct ifnet *pifp);
|
||||
#endif /* PLATFORM_FREEBSD */
|
||||
|
||||
#ifdef PLATFORM_LINUX
|
||||
|
||||
|
@ -17,13 +17,6 @@
|
||||
#include <drv_types.h>
|
||||
#include <hal_data.h>
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
|
||||
MODULE_AUTHOR("Realtek Semiconductor Corp.");
|
||||
|
@ -23,10 +23,6 @@
|
||||
#error "CONFIG_USB_HCI shall be on!\n"
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_LINUX) && defined (PLATFORM_WINDOWS)
|
||||
#error "Shall be Linux or Windows, but not both!\n"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_80211N_HT
|
||||
extern int rtw_ht_enable;
|
||||
extern int rtw_bw_mode;
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user