mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
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:
parent
1c5cb9ca00
commit
c5e461c221
18 changed files with 202 additions and 1200 deletions
|
@ -44,20 +44,7 @@
|
|||
#ifdef CONFIG_MP_INCLUDED
|
||||
#include <rtw_mp.h>
|
||||
#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>
|
||||
#endif
|
||||
#ifdef CONFIG_GSPI_HCI
|
||||
#include <gspi_ops.h>
|
||||
#endif
|
||||
|
@ -8645,23 +8632,6 @@ static int rtw_mp_efuse_get(struct net_device *dev,
|
|||
}
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
#ifdef CONFIG_RTL8192C
|
||||
addr = 0x0a; // EEPROM_VID
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8192D
|
||||
addr = 0x0c;
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8723A
|
||||
addr = EEPROM_VID_8723AU;
|
||||
#endif
|
||||
cnts = 4;
|
||||
|
||||
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)
|
||||
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.
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false);
|
||||
#endif
|
||||
if ((addr+cnts) > max_available_size) {
|
||||
DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
|
||||
err = -EFAULT;
|
||||
|
@ -9092,34 +9049,15 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
|||
}
|
||||
|
||||
//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
|
||||
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 // 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]);
|
||||
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]);
|
||||
}
|
||||
#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.
|
||||
EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false);
|
||||
#endif
|
||||
if ((addr+cnts) > max_available_size)
|
||||
{
|
||||
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
|
||||
#ifdef CONFIG_RTL8192C
|
||||
addr = 0x0a;
|
||||
#ifdef CONFIG_USB_HCI
|
||||
addr = EEPROM_VID_88EE;
|
||||
#endif
|
||||
#ifdef CONFIG_RTL8192D
|
||||
addr = 0x0c;
|
||||
#ifdef CONFIG_PCI_HCI
|
||||
addr = EEPROM_VID_88EE;
|
||||
#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]);
|
||||
if (cnts%2)
|
||||
{
|
||||
|
@ -9735,11 +9658,6 @@ static int rtw_mp_start(struct net_device *dev,
|
|||
|
||||
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;
|
||||
|
||||
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)
|
||||
{
|
||||
#ifdef CONFIG_RTL8723A
|
||||
DBG_88E("_rtw_mp_xmit_priv reinit for normal mode\n");
|
||||
_rtw_mp_xmit_priv(&padapter->xmitpriv);
|
||||
#endif
|
||||
|
||||
MPT_DeInitAdapter(padapter);
|
||||
padapter->registrypriv.mp_mode=0;
|
||||
}
|
||||
|
@ -10273,16 +10186,7 @@ static int rtw_mp_thermal(struct net_device *dev,
|
|||
{
|
||||
u8 val;
|
||||
u16 bwrite=1;
|
||||
|
||||
#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 addr=EEPROM_THERMAL_METER_88E;
|
||||
|
||||
u16 cnt=1;
|
||||
u16 max_available_size=0;
|
||||
|
@ -10386,14 +10290,8 @@ static int rtw_mp_dump(struct net_device *dev,
|
|||
else
|
||||
path_nums = 2;
|
||||
|
||||
for (path=0;path<path_nums;path++)
|
||||
{
|
||||
#ifdef CONFIG_RTL8192D
|
||||
for (i = 0; i < 0x50; i++)
|
||||
#else
|
||||
for (i = 0; i < 0x34; i++)
|
||||
#endif
|
||||
{
|
||||
for (path=0;path<path_nums;path++) {
|
||||
for (i = 0; i < 0x34; i++) {
|
||||
value = rtw_hal_read_rfreg(padapter, path, i, 0xffffffff);
|
||||
if (j%4==1) DBG_88E("0x%02x ",i);
|
||||
DBG_88E(" 0x%08x ",value);
|
||||
|
@ -10427,10 +10325,6 @@ static int rtw_mp_phypara(struct net_device *dev,
|
|||
kfree(input);
|
||||
if (!IS_HARDWARE_TYPE_8192D(padapter))
|
||||
return 0;
|
||||
#ifdef CONFIG_RTL8192D
|
||||
Hal_ProSetCrystalCap(padapter , valxcap);
|
||||
#endif
|
||||
|
||||
sprintf(extra, "Set xcap=%d",valxcap);
|
||||
wrqu->length = strlen(extra) + 1;
|
||||
return 0;
|
||||
|
@ -10509,161 +10403,6 @@ static int rtw_mp_antBdiff(struct net_device *dev,
|
|||
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,
|
||||
struct iw_request_info *info,
|
||||
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");
|
||||
rtw_mp_efuse_set (dev,info,wdata,extra);
|
||||
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
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
#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
|
||||
|
||||
#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_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>
|
||||
extern void rtl8188e_cal_txdesc_chksum(struct tx_desc *ptxdesc);
|
||||
#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);
|
||||
#define fill_default_txdesc rtl8188es_fill_default_txdesc
|
||||
#endif // CONFIG_SDIO_HCI
|
||||
#endif // CONFIG_RTL8188E
|
||||
|
||||
static s32 initLoopback(PADAPTER padapter)
|
||||
{
|
||||
|
@ -12134,88 +11852,6 @@ static int rtw_test(
|
|||
}
|
||||
#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, ¶m[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);
|
||||
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_IOCTL, IW_PRIV_TYPE_CHAR | 1024, 0, "mp_ioctl"}, // mp_ioctl
|
||||
{ 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"},
|
||||
};
|
||||
|
||||
|
|
|
@ -105,130 +105,6 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf);
|
|||
#define USB_VENDER_ID_REALTEK 0x0BDA
|
||||
|
||||
/* 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 \
|
||||
/*=== Realtek demoboard ===*/ \
|
||||
{USB_DEVICE(USB_VENDER_ID_REALTEK, 0x8179)}, /* 8188EUS */ \
|
||||
|
@ -237,27 +113,7 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf);
|
|||
/****** 8188EUS ********/ \
|
||||
{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[] ={
|
||||
RTL8192C_USB_IDS
|
||||
RTL8192D_USB_IDS
|
||||
RTL8723A_USB_IDS
|
||||
RTL8188E_USB_IDS
|
||||
{} /* Terminating entry */
|
||||
};
|
||||
|
@ -287,78 +143,6 @@ struct rtw_usb_drv {
|
|||
#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[] ={
|
||||
RTL8188E_USB_IDS
|
||||
{} /* Terminating entry */
|
||||
|
@ -380,7 +164,6 @@ static struct rtw_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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue