rtl8188eu: Remove configuration parameters and dead code for other devices

The vendor code includes some code that is needed for RTL8182CU, RTL8192DU,
RTL8711, RTL8712, and RTL8723AU. This dead code is removed.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-11 10:59:02 -05:00
parent 1c5cb9ca00
commit c5e461c221
18 changed files with 202 additions and 1200 deletions

186
Makefile
View file

@ -26,7 +26,6 @@ CONFIG_USB_AUTOSUSPEND = n
CONFIG_HW_PWRP_DETECTION = n CONFIG_HW_PWRP_DETECTION = n
CONFIG_WIFI_TEST = n CONFIG_WIFI_TEST = n
CONFIG_BT_COEXIST = n CONFIG_BT_COEXIST = n
CONFIG_RTL8192CU_REDEFINE_1X1 = n
CONFIG_INTEL_WIDI = n CONFIG_INTEL_WIDI = n
CONFIG_WAPI_SUPPORT = n CONFIG_WAPI_SUPPORT = n
CONFIG_EFUSE_CONFIG_FILE = n CONFIG_EFUSE_CONFIG_FILE = n
@ -39,75 +38,65 @@ CONFIG_DRVEXT_MODULE = n
export TopDIR ?= $(shell pwd) export TopDIR ?= $(shell pwd)
OUTSRC_FILES := hal/odm_debug.o \ OUTSRC_FILES := \
hal/odm_interface.o\ hal/HalHWImg8188E_MAC.o \
hal/odm_HWConfig.o\ hal/HalHWImg8188E_BB.o \
hal/odm.o\ hal/HalHWImg8188E_RF.o \
hal/HalPhyRf.o hal/HalPhyRf.o \
hal/HalPhyRf_8188e.o \
ifeq ($(CONFIG_RTL8188E), y) hal/HalPwrSeqCmd.o \
hal/Hal8188EFWImg_CE.o \
hal/Hal8188EPwrSeq.o \
hal/Hal8188ERateAdaptive.o\
hal/hal_intf.o \
hal/hal_com.o \
hal/odm.o \
hal/odm_debug.o \
hal/odm_interface.o \
hal/odm_HWConfig.o \
hal/odm_RegConfig8188E.o\
hal/odm_RTL8188E.o \
hal/rtl8188e_cmd.o \
hal/rtl8188e_dm.o \
hal/rtl8188e_hal_init.o \
hal/rtl8188e_phycfg.o \
hal/rtl8188e_rf6052.o \
hal/rtl8188e_rxdesc.o \
hal/rtl8188e_sreset.o \
hal/rtl8188e_xmit.o \
hal/rtl8188eu_led.o \
hal/rtl8188eu_recv.o \
hal/rtl8188eu_xmit.o \
hal/usb_halinit.o \
hal/usb_ops_linux.o
RTL871X = rtl8188e RTL871X = rtl8188e
HAL_COMM_FILES := hal/rtl8188e_xmit.o\
hal/rtl8188e_sreset.o
MODULE_NAME = 8188eu
OUTSRC_FILES += hal/HalHWImg8188E_MAC.o\
hal/HalHWImg8188E_BB.o\
hal/HalHWImg8188E_RF.o\
hal/Hal8188EFWImg_CE.o\
hal/HalPhyRf_8188e.o\
hal/odm_RegConfig8188E.o\
hal/Hal8188ERateAdaptive.o\
hal/odm_RTL8188E.o
ifeq ($(CONFIG_RTL8188E), y)
ifeq ($(CONFIG_WOWLAN), y) ifeq ($(CONFIG_WOWLAN), y)
OUTSRC_FILES += hal/HalHWImg8188E_FW.o OUTSRC_FILES += hal/HalHWImg8188E_FW.o
endif
endif
PWRSEQ_FILES := hal/HalPwrSeqCmd.o \
hal/Hal8188EPwrSeq.o
CHIP_FILES += $(HAL_COMM_FILES) $(OUTSRC_FILES) $(PWRSEQ_FILES)
endif endif
HCI_NAME = usb HCI_NAME = usb
_OS_INTFS_FILES := os_dep/osdep_service.o \ _OS_INTFS_FILES := \
os_dep/os_intfs.o \ os_dep/ioctl_cfg80211.o \
os_dep/usb_intf.o \ os_dep/ioctl_linux.o \
os_dep/usb_ops_linux.o \ os_dep/mlme_linux.o \
os_dep/ioctl_linux.o \ os_dep/os_intfs.o \
os_dep/xmit_linux.o \ os_dep/osdep_service.o \
os_dep/mlme_linux.o \ os_dep/recv_linux.o \
os_dep/recv_linux.o \ os_dep/rtw_android.o \
os_dep/ioctl_cfg80211.o \ os_dep/usb_intf.o \
os_dep/rtw_android.o os_dep/usb_ops_linux.o \
os_dep/xmit_linux.o
_HAL_INTFS_FILES := hal/hal_intf.o \
hal/hal_com.o \
hal/rtl8188e_hal_init.o \
hal/rtl8188e_phycfg.o \
hal/rtl8188e_rf6052.o \
hal/rtl8188e_dm.o \
hal/rtl8188e_rxdesc.o \
hal/rtl8188e_cmd.o \
hal/usb_halinit.o \
hal/rtl$(MODULE_NAME)_led.o \
hal/rtl$(MODULE_NAME)_xmit.o \
hal/rtl$(MODULE_NAME)_recv.o
_HAL_INTFS_FILES += hal/usb_ops_linux.o
ifeq ($(CONFIG_MP_INCLUDED), y) ifeq ($(CONFIG_MP_INCLUDED), y)
_HAL_INTFS_FILES += hal/rtl8188e_mp.o _HAL_INTFS_FILES += hal/rtl8188e_mp.o
endif endif
_HAL_INTFS_FILES += $(CHIP_FILES) _HAL_INTFS_FILES += $(OUTSRC_FILES)
ifeq ($(CONFIG_AUTOCFG_CP), y) ifeq ($(CONFIG_AUTOCFG_CP), y)
@ -121,7 +110,6 @@ EXTRA_CFLAGS += -DCONFIG_USB_AUTOSUSPEND
endif endif
ifeq ($(CONFIG_MP_INCLUDED), y) ifeq ($(CONFIG_MP_INCLUDED), y)
#MODULE_NAME := $(MODULE_NAME)_mp
EXTRA_CFLAGS += -DCONFIG_MP_INCLUDED EXTRA_CFLAGS += -DCONFIG_MP_INCLUDED
endif endif
@ -141,10 +129,6 @@ ifeq ($(CONFIG_BT_COEXIST), y)
EXTRA_CFLAGS += -DCONFIG_BT_COEXIST EXTRA_CFLAGS += -DCONFIG_BT_COEXIST
endif endif
ifeq ($(CONFIG_RTL8192CU_REDEFINE_1X1), y)
EXTRA_CFLAGS += -DRTL8192C_RECONFIG_TO_1T1R
endif
ifeq ($(CONFIG_INTEL_WIDI), y) ifeq ($(CONFIG_INTEL_WIDI), y)
EXTRA_CFLAGS += -DCONFIG_INTEL_WIDI EXTRA_CFLAGS += -DCONFIG_INTEL_WIDI
endif endif
@ -165,17 +149,13 @@ ifeq ($(CONFIG_FTP_PROTECT), y)
EXTRA_CFLAGS += -DCONFIG_FTP_PROTECT EXTRA_CFLAGS += -DCONFIG_FTP_PROTECT
endif endif
ifeq ($(CONFIG_RTL8188E), y)
ifeq ($(CONFIG_WOWLAN), y) ifeq ($(CONFIG_WOWLAN), y)
EXTRA_CFLAGS += -DCONFIG_WOWLAN EXTRA_CFLAGS += -DCONFIG_WOWLAN
endif endif
endif
ifeq ($(CONFIG_RTL8188E), y)
ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y) ifeq ($(CONFIG_EFUSE_CONFIG_FILE), y)
EXTRA_CFLAGS += -DCONFIG_RF_GAIN_OFFSET EXTRA_CFLAGS += -DCONFIG_RF_GAIN_OFFSET
endif endif
endif
SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/ | sed -e s/armv6l/arm/) SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ | sed -e s/ppc/powerpc/ | sed -e s/armv6l/arm/)
@ -186,56 +166,46 @@ KSRC := /lib/modules/$(KVER)/build
MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/ MODDESTDIR := /lib/modules/$(KVER)/kernel/drivers/net/wireless/
INSTALL_PREFIX := INSTALL_PREFIX :=
ifneq ($(USER_MODULE_NAME),)
MODULE_NAME := $(USER_MODULE_NAME)
endif
ifneq ($(KERNELRELEASE),) ifneq ($(KERNELRELEASE),)
rtk_core := core/rtw_cmd.o \ rtk_core := \
core/rtw_security.o \ core/rtw_ap.o \
core/rtw_debug.o \ core/rtw_br_ext.o \
core/rtw_io.o \ core/rtw_cmd.o \
core/rtw_ioctl_query.o \ core/rtw_debug.o \
core/rtw_ioctl_set.o \ core/rtw_efuse.o \
core/rtw_ieee80211.o \ core/rtw_ieee80211.o \
core/rtw_mlme.o \ core/rtw_io.o \
core/rtw_mlme_ext.o \ core/rtw_ioctl_query.o \
core/rtw_wlan_util.o \ core/rtw_ioctl_set.o \
core/rtw_pwrctrl.o \ core/rtw_iol.o \
core/rtw_rf.o \ core/rtw_led.o \
core/rtw_recv.o \ core/rtw_mlme.o \
core/rtw_sta_mgt.o \ core/rtw_mlme_ext.o \
core/rtw_ap.o \ core/rtw_mp.o \
core/rtw_xmit.o \ core/rtw_mp_ioctl.o \
core/rtw_p2p.o \ core/rtw_pwrctrl.o \
core/rtw_tdls.o \ core/rtw_p2p.o \
core/rtw_br_ext.o \ core/rtw_recv.o \
core/rtw_iol.o \ core/rtw_rf.o \
core/rtw_led.o \ core/rtw_security.o \
core/rtw_sreset.o core/rtw_sreset.o \
core/rtw_sta_mgt.o \
core/rtw_tdls.o \
core/rtw_wlan_util.o \
core/rtw_xmit.o
$(MODULE_NAME)-y += $(rtk_core) 8188eu-y += $(rtk_core)
$(MODULE_NAME)-$(CONFIG_INTEL_WIDI) += core/rtw_intel_widi.o 8188eu-$(CONFIG_INTEL_WIDI) += core/rtw_intel_widi.o
$(MODULE_NAME)-$(CONFIG_WAPI_SUPPORT) += core/rtw_wapi.o \ 8188eu-$(CONFIG_WAPI_SUPPORT) += core/rtw_wapi.o \
core/rtw_wapi_sms4.o core/rtw_wapi_sms4.o
8188eu-y += $(_HAL_INTFS_FILES)
$(MODULE_NAME)-y += core/rtw_efuse.o 8188eu-y += $(_OS_INTFS_FILES)
$(MODULE_NAME)-y += $(_HAL_INTFS_FILES) obj-$(CONFIG_RTL8188EU) := 8188eu.o
$(MODULE_NAME)-y += $(_OS_INTFS_FILES)
$(MODULE_NAME)-$(CONFIG_MP_INCLUDED) += core/rtw_mp.o \
core/rtw_mp_ioctl.o
ifeq ($(CONFIG_RTL8723A), y)
$(MODULE_NAME)-$(CONFIG_MP_INCLUDED)+= core/rtw_bt_mp.o
endif
obj-$(CONFIG_RTL8188EU) := $(MODULE_NAME).o
else else
@ -247,14 +217,14 @@ modules:
$(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KSRC) M=$(shell pwd) modules
strip: strip:
$(CROSS_COMPILE)strip $(MODULE_NAME).ko --strip-unneeded $(CROSS_COMPILE)strip 8188eu.ko --strip-unneeded
install: install:
install -p -m 644 $(MODULE_NAME).ko $(MODDESTDIR) install -p -m 644 8188eu.ko $(MODDESTDIR)
/sbin/depmod -a ${KVER} /sbin/depmod -a ${KVER}
uninstall: uninstall:
rm -f $(MODDESTDIR)/$(MODULE_NAME).ko rm -f $(MODDESTDIR)/8188eu.ko
/sbin/depmod -a ${KVER} /sbin/depmod -a ${KVER}
config_r: config_r:

