mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-25 14:03:40 +00:00
rtl8188eu: Fix all W=1 warnings
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
5c8ff88003
commit
fb786d0283
29 changed files with 217 additions and 507 deletions
|
@ -429,7 +429,7 @@ thread_return rtw_cmd_thread(thread_context context)
|
||||||
{
|
{
|
||||||
u8 ret;
|
u8 ret;
|
||||||
struct cmd_obj *pcmd;
|
struct cmd_obj *pcmd;
|
||||||
u8 *pcmdbuf, *prspbuf;
|
u8 *pcmdbuf;
|
||||||
u8 (*cmd_hdl)(_adapter *padapter, u8* pbuf);
|
u8 (*cmd_hdl)(_adapter *padapter, u8* pbuf);
|
||||||
void (*pcmd_callback)(_adapter *dev, struct cmd_obj *pcmd);
|
void (*pcmd_callback)(_adapter *dev, struct cmd_obj *pcmd);
|
||||||
PADAPTER padapter = (PADAPTER)context;
|
PADAPTER padapter = (PADAPTER)context;
|
||||||
|
@ -440,7 +440,6 @@ _func_enter_;
|
||||||
thread_enter("RTW_CMD_THREAD");
|
thread_enter("RTW_CMD_THREAD");
|
||||||
|
|
||||||
pcmdbuf = pcmdpriv->cmd_buf;
|
pcmdbuf = pcmdpriv->cmd_buf;
|
||||||
prspbuf = pcmdpriv->rsp_buf;
|
|
||||||
|
|
||||||
pcmdpriv->cmdthd_running=true;
|
pcmdpriv->cmdthd_running=true;
|
||||||
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
|
_rtw_up_sema(&pcmdpriv->terminate_cmdthread_sema);
|
||||||
|
@ -1044,7 +1043,6 @@ void rtw_getbbrfreg_cmdrsp_callback(_adapter* padapter, struct cmd_obj *pcmd)
|
||||||
{
|
{
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
//rtw_free_cmd_obj(pcmd);
|
|
||||||
rtw_mfree((unsigned char*) pcmd->parmbuf, pcmd->cmdsz);
|
rtw_mfree((unsigned char*) pcmd->parmbuf, pcmd->cmdsz);
|
||||||
rtw_mfree((unsigned char*) pcmd, sizeof(struct cmd_obj));
|
rtw_mfree((unsigned char*) pcmd, sizeof(struct cmd_obj));
|
||||||
|
|
||||||
|
@ -1151,7 +1149,7 @@ _func_exit_;
|
||||||
|
|
||||||
u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network* pnetwork)
|
u8 rtw_joinbss_cmd(_adapter *padapter, struct wlan_network* pnetwork)
|
||||||
{
|
{
|
||||||
u8 *auth, res = _SUCCESS;
|
u8 res = _SUCCESS;
|
||||||
uint t_len = 0;
|
uint t_len = 0;
|
||||||
WLAN_BSSID_EX *psecnetwork;
|
WLAN_BSSID_EX *psecnetwork;
|
||||||
struct cmd_obj *pcmd;
|
struct cmd_obj *pcmd;
|
||||||
|
@ -1233,7 +1231,6 @@ _func_enter_;
|
||||||
|
|
||||||
_rtw_memcpy(psecnetwork, &pnetwork->network, get_WLAN_BSSID_EX_sz(&pnetwork->network));
|
_rtw_memcpy(psecnetwork, &pnetwork->network, get_WLAN_BSSID_EX_sz(&pnetwork->network));
|
||||||
|
|
||||||
auth=&psecuritypriv->authenticator_ie[0];
|
|
||||||
psecuritypriv->authenticator_ie[0]=(unsigned char)psecnetwork->IELength;
|
psecuritypriv->authenticator_ie[0]=(unsigned char)psecnetwork->IELength;
|
||||||
|
|
||||||
if ((psecnetwork->IELength-12) < (256-1)) {
|
if ((psecnetwork->IELength-12) < (256-1)) {
|
||||||
|
|
|
@ -657,35 +657,30 @@ int proc_set_rx_signal(struct file *file, const char __user *buffer,
|
||||||
struct net_device *dev = (struct net_device *)data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
u32 is_signal_dbg, signal_strength;
|
u32 is_signal_dbg;
|
||||||
|
s32 signal_strength;
|
||||||
|
|
||||||
if (count < 1)
|
if (count < 1)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
if (buffer && !copy_from_user(tmp, buffer, sizeof(tmp))) {
|
||||||
|
|
||||||
int num = sscanf(tmp, "%u %u", &is_signal_dbg, &signal_strength);
|
int num = sscanf(tmp, "%u %u", &is_signal_dbg, &signal_strength);
|
||||||
|
is_signal_dbg = is_signal_dbg == 0 ? 0 : 1;
|
||||||
is_signal_dbg = is_signal_dbg==0?0:1;
|
if (is_signal_dbg && num != 2)
|
||||||
|
|
||||||
if (is_signal_dbg && num!=2)
|
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
signal_strength = signal_strength>100?100:signal_strength;
|
signal_strength = signal_strength > 100 ? 100 : signal_strength;
|
||||||
signal_strength = signal_strength<0?0:signal_strength;
|
signal_strength = signal_strength < 0 ? 0 : signal_strength;
|
||||||
|
|
||||||
padapter->recvpriv.is_signal_dbg = is_signal_dbg;
|
padapter->recvpriv.is_signal_dbg = is_signal_dbg;
|
||||||
padapter->recvpriv.signal_strength_dbg=signal_strength;
|
padapter->recvpriv.signal_strength_dbg = signal_strength;
|
||||||
|
|
||||||
if (is_signal_dbg)
|
if (is_signal_dbg)
|
||||||
DBG_88E("set %s %u\n", "DBG_SIGNAL_STRENGTH", signal_strength);
|
DBG_88E("set %s %u\n", "DBG_SIGNAL_STRENGTH", signal_strength);
|
||||||
else
|
else
|
||||||
DBG_88E("set %s\n", "HW_SIGNAL_STRENGTH");
|
DBG_88E("set %s\n", "HW_SIGNAL_STRENGTH");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return count;
|
return count;
|
||||||
|
|
||||||
}
|
}
|
||||||
#ifdef CONFIG_80211N_HT
|
#ifdef CONFIG_80211N_HT
|
||||||
|
|
||||||
|
@ -696,7 +691,6 @@ int proc_get_ht_enable(char *page, char **start,
|
||||||
struct net_device *dev = data;
|
struct net_device *dev = data;
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
|
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
if (pregpriv)
|
if (pregpriv)
|
||||||
|
@ -704,7 +698,6 @@ int proc_get_ht_enable(char *page, char **start,
|
||||||
"%d\n",
|
"%d\n",
|
||||||
pregpriv->ht_enable
|
pregpriv->ht_enable
|
||||||
);
|
);
|
||||||
|
|
||||||
*eof = 1;
|
*eof = 1;
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
@ -716,7 +709,7 @@ int proc_set_ht_enable(struct file *file, const char __user *buffer,
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
u32 mode;
|
s32 mode;
|
||||||
|
|
||||||
if (count < 1)
|
if (count < 1)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
@ -763,7 +756,7 @@ int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
u32 mode;
|
s32 mode;
|
||||||
|
|
||||||
if (count < 1)
|
if (count < 1)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
@ -812,7 +805,7 @@ int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
u32 mode;
|
s32 mode;
|
||||||
|
|
||||||
if (count < 1)
|
if (count < 1)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
|
@ -705,7 +705,7 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
u8 offset, word_en;
|
u8 offset, word_en;
|
||||||
u8 *map;
|
u8 *map;
|
||||||
u8 newdata[PGPKT_DATA_SIZE];
|
u8 newdata[PGPKT_DATA_SIZE];
|
||||||
s32 i, j, idx;
|
s32 i, idx;
|
||||||
u8 ret = _SUCCESS;
|
u8 ret = _SUCCESS;
|
||||||
u16 mapLen=0;
|
u16 mapLen=0;
|
||||||
|
|
||||||
|
@ -715,12 +715,12 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
|
||||||
map = rtw_zmalloc(mapLen);
|
map = rtw_zmalloc(mapLen);
|
||||||
if (map == NULL){
|
if (map == NULL)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
|
||||||
|
|
||||||
ret = rtw_efuse_map_read(padapter, 0, mapLen, map);
|
ret = rtw_efuse_map_read(padapter, 0, mapLen, map);
|
||||||
if (ret == _FAIL) goto exit;
|
if (ret == _FAIL)
|
||||||
|
goto exit;
|
||||||
|
|
||||||
Efuse_PowerSwitch(padapter, true, true);
|
Efuse_PowerSwitch(padapter, true, true);
|
||||||
|
|
||||||
|
@ -728,7 +728,6 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
word_en = 0xF;
|
word_en = 0xF;
|
||||||
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
||||||
i = addr & 0x7; // index of one package
|
i = addr & 0x7; // index of one package
|
||||||
j = 0; // index of new package
|
|
||||||
idx = 0; // data index
|
idx = 0; // data index
|
||||||
|
|
||||||
if (i & 0x1) {
|
if (i & 0x1) {
|
||||||
|
@ -742,9 +741,9 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
for (; i < PGPKT_DATA_SIZE; i += 2)
|
for (; i < PGPKT_DATA_SIZE; i += 2) {
|
||||||
{
|
if (cnts == idx)
|
||||||
if (cnts == idx) break;
|
break;
|
||||||
if ((cnts - idx) == 1) {
|
if ((cnts - idx) == 1) {
|
||||||
if (data[idx] != map[addr+idx]) {
|
if (data[idx] != map[addr+idx]) {
|
||||||
word_en &= ~BIT(i >> 1);
|
word_en &= ~BIT(i >> 1);
|
||||||
|
@ -755,15 +754,15 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
if ((data[idx] != map[addr+idx]) ||
|
if ((data[idx] != map[addr+idx]) ||
|
||||||
(data[idx+1] != map[addr+idx+1]))
|
(data[idx+1] != map[addr+idx+1])) {
|
||||||
{
|
|
||||||
word_en &= ~BIT(i >> 1);
|
word_en &= ~BIT(i >> 1);
|
||||||
newdata[i] = data[idx];
|
newdata[i] = data[idx];
|
||||||
newdata[i+1] = data[idx + 1];
|
newdata[i+1] = data[idx + 1];
|
||||||
}
|
}
|
||||||
idx += 2;
|
idx += 2;
|
||||||
}
|
}
|
||||||
if (idx == cnts) break;
|
if (idx == cnts)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (word_en != 0xF) {
|
if (word_en != 0xF) {
|
||||||
|
@ -771,39 +770,34 @@ u8 rtw_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
DBG_88E("offset=%x\n",offset);
|
DBG_88E("offset=%x\n",offset);
|
||||||
DBG_88E("word_en=%x\n",word_en);
|
DBG_88E("word_en=%x\n",word_en);
|
||||||
|
|
||||||
for (i=0;i<PGPKT_DATA_SIZE;i++)
|
for (i = 0; i < PGPKT_DATA_SIZE; i++)
|
||||||
{
|
|
||||||
DBG_88E("data=%x \t",newdata[i]);
|
DBG_88E("data=%x \t",newdata[i]);
|
||||||
}
|
if (ret == _FAIL)
|
||||||
if (ret == _FAIL) break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx == cnts) break;
|
if (idx == cnts)
|
||||||
|
break;
|
||||||
|
|
||||||
offset++;
|
offset++;
|
||||||
i = 0;
|
i = 0;
|
||||||
j = 0;
|
|
||||||
word_en = 0xF;
|
word_en = 0xF;
|
||||||
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
||||||
Efuse_PowerSwitch(padapter, true, false);
|
Efuse_PowerSwitch(padapter, true, false);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
rtw_mfree(map, mapLen);
|
rtw_mfree(map, mapLen);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
{
|
{
|
||||||
u8 offset, word_en;
|
u8 offset, word_en;
|
||||||
u8 *map;
|
u8 *map;
|
||||||
u8 newdata[PGPKT_DATA_SIZE];
|
u8 newdata[PGPKT_DATA_SIZE];
|
||||||
s32 i, j, idx;
|
s32 i, idx;
|
||||||
u8 ret = _SUCCESS;
|
u8 ret = _SUCCESS;
|
||||||
u16 mapLen=0;
|
u16 mapLen=0;
|
||||||
|
|
||||||
|
@ -813,9 +807,8 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
|
||||||
map = rtw_zmalloc(mapLen);
|
map = rtw_zmalloc(mapLen);
|
||||||
if (map == NULL){
|
if (map == NULL)
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
|
||||||
|
|
||||||
ret = rtw_BT_efuse_map_read(padapter, 0, mapLen, map);
|
ret = rtw_BT_efuse_map_read(padapter, 0, mapLen, map);
|
||||||
if (ret == _FAIL) goto exit;
|
if (ret == _FAIL) goto exit;
|
||||||
|
@ -826,7 +819,6 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
word_en = 0xF;
|
word_en = 0xF;
|
||||||
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
||||||
i = addr & 0x7; // index of one package
|
i = addr & 0x7; // index of one package
|
||||||
j = 0; // index of new package
|
|
||||||
idx = 0; // data index
|
idx = 0; // data index
|
||||||
|
|
||||||
if (i & 0x1) {
|
if (i & 0x1) {
|
||||||
|
@ -840,9 +832,9 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
do {
|
do {
|
||||||
for (; i < PGPKT_DATA_SIZE; i += 2)
|
for (; i < PGPKT_DATA_SIZE; i += 2) {
|
||||||
{
|
if (cnts == idx)
|
||||||
if (cnts == idx) break;
|
break;
|
||||||
if ((cnts - idx) == 1) {
|
if ((cnts - idx) == 1) {
|
||||||
if (data[idx] != map[addr+idx]) {
|
if (data[idx] != map[addr+idx]) {
|
||||||
word_en &= ~BIT(i >> 1);
|
word_en &= ~BIT(i >> 1);
|
||||||
|
@ -853,37 +845,35 @@ u8 rtw_BT_efuse_map_write(PADAPTER padapter, u16 addr, u16 cnts, u8 *data)
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
if ((data[idx] != map[addr+idx]) ||
|
if ((data[idx] != map[addr+idx]) ||
|
||||||
(data[idx+1] != map[addr+idx+1]))
|
(data[idx+1] != map[addr+idx+1])) {
|
||||||
{
|
|
||||||
word_en &= ~BIT(i >> 1);
|
word_en &= ~BIT(i >> 1);
|
||||||
newdata[i] = data[idx];
|
newdata[i] = data[idx];
|
||||||
newdata[i+1] = data[idx + 1];
|
newdata[i+1] = data[idx + 1];
|
||||||
}
|
}
|
||||||
idx += 2;
|
idx += 2;
|
||||||
}
|
}
|
||||||
if (idx == cnts) break;
|
if (idx == cnts)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (word_en != 0xF)
|
if (word_en != 0xF) {
|
||||||
{
|
|
||||||
DBG_88E("%s: offset=%#X\n", __func__, offset);
|
DBG_88E("%s: offset=%#X\n", __func__, offset);
|
||||||
DBG_88E("%s: word_en=%#X\n", __func__, word_en);
|
DBG_88E("%s: word_en=%#X\n", __func__, word_en);
|
||||||
DBG_88E("%s: data=", __func__);
|
DBG_88E("%s: data=", __func__);
|
||||||
for (i=0; i<PGPKT_DATA_SIZE; i++)
|
for (i=0; i<PGPKT_DATA_SIZE; i++)
|
||||||
{
|
|
||||||
DBG_88E("0x%02X ", newdata[i]);
|
DBG_88E("0x%02X ", newdata[i]);
|
||||||
}
|
|
||||||
DBG_88E("\n");
|
DBG_88E("\n");
|
||||||
|
|
||||||
ret = Efuse_PgPacketWrite_BT(padapter, offset, word_en, newdata, false);
|
ret = Efuse_PgPacketWrite_BT(padapter, offset, word_en, newdata, false);
|
||||||
if (ret == _FAIL) break;
|
if (ret == _FAIL)
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx == cnts) break;
|
if (idx == cnts)
|
||||||
|
break;
|
||||||
|
|
||||||
offset++;
|
offset++;
|
||||||
i = 0;
|
i = 0;
|
||||||
j = 0;
|
|
||||||
word_en = 0xF;
|
word_en = 0xF;
|
||||||
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
_rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
|
||||||
} while (1);
|
} while (1);
|
||||||
|
|
|
@ -770,42 +770,37 @@ _func_exit_;
|
||||||
|
|
||||||
u8 rtw_set_802_11_add_wep(_adapter* padapter, NDIS_802_11_WEP *wep){
|
u8 rtw_set_802_11_add_wep(_adapter* padapter, NDIS_802_11_WEP *wep){
|
||||||
|
|
||||||
u8 bdefaultkey;
|
|
||||||
u8 btransmitkey;
|
|
||||||
sint keyid,res;
|
sint keyid,res;
|
||||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||||
u8 ret=_SUCCESS;
|
u8 ret=_SUCCESS;
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
bdefaultkey=(wep->KeyIndex & 0x40000000) > 0 ? false : true; //for ???
|
|
||||||
btransmitkey= (wep->KeyIndex & 0x80000000) > 0 ? true : false; //for ???
|
|
||||||
keyid=wep->KeyIndex & 0x3fffffff;
|
keyid=wep->KeyIndex & 0x3fffffff;
|
||||||
|
|
||||||
if (keyid>4)
|
if (keyid>4) {
|
||||||
{
|
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MgntActrtw_set_802_11_add_wep:keyid>4=>fail\n"));
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_err_,("MgntActrtw_set_802_11_add_wep:keyid>4=>fail\n"));
|
||||||
ret=false;
|
ret=false;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (wep->KeyLength)
|
switch (wep->KeyLength) {
|
||||||
{
|
case 5:
|
||||||
case 5:
|
psecuritypriv->dot11PrivacyAlgrthm=_WEP40_;
|
||||||
psecuritypriv->dot11PrivacyAlgrthm=_WEP40_;
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_add_wep:wep->KeyLength=5\n"));
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_add_wep:wep->KeyLength=5\n"));
|
break;
|
||||||
break;
|
case 13:
|
||||||
case 13:
|
psecuritypriv->dot11PrivacyAlgrthm=_WEP104_;
|
||||||
psecuritypriv->dot11PrivacyAlgrthm=_WEP104_;
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_add_wep:wep->KeyLength=13\n"));
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_add_wep:wep->KeyLength=13\n"));
|
break;
|
||||||
break;
|
default:
|
||||||
default:
|
psecuritypriv->dot11PrivacyAlgrthm=_NO_PRIVACY_;
|
||||||
psecuritypriv->dot11PrivacyAlgrthm=_NO_PRIVACY_;
|
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_add_wep:wep->KeyLength!=5 or 13\n"));
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("MgntActrtw_set_802_11_add_wep:wep->KeyLength!=5 or 13\n"));
|
break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
|
||||||
RT_TRACE(_module_rtl871x_ioctl_set_c_,_drv_info_,("rtw_set_802_11_add_wep:befor memcpy, wep->KeyLength=0x%x wep->KeyIndex=0x%x keyid =%x\n",wep->KeyLength,wep->KeyIndex,keyid));
|
("rtw_set_802_11_add_wep:befor memcpy, wep->KeyLength=0x%x wep->KeyIndex=0x%x keyid =%x\n",
|
||||||
|
wep->KeyLength,wep->KeyIndex,keyid));
|
||||||
|
|
||||||
_rtw_memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]),&(wep->KeyMaterial),wep->KeyLength);
|
_rtw_memcpy(&(psecuritypriv->dot11DefKey[keyid].skey[0]),&(wep->KeyMaterial),wep->KeyLength);
|
||||||
|
|
||||||
|
@ -1068,7 +1063,6 @@ _func_enter_;
|
||||||
// If WEP encryption algorithm, just call rtw_set_802_11_add_wep().
|
// If WEP encryption algorithm, just call rtw_set_802_11_add_wep().
|
||||||
if ((padapter->securitypriv.dot11AuthAlgrthm !=dot11AuthAlgrthm_8021X)&&(encryptionalgo== _WEP40_ || encryptionalgo== _WEP104_))
|
if ((padapter->securitypriv.dot11AuthAlgrthm !=dot11AuthAlgrthm_8021X)&&(encryptionalgo== _WEP40_ || encryptionalgo== _WEP104_))
|
||||||
{
|
{
|
||||||
u8 ret;
|
|
||||||
u32 keyindex;
|
u32 keyindex;
|
||||||
u32 len = FIELD_OFFSET(NDIS_802_11_KEY, KeyMaterial) + key->KeyLength;
|
u32 len = FIELD_OFFSET(NDIS_802_11_KEY, KeyMaterial) + key->KeyLength;
|
||||||
NDIS_802_11_WEP *wep = &padapter->securitypriv.ndiswep;
|
NDIS_802_11_WEP *wep = &padapter->securitypriv.ndiswep;
|
||||||
|
@ -1242,8 +1236,7 @@ _func_exit_;
|
||||||
|
|
||||||
u8 rtw_set_802_11_remove_key(_adapter* padapter, NDIS_802_11_REMOVE_KEY *key){
|
u8 rtw_set_802_11_remove_key(_adapter* padapter, NDIS_802_11_REMOVE_KEY *key){
|
||||||
|
|
||||||
uint encryptionalgo;
|
u8 *pbssid;
|
||||||
u8 * pbssid;
|
|
||||||
struct sta_info *stainfo;
|
struct sta_info *stainfo;
|
||||||
u8 bgroup = (key->KeyIndex & 0x4000000) > 0 ? false: true;
|
u8 bgroup = (key->KeyIndex & 0x4000000) > 0 ? false: true;
|
||||||
u8 keyIndex = (u8)key->KeyIndex & 0x03;
|
u8 keyIndex = (u8)key->KeyIndex & 0x03;
|
||||||
|
@ -1257,7 +1250,6 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bgroup == true) {
|
if (bgroup == true) {
|
||||||
encryptionalgo= padapter->securitypriv.dot118021XGrpPrivacy;
|
|
||||||
// clear group key by index
|
// clear group key by index
|
||||||
//NdisZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[keyIndex], MAX_WEP_KEY_LEN);
|
//NdisZeroMemory(Adapter->MgntInfo.SecurityInfo.KeyBuf[keyIndex], MAX_WEP_KEY_LEN);
|
||||||
//Adapter->MgntInfo.SecurityInfo.KeyLen[keyIndex] = 0;
|
//Adapter->MgntInfo.SecurityInfo.KeyLen[keyIndex] = 0;
|
||||||
|
@ -1265,32 +1257,23 @@ _func_enter_;
|
||||||
_rtw_memset(&padapter->securitypriv.dot118021XGrpKey[keyIndex], 0, 16);
|
_rtw_memset(&padapter->securitypriv.dot118021XGrpKey[keyIndex], 0, 16);
|
||||||
|
|
||||||
//! \todo Send a H2C Command to Firmware for removing this Key in CAM Entry.
|
//! \todo Send a H2C Command to Firmware for removing this Key in CAM Entry.
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
pbssid=get_bssid(&padapter->mlmepriv);
|
pbssid=get_bssid(&padapter->mlmepriv);
|
||||||
stainfo=rtw_get_stainfo(&padapter->stapriv , pbssid );
|
stainfo=rtw_get_stainfo(&padapter->stapriv , pbssid );
|
||||||
if (stainfo !=NULL){
|
if (stainfo) {
|
||||||
encryptionalgo=stainfo->dot118021XPrivacy;
|
// clear key by BSSID
|
||||||
|
_rtw_memset(&stainfo->dot118021x_UncstKey, 0, 16);
|
||||||
|
|
||||||
// clear key by BSSID
|
//! \todo Send a H2C Command to Firmware for disable this Key in CAM Entry.
|
||||||
_rtw_memset(&stainfo->dot118021x_UncstKey, 0, 16);
|
} else {
|
||||||
|
|
||||||
//! \todo Send a H2C Command to Firmware for disable this Key in CAM Entry.
|
|
||||||
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
ret= _FAIL;
|
ret= _FAIL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
return ret;
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -1697,7 +1697,9 @@ static void rtw_joinbss_update_network(_adapter *padapter, struct wlan_network *
|
||||||
void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf)
|
void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
_irqL irqL,irqL2;
|
_irqL irqL,irqL2;
|
||||||
|
#ifdef REJOIN
|
||||||
static u8 retry=0;
|
static u8 retry=0;
|
||||||
|
#endif
|
||||||
u8 timer_cancelled;
|
u8 timer_cancelled;
|
||||||
struct sta_info *ptarget_sta= NULL, *pcur_sta = NULL;
|
struct sta_info *ptarget_sta= NULL, *pcur_sta = NULL;
|
||||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||||
|
@ -1709,27 +1711,6 @@ void rtw_joinbss_event_prehandle(_adapter *adapter, u8 *pbuf)
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8712
|
|
||||||
//endian_convert
|
|
||||||
pnetwork->join_res = le32_to_cpu(pnetwork->join_res);
|
|
||||||
pnetwork->network_type = le32_to_cpu(pnetwork->network_type);
|
|
||||||
pnetwork->network.Length = le32_to_cpu(pnetwork->network.Length);
|
|
||||||
pnetwork->network.Ssid.SsidLength = le32_to_cpu(pnetwork->network.Ssid.SsidLength);
|
|
||||||
pnetwork->network.Privacy =le32_to_cpu( pnetwork->network.Privacy);
|
|
||||||
pnetwork->network.Rssi = le32_to_cpu(pnetwork->network.Rssi);
|
|
||||||
pnetwork->network.NetworkTypeInUse =le32_to_cpu(pnetwork->network.NetworkTypeInUse) ;
|
|
||||||
pnetwork->network.Configuration.ATIMWindow = le32_to_cpu(pnetwork->network.Configuration.ATIMWindow);
|
|
||||||
pnetwork->network.Configuration.BeaconPeriod = le32_to_cpu(pnetwork->network.Configuration.BeaconPeriod);
|
|
||||||
pnetwork->network.Configuration.DSConfig = le32_to_cpu(pnetwork->network.Configuration.DSConfig);
|
|
||||||
pnetwork->network.Configuration.FHConfig.DwellTime=le32_to_cpu(pnetwork->network.Configuration.FHConfig.DwellTime);
|
|
||||||
pnetwork->network.Configuration.FHConfig.HopPattern=le32_to_cpu(pnetwork->network.Configuration.FHConfig.HopPattern);
|
|
||||||
pnetwork->network.Configuration.FHConfig.HopSet=le32_to_cpu(pnetwork->network.Configuration.FHConfig.HopSet);
|
|
||||||
pnetwork->network.Configuration.FHConfig.Length=le32_to_cpu(pnetwork->network.Configuration.FHConfig.Length);
|
|
||||||
pnetwork->network.Configuration.Length = le32_to_cpu(pnetwork->network.Configuration.Length);
|
|
||||||
pnetwork->network.InfrastructureMode = le32_to_cpu(pnetwork->network.InfrastructureMode);
|
|
||||||
pnetwork->network.IELength = le32_to_cpu(pnetwork->network.IELength );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("joinbss event call back received with res=%d\n", pnetwork->join_res));
|
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("joinbss event call back received with res=%d\n", pnetwork->join_res));
|
||||||
|
|
||||||
rtw_get_encrypt_decrypt_from_registrypriv(adapter);
|
rtw_get_encrypt_decrypt_from_registrypriv(adapter);
|
||||||
|
@ -1754,7 +1735,9 @@ _func_enter_;
|
||||||
|
|
||||||
if (pnetwork->join_res > 0) {
|
if (pnetwork->join_res > 0) {
|
||||||
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
|
||||||
|
#ifdef REJOIN
|
||||||
retry = 0;
|
retry = 0;
|
||||||
|
#endif
|
||||||
if (check_fwstate(pmlmepriv,_FW_UNDER_LINKING) ) {
|
if (check_fwstate(pmlmepriv,_FW_UNDER_LINKING) ) {
|
||||||
//s1. find ptarget_wlan
|
//s1. find ptarget_wlan
|
||||||
if (check_fwstate(pmlmepriv, _FW_LINKED) ) {
|
if (check_fwstate(pmlmepriv, _FW_LINKED) ) {
|
||||||
|
@ -3003,17 +2986,8 @@ int rtw_restruct_wmm_ie(_adapter *adapter, u8 *in_ie, u8 *out_ie, uint in_len, u
|
||||||
{
|
{
|
||||||
|
|
||||||
//Append WMM IE to the last index of out_ie
|
//Append WMM IE to the last index of out_ie
|
||||||
/*
|
|
||||||
for (j=i; j< i+(in_ie[i+1]+2); j++)
|
|
||||||
{
|
|
||||||
out_ie[ielength] = in_ie[j];
|
|
||||||
ielength++;
|
|
||||||
}
|
|
||||||
out_ie[initial_out_len+8] = 0x00; //force the QoS Info Field to be zero
|
|
||||||
*/
|
|
||||||
|
|
||||||
for ( j = i; j < i + 9; j++ )
|
for ( j = i; j < i + 9; j++ ) {
|
||||||
{
|
|
||||||
out_ie[ ielength] = in_ie[ j ];
|
out_ie[ ielength] = in_ie[ j ];
|
||||||
ielength++;
|
ielength++;
|
||||||
}
|
}
|
||||||
|
@ -3318,9 +3292,9 @@ void rtw_joinbss_reset(_adapter *padapter)
|
||||||
//the fucntion is >= passive_level
|
//the fucntion is >= passive_level
|
||||||
unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len)
|
unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len)
|
||||||
{
|
{
|
||||||
u32 ielen, out_len;
|
u32 ielen;
|
||||||
HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor;
|
HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor;
|
||||||
unsigned char *p, *pframe;
|
unsigned char *p;
|
||||||
struct rtw_ieee80211_ht_cap ht_capie;
|
struct rtw_ieee80211_ht_cap ht_capie;
|
||||||
unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
|
unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
|
@ -3332,19 +3306,11 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||||
|
|
||||||
p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12);
|
p = rtw_get_ie(in_ie+12, _HT_CAPABILITY_IE_, &ielen, in_len-12);
|
||||||
|
|
||||||
if (p && ielen>0)
|
if (p && ielen>0) {
|
||||||
{
|
if (pqospriv->qos_option == 0) {
|
||||||
if (pqospriv->qos_option == 0)
|
|
||||||
{
|
|
||||||
out_len = *pout_len;
|
|
||||||
pframe = rtw_set_ie(out_ie+out_len, _VENDOR_SPECIFIC_IE_,
|
|
||||||
_WMM_IE_Length_, WMM_IE, pout_len);
|
|
||||||
|
|
||||||
pqospriv->qos_option = 1;
|
pqospriv->qos_option = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
out_len = *pout_len;
|
|
||||||
|
|
||||||
_rtw_memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
_rtw_memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap));
|
||||||
|
|
||||||
ht_capie.cap_info = IEEE80211_HT_CAP_SUP_WIDTH |IEEE80211_HT_CAP_SGI_20 |
|
ht_capie.cap_info = IEEE80211_HT_CAP_SUP_WIDTH |IEEE80211_HT_CAP_SGI_20 |
|
||||||
|
@ -3381,29 +3347,11 @@ unsigned int rtw_restructure_ht_ie(_adapter *padapter, u8 *in_ie, u8 *out_ie, ui
|
||||||
ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&(0x07<<2));
|
ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&(0x07<<2));
|
||||||
else
|
else
|
||||||
ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x00);
|
ht_capie.ampdu_params_info |= (IEEE80211_HT_CAP_AMPDU_DENSITY&0x00);
|
||||||
|
|
||||||
|
|
||||||
pframe = rtw_set_ie(out_ie+out_len, _HT_CAPABILITY_IE_,
|
|
||||||
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);
|
||||||
if (p && (ielen==sizeof(struct ieee80211_ht_addt_info)))
|
|
||||||
{
|
|
||||||
out_len = *pout_len;
|
|
||||||
pframe = rtw_set_ie(out_ie+out_len, _HT_ADD_INFO_IE_, ielen, p+2 , pout_len);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (phtpriv->ht_option);
|
return (phtpriv->ht_option);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//the fucntion is > passive_level (in critical_section)
|
//the fucntion is > passive_level (in critical_section)
|
||||||
|
@ -3413,7 +3361,6 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len)
|
||||||
int len;
|
int len;
|
||||||
//struct sta_info *bmc_sta, *psta;
|
//struct sta_info *bmc_sta, *psta;
|
||||||
struct rtw_ieee80211_ht_cap *pht_capie;
|
struct rtw_ieee80211_ht_cap *pht_capie;
|
||||||
struct ieee80211_ht_addt_info *pht_addtinfo;
|
|
||||||
//struct recv_reorder_ctrl *preorder_ctrl;
|
//struct recv_reorder_ctrl *preorder_ctrl;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
struct ht_priv *phtpriv = &pmlmepriv->htpriv;
|
||||||
|
@ -3467,9 +3414,7 @@ void rtw_update_ht_cap(_adapter *padapter, u8 *pie, uint ie_len)
|
||||||
|
|
||||||
len=0;
|
len=0;
|
||||||
p = rtw_get_ie(pie+sizeof (NDIS_802_11_FIXED_IEs), _HT_ADD_INFO_IE_, &len, ie_len-sizeof (NDIS_802_11_FIXED_IEs));
|
p = rtw_get_ie(pie+sizeof (NDIS_802_11_FIXED_IEs), _HT_ADD_INFO_IE_, &len, ie_len-sizeof (NDIS_802_11_FIXED_IEs));
|
||||||
if (p && len>0)
|
if (p && len>0) {
|
||||||
{
|
|
||||||
pht_addtinfo = (struct ieee80211_ht_addt_info *)(p+2);
|
|
||||||
//todo:
|
//todo:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1317,7 +1317,7 @@ auth_fail:
|
||||||
|
|
||||||
unsigned int OnAuthClient(_adapter *padapter, union recv_frame *precv_frame)
|
unsigned int OnAuthClient(_adapter *padapter, union recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
unsigned int seq, len, status, algthm, offset;
|
unsigned int seq, len, status, offset;
|
||||||
unsigned char *p;
|
unsigned char *p;
|
||||||
unsigned int go2asoc = 0;
|
unsigned int go2asoc = 0;
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
|
@ -1336,7 +1336,6 @@ unsigned int OnAuthClient(_adapter *padapter, union recv_frame *precv_frame)
|
||||||
|
|
||||||
offset = (GetPrivacy(pframe))? 4: 0;
|
offset = (GetPrivacy(pframe))? 4: 0;
|
||||||
|
|
||||||
algthm = le16_to_cpu(*(__le16 *)((SIZE_PTR)pframe + WLAN_HDR_A3_LEN + offset));
|
|
||||||
seq = le16_to_cpu(*(__le16 *)((SIZE_PTR)pframe + WLAN_HDR_A3_LEN + offset + 2));
|
seq = le16_to_cpu(*(__le16 *)((SIZE_PTR)pframe + WLAN_HDR_A3_LEN + offset + 2));
|
||||||
status = le16_to_cpu(*(__le16 *)((SIZE_PTR)pframe + WLAN_HDR_A3_LEN + offset + 4));
|
status = le16_to_cpu(*(__le16 *)((SIZE_PTR)pframe + WLAN_HDR_A3_LEN + offset + 4));
|
||||||
|
|
||||||
|
@ -1419,7 +1418,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
u16 capab_info, listen_interval;
|
u16 capab_info;
|
||||||
struct rtw_ieee802_11_elems elems;
|
struct rtw_ieee802_11_elems elems;
|
||||||
struct sta_info *pstat;
|
struct sta_info *pstat;
|
||||||
unsigned char reassoc, *p, *pos, *wpa_ie;
|
unsigned char reassoc, *p, *pos, *wpa_ie;
|
||||||
|
@ -1487,9 +1486,6 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame)
|
||||||
}
|
}
|
||||||
|
|
||||||
capab_info = RTW_GET_LE16(pframe + WLAN_HDR_A3_LEN);
|
capab_info = RTW_GET_LE16(pframe + WLAN_HDR_A3_LEN);
|
||||||
//capab_info = le16_to_cpu(*(unsigned short *)(pframe + WLAN_HDR_A3_LEN));
|
|
||||||
//listen_interval = le16_to_cpu(*(unsigned short *)(pframe + WLAN_HDR_A3_LEN+2));
|
|
||||||
listen_interval = RTW_GET_LE16(pframe + WLAN_HDR_A3_LEN+2);
|
|
||||||
|
|
||||||
left = pkt_len - (IEEE80211_3ADDR_LEN + ie_offset);
|
left = pkt_len - (IEEE80211_3ADDR_LEN + ie_offset);
|
||||||
pos = pframe + (IEEE80211_3ADDR_LEN + ie_offset);
|
pos = pframe + (IEEE80211_3ADDR_LEN + ie_offset);
|
||||||
|
@ -5313,7 +5309,7 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
|
||||||
|
|
||||||
// Commented by Kurt 20120113
|
// Commented by Kurt 20120113
|
||||||
// Get peer_dev_addr here if peer doesn't issue prov_disc frame.
|
// Get peer_dev_addr here if peer doesn't issue prov_disc frame.
|
||||||
if ( _rtw_memcmp(pwdinfo->rx_prov_disc_info.peerDevAddr, empty_addr, ETH_ALEN) );
|
if (_rtw_memcmp(pwdinfo->rx_prov_disc_info.peerDevAddr, empty_addr, ETH_ALEN))
|
||||||
_rtw_memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN);
|
_rtw_memcpy(pwdinfo->rx_prov_disc_info.peerDevAddr, GetAddr2Ptr(pframe), ETH_ALEN);
|
||||||
|
|
||||||
result = process_p2p_group_negotation_req( pwdinfo, frame_body, len );
|
result = process_p2p_group_negotation_req( pwdinfo, frame_body, len );
|
||||||
|
@ -5736,7 +5732,7 @@ unsigned int OnAction_p2p(_adapter *padapter, union recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
u8 *frame_body;
|
u8 *frame_body;
|
||||||
u8 category, OUI_Subtype, dialogToken=0;
|
u8 category, OUI_Subtype;
|
||||||
u8 *pframe = precv_frame->u.hdr.rx_data;
|
u8 *pframe = precv_frame->u.hdr.rx_data;
|
||||||
uint len = precv_frame->u.hdr.len;
|
uint len = precv_frame->u.hdr.len;
|
||||||
struct wifidirect_info *pwdinfo = &( padapter->wdinfo );
|
struct wifidirect_info *pwdinfo = &( padapter->wdinfo );
|
||||||
|
@ -5766,7 +5762,6 @@ unsigned int OnAction_p2p(_adapter *padapter, union recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
len -= sizeof(struct rtw_ieee80211_hdr_3addr);
|
len -= sizeof(struct rtw_ieee80211_hdr_3addr);
|
||||||
OUI_Subtype = frame_body[5];
|
OUI_Subtype = frame_body[5];
|
||||||
dialogToken = frame_body[6];
|
|
||||||
|
|
||||||
switch (OUI_Subtype) {
|
switch (OUI_Subtype) {
|
||||||
case P2P_NOTICE_OF_ABSENCE:
|
case P2P_NOTICE_OF_ABSENCE:
|
||||||
|
@ -7871,7 +7866,6 @@ void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char act
|
||||||
u16 reason_code;
|
u16 reason_code;
|
||||||
u16 BA_timeout_value;
|
u16 BA_timeout_value;
|
||||||
__le16 le_tmp;
|
__le16 le_tmp;
|
||||||
__le16 lestatus;
|
|
||||||
u16 BA_starting_seqctrl;
|
u16 BA_starting_seqctrl;
|
||||||
HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor;
|
HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor;
|
||||||
struct xmit_frame *pmgntframe;
|
struct xmit_frame *pmgntframe;
|
||||||
|
@ -7924,9 +7918,6 @@ void issue_action_BA(_adapter *padapter, unsigned char *raddr, unsigned char act
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(category), &(pattrib->pktlen));
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(action), &(pattrib->pktlen));
|
||||||
|
|
||||||
lestatus = cpu_to_le16(status);
|
|
||||||
|
|
||||||
|
|
||||||
if (category == 3) {
|
if (category == 3) {
|
||||||
switch (action) {
|
switch (action) {
|
||||||
case 0: //ADDBA req
|
case 0: //ADDBA req
|
||||||
|
@ -11114,7 +11105,10 @@ _func_exit_;
|
||||||
|
|
||||||
u8 mlme_evt_hdl(_adapter *padapter, unsigned char *pbuf)
|
u8 mlme_evt_hdl(_adapter *padapter, unsigned char *pbuf)
|
||||||
{
|
{
|
||||||
u8 evt_code, evt_seq;
|
u8 evt_code;
|
||||||
|
#ifdef CHECK_EVENT_SEQ
|
||||||
|
u8 evt_seq;
|
||||||
|
#endif
|
||||||
u16 evt_sz;
|
u16 evt_sz;
|
||||||
uint *peventbuf;
|
uint *peventbuf;
|
||||||
void (*event_callback)(_adapter *dev, u8 *pbuf);
|
void (*event_callback)(_adapter *dev, u8 *pbuf);
|
||||||
|
@ -11122,7 +11116,9 @@ u8 mlme_evt_hdl(_adapter *padapter, unsigned char *pbuf)
|
||||||
|
|
||||||
peventbuf = (uint*)pbuf;
|
peventbuf = (uint*)pbuf;
|
||||||
evt_sz = (u16)(*peventbuf&0xffff);
|
evt_sz = (u16)(*peventbuf&0xffff);
|
||||||
|
#ifdef CHECK_EVENT_SEQ
|
||||||
evt_seq = (u8)((*peventbuf>>24)&0x7f);
|
evt_seq = (u8)((*peventbuf>>24)&0x7f);
|
||||||
|
#endif
|
||||||
evt_code = (u8)((*peventbuf>>16)&0xff);
|
evt_code = (u8)((*peventbuf>>16)&0xff);
|
||||||
|
|
||||||
|
|
||||||
|
@ -12217,14 +12213,15 @@ u8 set_chplan_hdl(_adapter *padapter, unsigned char *pbuf)
|
||||||
|
|
||||||
u8 led_blink_hdl(_adapter *padapter, unsigned char *pbuf)
|
u8 led_blink_hdl(_adapter *padapter, unsigned char *pbuf)
|
||||||
{
|
{
|
||||||
|
#ifdef CONFIG_LED_HANDLED_BY_CMD_THREAD
|
||||||
struct LedBlink_param *ledBlink_param;
|
struct LedBlink_param *ledBlink_param;
|
||||||
|
#endif
|
||||||
if (!pbuf)
|
if (!pbuf)
|
||||||
return H2C_PARAMETERS_ERROR;
|
return H2C_PARAMETERS_ERROR;
|
||||||
|
|
||||||
|
#ifdef CONFIG_LED_HANDLED_BY_CMD_THREAD
|
||||||
ledBlink_param = (struct LedBlink_param *)pbuf;
|
ledBlink_param = (struct LedBlink_param *)pbuf;
|
||||||
|
|
||||||
#ifdef CONFIG_LED_HANDLED_BY_CMD_THREAD
|
|
||||||
BlinkHandler(ledBlink_param->pLed);
|
BlinkHandler(ledBlink_param->pLed);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -366,7 +366,6 @@ MPT_InitializeAdapter(
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(pAdapter);
|
||||||
s32 rtStatus = _SUCCESS;
|
s32 rtStatus = _SUCCESS;
|
||||||
PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.MptCtx;
|
PMPT_CONTEXT pMptCtx = &pAdapter->mppriv.MptCtx;
|
||||||
u32 ledsetting;
|
|
||||||
struct mlme_priv *pmlmepriv = &pAdapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &pAdapter->mlmepriv;
|
||||||
|
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
@ -394,52 +393,18 @@ MPT_InitializeAdapter(
|
||||||
pMptCtx->CurrMptAct = NULL;
|
pMptCtx->CurrMptAct = NULL;
|
||||||
//-------------------------------------------------------------------------
|
//-------------------------------------------------------------------------
|
||||||
|
|
||||||
#if 1
|
|
||||||
// Don't accept any packets
|
// Don't accept any packets
|
||||||
rtw_write32(pAdapter, REG_RCR, 0);
|
rtw_write32(pAdapter, REG_RCR, 0);
|
||||||
#else
|
|
||||||
// Accept CRC error and destination address
|
|
||||||
//pHalData->ReceiveConfig |= (RCR_ACRC32|RCR_AAP);
|
|
||||||
//rtw_write32(pAdapter, REG_RCR, pHalData->ReceiveConfig);
|
|
||||||
rtw_write32(pAdapter, REG_RCR, 0x70000101);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (IS_HARDWARE_TYPE_8192DU(pAdapter))
|
|
||||||
{
|
|
||||||
rtw_write32(pAdapter, REG_LEDCFG0, 0x8888);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//rtw_write32(pAdapter, REG_LEDCFG0, 0x08080);
|
|
||||||
ledsetting = rtw_read32(pAdapter, REG_LEDCFG0);
|
|
||||||
|
|
||||||
#if defined (CONFIG_RTL8192C) || defined( CONFIG_RTL8192D )
|
|
||||||
rtw_write32(pAdapter, REG_LEDCFG0, ledsetting & ~LED0DIS);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
PHY_IQCalibrate(pAdapter, false);
|
PHY_IQCalibrate(pAdapter, false);
|
||||||
dm_CheckTXPowerTracking(&pHalData->odmpriv); //trigger thermal meter
|
dm_CheckTXPowerTracking(&pHalData->odmpriv); //trigger thermal meter
|
||||||
PHY_LCCalibrate(pAdapter);
|
PHY_LCCalibrate(pAdapter);
|
||||||
|
|
||||||
#ifdef CONFIG_PCI_HCI
|
|
||||||
PHY_SetRFPathSwitch(pAdapter, 1/*pHalData->bDefaultAntenna*/); //Wifi default use Main
|
|
||||||
#else
|
|
||||||
|
|
||||||
#ifdef CONFIG_RTL8192C
|
|
||||||
if (pHalData->BoardType == BOARD_MINICARD)
|
|
||||||
PHY_SetRFPathSwitch(pAdapter, 1/*pHalData->bDefaultAntenna*/); //default use Main
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
pMptCtx->backup0xc50 = (u1Byte)PHY_QueryBBReg(pAdapter, rOFDM0_XAAGCCore1, bMaskByte0);
|
pMptCtx->backup0xc50 = (u1Byte)PHY_QueryBBReg(pAdapter, rOFDM0_XAAGCCore1, bMaskByte0);
|
||||||
pMptCtx->backup0xc58 = (u1Byte)PHY_QueryBBReg(pAdapter, rOFDM0_XBAGCCore1, bMaskByte0);
|
pMptCtx->backup0xc58 = (u1Byte)PHY_QueryBBReg(pAdapter, rOFDM0_XBAGCCore1, bMaskByte0);
|
||||||
pMptCtx->backup0xc30 = (u1Byte)PHY_QueryBBReg(pAdapter, rOFDM0_RxDetector1, bMaskByte0);
|
pMptCtx->backup0xc30 = (u1Byte)PHY_QueryBBReg(pAdapter, rOFDM0_RxDetector1, bMaskByte0);
|
||||||
#ifdef CONFIG_RTL8188E
|
|
||||||
pMptCtx->backup0x52_RF_A = (u1Byte)PHY_QueryRFReg(pAdapter, RF_PATH_A, RF_0x52, 0x000F0);
|
pMptCtx->backup0x52_RF_A = (u1Byte)PHY_QueryRFReg(pAdapter, RF_PATH_A, RF_0x52, 0x000F0);
|
||||||
pMptCtx->backup0x52_RF_B = (u1Byte)PHY_QueryRFReg(pAdapter, RF_PATH_A, RF_0x52, 0x000F0);
|
pMptCtx->backup0x52_RF_B = (u1Byte)PHY_QueryRFReg(pAdapter, RF_PATH_A, RF_0x52, 0x000F0);
|
||||||
#endif
|
|
||||||
|
|
||||||
//set ant to wifi side in mp mode
|
//set ant to wifi side in mp mode
|
||||||
rtw_write16(pAdapter, 0x870, 0x300);
|
rtw_write16(pAdapter, 0x870, 0x300);
|
||||||
|
|
|
@ -1569,16 +1569,7 @@ unsigned int mp_ioctl_xmit_packet_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
NDIS_STATUS oid_rt_set_power_down_hdl(struct oid_par_priv *poid_par_priv)
|
NDIS_STATUS oid_rt_set_power_down_hdl(struct oid_par_priv *poid_par_priv)
|
||||||
{
|
{
|
||||||
#ifdef PLATFORM_OS_XP
|
|
||||||
_irqL oldirql;
|
|
||||||
#endif
|
|
||||||
u8 bpwrup;
|
|
||||||
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
NDIS_STATUS status = NDIS_STATUS_SUCCESS;
|
||||||
#ifdef PLATFORM_LINUX
|
|
||||||
#if defined(CONFIG_SDIO_HCI) || defined(CONFIG_GSPI_HCI)
|
|
||||||
PADAPTER padapter = (PADAPTER)(poid_par_priv->adapter_context);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -1592,18 +1583,9 @@ _func_enter_;
|
||||||
|
|
||||||
_irqlevel_changed_(&oldirql, LOWER);
|
_irqlevel_changed_(&oldirql, LOWER);
|
||||||
|
|
||||||
bpwrup = *(u8 *)poid_par_priv->information_buf;
|
|
||||||
//CALL the power_down function
|
//CALL the power_down function
|
||||||
#ifdef PLATFORM_LINUX
|
|
||||||
#if defined(CONFIG_RTL8712) //Linux MP insmod unknown symbol
|
|
||||||
dev_power_down(padapter,bpwrup);
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
_irqlevel_changed_(&oldirql, RAISE);
|
_irqlevel_changed_(&oldirql, RAISE);
|
||||||
|
|
||||||
//DEBUG_ERR(("\n <=== Query OID_RT_PRO_READ_REGISTER.
|
|
||||||
// Add:0x%08x Width:%d Value:0x%08x\n",RegRWStruct->offset,RegRWStruct->width,RegRWStruct->value));
|
|
||||||
|
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
|
|
@ -2695,7 +2695,9 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
||||||
u8 peer_ch_num = 0;
|
u8 peer_ch_num = 0;
|
||||||
u8 ch_list_inclusioned[50] = { 0x00 };
|
u8 ch_list_inclusioned[50] = { 0x00 };
|
||||||
u8 ch_num_inclusioned = 0;
|
u8 ch_num_inclusioned = 0;
|
||||||
|
#if defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
||||||
u16 cap_attr;
|
u16 cap_attr;
|
||||||
|
#endif //defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
||||||
__le16 le_tmp;
|
__le16 le_tmp;
|
||||||
|
|
||||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_ING);
|
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_ING);
|
||||||
|
@ -2703,9 +2705,8 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
||||||
//Check P2P Capability ATTR
|
//Check P2P Capability ATTR
|
||||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&le_tmp, (uint*)&attr_contentlen) )
|
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&le_tmp, (uint*)&attr_contentlen) )
|
||||||
{
|
{
|
||||||
cap_attr = le16_to_cpu(le_tmp);
|
|
||||||
|
|
||||||
#if defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
#if defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
||||||
|
cap_attr = le16_to_cpu(le_tmp);
|
||||||
if (!(cap_attr & P2P_GRPCAP_INTRABSS) )
|
if (!(cap_attr & P2P_GRPCAP_INTRABSS) )
|
||||||
ptdlsinfo->ap_prohibited = true;
|
ptdlsinfo->ap_prohibited = true;
|
||||||
#endif //defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
#endif //defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
||||||
|
@ -2894,7 +2895,9 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
||||||
uint ch_cnt = 0;
|
uint ch_cnt = 0;
|
||||||
u8 ch_content[50] = { 0x00 };
|
u8 ch_content[50] = { 0x00 };
|
||||||
u8 groupid[ 38 ];
|
u8 groupid[ 38 ];
|
||||||
|
#ifdef CONFIG_TDLS
|
||||||
u16 cap_attr;
|
u16 cap_attr;
|
||||||
|
#endif // CONFIG_TDLS
|
||||||
u8 peer_ch_list[50] = { 0x00 };
|
u8 peer_ch_list[50] = { 0x00 };
|
||||||
u8 peer_ch_num = 0;
|
u8 peer_ch_num = 0;
|
||||||
u8 ch_list_inclusioned[50] = { 0x00 };
|
u8 ch_list_inclusioned[50] = { 0x00 };
|
||||||
|
@ -2904,8 +2907,8 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
||||||
while (p2p_ie) { // Found the P2P IE.
|
while (p2p_ie) { // Found the P2P IE.
|
||||||
//Check P2P Capability ATTR
|
//Check P2P Capability ATTR
|
||||||
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&le_tmp, (uint*)&attr_contentlen) ) {
|
if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&le_tmp, (uint*)&attr_contentlen) ) {
|
||||||
cap_attr = le16_to_cpu(le_tmp);
|
|
||||||
#ifdef CONFIG_TDLS
|
#ifdef CONFIG_TDLS
|
||||||
|
cap_attr = le16_to_cpu(le_tmp);
|
||||||
if (!(cap_attr & P2P_GRPCAP_INTRABSS) )
|
if (!(cap_attr & P2P_GRPCAP_INTRABSS) )
|
||||||
ptdlsinfo->ap_prohibited = true;
|
ptdlsinfo->ap_prohibited = true;
|
||||||
#endif // CONFIG_TDLS
|
#endif // CONFIG_TDLS
|
||||||
|
@ -3222,7 +3225,6 @@ static void find_phase_handler( _adapter* padapter )
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
NDIS_802_11_SSID ssid;
|
NDIS_802_11_SSID ssid;
|
||||||
_irqL irqL;
|
_irqL irqL;
|
||||||
u8 _status = 0;
|
|
||||||
|
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
|
@ -3233,7 +3235,6 @@ _func_enter_;
|
||||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH);
|
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH);
|
||||||
|
|
||||||
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
_enter_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
_status = rtw_sitesurvey_cmd(padapter, &ssid, 1, NULL, 0);
|
|
||||||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -2427,7 +2427,7 @@ union recv_frame * recvframe_defrag(_adapter *adapter,_queue *defrag_q);
|
||||||
union recv_frame * recvframe_defrag(_adapter *adapter,_queue *defrag_q)
|
union recv_frame * recvframe_defrag(_adapter *adapter,_queue *defrag_q)
|
||||||
{
|
{
|
||||||
_list *plist, *phead;
|
_list *plist, *phead;
|
||||||
u8 *data,wlanhdr_offset;
|
u8 wlanhdr_offset;
|
||||||
u8 curfragnum;
|
u8 curfragnum;
|
||||||
struct recv_frame_hdr *pfhdr,*pnfhdr;
|
struct recv_frame_hdr *pfhdr,*pnfhdr;
|
||||||
union recv_frame* prframe, *pnextrframe;
|
union recv_frame* prframe, *pnextrframe;
|
||||||
|
@ -2466,7 +2466,6 @@ _func_enter_;
|
||||||
|
|
||||||
plist = get_next(plist);
|
plist = get_next(plist);
|
||||||
|
|
||||||
data=get_recvframe_data(prframe);
|
|
||||||
|
|
||||||
while (rtw_end_of_queue_search(phead, plist) == false)
|
while (rtw_end_of_queue_search(phead, plist) == false)
|
||||||
{
|
{
|
||||||
|
@ -2785,15 +2784,11 @@ static int amsdu_to_msdu(_adapter *padapter, union recv_frame *prframe)
|
||||||
#ifdef CONFIG_BR_EXT
|
#ifdef CONFIG_BR_EXT
|
||||||
// Insert NAT2.5 RX here!
|
// Insert NAT2.5 RX here!
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
void *br_port = NULL;
|
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35))
|
||||||
br_port = padapter->pnetdev->br_port;
|
|
||||||
#else // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
|
|
||||||
rcu_read_unlock();
|
rcu_read_unlock();
|
||||||
#endif // (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 35))
|
#endif // (LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 35))
|
||||||
|
|
||||||
#endif // CONFIG_BR_EXT
|
#endif // CONFIG_BR_EXT
|
||||||
sub_skb->protocol = eth_type_trans(sub_skb, padapter->pnetdev);
|
sub_skb->protocol = eth_type_trans(sub_skb, padapter->pnetdev);
|
||||||
|
@ -3867,8 +3862,12 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
||||||
u32 tmp_s, tmp_q;
|
u32 tmp_s, tmp_q;
|
||||||
u8 avg_signal_strength = 0;
|
u8 avg_signal_strength = 0;
|
||||||
u8 avg_signal_qual = 0;
|
u8 avg_signal_qual = 0;
|
||||||
|
#if defined(DBG_RX_SIGNAL_DISPLAY_PROCESSING)
|
||||||
u32 num_signal_strength = 0;
|
u32 num_signal_strength = 0;
|
||||||
|
#endif
|
||||||
|
#if defined(DBG_RX_SIGNAL_DISPLAY_PROCESSING)
|
||||||
u32 num_signal_qual = 0;
|
u32 num_signal_qual = 0;
|
||||||
|
#endif
|
||||||
u8 _alpha = 3; // this value is based on converging_constant = 5000 and sampling_interval = 1000
|
u8 _alpha = 3; // this value is based on converging_constant = 5000 and sampling_interval = 1000
|
||||||
|
|
||||||
if (adapter->recvpriv.is_signal_dbg) {
|
if (adapter->recvpriv.is_signal_dbg) {
|
||||||
|
@ -3879,14 +3878,18 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
||||||
|
|
||||||
if (recvpriv->signal_strength_data.update_req == 0) {// update_req is clear, means we got rx
|
if (recvpriv->signal_strength_data.update_req == 0) {// update_req is clear, means we got rx
|
||||||
avg_signal_strength = recvpriv->signal_strength_data.avg_val;
|
avg_signal_strength = recvpriv->signal_strength_data.avg_val;
|
||||||
|
#if defined(DBG_RX_SIGNAL_DISPLAY_PROCESSING)
|
||||||
num_signal_strength = recvpriv->signal_strength_data.total_num;
|
num_signal_strength = recvpriv->signal_strength_data.total_num;
|
||||||
|
#endif
|
||||||
// after avg_vals are accquired, we can re-stat the signal values
|
// after avg_vals are accquired, we can re-stat the signal values
|
||||||
recvpriv->signal_strength_data.update_req = 1;
|
recvpriv->signal_strength_data.update_req = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (recvpriv->signal_qual_data.update_req == 0) {// update_req is clear, means we got rx
|
if (recvpriv->signal_qual_data.update_req == 0) {// update_req is clear, means we got rx
|
||||||
avg_signal_qual = recvpriv->signal_qual_data.avg_val;
|
avg_signal_qual = recvpriv->signal_qual_data.avg_val;
|
||||||
|
#if defined(DBG_RX_SIGNAL_DISPLAY_PROCESSING)
|
||||||
num_signal_qual = recvpriv->signal_qual_data.total_num;
|
num_signal_qual = recvpriv->signal_qual_data.total_num;
|
||||||
|
#endif
|
||||||
// after avg_vals are accquired, we can re-stat the signal values
|
// after avg_vals are accquired, we can re-stat the signal values
|
||||||
recvpriv->signal_qual_data.update_req = 1;
|
recvpriv->signal_qual_data.update_req = 1;
|
||||||
}
|
}
|
||||||
|
@ -3913,7 +3916,7 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
||||||
recvpriv->rssi = (s8)translate_percentage_to_dbm(tmp_s);
|
recvpriv->rssi = (s8)translate_percentage_to_dbm(tmp_s);
|
||||||
recvpriv->signal_qual = tmp_q;
|
recvpriv->signal_qual = tmp_q;
|
||||||
|
|
||||||
#if defined(DBG_RX_SIGNAL_DISPLAY_PROCESSING) && 1
|
#if defined(DBG_RX_SIGNAL_DISPLAY_PROCESSING)
|
||||||
DBG_88E("%s signal_strength:%3u, rssi:%3d, signal_qual:%3u"
|
DBG_88E("%s signal_strength:%3u, rssi:%3d, signal_qual:%3u"
|
||||||
", num_signal_strength:%u, num_signal_qual:%u"
|
", num_signal_strength:%u, num_signal_qual:%u"
|
||||||
"\n"
|
"\n"
|
||||||
|
|
|
@ -653,7 +653,6 @@ u32 rtw_tkip_encrypt(_adapter *padapter, u8 *pxmitframe)
|
||||||
u8 hw_hdr_offset = 0;
|
u8 hw_hdr_offset = 0;
|
||||||
struct arc4context mycontext;
|
struct arc4context mycontext;
|
||||||
sint curfragnum,length;
|
sint curfragnum,length;
|
||||||
u32 prwskeylen;
|
|
||||||
|
|
||||||
u8 *pframe, *payload,*iv,*prwskey;
|
u8 *pframe, *payload,*iv,*prwskey;
|
||||||
union pn48 dot11txpn;
|
union pn48 dot11txpn;
|
||||||
|
@ -703,8 +702,6 @@ _func_enter_;
|
||||||
prwskey=&stainfo->dot118021x_UncstKey.skey[0];
|
prwskey=&stainfo->dot118021x_UncstKey.skey[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
prwskeylen=16;
|
|
||||||
|
|
||||||
for (curfragnum=0;curfragnum<pattrib->nr_frags;curfragnum++){
|
for (curfragnum=0;curfragnum<pattrib->nr_frags;curfragnum++){
|
||||||
iv=pframe+pattrib->hdrlen;
|
iv=pframe+pattrib->hdrlen;
|
||||||
payload=pframe+pattrib->iv_len+pattrib->hdrlen;
|
payload=pframe+pattrib->iv_len+pattrib->hdrlen;
|
||||||
|
@ -767,7 +764,6 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe)
|
||||||
u8 crc[4];
|
u8 crc[4];
|
||||||
struct arc4context mycontext;
|
struct arc4context mycontext;
|
||||||
sint length;
|
sint length;
|
||||||
u32 prwskeylen;
|
|
||||||
|
|
||||||
u8 *pframe, *payload,*iv,*prwskey;
|
u8 *pframe, *payload,*iv,*prwskey;
|
||||||
union pn48 dot11txpn;
|
union pn48 dot11txpn;
|
||||||
|
@ -798,13 +794,11 @@ _func_enter_;
|
||||||
//DBG_88E("rx bc/mc packets, to perform sw rtw_tkip_decrypt\n");
|
//DBG_88E("rx bc/mc packets, to perform sw rtw_tkip_decrypt\n");
|
||||||
//prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
|
//prwskey = psecuritypriv->dot118021XGrpKey[psecuritypriv->dot118021XGrpKeyid].skey;
|
||||||
prwskey = psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey;
|
prwskey = psecuritypriv->dot118021XGrpKey[prxattrib->key_index].skey;
|
||||||
prwskeylen=16;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("rtw_tkip_decrypt: stainfo!=NULL!!!\n"));
|
RT_TRACE(_module_rtl871x_security_c_,_drv_err_,("rtw_tkip_decrypt: stainfo!=NULL!!!\n"));
|
||||||
prwskey=&stainfo->dot118021x_UncstKey.skey[0];
|
prwskey=&stainfo->dot118021x_UncstKey.skey[0];
|
||||||
prwskeylen=16;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
iv=pframe+prxattrib->hdrlen;
|
iv=pframe+prxattrib->hdrlen;
|
||||||
|
@ -1513,7 +1507,6 @@ u32 rtw_aes_encrypt(_adapter *padapter, u8 *pxmitframe)
|
||||||
|
|
||||||
/* Intermediate Buffers */
|
/* Intermediate Buffers */
|
||||||
sint curfragnum,length;
|
sint curfragnum,length;
|
||||||
u32 prwskeylen;
|
|
||||||
u8 *pframe,*prwskey; //, *payload,*iv
|
u8 *pframe,*prwskey; //, *payload,*iv
|
||||||
u8 hw_hdr_offset = 0;
|
u8 hw_hdr_offset = 0;
|
||||||
struct sta_info *stainfo;
|
struct sta_info *stainfo;
|
||||||
|
@ -1576,9 +1569,6 @@ _func_enter_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif //CONFIG_TDLS
|
#endif //CONFIG_TDLS
|
||||||
|
|
||||||
prwskeylen=16;
|
|
||||||
|
|
||||||
for (curfragnum=0;curfragnum<pattrib->nr_frags;curfragnum++){
|
for (curfragnum=0;curfragnum<pattrib->nr_frags;curfragnum++){
|
||||||
|
|
||||||
if ((curfragnum+1)==pattrib->nr_frags){ //4 the last fragment
|
if ((curfragnum+1)==pattrib->nr_frags){ //4 the last fragment
|
||||||
|
|
|
@ -319,12 +319,9 @@ _func_exit_;
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
||||||
//struct sta_info *rtw_alloc_stainfo(_queue *pfree_sta_queue, unsigned char *hwaddr)
|
|
||||||
struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
|
||||||
{
|
{
|
||||||
_irqL irqL, irqL2;
|
_irqL irqL, irqL2;
|
||||||
uint tmp_aid;
|
|
||||||
s32 index;
|
s32 index;
|
||||||
_list *phash_list;
|
_list *phash_list;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
|
@ -339,30 +336,18 @@ _func_enter_;
|
||||||
|
|
||||||
_enter_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
_enter_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
||||||
|
|
||||||
if (_rtw_queue_empty(pfree_sta_queue) == true)
|
if (_rtw_queue_empty(pfree_sta_queue) == true) {
|
||||||
{
|
|
||||||
_exit_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
_exit_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
||||||
psta = NULL;
|
psta = NULL;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue), struct sta_info, list);
|
||||||
|
|
||||||
rtw_list_delete(&(psta->list));
|
rtw_list_delete(&(psta->list));
|
||||||
|
|
||||||
_exit_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
_exit_critical_bh(&(pfree_sta_queue->lock), &irqL);
|
||||||
|
|
||||||
tmp_aid = psta->aid;
|
|
||||||
|
|
||||||
_rtw_init_stainfo(psta);
|
_rtw_init_stainfo(psta);
|
||||||
|
|
||||||
_rtw_memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
|
_rtw_memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
|
||||||
|
|
||||||
index = wifi_mac_hash(hwaddr);
|
index = wifi_mac_hash(hwaddr);
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_info_,("rtw_alloc_stainfo: index = %x", index));
|
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_info_,("rtw_alloc_stainfo: index = %x", index));
|
||||||
|
if (index >= NUM_STA) {
|
||||||
if (index >= NUM_STA){
|
|
||||||
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("ERROR=> rtw_alloc_stainfo: index >= NUM_STA"));
|
RT_TRACE(_module_rtl871x_sta_mgt_c_,_drv_err_,("ERROR=> rtw_alloc_stainfo: index >= NUM_STA"));
|
||||||
psta= NULL;
|
psta= NULL;
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -733,7 +718,6 @@ u32 rtw_init_bcmc_stainfo(_adapter* padapter)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
struct tx_servq *ptxservq;
|
|
||||||
u32 res=_SUCCESS;
|
u32 res=_SUCCESS;
|
||||||
NDIS_802_11_MAC_ADDRESS bcast_addr= {0xff,0xff,0xff,0xff,0xff,0xff};
|
NDIS_802_11_MAC_ADDRESS bcast_addr= {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||||
|
|
||||||
|
@ -753,24 +737,11 @@ _func_enter_;
|
||||||
// default broadcast & multicast use macid 1
|
// default broadcast & multicast use macid 1
|
||||||
psta->mac_id = 1;
|
psta->mac_id = 1;
|
||||||
|
|
||||||
ptxservq= &(psta->sta_xmitpriv.be_q);
|
|
||||||
|
|
||||||
/*
|
|
||||||
_enter_critical(&pstapending->lock, &irqL0);
|
|
||||||
|
|
||||||
if (rtw_is_list_empty(&ptxservq->tx_pending))
|
|
||||||
rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(pstapending));
|
|
||||||
|
|
||||||
_exit_critical(&pstapending->lock, &irqL0);
|
|
||||||
*/
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
_func_exit_;
|
_func_exit_;
|
||||||
return _SUCCESS;
|
return res;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct sta_info* rtw_get_bcmc_stainfo(_adapter* padapter)
|
struct sta_info* rtw_get_bcmc_stainfo(_adapter* padapter)
|
||||||
{
|
{
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
|
|
|
@ -2262,7 +2262,11 @@ int update_sta_support_rate(_adapter *padapter, u8* pvar_ie, uint var_ie_len, in
|
||||||
void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr)
|
void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr)
|
||||||
{
|
{
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
u16 tid, start_seq, param;
|
u16 tid;
|
||||||
|
#ifdef CONFIG_UPDATE_INDICATE_SEQ_WHILE_PROCESS_ADDBA_REQ
|
||||||
|
u16 start_seq;
|
||||||
|
#endif
|
||||||
|
u16 param;
|
||||||
struct recv_reorder_ctrl *preorder_ctrl;
|
struct recv_reorder_ctrl *preorder_ctrl;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct ADDBA_request *preq = (struct ADDBA_request*)paddba_req;
|
struct ADDBA_request *preq = (struct ADDBA_request*)paddba_req;
|
||||||
|
@ -2271,9 +2275,10 @@ void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr)
|
||||||
|
|
||||||
psta = rtw_get_stainfo(pstapriv, addr);
|
psta = rtw_get_stainfo(pstapriv, addr);
|
||||||
|
|
||||||
if (psta)
|
if (psta) {
|
||||||
{
|
#ifdef CONFIG_UPDATE_INDICATE_SEQ_WHILE_PROCESS_ADDBA_REQ
|
||||||
start_seq = le16_to_cpu(preq->BA_starting_seqctrl) >> 4;
|
start_seq = le16_to_cpu(preq->BA_starting_seqctrl) >> 4;
|
||||||
|
#endif
|
||||||
|
|
||||||
param = le16_to_cpu(preq->BA_para_set);
|
param = le16_to_cpu(preq->BA_para_set);
|
||||||
tid = (param>>2)&0x0f;
|
tid = (param>>2)&0x0f;
|
||||||
|
@ -2292,7 +2297,6 @@ void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr)
|
||||||
|
|
||||||
preorder_ctrl->enable =(pmlmeinfo->bAcceptAddbaReq == true)? true :false;
|
preorder_ctrl->enable =(pmlmeinfo->bAcceptAddbaReq == true)? true :false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
|
void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len)
|
||||||
|
|
|
@ -598,7 +598,6 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
|
||||||
|
|
||||||
static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattrib)
|
static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattrib)
|
||||||
{
|
{
|
||||||
uint i;
|
|
||||||
struct pkt_file pktfile;
|
struct pkt_file pktfile;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct ethhdr etherhdr;
|
struct ethhdr etherhdr;
|
||||||
|
@ -613,7 +612,7 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
||||||
_func_enter_;
|
_func_enter_;
|
||||||
|
|
||||||
_rtw_open_pktfile(pkt, &pktfile);
|
_rtw_open_pktfile(pkt, &pktfile);
|
||||||
i = _rtw_pktfile_read(&pktfile, (u8*)ðerhdr, ETH_HLEN);
|
_rtw_pktfile_read(&pktfile, (u8*)ðerhdr, ETH_HLEN);
|
||||||
|
|
||||||
pattrib->ether_type = ntohs(etherhdr.h_proto);
|
pattrib->ether_type = ntohs(etherhdr.h_proto);
|
||||||
|
|
||||||
|
|
|
@ -582,14 +582,12 @@ odm_PTDecision_8188E(
|
||||||
PODM_RA_INFO_T pRaInfo
|
PODM_RA_INFO_T pRaInfo
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
u1Byte stage_BUF;
|
|
||||||
u1Byte j;
|
u1Byte j;
|
||||||
u1Byte temp_stage;
|
u1Byte temp_stage;
|
||||||
u4Byte numsc;
|
u4Byte numsc;
|
||||||
u4Byte num_total;
|
u4Byte num_total;
|
||||||
u1Byte stage_id;
|
u1Byte stage_id;
|
||||||
|
|
||||||
stage_BUF=pRaInfo->PTStage;
|
|
||||||
numsc = 0;
|
numsc = 0;
|
||||||
num_total= pRaInfo->TOTAL* PT_PENALTY[5];
|
num_total= pRaInfo->TOTAL* PT_PENALTY[5];
|
||||||
for (j=0;j<=4;j++)
|
for (j=0;j<=4;j++)
|
||||||
|
|
|
@ -172,7 +172,7 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
|
||||||
u4Byte ThermalValue_AVG = 0;
|
u4Byte ThermalValue_AVG = 0;
|
||||||
s4Byte ele_A=0, ele_D, TempCCk, X, value32;
|
s4Byte ele_A=0, ele_D, TempCCk, X, value32;
|
||||||
s4Byte Y, ele_C=0;
|
s4Byte Y, ele_C=0;
|
||||||
s1Byte OFDM_index[2], CCK_index=0, OFDM_index_old[2]={0,0}, CCK_index_old=0, index;
|
s1Byte OFDM_index[2], CCK_index=0, OFDM_index_old[2]={0,0}, CCK_index_old=0;
|
||||||
u4Byte i = 0, j = 0;
|
u4Byte i = 0, j = 0;
|
||||||
bool is2T = false;
|
bool is2T = false;
|
||||||
bool bInteralPA = false;
|
bool bInteralPA = false;
|
||||||
|
@ -417,8 +417,6 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
|
||||||
if (offset >= index_mapping_NUM_88E)
|
if (offset >= index_mapping_NUM_88E)
|
||||||
offset = index_mapping_NUM_88E-1;
|
offset = index_mapping_NUM_88E-1;
|
||||||
|
|
||||||
index = OFDM_index_mapping[j][offset];
|
|
||||||
|
|
||||||
for (i = 0; i < rf; i++)
|
for (i = 0; i < rf; i++)
|
||||||
OFDM_index[i] = pDM_Odm->RFCalibrateInfo.OFDM_index[i] + OFDM_index_mapping[j][offset];
|
OFDM_index[i] = pDM_Odm->RFCalibrateInfo.OFDM_index[i] + OFDM_index_mapping[j][offset];
|
||||||
CCK_index = pDM_Odm->RFCalibrateInfo.CCK_index + OFDM_index_mapping[j][offset];
|
CCK_index = pDM_Odm->RFCalibrateInfo.CCK_index + OFDM_index_mapping[j][offset];
|
||||||
|
@ -2338,7 +2336,7 @@ PHY_IQCalibrate_8188E(
|
||||||
bool bPathAOK, bPathBOK;
|
bool bPathAOK, bPathBOK;
|
||||||
s4Byte RegE94, RegE9C, RegEA4, RegEAC, RegEB4, RegEBC, RegEC4, RegECC, RegTmp = 0;
|
s4Byte RegE94, RegE9C, RegEA4, RegEAC, RegEB4, RegEBC, RegEC4, RegECC, RegTmp = 0;
|
||||||
bool is12simular, is13simular, is23simular;
|
bool is12simular, is13simular, is23simular;
|
||||||
bool bStartContTx = false, bSingleTone = false, bCarrierSuppression = false;
|
bool bSingleTone = false, bCarrierSuppression = false;
|
||||||
u4Byte IQK_BB_REG_92C[IQK_BB_REG_NUM] = {
|
u4Byte IQK_BB_REG_92C[IQK_BB_REG_NUM] = {
|
||||||
rOFDM0_XARxIQImbalance, rOFDM0_XBRxIQImbalance,
|
rOFDM0_XARxIQImbalance, rOFDM0_XBRxIQImbalance,
|
||||||
rOFDM0_ECCAThreshold, rOFDM0_AGCRSSITable,
|
rOFDM0_ECCAThreshold, rOFDM0_AGCRSSITable,
|
||||||
|
@ -2378,7 +2376,6 @@ PHY_IQCalibrate_8188E(
|
||||||
#if MP_DRIVER == 1
|
#if MP_DRIVER == 1
|
||||||
if (*(pDM_Odm->mp_mode) == 1)
|
if (*(pDM_Odm->mp_mode) == 1)
|
||||||
{
|
{
|
||||||
bStartContTx = pMptCtx->bStartContTx;
|
|
||||||
bSingleTone = pMptCtx->bSingleTone;
|
bSingleTone = pMptCtx->bSingleTone;
|
||||||
bCarrierSuppression = pMptCtx->bCarrierSuppression;
|
bCarrierSuppression = pMptCtx->bCarrierSuppression;
|
||||||
}
|
}
|
||||||
|
@ -2579,7 +2576,7 @@ PHY_LCCalibrate_8188E(
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
bool bStartContTx = false, bSingleTone = false, bCarrierSuppression = false;
|
bool bSingleTone = false, bCarrierSuppression = false;
|
||||||
u4Byte timeout = 2000, timecount = 0;
|
u4Byte timeout = 2000, timecount = 0;
|
||||||
|
|
||||||
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
#if !(DM_ODM_SUPPORT_TYPE & ODM_AP)
|
||||||
|
@ -2606,7 +2603,6 @@ PHY_LCCalibrate_8188E(
|
||||||
#if MP_DRIVER == 1
|
#if MP_DRIVER == 1
|
||||||
if (*(pDM_Odm->mp_mode) == 1)
|
if (*(pDM_Odm->mp_mode) == 1)
|
||||||
{
|
{
|
||||||
bStartContTx = pMptCtx->bStartContTx;
|
|
||||||
bSingleTone = pMptCtx->bSingleTone;
|
bSingleTone = pMptCtx->bSingleTone;
|
||||||
bCarrierSuppression = pMptCtx->bCarrierSuppression;
|
bCarrierSuppression = pMptCtx->bCarrierSuppression;
|
||||||
}
|
}
|
||||||
|
|
|
@ -367,14 +367,13 @@ odm_RxPhyStatus92CSeries_Parsing(
|
||||||
|
|
||||||
PPHY_STATUS_RPT_8192CD_T pPhyStaRpt = (PPHY_STATUS_RPT_8192CD_T)pPhyStatus;
|
PPHY_STATUS_RPT_8192CD_T pPhyStaRpt = (PPHY_STATUS_RPT_8192CD_T)pPhyStatus;
|
||||||
|
|
||||||
isCCKrate = ((pPktinfo->Rate >= DESC92C_RATE1M) && (pPktinfo->Rate <= DESC92C_RATE11M))?true :false;
|
isCCKrate = ((pPktinfo->Rate >= DESC92C_RATE1M) && (pPktinfo->Rate <= DESC92C_RATE11M)) ? true : false;
|
||||||
|
|
||||||
pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_A] = -1;
|
pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_A] = -1;
|
||||||
pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_B] = -1;
|
pPhyInfo->RxMIMOSignalQuality[ODM_RF_PATH_B] = -1;
|
||||||
|
|
||||||
|
|
||||||
if (isCCKrate)
|
if (isCCKrate) {
|
||||||
{
|
|
||||||
u1Byte report;
|
u1Byte report;
|
||||||
u1Byte cck_agc_rpt;
|
u1Byte cck_agc_rpt;
|
||||||
|
|
||||||
|
@ -384,56 +383,49 @@ odm_RxPhyStatus92CSeries_Parsing(
|
||||||
// (2)PWDB, Average PWDB cacluated by hardware (for rate adaptive)
|
// (2)PWDB, Average PWDB cacluated by hardware (for rate adaptive)
|
||||||
//
|
//
|
||||||
|
|
||||||
//if (pHalData->eRFPowerState == eRfOn)
|
cck_highpwr = pDM_Odm->bCckHighPower;
|
||||||
cck_highpwr = pDM_Odm->bCckHighPower;
|
|
||||||
//else
|
|
||||||
// cck_highpwr = false;
|
|
||||||
|
|
||||||
cck_agc_rpt = pPhyStaRpt->cck_agc_rpt_ofdm_cfosho_a ;
|
cck_agc_rpt = pPhyStaRpt->cck_agc_rpt_ofdm_cfosho_a ;
|
||||||
|
|
||||||
//2011.11.28 LukeLee: 88E use different LNA & VGA gain table
|
//2011.11.28 LukeLee: 88E use different LNA & VGA gain table
|
||||||
//The RSSI formula should be modified according to the gain table
|
//The RSSI formula should be modified according to the gain table
|
||||||
//In 88E, cck_highpwr is always set to 1
|
//In 88E, cck_highpwr is always set to 1
|
||||||
if (pDM_Odm->SupportICType & (ODM_RTL8188E|ODM_RTL8812))
|
if (pDM_Odm->SupportICType & (ODM_RTL8188E|ODM_RTL8812)) {
|
||||||
{
|
|
||||||
LNA_idx = ((cck_agc_rpt & 0xE0) >>5);
|
LNA_idx = ((cck_agc_rpt & 0xE0) >>5);
|
||||||
VGA_idx = (cck_agc_rpt & 0x1F);
|
VGA_idx = (cck_agc_rpt & 0x1F);
|
||||||
switch (LNA_idx)
|
switch (LNA_idx) {
|
||||||
{
|
case 7:
|
||||||
case 7:
|
if (VGA_idx <= 27)
|
||||||
if (VGA_idx <= 27)
|
rx_pwr_all = -100 + 2*(27-VGA_idx); //VGA_idx = 27~2
|
||||||
rx_pwr_all = -100 + 2*(27-VGA_idx); //VGA_idx = 27~2
|
else
|
||||||
else
|
rx_pwr_all = -100;
|
||||||
rx_pwr_all = -100;
|
break;
|
||||||
break;
|
case 6:
|
||||||
case 6:
|
rx_pwr_all = -48 + 2*(2-VGA_idx); //VGA_idx = 2~0
|
||||||
rx_pwr_all = -48 + 2*(2-VGA_idx); //VGA_idx = 2~0
|
break;
|
||||||
break;
|
case 5:
|
||||||
case 5:
|
rx_pwr_all = -42 + 2*(7-VGA_idx); //VGA_idx = 7~5
|
||||||
rx_pwr_all = -42 + 2*(7-VGA_idx); //VGA_idx = 7~5
|
break;
|
||||||
break;
|
case 4:
|
||||||
case 4:
|
rx_pwr_all = -36 + 2*(7-VGA_idx); //VGA_idx = 7~4
|
||||||
rx_pwr_all = -36 + 2*(7-VGA_idx); //VGA_idx = 7~4
|
break;
|
||||||
break;
|
case 3:
|
||||||
case 3:
|
rx_pwr_all = -24 + 2*(7-VGA_idx); //VGA_idx = 7~0
|
||||||
//rx_pwr_all = -28 + 2*(7-VGA_idx); //VGA_idx = 7~0
|
break;
|
||||||
rx_pwr_all = -24 + 2*(7-VGA_idx); //VGA_idx = 7~0
|
case 2:
|
||||||
break;
|
if (cck_highpwr)
|
||||||
case 2:
|
rx_pwr_all = -12 + 2*(5-VGA_idx); //VGA_idx = 5~0
|
||||||
if (cck_highpwr)
|
else
|
||||||
rx_pwr_all = -12 + 2*(5-VGA_idx); //VGA_idx = 5~0
|
rx_pwr_all = -6+ 2*(5-VGA_idx);
|
||||||
else
|
break;
|
||||||
rx_pwr_all = -6+ 2*(5-VGA_idx);
|
case 1:
|
||||||
break;
|
rx_pwr_all = 8-2*VGA_idx;
|
||||||
case 1:
|
break;
|
||||||
rx_pwr_all = 8-2*VGA_idx;
|
case 0:
|
||||||
break;
|
rx_pwr_all = 14-2*VGA_idx;
|
||||||
case 0:
|
break;
|
||||||
rx_pwr_all = 14-2*VGA_idx;
|
default:
|
||||||
break;
|
break;
|
||||||
default:
|
|
||||||
//DbgPrint("CCK Exception default\n");
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
rx_pwr_all += 6;
|
rx_pwr_all += 6;
|
||||||
PWDB_ALL = odm_QueryRxPwrPercentage(rx_pwr_all);
|
PWDB_ALL = odm_QueryRxPwrPercentage(rx_pwr_all);
|
||||||
|
@ -716,8 +708,7 @@ odm_Init_RSSIForDM(
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void odm_Process_RSSIForDM(
|
||||||
odm_Process_RSSIForDM(
|
|
||||||
PDM_ODM_T pDM_Odm,
|
PDM_ODM_T pDM_Odm,
|
||||||
PODM_PHY_INFO_T pPhyInfo,
|
PODM_PHY_INFO_T pPhyInfo,
|
||||||
PODM_PACKET_INFO_T pPktinfo
|
PODM_PACKET_INFO_T pPktinfo
|
||||||
|
@ -750,7 +741,7 @@ odm_Process_RSSIForDM(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
isCCKrate = ((pPktinfo->Rate >= DESC92C_RATE1M) && (pPktinfo->Rate <= DESC92C_RATE11M))?true :false;
|
isCCKrate = ((pPktinfo->Rate >= DESC92C_RATE1M) && (pPktinfo->Rate <= DESC92C_RATE11M)) ? true : false;
|
||||||
|
|
||||||
#if (defined(CONFIG_HW_ANTENNA_DIVERSITY))
|
#if (defined(CONFIG_HW_ANTENNA_DIVERSITY))
|
||||||
#if ((RTL8192C_SUPPORT == 1) ||(RTL8192D_SUPPORT == 1))
|
#if ((RTL8192C_SUPPORT == 1) ||(RTL8192D_SUPPORT == 1))
|
||||||
|
|
|
@ -57,13 +57,12 @@ static s32 iol_execute(PADAPTER padapter, u8 control)
|
||||||
s32 status = _FAIL;
|
s32 status = _FAIL;
|
||||||
u8 reg_0x88 = 0,reg_1c7=0;
|
u8 reg_0x88 = 0,reg_1c7=0;
|
||||||
u32 start = 0, passing_time = 0;
|
u32 start = 0, passing_time = 0;
|
||||||
u32 t1,t2;
|
|
||||||
|
|
||||||
control = control&0x0f;
|
control = control&0x0f;
|
||||||
reg_0x88 = rtw_read8(padapter, REG_HMEBOX_E0);
|
reg_0x88 = rtw_read8(padapter, REG_HMEBOX_E0);
|
||||||
rtw_write8(padapter, REG_HMEBOX_E0, reg_0x88|control);
|
rtw_write8(padapter, REG_HMEBOX_E0, reg_0x88|control);
|
||||||
|
|
||||||
t1 = start = rtw_get_current_time();
|
start = rtw_get_current_time();
|
||||||
while ((reg_0x88=rtw_read8(padapter, REG_HMEBOX_E0)) & control &&
|
while ((reg_0x88=rtw_read8(padapter, REG_HMEBOX_E0)) & control &&
|
||||||
(passing_time=rtw_get_passing_time_ms(start))<1000) {
|
(passing_time=rtw_get_passing_time_ms(start))<1000) {
|
||||||
}
|
}
|
||||||
|
@ -72,7 +71,6 @@ static s32 iol_execute(PADAPTER padapter, u8 control)
|
||||||
status = (reg_0x88 & control)?_FAIL:_SUCCESS;
|
status = (reg_0x88 & control)?_FAIL:_SUCCESS;
|
||||||
if (reg_0x88 & control<<4)
|
if (reg_0x88 & control<<4)
|
||||||
status = _FAIL;
|
status = _FAIL;
|
||||||
t2= rtw_get_current_time();
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +97,6 @@ efuse_phymap_to_logical(u8 * phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
|
||||||
u16 i, j;
|
u16 i, j;
|
||||||
u16 **eFuseWord = NULL;
|
u16 **eFuseWord = NULL;
|
||||||
u16 efuse_utilized = 0;
|
u16 efuse_utilized = 0;
|
||||||
u8 efuse_usage = 0;
|
|
||||||
u8 u1temp = 0;
|
u8 u1temp = 0;
|
||||||
|
|
||||||
efuseTbl = (u8*)rtw_zmalloc(EFUSE_MAP_LEN_88E);
|
efuseTbl = (u8*)rtw_zmalloc(EFUSE_MAP_LEN_88E);
|
||||||
|
@ -207,7 +204,6 @@ efuse_phymap_to_logical(u8 * phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
|
||||||
//
|
//
|
||||||
// 5. Calculate Efuse utilization.
|
// 5. Calculate Efuse utilization.
|
||||||
//
|
//
|
||||||
efuse_usage = (u1Byte)((efuse_utilized*100)/EFUSE_REAL_CONTENT_LEN_88E);
|
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
if (efuseTbl)
|
if (efuseTbl)
|
||||||
|
@ -359,7 +355,6 @@ static int rtl8188e_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit
|
||||||
u32 passing_time_ms;
|
u32 passing_time_ms;
|
||||||
u8 polling_ret,i;
|
u8 polling_ret,i;
|
||||||
int ret = _FAIL;
|
int ret = _FAIL;
|
||||||
u32 t1,t2;
|
|
||||||
|
|
||||||
if (rtw_IOL_append_END_cmd(xmit_frame) != _SUCCESS)
|
if (rtw_IOL_append_END_cmd(xmit_frame) != _SUCCESS)
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -374,7 +369,6 @@ static int rtl8188e_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit
|
||||||
|
|
||||||
dump_mgntframe_and_wait(adapter, xmit_frame, max_wating_ms);
|
dump_mgntframe_and_wait(adapter, xmit_frame, max_wating_ms);
|
||||||
|
|
||||||
t1= rtw_get_current_time();
|
|
||||||
iol_mode_enable(adapter, 1);
|
iol_mode_enable(adapter, 1);
|
||||||
for (i=0;i<bndy_cnt;i++){
|
for (i=0;i<bndy_cnt;i++){
|
||||||
u8 page_no = 0;
|
u8 page_no = 0;
|
||||||
|
@ -383,7 +377,6 @@ static int rtl8188e_IOL_exec_cmds_sync(ADAPTER *adapter, struct xmit_frame *xmit
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
iol_mode_enable(adapter, 0);
|
iol_mode_enable(adapter, 0);
|
||||||
t2 = rtw_get_current_time();
|
|
||||||
exit:
|
exit:
|
||||||
//restore BCN_HEAD
|
//restore BCN_HEAD
|
||||||
rtw_write8(adapter, REG_TDECTRL+1, 0);
|
rtw_write8(adapter, REG_TDECTRL+1, 0);
|
||||||
|
@ -1036,7 +1029,6 @@ Hal_EfuseReadEFuse88E(
|
||||||
//u16 eFuseWord[EFUSE_MAX_SECTION_88E][EFUSE_MAX_WORD_UNIT];
|
//u16 eFuseWord[EFUSE_MAX_SECTION_88E][EFUSE_MAX_WORD_UNIT];
|
||||||
u16 **eFuseWord = NULL;
|
u16 **eFuseWord = NULL;
|
||||||
u16 efuse_utilized = 0;
|
u16 efuse_utilized = 0;
|
||||||
u8 efuse_usage = 0;
|
|
||||||
u8 u1temp = 0;
|
u8 u1temp = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -1201,7 +1193,6 @@ Hal_EfuseReadEFuse88E(
|
||||||
//
|
//
|
||||||
// 5. Calculate Efuse utilization.
|
// 5. Calculate Efuse utilization.
|
||||||
//
|
//
|
||||||
efuse_usage = (u1Byte)((eFuse_Addr*100)/EFUSE_REAL_CONTENT_LEN_88E);
|
|
||||||
rtw_hal_set_hwreg(Adapter, HW_VAR_EFUSE_BYTES, (u8 *)&eFuse_Addr);
|
rtw_hal_set_hwreg(Adapter, HW_VAR_EFUSE_BYTES, (u8 *)&eFuse_Addr);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
@ -2884,15 +2875,12 @@ Hal_EEValueCheck(
|
||||||
{
|
{
|
||||||
case EETYPE_TX_PWR:
|
case EETYPE_TX_PWR:
|
||||||
{
|
{
|
||||||
u8 *pIn, *pOut;
|
s8 *pIn, *pOut;
|
||||||
pIn = (u8*)pInValue;
|
pIn = (u8*)pInValue;
|
||||||
pOut = (u8*)pOutValue;
|
pOut = (u8*)pOutValue;
|
||||||
if (*pIn >= 0 && *pIn <= 63)
|
if (*pIn >= 0 && *pIn <= 63) {
|
||||||
{
|
|
||||||
*pOut = *pIn;
|
*pOut = *pIn;
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("EETYPE_TX_PWR, value=%d is invalid, set to default=0x%x\n",
|
RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("EETYPE_TX_PWR, value=%d is invalid, set to default=0x%x\n",
|
||||||
*pIn, EEPROM_Default_TxPowerLevel));
|
*pIn, EEPROM_Default_TxPowerLevel));
|
||||||
*pOut = EEPROM_Default_TxPowerLevel;
|
*pOut = EEPROM_Default_TxPowerLevel;
|
||||||
|
|
|
@ -883,11 +883,14 @@ s32 PHY_MACConfig8188E(PADAPTER Adapter)
|
||||||
{
|
{
|
||||||
int rtStatus = _SUCCESS;
|
int rtStatus = _SUCCESS;
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||||
|
#ifndef CONFIG_EMBEDDED_FWIMG
|
||||||
s8 *pszMACRegFile;
|
s8 *pszMACRegFile;
|
||||||
|
#endif
|
||||||
s8 sz8188EMACRegFile[] = RTL8188E_PHY_MACREG;
|
s8 sz8188EMACRegFile[] = RTL8188E_PHY_MACREG;
|
||||||
|
|
||||||
|
#ifndef CONFIG_EMBEDDED_FWIMG
|
||||||
pszMACRegFile = sz8188EMACRegFile;
|
pszMACRegFile = sz8188EMACRegFile;
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
// Config MAC
|
// Config MAC
|
||||||
//
|
//
|
||||||
|
@ -1469,15 +1472,20 @@ phy_BB8188E_Config_ParaFile(
|
||||||
u8 sz8188EBBRegPgFile[] = RTL8188E_PHY_REG_PG;
|
u8 sz8188EBBRegPgFile[] = RTL8188E_PHY_REG_PG;
|
||||||
u8 sz8188EBBRegMpFile[] = RTL8188E_PHY_REG_MP;
|
u8 sz8188EBBRegMpFile[] = RTL8188E_PHY_REG_MP;
|
||||||
|
|
||||||
u8 *pszBBRegFile = NULL, *pszAGCTableFile = NULL, *pszBBRegPgFile = NULL, *pszBBRegMpFile=NULL;
|
#ifndef CONFIG_EMBEDDED_FWIMG
|
||||||
|
u8 *pszBBRegFile = NULL;
|
||||||
|
u8 *pszBBRegPgFile = NULL;
|
||||||
|
u8 *pszAGCTableFile = NULL;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//RT_TRACE(COMP_INIT, DBG_TRACE, ("==>phy_BB8192S_Config_ParaFile\n"));
|
//RT_TRACE(COMP_INIT, DBG_TRACE, ("==>phy_BB8192S_Config_ParaFile\n"));
|
||||||
|
|
||||||
pszBBRegFile = sz8188EBBRegFile ;
|
#ifndef CONFIG_EMBEDDED_FWIMG
|
||||||
pszAGCTableFile = sz8188EAGCTableFile;
|
pszBBRegFile = sz8188EBBRegFile;
|
||||||
pszBBRegPgFile = sz8188EBBRegPgFile;
|
pszBBRegPgFile = sz8188EBBRegPgFile;
|
||||||
pszBBRegMpFile = sz8188EBBRegMpFile;
|
pszAGCTableFile = sz8188EAGCTableFile;
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// 1. Read PHY_REG.TXT BB INIT!!
|
// 1. Read PHY_REG.TXT BB INIT!!
|
||||||
|
@ -2707,8 +2715,4 @@ static bool _PHY_QueryRFPathSwitch(PADAPTER pAdapter, bool is2T)
|
||||||
|
|
||||||
static void _PHY_DumpRFReg(PADAPTER pAdapter)
|
static void _PHY_DumpRFReg(PADAPTER pAdapter)
|
||||||
{
|
{
|
||||||
u32 rfRegValue,rfRegOffset;
|
|
||||||
|
|
||||||
for (rfRegOffset = 0x00;rfRegOffset<=0x30;rfRegOffset++)
|
|
||||||
rfRegValue = PHY_QueryRFReg(pAdapter,RF_PATH_A, rfRegOffset, bMaskDWord);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -650,13 +650,12 @@ phy_RF6052_Config_ParaFile(
|
||||||
|
|
||||||
static char sz88eRadioAFile[] = RTL8188E_PHY_RADIO_A;
|
static char sz88eRadioAFile[] = RTL8188E_PHY_RADIO_A;
|
||||||
static char sz88eRadioBFile[] = RTL8188E_PHY_RADIO_B;
|
static char sz88eRadioBFile[] = RTL8188E_PHY_RADIO_B;
|
||||||
|
#ifndef CONFIG_EMBEDDED_FWIMG
|
||||||
char *pszRadioAFile, *pszRadioBFile;
|
char *pszRadioAFile, *pszRadioBFile;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
pszRadioAFile = sz88eRadioAFile;
|
pszRadioAFile = sz88eRadioAFile;
|
||||||
pszRadioBFile = sz88eRadioBFile;
|
pszRadioBFile = sz88eRadioBFile;
|
||||||
|
#endif
|
||||||
|
|
||||||
//3//-----------------------------------------------------------------
|
//3//-----------------------------------------------------------------
|
||||||
//3// <2> Initialize RF
|
//3// <2> Initialize RF
|
||||||
|
|
|
@ -185,10 +185,6 @@ void update_recvframe_attrib_88e(
|
||||||
{
|
{
|
||||||
struct rx_pkt_attrib *pattrib;
|
struct rx_pkt_attrib *pattrib;
|
||||||
struct recv_stat report;
|
struct recv_stat report;
|
||||||
PRXREPORT prxreport;
|
|
||||||
//struct recv_frame_hdr *phdr;
|
|
||||||
|
|
||||||
//phdr = &precvframe->u.hdr;
|
|
||||||
|
|
||||||
report.rxdw0 = le32_to_cpu(prxstat->rxdw0);
|
report.rxdw0 = le32_to_cpu(prxstat->rxdw0);
|
||||||
report.rxdw1 = le32_to_cpu(prxstat->rxdw1);
|
report.rxdw1 = le32_to_cpu(prxstat->rxdw1);
|
||||||
|
@ -197,8 +193,6 @@ void update_recvframe_attrib_88e(
|
||||||
report.rxdw4 = le32_to_cpu(prxstat->rxdw4);
|
report.rxdw4 = le32_to_cpu(prxstat->rxdw4);
|
||||||
report.rxdw5 = le32_to_cpu(prxstat->rxdw5);
|
report.rxdw5 = le32_to_cpu(prxstat->rxdw5);
|
||||||
|
|
||||||
prxreport = (PRXREPORT)&report;
|
|
||||||
|
|
||||||
pattrib = &precvframe->u.hdr.attrib;
|
pattrib = &precvframe->u.hdr.attrib;
|
||||||
_rtw_memset(pattrib, 0, sizeof(struct rx_pkt_attrib));
|
_rtw_memset(pattrib, 0, sizeof(struct rx_pkt_attrib));
|
||||||
|
|
||||||
|
|
|
@ -4355,12 +4355,10 @@ static void rtl8188eu_init_default_value(_adapter * padapter)
|
||||||
{
|
{
|
||||||
PHAL_DATA_TYPE pHalData;
|
PHAL_DATA_TYPE pHalData;
|
||||||
struct pwrctrl_priv *pwrctrlpriv;
|
struct pwrctrl_priv *pwrctrlpriv;
|
||||||
struct dm_priv *pdmpriv;
|
|
||||||
u8 i;
|
u8 i;
|
||||||
|
|
||||||
pHalData = GET_HAL_DATA(padapter);
|
pHalData = GET_HAL_DATA(padapter);
|
||||||
pwrctrlpriv = &padapter->pwrctrlpriv;
|
pwrctrlpriv = &padapter->pwrctrlpriv;
|
||||||
pdmpriv = &pHalData->dmpriv;
|
|
||||||
|
|
||||||
|
|
||||||
//init default value
|
//init default value
|
||||||
|
@ -4371,9 +4369,6 @@ static void rtl8188eu_init_default_value(_adapter * padapter)
|
||||||
//init dm default value
|
//init dm default value
|
||||||
pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized = false;
|
pHalData->odmpriv.RFCalibrateInfo.bIQKInitialized = false;
|
||||||
pHalData->odmpriv.RFCalibrateInfo.TM_Trigger = 0;//for IQK
|
pHalData->odmpriv.RFCalibrateInfo.TM_Trigger = 0;//for IQK
|
||||||
//pdmpriv->binitialized = false;
|
|
||||||
// pdmpriv->prv_traffic_idx = 3;
|
|
||||||
// pdmpriv->initialize = 0;
|
|
||||||
pHalData->pwrGroupCnt = 0;
|
pHalData->pwrGroupCnt = 0;
|
||||||
pHalData->PGMaxGroup= 13;
|
pHalData->PGMaxGroup= 13;
|
||||||
pHalData->odmpriv.RFCalibrateInfo.ThermalValue_HP_index = 0;
|
pHalData->odmpriv.RFCalibrateInfo.ThermalValue_HP_index = 0;
|
||||||
|
|
|
@ -1140,23 +1140,16 @@ enum ieee80211_state {
|
||||||
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
|
#define DEFAULT_MAX_SCAN_AGE (15 * HZ)
|
||||||
#define DEFAULT_FTS 2346
|
#define DEFAULT_FTS 2346
|
||||||
|
|
||||||
#ifdef PLATFORM_FREEBSD //Baron change func to macro
|
static __inline int is_multicast_mac_addr(const u8 *addr)
|
||||||
#define is_multicast_mac_addr(Addr) ((((Addr[0]) & 0x01) == 0x01) && ((Addr[0]) != 0xff))
|
|
||||||
#define is_broadcast_mac_addr(Addr) ((((Addr[0]) & 0xff) == 0xff) && (((Addr[1]) & 0xff) == 0xff) && \
|
|
||||||
(((Addr[2]) & 0xff) == 0xff) && (((Addr[3]) & 0xff) == 0xff) && (((Addr[4]) & 0xff) == 0xff) && \
|
|
||||||
(((Addr[5]) & 0xff) == 0xff))
|
|
||||||
#else
|
|
||||||
extern __inline int is_multicast_mac_addr(const u8 *addr)
|
|
||||||
{
|
{
|
||||||
return ((addr[0] != 0xff) && (0x01 & addr[0]));
|
return ((addr[0] != 0xff) && (0x01 & addr[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
extern __inline int is_broadcast_mac_addr(const u8 *addr)
|
static __inline int is_broadcast_mac_addr(const u8 *addr)
|
||||||
{
|
{
|
||||||
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
|
return ((addr[0] == 0xff) && (addr[1] == 0xff) && (addr[2] == 0xff) && \
|
||||||
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
|
(addr[3] == 0xff) && (addr[4] == 0xff) && (addr[5] == 0xff));
|
||||||
}
|
}
|
||||||
#endif //PLATFORM_FREEBSD
|
|
||||||
|
|
||||||
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
|
#define CFG_IEEE80211_RESERVE_FCS (1<<0)
|
||||||
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
|
#define CFG_IEEE80211_COMPUTE_FCS (1<<1)
|
||||||
|
|
|
@ -460,8 +460,8 @@ typedef struct _ODM_Phy_Dbg_Info_
|
||||||
|
|
||||||
typedef struct _ODM_Per_Pkt_Info_
|
typedef struct _ODM_Per_Pkt_Info_
|
||||||
{
|
{
|
||||||
u1Byte Rate;
|
s8 Rate;
|
||||||
u1Byte StationID;
|
u8 StationID;
|
||||||
bool bPacketMatchBSSID;
|
bool bPacketMatchBSSID;
|
||||||
bool bPacketToSelf;
|
bool bPacketToSelf;
|
||||||
bool bPacketBeacon;
|
bool bPacketBeacon;
|
||||||
|
|
|
@ -595,33 +595,22 @@ __inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
|
||||||
|
|
||||||
__inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz)
|
__inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz)
|
||||||
{
|
{
|
||||||
// rx_tai += sz; move rx_tail sz bytes hereafter
|
|
||||||
|
|
||||||
//used for append sz bytes from ptr to rx_tail, update rx_tail and return the updated rx_tail to the caller
|
//used for append sz bytes from ptr to rx_tail, update rx_tail and return the updated rx_tail to the caller
|
||||||
//after putting, rx_tail must be still larger than rx_end.
|
//after putting, rx_tail must be still larger than rx_end.
|
||||||
unsigned char * prev_rx_tail;
|
|
||||||
|
|
||||||
if (precvframe==NULL)
|
if (precvframe==NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
prev_rx_tail = precvframe->u.hdr.rx_tail;
|
|
||||||
|
|
||||||
precvframe->u.hdr.rx_tail += sz;
|
precvframe->u.hdr.rx_tail += sz;
|
||||||
|
|
||||||
if (precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end)
|
if (precvframe->u.hdr.rx_tail > precvframe->u.hdr.rx_end) {
|
||||||
{
|
|
||||||
precvframe->u.hdr.rx_tail -= sz;
|
precvframe->u.hdr.rx_tail -= sz;
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
precvframe->u.hdr.len +=sz;
|
precvframe->u.hdr.len +=sz;
|
||||||
|
|
||||||
return precvframe->u.hdr.rx_tail;
|
return precvframe->u.hdr.rx_tail;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
|
__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
|
||||||
{
|
{
|
||||||
// rmv data from rx_tail (by yitsen)
|
// rmv data from rx_tail (by yitsen)
|
||||||
|
|
|
@ -547,8 +547,8 @@ static char *translate_scan(_adapter *padapter,
|
||||||
u8 wpa_ie[255],rsn_ie[255];
|
u8 wpa_ie[255],rsn_ie[255];
|
||||||
u16 wpa_len=0,rsn_len=0;
|
u16 wpa_len=0,rsn_len=0;
|
||||||
u8 *p;
|
u8 *p;
|
||||||
sint out_len=0;
|
|
||||||
out_len=rtw_get_sec_ie(pnetwork->network.IEs ,pnetwork->network.IELength,rsn_ie,&rsn_len,wpa_ie,&wpa_len);
|
rtw_get_sec_ie(pnetwork->network.IEs ,pnetwork->network.IELength,rsn_ie,&rsn_len,wpa_ie,&wpa_len);
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan: ssid=%s\n",pnetwork->network.Ssid.Ssid));
|
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan: ssid=%s\n",pnetwork->network.Ssid.Ssid));
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan: wpa_len=%d rsn_len=%d\n",wpa_len,rsn_len));
|
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,("rtw_wx_get_scan: wpa_len=%d rsn_len=%d\n",wpa_len,rsn_len));
|
||||||
|
|
||||||
|
@ -1045,7 +1045,7 @@ _func_exit_;
|
||||||
|
|
||||||
static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen)
|
static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen)
|
||||||
{
|
{
|
||||||
u8 *buf=NULL, *pos=NULL;
|
u8 *buf=NULL;
|
||||||
u32 left;
|
u32 left;
|
||||||
int group_cipher = 0, pairwise_cipher = 0;
|
int group_cipher = 0, pairwise_cipher = 0;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
@ -1079,7 +1079,6 @@ static int rtw_set_wpa_ie(_adapter *padapter, char *pie, unsigned short ielen)
|
||||||
DBG_88E("0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n",buf[i],buf[i+1],buf[i+2],buf[i+3],buf[i+4],buf[i+5],buf[i+6],buf[i+7]);
|
DBG_88E("0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n",buf[i],buf[i+1],buf[i+2],buf[i+3],buf[i+4],buf[i+5],buf[i+6],buf[i+7]);
|
||||||
}
|
}
|
||||||
|
|
||||||
pos = buf;
|
|
||||||
if (ielen < RSN_HEADER_LEN){
|
if (ielen < RSN_HEADER_LEN){
|
||||||
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("Ie len too short %d\n", ielen));
|
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("Ie len too short %d\n", ielen));
|
||||||
ret = -1;
|
ret = -1;
|
||||||
|
@ -3936,44 +3935,36 @@ static int rtw_wps_start(struct net_device *dev,
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
struct iw_point *pdata = &wrqu->data;
|
struct iw_point *pdata = &wrqu->data;
|
||||||
u32 u32wps_start = 0;
|
u32 u32wps_start = 0;
|
||||||
unsigned int uintRet = 0;
|
|
||||||
|
|
||||||
uintRet = copy_from_user((void*) &u32wps_start, pdata->pointer, 4);
|
ret = copy_from_user((void*) &u32wps_start, pdata->pointer, 4);
|
||||||
|
if (ret) {
|
||||||
|
ret= -EINVAL;
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
|
||||||
if ((padapter->bDriverStopped) || (pdata==NULL))
|
if ((padapter->bDriverStopped) || (pdata==NULL)) {
|
||||||
{
|
|
||||||
ret= -EINVAL;
|
ret= -EINVAL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (u32wps_start == 0)
|
if (u32wps_start == 0)
|
||||||
{
|
|
||||||
u32wps_start = *extra;
|
u32wps_start = *extra;
|
||||||
}
|
|
||||||
|
|
||||||
DBG_88E("[%s] wps_start = %d\n", __func__, u32wps_start);
|
DBG_88E("[%s] wps_start = %d\n", __func__, u32wps_start);
|
||||||
|
|
||||||
if (u32wps_start == 1) // WPS Start
|
if (u32wps_start == 1) // WPS Start
|
||||||
{
|
|
||||||
rtw_led_control(padapter, LED_CTL_START_WPS);
|
rtw_led_control(padapter, LED_CTL_START_WPS);
|
||||||
}
|
|
||||||
else if (u32wps_start == 2) // WPS Stop because of wps success
|
else if (u32wps_start == 2) // WPS Stop because of wps success
|
||||||
{
|
|
||||||
rtw_led_control(padapter, LED_CTL_STOP_WPS);
|
rtw_led_control(padapter, LED_CTL_STOP_WPS);
|
||||||
}
|
|
||||||
else if (u32wps_start == 3) // WPS Stop because of wps fail
|
else if (u32wps_start == 3) // WPS Stop because of wps fail
|
||||||
{
|
|
||||||
rtw_led_control(padapter, LED_CTL_STOP_WPS_FAIL);
|
rtw_led_control(padapter, LED_CTL_STOP_WPS_FAIL);
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CONFIG_INTEL_WIDI
|
#ifdef CONFIG_INTEL_WIDI
|
||||||
process_intel_widi_wps_status(padapter, u32wps_start);
|
process_intel_widi_wps_status(padapter, u32wps_start);
|
||||||
#endif //CONFIG_INTEL_WIDI
|
#endif //CONFIG_INTEL_WIDI
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
|
@ -6341,7 +6332,8 @@ static int rtw_dbg_port(struct net_device *dev,
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
u8 major_cmd, minor_cmd;
|
u8 major_cmd, minor_cmd;
|
||||||
u16 arg;
|
u16 arg;
|
||||||
u32 extra_arg, *pdata, val32;
|
s32 extra_arg;
|
||||||
|
u32 *pdata, val32;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
|
@ -9024,7 +9016,6 @@ static int rtw_mp_efuse_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)
|
||||||
{
|
{
|
||||||
struct iw_point *wrqu;
|
|
||||||
PADAPTER padapter;
|
PADAPTER padapter;
|
||||||
struct pwrctrl_priv *pwrctrlpriv ;
|
struct pwrctrl_priv *pwrctrlpriv ;
|
||||||
PHAL_DATA_TYPE pHalData;
|
PHAL_DATA_TYPE pHalData;
|
||||||
|
@ -9041,33 +9032,28 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
|
|
||||||
wrqu = (struct iw_point*)wdata;
|
|
||||||
padapter = rtw_netdev_priv(dev);
|
padapter = rtw_netdev_priv(dev);
|
||||||
pwrctrlpriv = &padapter->pwrctrlpriv;
|
pwrctrlpriv = &padapter->pwrctrlpriv;
|
||||||
pHalData = GET_HAL_DATA(padapter);
|
pHalData = GET_HAL_DATA(padapter);
|
||||||
pEfuseHal = &pHalData->EfuseHal;
|
pEfuseHal = &pHalData->EfuseHal;
|
||||||
err = 0;
|
err = 0;
|
||||||
setdata = _rtw_zmalloc(1024);
|
setdata = _rtw_zmalloc(1024);
|
||||||
if (setdata == NULL)
|
if (setdata == NULL) {
|
||||||
{
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
ShadowMapBT = _rtw_malloc(EFUSE_BT_MAX_MAP_LEN);
|
ShadowMapBT = _rtw_malloc(EFUSE_BT_MAX_MAP_LEN);
|
||||||
if (ShadowMapBT == NULL)
|
if (ShadowMapBT == NULL) {
|
||||||
{
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
ShadowMapWiFi = _rtw_malloc(EFUSE_MAP_SIZE);
|
ShadowMapWiFi = _rtw_malloc(EFUSE_MAP_SIZE);
|
||||||
if (ShadowMapWiFi == NULL)
|
if (ShadowMapWiFi == NULL) {
|
||||||
{
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
setrawdata = _rtw_malloc(EFUSE_MAX_SIZE);
|
setrawdata = _rtw_malloc(EFUSE_MAX_SIZE);
|
||||||
if (setrawdata == NULL)
|
if (setrawdata == NULL) {
|
||||||
{
|
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -9086,19 +9072,17 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
||||||
DBG_88E("%s: in=%s\n", __func__, extra);
|
DBG_88E("%s: in=%s\n", __func__, extra);
|
||||||
|
|
||||||
i = 0;
|
i = 0;
|
||||||
while ((token = strsep(&pch, ",")) != NULL)
|
while ((token = strsep(&pch, ",")) != NULL) {
|
||||||
{
|
if (i > 2)
|
||||||
if (i > 2) break;
|
break;
|
||||||
tmp[i] = token;
|
tmp[i] = token;
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
// tmp[0],[1],[2]
|
// tmp[0],[1],[2]
|
||||||
// wmap,addr,00e04c871200
|
// wmap,addr,00e04c871200
|
||||||
if (strcmp(tmp[0], "wmap") == 0)
|
if (strcmp(tmp[0], "wmap") == 0) {
|
||||||
{
|
if ((tmp[1]==NULL) || (tmp[2]==NULL)) {
|
||||||
if ((tmp[1]==NULL) || (tmp[2]==NULL))
|
|
||||||
{
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -9107,14 +9091,12 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
||||||
addr &= 0xFFF;
|
addr &= 0xFFF;
|
||||||
|
|
||||||
cnts = strlen(tmp[2]);
|
cnts = strlen(tmp[2]);
|
||||||
if (cnts%2)
|
if (cnts%2) {
|
||||||
{
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
cnts /= 2;
|
cnts /= 2;
|
||||||
if (cnts == 0)
|
if (cnts == 0) {
|
||||||
{
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -9124,33 +9106,26 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
||||||
DBG_88E("%s: map data=%s\n", __func__, tmp[2]);
|
DBG_88E("%s: map data=%s\n", __func__, tmp[2]);
|
||||||
|
|
||||||
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
|
#ifndef CONFIG_RTL8188E
|
||||||
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);
|
||||||
#else
|
#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
|
#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;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rtw_efuse_map_write(padapter, addr, cnts, setdata) == _FAIL)
|
if (rtw_efuse_map_write(padapter, addr, cnts, setdata) == _FAIL) {
|
||||||
{
|
|
||||||
DBG_88E("%s: rtw_efuse_map_write error!!\n", __func__);
|
DBG_88E("%s: rtw_efuse_map_write error!!\n", __func__);
|
||||||
err = -EFAULT;
|
err = -EFAULT;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
}
|
} else if (strcmp(tmp[0], "wraw") == 0) {
|
||||||
else if (strcmp(tmp[0], "wraw") == 0)
|
if ((tmp[1] == NULL) || (tmp[2] == NULL)) {
|
||||||
{
|
|
||||||
if ((tmp[1]==NULL) || (tmp[2]==NULL))
|
|
||||||
{
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -9159,14 +9134,12 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
||||||
addr &= 0xFFF;
|
addr &= 0xFFF;
|
||||||
|
|
||||||
cnts = strlen(tmp[2]);
|
cnts = strlen(tmp[2]);
|
||||||
if (cnts%2)
|
if (cnts%2) {
|
||||||
{
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
cnts /= 2;
|
cnts /= 2;
|
||||||
if (cnts == 0)
|
if (cnts == 0) {
|
||||||
{
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -9176,21 +9149,15 @@ static int rtw_mp_efuse_set(struct net_device *dev,
|
||||||
DBG_88E("%s: raw data=%s\n", __func__, tmp[2]);
|
DBG_88E("%s: raw data=%s\n", __func__, tmp[2]);
|
||||||
|
|
||||||
for (jj=0, kk=0; jj<cnts; jj++, kk+=2)
|
for (jj=0, kk=0; jj<cnts; jj++, kk+=2)
|
||||||
{
|
|
||||||
setrawdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk+1]);
|
setrawdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk+1]);
|
||||||
}
|
|
||||||
|
|
||||||
if (rtw_efuse_access(padapter, true, addr, cnts, setrawdata) == _FAIL)
|
if (rtw_efuse_access(padapter, true, addr, cnts, setrawdata) == _FAIL) {
|
||||||
{
|
|
||||||
DBG_88E("%s: rtw_efuse_access error!!\n", __func__);
|
DBG_88E("%s: rtw_efuse_access error!!\n", __func__);
|
||||||
err = -EFAULT;
|
err = -EFAULT;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
}
|
} else if (strcmp(tmp[0], "mac") == 0) {
|
||||||
else if (strcmp(tmp[0], "mac") == 0)
|
if (tmp[1]==NULL) {
|
||||||
{
|
|
||||||
if (tmp[1]==NULL)
|
|
||||||
{
|
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
@ -10106,7 +10073,6 @@ static int rtw_mp_ctx(struct net_device *dev,
|
||||||
stop = strncmp(extra, "stop", 4);
|
stop = strncmp(extra, "stop", 4);
|
||||||
sscanf(extra, "count=%d,pkt", &count);
|
sscanf(extra, "count=%d,pkt", &count);
|
||||||
|
|
||||||
//DBG_88E("%s: count=%d countPkTx=%d cotuTx=%d CarrSprTx=%d scTx=%d sgleTx=%d pkTx=%d stop=%d\n", __func__, count, countPkTx, cotuTx, CarrSprTx, pkTx, sgleTx, scTx, stop);
|
|
||||||
_rtw_memset(extra, '\0', sizeof(extra));
|
_rtw_memset(extra, '\0', sizeof(extra));
|
||||||
|
|
||||||
if (stop == 0) {
|
if (stop == 0) {
|
||||||
|
@ -10457,16 +10423,12 @@ static int rtw_mp_dump(struct net_device *dev,
|
||||||
struct iw_request_info *info,
|
struct iw_request_info *info,
|
||||||
struct iw_point *wrqu, char *extra)
|
struct iw_point *wrqu, char *extra)
|
||||||
{
|
{
|
||||||
struct mp_priv *pmp_priv;
|
|
||||||
struct pkt_attrib *pattrib;
|
struct pkt_attrib *pattrib;
|
||||||
u32 value;
|
u32 value;
|
||||||
u8 rf_type,path_nums = 0;
|
u8 rf_type,path_nums = 0;
|
||||||
u32 i,j=1,path;
|
u32 i,j=1,path;
|
||||||
PADAPTER padapter = rtw_netdev_priv(dev);
|
PADAPTER padapter = rtw_netdev_priv(dev);
|
||||||
|
|
||||||
pmp_priv = &padapter->mppriv;
|
|
||||||
|
|
||||||
|
|
||||||
//if (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))
|
//if (copy_from_user(extra, wrqu->data.pointer, wrqu->data.length))
|
||||||
// return -EFAULT;
|
// return -EFAULT;
|
||||||
|
|
||||||
|
@ -12713,7 +12675,6 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
|
||||||
s32 k;
|
s32 k;
|
||||||
const iw_handler *priv; /* Private ioctl */
|
const iw_handler *priv; /* Private ioctl */
|
||||||
const struct iw_priv_args *priv_args; /* Private ioctl description */
|
const struct iw_priv_args *priv_args; /* Private ioctl description */
|
||||||
u32 num_priv; /* Number of ioctl */
|
|
||||||
u32 num_priv_args; /* Number of descriptions */
|
u32 num_priv_args; /* Number of descriptions */
|
||||||
iw_handler handler;
|
iw_handler handler;
|
||||||
int temp;
|
int temp;
|
||||||
|
@ -12749,7 +12710,6 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
|
||||||
|
|
||||||
priv = rtw_private_handler;
|
priv = rtw_private_handler;
|
||||||
priv_args = rtw_private_args;
|
priv_args = rtw_private_args;
|
||||||
num_priv = sizeof(rtw_private_handler) / sizeof(iw_handler);
|
|
||||||
num_priv_args = sizeof(rtw_private_args) / sizeof(struct iw_priv_args);
|
num_priv_args = sizeof(rtw_private_args) / sizeof(struct iw_priv_args);
|
||||||
|
|
||||||
if (num_priv_args == 0) {
|
if (num_priv_args == 0) {
|
||||||
|
|
|
@ -819,13 +819,9 @@ u64 rtw_division64(u64 x, u64 y)
|
||||||
|
|
||||||
void rtw_buf_free(u8 **buf, u32 *buf_len)
|
void rtw_buf_free(u8 **buf, u32 *buf_len)
|
||||||
{
|
{
|
||||||
u32 ori_len;
|
|
||||||
|
|
||||||
if (!buf || !buf_len)
|
if (!buf || !buf_len)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
ori_len = *buf_len;
|
|
||||||
|
|
||||||
if (*buf) {
|
if (*buf) {
|
||||||
*buf_len = 0;
|
*buf_len = 0;
|
||||||
_rtw_mfree(*buf, *buf_len);
|
_rtw_mfree(*buf, *buf_len);
|
||||||
|
|
|
@ -482,7 +482,6 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
|
||||||
u8 val8;
|
u8 val8;
|
||||||
int status = _FAIL;
|
int status = _FAIL;
|
||||||
struct dvobj_priv *pdvobjpriv;
|
struct dvobj_priv *pdvobjpriv;
|
||||||
struct usb_device_descriptor *pdev_desc;
|
|
||||||
struct usb_host_config *phost_conf;
|
struct usb_host_config *phost_conf;
|
||||||
struct usb_config_descriptor *pconf_desc;
|
struct usb_config_descriptor *pconf_desc;
|
||||||
struct usb_host_interface *phost_iface;
|
struct usb_host_interface *phost_iface;
|
||||||
|
@ -504,8 +503,6 @@ _func_enter_;
|
||||||
pdvobjpriv->RtNumInPipes = 0;
|
pdvobjpriv->RtNumInPipes = 0;
|
||||||
pdvobjpriv->RtNumOutPipes = 0;
|
pdvobjpriv->RtNumOutPipes = 0;
|
||||||
|
|
||||||
pdev_desc = &pusbd->descriptor;
|
|
||||||
|
|
||||||
phost_conf = pusbd->actconfig;
|
phost_conf = pusbd->actconfig;
|
||||||
pconf_desc = &phost_conf->desc;
|
pconf_desc = &phost_conf->desc;
|
||||||
|
|
||||||
|
|
|
@ -224,10 +224,7 @@ static u32 usb_bulkout_zero(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
|
|
||||||
|
|
||||||
if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) ||(padapter->pwrctrlpriv.pnp_bstop_trx))
|
if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) ||(padapter->pwrctrlpriv.pnp_bstop_trx))
|
||||||
{
|
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
pcontext = (struct zero_bulkout_context *)rtw_zmalloc(sizeof(struct zero_bulkout_context));
|
pcontext = (struct zero_bulkout_context *)rtw_zmalloc(sizeof(struct zero_bulkout_context));
|
||||||
|
|
||||||
|
@ -240,9 +237,7 @@ static u32 usb_bulkout_zero(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
pcontext->pirp = NULL;
|
pcontext->pirp = NULL;
|
||||||
pcontext->padapter = padapter;
|
pcontext->padapter = padapter;
|
||||||
|
|
||||||
|
|
||||||
//translate DMA FIFO addr to pipehandle
|
//translate DMA FIFO addr to pipehandle
|
||||||
//pipe = ffaddr2pipehdl(pdvobj, addr);
|
|
||||||
|
|
||||||
usb_fill_bulk_urb(purb, pusbd, pipe,
|
usb_fill_bulk_urb(purb, pusbd, pipe,
|
||||||
pbuf,
|
pbuf,
|
||||||
|
@ -253,16 +248,11 @@ static u32 usb_bulkout_zero(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
status = usb_submit_urb(purb, GFP_ATOMIC);
|
status = usb_submit_urb(purb, GFP_ATOMIC);
|
||||||
|
|
||||||
if (!status)
|
if (!status)
|
||||||
{
|
|
||||||
ret= _SUCCESS;
|
ret= _SUCCESS;
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
ret= _FAIL;
|
ret= _FAIL;
|
||||||
}
|
|
||||||
|
|
||||||
|
return ret;
|
||||||
return _SUCCESS;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue