mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-22 04:23:39 +00:00
rtl8188eu: P_opulate new kernel branch
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
adfd7de95d
commit
5105d48231
44 changed files with 295 additions and 225 deletions
|
@ -888,7 +888,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
|
||||||
|
|
||||||
pbss_network->Rssi = 0;
|
pbss_network->Rssi = 0;
|
||||||
|
|
||||||
ether_addr_copy(pbss_network->MacAddress, myid(&(padapter->eeprompriv)));
|
memcpy(pbss_network->MacAddress, myid(&(padapter->eeprompriv)), ETH_ALEN);
|
||||||
|
|
||||||
/* beacon interval */
|
/* beacon interval */
|
||||||
p = rtw_get_beacon_interval_from_ie(ie);/* 8: TimeStamp, 2: Beacon Interval 2:Capability */
|
p = rtw_get_beacon_interval_from_ie(ie);/* 8: TimeStamp, 2: Beacon Interval 2:Capability */
|
||||||
|
@ -1164,7 +1164,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
||||||
if (!paclnode->valid) {
|
if (!paclnode->valid) {
|
||||||
INIT_LIST_HEAD(&paclnode->list);
|
INIT_LIST_HEAD(&paclnode->list);
|
||||||
|
|
||||||
ether_addr_copy(paclnode->addr, addr);
|
memcpy(paclnode->addr, addr, ETH_ALEN);
|
||||||
|
|
||||||
paclnode->valid = true;
|
paclnode->valid = true;
|
||||||
|
|
||||||
|
@ -1186,6 +1186,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
||||||
int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
|
int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
|
||||||
{
|
{
|
||||||
struct list_head *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
|
int ret = 0;
|
||||||
struct rtw_wlan_acl_node *paclnode;
|
struct rtw_wlan_acl_node *paclnode;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||||
|
@ -1216,7 +1217,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
|
||||||
spin_unlock_bh(&(pacl_node_q->lock));
|
spin_unlock_bh(&(pacl_node_q->lock));
|
||||||
|
|
||||||
DBG_88E("%s, acl_num =%d\n", __func__, pacl_list->num);
|
DBG_88E("%s, acl_num =%d\n", __func__, pacl_list->num);
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void update_bcn_fixed_ie(struct adapter *padapter)
|
static void update_bcn_fixed_ie(struct adapter *padapter)
|
||||||
|
@ -1752,6 +1753,7 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta,
|
||||||
int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
|
int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
|
||||||
{
|
{
|
||||||
struct list_head *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
|
int ret = 0;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
|
@ -1759,7 +1761,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
|
||||||
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||||
|
|
||||||
if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
|
if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
|
||||||
return 0;
|
return ret;
|
||||||
|
|
||||||
DBG_88E(FUNC_NDEV_FMT" with ch:%u, offset:%u\n",
|
DBG_88E(FUNC_NDEV_FMT" with ch:%u, offset:%u\n",
|
||||||
FUNC_NDEV_ARG(padapter->pnetdev), new_ch, ch_offset);
|
FUNC_NDEV_ARG(padapter->pnetdev), new_ch, ch_offset);
|
||||||
|
@ -1780,12 +1782,13 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
|
||||||
|
|
||||||
issue_action_spct_ch_switch(padapter, bc_addr, new_ch, ch_offset);
|
issue_action_spct_ch_switch(padapter, bc_addr, new_ch, ch_offset);
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rtw_sta_flush(struct adapter *padapter)
|
int rtw_sta_flush(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
struct list_head *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
|
int ret = 0;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
|
@ -1795,7 +1798,7 @@ int rtw_sta_flush(struct adapter *padapter)
|
||||||
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev));
|
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(padapter->pnetdev));
|
||||||
|
|
||||||
if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
|
if ((pmlmeinfo->state&0x03) != WIFI_FW_AP_STATE)
|
||||||
return 0;
|
return ret;
|
||||||
|
|
||||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||||
phead = &pstapriv->asoc_list;
|
phead = &pstapriv->asoc_list;
|
||||||
|
@ -1819,7 +1822,7 @@ int rtw_sta_flush(struct adapter *padapter)
|
||||||
|
|
||||||
associated_clients_update(padapter, true);
|
associated_clients_update(padapter, true);
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* called > TSR LEVEL for USB or SDIO Interface*/
|
/* called > TSR LEVEL for USB or SDIO Interface*/
|
||||||
|
|
|
@ -167,7 +167,7 @@ int rtw_cmd_thread(void *context)
|
||||||
struct cmd_obj *pcmd;
|
struct cmd_obj *pcmd;
|
||||||
u8 (*cmd_hdl)(struct adapter *padapter, u8 *pbuf);
|
u8 (*cmd_hdl)(struct adapter *padapter, u8 *pbuf);
|
||||||
void (*pcmd_callback)(struct adapter *dev, struct cmd_obj *pcmd);
|
void (*pcmd_callback)(struct adapter *dev, struct cmd_obj *pcmd);
|
||||||
struct adapter *padapter = context;
|
struct adapter *padapter = (struct adapter *)context;
|
||||||
struct cmd_priv *pcmdpriv = &(padapter->cmdpriv);
|
struct cmd_priv *pcmdpriv = &(padapter->cmdpriv);
|
||||||
|
|
||||||
allow_signal(SIGTERM);
|
allow_signal(SIGTERM);
|
||||||
|
@ -433,6 +433,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
|
||||||
|
|
||||||
psecnetwork = (struct wlan_bssid_ex *)&psecuritypriv->sec_bss;
|
psecnetwork = (struct wlan_bssid_ex *)&psecuritypriv->sec_bss;
|
||||||
if (psecnetwork == NULL) {
|
if (psecnetwork == NULL) {
|
||||||
|
if (pcmd != NULL)
|
||||||
kfree(pcmd);
|
kfree(pcmd);
|
||||||
|
|
||||||
res = _FAIL;
|
res = _FAIL;
|
||||||
|
@ -455,7 +456,7 @@ u8 rtw_joinbss_cmd(struct adapter *padapter, struct wlan_network *pnetwork)
|
||||||
|
|
||||||
psecnetwork->IELength = 0;
|
psecnetwork->IELength = 0;
|
||||||
/* Added by Albert 2009/02/18 */
|
/* Added by Albert 2009/02/18 */
|
||||||
/* If the driver wants to use the bssid to create the connection. */
|
/* If the the driver wants to use the bssid to create the connection. */
|
||||||
/* If not, we have to copy the connecting AP's MAC address to it so that */
|
/* If not, we have to copy the connecting AP's MAC address to it so that */
|
||||||
/* the driver just has the bssid information for PMKIDList searching. */
|
/* the driver just has the bssid information for PMKIDList searching. */
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ int proc_get_write_reg(char *page, char **start,
|
||||||
int proc_set_write_reg(struct file *file, const char __user *buffer,
|
int proc_set_write_reg(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
u32 addr, val, len;
|
u32 addr, val, len;
|
||||||
|
@ -577,7 +577,7 @@ int proc_get_rx_signal(char *page, char **start,
|
||||||
int proc_set_rx_signal(struct file *file, const char __user *buffer,
|
int proc_set_rx_signal(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
u32 is_signal_dbg;
|
u32 is_signal_dbg;
|
||||||
|
@ -627,7 +627,7 @@ int proc_get_ht_enable(char *page, char **start,
|
||||||
int proc_set_ht_enable(struct file *file, const char __user *buffer,
|
int proc_set_ht_enable(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
|
@ -669,7 +669,7 @@ int proc_get_cbw40_enable(char *page, char **start,
|
||||||
int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
|
int proc_set_cbw40_enable(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
|
@ -710,7 +710,7 @@ int proc_get_ampdu_enable(char *page, char **start,
|
||||||
int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
|
int proc_set_ampdu_enable(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
|
@ -771,7 +771,7 @@ int proc_get_rx_stbc(char *page, char **start,
|
||||||
int proc_set_rx_stbc(struct file *file, const char __user *buffer,
|
int proc_set_rx_stbc(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
|
@ -800,7 +800,7 @@ int proc_get_rssi_disp(char *page, char **start,
|
||||||
int proc_set_rssi_disp(struct file *file, const char __user *buffer,
|
int proc_set_rssi_disp(struct file *file, const char __user *buffer,
|
||||||
unsigned long count, void *data)
|
unsigned long count, void *data)
|
||||||
{
|
{
|
||||||
struct net_device *dev = data;
|
struct net_device *dev = (struct net_device *)data;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
char tmp[32];
|
char tmp[32];
|
||||||
u32 enable = 0;
|
u32 enable = 0;
|
||||||
|
|
|
@ -106,13 +106,13 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
|
||||||
efuseTbl = kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL);
|
efuseTbl = kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL);
|
||||||
if (efuseTbl == NULL) {
|
if (efuseTbl == NULL) {
|
||||||
DBG_88E("%s: alloc efuseTbl fail!\n", __func__);
|
DBG_88E("%s: alloc efuseTbl fail!\n", __func__);
|
||||||
return;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
|
eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
|
||||||
if (eFuseWord == NULL) {
|
if (eFuseWord == NULL) {
|
||||||
DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
|
DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
|
||||||
goto eFuseWord_failed;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* 0. Refresh efuse init map as all oxFF. */
|
/* 0. Refresh efuse init map as all oxFF. */
|
||||||
|
@ -210,10 +210,10 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8 *pbuf)
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
kfree(eFuseWord);
|
|
||||||
|
|
||||||
eFuseWord_failed:
|
|
||||||
kfree(efuseTbl);
|
kfree(efuseTbl);
|
||||||
|
|
||||||
|
if (eFuseWord)
|
||||||
|
kfree(eFuseWord);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void efuse_read_phymap_from_txpktbuf(
|
static void efuse_read_phymap_from_txpktbuf(
|
||||||
|
@ -250,11 +250,11 @@ static void efuse_read_phymap_from_txpktbuf(
|
||||||
while (!(reg_0x143 = usb_read8(adapter, REG_TXPKTBUF_DBG)) &&
|
while (!(reg_0x143 = usb_read8(adapter, REG_TXPKTBUF_DBG)) &&
|
||||||
(passing_time = rtw_get_passing_time_ms(start)) < 1000) {
|
(passing_time = rtw_get_passing_time_ms(start)) < 1000) {
|
||||||
DBG_88E("%s polling reg_0x143:0x%02x, reg_0x106:0x%02x\n", __func__, reg_0x143, usb_read8(adapter, 0x106));
|
DBG_88E("%s polling reg_0x143:0x%02x, reg_0x106:0x%02x\n", __func__, reg_0x143, usb_read8(adapter, 0x106));
|
||||||
usleep_range(1000, 2000);
|
msleep(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
lo32 = usb_read32(adapter, REG_PKTBUF_DBG_DATA_L);
|
lo32 = le32_to_cpu((__le32)usb_read32(adapter, REG_PKTBUF_DBG_DATA_L));
|
||||||
hi32 = usb_read32(adapter, REG_PKTBUF_DBG_DATA_H);
|
hi32 = le32_to_cpu((__le32)usb_read32(adapter, REG_PKTBUF_DBG_DATA_H));
|
||||||
|
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
u8 lenc[2];
|
u8 lenc[2];
|
||||||
|
@ -322,6 +322,7 @@ void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _si
|
||||||
iol_read_efuse(Adapter, 0, _offset, _size_byte, pbuf);
|
iol_read_efuse(Adapter, 0, _offset, _size_byte, pbuf);
|
||||||
iol_mode_enable(Adapter, 0);
|
iol_mode_enable(Adapter, 0);
|
||||||
}
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Do not support BT */
|
/* Do not support BT */
|
||||||
|
@ -331,56 +332,56 @@ void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, v
|
||||||
case TYPE_EFUSE_MAX_SECTION:
|
case TYPE_EFUSE_MAX_SECTION:
|
||||||
{
|
{
|
||||||
u8 *pMax_section;
|
u8 *pMax_section;
|
||||||
pMax_section = pOut;
|
pMax_section = (u8 *)pOut;
|
||||||
*pMax_section = EFUSE_MAX_SECTION_88E;
|
*pMax_section = EFUSE_MAX_SECTION_88E;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_EFUSE_REAL_CONTENT_LEN:
|
case TYPE_EFUSE_REAL_CONTENT_LEN:
|
||||||
{
|
{
|
||||||
u16 *pu2Tmp;
|
u16 *pu2Tmp;
|
||||||
pu2Tmp = pOut;
|
pu2Tmp = (u16 *)pOut;
|
||||||
*pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
|
*pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_EFUSE_CONTENT_LEN_BANK:
|
case TYPE_EFUSE_CONTENT_LEN_BANK:
|
||||||
{
|
{
|
||||||
u16 *pu2Tmp;
|
u16 *pu2Tmp;
|
||||||
pu2Tmp = pOut;
|
pu2Tmp = (u16 *)pOut;
|
||||||
*pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
|
*pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_AVAILABLE_EFUSE_BYTES_BANK:
|
case TYPE_AVAILABLE_EFUSE_BYTES_BANK:
|
||||||
{
|
{
|
||||||
u16 *pu2Tmp;
|
u16 *pu2Tmp;
|
||||||
pu2Tmp = pOut;
|
pu2Tmp = (u16 *)pOut;
|
||||||
*pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
|
*pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL:
|
case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL:
|
||||||
{
|
{
|
||||||
u16 *pu2Tmp;
|
u16 *pu2Tmp;
|
||||||
pu2Tmp = pOut;
|
pu2Tmp = (u16 *)pOut;
|
||||||
*pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
|
*pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_EFUSE_MAP_LEN:
|
case TYPE_EFUSE_MAP_LEN:
|
||||||
{
|
{
|
||||||
u16 *pu2Tmp;
|
u16 *pu2Tmp;
|
||||||
pu2Tmp = pOut;
|
pu2Tmp = (u16 *)pOut;
|
||||||
*pu2Tmp = (u16)EFUSE_MAP_LEN_88E;
|
*pu2Tmp = (u16)EFUSE_MAP_LEN_88E;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TYPE_EFUSE_PROTECT_BYTES_BANK:
|
case TYPE_EFUSE_PROTECT_BYTES_BANK:
|
||||||
{
|
{
|
||||||
u8 *pu1Tmp;
|
u8 *pu1Tmp;
|
||||||
pu1Tmp = pOut;
|
pu1Tmp = (u8 *)pOut;
|
||||||
*pu1Tmp = (u8)(EFUSE_OOB_PROTECT_BYTES_88E);
|
*pu1Tmp = (u8)(EFUSE_OOB_PROTECT_BYTES_88E);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
u8 *pu1Tmp;
|
u8 *pu1Tmp;
|
||||||
pu1Tmp = pOut;
|
pu1Tmp = (u8 *)pOut;
|
||||||
*pu1Tmp = 0;
|
*pu1Tmp = 0;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -637,9 +638,10 @@ static bool hal_EfusePgPacketWrite2ByteHeader(struct adapter *pAdapter, u8 efuse
|
||||||
if ((tmp_header & 0x0F) == 0x0F) { /* word_en PG fail */
|
if ((tmp_header & 0x0F) == 0x0F) { /* word_en PG fail */
|
||||||
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
|
if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
|
||||||
return false;
|
return false;
|
||||||
}
|
} else {
|
||||||
efuse_addr++;
|
efuse_addr++;
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
} else if (pg_header != tmp_header) { /* offset PG fail */
|
} else if (pg_header != tmp_header) { /* offset PG fail */
|
||||||
struct pgpkt fixPkt;
|
struct pgpkt fixPkt;
|
||||||
fixPkt.offset = ((pg_header_temp & 0xE0) >> 5) | ((tmp_header & 0xF0) >> 1);
|
fixPkt.offset = ((pg_header_temp & 0xE0) >> 5) | ((tmp_header & 0xF0) >> 1);
|
||||||
|
@ -706,7 +708,7 @@ static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u
|
||||||
if (badworden == 0x0F) {
|
if (badworden == 0x0F) {
|
||||||
/* write ok */
|
/* write ok */
|
||||||
return true;
|
return true;
|
||||||
}
|
} else {
|
||||||
/* reorganize other pg packet */
|
/* reorganize other pg packet */
|
||||||
PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data);
|
PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data);
|
||||||
if (!PgWriteSuccess)
|
if (!PgWriteSuccess)
|
||||||
|
@ -714,6 +716,7 @@ static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u
|
||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
hal_EfusePgPacketWriteHeader(
|
hal_EfusePgPacketWriteHeader(
|
||||||
|
|
|
@ -98,6 +98,7 @@ u8 rtw_do_join(struct adapter *padapter)
|
||||||
|
|
||||||
pibss = padapter->registrypriv.dev_network.MacAddress;
|
pibss = padapter->registrypriv.dev_network.MacAddress;
|
||||||
|
|
||||||
|
memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(padapter);
|
rtw_update_registrypriv_dev_network(padapter);
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
/* */
|
/* */
|
||||||
void BlinkTimerCallback(void *data)
|
void BlinkTimerCallback(void *data)
|
||||||
{
|
{
|
||||||
struct LED_871x *pLed = data;
|
struct LED_871x *pLed = (struct LED_871x *)data;
|
||||||
struct adapter *padapter = pLed->padapter;
|
struct adapter *padapter = pLed->padapter;
|
||||||
|
|
||||||
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped))
|
if ((padapter->bSurpriseRemoved) || (padapter->bDriverStopped))
|
||||||
|
|
|
@ -674,6 +674,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("switching to adhoc master\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("switching to adhoc master\n"));
|
||||||
|
|
||||||
|
memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(adapter);
|
rtw_update_registrypriv_dev_network(adapter);
|
||||||
|
@ -1333,6 +1334,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
|
|
||||||
memcpy(pdev_network, &tgt_network->network, get_wlan_bssid_ex_sz(&tgt_network->network));
|
memcpy(pdev_network, &tgt_network->network, get_wlan_bssid_ex_sz(&tgt_network->network));
|
||||||
|
|
||||||
|
memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
|
||||||
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
|
||||||
|
|
||||||
rtw_update_registrypriv_dev_network(adapter);
|
rtw_update_registrypriv_dev_network(adapter);
|
||||||
|
@ -1362,7 +1364,7 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
|
||||||
*/
|
*/
|
||||||
void _rtw_join_timeout_handler (void *function_context)
|
void _rtw_join_timeout_handler (void *function_context)
|
||||||
{
|
{
|
||||||
struct adapter *adapter = function_context;
|
struct adapter *adapter = (struct adapter *)function_context;
|
||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
int do_join_r;
|
int do_join_r;
|
||||||
|
|
||||||
|
@ -1404,7 +1406,7 @@ void _rtw_join_timeout_handler (void *function_context)
|
||||||
*/
|
*/
|
||||||
void rtw_scan_timeout_handler (void *function_context)
|
void rtw_scan_timeout_handler (void *function_context)
|
||||||
{
|
{
|
||||||
struct adapter *adapter = function_context;
|
struct adapter *adapter = (struct adapter *)function_context;
|
||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
|
|
||||||
DBG_88E(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
|
DBG_88E(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
|
||||||
|
@ -1435,7 +1437,7 @@ void rtw_dynamic_check_timer_handlder(void *function_context)
|
||||||
struct registry_priv *pregistrypriv = &adapter->registrypriv;
|
struct registry_priv *pregistrypriv = &adapter->registrypriv;
|
||||||
|
|
||||||
if (!adapter)
|
if (!adapter)
|
||||||
return;
|
goto exit;
|
||||||
if (!adapter->hw_init_completed)
|
if (!adapter->hw_init_completed)
|
||||||
goto exit;
|
goto exit;
|
||||||
if ((adapter->bDriverStopped) || (adapter->bSurpriseRemoved))
|
if ((adapter->bDriverStopped) || (adapter->bSurpriseRemoved))
|
||||||
|
|
|
@ -371,6 +371,7 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_c
|
||||||
|
|
||||||
int init_mlme_ext_priv(struct adapter *padapter)
|
int init_mlme_ext_priv(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
|
int res = _SUCCESS;
|
||||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
|
@ -396,7 +397,7 @@ int init_mlme_ext_priv(struct adapter *padapter)
|
||||||
|
|
||||||
pmlmeext->active_keep_alive_check = true;
|
pmlmeext->active_keep_alive_check = true;
|
||||||
|
|
||||||
return _SUCCESS;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
|
void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
|
||||||
|
@ -944,7 +945,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
|
||||||
}
|
}
|
||||||
|
|
||||||
pstat = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
|
pstat = rtw_get_stainfo(pstapriv, GetAddr2Ptr(pframe));
|
||||||
if (pstat == NULL) {
|
if (pstat == (struct sta_info *)NULL) {
|
||||||
status = _RSON_CLS2_;
|
status = _RSON_CLS2_;
|
||||||
goto asoc_class2_error;
|
goto asoc_class2_error;
|
||||||
}
|
}
|
||||||
|
@ -1553,6 +1554,7 @@ unsigned int OnAtim(struct adapter *padapter, struct recv_frame *precv_frame)
|
||||||
|
|
||||||
unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_frame)
|
unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
|
unsigned int ret = _FAIL;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
u8 *pframe = precv_frame->rx_data;
|
u8 *pframe = precv_frame->rx_data;
|
||||||
|
@ -1585,7 +1587,7 @@ unsigned int on_action_spct(struct adapter *padapter, struct recv_frame *precv_f
|
||||||
}
|
}
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
return _FAIL;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int OnAction_qos(struct adapter *padapter, struct recv_frame *precv_frame)
|
unsigned int OnAction_qos(struct adapter *padapter, struct recv_frame *precv_frame)
|
||||||
|
@ -3355,7 +3357,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
|
||||||
pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->ADDBA_req.dialog_token), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 1, &(pmlmeinfo->ADDBA_req.dialog_token), &(pattrib->pktlen));
|
||||||
pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&status), &(pattrib->pktlen));
|
pframe = rtw_set_fixed_ie(pframe, 2, (unsigned char *)(&status), &(pattrib->pktlen));
|
||||||
|
|
||||||
BA_para_set = le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f;
|
BA_para_set = pmlmeinfo->ADDBA_req.BA_para_set & 0x3f;
|
||||||
rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
|
rtw_hal_get_def_var(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR, &max_rx_ampdu_factor);
|
||||||
switch (max_rx_ampdu_factor) {
|
switch (max_rx_ampdu_factor) {
|
||||||
case MAX_AMPDU_FACTOR_64K:
|
case MAX_AMPDU_FACTOR_64K:
|
||||||
|
@ -4833,7 +4835,7 @@ void linked_status_chk(struct adapter *padapter)
|
||||||
|
|
||||||
void survey_timer_hdl(void *function_context)
|
void survey_timer_hdl(void *function_context)
|
||||||
{
|
{
|
||||||
struct adapter *padapter = function_context;
|
struct adapter *padapter = (struct adapter *)function_context;
|
||||||
struct cmd_obj *ph2c;
|
struct cmd_obj *ph2c;
|
||||||
struct sitesurvey_parm *psurveyPara;
|
struct sitesurvey_parm *psurveyPara;
|
||||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||||
|
@ -4910,7 +4912,7 @@ void link_timer_hdl(void *function_context)
|
||||||
|
|
||||||
void addba_timer_hdl(void *function_context)
|
void addba_timer_hdl(void *function_context)
|
||||||
{
|
{
|
||||||
struct sta_info *psta = function_context;
|
struct sta_info *psta = (struct sta_info *)function_context;
|
||||||
struct ht_priv *phtpriv;
|
struct ht_priv *phtpriv;
|
||||||
|
|
||||||
if (!psta)
|
if (!psta)
|
||||||
|
|
|
@ -279,11 +279,12 @@ void rtw_ps_processor(struct adapter *padapter)
|
||||||
exit:
|
exit:
|
||||||
rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
|
rtw_set_pwr_state_check_timer(&padapter->pwrctrlpriv);
|
||||||
pwrpriv->ps_processing = false;
|
pwrpriv->ps_processing = false;
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pwr_state_check_handler(void *FunctionContext)
|
static void pwr_state_check_handler(void *FunctionContext)
|
||||||
{
|
{
|
||||||
struct adapter *padapter = FunctionContext;
|
struct adapter *padapter = (struct adapter *)FunctionContext;
|
||||||
rtw_ps_cmd(padapter);
|
rtw_ps_cmd(padapter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -576,7 +577,7 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
||||||
if (pwrpriv->ps_processing) {
|
if (pwrpriv->ps_processing) {
|
||||||
DBG_88E("%s wait ps_processing...\n", __func__);
|
DBG_88E("%s wait ps_processing...\n", __func__);
|
||||||
while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
|
while (pwrpriv->ps_processing && rtw_get_passing_time_ms(start) <= 3000)
|
||||||
usleep_range(1000, 3000);
|
msleep(10);
|
||||||
if (pwrpriv->ps_processing)
|
if (pwrpriv->ps_processing)
|
||||||
DBG_88E("%s wait ps_processing timeout\n", __func__);
|
DBG_88E("%s wait ps_processing timeout\n", __func__);
|
||||||
else
|
else
|
||||||
|
|
|
@ -1373,6 +1373,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
|
||||||
u8 *psnap_type;
|
u8 *psnap_type;
|
||||||
struct ieee80211_snap_hdr *psnap;
|
struct ieee80211_snap_hdr *psnap;
|
||||||
|
|
||||||
|
int ret = _SUCCESS;
|
||||||
struct adapter *adapter = precvframe->adapter;
|
struct adapter *adapter = precvframe->adapter;
|
||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
u8 *ptr = precvframe->rx_data;
|
u8 *ptr = precvframe->rx_data;
|
||||||
|
@ -1427,7 +1428,7 @@ static int wlanhdr_to_ethhdr(struct recv_frame *precvframe)
|
||||||
memcpy(ptr+12, &be_tmp, 2);
|
memcpy(ptr+12, &be_tmp, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _SUCCESS;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* perform defrag */
|
/* perform defrag */
|
||||||
|
@ -1623,6 +1624,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
|
||||||
struct sk_buff *sub_skb, *subframes[MAX_SUBFRAME_COUNT];
|
struct sk_buff *sub_skb, *subframes[MAX_SUBFRAME_COUNT];
|
||||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||||
struct __queue *pfree_recv_queue = &(precvpriv->free_recv_queue);
|
struct __queue *pfree_recv_queue = &(precvpriv->free_recv_queue);
|
||||||
|
int ret = _SUCCESS;
|
||||||
nr_subframes = 0;
|
nr_subframes = 0;
|
||||||
|
|
||||||
pattrib = &prframe->attrib;
|
pattrib = &prframe->attrib;
|
||||||
|
@ -1726,7 +1728,7 @@ exit:
|
||||||
prframe->len = 0;
|
prframe->len = 0;
|
||||||
rtw_free_recvframe(prframe, pfree_recv_queue);/* free this recv_frame */
|
rtw_free_recvframe(prframe, pfree_recv_queue);/* free this recv_frame */
|
||||||
|
|
||||||
return _SUCCESS;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
|
static int check_indicate_seq(struct recv_reorder_ctrl *preorder_ctrl, u16 seq_num)
|
||||||
|
@ -1947,7 +1949,7 @@ _err_exit:
|
||||||
|
|
||||||
void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
||||||
{
|
{
|
||||||
struct recv_reorder_ctrl *preorder_ctrl = pcontext;
|
struct recv_reorder_ctrl *preorder_ctrl = (struct recv_reorder_ctrl *)pcontext;
|
||||||
struct adapter *padapter = preorder_ctrl->padapter;
|
struct adapter *padapter = preorder_ctrl->padapter;
|
||||||
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||||
|
|
||||||
|
|
|
@ -1219,7 +1219,7 @@ u32 rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
|
||||||
pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + hw_hdr_offset;
|
pframe = ((struct xmit_frame *)pxmitframe)->buf_addr + hw_hdr_offset;
|
||||||
|
|
||||||
/* 4 start to encrypt each fragment */
|
/* 4 start to encrypt each fragment */
|
||||||
if (pattrib->encrypt == _AES_) {
|
if ((pattrib->encrypt == _AES_)) {
|
||||||
if (pattrib->psta)
|
if (pattrib->psta)
|
||||||
stainfo = pattrib->psta;
|
stainfo = pattrib->psta;
|
||||||
else
|
else
|
||||||
|
@ -1460,7 +1460,7 @@ u32 rtw_aes_decrypt(struct adapter *padapter, u8 *precvframe)
|
||||||
u32 res = _SUCCESS;
|
u32 res = _SUCCESS;
|
||||||
pframe = (unsigned char *)((struct recv_frame *)precvframe)->rx_data;
|
pframe = (unsigned char *)((struct recv_frame *)precvframe)->rx_data;
|
||||||
/* 4 start to encrypt each fragment */
|
/* 4 start to encrypt each fragment */
|
||||||
if (prxattrib->encrypt == _AES_) {
|
if ((prxattrib->encrypt == _AES_)) {
|
||||||
stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]);
|
stainfo = rtw_get_stainfo(&padapter->stapriv, &prxattrib->ta[0]);
|
||||||
if (stainfo != NULL) {
|
if (stainfo != NULL) {
|
||||||
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo!= NULL!!!\n"));
|
RT_TRACE(_module_rtl871x_security_c_, _drv_err_, ("rtw_aes_decrypt: stainfo!= NULL!!!\n"));
|
||||||
|
|
|
@ -1394,6 +1394,7 @@ unsigned char check_assoc_AP(u8 *pframe, uint len)
|
||||||
DBG_88E("link to Artheros AP\n");
|
DBG_88E("link to Artheros AP\n");
|
||||||
return HT_IOT_PEER_ATHEROS;
|
return HT_IOT_PEER_ATHEROS;
|
||||||
} else if ((!memcmp(pIE->data, BROADCOM_OUI1, 3)) ||
|
} else if ((!memcmp(pIE->data, BROADCOM_OUI1, 3)) ||
|
||||||
|
(!memcmp(pIE->data, BROADCOM_OUI2, 3)) ||
|
||||||
(!memcmp(pIE->data, BROADCOM_OUI2, 3))) {
|
(!memcmp(pIE->data, BROADCOM_OUI2, 3))) {
|
||||||
DBG_88E("link to Broadcom AP\n");
|
DBG_88E("link to Broadcom AP\n");
|
||||||
return HT_IOT_PEER_BROADCOM;
|
return HT_IOT_PEER_BROADCOM;
|
||||||
|
|
|
@ -1025,6 +1025,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
|
||||||
|
|
||||||
/* adding icv, if necessary... */
|
/* adding icv, if necessary... */
|
||||||
if (pattrib->iv_len) {
|
if (pattrib->iv_len) {
|
||||||
|
if (psta != NULL) {
|
||||||
switch (pattrib->encrypt) {
|
switch (pattrib->encrypt) {
|
||||||
case _WEP40_:
|
case _WEP40_:
|
||||||
case _WEP104_:
|
case _WEP104_:
|
||||||
|
@ -1043,6 +1044,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
|
||||||
AES_IV(pattrib->iv, psta->dot11txpn, 0);
|
AES_IV(pattrib->iv, psta->dot11txpn, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
memcpy(pframe, pattrib->iv, pattrib->iv_len);
|
memcpy(pframe, pattrib->iv, pattrib->iv_len);
|
||||||
|
|
||||||
|
|
|
@ -150,9 +150,11 @@ u8 rtl8188e_set_raid_cmd(struct adapter *adapt, u32 mask)
|
||||||
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
|
struct hal_data_8188e *haldata = GET_HAL_DATA(adapt);
|
||||||
|
|
||||||
if (haldata->fw_ractrl) {
|
if (haldata->fw_ractrl) {
|
||||||
|
__le32 lmask;
|
||||||
|
|
||||||
memset(buf, 0, 3);
|
memset(buf, 0, 3);
|
||||||
put_unaligned_le32(mask, buf);
|
lmask = cpu_to_le32(mask);
|
||||||
|
memcpy(buf, &lmask, 3);
|
||||||
|
|
||||||
FillH2CCmd_88E(adapt, H2C_DM_MACID_CFG, 3, buf);
|
FillH2CCmd_88E(adapt, H2C_DM_MACID_CFG, 3, buf);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -155,8 +155,6 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
|
||||||
bool fw_ps_awake = true;
|
bool fw_ps_awake = true;
|
||||||
u8 hw_init_completed = false;
|
u8 hw_init_completed = false;
|
||||||
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter);
|
struct hal_data_8188e *hal_data = GET_HAL_DATA(Adapter);
|
||||||
struct mlme_priv *pmlmepriv = NULL;
|
|
||||||
u8 bLinked = false;
|
|
||||||
|
|
||||||
hw_init_completed = Adapter->hw_init_completed;
|
hw_init_completed = Adapter->hw_init_completed;
|
||||||
|
|
||||||
|
@ -172,11 +170,12 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
|
||||||
fw_ps_awake = false;
|
fw_ps_awake = false;
|
||||||
|
|
||||||
/* ODM */
|
/* ODM */
|
||||||
pmlmepriv = &Adapter->mlmepriv;
|
if (hw_init_completed) {
|
||||||
|
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
|
||||||
|
u8 bLinked = false;
|
||||||
|
|
||||||
if ((check_fwstate(pmlmepriv, WIFI_AP_STATE)) ||
|
if ((check_fwstate(pmlmepriv, WIFI_AP_STATE)) ||
|
||||||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE |
|
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE | WIFI_ADHOC_MASTER_STATE))) {
|
||||||
WIFI_ADHOC_MASTER_STATE))) {
|
|
||||||
if (Adapter->stapriv.asoc_sta_count > 2)
|
if (Adapter->stapriv.asoc_sta_count > 2)
|
||||||
bLinked = true;
|
bLinked = true;
|
||||||
} else {/* Station mode */
|
} else {/* Station mode */
|
||||||
|
@ -186,6 +185,7 @@ void rtl8188e_HalDmWatchDog(struct adapter *Adapter)
|
||||||
|
|
||||||
ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked);
|
ODM_CmnInfoUpdate(&hal_data->odmpriv, ODM_CMNINFO_LINK, bLinked);
|
||||||
ODM_DMWatchdog(&hal_data->odmpriv);
|
ODM_DMWatchdog(&hal_data->odmpriv);
|
||||||
|
}
|
||||||
skip_dm:
|
skip_dm:
|
||||||
/* Check GPIO to determine current RF on/off and Pbc status. */
|
/* Check GPIO to determine current RF on/off and Pbc status. */
|
||||||
/* Check Hardware Radio ON/OFF or not */
|
/* Check Hardware Radio ON/OFF or not */
|
||||||
|
|
|
@ -181,7 +181,7 @@ static void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable
|
||||||
switch (eVariable) {
|
switch (eVariable) {
|
||||||
case HAL_ODM_STA_INFO:
|
case HAL_ODM_STA_INFO:
|
||||||
{
|
{
|
||||||
struct sta_info *psta = pValue1;
|
struct sta_info *psta = (struct sta_info *)pValue1;
|
||||||
if (bSet) {
|
if (bSet) {
|
||||||
DBG_88E("### Set STA_(%d) info\n", psta->mac_id);
|
DBG_88E("### Set STA_(%d) info\n", psta->mac_id);
|
||||||
ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS, psta->mac_id, psta);
|
ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS, psta->mac_id, psta);
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
void dump_txrpt_ccx_88e(void *buf)
|
void dump_txrpt_ccx_88e(void *buf)
|
||||||
{
|
{
|
||||||
struct txrpt_ccx_88e *txrpt_ccx = buf;
|
struct txrpt_ccx_88e *txrpt_ccx = (struct txrpt_ccx_88e *)buf;
|
||||||
|
|
||||||
DBG_88E("%s:\n"
|
DBG_88E("%s:\n"
|
||||||
"tag1:%u, pkt_num:%u, txdma_underflow:%u, int_bt:%u, int_tri:%u, int_ccx:%u\n"
|
"tag1:%u, pkt_num:%u, txdma_underflow:%u, int_bt:%u, int_tri:%u, int_ccx:%u\n"
|
||||||
|
|
|
@ -1673,7 +1673,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
|
||||||
pRegToSet = RegToSet_Normal; /* 0xb972a841; */
|
pRegToSet = RegToSet_Normal; /* 0xb972a841; */
|
||||||
FactorToSet = *((u8 *)val);
|
FactorToSet = *((u8 *)val);
|
||||||
if (FactorToSet <= 3) {
|
if (FactorToSet <= 3) {
|
||||||
FactorToSet = 1 << (FactorToSet + 2);
|
FactorToSet = (1<<(FactorToSet + 2));
|
||||||
if (FactorToSet > 0xf)
|
if (FactorToSet > 0xf)
|
||||||
FactorToSet = 0xf;
|
FactorToSet = 0xf;
|
||||||
|
|
||||||
|
|
|
@ -83,8 +83,9 @@
|
||||||
#define ODM_COMP_INIT BIT31
|
#define ODM_COMP_INIT BIT31
|
||||||
|
|
||||||
/*------------------------Export Marco Definition---------------------------*/
|
/*------------------------Export Marco Definition---------------------------*/
|
||||||
|
#define DbgPrint pr_info
|
||||||
#define RT_PRINTK(fmt, args...) \
|
#define RT_PRINTK(fmt, args...) \
|
||||||
pr_info("%s(): " fmt, __func__, ## args);
|
DbgPrint("%s(): " fmt, __func__, ## args);
|
||||||
|
|
||||||
#ifndef ASSERT
|
#ifndef ASSERT
|
||||||
#define ASSERT(expr)
|
#define ASSERT(expr)
|
||||||
|
@ -93,18 +94,40 @@
|
||||||
#define ODM_RT_TRACE(pDM_Odm, comp, level, fmt) \
|
#define ODM_RT_TRACE(pDM_Odm, comp, level, fmt) \
|
||||||
if (((comp) & pDM_Odm->DebugComponents) && \
|
if (((comp) & pDM_Odm->DebugComponents) && \
|
||||||
(level <= pDM_Odm->DebugLevel)) { \
|
(level <= pDM_Odm->DebugLevel)) { \
|
||||||
pr_info("[ODM-8188E] "); \
|
DbgPrint("[ODM-8188E] "); \
|
||||||
|
RT_PRINTK fmt; \
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ODM_RT_TRACE_F(pDM_Odm, comp, level, fmt) \
|
||||||
|
if (((comp) & pDM_Odm->DebugComponents) && \
|
||||||
|
(level <= pDM_Odm->DebugLevel)) { \
|
||||||
RT_PRINTK fmt; \
|
RT_PRINTK fmt; \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define ODM_RT_ASSERT(pDM_Odm, expr, fmt) \
|
#define ODM_RT_ASSERT(pDM_Odm, expr, fmt) \
|
||||||
if (!(expr)) { \
|
if (!(expr)) { \
|
||||||
pr_info("Assertion failed! %s at ......\n", #expr); \
|
DbgPrint("Assertion failed! %s at ......\n", #expr); \
|
||||||
pr_info(" ......%s,%s,line=%d\n", __FILE__, \
|
DbgPrint(" ......%s,%s,line=%d\n", __FILE__, \
|
||||||
__func__, __LINE__); \
|
__func__, __LINE__); \
|
||||||
RT_PRINTK fmt; \
|
RT_PRINTK fmt; \
|
||||||
ASSERT(false); \
|
ASSERT(false); \
|
||||||
}
|
}
|
||||||
|
#define ODM_dbg_enter() { DbgPrint("==> %s\n", __func__); }
|
||||||
|
#define ODM_dbg_exit() { DbgPrint("<== %s\n", __func__); }
|
||||||
|
#define ODM_dbg_trace(str) { DbgPrint("%s:%s\n", __func__, str); }
|
||||||
|
|
||||||
|
#define ODM_PRINT_ADDR(pDM_Odm, comp, level, title_str, ptr) \
|
||||||
|
if (((comp) & pDM_Odm->DebugComponents) && \
|
||||||
|
(level <= pDM_Odm->DebugLevel)) { \
|
||||||
|
int __i; \
|
||||||
|
u8 *__ptr = (u8 *)ptr; \
|
||||||
|
DbgPrint("[ODM] "); \
|
||||||
|
DbgPrint(title_str); \
|
||||||
|
DbgPrint(" "); \
|
||||||
|
for (__i = 0; __i < 6; __i++) \
|
||||||
|
DbgPrint("%02X%s", __ptr[__i], (__i == 5)?"":"-");\
|
||||||
|
DbgPrint("\n"); \
|
||||||
|
}
|
||||||
|
|
||||||
void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm);
|
void ODM_InitDebugSetting(struct odm_dm_struct *pDM_Odm);
|
||||||
|
|
||||||
|
|
|
@ -694,7 +694,7 @@ struct WMM_para_element {
|
||||||
|
|
||||||
struct ADDBA_request {
|
struct ADDBA_request {
|
||||||
unsigned char dialog_token;
|
unsigned char dialog_token;
|
||||||
__le16 BA_para_set;
|
unsigned short BA_para_set;
|
||||||
unsigned short BA_timeout_value;
|
unsigned short BA_timeout_value;
|
||||||
unsigned short BA_starting_seqctrl;
|
unsigned short BA_starting_seqctrl;
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
|
@ -512,12 +512,14 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ielen) {
|
if (ielen) {
|
||||||
buf = kmemdup(pie, ielen, GFP_KERNEL);
|
buf = kzalloc(ielen, GFP_KERNEL);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
memcpy(buf, pie, ielen);
|
||||||
|
|
||||||
/* dump */
|
/* dump */
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
@ -1134,8 +1136,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
||||||
struct iw_scan_req *req = (struct iw_scan_req *)extra;
|
struct iw_scan_req *req = (struct iw_scan_req *)extra;
|
||||||
|
|
||||||
if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
|
if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
|
||||||
int len = min_t(int, req->essid_len,
|
int len = min((int)req->essid_len, IW_ESSID_MAX_SIZE);
|
||||||
IW_ESSID_MAX_SIZE);
|
|
||||||
|
|
||||||
memcpy(ssid[0].Ssid, req->essid, len);
|
memcpy(ssid[0].Ssid, req->essid, len);
|
||||||
ssid[0].SsidLength = len;
|
ssid[0].SsidLength = len;
|
||||||
|
@ -1416,7 +1417,7 @@ static int rtw_wx_set_rate(struct net_device *dev,
|
||||||
struct iw_request_info *a,
|
struct iw_request_info *a,
|
||||||
union iwreq_data *wrqu, char *extra)
|
union iwreq_data *wrqu, char *extra)
|
||||||
{
|
{
|
||||||
int i;
|
int i, ret = 0;
|
||||||
u8 datarates[NumRates];
|
u8 datarates[NumRates];
|
||||||
u32 target_rate = wrqu->bitrate.value;
|
u32 target_rate = wrqu->bitrate.value;
|
||||||
u32 fixed = wrqu->bitrate.fixed;
|
u32 fixed = wrqu->bitrate.fixed;
|
||||||
|
@ -1489,7 +1490,7 @@ set_rate:
|
||||||
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("datarate_inx =%d\n", datarates[i]));
|
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_, ("datarate_inx =%d\n", datarates[i]));
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rtw_wx_get_rate(struct net_device *dev,
|
static int rtw_wx_get_rate(struct net_device *dev,
|
||||||
|
@ -2698,8 +2699,10 @@ static int rtw_set_wps_beacon(struct net_device *dev, struct ieee_param *param,
|
||||||
|
|
||||||
ie_len = len-12-2;/* 12 = param header, 2:no packed */
|
ie_len = len-12-2;/* 12 = param header, 2:no packed */
|
||||||
|
|
||||||
|
if (pmlmepriv->wps_beacon_ie) {
|
||||||
kfree(pmlmepriv->wps_beacon_ie);
|
kfree(pmlmepriv->wps_beacon_ie);
|
||||||
pmlmepriv->wps_beacon_ie = NULL;
|
pmlmepriv->wps_beacon_ie = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (ie_len > 0) {
|
if (ie_len > 0) {
|
||||||
pmlmepriv->wps_beacon_ie = rtw_malloc(ie_len);
|
pmlmepriv->wps_beacon_ie = rtw_malloc(ie_len);
|
||||||
|
@ -2733,8 +2736,10 @@ static int rtw_set_wps_probe_resp(struct net_device *dev, struct ieee_param *par
|
||||||
|
|
||||||
ie_len = len-12-2;/* 12 = param header, 2:no packed */
|
ie_len = len-12-2;/* 12 = param header, 2:no packed */
|
||||||
|
|
||||||
|
if (pmlmepriv->wps_probe_resp_ie) {
|
||||||
kfree(pmlmepriv->wps_probe_resp_ie);
|
kfree(pmlmepriv->wps_probe_resp_ie);
|
||||||
pmlmepriv->wps_probe_resp_ie = NULL;
|
pmlmepriv->wps_probe_resp_ie = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (ie_len > 0) {
|
if (ie_len > 0) {
|
||||||
pmlmepriv->wps_probe_resp_ie = rtw_malloc(ie_len);
|
pmlmepriv->wps_probe_resp_ie = rtw_malloc(ie_len);
|
||||||
|
@ -2763,8 +2768,10 @@ static int rtw_set_wps_assoc_resp(struct net_device *dev, struct ieee_param *par
|
||||||
|
|
||||||
ie_len = len-12-2;/* 12 = param header, 2:no packed */
|
ie_len = len-12-2;/* 12 = param header, 2:no packed */
|
||||||
|
|
||||||
|
if (pmlmepriv->wps_assoc_resp_ie) {
|
||||||
kfree(pmlmepriv->wps_assoc_resp_ie);
|
kfree(pmlmepriv->wps_assoc_resp_ie);
|
||||||
pmlmepriv->wps_assoc_resp_ie = NULL;
|
pmlmepriv->wps_assoc_resp_ie = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (ie_len > 0) {
|
if (ie_len > 0) {
|
||||||
pmlmepriv->wps_assoc_resp_ie = rtw_malloc(ie_len);
|
pmlmepriv->wps_assoc_resp_ie = rtw_malloc(ie_len);
|
||||||
|
|
|
@ -512,6 +512,7 @@ void rtw_proc_remove_one(struct net_device *dev)
|
||||||
|
|
||||||
static uint loadparam(struct adapter *padapter, struct net_device *pnetdev)
|
static uint loadparam(struct adapter *padapter, struct net_device *pnetdev)
|
||||||
{
|
{
|
||||||
|
uint status = _SUCCESS;
|
||||||
struct registry_priv *registry_par = &padapter->registrypriv;
|
struct registry_priv *registry_par = &padapter->registrypriv;
|
||||||
|
|
||||||
|
|
||||||
|
@ -581,7 +582,7 @@ static uint loadparam(struct adapter *padapter, struct net_device *pnetdev)
|
||||||
snprintf(registry_par->ifname, 16, "%s", ifname);
|
snprintf(registry_par->ifname, 16, "%s", ifname);
|
||||||
snprintf(registry_par->if2name, 16, "%s", if2name);
|
snprintf(registry_par->if2name, 16, "%s", if2name);
|
||||||
registry_par->notch_filter = (u8)rtw_notch_filter;
|
registry_par->notch_filter = (u8)rtw_notch_filter;
|
||||||
return _SUCCESS;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p)
|
static int rtw_net_set_mac_address(struct net_device *pnetdev, void *p)
|
||||||
|
@ -759,6 +760,7 @@ void rtw_stop_drv_threads(struct adapter *padapter)
|
||||||
|
|
||||||
static u8 rtw_init_default_value(struct adapter *padapter)
|
static u8 rtw_init_default_value(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
|
u8 ret = _SUCCESS;
|
||||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
|
@ -801,11 +803,12 @@ static u8 rtw_init_default_value(struct adapter *padapter)
|
||||||
padapter->bWritePortCancel = false;
|
padapter->bWritePortCancel = false;
|
||||||
padapter->bRxRSSIDisplay = 0;
|
padapter->bRxRSSIDisplay = 0;
|
||||||
padapter->bNotifyChannelChange = 0;
|
padapter->bNotifyChannelChange = 0;
|
||||||
return _SUCCESS;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_reset_drv_sw(struct adapter *padapter)
|
u8 rtw_reset_drv_sw(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
|
u8 ret8 = _SUCCESS;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
|
struct pwrctrl_priv *pwrctrlpriv = &padapter->pwrctrlpriv;
|
||||||
|
|
||||||
|
@ -830,7 +833,7 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
|
||||||
|
|
||||||
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
rtw_set_signal_stat_timer(&padapter->recvpriv);
|
||||||
|
|
||||||
return _SUCCESS;
|
return ret8;
|
||||||
}
|
}
|
||||||
|
|
||||||
u8 rtw_init_drv_sw(struct adapter *padapter)
|
u8 rtw_init_drv_sw(struct adapter *padapter)
|
||||||
|
|
|
@ -51,7 +51,7 @@ void *rtw_malloc2d(int h, int w, int size)
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
|
|
||||||
void **a = kzalloc(h*sizeof(void *) + h*w*size, GFP_KERNEL);
|
void **a = (void **)kzalloc(h*sizeof(void *) + h*w*size, GFP_KERNEL);
|
||||||
if (a == NULL) {
|
if (a == NULL) {
|
||||||
pr_info("%s: alloc memory fail!\n", __func__);
|
pr_info("%s: alloc memory fail!\n", __func__);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
|
@ -148,21 +148,36 @@ static int rtw_android_set_block(struct net_device *net, char *command,
|
||||||
int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
char *command;
|
char *command = NULL;
|
||||||
int cmd_num;
|
int cmd_num;
|
||||||
int bytes_written = 0;
|
int bytes_written = 0;
|
||||||
struct android_wifi_priv_cmd priv_cmd;
|
struct android_wifi_priv_cmd priv_cmd;
|
||||||
|
|
||||||
if (!ifr->ifr_data)
|
if (!ifr->ifr_data) {
|
||||||
return -EINVAL;
|
ret = -EINVAL;
|
||||||
if (copy_from_user(&priv_cmd, ifr->ifr_data, sizeof(priv_cmd)))
|
goto exit;
|
||||||
return -EFAULT;
|
}
|
||||||
if (priv_cmd.total_len < 1)
|
if (copy_from_user(&priv_cmd, ifr->ifr_data,
|
||||||
return -EINVAL;
|
sizeof(struct android_wifi_priv_cmd))) {
|
||||||
command = memdup_user(priv_cmd.buf, priv_cmd.total_len);
|
ret = -EFAULT;
|
||||||
if (IS_ERR(command))
|
goto exit;
|
||||||
return PTR_ERR(command);
|
}
|
||||||
command[priv_cmd.total_len - 1] = 0;
|
command = kmalloc(priv_cmd.total_len, GFP_KERNEL);
|
||||||
|
if (!command) {
|
||||||
|
DBG_88E("%s: failed to allocate memory\n", __func__);
|
||||||
|
ret = -ENOMEM;
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
if (!access_ok(VERIFY_READ, priv_cmd.buf, priv_cmd.total_len)) {
|
||||||
|
DBG_88E("%s: failed to access memory\n", __func__);
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
|
if (copy_from_user(command, (char __user *)priv_cmd.buf,
|
||||||
|
priv_cmd.total_len)) {
|
||||||
|
ret = -EFAULT;
|
||||||
|
goto exit;
|
||||||
|
}
|
||||||
DBG_88E("%s: Android private cmd \"%s\" on %s\n",
|
DBG_88E("%s: Android private cmd \"%s\" on %s\n",
|
||||||
__func__, command, ifr->ifr_name);
|
__func__, command, ifr->ifr_name);
|
||||||
cmd_num = rtw_android_cmdstr_to_num(command);
|
cmd_num = rtw_android_cmdstr_to_num(command);
|
||||||
|
@ -176,7 +191,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
|
||||||
DBG_88E("%s: Ignore private cmd \"%s\" - iface %s is down\n",
|
DBG_88E("%s: Ignore private cmd \"%s\" - iface %s is down\n",
|
||||||
__func__, command, ifr->ifr_name);
|
__func__, command, ifr->ifr_name);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
goto free;
|
goto exit;
|
||||||
}
|
}
|
||||||
switch (cmd_num) {
|
switch (cmd_num) {
|
||||||
case ANDROID_WIFI_CMD_STOP:
|
case ANDROID_WIFI_CMD_STOP:
|
||||||
|
@ -264,7 +279,7 @@ response:
|
||||||
} else {
|
} else {
|
||||||
ret = bytes_written;
|
ret = bytes_written;
|
||||||
}
|
}
|
||||||
free:
|
exit:
|
||||||
kfree(command);
|
kfree(command);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -556,6 +556,8 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf)
|
||||||
|
|
||||||
RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-dev_remove()\n"));
|
RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-dev_remove()\n"));
|
||||||
DBG_88E("-r871xu_dev_remove, done\n");
|
DBG_88E("-r871xu_dev_remove, done\n");
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct usb_driver rtl8188e_usb_drv = {
|
static struct usb_driver rtl8188e_usb_drv = {
|
||||||
|
|
|
@ -843,7 +843,7 @@ void usb_write_port_cancel(struct adapter *padapter)
|
||||||
void rtl8188eu_recv_tasklet(void *priv)
|
void rtl8188eu_recv_tasklet(void *priv)
|
||||||
{
|
{
|
||||||
struct sk_buff *pskb;
|
struct sk_buff *pskb;
|
||||||
struct adapter *adapt = priv;
|
struct adapter *adapt = (struct adapter *)priv;
|
||||||
struct recv_priv *precvpriv = &adapt->recvpriv;
|
struct recv_priv *precvpriv = &adapt->recvpriv;
|
||||||
|
|
||||||
while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue))) {
|
while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue))) {
|
||||||
|
@ -862,7 +862,7 @@ void rtl8188eu_recv_tasklet(void *priv)
|
||||||
void rtl8188eu_xmit_tasklet(void *priv)
|
void rtl8188eu_xmit_tasklet(void *priv)
|
||||||
{
|
{
|
||||||
int ret = false;
|
int ret = false;
|
||||||
struct adapter *adapt = priv;
|
struct adapter *adapt = (struct adapter *)priv;
|
||||||
struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
|
struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
|
||||||
|
|
||||||
if (check_fwstate(&adapt->mlmepriv, _FW_UNDER_SURVEY))
|
if (check_fwstate(&adapt->mlmepriv, _FW_UNDER_SURVEY))
|
||||||
|
|
Loading…
Reference in a new issue