View file

@ -1089,18 +1089,8 @@ _func_enter_;
pcmd->cmdsz = get_WLAN_BSSID_EX_sz((WLAN_BSSID_EX*)pdev_network); pcmd->cmdsz = get_WLAN_BSSID_EX_sz((WLAN_BSSID_EX*)pdev_network);
pcmd->rsp = NULL; pcmd->rsp = NULL;
pcmd->rspsz = 0; pcmd->rspsz = 0;
pdev_network->Length = pcmd->cmdsz; pdev_network->Length = pcmd->cmdsz;
#ifdef CONFIG_RTL8712
/* notes: translate IELength & Length after assign the Length to cmdsz; */
pdev_network->Length = cpu_to_le32(pcmd->cmdsz);
pdev_network->IELength = cpu_to_le32(pdev_network->IELength);
pdev_network->Ssid.SsidLength = cpu_to_le32(pdev_network->Ssid.SsidLength);
#endif
res = rtw_enqueue_cmd(pcmdpriv, pcmd); res = rtw_enqueue_cmd(pcmdpriv, pcmd);
exit: exit:
_func_exit_; _func_exit_;
@ -1285,25 +1275,6 @@ _func_enter_;
pcmd->cmdsz = get_WLAN_BSSID_EX_sz(psecnetwork);/* get cmdsz before endian conversion */ pcmd->cmdsz = get_WLAN_BSSID_EX_sz(psecnetwork);/* get cmdsz before endian conversion */
#ifdef CONFIG_RTL8712
/* wlan_network endian conversion */
psecnetwork->Length = cpu_to_le32(psecnetwork->Length);
psecnetwork->Ssid.SsidLength= cpu_to_le32(psecnetwork->Ssid.SsidLength);
psecnetwork->Privacy = cpu_to_le32(psecnetwork->Privacy);
psecnetwork->Rssi = cpu_to_le32(psecnetwork->Rssi);
psecnetwork->NetworkTypeInUse = cpu_to_le32(psecnetwork->NetworkTypeInUse);
psecnetwork->Configuration.ATIMWindow = cpu_to_le32(psecnetwork->Configuration.ATIMWindow);
psecnetwork->Configuration.BeaconPeriod = cpu_to_le32(psecnetwork->Configuration.BeaconPeriod);
psecnetwork->Configuration.DSConfig = cpu_to_le32(psecnetwork->Configuration.DSConfig);
psecnetwork->Configuration.FHConfig.DwellTime=cpu_to_le32(psecnetwork->Configuration.FHConfig.DwellTime);
psecnetwork->Configuration.FHConfig.HopPattern=cpu_to_le32(psecnetwork->Configuration.FHConfig.HopPattern);
psecnetwork->Configuration.FHConfig.HopSet=cpu_to_le32(psecnetwork->Configuration.FHConfig.HopSet);
psecnetwork->Configuration.FHConfig.Length=cpu_to_le32(psecnetwork->Configuration.FHConfig.Length);
psecnetwork->Configuration.Length = cpu_to_le32(psecnetwork->Configuration.Length);
psecnetwork->InfrastructureMode = cpu_to_le32(psecnetwork->InfrastructureMode);
psecnetwork->IELength = cpu_to_le32(psecnetwork->IELength);
#endif
_rtw_init_listhead(&pcmd->list); _rtw_init_listhead(&pcmd->list);
pcmd->cmdcode = _JoinBss_CMD_;/* GEN_CMD_CODE(_JoinBss) */ pcmd->cmdcode = _JoinBss_CMD_;/* GEN_CMD_CODE(_JoinBss) */
pcmd->parmbuf = (unsigned char *)psecnetwork; pcmd->parmbuf = (unsigned char *)psecnetwork;

View file

@ -951,28 +951,8 @@ _func_enter_;
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_survey_event_callback, ssid=%s\n", pnetwork->Ssid.Ssid)); RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_survey_event_callback, ssid=%s\n", pnetwork->Ssid.Ssid));
#ifdef CONFIG_RTL8712
/* endian_convert */
pnetwork->Length = le32_to_cpu(pnetwork->Length);
pnetwork->Ssid.SsidLength = le32_to_cpu(pnetwork->Ssid.SsidLength);
pnetwork->Privacy =le32_to_cpu( pnetwork->Privacy);
pnetwork->Rssi = le32_to_cpu(pnetwork->Rssi);
pnetwork->NetworkTypeInUse =le32_to_cpu(pnetwork->NetworkTypeInUse);
pnetwork->Configuration.ATIMWindow = le32_to_cpu(pnetwork->Configuration.ATIMWindow);
pnetwork->Configuration.BeaconPeriod = le32_to_cpu(pnetwork->Configuration.BeaconPeriod);
pnetwork->Configuration.DSConfig =le32_to_cpu(pnetwork->Configuration.DSConfig);
pnetwork->Configuration.FHConfig.DwellTime=le32_to_cpu(pnetwork->Configuration.FHConfig.DwellTime);
pnetwork->Configuration.FHConfig.HopPattern=le32_to_cpu(pnetwork->Configuration.FHConfig.HopPattern);
pnetwork->Configuration.FHConfig.HopSet=le32_to_cpu(pnetwork->Configuration.FHConfig.HopSet);
pnetwork->Configuration.FHConfig.Length=le32_to_cpu(pnetwork->Configuration.FHConfig.Length);
pnetwork->Configuration.Length = le32_to_cpu(pnetwork->Configuration.Length);
pnetwork->InfrastructureMode = le32_to_cpu(pnetwork->InfrastructureMode);
pnetwork->IELength = le32_to_cpu(pnetwork->IELength);
#endif
len = get_WLAN_BSSID_EX_sz(pnetwork); len = get_WLAN_BSSID_EX_sz(pnetwork);
if (len > (sizeof(WLAN_BSSID_EX))) if (len > (sizeof(WLAN_BSSID_EX))) {
{
RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("\n ****rtw_survey_event_callback: return a wrong bss ***\n")); RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,("\n ****rtw_survey_event_callback: return a wrong bss ***\n"));
return; return;
} }
@ -1982,11 +1962,6 @@ _func_enter_;
mlmeext_sta_add_event_callback(adapter, psta); mlmeext_sta_add_event_callback(adapter, psta);
#ifdef CONFIG_RTL8711
/* submit SetStaKey_cmd to tell fw, fw will allocate an CAM entry for this sta */
rtw_setstakey_cmd(adapter, (unsigned char*)psta, false);
#endif
exit: exit:
_func_exit_; _func_exit_;
@ -3081,14 +3056,6 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
AMPDU_para [4:2]:Min MPDU Start Spacing AMPDU_para [4:2]:Min MPDU Start Spacing
*/ */
/*
#if defined(CONFIG_RTL8188E )&& defined (CONFIG_SDIO_HCI)
ht_capie.ampdu_params_info = 2;
#else
ht_capie.ampdu_params_info = (IEEE80211_HT_CAP_AMPDU_FACTOR&0x03);
#endif
*/
rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor); rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
ht_capie.ampdu_params_info = (max_rx_ampdu_factor&0x03); ht_capie.ampdu_params_info = (max_rx_ampdu_factor&0x03);
@ -3101,11 +3068,6 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
rtw_set_ie(out_ie+out_len, _HT_CAPABILITY_IE_, rtw_set_ie(out_ie+out_len, _HT_CAPABILITY_IE_,
sizeof(struct rtw_ieee80211_ht_cap), (unsigned char*)&ht_capie, pout_len); sizeof(struct rtw_ieee80211_ht_cap), (unsigned char*)&ht_capie, pout_len);
/* _rtw_memcpy(out_ie+out_len, p, ielen+2);//gtest */
/* pout_len = *pout_len + (ielen+2); */
phtpriv->ht_option = true; phtpriv->ht_option = true;
p = rtw_get_ie(in_ie+12, _HT_ADD_INFO_IE_, &ielen, in_len-12); p = rtw_get_ie(in_ie+12, _HT_ADD_INFO_IE_, &ielen, in_len-12);

View file

@ -7891,15 +7891,10 @@ void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char act
BA_para_set |= (status << 2) & IEEE80211_ADDBA_PARAM_TID_MASK; BA_para_set |= (status << 2) & IEEE80211_ADDBA_PARAM_TID_MASK;
/* max buffer size is 8 MSDU */ /* max buffer size is 8 MSDU */
BA_para_set |= (8 << 6) & RTW_IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK; BA_para_set |= (8 << 6) & RTW_IEEE80211_ADDBA_PARAM_BUF_SIZE_MASK;
} } else
else
#endif #endif
{ {
#if defined(CONFIG_RTL8188E) && defined(CONFIG_SDIO_HCI)
BA_para_set = (0x0802 | ((status & 0xf) << 2)); /* immediate ack & 16 buffer size */
#else
BA_para_set = (0x1002 | ((status & 0xf) << 2)); /* immediate ack & 64 buffer size */ BA_para_set = (0x1002 | ((status & 0xf) << 2)); /* immediate ack & 64 buffer size */
#endif
} }
le_tmp = cpu_to_le16(BA_para_set); le_tmp = cpu_to_le16(BA_para_set);
pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(le_tmp)), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(le_tmp)), &(pattrib->pktlen));
@ -7908,7 +7903,6 @@ void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char act
le_tmp = cpu_to_le16(BA_timeout_value); le_tmp = cpu_to_le16(BA_timeout_value);
pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(le_tmp)), &(pattrib->pktlen)); pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&(le_tmp)), &(pattrib->pktlen));
/* if ((psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress)) != NULL) */
if ((psta = rtw_get_stainfo(pstapriv, raddr)) != NULL) { if ((psta = rtw_get_stainfo(pstapriv, raddr)) != NULL) {
start_seq = (psta->sta_xmitpriv.txseq_tid[status & 0x07]&0xfff) + 1; start_seq = (psta->sta_xmitpriv.txseq_tid[status & 0x07]&0xfff) + 1;

View file

@ -21,24 +21,8 @@
#include <drv_types.h> #include <drv_types.h>
#ifdef CONFIG_RTL8712
#include <rtw_mp_phy_regdef.h>
#endif
#ifdef CONFIG_RTL8192C
#include <rtl8192c_hal.h>
#endif
#ifdef CONFIG_RTL8192D
#include <rtl8192d_hal.h>
#endif
#ifdef CONFIG_RTL8723A
#include <rtl8723a_hal.h>
#include "rtw_bt_mp.h"
#endif
#ifdef CONFIG_RTL8188E
#include "odm_precomp.h" #include "odm_precomp.h"
#include "rtl8188e_hal.h" #include "rtl8188e_hal.h"
#endif
#ifdef CONFIG_MP_INCLUDED #ifdef CONFIG_MP_INCLUDED
@ -268,25 +252,9 @@ void free_mp_priv(struct mp_priv *pmp_priv)
pmp_priv->pmp_xmtframe_buf = NULL; pmp_priv->pmp_xmtframe_buf = NULL;
} }
#if defined (CONFIG_RTL8192C) || defined (CONFIG_RTL8723A)
#define PHY_IQCalibrate(a,b) rtl8192c_PHY_IQCalibrate(a,b)
#define PHY_LCCalibrate(a) rtl8192c_PHY_LCCalibrate(a)
/* define dm_CheckTXPowerTracking(a) rtl8192c_odm_CheckTXPowerTracking(a) */
#define PHY_SetRFPathSwitch(a,b) rtl8192c_PHY_SetRFPathSwitch(a,b)
#endif
#ifdef CONFIG_RTL8192D
#define PHY_IQCalibrate(a,b) rtl8192d_PHY_IQCalibrate(a)
#define PHY_LCCalibrate(a) rtl8192d_PHY_LCCalibrate(a)
/* define dm_CheckTXPowerTracking(a) rtl8192d_odm_CheckTXPowerTracking(a) */
#define PHY_SetRFPathSwitch(a,b) rtl8192d_PHY_SetRFPathSwitch(a,b)
#endif
#ifdef CONFIG_RTL8188E
#define PHY_IQCalibrate(a,b) PHY_IQCalibrate_8188E(a,b) #define PHY_IQCalibrate(a,b) PHY_IQCalibrate_8188E(a,b)
#define PHY_LCCalibrate(a) PHY_LCCalibrate_8188E(a) #define PHY_LCCalibrate(a) PHY_LCCalibrate_8188E(a)
#define PHY_SetRFPathSwitch(a,b) PHY_SetRFPathSwitch_8188E(a,b) #define PHY_SetRFPathSwitch(a,b) PHY_SetRFPathSwitch_8188E(a,b)
#endif
s32 s32
MPT_InitializeAdapter( MPT_InitializeAdapter(
@ -311,14 +279,6 @@ MPT_InitializeAdapter(
pMptCtx->h2cReqNum = 0x0; pMptCtx->h2cReqNum = 0x0;
/* Init mpt event. */ /* Init mpt event. */
/* init for BT MP */ /* init for BT MP */
#ifdef CONFIG_RTL8723A
pMptCtx->bMPh2c_timeout = false;
pMptCtx->MptH2cRspEvent = false;
pMptCtx->MptBtC2hEvent = false;
_rtw_init_sema(&pMptCtx->MPh2c_Sema, 0);
_init_timer( &pMptCtx->MPh2c_timeout_timer, pAdapter->pnetdev, MPh2c_timeout_handle, pAdapter );
#endif
pMptCtx->bMptWorkItemInProgress = false; pMptCtx->bMptWorkItemInProgress = false;
pMptCtx->CurrMptAct = NULL; pMptCtx->CurrMptAct = NULL;
@ -372,10 +332,6 @@ MPT_DeInitAdapter(
PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.MptCtx; PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.MptCtx;
pMptCtx->bMptDrvUnload = true; pMptCtx->bMptDrvUnload = true;
#ifdef CONFIG_RTL8723A
_rtw_free_sema(&(pMptCtx->MPh2c_Sema));
_cancel_timer_ex( &pMptCtx->MPh2c_timeout_timer);
#endif
} }
static u8 mpt_ProStartTest(PADAPTER padapter) static u8 mpt_ProStartTest(PADAPTER padapter)
@ -410,22 +366,16 @@ void GetPowerTracking(PADAPTER padapter, u8 *enable)
static void disable_dm(PADAPTER padapter) static void disable_dm(PADAPTER padapter)
{ {
#ifndef CONFIG_RTL8723A
u8 v8; u8 v8;
#endif
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
struct dm_priv *pdmpriv = &pHalData->dmpriv; struct dm_priv *pdmpriv = &pHalData->dmpriv;
/* 3 1. disable firmware dynamic mechanism */ /* 3 1. disable firmware dynamic mechanism */
/* disable Power Training, Rate Adaptive */ /* disable Power Training, Rate Adaptive */
#ifdef CONFIG_RTL8723A
SetBcnCtrlReg(padapter, 0, EN_BCN_FUNCTION);
#else
v8 = rtw_read8(padapter, REG_BCN_CTRL); v8 = rtw_read8(padapter, REG_BCN_CTRL);
v8 &= ~EN_BCN_FUNCTION; v8 &= ~EN_BCN_FUNCTION;
rtw_write8(padapter, REG_BCN_CTRL, v8); rtw_write8(padapter, REG_BCN_CTRL, v8);
#endif
/* 3 2. disable driver dynamic mechanism */ /* 3 2. disable driver dynamic mechanism */
/* disable Dynamic Initial Gain */ /* disable Dynamic Initial Gain */
@ -434,9 +384,6 @@ static void disable_dm(PADAPTER padapter)
Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false); Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
/* enable APK, LCK and IQK but disable power tracking */ /* enable APK, LCK and IQK but disable power tracking */
#ifndef CONFIG_RTL8188E
pdmpriv->TxPowerTrackControl = false;
#endif
Switch_DM_Func(padapter, DYNAMIC_RF_CALIBRATION, true); Switch_DM_Func(padapter, DYNAMIC_RF_CALIBRATION, true);
} }
@ -548,26 +495,10 @@ end_of_mp_start_test:
if (res == _SUCCESS) if (res == _SUCCESS)
{ {
/* set MSR to WIFI_FW_ADHOC_STATE */ /* set MSR to WIFI_FW_ADHOC_STATE */
#if !defined (CONFIG_RTL8712)
val8 = rtw_read8(padapter, MSR) & 0xFC; /* 0x0102 */ val8 = rtw_read8(padapter, MSR) & 0xFC; /* 0x0102 */
val8 |= WIFI_FW_ADHOC_STATE; val8 |= WIFI_FW_ADHOC_STATE;
rtw_write8(padapter, MSR, val8); /* Link in ad hoc network */ rtw_write8(padapter, MSR, val8); /* Link in ad hoc network */
#endif
#if defined (CONFIG_RTL8712)
rtw_write8(padapter, MSR, 1); /* Link in ad hoc network */
rtw_write8(padapter, RCR, 0); /* RCR : disable all pkt, 0x10250048 */
rtw_write8(padapter, RCR+2, 0x57); /* RCR disable Check BSSID, 0x1025004a */
/* disable RX filter map , mgt frames will put in RX FIFO 0 */
rtw_write16(padapter, RXFLTMAP0, 0x0); /* 0x10250116 */
val8 = rtw_read8(padapter, EE_9346CR); /* 0x1025000A */
if (!(val8 & _9356SEL))/* boot from EFUSE */
efuse_change_max_size(padapter);
#endif
} }
return res; return res;
} }
/* */ /* */
@ -719,27 +650,6 @@ void MP_PHY_SetRFPathSwitch(PADAPTER pAdapter ,bool bMain)
} }
#if defined (CONFIG_RTL8712)
/*------------------------------Define structure----------------------------*/
typedef struct _R_ANTENNA_SELECT_OFDM {
u32 r_tx_antenna:4;
u32 r_ant_l:4;
u32 r_ant_non_ht:4;
u32 r_ant_ht1:4;
u32 r_ant_ht2:4;
u32 r_ant_ht_s1:4;
u32 r_ant_non_ht_s1:4;
u32 OFDM_TXSC:2;
u32 Reserved:2;
}R_ANTENNA_SELECT_OFDM;
typedef struct _R_ANTENNA_SELECT_CCK {
u8 r_cckrx_enable_2:2;
u8 r_cckrx_enable:2;
u8 r_ccktx_enable:4;
}R_ANTENNA_SELECT_CCK;
#endif
s32 SetThermalMeter(PADAPTER pAdapter, u8 target_ther) s32 SetThermalMeter(PADAPTER pAdapter, u8 target_ther)
{ {
return Hal_SetThermalMeter( pAdapter, target_ther); return Hal_SetThermalMeter( pAdapter, target_ther);
@ -802,15 +712,7 @@ void PhySetTxPowerLevel(PADAPTER pAdapter)
struct mp_priv *pmp_priv = &pAdapter->mppriv; struct mp_priv *pmp_priv = &pAdapter->mppriv;
if (pmp_priv->bSetTxPower==0) /* for NO manually set power index */ if (pmp_priv->bSetTxPower==0) /* for NO manually set power index */
{
#ifdef CONFIG_RTL8188E
PHY_SetTxPowerLevel8188E(pAdapter,pmp_priv->channel); PHY_SetTxPowerLevel8188E(pAdapter,pmp_priv->channel);
#elif defined(CONFIG_RTL8192D)
PHY_SetTxPowerLevel8192D(pAdapter,pmp_priv->channel);
#else
PHY_SetTxPowerLevel8192C(pAdapter,pmp_priv->channel);
#endif
}
} }
/* */ /* */
@ -967,40 +869,24 @@ void SetPacketTx(PADAPTER padapter)
/* 3 3. init TX descriptor */ /* 3 3. init TX descriptor */
/* offset 0 */ /* offset 0 */
#if defined(CONFIG_RTL8188E) && !defined(CONFIG_RTL8188E_SDIO)
desc->txdw0 |= cpu_to_le32(OWN | FSG | LSG); desc->txdw0 |= cpu_to_le32(OWN | FSG | LSG);
desc->txdw0 |= cpu_to_le32(pkt_size & 0x0000FFFF); /* packet size */ desc->txdw0 |= cpu_to_le32(pkt_size & 0x0000FFFF); /* packet size */
desc->txdw0 |= cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) & 0x00FF0000); /* 32 bytes for TX Desc */ desc->txdw0 |= cpu_to_le32(((TXDESC_SIZE + OFFSET_SZ) << OFFSET_SHT) & 0x00FF0000); /* 32 bytes for TX Desc */
if (bmcast) desc->txdw0 |= cpu_to_le32(BMC); /* broadcast packet */ if (bmcast) desc->txdw0 |= cpu_to_le32(BMC); /* broadcast packet */
desc->txdw1 |= cpu_to_le32((0x01 << 26) & 0xff000000); desc->txdw1 |= cpu_to_le32((0x01 << 26) & 0xff000000);
#endif
/* offset 4 */ /* offset 4 */
#ifndef CONFIG_RTL8188E
desc->txdw1 |= cpu_to_le32(BK); /* don't aggregate(AMPDU) */
desc->txdw1 |= cpu_to_le32((pattrib->mac_id) & 0x1F); /* CAM_ID(MAC_ID) */
#else
desc->txdw1 |= cpu_to_le32((pattrib->mac_id) & 0x3F); /* CAM_ID(MAC_ID) */ desc->txdw1 |= cpu_to_le32((pattrib->mac_id) & 0x3F); /* CAM_ID(MAC_ID) */
#endif
desc->txdw1 |= cpu_to_le32((pattrib->qsel << QSEL_SHT) & 0x00001F00); /* Queue Select, TID */ desc->txdw1 |= cpu_to_le32((pattrib->qsel << QSEL_SHT) & 0x00001F00); /* Queue Select, TID */
#ifdef CONFIG_RTL8188E desc->txdw1 |= cpu_to_le32((pattrib->raid << RATE_ID_SHT) & 0x000F0000); /* Rate Adaptive ID */
desc->txdw1 |= cpu_to_le32((pattrib->raid << RATE_ID_SHT) & 0x000F0000); /* Rate Adaptive ID */
#else
desc->txdw1 |= cpu_to_le32((pattrib->raid << Rate_ID_SHT) & 0x000F0000); /* Rate Adaptive ID */
#endif
/* offset 8 */ /* offset 8 */
/* offset 12 */ /* offset 12 */
desc->txdw3 |= cpu_to_le32((pattrib->seqnum<<16)&0x0fff0000); desc->txdw3 |= cpu_to_le32((pattrib->seqnum<<16)&0x0fff0000);
/* offset 16 */ /* offset 16 */
#ifdef CONFIG_RTL8188E desc->txdw4 |= cpu_to_le32(HW_SSN);
desc->txdw4 |= cpu_to_le32(HW_SSN);
#else
desc->txdw4 |= cpu_to_le32(HW_SEQ_EN);
#endif
desc->txdw4 |= cpu_to_le32(USERATE); desc->txdw4 |= cpu_to_le32(USERATE);
desc->txdw4 |= cpu_to_le32(DISDATAFB); desc->txdw4 |= cpu_to_le32(DISDATAFB);
@ -1018,12 +904,8 @@ void SetPacketTx(PADAPTER padapter)
if (pmp_priv->rateidx > MPT_RATE_54M) if (pmp_priv->rateidx > MPT_RATE_54M)
desc->txdw5 |= cpu_to_le32(SGI); /* MCS Short Guard Interval */ desc->txdw5 |= cpu_to_le32(SGI); /* MCS Short Guard Interval */
} }
#ifdef CONFIG_RTL8188E desc->txdw5 |= cpu_to_le32(RTY_LMT_EN); /* retry limit enable */
desc->txdw5 |= cpu_to_le32(RTY_LMT_EN); /* retry limit enable */ desc->txdw5 |= cpu_to_le32(0x00180000); /* DATA/RTS Rate Fallback Limit */
desc->txdw5 |= cpu_to_le32(0x00180000); /* DATA/RTS Rate Fallback Limit */
#else
desc->txdw5 |= cpu_to_le32(0x0001FF00); /* DATA/RTS Rate Fallback Limit */
#endif
/* 3 4. make wlan header, make_wlanhdr() */ /* 3 4. make wlan header, make_wlanhdr() */
hdr = (struct rtw_ieee80211_hdr *)pkt_start; hdr = (struct rtw_ieee80211_hdr *)pkt_start;
@ -1065,11 +947,8 @@ void SetPacketRx(PADAPTER pAdapter, u8 bStartRx)
{ {
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter); HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
if (bStartRx) if (bStartRx) {
{
/* Accept CRC error and destination address */ /* Accept CRC error and destination address */
#if 1
/* ndef CONFIG_RTL8723A */
pHalData->ReceiveConfig = AAP | APM | AM | AB | APP_ICV | ADF | AMF | HTC_LOC_CTRL | APP_MIC | APP_PHYSTS; pHalData->ReceiveConfig = AAP | APM | AM | AB | APP_ICV | ADF | AMF | HTC_LOC_CTRL | APP_MIC | APP_PHYSTS;
pHalData->ReceiveConfig |= ACRC32; pHalData->ReceiveConfig |= ACRC32;
@ -1078,12 +957,7 @@ void SetPacketRx(PADAPTER pAdapter, u8 bStartRx)
/* Accept all data frames */ /* Accept all data frames */
rtw_write16(pAdapter, REG_RXFLTMAP2, 0xFFFF); rtw_write16(pAdapter, REG_RXFLTMAP2, 0xFFFF);
#else } else {
rtw_write32(pAdapter, REG_RCR, 0x70000101);
#endif
}
else
{
rtw_write32(pAdapter, REG_RCR, 0); rtw_write32(pAdapter, REG_RCR, 0);
} }
} }

View file

@ -324,12 +324,6 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
struct xmit_buf *pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf; struct xmit_buf *pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;
u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ; u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ;
u32 num_xmit_extbuf = NR_XMIT_EXTBUFF; u32 num_xmit_extbuf = NR_XMIT_EXTBUFF;
#if defined(CONFIG_MP_INCLUDED) && defined(CONFIG_RTL8723A)
if (padapter->registrypriv.mp_mode) {
max_xmit_extbuf_size = 20000;
num_xmit_extbuf = 1;
}
#endif
_func_enter_; _func_enter_;
@ -2414,54 +2408,38 @@ __inline static struct tx_servq *rtw_get_sta_pending
_func_enter_; _func_enter_;
#ifdef CONFIG_RTL8711 switch (up) {
case 1:
if (IS_MCAST(psta->hwaddr)) case 2:
{ ptxservq = &(psta->sta_xmitpriv.bk_q);
ptxservq = &(psta->sta_xmitpriv.be_q); /* we will use be_q to queue bc/mc frames in BCMC_stainfo */ *ppstapending = &padapter->xmitpriv.bk_pending;
*ppstapending = &padapter->xmitpriv.bm_pending; (phwxmits+3)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BK\n"));
break;
case 4:
case 5:
ptxservq = &(psta->sta_xmitpriv.vi_q);
*ppstapending = &padapter->xmitpriv.vi_pending;
(phwxmits+1)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VI\n"));
break;
case 6:
case 7:
ptxservq = &(psta->sta_xmitpriv.vo_q);
*ppstapending = &padapter->xmitpriv.vo_pending;
(phwxmits+0)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VO\n"));
break;
case 0:
case 3:
default:
ptxservq = &(psta->sta_xmitpriv.be_q);
*ppstapending = &padapter->xmitpriv.be_pending;
(phwxmits+2)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BE\n"));
break;
} }
else
#endif
{
switch (up)
{
case 1:
case 2:
ptxservq = &(psta->sta_xmitpriv.bk_q);
*ppstapending = &padapter->xmitpriv.bk_pending;
(phwxmits+3)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BK\n"));
break;
case 4:
case 5:
ptxservq = &(psta->sta_xmitpriv.vi_q);
*ppstapending = &padapter->xmitpriv.vi_pending;
(phwxmits+1)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VI\n"));
break;
case 6:
case 7:
ptxservq = &(psta->sta_xmitpriv.vo_q);
*ppstapending = &padapter->xmitpriv.vo_pending;
(phwxmits+0)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : VO\n"));
break;
case 0:
case 3:
default:
ptxservq = &(psta->sta_xmitpriv.be_q);
*ppstapending = &padapter->xmitpriv.be_pending;
(phwxmits+2)->accnt++;
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("rtw_get_sta_pending : BE\n"));
break;
}
}
_func_exit_; _func_exit_;

View file

@ -23,19 +23,7 @@
#include <hal_intf.h> #include <hal_intf.h>
#include <hal_com.h> #include <hal_com.h>
#ifdef CONFIG_RTL8192C
#include <rtl8192c_hal.h>
#endif
#ifdef CONFIG_RTL8192D
#include <rtl8192d_hal.h>
#endif
#ifdef CONFIG_RTL8723A
#include <rtl8723a_hal.h>
#endif
#ifdef CONFIG_RTL8188E
#include <rtl8188e_hal.h> #include <rtl8188e_hal.h>
#endif
#define _HAL_INIT_C_ #define _HAL_INIT_C_

View file

@ -4185,59 +4185,16 @@ odm_TXPowerTrackingThermalMeterInit(
PDM_ODM_T pDM_Odm PDM_ODM_T pDM_Odm
) )
{ {
#if (DM_ODM_SUPPORT_TYPE == ODM_MP) pDM_Odm->RFCalibrateInfo.bTXPowerTracking = true;
PADAPTER Adapter = pDM_Odm->Adapter; pDM_Odm->RFCalibrateInfo.TXPowercount = 0;
PMGNT_INFO pMgntInfo = &Adapter->MgntInfo; pDM_Odm->RFCalibrateInfo.bTXPowerTrackingInit = false;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter); if ( *(pDM_Odm->mp_mode) != 1)
pMgntInfo->bTXPowerTracking = true;
pHalData->TXPowercount = 0;
pHalData->bTXPowerTrackingInit = false;
#if MP_DRIVER != 1 /* for mp driver, turn off txpwrtracking as default */
pHalData->TxPowerTrackControl = true;
#endif/* if (MP_DRIVER != 1) */
ODM_RT_TRACE(pDM_Odm,COMP_POWER_TRACKING, DBG_LOUD, ("pMgntInfo->bTXPowerTracking = %d\n", pMgntInfo->bTXPowerTracking));
#elif (DM_ODM_SUPPORT_TYPE == ODM_CE)
#ifdef CONFIG_RTL8188E
{
pDM_Odm->RFCalibrateInfo.bTXPowerTracking = true;
pDM_Odm->RFCalibrateInfo.TXPowercount = 0;
pDM_Odm->RFCalibrateInfo.bTXPowerTrackingInit = false;
if ( *(pDM_Odm->mp_mode) != 1)
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = true;
MSG_88E("pDM_Odm TxPowerTrackControl = %d\n", pDM_Odm->RFCalibrateInfo.TxPowerTrackControl);
}
#else
{
PADAPTER Adapter = pDM_Odm->Adapter;
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
struct dm_priv *pdmpriv = &pHalData->dmpriv;
pdmpriv->bTXPowerTracking = true;
pdmpriv->TXPowercount = 0;
pdmpriv->bTXPowerTrackingInit = false;
if (*(pDM_Odm->mp_mode) != 1)
pdmpriv->TxPowerTrackControl = true;
MSG_88E("pdmpriv->TxPowerTrackControl = %d\n", pdmpriv->TxPowerTrackControl);
}
#endif/* endif (CONFIG_RTL8188E==1) */
#elif (DM_ODM_SUPPORT_TYPE & (ODM_AP|ODM_ADSL))
#ifdef RTL8188E_SUPPORT
{
pDM_Odm->RFCalibrateInfo.bTXPowerTracking = true;
pDM_Odm->RFCalibrateInfo.TXPowercount = 0;
pDM_Odm->RFCalibrateInfo.bTXPowerTrackingInit = false;
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = true; pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = true;
} MSG_88E("pDM_Odm TxPowerTrackControl = %d\n", pDM_Odm->RFCalibrateInfo.TxPowerTrackControl);
#endif
#endif
pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = true; pDM_Odm->RFCalibrateInfo.TxPowerTrackControl = true;
} }
void void
ODM_TXPowerTrackingCheck( ODM_TXPowerTrackingCheck(
PDM_ODM_T pDM_Odm PDM_ODM_T pDM_Odm

View file

@ -708,10 +708,6 @@ void Hal_SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart)
write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMContinueTx, bDisable); write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMContinueTx, bDisable);
write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMSingleCarrier, bEnable); write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMSingleCarrier, bEnable);
write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMSingleTone, bDisable); write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMSingleTone, bDisable);
#ifdef CONFIG_RTL8192C
/* 5. Disable TX power saving at STF & LLTF */
write_bbreg(pAdapter, rOFDM1_LSTF, BIT22, 1);
#endif
/* for dynamic set Power index. */ /* for dynamic set Power index. */
write_bbreg(pAdapter, rFPGA0_XA_HSSIParameter1, bMaskDWord, 0x01000500); write_bbreg(pAdapter, rFPGA0_XA_HSSIParameter1, bMaskDWord, 0x01000500);
write_bbreg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500); write_bbreg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500);
@ -725,10 +721,6 @@ void Hal_SetSingleCarrierTx(PADAPTER pAdapter, u8 bStart)
write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMContinueTx, bDisable); write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMContinueTx, bDisable);
write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMSingleCarrier, bDisable); write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMSingleCarrier, bDisable);
write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMSingleTone, bDisable); write_bbreg(pAdapter, rOFDM1_LSTF, bOFDMSingleTone, bDisable);
#ifdef CONFIG_RTL8192C
/* Cancel disable TX power saving at STF&LLTF */
write_bbreg(pAdapter, rOFDM1_LSTF, BIT22, 0);
#endif
rtw_msleep_os(10); rtw_msleep_os(10);
/* BB Reset */ /* BB Reset */
@ -914,13 +906,6 @@ void Hal_SetCCKContinuousTx(PADAPTER pAdapter, u8 bStart)
write_bbreg(pAdapter, rCCK0_System, bCCKBBMode, 0x2); /* transmit mode */ write_bbreg(pAdapter, rCCK0_System, bCCKBBMode, 0x2); /* transmit mode */
write_bbreg(pAdapter, rCCK0_System, bCCKScramble, bEnable); /* turn on scramble setting */ write_bbreg(pAdapter, rCCK0_System, bCCKScramble, bEnable); /* turn on scramble setting */
#ifdef CONFIG_RTL8192C
/* Patch for CCK 11M waveform */
if (cckrate == MPT_RATE_1M)
write_bbreg(pAdapter, 0xA71, BIT(6), bDisable);
else
write_bbreg(pAdapter, 0xA71, BIT(6), bEnable);
#endif
/* for dynamic set Power index. */ /* for dynamic set Power index. */
write_bbreg(pAdapter, rFPGA0_XA_HSSIParameter1, bMaskDWord, 0x01000500); write_bbreg(pAdapter, rFPGA0_XA_HSSIParameter1, bMaskDWord, 0x01000500);
write_bbreg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500); write_bbreg(pAdapter, rFPGA0_XB_HSSIParameter1, bMaskDWord, 0x01000500);

View file

@ -20,19 +20,11 @@
#ifndef __IEEE80211_H #ifndef __IEEE80211_H
#define __IEEE80211_H #define __IEEE80211_H
#include <drv_conf.h>
#ifndef CONFIG_RTL8711FW #include <osdep_service.h>
#include <drv_types.h>
#include <drv_conf.h> #include "wifi.h"
#include <osdep_service.h> #include <linux/wireless.h>
#include <drv_types.h>
#include "wifi.h"
#include <linux/wireless.h>
#else
#include <list.h>
#endif
#define MGMT_QUEUE_NUM 5 #define MGMT_QUEUE_NUM 5

View file

@ -27,90 +27,88 @@
#define C2H_MEM_SZ (16*1024) #define C2H_MEM_SZ (16*1024)
#ifndef CONFIG_RTL8711FW #include <osdep_service.h>
#include <ieee80211.h> // <ieee80211/ieee80211.h>
#include <osdep_service.h>
#include <ieee80211.h> // <ieee80211/ieee80211.h>
#define FREE_CMDOBJ_SZ 128 #define FREE_CMDOBJ_SZ 128
#define MAX_CMDSZ 1024 #define MAX_CMDSZ 1024
#define MAX_RSPSZ 512 #define MAX_RSPSZ 512
#define MAX_EVTSZ 1024 #define MAX_EVTSZ 1024
#define CMDBUFF_ALIGN_SZ 512 #define CMDBUFF_ALIGN_SZ 512
struct cmd_obj { struct cmd_obj {
_adapter *padapter; _adapter *padapter;
u16 cmdcode; u16 cmdcode;
u8 res; u8 res;
u8 *parmbuf; u8 *parmbuf;
u32 cmdsz; u32 cmdsz;
u8 *rsp; u8 *rsp;
u32 rspsz; u32 rspsz;
//_sema cmd_sem; //_sema cmd_sem;
_list list; _list list;
}; };
struct cmd_priv { struct cmd_priv {
_sema cmd_queue_sema; _sema cmd_queue_sema;
//_sema cmd_done_sema; //_sema cmd_done_sema;
_sema terminate_cmdthread_sema; _sema terminate_cmdthread_sema;
_queue cmd_queue; _queue cmd_queue;
u8 cmd_seq; u8 cmd_seq;
u8 *cmd_buf; //shall be non-paged, and 4 bytes aligned u8 *cmd_buf; //shall be non-paged, and 4 bytes aligned
u8 *cmd_allocated_buf; u8 *cmd_allocated_buf;
u8 *rsp_buf; //shall be non-paged, and 4 bytes aligned u8 *rsp_buf; //shall be non-paged, and 4 bytes aligned
u8 *rsp_allocated_buf; u8 *rsp_allocated_buf;
u32 cmd_issued_cnt; u32 cmd_issued_cnt;
u32 cmd_done_cnt; u32 cmd_done_cnt;
u32 rsp_cnt; u32 rsp_cnt;
u8 cmdthd_running; u8 cmdthd_running;
_adapter *padapter; _adapter *padapter;
}; };
#ifdef CONFIG_EVENT_THREAD_MODE #ifdef CONFIG_EVENT_THREAD_MODE
struct evt_obj { struct evt_obj {
u16 evtcode; u16 evtcode;
u8 res; u8 res;
u8 *parmbuf; u8 *parmbuf;
u32 evtsz; u32 evtsz;
_list list; _list list;
}; };
#endif #endif
struct evt_priv { struct evt_priv {
#ifdef CONFIG_EVENT_THREAD_MODE #ifdef CONFIG_EVENT_THREAD_MODE
_sema evt_notify; _sema evt_notify;
_sema terminate_evtthread_sema; _sema terminate_evtthread_sema;
_queue evt_queue; _queue evt_queue;
#endif #endif
#define CONFIG_C2H_WK #define CONFIG_C2H_WK
#ifdef CONFIG_C2H_WK #ifdef CONFIG_C2H_WK
_workitem c2h_wk; _workitem c2h_wk;
bool c2h_wk_alive; bool c2h_wk_alive;
struct rtw_cbuf *c2h_queue; struct rtw_cbuf *c2h_queue;
#define C2H_QUEUE_MAX_LEN 10 #define C2H_QUEUE_MAX_LEN 10
#endif #endif
#ifdef CONFIG_H2CLBK #ifdef CONFIG_H2CLBK
_sema lbkevt_done; _sema lbkevt_done;
u8 lbkevt_limit; u8 lbkevt_limit;
u8 lbkevt_num; u8 lbkevt_num;
u8 *cmdevt_parm; u8 *cmdevt_parm;
#endif #endif
ATOMIC_T event_seq; ATOMIC_T event_seq;
u8 *evt_buf; //shall be non-paged, and 4 bytes aligned u8 *evt_buf; //shall be non-paged, and 4 bytes aligned
u8 *evt_allocated_buf; u8 *evt_allocated_buf;
u32 evt_done_cnt; u32 evt_done_cnt;
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI) #if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
u8 *c2h_mem; u8 *c2h_mem;
u8 *allocated_c2h_mem; u8 *allocated_c2h_mem;
#endif #endif
}; };
#define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \ #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
do {\ do {\
@ -154,10 +152,6 @@ extern void rtw_evt_notify_isr(struct evt_priv *pevtpriv);
u8 p2p_protocol_wk_cmd(_adapter*padapter, int intCmdType ); u8 p2p_protocol_wk_cmd(_adapter*padapter, int intCmdType );
#endif //CONFIG_P2P #endif //CONFIG_P2P
#else
#include <ieee80211.h>
#endif /* CONFIG_RTL8711FW */
enum rtw_drvextra_cmd_id enum rtw_drvextra_cmd_id
{ {
NONE_WK_CID, NONE_WK_CID,

View file

@ -51,24 +51,8 @@ enum _EFUSE_DEF_TYPE {
}; };
/* E-Fuse */ /* E-Fuse */
#ifdef CONFIG_RTL8192D
#define EFUSE_MAP_SIZE 256
#endif
#ifdef CONFIG_RTL8192C
#define EFUSE_MAP_SIZE 128
#endif
#ifdef CONFIG_RTL8723A
#define EFUSE_MAP_SIZE 256
#endif
#ifdef CONFIG_RTL8188E
#define EFUSE_MAP_SIZE 512 #define EFUSE_MAP_SIZE 512
#endif
#ifdef CONFIG_RTL8188E
#define EFUSE_MAX_SIZE 256 #define EFUSE_MAX_SIZE 256
#else
#define EFUSE_MAX_SIZE 512
#endif
/* end of E-Fuse */ /* end of E-Fuse */
#define EFUSE_MAX_MAP_LEN 256 #define EFUSE_MAX_MAP_LEN 256

View file

@ -22,7 +22,6 @@
#include <drv_conf.h> #include <drv_conf.h>
#include <osdep_service.h> #include <osdep_service.h>
#ifndef CONFIG_RTL8711FW
#include <wlan_bssdef.h> #include <wlan_bssdef.h>
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26)) #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,26))
#include <asm/semaphore.h> #include <asm/semaphore.h>
@ -30,11 +29,6 @@
#include <linux/semaphore.h> #include <linux/semaphore.h>
#endif #endif
#include <linux/sem.h> #include <linux/sem.h>
#else
#include <wlan_bssdef.h>
#endif//CONFIG_RTL8711FW
#ifdef CONFIG_H2CLBK #ifdef CONFIG_H2CLBK
#include <h2clbk.h> #include <h2clbk.h>

View file

@ -361,10 +361,6 @@ struct xmit_frame
u8 agg_num; u8 agg_num;
#endif #endif
s8 pkt_offset; s8 pkt_offset;
#ifdef CONFIG_RTL8192D
u8 EMPktNum;
u16 EMPktLen[5];//The max value by HW
#endif
#endif #endif
#ifdef CONFIG_XMIT_ACK #ifdef CONFIG_XMIT_ACK

View file

@ -20,25 +20,8 @@
#ifndef __USB_HAL_H__ #ifndef __USB_HAL_H__
#define __USB_HAL_H__ #define __USB_HAL_H__
#ifdef CONFIG_RTL8192C
void rtl8192cu_set_hal_ops(_adapter * padapter);
#define hal_set_hal_ops rtl8192cu_set_hal_ops
#endif
#ifdef CONFIG_RTL8192D
void rtl8192du_set_hal_ops(_adapter * padapter);
#define hal_set_hal_ops rtl8192du_set_hal_ops
#endif
#ifdef CONFIG_RTL8723A
void rtl8723au_set_hal_ops(_adapter * padapter);
#define hal_set_hal_ops rtl8723au_set_hal_ops
#endif
#ifdef CONFIG_RTL8188E
void rtl8188eu_set_hal_ops(_adapter * padapter); void rtl8188eu_set_hal_ops(_adapter * padapter);
#define hal_set_hal_ops rtl8188eu_set_hal_ops #define hal_set_hal_ops rtl8188eu_set_hal_ops
#endif
#ifdef CONFIG_INTEL_PROXIM #ifdef CONFIG_INTEL_PROXIM
extern _adapter *rtw_usb_get_sw_pointer(void); extern _adapter *rtw_usb_get_sw_pointer(void);

View file

@ -53,46 +53,10 @@ enum{
#endif #endif
#include <usb_ops_linux.h> #include <usb_ops_linux.h>
#ifdef CONFIG_RTL8192C
void rtl8192cu_set_hw_type(_adapter *padapter);
#define hal_set_hw_type rtl8192cu_set_hw_type
void rtl8192cu_set_intf_ops(struct _io_ops *pops);
#define usb_set_intf_ops rtl8192cu_set_intf_ops
void rtl8192cu_recv_tasklet(void *priv);
void rtl8192cu_xmit_tasklet(void *priv);
#endif
#ifdef CONFIG_RTL8723A
void rtl8723au_set_hw_type(_adapter *padapter);
#define hal_set_hw_type rtl8723au_set_hw_type
void rtl8723au_set_intf_ops(struct _io_ops *pops);
#define usb_set_intf_ops rtl8723au_set_intf_ops
void rtl8192cu_recv_tasklet(void *priv);
void rtl8192cu_xmit_tasklet(void *priv);
#endif
#ifdef CONFIG_RTL8192D
void rtl8192du_set_hw_type(_adapter *padapter);
#define hal_set_hw_type rtl8192du_set_hw_type
void rtl8192du_set_intf_ops(struct _io_ops *pops);
#define usb_set_intf_ops rtl8192du_set_intf_ops
void rtl8192du_recv_tasklet(void *priv);
void rtl8192du_xmit_tasklet(void *priv);
#endif
#ifdef CONFIG_RTL8188E
void rtl8188eu_set_hw_type(_adapter *padapter); void rtl8188eu_set_hw_type(_adapter *padapter);
#define hal_set_hw_type rtl8188eu_set_hw_type #define hal_set_hw_type rtl8188eu_set_hw_type
void rtl8188eu_set_intf_ops(struct _io_ops *pops); void rtl8188eu_set_intf_ops(struct _io_ops *pops);
#define usb_set_intf_ops rtl8188eu_set_intf_ops #define usb_set_intf_ops rtl8188eu_set_intf_ops
#endif
/* /*
* Increase and check if the continual_urb_error of this @param dvobjprive is larger than MAX_CONTINUAL_URB_ERR * Increase and check if the continual_urb_error of this @param dvobjprive is larger than MAX_CONTINUAL_URB_ERR

View file

@ -44,20 +44,7 @@
#ifdef CONFIG_MP_INCLUDED #ifdef CONFIG_MP_INCLUDED
#include <rtw_mp.h> #include <rtw_mp.h>
#endif //#ifdef CONFIG_MP_INCLUDED #endif //#ifdef CONFIG_MP_INCLUDED
#ifdef CONFIG_RTL8192C
#include <rtl8192c_hal.h>
#endif
#ifdef CONFIG_RTL8192D
#include <rtl8192d_hal.h>
#endif
#ifdef CONFIG_RTL8723A
#include <rtl8723a_pg.h>
#include <rtl8723a_hal.h>
#include <rtw_bt_mp.h>
#endif
#ifdef CONFIG_RTL8188E
#include <rtl8188e_hal.h> #include <rtl8188e_hal.h>
#endif
#ifdef CONFIG_GSPI_HCI #ifdef CONFIG_GSPI_HCI
#include <gspi_ops.h> #include <gspi_ops.h>
#endif #endif
@ -8645,23 +8632,6 @@ static int rtw_mp_efuse_get(struct net_device *dev,
} }
else if (strcmp(tmp[0], "mac") == 0) else if (strcmp(tmp[0], "mac") == 0)
{ {
#ifdef CONFIG_RTL8192C
addr = 0x16; // EEPROM_MAC_ADDR
#endif
#ifdef CONFIG_RTL8192D
addr = 0x19;
#endif
#ifdef CONFIG_RTL8723A
#ifdef CONFIG_SDIO_HCI
addr = EEPROM_MAC_ADDR_8723AS;
#endif
#ifdef CONFIG_GSPI_HCI
addr = EEPROM_MAC_ADDR_8723AS;
#endif
#ifdef CONFIG_USB_HCI
addr = EEPROM_MAC_ADDR_8723AU;
#endif
#endif // CONFIG_RTL8723A
cnts = 6; cnts = 6;
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false); EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
@ -8694,15 +8664,6 @@ static int rtw_mp_efuse_get(struct net_device *dev,
} }
else if (strcmp(tmp[0], "vidpid") == 0) else if (strcmp(tmp[0], "vidpid") == 0)
{ {
#ifdef CONFIG_RTL8192C
addr = 0x0a; // EEPROM_VID
#endif
#ifdef CONFIG_RTL8192D
addr = 0x0c;
#endif
#ifdef CONFIG_RTL8723A
addr = EEPROM_VID_8723AU;
#endif
cnts = 4; cnts = 4;
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false); EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
@ -9036,12 +8997,8 @@ static int rtw_mp_efuse_set(struct net_device *dev,
for (jj=0, kk=0; jj<cnts; jj++, kk+=2) for (jj=0, kk=0; jj<cnts; jj++, kk+=2)
setdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk+1]); setdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk+1]);
#ifndef CONFIG_RTL8188E
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
#else
//Change to check TYPE_EFUSE_MAP_LEN ,beacuse 8188E raw 256,logic map over 256. //Change to check TYPE_EFUSE_MAP_LEN ,beacuse 8188E raw 256,logic map over 256.
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false); EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false);
#endif
if ((addr+cnts) > max_available_size) { if ((addr+cnts) > max_available_size) {
DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts); DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
err = -EFAULT; err = -EFAULT;
@ -9092,34 +9049,15 @@ static int rtw_mp_efuse_set(struct net_device *dev,
} }
//mac,00e04c871200 //mac,00e04c871200
#ifdef CONFIG_RTL8192C
addr = 0x16;
#endif
#ifdef CONFIG_RTL8192D
addr = 0x19;
#endif
#ifdef CONFIG_RTL8723A
#ifdef CONFIG_SDIO_HCI
addr = EEPROM_MAC_ADDR_8723AS;
#endif
#ifdef CONFIG_GSPI_HCI
addr = EEPROM_MAC_ADDR_8723AS;
#endif
#ifdef CONFIG_USB_HCI #ifdef CONFIG_USB_HCI
addr = EEPROM_MAC_ADDR_8723AU; addr = EEPROM_MAC_ADDR_88EU;
#endif
#ifdef CONFIG_SDIO_HCI
addr = EEPROM_MAC_ADDR_88ES;
#endif
#ifdef CONFIG_PCI_HCI
addr = EEPROM_MAC_ADDR_88EE;
#endif #endif
#endif // CONFIG_RTL8723A
#ifdef CONFIG_RTL8188E
#ifdef CONFIG_USB_HCI
addr = EEPROM_MAC_ADDR_88EU;
#endif
#ifdef CONFIG_SDIO_HCI
addr = EEPROM_MAC_ADDR_88ES;
#endif
#ifdef CONFIG_PCI_HCI
addr = EEPROM_MAC_ADDR_88EE;
#endif
#endif //#ifdef CONFIG_RTL8188E
cnts = strlen(tmp[1]); cnts = strlen(tmp[1]);
if (cnts%2) if (cnts%2)
@ -9148,12 +9086,8 @@ static int rtw_mp_efuse_set(struct net_device *dev,
{ {
setdata[jj] = key_2char2num(tmp[1][kk], tmp[1][kk+1]); setdata[jj] = key_2char2num(tmp[1][kk], tmp[1][kk+1]);
} }
#ifndef CONFIG_RTL8188E
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
#else
//Change to check TYPE_EFUSE_MAP_LEN ,beacuse 8188E raw 256,logic map over 256. //Change to check TYPE_EFUSE_MAP_LEN ,beacuse 8188E raw 256,logic map over 256.
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false); EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false);
#endif
if ((addr+cnts) > max_available_size) if ((addr+cnts) > max_available_size)
{ {
DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts); DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
@ -9177,23 +9111,12 @@ static int rtw_mp_efuse_set(struct net_device *dev,
} }
// pidvid,da0b7881 // pidvid,da0b7881
#ifdef CONFIG_RTL8192C #ifdef CONFIG_USB_HCI
addr = 0x0a; addr = EEPROM_VID_88EE;
#endif #endif
#ifdef CONFIG_RTL8192D #ifdef CONFIG_PCI_HCI
addr = 0x0c; addr = EEPROM_VID_88EE;
#endif #endif
#ifdef CONFIG_RTL8723A
addr = EEPROM_VID_8723AU;
#endif
#ifdef CONFIG_RTL8188E
#ifdef CONFIG_USB_HCI
addr = EEPROM_VID_88EE;
#endif
#ifdef CONFIG_PCI_HCI
addr = EEPROM_VID_88EE;
#endif
#endif //#ifdef CONFIG_RTL8188E
cnts = strlen(tmp[1]); cnts = strlen(tmp[1]);
if (cnts%2) if (cnts%2)
{ {
@ -9735,11 +9658,6 @@ static int rtw_mp_start(struct net_device *dev,
if (padapter->registrypriv.mp_mode ==0) if (padapter->registrypriv.mp_mode ==0)
{ {
#ifdef CONFIG_RTL8723A
DBG_88E("_rtw_mp_xmit_priv for Download BT patch FW\n");
_rtw_mp_xmit_priv(&padapter->xmitpriv);
#endif
padapter->registrypriv.mp_mode =1; padapter->registrypriv.mp_mode =1;
rtw_pm_set_ips(padapter,IPS_NONE); rtw_pm_set_ips(padapter,IPS_NONE);
@ -9768,11 +9686,6 @@ static int rtw_mp_stop(struct net_device *dev,
if (padapter->registrypriv.mp_mode ==1) if (padapter->registrypriv.mp_mode ==1)
{ {
#ifdef CONFIG_RTL8723A
DBG_88E("_rtw_mp_xmit_priv reinit for normal mode\n");
_rtw_mp_xmit_priv(&padapter->xmitpriv);
#endif
MPT_DeInitAdapter(padapter); MPT_DeInitAdapter(padapter);
padapter->registrypriv.mp_mode=0; padapter->registrypriv.mp_mode=0;
} }
@ -10273,16 +10186,7 @@ static int rtw_mp_thermal(struct net_device *dev,
{ {
u8 val; u8 val;
u16 bwrite=1; u16 bwrite=1;
u16 addr=EEPROM_THERMAL_METER_88E;
#if defined(CONFIG_RTL8192C) || defined(CONFIG_RTL8192D)
u16 addr=EEPROM_THERMAL_METER;
#endif
#ifdef CONFIG_RTL8723A
u16 addr=EEPROM_THERMAL_METER_8723A;
#endif
#if defined(CONFIG_RTL8188E)
u16 addr=EEPROM_THERMAL_METER_88E;
#endif
u16 cnt=1; u16 cnt=1;
u16 max_available_size=0; u16 max_available_size=0;
@ -10386,14 +10290,8 @@ static int rtw_mp_dump(struct net_device *dev,
else else
path_nums = 2; path_nums = 2;
for (path=0;path<path_nums;path++) for (path=0;path<path_nums;path++) {
{ for (i = 0; i < 0x34; i++) {
#ifdef CONFIG_RTL8192D
for (i = 0; i < 0x50; i++)
#else
for (i = 0; i < 0x34; i++)
#endif
{
value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff); value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff);
if (j%4==1) DBG_88E("0x%02x ",i); if (j%4==1) DBG_88E("0x%02x ",i);
DBG_88E(" 0x%08x ",value); DBG_88E(" 0x%08x ",value);
@ -10427,10 +10325,6 @@ static int rtw_mp_phypara(struct net_device *dev,
kfree(input); kfree(input);
if (!IS_HARDWARE_TYPE_8192D(padapter)) if (!IS_HARDWARE_TYPE_8192D(padapter))
return 0; return 0;
#ifdef CONFIG_RTL8192D
Hal_ProSetCrystalCap(padapter , valxcap);
#endif
sprintf(extra, "Set xcap=%d",valxcap); sprintf(extra, "Set xcap=%d",valxcap);
wrqu->length = strlen(extra) + 1; wrqu->length = strlen(extra) + 1;
return 0; return 0;
@ -10509,161 +10403,6 @@ static int rtw_mp_antBdiff(struct net_device *dev,
return 0; return 0;
} }
#ifdef CONFIG_RTL8723A
/* update Tx AGC offset */
static int rtw_mp_SetBT(struct net_device *dev,
struct iw_request_info *info,
union iwreq_data *wrqu, char *extra)
{
PADAPTER padapter = rtw_netdev_priv(dev);
BT_REQ_CMD BtReq;
PMPT_CONTEXT pMptCtx=&(padapter->mppriv.MptCtx);
PBT_RSP_CMD pBtRsp=(PBT_RSP_CMD)&pMptCtx->mptOutBuf[0];
char input[128];
char *pch, *ptmp, *token, *tmp[2]={0x00,0x00};
u8 setdata[100];
u16 testmode=1,ready=1,trxparam=1,setgen=1,getgen=1,testctrl=1,testbt=1;
u32 i,ii,jj,kk,cnts,status;
if (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))
return -EFAULT;
if (strlen(extra)<1) return -EFAULT;
DBG_88E("%s:iwpriv in=%s\n", __func__, extra);
ready = strncmp(extra, "ready", 5);
testmode = strncmp(extra, "testmode", 8); // strncmp true is 0
trxparam = strncmp(extra, "trxparam", 8);
setgen = strncmp(extra, "setgen", 6);
getgen = strncmp(extra, "getgen", 6);
testctrl = strncmp(extra, "testctrl", 8);
testbt = strncmp(extra, "testbt", 6);
if (strncmp(extra, "dlfw", 4) == 0)
{
status = rtl8723a_FirmwareDownload(padapter);
if (status==_SUCCESS)
{
_rtw_memset(extra,'\0', wrqu->data.length);
DBG_88E("%s: download FW %s\n", __func__, (_FAIL==status) ? "FAIL!":"OK.");
sprintf(extra, "download FW %s", (_FAIL==status) ? "FAIL!":"OK.");
wrqu->data.length = strlen(extra) + 1;
}
goto exit;
}
if (testbt==0)
{
BtReq.opCodeVer=1;
BtReq.OpCode=6;
BtReq.paraLength=cnts/2;
goto todo;
}
if (ready==0)
{
BtReq.opCodeVer=1;
BtReq.OpCode=0;
BtReq.paraLength=0;
goto todo;
}
DBG_88E("%s:after strncmp\n", __func__);
pch = extra;
i = 0;
while ((token = strsep(&pch, ",")) != NULL)
{
if (i > 1) break;
tmp[i] = token;
i++;
}
if ((tmp[0]==NULL) && (tmp[1]==NULL))
{
return -EFAULT;
}
else
{
cnts = strlen(tmp[1]);
if (cnts<1) return -EFAULT;
DBG_88E("%s: cnts=%d\n", __func__, cnts);
DBG_88E("%s: data=%s\n", __func__, tmp[1]);
for (jj=0, kk=0; jj<cnts; jj++, kk+=2)
{
BtReq.pParamStart[jj] = key_2char2num(tmp[1][kk], tmp[1][kk+1]);
DBG_88E("BtReq.pParamStart[%d]=%x\n",ii,BtReq.pParamStart[jj]);
}
}
if (testmode==0)
{
BtReq.opCodeVer=1;
BtReq.OpCode=1;
BtReq.paraLength=1;
}
if (trxparam==0)
{
BtReq.opCodeVer=1;
BtReq.OpCode=2;
BtReq.paraLength=cnts/2;
}
if (setgen==0)
{
DBG_88E("%s: BT_SET_GENERAL\n", __func__);
BtReq.opCodeVer=1;
BtReq.OpCode=3; //BT_SET_GENERAL 3
BtReq.paraLength=cnts/2;
}
if (getgen==0)
{
DBG_88E("%s: BT_GET_GENERAL\n", __func__);
BtReq.opCodeVer=1;
BtReq.OpCode=4; //BT_GET_GENERAL 4
BtReq.paraLength=cnts/2;
}
if (testctrl==0)
{
DBG_88E("%s: BT_TEST_CTRL\n", __func__);
BtReq.opCodeVer=1;
BtReq.OpCode=5; //BT_TEST_CTRL 5
BtReq.paraLength=cnts/2;
}
DBG_88E("%s: BtReq.paraLength =%d\n", __func__, BtReq.paraLength);
DBG_88E("opCodeVer=%d,OpCode=%d\n",BtReq.opCodeVer,BtReq.OpCode);
if (BtReq.paraLength<1)
goto todo;
for (i=0;i<BtReq.paraLength;i++)
{
DBG_88E("%s: BtReq.pParamStart[ %d ] = 0x%02x\n", __func__,i,BtReq.pParamStart[i]);
}
todo:
_rtw_memset(extra,'\0', wrqu->data.length);
mptbt_BtControlProcess(padapter,&BtReq);
for (i=4; i<pMptCtx->mptOutLen; i++)
{
DBG_88E("0x%x ", pMptCtx->mptOutBuf[i]);
sprintf(extra, "%s 0x%x ", extra, pMptCtx->mptOutBuf[i]);
}
exit:
wrqu->data.length = strlen(extra) + 1;
return status;
}
#endif //#ifdef CONFIG_RTL8723A
static int rtw_mp_set(struct net_device *dev, static int rtw_mp_set(struct net_device *dev,
struct iw_request_info *info, struct iw_request_info *info,
union iwreq_data *wdata, char *extra) union iwreq_data *wdata, char *extra)
@ -10838,17 +10577,10 @@ static int rtw_mp_get(struct net_device *dev,
DBG_88E("set case efuse set\n"); DBG_88E("set case efuse set\n");
rtw_mp_efuse_set (dev,info,wdata,extra); rtw_mp_efuse_set (dev,info,wdata,extra);
break; break;
#ifdef CONFIG_RTL8723A
case MP_SetBT:
DBG_88E("set MP_SetBT\n");
rtw_mp_SetBT (dev,info,wdata,extra);
break;
#endif
} }
rtw_msleep_os(10); //delay 5ms for sending pkt before exit adb shell operation rtw_msleep_os(10); //delay 5ms for sending pkt before exit adb shell operation
return 0; return 0;
} }
#endif //#if defined(CONFIG_MP_INCLUDED) && defined(CONFIG_MP_IWPRIV_SUPPORT) #endif //#if defined(CONFIG_MP_INCLUDED) && defined(CONFIG_MP_IWPRIV_SUPPORT)
@ -11534,21 +11266,8 @@ static int rtw_widi_set_probe_request(struct net_device *dev,
} }
#endif // CONFIG_INTEL_WIDI #endif // CONFIG_INTEL_WIDI
#ifdef CONFIG_RTL8723A
#include <rtl8723a_hal.h>
//extern u8 _InitPowerOn(PADAPTER padapter);
//extern s32 rtl8723a_FirmwareDownload(PADAPTER padapter);
extern s32 FillH2CCmd(PADAPTER padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer);
#endif
#ifdef CONFIG_MAC_LOOPBACK_DRIVER #ifdef CONFIG_MAC_LOOPBACK_DRIVER
#ifdef CONFIG_RTL8723A
extern void rtl8723a_cal_txdesc_chksum(struct tx_desc *ptxdesc);
#define cal_txdesc_chksum rtl8723a_cal_txdesc_chksum
extern void rtl8723a_fill_default_txdesc(struct xmit_frame *pxmitframe, u8 *pbuf);
#define fill_default_txdesc rtl8723a_fill_default_txdesc
#elif defined(CONFIG_RTL8188E)
#include <rtl8188e_hal.h> #include <rtl8188e_hal.h>
extern void rtl8188e_cal_txdesc_chksum(struct tx_desc *ptxdesc); extern void rtl8188e_cal_txdesc_chksum(struct tx_desc *ptxdesc);
#define cal_txdesc_chksum rtl8188e_cal_txdesc_chksum #define cal_txdesc_chksum rtl8188e_cal_txdesc_chksum
@ -11556,7 +11275,6 @@ extern void rtl8188e_cal_txdesc_chksum(struct tx_desc *ptxdesc);
extern void rtl8188es_fill_default_txdesc(struct xmit_frame *pxmitframe, u8 *pbuf); extern void rtl8188es_fill_default_txdesc(struct xmit_frame *pxmitframe, u8 *pbuf);
#define fill_default_txdesc rtl8188es_fill_default_txdesc #define fill_default_txdesc rtl8188es_fill_default_txdesc
#endif // CONFIG_SDIO_HCI #endif // CONFIG_SDIO_HCI
#endif // CONFIG_RTL8188E
static s32 initLoopback(PADAPTER padapter) static s32 initLoopback(PADAPTER padapter)
{ {
@ -12134,88 +11852,6 @@ static int rtw_test(
} }
#endif #endif
#ifdef CONFIG_RTL8723A
#ifdef CONFIG_BT_COEXIST
#define GET_BT_INFO(padapter) (&GET_HAL_DATA(padapter)->BtInfo)
if (strcmp(pch, "btdbg") == 0)
{
DBG_88E("===== BT debug information Start =====\n");
DBG_88E("WIFI status=\n");
DBG_88E("BT status=\n");
DBG_88E("BT profile=\n");
DBG_88E("WIFI RSSI=%d\n", GET_HAL_DATA(padapter)->dmpriv.UndecoratedSmoothedPWDB);
DBG_88E("BT RSSI=\n");
DBG_88E("coex mechanism=\n");
DBG_88E("BT counter TX/RX=/\n");
DBG_88E("0x880=0x%08x\n", rtw_read32(padapter, 0x880));
DBG_88E("0x6c0=0x%08x\n", rtw_read32(padapter, 0x6c0));
DBG_88E("0x6c4=0x%08x\n", rtw_read32(padapter, 0x6c4));
DBG_88E("0x6c8=0x%08x\n", rtw_read32(padapter, 0x6c8));
DBG_88E("0x6cc=0x%08x\n", rtw_read32(padapter, 0x6cc));
DBG_88E("0x778=0x%08x\n", rtw_read32(padapter, 0x778));
DBG_88E("0xc50=0x%08x\n", rtw_read32(padapter, 0xc50));
BT_DisplayBtCoexInfo(padapter);
DBG_88E("===== BT debug information End =====\n");
}
if (strcmp(pch, "bton") == 0)
{
PBT30Info pBTInfo = GET_BT_INFO(padapter);
PBT_MGNT pBtMgnt = &pBTInfo->BtMgnt;
pBtMgnt->ExtConfig.bManualControl = false;
}
if (strcmp(pch, "btoff") == 0)
{
PBT30Info pBTInfo = GET_BT_INFO(padapter);
PBT_MGNT pBtMgnt = &pBTInfo->BtMgnt;
pBtMgnt->ExtConfig.bManualControl = true;
}
#endif // CONFIG_BT_COEXIST
if (strcmp(pch, "h2c") == 0)
{
u8 param[6];
u8 count = 0;
u32 tmp;
u8 i;
u32 pos;
s32 ret;
do {
pch = strsep(&ptmp, delim);
if ((pch == NULL) || (strlen(pch) == 0))
break;
sscanf(pch, "%x", &tmp);
param[count++] = (u8)tmp;
} while (count < 6);
if (count == 0) {
rtw_mfree(pbuf, len);
DBG_88E("%s: parameter error(level 2)!\n", __func__);
return -EFAULT;
}
ret = FillH2CCmd(padapter, param[0], count-1, &param[1]);
pos = sprintf(extra, "H2C ID=%x content=", param[0]);
for (i=0; i<count; i++) {
pos += sprintf(extra+pos, "%x,", param[i]);
}
extra[pos] = 0;
pos--;
pos += sprintf(extra+pos, " %s", ret==_FAIL?"FAIL":"OK");
wrqu->data.length = strlen(extra) + 1;
}
#endif // CONFIG_RTL8723A
rtw_mfree(pbuf, len); rtw_mfree(pbuf, len);
return 0; return 0;
} }
@ -12417,9 +12053,6 @@ static const struct iw_priv_args rtw_private_args[] = {
{ MP_QueryDrvStats, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_drvquery" }, { MP_QueryDrvStats, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_drvquery" },
{ MP_IOCTL, IW_PRIV_TYPE_CHAR | 1024, 0, "mp_ioctl"}, // mp_ioctl { MP_IOCTL, IW_PRIV_TYPE_CHAR | 1024, 0, "mp_ioctl"}, // mp_ioctl
{ MP_SetRFPathSwh, IW_PRIV_TYPE_CHAR | 1024, 0, "mp_setrfpath" }, { MP_SetRFPathSwh, IW_PRIV_TYPE_CHAR | 1024, 0, "mp_setrfpath" },
#ifdef CONFIG_RTL8723A
{ MP_SetBT, IW_PRIV_TYPE_CHAR | 1024, IW_PRIV_TYPE_CHAR | IW_PRIV_SIZE_MASK, "mp_setbt" },
#endif
{ CTA_TEST, IW_PRIV_TYPE_CHAR | 1024, 0, "cta_test"}, { CTA_TEST, IW_PRIV_TYPE_CHAR | 1024, 0, "cta_test"},
}; };

View file

@ -105,130 +105,6 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf);
#define USB_VENDER_ID_REALTEK 0x0BDA #define USB_VENDER_ID_REALTEK 0x0BDA
/* DID_USB_v916_20130116 */ /* DID_USB_v916_20130116 */
#define RTL8192C_USB_IDS \
/*=== Realtek demoboard ===*/ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8191)},/* Default ID */ \
/****** 8188CUS ********/ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8176)},/* 8188cu 1*1 dongole */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8170)},/* 8188CE-VAU USB minCard */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817E)},/* 8188CE-VAU USB minCard */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817A)},/* 8188cu Slim Solo */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817B)},/* 8188cu Slim Combo */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817D)},/* 8188RU High-power USB Dongle */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8754)},/* 8188 Combo for BC4 */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817F)},/* 8188RU */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x818A)},/* RTL8188CUS-VL */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x018A)},/* RTL8188CTV */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x17C0)}, /* RTK demoboard - USB-N10E */ \
/****** 8192CUS ********/ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8177)},/* 8191cu 1*2 */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8178)},/* 8192cu 2*2 */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x817C)},/* 8192CE-VAU USB minCard */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8191)},/* 8192CU 2*2 */ \
{USB_DEVICE(0x1058, 0x0631)},/* Alpha, 8192CU */ \
/*=== Customer ID ===*/ \
/****** 8188CUS Dongle ********/ \
{USB_DEVICE(0x2019, 0xED17)},/* PCI - Edimax */ \
{USB_DEVICE(0x0DF6, 0x0052)},/* Sitecom - Edimax */ \
{USB_DEVICE(0x7392, 0x7811)},/* Edimax - Edimax */ \
{USB_DEVICE(0x07B8, 0x8189)},/* Abocom - Abocom */ \
{USB_DEVICE(0x0EB0, 0x9071)},/* NO Brand - Etop */ \
{USB_DEVICE(0x06F8, 0xE033)},/* Hercules - Edimax */ \
{USB_DEVICE(0x103C, 0x1629)},/* HP - Lite-On ,8188CUS Slim Combo */ \
{USB_DEVICE(0x2001, 0x3308)},/* D-Link - Alpha */ \
{USB_DEVICE(0x050D, 0x1102)},/* Belkin - Edimax */ \
{USB_DEVICE(0x2019, 0xAB2A)},/* Planex - Abocom */ \
{USB_DEVICE(0x20F4, 0x648B)},/* TRENDnet - Cameo */ \
{USB_DEVICE(0x4855, 0x0090)},/* - Feixun */ \
{USB_DEVICE(0x13D3, 0x3357)},/* - AzureWave */ \
{USB_DEVICE(0x0DF6, 0x005C)},/* Sitecom - Edimax */ \
{USB_DEVICE(0x0BDA, 0x5088)},/* Thinkware - CC&C */ \
{USB_DEVICE(0x4856, 0x0091)},/* NetweeN - Feixun */ \
{USB_DEVICE(0x0846, 0x9041)}, /* Netgear - Cameo */ \
{USB_DEVICE(0x2019, 0x4902)},/* Planex - Etop */ \
{USB_DEVICE(0x2019, 0xAB2E)},/* SW-WF02-AD15 -Abocom */ \
{USB_DEVICE(0x2001, 0x330B)}, /* D-LINK - T&W */ \
{USB_DEVICE(0xCDAB, 0x8010)}, /* - - compare */ \
{USB_DEVICE(0x0B05, 0x17BA)}, /* ASUS - Edimax */ \
{USB_DEVICE(0x0BDA, 0x1E1E)}, /* Intel - - */ \
{USB_DEVICE(0x04BB, 0x094c)}, /* I-O DATA - Edimax */ \
/****** 8188CTV ********/ \
{USB_DEVICE(0xCDAB, 0x8011)}, /* - - compare */ \
{USB_DEVICE(0x0BDA, 0x0A8A)}, /* Sony - Foxconn */ \
/****** 8188 RU ********/ \
{USB_DEVICE(0x0BDA, 0x317F)},/* Netcore,Netcore */ \
/****** 8188CE-VAU ********/ \
{USB_DEVICE(0x13D3, 0x3359)},/* - Azwave */ \
{USB_DEVICE(0x13D3, 0x3358)},/* - Azwave */ \
/****** 8188CUS Slim Solo********/ \
{USB_DEVICE(0x04F2, 0xAFF7)},/* XAVI - XAVI */ \
{USB_DEVICE(0x04F2, 0xAFF9)},/* XAVI - XAVI */ \
{USB_DEVICE(0x04F2, 0xAFFA)},/* XAVI - XAVI */ \
/****** 8188CUS Slim Combo ********/ \
{USB_DEVICE(0x04F2, 0xAFF8)},/* XAVI - XAVI */ \
{USB_DEVICE(0x04F2, 0xAFFB)},/* XAVI - XAVI */ \
{USB_DEVICE(0x04F2, 0xAFFC)},/* XAVI - XAVI */ \
{USB_DEVICE(0x2019, 0x1201)},/* Planex - Vencer */ \
/****** 8192CUS Dongle ********/ \
{USB_DEVICE(0x2001, 0x3307)},/* D-Link - Cameo */ \
{USB_DEVICE(0x2001, 0x330A)},/* D-Link - Alpha */ \
{USB_DEVICE(0x2001, 0x3309)},/* D-Link - Alpha */ \
{USB_DEVICE(0x0586, 0x341F)},/* Zyxel - Abocom */ \
{USB_DEVICE(0x7392, 0x7822)},/* Edimax - Edimax */ \
{USB_DEVICE(0x2019, 0xAB2B)},/* Planex - Abocom */ \
{USB_DEVICE(0x07B8, 0x8178)},/* Abocom - Abocom */ \
{USB_DEVICE(0x07AA, 0x0056)},/* ATKK - Gemtek */ \
{USB_DEVICE(0x4855, 0x0091)},/* - Feixun */ \
{USB_DEVICE(0x050D, 0x2102)},/* Belkin - Sercomm */ \
{USB_DEVICE(0x050D, 0x2103)},/* Belkin - Edimax */ \
{USB_DEVICE(0x20F4, 0x624D)},/* TRENDnet */ \
{USB_DEVICE(0x0DF6, 0x0061)},/* Sitecom - Edimax */ \
{USB_DEVICE(0x0B05, 0x17AB)},/* ASUS - Edimax */ \
{USB_DEVICE(0x0846, 0x9021)},/* Netgear - Sercomm */ \
{USB_DEVICE(0x0846, 0xF001)}, /* Netgear - Sercomm */ \
{USB_DEVICE(0x0E66, 0x0019)},/* Hawking,Edimax */ \
{USB_DEVICE(0x0E66, 0x0020)}, /* Hawking - Edimax */ \
{USB_DEVICE(0x050D, 0x1004)}, /* Belkin - Edimax */ \
{USB_DEVICE(0x0BDA, 0x2E2E)}, /* Intel - - */ \
{USB_DEVICE(0x2357, 0x0100)}, /* TP-Link - TP-Link */ \
{USB_DEVICE(0x06F8, 0xE035)}, /* Hercules - Edimax */ \
{USB_DEVICE(0x04BB, 0x0950)}, /* IO-DATA - Edimax */ \
{USB_DEVICE(0x0DF6, 0x0070)}, /* Sitecom - Edimax */ \
{USB_DEVICE(0x0789, 0x016D)}, /* LOGITEC - Edimax */ \
/****** 8192CE-VAU ********/ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8186)},/* Intel-Xavi( Azwave) */
#define RTL8192D_USB_IDS \
/*=== Realtek demoboard ===*/ \
/****** 8192DU ********/ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8193)},/* 8192DU-VC */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8194)},/* 8192DU-VS */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8111)},/* Realtek 5G dongle for WiFi Display */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x0193)},/* 8192DE-VAU */ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8171)},/* 8192DU-VC */ \
/*=== Customer ID ===*/ \
/****** 8192DU-VC ********/ \
{USB_DEVICE(0x2019, 0xAB2C)},/* PCI - Abocm */ \
{USB_DEVICE(0x2019, 0x4903)},/* PCI - ETOP */ \
{USB_DEVICE(0x2019, 0x4904)},/* PCI - ETOP */ \
{USB_DEVICE(0x07B8, 0x8193)},/* Abocom - Abocom */ \
/****** 8192DU-VS ********/ \
{USB_DEVICE(0x20F4, 0x664B)}, /* TRENDnet - Cameo */ \
{USB_DEVICE(0x04DD, 0x954F)}, /* Sharp */ \
{USB_DEVICE(0x04DD, 0x96A6)}, /* Sharp */ \
{USB_DEVICE(0x050D, 0x110A)}, /* Belkin - Edimax */ \
{USB_DEVICE(0x050D, 0x1105)}, /* Belkin - Edimax */ \
{USB_DEVICE(0x050D, 0x120A)}, /* Belkin - Edimax */ \
{USB_DEVICE(0x1668, 0x8102)}, /* - */ \
{USB_DEVICE(0x0BDA, 0xE194)}, /* - Edimax */ \
/****** 8192DU-WiFi Display Dongle ********/ \
{USB_DEVICE(0x2019, 0xAB2D)},/* Planex - Abocom ,5G dongle for WiFi Display */
#define RTL8723A_USB_IDS \
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x8724,0xff,0xff,0xff)}, /* 8723AU 1*1 */ \
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x1724,0xff,0xff,0xff)}, /* 8723AU 1*1 */ \
{USB_DEVICE_AND_INTERFACE_INFO(USB_VENDER_ID_REALTEK, 0x0724,0xff,0xff,0xff)}, /* 8723AU 1*1 */
#define RTL8188E_USB_IDS \ #define RTL8188E_USB_IDS \
/*=== Realtek demoboard ===*/ \ /*=== Realtek demoboard ===*/ \
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8179)}, /* 8188EUS */ \ {USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8179)}, /* 8188EUS */ \
@ -237,27 +113,7 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf);
/****** 8188EUS ********/ \ /****** 8188EUS ********/ \
{USB_DEVICE(0x8179, 0x07B8)}, /* Abocom - Abocom */ {USB_DEVICE(0x8179, 0x07B8)}, /* Abocom - Abocom */
#ifndef CONFIG_RTL8192C
#undef RTL8192C_USB_IDS
#define RTL8192C_USB_IDS
#endif
#ifndef CONFIG_RTL8192D
#undef RTL8192D_USB_IDS
#define RTL8192D_USB_IDS
#endif
#ifndef CONFIG_RTL8723A
#undef RTL8723A_USB_IDS
#define RTL8723A_USB_IDS
#endif
#ifndef CONFIG_RTL8188E
#undef RTL8188E_USB_IDS
#define RTL8188E_USB_IDS
#endif
static struct usb_device_id rtw_usb_id_tbl[] ={ static struct usb_device_id rtw_usb_id_tbl[] ={
RTL8192C_USB_IDS
RTL8192D_USB_IDS
RTL8723A_USB_IDS
RTL8188E_USB_IDS RTL8188E_USB_IDS
{} /* Terminating entry */ {} /* Terminating entry */
}; };
@ -287,78 +143,6 @@ struct rtw_usb_drv {
#endif #endif
}; };
#ifdef CONFIG_RTL8192C
static struct usb_device_id rtl8192c_usb_id_tbl[] ={
RTL8192C_USB_IDS
{} /* Terminating entry */
};
struct rtw_usb_drv rtl8192c_usb_drv = {
.usbdrv.name = (char*)"rtl8192cu",
.usbdrv.probe = rtw_drv_init,
.usbdrv.disconnect = rtw_dev_remove,
.usbdrv.id_table = rtl8192c_usb_id_tbl,
.usbdrv.suspend = rtw_suspend,
.usbdrv.resume = rtw_resume,
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 22))
.usbdrv.reset_resume = rtw_resume,
#endif
#ifdef CONFIG_AUTOSUSPEND
.usbdrv.supports_autosuspend = 1,
#endif
};
static struct rtw_usb_drv *usb_drv = &rtl8192c_usb_drv;
#endif /* CONFIG_RTL8192C */
#ifdef CONFIG_RTL8192D
static struct usb_device_id rtl8192d_usb_id_tbl[] ={
RTL8192D_USB_IDS
{} /* Terminating entry */
};
struct rtw_usb_drv rtl8192d_usb_drv = {
.usbdrv.name = (char*)"rtl8192du",
.usbdrv.probe = rtw_drv_init,
.usbdrv.disconnect = rtw_dev_remove,
.usbdrv.id_table = rtl8192d_usb_id_tbl,
.usbdrv.suspend = rtw_suspend,
.usbdrv.resume = rtw_resume,
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 22))
.usbdrv.reset_resume = rtw_resume,
#endif
#ifdef CONFIG_AUTOSUSPEND
.usbdrv.supports_autosuspend = 1,
#endif
};
static struct rtw_usb_drv *usb_drv = &rtl8192d_usb_drv;
#endif /* CONFIG_RTL8192D */
#ifdef CONFIG_RTL8723A
static struct usb_device_id rtl8723a_usb_id_tbl[] ={
RTL8723A_USB_IDS
{} /* Terminating entry */
};
struct rtw_usb_drv rtl8723a_usb_drv = {
.usbdrv.name = (char*)"rtl8723au",
.usbdrv.probe = rtw_drv_init,
.usbdrv.disconnect = rtw_dev_remove,
.usbdrv.id_table = rtl8723a_usb_id_tbl,
.usbdrv.suspend = rtw_suspend,
.usbdrv.resume = rtw_resume,
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 22))
.usbdrv.reset_resume = rtw_resume,
#endif
#ifdef CONFIG_AUTOSUSPEND
.usbdrv.supports_autosuspend = 1,
#endif
};
static struct rtw_usb_drv *usb_drv = &rtl8723a_usb_drv;
#endif /* CONFIG_RTL8723A */
#ifdef CONFIG_RTL8188E
static struct usb_device_id rtl8188e_usb_id_tbl[] ={ static struct usb_device_id rtl8188e_usb_id_tbl[] ={
RTL8188E_USB_IDS RTL8188E_USB_IDS
{} /* Terminating entry */ {} /* Terminating entry */
@ -380,7 +164,6 @@ static struct rtw_usb_drv rtl8188e_usb_drv = {
}; };
static struct rtw_usb_drv *usb_drv = &rtl8188e_usb_drv; static struct rtw_usb_drv *usb_drv = &rtl8188e_usb_drv;
#endif /* CONFIG_RTL8188E */
static inline int RT_usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd) static inline int RT_usb_endpoint_dir_in(const struct usb_endpoint_descriptor *epd)
{ {