mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-26 06:23:38 +00:00
rtl8188eu: Remove most typedef statements from include/osdep_service.h
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
26b163f24f
commit
e2285839e9
46 changed files with 531 additions and 733 deletions
|
@ -53,7 +53,7 @@ void init_mlme_ap_info(struct adapter *padapter)
|
||||||
|
|
||||||
void free_mlme_ap_info(struct adapter *padapter)
|
void free_mlme_ap_info(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct sta_info *psta=NULL;
|
struct sta_info *psta=NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
|
@ -326,8 +326,8 @@ u8 chk_sta_is_alive(struct sta_info *psta)
|
||||||
|
|
||||||
void expire_timeout_chk(struct adapter *padapter)
|
void expire_timeout_chk(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
u8 updated;
|
u8 updated;
|
||||||
struct sta_info *psta=NULL;
|
struct sta_info *psta=NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
@ -615,7 +615,7 @@ void add_RATid(struct adapter *padapter, struct sta_info *psta, u8 rssi_level)
|
||||||
|
|
||||||
void update_bmc_sta(struct adapter *padapter)
|
void update_bmc_sta(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u32 init_rate=0;
|
u32 init_rate=0;
|
||||||
unsigned char network_type, raid;
|
unsigned char network_type, raid;
|
||||||
int i, supportRateNum = 0;
|
int i, supportRateNum = 0;
|
||||||
|
@ -720,7 +720,7 @@ void update_bmc_sta(struct adapter *padapter)
|
||||||
|
|
||||||
void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
|
void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
|
@ -1331,14 +1331,14 @@ void rtw_set_macaddr_acl(struct adapter *padapter, int mode)
|
||||||
|
|
||||||
int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
u8 added = false;
|
u8 added = false;
|
||||||
int i, ret=0;
|
int i, 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;
|
||||||
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
struct __queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||||
|
|
||||||
DBG_871X("%s(acl_num=%d)=" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr));
|
DBG_871X("%s(acl_num=%d)=" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr));
|
||||||
|
|
||||||
|
@ -1405,13 +1405,13 @@ 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)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
int i, ret=0;
|
int i, 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;
|
||||||
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
struct __queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||||
|
|
||||||
DBG_871X("%s(acl_num=%d)=" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr));
|
DBG_871X("%s(acl_num=%d)=" MAC_FMT "\n", __func__, pacl_list->num, MAC_ARG(addr));
|
||||||
|
|
||||||
|
@ -1608,7 +1608,7 @@ static void update_bcn_vendor_spec_ie(struct adapter *padapter, u8*oui)
|
||||||
|
|
||||||
void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
void update_beacon(struct adapter *padapter, u8 ie_id, u8 *oui, u8 tx)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv *pmlmepriv;
|
struct mlme_priv *pmlmepriv;
|
||||||
struct mlme_ext_priv *pmlmeext;
|
struct mlme_ext_priv *pmlmeext;
|
||||||
/* struct mlme_ext_info *pmlmeinfo; */
|
/* struct mlme_ext_info *pmlmeinfo; */
|
||||||
|
@ -1771,8 +1771,8 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
|
||||||
/* update associcated stations cap. */
|
/* update associcated stations cap. */
|
||||||
if(updated == true)
|
if(updated == true)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
struct sta_info *psta=NULL;
|
struct sta_info *psta=NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
|
||||||
|
@ -2022,7 +2022,7 @@ u8 bss_cap_update_on_sta_leave(struct adapter *padapter, struct sta_info *psta)
|
||||||
|
|
||||||
u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16 reason)
|
u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16 reason)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u8 beacon_updated = false;
|
u8 beacon_updated = false;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
|
@ -2071,8 +2071,8 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16
|
||||||
|
|
||||||
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)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
int ret=0;
|
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;
|
||||||
|
@ -2108,8 +2108,8 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
|
||||||
|
|
||||||
int rtw_sta_flush(struct adapter *padapter)
|
int rtw_sta_flush(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
int ret=0;
|
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;
|
||||||
|
@ -2213,8 +2213,8 @@ void rtw_ap_restore_network(struct adapter *padapter)
|
||||||
struct sta_priv * pstapriv = &padapter->stapriv;
|
struct sta_priv * pstapriv = &padapter->stapriv;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
u8 chk_alive_num = 0;
|
u8 chk_alive_num = 0;
|
||||||
char chk_alive_list[NUM_STA];
|
char chk_alive_list[NUM_STA];
|
||||||
int i;
|
int i;
|
||||||
|
@ -2326,15 +2326,15 @@ void start_ap_mode(struct adapter *padapter)
|
||||||
|
|
||||||
void stop_ap_mode(struct adapter *padapter)
|
void stop_ap_mode(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
struct rtw_wlan_acl_node *paclnode;
|
struct rtw_wlan_acl_node *paclnode;
|
||||||
struct sta_info *psta=NULL;
|
struct sta_info *psta=NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||||
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
struct wlan_acl_pool *pacl_list = &pstapriv->acl_list;
|
||||||
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
struct __queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||||
|
|
||||||
pmlmepriv->update_bcn = false;
|
pmlmepriv->update_bcn = false;
|
||||||
pmlmeext->bstart_bss = false;
|
pmlmeext->bstart_bss = false;
|
||||||
|
|
|
@ -380,7 +380,7 @@ static __inline__ void __network_hash_link(struct adapter *priv,
|
||||||
struct nat25_network_db_entry *ent, int hash)
|
struct nat25_network_db_entry *ent, int hash)
|
||||||
{
|
{
|
||||||
/* Caller must spin_lock_bh already! */
|
/* Caller must spin_lock_bh already! */
|
||||||
/* _irqL irqL; */
|
/* unsigned long irqL; */
|
||||||
/* spin_lock_bh(&priv->br_ext_lock); */
|
/* spin_lock_bh(&priv->br_ext_lock); */
|
||||||
|
|
||||||
ent->next_hash = priv->nethash[hash];
|
ent->next_hash = priv->nethash[hash];
|
||||||
|
@ -396,7 +396,7 @@ static __inline__ void __network_hash_link(struct adapter *priv,
|
||||||
static __inline__ void __network_hash_unlink(struct nat25_network_db_entry *ent)
|
static __inline__ void __network_hash_unlink(struct nat25_network_db_entry *ent)
|
||||||
{
|
{
|
||||||
/* Caller must spin_lock_bh already! */
|
/* Caller must spin_lock_bh already! */
|
||||||
/* _irqL irqL; */
|
/* unsigned long irqL; */
|
||||||
/* spin_lock_bh(&priv->br_ext_lock); */
|
/* spin_lock_bh(&priv->br_ext_lock); */
|
||||||
|
|
||||||
*(ent->pprev_hash) = ent->next_hash;
|
*(ent->pprev_hash) = ent->next_hash;
|
||||||
|
@ -413,7 +413,7 @@ static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
|
||||||
struct sk_buff *skb, unsigned char *networkAddr)
|
struct sk_buff *skb, unsigned char *networkAddr)
|
||||||
{
|
{
|
||||||
struct nat25_network_db_entry *db;
|
struct nat25_network_db_entry *db;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
spin_lock_bh(&priv->br_ext_lock);
|
spin_lock_bh(&priv->br_ext_lock);
|
||||||
|
|
||||||
db = priv->nethash[__nat25_network_hash(networkAddr)];
|
db = priv->nethash[__nat25_network_hash(networkAddr)];
|
||||||
|
@ -491,7 +491,7 @@ static void __nat25_db_network_insert(struct adapter *priv,
|
||||||
{
|
{
|
||||||
struct nat25_network_db_entry *db;
|
struct nat25_network_db_entry *db;
|
||||||
int hash;
|
int hash;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
spin_lock_bh(&priv->br_ext_lock);
|
spin_lock_bh(&priv->br_ext_lock);
|
||||||
|
|
||||||
hash = __nat25_network_hash(networkAddr);
|
hash = __nat25_network_hash(networkAddr);
|
||||||
|
@ -537,7 +537,7 @@ static void __nat25_db_print(struct adapter *priv)
|
||||||
void nat25_db_cleanup(struct adapter *priv)
|
void nat25_db_cleanup(struct adapter *priv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
spin_lock_bh(&priv->br_ext_lock);
|
spin_lock_bh(&priv->br_ext_lock);
|
||||||
|
|
||||||
for(i=0; i<NAT25_HASH_SIZE; i++)
|
for(i=0; i<NAT25_HASH_SIZE; i++)
|
||||||
|
@ -568,7 +568,7 @@ void nat25_db_cleanup(struct adapter *priv)
|
||||||
void nat25_db_expire(struct adapter *priv)
|
void nat25_db_expire(struct adapter *priv)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
spin_lock_bh(&priv->br_ext_lock);
|
spin_lock_bh(&priv->br_ext_lock);
|
||||||
|
|
||||||
/* if(!priv->ethBrExtInfo.nat25_disable) */
|
/* if(!priv->ethBrExtInfo.nat25_disable) */
|
||||||
|
@ -1355,7 +1355,7 @@ int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
|
||||||
|
|
||||||
if (!priv->ethBrExtInfo.nat25_disable)
|
if (!priv->ethBrExtInfo.nat25_disable)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
spin_lock_bh(&priv->br_ext_lock);
|
spin_lock_bh(&priv->br_ext_lock);
|
||||||
/*
|
/*
|
||||||
* This function look up the destination network address from
|
* This function look up the destination network address from
|
||||||
|
|
|
@ -84,7 +84,7 @@ exit:
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_C2H_WK
|
#ifdef CONFIG_C2H_WK
|
||||||
static void c2h_wk_callback(_workitem *work);
|
static void c2h_wk_callback(struct work_struct *work);
|
||||||
#endif
|
#endif
|
||||||
sint _rtw_init_evt_priv(struct evt_priv *pevtpriv)
|
sint _rtw_init_evt_priv(struct evt_priv *pevtpriv)
|
||||||
{
|
{
|
||||||
|
@ -162,9 +162,9 @@ ISR/Call-Back functions can't call this sub-function.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj)
|
sint _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -181,9 +181,9 @@ exit:
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct cmd_obj *_rtw_dequeue_cmd(_queue *queue)
|
struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct cmd_obj *obj;
|
struct cmd_obj *obj;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -357,7 +357,7 @@ void rtw_stop_cmd_thread(struct adapter *adapter)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_return rtw_cmd_thread(thread_context context)
|
int rtw_cmd_thread(void * context)
|
||||||
{
|
{
|
||||||
u8 ret;
|
u8 ret;
|
||||||
struct cmd_obj *pcmd;
|
struct cmd_obj *pcmd;
|
||||||
|
@ -2406,7 +2406,7 @@ exit:
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_C2H_WK
|
#ifdef CONFIG_C2H_WK
|
||||||
static void c2h_wk_callback(_workitem *work)
|
static void c2h_wk_callback(struct work_struct *work)
|
||||||
{
|
{
|
||||||
struct evt_priv *evtpriv = container_of(work, struct evt_priv, c2h_wk);
|
struct evt_priv *evtpriv = container_of(work, struct evt_priv, c2h_wk);
|
||||||
struct adapter *adapter = container_of(evtpriv, struct adapter, evtpriv);
|
struct adapter *adapter = container_of(evtpriv, struct adapter, evtpriv);
|
||||||
|
@ -2537,7 +2537,7 @@ void rtw_survey_cmd_callback(struct adapter* padapter , struct cmd_obj *pcmd)
|
||||||
}
|
}
|
||||||
void rtw_disassoc_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
void rtw_disassoc_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -2586,7 +2586,7 @@ void rtw_joinbss_cmd_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
||||||
|
|
||||||
void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u8 timer_cancelled;
|
u8 timer_cancelled;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct wlan_network *pwlan = NULL;
|
struct wlan_network *pwlan = NULL;
|
||||||
|
@ -2643,7 +2643,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
pwlan = _rtw_alloc_network(pmlmepriv);
|
pwlan = _rtw_alloc_network(pmlmepriv);
|
||||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||||
|
@ -2710,7 +2710,7 @@ exit:
|
||||||
|
|
||||||
void rtw_setassocsta_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
void rtw_setassocsta_cmdrsp_callback(struct adapter* padapter, struct cmd_obj *pcmd)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct sta_priv * pstapriv = &padapter->stapriv;
|
struct sta_priv * pstapriv = &padapter->stapriv;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct set_assocsta_parm* passocsta_parm = (struct set_assocsta_parm*)(pcmd->parmbuf);
|
struct set_assocsta_parm* passocsta_parm = (struct set_assocsta_parm*)(pcmd->parmbuf);
|
||||||
|
|
|
@ -942,7 +942,7 @@ int proc_get_all_sta_info(char *page, char **start,
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
int i, j;
|
int i, j;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
struct recv_reorder_ctrl *preorder_ctrl;
|
struct recv_reorder_ctrl *preorder_ctrl;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
|
|
|
@ -86,11 +86,11 @@ exit:
|
||||||
u8 rtw_do_join(struct adapter * padapter);
|
u8 rtw_do_join(struct adapter * padapter);
|
||||||
u8 rtw_do_join(struct adapter * padapter)
|
u8 rtw_do_join(struct adapter * padapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
u8* pibss = NULL;
|
u8* pibss = NULL;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
u8 ret=_SUCCESS;
|
u8 ret=_SUCCESS;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -212,7 +212,7 @@ exit:
|
||||||
|
|
||||||
u8 rtw_set_802_11_bssid(struct adapter* padapter, u8 *bssid)
|
u8 rtw_set_802_11_bssid(struct adapter* padapter, u8 *bssid)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u8 status=_SUCCESS;
|
u8 status=_SUCCESS;
|
||||||
u32 cur_time = 0;
|
u32 cur_time = 0;
|
||||||
|
|
||||||
|
@ -296,7 +296,7 @@ exit:
|
||||||
|
|
||||||
u8 rtw_set_802_11_ssid(struct adapter* padapter, struct ndis_802_11_ssid *ssid)
|
u8 rtw_set_802_11_ssid(struct adapter* padapter, struct ndis_802_11_ssid *ssid)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u8 status = _SUCCESS;
|
u8 status = _SUCCESS;
|
||||||
u32 cur_time = 0;
|
u32 cur_time = 0;
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ exit:
|
||||||
|
|
||||||
u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, struct ndis_802_11_ssid *ssid)
|
u8 rtw_set_802_11_connect(struct adapter* padapter, u8 *bssid, struct ndis_802_11_ssid *ssid)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u8 status = _SUCCESS;
|
u8 status = _SUCCESS;
|
||||||
u32 cur_time = 0;
|
u32 cur_time = 0;
|
||||||
bool bssid_valid = true;
|
bool bssid_valid = true;
|
||||||
|
@ -486,7 +486,7 @@ exit:
|
||||||
u8 rtw_set_802_11_infrastructure_mode(struct adapter* padapter,
|
u8 rtw_set_802_11_infrastructure_mode(struct adapter* padapter,
|
||||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype)
|
enum NDIS_802_11_NETWORK_INFRASTRUCTURE networktype)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct wlan_network *cur_network = &pmlmepriv->cur_network;
|
struct wlan_network *cur_network = &pmlmepriv->cur_network;
|
||||||
enum NDIS_802_11_NETWORK_INFRASTRUCTURE* pold_state = &(cur_network->network.InfrastructureMode);
|
enum NDIS_802_11_NETWORK_INFRASTRUCTURE* pold_state = &(cur_network->network.InfrastructureMode);
|
||||||
|
@ -563,7 +563,7 @@ u8 rtw_set_802_11_infrastructure_mode(struct adapter* padapter,
|
||||||
|
|
||||||
u8 rtw_set_802_11_disassociate(struct adapter *padapter)
|
u8 rtw_set_802_11_disassociate(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv * pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv * pmlmepriv = &padapter->mlmepriv;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -590,7 +590,7 @@ u8 rtw_set_802_11_disassociate(struct adapter *padapter)
|
||||||
|
|
||||||
u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, struct ndis_802_11_ssid *pssid, int ssid_max_num)
|
u8 rtw_set_802_11_bssid_list_scan(struct adapter* padapter, struct ndis_802_11_ssid *pssid, int ssid_max_num)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||||
u8 res=true;
|
u8 res=true;
|
||||||
|
|
||||||
|
|
|
@ -153,9 +153,9 @@ void _rtw_free_mlme_priv (struct mlme_priv *pmlmepriv)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
sint _rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork)
|
sint _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -175,9 +175,9 @@ exit:
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlan_network *_rtw_dequeue_network(_queue *queue)
|
struct wlan_network *_rtw_dequeue_network(struct __queue *queue)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
struct wlan_network *pnetwork;
|
struct wlan_network *pnetwork;
|
||||||
|
|
||||||
|
@ -205,10 +205,10 @@ struct wlan_network *_rtw_dequeue_network(_queue *queue)
|
||||||
|
|
||||||
struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv )/* _queue *free_queue) */
|
struct wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv )/* _queue *free_queue) */
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct wlan_network *pnetwork;
|
struct wlan_network *pnetwork;
|
||||||
_queue *free_queue = &pmlmepriv->free_bss_pool;
|
struct __queue *free_queue = &pmlmepriv->free_bss_pool;
|
||||||
_list* plist = NULL;
|
struct list_head *plist = NULL;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -245,8 +245,8 @@ void _rtw_free_network(struct mlme_priv *pmlmepriv ,struct wlan_network *pnetwor
|
||||||
{
|
{
|
||||||
u32 curr_time, delta_time;
|
u32 curr_time, delta_time;
|
||||||
u32 lifetime = SCANQUEUE_LIFETIME;
|
u32 lifetime = SCANQUEUE_LIFETIME;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_queue *free_queue = &(pmlmepriv->free_bss_pool);
|
struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -291,7 +291,7 @@ exit:
|
||||||
void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork)
|
void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork)
|
||||||
{
|
{
|
||||||
|
|
||||||
_queue *free_queue = &(pmlmepriv->free_bss_pool);
|
struct __queue *free_queue = &(pmlmepriv->free_bss_pool);
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -323,11 +323,11 @@ exit:
|
||||||
|
|
||||||
Shall be calle under atomic context... to avoid possible racing condition...
|
Shall be calle under atomic context... to avoid possible racing condition...
|
||||||
*/
|
*/
|
||||||
struct wlan_network *_rtw_find_network(_queue *scanned_queue, u8 *addr)
|
struct wlan_network *_rtw_find_network(struct __queue *scanned_queue, u8 *addr)
|
||||||
{
|
{
|
||||||
|
|
||||||
/* _irqL irqL; */
|
/* unsigned long irqL; */
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
u8 zero_addr[ETH_ALEN] = {0,0,0,0,0,0};
|
u8 zero_addr[ETH_ALEN] = {0,0,0,0,0,0};
|
||||||
|
|
||||||
|
@ -369,11 +369,11 @@ exit:
|
||||||
|
|
||||||
void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
struct wlan_network *pnetwork;
|
struct wlan_network *pnetwork;
|
||||||
struct mlme_priv* pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv* pmlmepriv = &padapter->mlmepriv;
|
||||||
_queue *scanned_queue = &pmlmepriv->scanned_queue;
|
struct __queue *scanned_queue = &pmlmepriv->scanned_queue;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -478,8 +478,7 @@ void rtw_free_mlme_priv (struct mlme_priv *pmlmepriv)
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork);
|
int rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork)
|
||||||
int rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork)
|
|
||||||
{
|
{
|
||||||
int res;
|
int res;
|
||||||
;
|
;
|
||||||
|
@ -489,7 +488,7 @@ int rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct wlan_network *rtw_dequeue_network(_queue *queue)
|
static struct wlan_network *rtw_dequeue_network(struct __queue *queue)
|
||||||
{
|
{
|
||||||
struct wlan_network *pnetwork;
|
struct wlan_network *pnetwork;
|
||||||
;
|
;
|
||||||
|
@ -508,7 +507,6 @@ struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv )/* _queue *f
|
||||||
return pnetwork;
|
return pnetwork;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 is_freeall);
|
|
||||||
void rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 is_freeall)/* struct wlan_network *pnetwork, _queue *free_queue) */
|
void rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork, u8 is_freeall)/* struct wlan_network *pnetwork, _queue *free_queue) */
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
|
@ -539,7 +537,7 @@ void rtw_free_network_queue(struct adapter* dev, u8 isfreeall)
|
||||||
|
|
||||||
Shall be calle under atomic context... to avoid possible racing condition...
|
Shall be calle under atomic context... to avoid possible racing condition...
|
||||||
*/
|
*/
|
||||||
struct wlan_network *rtw_find_network(_queue *scanned_queue, u8 *addr)
|
struct wlan_network *rtw_find_network(struct __queue *scanned_queue, u8 *addr)
|
||||||
{
|
{
|
||||||
struct wlan_network *pnetwork = _rtw_find_network(scanned_queue, addr);
|
struct wlan_network *pnetwork = _rtw_find_network(scanned_queue, addr);
|
||||||
|
|
||||||
|
@ -609,11 +607,9 @@ int is_same_network(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst, u8 fea
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlan_network * rtw_get_oldest_wlan_network(_queue *scanned_queue)
|
struct wlan_network * rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
|
||||||
{
|
{
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
|
|
||||||
|
|
||||||
struct wlan_network *pwlan = NULL;
|
struct wlan_network *pwlan = NULL;
|
||||||
struct wlan_network *oldest = NULL;
|
struct wlan_network *oldest = NULL;
|
||||||
;
|
;
|
||||||
|
@ -740,13 +736,13 @@ Caller must hold pmlmepriv->lock first.
|
||||||
*/
|
*/
|
||||||
void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
|
void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
ULONG bssid_ex_sz;
|
ULONG bssid_ex_sz;
|
||||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||||
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(adapter->mlmeextpriv);
|
||||||
struct wifidirect_info *pwdinfo= &(adapter->wdinfo);
|
struct wifidirect_info *pwdinfo= &(adapter->wdinfo);
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
struct wlan_network *oldest = NULL;
|
struct wlan_network *oldest = NULL;
|
||||||
int target_find = 0;
|
int target_find = 0;
|
||||||
|
@ -873,13 +869,8 @@ exit:
|
||||||
void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork);
|
void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork);
|
||||||
void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
|
void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv *pmlmepriv = &(((struct adapter *)adapter)->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(((struct adapter *)adapter)->mlmepriv);
|
||||||
/* _queue *queue = &(pmlmepriv->scanned_queue); */
|
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
/* spin_lock_bh(&queue->lock); */
|
|
||||||
|
|
||||||
#if defined(CONFIG_P2P) && defined(CONFIG_P2P)
|
#if defined(CONFIG_P2P) && defined(CONFIG_P2P)
|
||||||
rtw_wlan_bssid_ex_remove_p2p_attr(pnetwork, P2P_ATTR_GROUP_INFO);
|
rtw_wlan_bssid_ex_remove_p2p_attr(pnetwork, P2P_ATTR_GROUP_INFO);
|
||||||
|
@ -888,10 +879,6 @@ void rtw_add_network(struct adapter *adapter, struct wlan_bssid_ex *pnetwork)
|
||||||
update_current_network(adapter, pnetwork);
|
update_current_network(adapter, pnetwork);
|
||||||
|
|
||||||
rtw_update_scanned_network(adapter, pnetwork);
|
rtw_update_scanned_network(adapter, pnetwork);
|
||||||
|
|
||||||
/* spin_unlock_bh(&queue->lock); */
|
|
||||||
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* select the desired network based on the capability of the (i)bss. */
|
/* select the desired network based on the capability of the (i)bss. */
|
||||||
|
@ -974,7 +961,7 @@ void rtw_atimdone_event_callback(struct adapter *adapter , u8 *pbuf)
|
||||||
|
|
||||||
void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u32 len;
|
u32 len;
|
||||||
struct wlan_bssid_ex *pnetwork;
|
struct wlan_bssid_ex *pnetwork;
|
||||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||||
|
@ -1002,7 +989,7 @@ void rtw_survey_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
if(_rtw_memcmp(&(pmlmepriv->cur_network.network.MacAddress), pnetwork->MacAddress, ETH_ALEN))
|
if(_rtw_memcmp(&(pmlmepriv->cur_network.network.MacAddress), pnetwork->MacAddress, ETH_ALEN))
|
||||||
{
|
{
|
||||||
struct wlan_network* ibss_wlan = NULL;
|
struct wlan_network* ibss_wlan = NULL;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
memcpy(pmlmepriv->cur_network.network.IEs, pnetwork->IEs, 8);
|
memcpy(pmlmepriv->cur_network.network.IEs, pnetwork->IEs, 8);
|
||||||
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
spin_lock_bh(&(pmlmepriv->scanned_queue.lock));
|
||||||
|
@ -1040,7 +1027,7 @@ exit:
|
||||||
|
|
||||||
void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u8 timer_cancelled = false;
|
u8 timer_cancelled = false;
|
||||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||||
|
|
||||||
|
@ -1190,9 +1177,9 @@ void rtw_fwdbg_event_callback(struct adapter *adapter , u8 *pbuf)
|
||||||
|
|
||||||
static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
||||||
{
|
{
|
||||||
_queue *free_queue = &pmlmepriv->free_bss_pool;
|
struct __queue *free_queue = &pmlmepriv->free_bss_pool;
|
||||||
_queue *scan_queue = &pmlmepriv->scanned_queue;
|
struct __queue *scan_queue = &pmlmepriv->scanned_queue;
|
||||||
_list *plist, *phead, *ptemp;
|
struct list_head *plist, *phead, *ptemp;
|
||||||
|
|
||||||
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+free_scanqueue\n"));
|
RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_, ("+free_scanqueue\n"));
|
||||||
spin_lock_bh(&scan_queue->lock);
|
spin_lock_bh(&scan_queue->lock);
|
||||||
|
@ -1219,7 +1206,7 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
|
||||||
*/
|
*/
|
||||||
void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
|
void rtw_free_assoc_resources(struct adapter *adapter, int lock_scanned_queue)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct wlan_network* pwlan = NULL;
|
struct wlan_network* pwlan = NULL;
|
||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||||
|
@ -1593,7 +1580,7 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
|
||||||
/* define REJOIN */
|
/* define REJOIN */
|
||||||
void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
_irqL irqL,irqL2;
|
unsigned long irqL,irqL2;
|
||||||
static u8 retry=0;
|
static u8 retry=0;
|
||||||
u8 timer_cancelled;
|
u8 timer_cancelled;
|
||||||
struct sta_info *ptarget_sta= NULL, *pcur_sta = NULL;
|
struct sta_info *ptarget_sta= NULL, *pcur_sta = NULL;
|
||||||
|
@ -1808,7 +1795,7 @@ void rtw_sta_media_status_rpt(struct adapter *adapter,struct sta_info *psta, u32
|
||||||
|
|
||||||
void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||||
struct stassoc_event *pstassoc = (struct stassoc_event*)pbuf;
|
struct stassoc_event *pstassoc = (struct stassoc_event*)pbuf;
|
||||||
|
@ -1927,7 +1914,7 @@ exit:
|
||||||
|
|
||||||
void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
|
||||||
{
|
{
|
||||||
_irqL irqL,irqL2;
|
unsigned long irqL,irqL2;
|
||||||
int mac_id=-1;
|
int mac_id=-1;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
struct wlan_network* pwlan = NULL;
|
struct wlan_network* pwlan = NULL;
|
||||||
|
@ -2057,7 +2044,7 @@ void rtw_cpwm_event_callback(struct adapter *padapter, u8 *pbuf)
|
||||||
*/
|
*/
|
||||||
void _rtw_join_timeout_handler (struct adapter *adapter)
|
void _rtw_join_timeout_handler (struct adapter *adapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
int do_join_r;
|
int do_join_r;
|
||||||
|
|
||||||
|
@ -2111,7 +2098,7 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
|
||||||
*/
|
*/
|
||||||
void rtw_scan_timeout_handler (struct adapter *adapter)
|
void rtw_scan_timeout_handler (struct adapter *adapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
|
|
||||||
DBG_871X(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
|
DBG_871X(FUNC_ADPT_FMT" fw_state=%x\n", FUNC_ADPT_ARG(adapter), get_fwstate(pmlmepriv));
|
||||||
|
@ -2323,11 +2310,11 @@ pmlmepriv->lock
|
||||||
|
|
||||||
int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv )
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
int ret;
|
int ret;
|
||||||
_list *phead;
|
struct list_head *phead;
|
||||||
struct adapter *adapter;
|
struct adapter *adapter;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
struct wlan_network *candidate = NULL;
|
struct wlan_network *candidate = NULL;
|
||||||
u8 bSupportAntDiv = false;
|
u8 bSupportAntDiv = false;
|
||||||
|
|
|
@ -1025,7 +1025,7 @@ _END_ONBEACON_:
|
||||||
unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
unsigned int OnAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
unsigned int auth_mode, seq, ie_len;
|
unsigned int auth_mode, seq, ie_len;
|
||||||
unsigned char *sa, *p;
|
unsigned char *sa, *p;
|
||||||
u16 algorithm;
|
u16 algorithm;
|
||||||
|
@ -1329,7 +1329,7 @@ authclnt_fail:
|
||||||
unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u16 capab_info, listen_interval;
|
u16 capab_info, listen_interval;
|
||||||
struct rtw_ieee802_11_elems elems;
|
struct rtw_ieee802_11_elems elems;
|
||||||
struct sta_info *pstat;
|
struct sta_info *pstat;
|
||||||
|
@ -2018,7 +2018,7 @@ unsigned int OnDeAuth(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
|
||||||
|
@ -2113,7 +2113,7 @@ unsigned int OnDisassoc(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
|
||||||
|
@ -5562,7 +5562,7 @@ void dump_mgntframe(struct adapter *padapter, struct xmit_frame *pmgntframe)
|
||||||
s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms)
|
s32 dump_mgntframe_and_wait(struct adapter *padapter, struct xmit_frame *pmgntframe, int timeout_ms)
|
||||||
{
|
{
|
||||||
s32 ret = _FAIL;
|
s32 ret = _FAIL;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
struct xmit_buf *pxmitbuf = pmgntframe->pxmitbuf;
|
struct xmit_buf *pxmitbuf = pmgntframe->pxmitbuf;
|
||||||
struct submit_ctx sctx;
|
struct submit_ctx sctx;
|
||||||
|
@ -5664,7 +5664,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
|
||||||
unsigned int rate_len;
|
unsigned int rate_len;
|
||||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||||
#if defined (CONFIG_AP_MODE)
|
#if defined (CONFIG_AP_MODE)
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
#endif /* if defined (CONFIG_AP_MODE) */
|
#endif /* if defined (CONFIG_AP_MODE) */
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
|
@ -7447,8 +7447,8 @@ exit:
|
||||||
|
|
||||||
void issue_action_spct_ch_switch(struct adapter *padapter, u8 *ra, u8 new_ch, u8 ch_offset)
|
void issue_action_spct_ch_switch(struct adapter *padapter, u8 *ra, u8 new_ch, u8 ch_offset)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
struct xmit_frame *pmgntframe;
|
struct xmit_frame *pmgntframe;
|
||||||
struct pkt_attrib *pattrib;
|
struct pkt_attrib *pattrib;
|
||||||
unsigned char *pframe;
|
unsigned char *pframe;
|
||||||
|
@ -7750,8 +7750,8 @@ static void issue_action_BA(struct adapter *padapter, unsigned char *raddr,
|
||||||
|
|
||||||
static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
unsigned char category, action;
|
unsigned char category, action;
|
||||||
struct xmit_frame *pmgntframe;
|
struct xmit_frame *pmgntframe;
|
||||||
struct pkt_attrib *pattrib;
|
struct pkt_attrib *pattrib;
|
||||||
|
@ -7763,7 +7763,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
u8 InfoContent[16] = {0};
|
u8 InfoContent[16] = {0};
|
||||||
u8 ICS[8][15];
|
u8 ICS[8][15];
|
||||||
if((pmlmepriv->num_FortyMHzIntolerant==0) || (pmlmepriv->num_sta_no_ht==0))
|
if((pmlmepriv->num_FortyMHzIntolerant==0) || (pmlmepriv->num_sta_no_ht==0))
|
||||||
|
@ -8548,12 +8548,12 @@ void start_clnt_join(struct adapter* padapter)
|
||||||
/* For the Win8 P2P connection, it will be hard to have a successful connection if this Wi-Fi doesn't connect to it. */
|
/* For the Win8 P2P connection, it will be hard to have a successful connection if this Wi-Fi doesn't connect to it. */
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
_queue *queue = &(padapter->mlmepriv.scanned_queue);
|
struct __queue *queue = &(padapter->mlmepriv.scanned_queue);
|
||||||
_list *head = get_list_head(queue);
|
struct list_head *head = get_list_head(queue);
|
||||||
_list *pos = get_next(head);
|
struct list_head *pos = get_next(head);
|
||||||
struct wlan_network *scanned = NULL;
|
struct wlan_network *scanned = NULL;
|
||||||
u8 ie_offset = 0;
|
u8 ie_offset = 0;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
bool has_p2p_ie = false;
|
bool has_p2p_ie = false;
|
||||||
|
|
||||||
spin_lock_bh(&(padapter->mlmepriv.scanned_queue.lock));
|
spin_lock_bh(&(padapter->mlmepriv.scanned_queue.lock));
|
||||||
|
@ -9758,7 +9758,7 @@ void sa_query_timer_hdl(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
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;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
/* disconnect */
|
/* disconnect */
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
|
|
||||||
|
@ -10507,9 +10507,9 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
else /* tx bc/mc frames after update TIM */
|
else /* tx bc/mc frames after update TIM */
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct sta_info *psta_bmc;
|
struct sta_info *psta_bmc;
|
||||||
_list *xmitframe_plist, *xmitframe_phead;
|
struct list_head *xmitframe_plist, *xmitframe_phead;
|
||||||
struct xmit_frame *pxmitframe=NULL;
|
struct xmit_frame *pxmitframe=NULL;
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
|
|
@ -47,8 +47,8 @@ static int is_any_client_associated(struct adapter *padapter)
|
||||||
|
|
||||||
static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
u32 len=0;
|
u32 len=0;
|
||||||
u16 attr_len = 0;
|
u16 attr_len = 0;
|
||||||
u8 tmplen, *pdata_attr, *pstart, *pcur;
|
u8 tmplen, *pdata_attr, *pstart, *pcur;
|
||||||
|
@ -2395,8 +2395,8 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
||||||
attr_contentlen=0;
|
attr_contentlen=0;
|
||||||
if(rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_ID, dev_addr, &attr_contentlen))
|
if(rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_ID, dev_addr, &attr_contentlen))
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
|
|
||||||
spin_lock_bh(&pstapriv->asoc_list_lock);
|
spin_lock_bh(&pstapriv->asoc_list_lock);
|
||||||
phead = &pstapriv->asoc_list;
|
phead = &pstapriv->asoc_list;
|
||||||
|
@ -3136,7 +3136,7 @@ static void find_phase_handler( struct adapter* padapter )
|
||||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct ndis_802_11_ssid ssid;
|
struct ndis_802_11_ssid ssid;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u8 _status = 0;
|
u8 _status = 0;
|
||||||
|
|
||||||
|
|
||||||
|
@ -4116,7 +4116,7 @@ static void pre_tx_scan_timer_process (void *FunctionContext)
|
||||||
{
|
{
|
||||||
struct adapter *adapter = (struct adapter *) FunctionContext;
|
struct adapter *adapter = (struct adapter *) FunctionContext;
|
||||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||||
u8 _status = 0;
|
u8 _status = 0;
|
||||||
|
|
||||||
|
|
104
core/rtw_recv.c
104
core/rtw_recv.c
|
@ -49,9 +49,6 @@ void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
|
||||||
|
|
||||||
spin_lock_init(&psta_recvpriv->lock);
|
spin_lock_init(&psta_recvpriv->lock);
|
||||||
|
|
||||||
/* for(i=0; i<MAX_RX_NUMBLKS; i++) */
|
|
||||||
/* _rtw_init_queue(&psta_recvpriv->blk_strms[i]); */
|
|
||||||
|
|
||||||
_rtw_init_queue(&psta_recvpriv->defrag_q);
|
_rtw_init_queue(&psta_recvpriv->defrag_q);
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -151,11 +148,11 @@ void _rtw_free_recv_priv (struct recv_priv *precvpriv)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
union recv_frame *_rtw_alloc_recvframe (_queue *pfree_recv_queue)
|
union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
|
||||||
{
|
{
|
||||||
|
|
||||||
union recv_frame *precvframe;
|
union recv_frame *precvframe;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
struct recv_priv *precvpriv;
|
struct recv_priv *precvpriv;
|
||||||
;
|
;
|
||||||
|
@ -187,9 +184,9 @@ union recv_frame *_rtw_alloc_recvframe (_queue *pfree_recv_queue)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
union recv_frame *rtw_alloc_recvframe (_queue *pfree_recv_queue)
|
union recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
union recv_frame *precvframe;
|
union recv_frame *precvframe;
|
||||||
|
|
||||||
spin_lock_bh(&pfree_recv_queue->lock);
|
spin_lock_bh(&pfree_recv_queue->lock);
|
||||||
|
@ -209,9 +206,9 @@ void rtw_init_recvframe(union recv_frame *precvframe, struct recv_priv *precvpri
|
||||||
precvframe->u.hdr.len=0;
|
precvframe->u.hdr.len=0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue)
|
int rtw_free_recvframe(union recv_frame *precvframe, struct __queue *pfree_recv_queue)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct adapter *padapter=precvframe->u.hdr.adapter;
|
struct adapter *padapter=precvframe->u.hdr.adapter;
|
||||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||||
|
|
||||||
|
@ -237,7 +234,7 @@ int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue)
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
sint _rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue)
|
sint _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue)
|
||||||
{
|
{
|
||||||
|
|
||||||
struct adapter *padapter=precvframe->u.hdr.adapter;
|
struct adapter *padapter=precvframe->u.hdr.adapter;
|
||||||
|
@ -261,30 +258,18 @@ sint _rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue)
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
sint rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue)
|
sint rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue)
|
||||||
{
|
{
|
||||||
sint ret;
|
sint ret;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
/* _spinlock(&pfree_recv_queue->lock); */
|
|
||||||
spin_lock_bh(&queue->lock);
|
spin_lock_bh(&queue->lock);
|
||||||
ret = _rtw_enqueue_recvframe(precvframe, queue);
|
ret = _rtw_enqueue_recvframe(precvframe, queue);
|
||||||
/* _rtw_spinunlock(&pfree_recv_queue->lock); */
|
|
||||||
spin_unlock_bh(&queue->lock);
|
spin_unlock_bh(&queue->lock);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
sint rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue)
|
|
||||||
{
|
|
||||||
return rtw_free_recvframe(precvframe, queue);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
caller : defrag ; recvframe_chk_defrag in recv_thread (passive)
|
caller : defrag ; recvframe_chk_defrag in recv_thread (passive)
|
||||||
pframequeue: defrag_queue : will be accessed in recv_thread (passive)
|
pframequeue: defrag_queue : will be accessed in recv_thread (passive)
|
||||||
|
@ -293,10 +278,10 @@ using spinlock to protect
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue)
|
void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue)
|
||||||
{
|
{
|
||||||
union recv_frame *precvframe;
|
union recv_frame *precvframe;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
|
|
||||||
;
|
;
|
||||||
_rtw_spinlock(&pframequeue->lock);
|
_rtw_spinlock(&pframequeue->lock);
|
||||||
|
@ -335,9 +320,9 @@ u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue)
|
sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
spin_lock_bh(&queue->lock);
|
spin_lock_bh(&queue->lock);
|
||||||
|
|
||||||
|
@ -349,9 +334,9 @@ sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue)
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue)
|
sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_enter_critical_ex(&queue->lock, &irqL);
|
_enter_critical_ex(&queue->lock, &irqL);
|
||||||
|
|
||||||
rtw_list_delete(&precvbuf->list);
|
rtw_list_delete(&precvbuf->list);
|
||||||
|
@ -362,11 +347,11 @@ sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
struct recv_buf *rtw_dequeue_recvbuf (_queue *queue)
|
struct recv_buf *rtw_dequeue_recvbuf(struct __queue *queue)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct recv_buf *precvbuf;
|
struct recv_buf *precvbuf;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
|
|
||||||
_enter_critical_ex(&queue->lock, &irqL);
|
_enter_critical_ex(&queue->lock, &irqL);
|
||||||
|
|
||||||
|
@ -1308,8 +1293,8 @@ sint validate_recv_ctrl_frame(struct adapter *padapter, union recv_frame *precv_
|
||||||
|
|
||||||
if((psta->state&WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap&BIT(psta->aid)))
|
if((psta->state&WIFI_SLEEP_STATE) && (pstapriv->sta_dz_bitmap&BIT(psta->aid)))
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *xmitframe_plist, *xmitframe_phead;
|
struct list_head *xmitframe_plist, *xmitframe_phead;
|
||||||
struct xmit_frame *pxmitframe=NULL;
|
struct xmit_frame *pxmitframe=NULL;
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
|
|
||||||
|
@ -1967,16 +1952,14 @@ sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* perform defrag */
|
/* perform defrag */
|
||||||
static union recv_frame * recvframe_defrag(struct adapter *adapter,_queue *defrag_q)
|
static union recv_frame * recvframe_defrag(struct adapter *adapter, struct __queue *defrag_q)
|
||||||
{
|
{
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
u8 *data,wlanhdr_offset;
|
u8 *data,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;
|
||||||
_queue *pfree_recv_queue;
|
struct __queue *pfree_recv_queue;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
curfragnum=0;
|
curfragnum=0;
|
||||||
pfree_recv_queue=&adapter->recvpriv.free_recv_queue;
|
pfree_recv_queue=&adapter->recvpriv.free_recv_queue;
|
||||||
|
@ -2063,11 +2046,9 @@ union recv_frame* recvframe_chk_defrag(struct adapter *padapter, union recv_fram
|
||||||
struct recv_frame_hdr *pfhdr;
|
struct recv_frame_hdr *pfhdr;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
struct sta_priv *pstapriv;
|
struct sta_priv *pstapriv;
|
||||||
_list *phead;
|
struct list_head *phead;
|
||||||
union recv_frame *prtnframe = NULL;
|
union recv_frame *prtnframe = NULL;
|
||||||
_queue *pfree_recv_queue, *pdefrag_q;
|
struct __queue *pfree_recv_queue, *pdefrag_q;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
pstapriv = &padapter->stapriv;
|
pstapriv = &padapter->stapriv;
|
||||||
|
|
||||||
|
@ -2184,7 +2165,6 @@ union recv_frame* recvframe_chk_defrag(struct adapter *padapter, union recv_fram
|
||||||
|
|
||||||
#define ENDIAN_FREE 1
|
#define ENDIAN_FREE 1
|
||||||
|
|
||||||
int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe);
|
|
||||||
int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
|
int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
|
||||||
{
|
{
|
||||||
int a_len, padding_len;
|
int a_len, padding_len;
|
||||||
|
@ -2193,9 +2173,9 @@ int amsdu_to_msdu(struct adapter *padapter, union recv_frame *prframe)
|
||||||
unsigned char *pdata;
|
unsigned char *pdata;
|
||||||
struct rx_pkt_attrib *pattrib;
|
struct rx_pkt_attrib *pattrib;
|
||||||
unsigned char *data_ptr;
|
unsigned char *data_ptr;
|
||||||
_pkt *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;
|
||||||
_queue *pfree_recv_queue = &(precvpriv->free_recv_queue);
|
struct __queue *pfree_recv_queue = &(precvpriv->free_recv_queue);
|
||||||
int ret = _SUCCESS;
|
int ret = _SUCCESS;
|
||||||
nr_subframes = 0;
|
nr_subframes = 0;
|
||||||
|
|
||||||
|
@ -2425,8 +2405,8 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
||||||
int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union recv_frame *prframe)
|
int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union recv_frame *prframe)
|
||||||
{
|
{
|
||||||
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
|
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
|
||||||
_queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
union recv_frame *pnextrframe;
|
union recv_frame *pnextrframe;
|
||||||
struct rx_pkt_attrib *pnextattrib;
|
struct rx_pkt_attrib *pnextattrib;
|
||||||
|
|
||||||
|
@ -2462,15 +2442,15 @@ int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl, union rec
|
||||||
int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctrl *preorder_ctrl, int bforced);
|
int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctrl *preorder_ctrl, int bforced);
|
||||||
int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctrl *preorder_ctrl, int bforced)
|
int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctrl *preorder_ctrl, int bforced)
|
||||||
{
|
{
|
||||||
/* _irqL irql; */
|
/* unsigned long irql; */
|
||||||
/* u8 bcancelled; */
|
/* u8 bcancelled; */
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
union recv_frame *prframe;
|
union recv_frame *prframe;
|
||||||
struct rx_pkt_attrib *pattrib;
|
struct rx_pkt_attrib *pattrib;
|
||||||
/* u8 index = 0; */
|
/* u8 index = 0; */
|
||||||
int bPktInBuf = false;
|
int bPktInBuf = false;
|
||||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||||
_queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||||
|
|
||||||
/* DbgPrint("+recv_indicatepkts_in_order\n"); */
|
/* DbgPrint("+recv_indicatepkts_in_order\n"); */
|
||||||
|
|
||||||
|
@ -2576,11 +2556,11 @@ int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reorder_ctr
|
||||||
|
|
||||||
static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *prframe)
|
static int recv_indicatepkt_reorder(struct adapter *padapter, union recv_frame *prframe)
|
||||||
{
|
{
|
||||||
_irqL irql;
|
unsigned long irql;
|
||||||
int retval = _SUCCESS;
|
int retval = _SUCCESS;
|
||||||
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
|
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
|
||||||
struct recv_reorder_ctrl *preorder_ctrl = prframe->u.hdr.preorder_ctrl;
|
struct recv_reorder_ctrl *preorder_ctrl = prframe->u.hdr.preorder_ctrl;
|
||||||
_queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||||
|
|
||||||
if(!pattrib->amsdu) {
|
if(!pattrib->amsdu) {
|
||||||
/* s1. */
|
/* s1. */
|
||||||
|
@ -2693,31 +2673,23 @@ _err_exit:
|
||||||
|
|
||||||
void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
void rtw_reordering_ctrl_timeout_handler(void *pcontext)
|
||||||
{
|
{
|
||||||
_irqL irql;
|
unsigned long irql;
|
||||||
struct recv_reorder_ctrl *preorder_ctrl = (struct recv_reorder_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;
|
||||||
_queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
struct __queue *ppending_recvframe_queue = &preorder_ctrl->pending_recvframe_queue;
|
||||||
|
|
||||||
|
|
||||||
if(padapter->bDriverStopped ||padapter->bSurpriseRemoved)
|
if(padapter->bDriverStopped ||padapter->bSurpriseRemoved)
|
||||||
{
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
/* DBG_871X("+rtw_reordering_ctrl_timeout_handler()=>\n"); */
|
|
||||||
|
|
||||||
spin_lock_bh(&ppending_recvframe_queue->lock);
|
spin_lock_bh(&ppending_recvframe_queue->lock);
|
||||||
|
|
||||||
if(recv_indicatepkts_in_order(padapter, preorder_ctrl, true)==true)
|
if(recv_indicatepkts_in_order(padapter, preorder_ctrl, true)==true)
|
||||||
{
|
|
||||||
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
_set_timer(&preorder_ctrl->reordering_ctrl_timer, REORDER_WAIT_TIME);
|
||||||
}
|
|
||||||
|
|
||||||
spin_unlock_bh(&ppending_recvframe_queue->lock);
|
spin_unlock_bh(&ppending_recvframe_queue->lock);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int process_recv_indicatepkts(struct adapter *padapter, union recv_frame *prframe);
|
|
||||||
int process_recv_indicatepkts(struct adapter *padapter, union recv_frame *prframe)
|
int process_recv_indicatepkts(struct adapter *padapter, union recv_frame *prframe)
|
||||||
{
|
{
|
||||||
int retval = _SUCCESS;
|
int retval = _SUCCESS;
|
||||||
|
@ -2780,7 +2752,7 @@ static int recv_func_prehandle(struct adapter *padapter, union recv_frame *rfram
|
||||||
int ret = _SUCCESS;
|
int ret = _SUCCESS;
|
||||||
struct rx_pkt_attrib *pattrib = &rframe->u.hdr.attrib;
|
struct rx_pkt_attrib *pattrib = &rframe->u.hdr.attrib;
|
||||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||||
_queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
||||||
|
|
||||||
|
|
||||||
/* check the frame crtl field and decache */
|
/* check the frame crtl field and decache */
|
||||||
|
@ -2802,7 +2774,7 @@ static int recv_func_posthandle(struct adapter *padapter, union recv_frame *prfr
|
||||||
union recv_frame *orig_prframe = prframe;
|
union recv_frame *orig_prframe = prframe;
|
||||||
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
|
struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
|
||||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||||
_queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
||||||
|
|
||||||
/* DATA FRAME */
|
/* DATA FRAME */
|
||||||
rtw_led_control(padapter, LED_CTL_RX);
|
rtw_led_control(padapter, LED_CTL_RX);
|
||||||
|
|
|
@ -49,7 +49,7 @@ u8 sreset_get_wifi_status(struct adapter *padapter)
|
||||||
|
|
||||||
u8 status = WIFI_STATUS_SUCCESS;
|
u8 status = WIFI_STATUS_SUCCESS;
|
||||||
u32 val32 = 0;
|
u32 val32 = 0;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
if(psrtpriv->silent_reset_inprogress == true)
|
if(psrtpriv->silent_reset_inprogress == true)
|
||||||
{
|
{
|
||||||
return status;
|
return status;
|
||||||
|
@ -257,7 +257,7 @@ void sreset_reset(struct adapter *padapter)
|
||||||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u32 start = rtw_get_current_time();
|
u32 start = rtw_get_current_time();
|
||||||
|
|
||||||
DBG_871X("%s\n", __FUNCTION__);
|
DBG_871X("%s\n", __FUNCTION__);
|
||||||
|
|
|
@ -105,7 +105,6 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
||||||
|
|
||||||
spin_lock_init(&pstapriv->sta_hash_lock);
|
spin_lock_init(&pstapriv->sta_hash_lock);
|
||||||
|
|
||||||
/* _rtw_init_queue(&pstapriv->asoc_q); */
|
|
||||||
pstapriv->asoc_sta_count = 0;
|
pstapriv->asoc_sta_count = 0;
|
||||||
_rtw_init_queue(&pstapriv->sleep_q);
|
_rtw_init_queue(&pstapriv->sleep_q);
|
||||||
_rtw_init_queue(&pstapriv->wakeup_q);
|
_rtw_init_queue(&pstapriv->wakeup_q);
|
||||||
|
@ -113,8 +112,7 @@ u32 _rtw_init_sta_priv(struct sta_priv *pstapriv)
|
||||||
psta = (struct sta_info *)(pstapriv->pstainfo_buf);
|
psta = (struct sta_info *)(pstapriv->pstainfo_buf);
|
||||||
|
|
||||||
|
|
||||||
for(i = 0; i < NUM_STA; i++)
|
for(i = 0; i < NUM_STA; i++) {
|
||||||
{
|
|
||||||
_rtw_init_stainfo(psta);
|
_rtw_init_stainfo(psta);
|
||||||
|
|
||||||
_rtw_init_listhead(&(pstapriv->sta_hash[i]));
|
_rtw_init_listhead(&(pstapriv->sta_hash[i]));
|
||||||
|
@ -184,8 +182,8 @@ void rtw_mfree_stainfo(struct sta_info *psta)
|
||||||
void rtw_mfree_all_stainfo(struct sta_priv *pstapriv );
|
void rtw_mfree_all_stainfo(struct sta_priv *pstapriv );
|
||||||
void rtw_mfree_all_stainfo(struct sta_priv *pstapriv )
|
void rtw_mfree_all_stainfo(struct sta_priv *pstapriv )
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -221,8 +219,8 @@ void rtw_mfree_sta_priv_lock(struct sta_priv *pstapriv)
|
||||||
|
|
||||||
u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct recv_reorder_ctrl *preorder_ctrl;
|
struct recv_reorder_ctrl *preorder_ctrl;
|
||||||
int index;
|
int index;
|
||||||
|
@ -263,15 +261,14 @@ u32 _rtw_free_sta_priv(struct sta_priv *pstapriv)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* 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)
|
struct sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
||||||
{
|
{
|
||||||
_irqL irqL, irqL2;
|
unsigned long irqL, irqL2;
|
||||||
uint tmp_aid;
|
uint tmp_aid;
|
||||||
s32 index;
|
s32 index;
|
||||||
_list *phash_list;
|
struct list_head *phash_list;
|
||||||
struct sta_info *psta;
|
struct sta_info *psta;
|
||||||
_queue *pfree_sta_queue;
|
struct __queue *pfree_sta_queue;
|
||||||
struct recv_reorder_ctrl *preorder_ctrl;
|
struct recv_reorder_ctrl *preorder_ctrl;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
u16 wRxSeqInitialValue = 0xffff;
|
u16 wRxSeqInitialValue = 0xffff;
|
||||||
|
@ -362,8 +359,8 @@ exit:
|
||||||
u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
_irqL irqL0;
|
unsigned long irqL0;
|
||||||
_queue *pfree_sta_queue;
|
struct __queue *pfree_sta_queue;
|
||||||
struct recv_reorder_ctrl *preorder_ctrl;
|
struct recv_reorder_ctrl *preorder_ctrl;
|
||||||
struct sta_xmit_priv *pstaxmitpriv;
|
struct sta_xmit_priv *pstaxmitpriv;
|
||||||
struct xmit_priv *pxmitpriv= &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv= &padapter->xmitpriv;
|
||||||
|
@ -386,10 +383,6 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
||||||
|
|
||||||
pstaxmitpriv = &psta->sta_xmitpriv;
|
pstaxmitpriv = &psta->sta_xmitpriv;
|
||||||
|
|
||||||
/* rtw_list_delete(&psta->sleep_list); */
|
|
||||||
|
|
||||||
/* rtw_list_delete(&psta->wakeup_list); */
|
|
||||||
|
|
||||||
spin_lock_bh(&pxmitpriv->lock);
|
spin_lock_bh(&pxmitpriv->lock);
|
||||||
|
|
||||||
rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q);
|
rtw_free_xmitframe_queue(pxmitpriv, &psta->sleep_q);
|
||||||
|
@ -441,11 +434,11 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
|
||||||
/* for A-MPDU Rx reordering buffer control, cancel reordering_ctrl_timer */
|
/* for A-MPDU Rx reordering buffer control, cancel reordering_ctrl_timer */
|
||||||
for(i=0; i < 16 ; i++)
|
for(i=0; i < 16 ; i++)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
union recv_frame *prframe;
|
union recv_frame *prframe;
|
||||||
_queue *ppending_recvframe_queue;
|
struct __queue *ppending_recvframe_queue;
|
||||||
_queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
struct __queue *pfree_recv_queue = &padapter->recvpriv.free_recv_queue;
|
||||||
|
|
||||||
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
preorder_ctrl = &psta->recvreorder_ctrl[i];
|
||||||
|
|
||||||
|
@ -521,8 +514,8 @@ exit:
|
||||||
/* free all stainfo which in sta_hash[all] */
|
/* free all stainfo which in sta_hash[all] */
|
||||||
void rtw_free_all_stainfo(struct adapter *padapter)
|
void rtw_free_all_stainfo(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
s32 index;
|
s32 index;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
|
@ -564,9 +557,9 @@ exit:
|
||||||
struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
|
||||||
{
|
{
|
||||||
|
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
|
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
|
|
||||||
|
@ -626,7 +619,6 @@ u32 rtw_init_bcmc_stainfo(struct adapter* padapter)
|
||||||
u8 bcast_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
u8 bcast_addr[ETH_ALEN] = {0xff,0xff,0xff,0xff,0xff,0xff};
|
||||||
|
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
/* _queue *pstapending = &padapter->xmitpriv.bm_pending; */
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -659,13 +651,13 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
|
||||||
{
|
{
|
||||||
u8 res = true;
|
u8 res = true;
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
struct rtw_wlan_acl_node *paclnode;
|
struct rtw_wlan_acl_node *paclnode;
|
||||||
u8 match = false;
|
u8 match = false;
|
||||||
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;
|
||||||
_queue *pacl_node_q =&pacl_list->acl_node_q;
|
struct __queue *pacl_node_q =&pacl_list->acl_node_q;
|
||||||
|
|
||||||
spin_lock_bh(&(pacl_node_q->lock));
|
spin_lock_bh(&(pacl_node_q->lock));
|
||||||
phead = get_list_head(pacl_node_q);
|
phead = get_list_head(pacl_node_q);
|
||||||
|
|
|
@ -594,7 +594,7 @@ static void set_qos(struct pkt_file *ppktfile, struct pkt_attrib *pattrib)
|
||||||
pattrib->subtype = WIFI_QOS_DATA_TYPE;
|
pattrib->subtype = WIFI_QOS_DATA_TYPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib *pattrib)
|
static s32 update_attrib(struct adapter *padapter, struct sk_buff *pkt, struct pkt_attrib *pattrib)
|
||||||
{
|
{
|
||||||
uint i;
|
uint i;
|
||||||
struct pkt_file pktfile;
|
struct pkt_file pktfile;
|
||||||
|
@ -1260,7 +1260,7 @@ This sub-routine will perform all the following:
|
||||||
6. apply sw-encrypt, if necessary.
|
6. apply sw-encrypt, if necessary.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
s32 rtw_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_frame *pxmitframe)
|
s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
|
||||||
{
|
{
|
||||||
struct pkt_file pktfile;
|
struct pkt_file pktfile;
|
||||||
|
|
||||||
|
@ -1459,7 +1459,7 @@ exit:
|
||||||
|
|
||||||
#ifdef CONFIG_IEEE80211W
|
#ifdef CONFIG_IEEE80211W
|
||||||
/* broadcast or multicast management pkt use BIP, unicast management pkt use CCMP encryption */
|
/* broadcast or multicast management pkt use BIP, unicast management pkt use CCMP encryption */
|
||||||
s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_frame *pxmitframe)
|
s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe)
|
||||||
{
|
{
|
||||||
struct pkt_file pktfile;
|
struct pkt_file pktfile;
|
||||||
s32 frg_inx, frg_len, mpdu_len, llc_sz, mem_sz;
|
s32 frg_inx, frg_len, mpdu_len, llc_sz, mem_sz;
|
||||||
|
@ -1798,8 +1798,8 @@ void rtw_count_tx_stats(struct adapter *padapter, struct xmit_frame *pxmitframe,
|
||||||
struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
|
struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
|
||||||
{
|
{
|
||||||
struct xmit_buf *pxmitbuf = NULL;
|
struct xmit_buf *pxmitbuf = NULL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue;
|
struct __queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
spin_lock_irqsave(&pfree_queue->lock, flags);
|
spin_lock_irqsave(&pfree_queue->lock, flags);
|
||||||
|
@ -1842,7 +1842,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
|
||||||
|
|
||||||
s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
||||||
{
|
{
|
||||||
_queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue;
|
struct __queue *pfree_queue = &pxmitpriv->free_xmit_extbuf_queue;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if(pxmitbuf==NULL)
|
if(pxmitbuf==NULL)
|
||||||
|
@ -1866,8 +1866,8 @@ s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
||||||
struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
|
struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
|
||||||
{
|
{
|
||||||
struct xmit_buf *pxmitbuf = NULL;
|
struct xmit_buf *pxmitbuf = NULL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
|
struct __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -1918,7 +1918,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
|
||||||
|
|
||||||
s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
|
||||||
{
|
{
|
||||||
_queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
|
struct __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
if(pxmitbuf==NULL)
|
if(pxmitbuf==NULL)
|
||||||
|
@ -1991,8 +1991,8 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct xmit_frame *pxframe = NULL;
|
struct xmit_frame *pxframe = NULL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;
|
struct __queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;
|
||||||
struct adapter *padapter = pxmitpriv->adapter;
|
struct adapter *padapter = pxmitpriv->adapter;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -2026,8 +2026,8 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
|
||||||
struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv)
|
struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv)
|
||||||
{
|
{
|
||||||
struct xmit_frame *pxframe = NULL;
|
struct xmit_frame *pxframe = NULL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *queue = &pxmitpriv->free_xframe_ext_queue;
|
struct __queue *queue = &pxmitpriv->free_xframe_ext_queue;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -2086,9 +2086,9 @@ exit:
|
||||||
|
|
||||||
s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe)
|
s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe)
|
||||||
{
|
{
|
||||||
_queue *queue;
|
struct __queue *queue;
|
||||||
struct adapter *padapter = pxmitpriv->adapter;
|
struct adapter *padapter = pxmitpriv->adapter;
|
||||||
_pkt *pndis_pkt = NULL;
|
struct sk_buff *pndis_pkt = NULL;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -2142,9 +2142,9 @@ exit:
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue)
|
void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pframequeue)
|
||||||
{
|
{
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
struct xmit_frame *pxmitframe;
|
struct xmit_frame *pxmitframe;
|
||||||
|
|
||||||
;
|
;
|
||||||
|
@ -2182,9 +2182,9 @@ s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitfram
|
||||||
return _SUCCESS;
|
return _SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit, struct tx_servq *ptxservq, _queue *pframe_queue)
|
static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit, struct tx_servq *ptxservq, struct __queue *pframe_queue)
|
||||||
{
|
{
|
||||||
_list *xmitframe_plist, *xmitframe_phead;
|
struct list_head *xmitframe_plist, *xmitframe_phead;
|
||||||
struct xmit_frame *pxmitframe=NULL;
|
struct xmit_frame *pxmitframe=NULL;
|
||||||
|
|
||||||
xmitframe_phead = get_list_head(pframe_queue);
|
xmitframe_phead = get_list_head(pframe_queue);
|
||||||
|
@ -2207,10 +2207,10 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
|
||||||
|
|
||||||
struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i, sint entry)
|
struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i, sint entry)
|
||||||
{
|
{
|
||||||
_list *sta_plist, *sta_phead;
|
struct list_head *sta_plist, *sta_phead;
|
||||||
struct hw_xmit *phwxmit;
|
struct hw_xmit *phwxmit;
|
||||||
struct tx_servq *ptxservq = NULL;
|
struct tx_servq *ptxservq = NULL;
|
||||||
_queue *pframe_queue = NULL;
|
struct __queue *pframe_queue = NULL;
|
||||||
struct xmit_frame *pxmitframe = NULL;
|
struct xmit_frame *pxmitframe = NULL;
|
||||||
struct adapter *padapter = pxmitpriv->adapter;
|
struct adapter *padapter = pxmitpriv->adapter;
|
||||||
struct registry_priv *pregpriv = &padapter->registrypriv;
|
struct registry_priv *pregpriv = &padapter->registrypriv;
|
||||||
|
@ -2661,7 +2661,7 @@ static void do_queue_select(struct adapter *padapter, struct pkt_attrib *pattrib
|
||||||
* 0 success, hardware will handle this xmit frame(packet)
|
* 0 success, hardware will handle this xmit frame(packet)
|
||||||
* <0 fail
|
* <0 fail
|
||||||
*/
|
*/
|
||||||
s32 rtw_xmit(struct adapter *padapter, _pkt **ppkt)
|
s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
|
||||||
{
|
{
|
||||||
static u32 start = 0;
|
static u32 start = 0;
|
||||||
static u32 drop_cnt = 0;
|
static u32 drop_cnt = 0;
|
||||||
|
@ -2895,10 +2895,10 @@ sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fr
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struct sta_info *psta, _queue *pframequeue)
|
static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struct sta_info *psta, struct __queue *pframequeue)
|
||||||
{
|
{
|
||||||
sint ret;
|
sint ret;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
u8 ac_index;
|
u8 ac_index;
|
||||||
struct tx_servq *ptxservq;
|
struct tx_servq *ptxservq;
|
||||||
struct pkt_attrib *pattrib;
|
struct pkt_attrib *pattrib;
|
||||||
|
@ -2981,7 +2981,7 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
|
||||||
{
|
{
|
||||||
u8 update_mask=0, wmmps_ac=0;
|
u8 update_mask=0, wmmps_ac=0;
|
||||||
struct sta_info *psta_bmc;
|
struct sta_info *psta_bmc;
|
||||||
_list *xmitframe_plist, *xmitframe_phead;
|
struct list_head *xmitframe_plist, *xmitframe_phead;
|
||||||
struct xmit_frame *pxmitframe=NULL;
|
struct xmit_frame *pxmitframe=NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
|
@ -3147,7 +3147,7 @@ _exit:
|
||||||
void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *psta)
|
void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *psta)
|
||||||
{
|
{
|
||||||
u8 wmmps_ac=0;
|
u8 wmmps_ac=0;
|
||||||
_list *xmitframe_plist, *xmitframe_phead;
|
struct list_head *xmitframe_plist, *xmitframe_phead;
|
||||||
struct xmit_frame *pxmitframe=NULL;
|
struct xmit_frame *pxmitframe=NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
|
|
|
@ -543,8 +543,8 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *padapter, struct xmit_priv *pxm
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct tx_servq *ptxservq = NULL;
|
struct tx_servq *ptxservq = NULL;
|
||||||
|
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *xmitframe_plist = NULL, *xmitframe_phead = NULL;
|
struct list_head *xmitframe_plist = NULL, *xmitframe_phead = NULL;
|
||||||
|
|
||||||
u32 pbuf; /* next pkt address */
|
u32 pbuf; /* next pkt address */
|
||||||
u32 pbuf_tail; /* last pkt tail */
|
u32 pbuf_tail; /* last pkt tail */
|
||||||
|
@ -828,7 +828,7 @@ static s32 xmitframe_direct(struct adapter *padapter, struct xmit_frame *pxmitfr
|
||||||
*/
|
*/
|
||||||
static s32 pre_xmitframe(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
static s32 pre_xmitframe(struct adapter *padapter, struct xmit_frame *pxmitframe)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
s32 res;
|
s32 res;
|
||||||
struct xmit_buf *pxmitbuf = NULL;
|
struct xmit_buf *pxmitbuf = NULL;
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
|
|
|
@ -414,7 +414,7 @@ static s32 pre_recv_entry(union recv_frame *precvframe, struct recv_stat *prxsta
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int recvbuf2recvframe(struct adapter *padapter, _pkt *pskb)
|
static int recvbuf2recvframe(struct adapter *padapter, struct sk_buff *pskb)
|
||||||
{
|
{
|
||||||
u8 *pbuf;
|
u8 *pbuf;
|
||||||
u8 shift_sz = 0;
|
u8 shift_sz = 0;
|
||||||
|
@ -423,13 +423,12 @@ static int recvbuf2recvframe(struct adapter *padapter, _pkt *pskb)
|
||||||
s32 transfer_len;
|
s32 transfer_len;
|
||||||
struct recv_stat *prxstat;
|
struct recv_stat *prxstat;
|
||||||
struct phy_stat *pphy_status = NULL;
|
struct phy_stat *pphy_status = NULL;
|
||||||
_pkt *pkt_copy = NULL;
|
struct sk_buff *pkt_copy = NULL;
|
||||||
union recv_frame *precvframe = NULL;
|
union recv_frame *precvframe = NULL;
|
||||||
struct rx_pkt_attrib *pattrib = NULL;
|
struct rx_pkt_attrib *pattrib = NULL;
|
||||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(padapter);
|
||||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||||
_queue *pfree_recv_queue = &precvpriv->free_recv_queue;
|
struct __queue *pfree_recv_queue = &precvpriv->free_recv_queue;
|
||||||
|
|
||||||
|
|
||||||
transfer_len = (s32)pskb->len;
|
transfer_len = (s32)pskb->len;
|
||||||
pbuf = pskb->data;
|
pbuf = pskb->data;
|
||||||
|
@ -615,7 +614,7 @@ _exit_recvbuf2recvframe:
|
||||||
|
|
||||||
void rtl8188eu_recv_tasklet(void *priv)
|
void rtl8188eu_recv_tasklet(void *priv)
|
||||||
{
|
{
|
||||||
_pkt *pskb;
|
struct sk_buff *pskb;
|
||||||
struct adapter *padapter = (struct adapter*)priv;
|
struct adapter *padapter = (struct adapter*)priv;
|
||||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||||
|
|
||||||
|
@ -642,7 +641,7 @@ void rtl8188eu_recv_tasklet(void *priv)
|
||||||
|
|
||||||
static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
uint isevt, *pbuf;
|
uint isevt, *pbuf;
|
||||||
struct recv_buf *precvbuf = (struct recv_buf *)purb->context;
|
struct recv_buf *precvbuf = (struct recv_buf *)purb->context;
|
||||||
struct adapter *padapter =(struct adapter *)precvbuf->adapter;
|
struct adapter *padapter =(struct adapter *)precvbuf->adapter;
|
||||||
|
@ -748,13 +747,13 @@ exit:
|
||||||
|
|
||||||
static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
|
static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
int err;
|
int err;
|
||||||
unsigned int pipe;
|
unsigned int pipe;
|
||||||
SIZE_PTR tmpaddr=0;
|
SIZE_PTR tmpaddr=0;
|
||||||
SIZE_PTR alignment=0;
|
SIZE_PTR alignment=0;
|
||||||
u32 ret = _SUCCESS;
|
u32 ret = _SUCCESS;
|
||||||
PURB purb = NULL;
|
struct urb *purb = NULL;
|
||||||
struct recv_buf *precvbuf = (struct recv_buf *)rmem;
|
struct recv_buf *precvbuf = (struct recv_buf *)rmem;
|
||||||
struct adapter *adapter = pintfhdl->padapter;
|
struct adapter *adapter = pintfhdl->padapter;
|
||||||
struct dvobj_priv *pdvobj = adapter_to_dvobj(adapter);
|
struct dvobj_priv *pdvobj = adapter_to_dvobj(adapter);
|
||||||
|
|
|
@ -29,7 +29,7 @@ extern sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv);
|
||||||
extern sint _rtw_init_evt_priv(struct evt_priv *pevtpriv);
|
extern sint _rtw_init_evt_priv(struct evt_priv *pevtpriv);
|
||||||
extern void _rtw_free_evt_priv (struct evt_priv *pevtpriv);
|
extern void _rtw_free_evt_priv (struct evt_priv *pevtpriv);
|
||||||
extern void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv);
|
extern void _rtw_free_cmd_priv (struct cmd_priv *pcmdpriv);
|
||||||
extern sint _rtw_enqueue_cmd(_queue *queue, struct cmd_obj *obj);
|
extern sint _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj);
|
||||||
extern struct cmd_obj *_rtw_dequeue_cmd(_queue *queue);
|
extern struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -242,7 +242,7 @@ struct dvobj_priv {
|
||||||
|
|
||||||
int RegUsbSS;
|
int RegUsbSS;
|
||||||
|
|
||||||
_sema usb_suspend_sema;
|
struct semaphore usb_suspend_sema;
|
||||||
|
|
||||||
_mutex usb_vendor_req_mutex;
|
_mutex usb_vendor_req_mutex;
|
||||||
|
|
||||||
|
@ -296,8 +296,8 @@ struct proxim {
|
||||||
#ifdef CONFIG_MAC_LOOPBACK_DRIVER
|
#ifdef CONFIG_MAC_LOOPBACK_DRIVER
|
||||||
typedef struct loopbackdata
|
typedef struct loopbackdata
|
||||||
{
|
{
|
||||||
_sema sema;
|
struct semaphore sema;
|
||||||
_thread_hdl_ lbkthread;
|
void * lbkthread;
|
||||||
u8 bstop;
|
u8 bstop;
|
||||||
u32 cnt;
|
u32 cnt;
|
||||||
u16 size;
|
u16 size;
|
||||||
|
@ -329,7 +329,7 @@ struct adapter {
|
||||||
struct recv_priv recvpriv;
|
struct recv_priv recvpriv;
|
||||||
struct sta_priv stapriv;
|
struct sta_priv stapriv;
|
||||||
struct security_priv securitypriv;
|
struct security_priv securitypriv;
|
||||||
_lock security_key_mutex; // add for CONFIG_IEEE80211W, none 11w also can use
|
spinlock_t security_key_mutex; // add for CONFIG_IEEE80211W, none 11w also can use
|
||||||
struct registry_priv registrypriv;
|
struct registry_priv registrypriv;
|
||||||
struct eeprom_priv eeprompriv;
|
struct eeprom_priv eeprompriv;
|
||||||
struct led_priv ledpriv;
|
struct led_priv ledpriv;
|
||||||
|
@ -373,19 +373,19 @@ struct adapter {
|
||||||
u8 init_adpt_in_progress;
|
u8 init_adpt_in_progress;
|
||||||
u8 bHaltInProgress;
|
u8 bHaltInProgress;
|
||||||
|
|
||||||
_thread_hdl_ cmdThread;
|
void * cmdThread;
|
||||||
_thread_hdl_ evtThread;
|
void * evtThread;
|
||||||
_thread_hdl_ xmitThread;
|
void * xmitThread;
|
||||||
_thread_hdl_ recvThread;
|
void * recvThread;
|
||||||
|
|
||||||
void (*intf_start)(struct adapter * adapter);
|
void (*intf_start)(struct adapter * adapter);
|
||||||
void (*intf_stop)(struct adapter * adapter);
|
void (*intf_stop)(struct adapter * adapter);
|
||||||
|
|
||||||
_nic_hdl pnetdev;
|
struct net_device * pnetdev;
|
||||||
|
|
||||||
// used by rtw_rereg_nd_name related function
|
// used by rtw_rereg_nd_name related function
|
||||||
struct rereg_nd_name_data {
|
struct rereg_nd_name_data {
|
||||||
_nic_hdl old_pnetdev;
|
struct net_device * old_pnetdev;
|
||||||
char old_ifname[IFNAMSIZ];
|
char old_ifname[IFNAMSIZ];
|
||||||
u8 old_ips_mode;
|
u8 old_ips_mode;
|
||||||
u8 old_bRegUseLed;
|
u8 old_bRegUseLed;
|
||||||
|
@ -426,7 +426,7 @@ struct adapter {
|
||||||
u8 iface_id;
|
u8 iface_id;
|
||||||
|
|
||||||
#ifdef CONFIG_BR_EXT
|
#ifdef CONFIG_BR_EXT
|
||||||
_lock br_ext_lock;
|
spinlock_t br_ext_lock;
|
||||||
//unsigned int macclone_completed;
|
//unsigned int macclone_completed;
|
||||||
struct nat25_network_db_entry *nethash[NAT25_HASH_SIZE];
|
struct nat25_network_db_entry *nethash[NAT25_HASH_SIZE];
|
||||||
int pppoe_connection_in_progress;
|
int pppoe_connection_in_progress;
|
||||||
|
|
|
@ -222,7 +222,7 @@ struct hal_ops {
|
||||||
void (*write_rfreg)(struct adapter *padapter, u32 eRFPath, u32 RegAddr, u32 BitMask, u32 Data);
|
void (*write_rfreg)(struct adapter *padapter, u32 eRFPath, u32 RegAddr, u32 BitMask, u32 Data);
|
||||||
|
|
||||||
#ifdef CONFIG_HOSTAPD_MLME
|
#ifdef CONFIG_HOSTAPD_MLME
|
||||||
s32 (*hostap_mgnt_xmit_entry)(struct adapter *padapter, _pkt *pkt);
|
s32 (*hostap_mgnt_xmit_entry)(struct adapter *padapter, struct sk_buff *pkt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void (*EfusePowerSwitch)(struct adapter *padapter, u8 bWrite, u8 PwrState);
|
void (*EfusePowerSwitch)(struct adapter *padapter, u8 bWrite, u8 PwrState);
|
||||||
|
@ -399,7 +399,7 @@ u8 rtw_hal_antdiv_before_linked(struct adapter *padapter);
|
||||||
void rtw_hal_antdiv_rssi_compared(struct adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src);
|
void rtw_hal_antdiv_rssi_compared(struct adapter *padapter, struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src);
|
||||||
|
|
||||||
#ifdef CONFIG_HOSTAPD_MLME
|
#ifdef CONFIG_HOSTAPD_MLME
|
||||||
s32 rtw_hal_hostap_mgnt_xmit_entry(struct adapter *padapter, _pkt *pkt);
|
s32 rtw_hal_hostap_mgnt_xmit_entry(struct adapter *padapter, struct sk_buff *pkt);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void rtw_hal_sreset_init(struct adapter *padapter);
|
void rtw_hal_sreset_init(struct adapter *padapter);
|
||||||
|
|
|
@ -300,7 +300,7 @@ struct ieee_ibss_seq {
|
||||||
u16 seq_num;
|
u16 seq_num;
|
||||||
u16 frag_num;
|
u16 frag_num;
|
||||||
unsigned long packet_time;
|
unsigned long packet_time;
|
||||||
_list list;
|
struct list_head list;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct rtw_ieee80211_hdr {
|
struct rtw_ieee80211_hdr {
|
||||||
|
|
|
@ -79,7 +79,7 @@ struct rtw_wdev_priv
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
|
|
||||||
struct cfg80211_scan_request *scan_request;
|
struct cfg80211_scan_request *scan_request;
|
||||||
_lock scan_req_lock;
|
spinlock_t scan_req_lock;
|
||||||
|
|
||||||
struct net_device *pmon_ndev;//for monitor interface
|
struct net_device *pmon_ndev;//for monitor interface
|
||||||
char ifname_mon[IFNAMSIZ + 1]; //interface name for monitor interface
|
char ifname_mon[IFNAMSIZ + 1]; //interface name for monitor interface
|
||||||
|
|
|
@ -53,11 +53,11 @@ The protection mechanism is through the pending queue.
|
||||||
|
|
||||||
// when in USB, IO is through interrupt in/out endpoints
|
// when in USB, IO is through interrupt in/out endpoints
|
||||||
struct usb_device *udev;
|
struct usb_device *udev;
|
||||||
PURB piorw_urb;
|
struct urb *piorw_urb;
|
||||||
u8 io_irp_cnt;
|
u8 io_irp_cnt;
|
||||||
u8 bio_irp_pending;
|
u8 bio_irp_pending;
|
||||||
_sema io_retevt;
|
struct semaphore io_retevt;
|
||||||
_timer io_timer;
|
struct timer_list io_timer;
|
||||||
u8 bio_irp_timeout;
|
u8 bio_irp_timeout;
|
||||||
u8 bio_timer_cancel;
|
u8 bio_timer_cancel;
|
||||||
};
|
};
|
||||||
|
@ -102,7 +102,7 @@ int rtw_ips_pwr_up(struct adapter *padapter);
|
||||||
void rtw_ips_pwr_down(struct adapter *padapter);
|
void rtw_ips_pwr_down(struct adapter *padapter);
|
||||||
|
|
||||||
int rtw_drv_register_netdev(struct adapter *padapter);
|
int rtw_drv_register_netdev(struct adapter *padapter);
|
||||||
void rtw_ndev_destructor(_nic_hdl ndev);
|
void rtw_ndev_destructor(struct net_device * ndev);
|
||||||
|
|
||||||
int rtw_suspend_common(struct adapter *padapter);
|
int rtw_suspend_common(struct adapter *padapter);
|
||||||
int rtw_resume_common(struct adapter *padapter);
|
int rtw_resume_common(struct adapter *padapter);
|
||||||
|
|
|
@ -96,47 +96,24 @@ struct dvobj_priv;
|
||||||
void rtw_unregister_netdevs(struct dvobj_priv *dvobj);
|
void rtw_unregister_netdevs(struct dvobj_priv *dvobj);
|
||||||
int pm_netdev_open(struct net_device *pnetdev,u8 bnormal);
|
int pm_netdev_open(struct net_device *pnetdev,u8 bnormal);
|
||||||
|
|
||||||
typedef struct urb * PURB;
|
|
||||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,22))
|
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,22))
|
||||||
#ifdef CONFIG_USB_SUSPEND
|
#ifdef CONFIG_USB_SUSPEND
|
||||||
#define CONFIG_AUTOSUSPEND 1
|
#define CONFIG_AUTOSUSPEND 1
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct semaphore _sema;
|
|
||||||
typedef spinlock_t _lock;
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||||
typedef struct mutex _mutex;
|
typedef struct mutex _mutex;
|
||||||
#else
|
#else
|
||||||
typedef struct semaphore _mutex;
|
typedef struct semaphore _mutex;
|
||||||
#endif
|
#endif
|
||||||
typedef struct timer_list _timer;
|
|
||||||
|
|
||||||
struct __queue {
|
struct __queue {
|
||||||
struct list_head queue;
|
struct list_head queue;
|
||||||
_lock lock;
|
spinlock_t lock;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct sk_buff _pkt;
|
|
||||||
typedef unsigned char _buffer;
|
|
||||||
|
|
||||||
typedef struct __queue _queue;
|
|
||||||
typedef struct list_head _list;
|
|
||||||
typedef int _OS_STATUS;
|
|
||||||
//typedef u32 _irqL;
|
|
||||||
typedef unsigned long _irqL;
|
|
||||||
typedef struct net_device * _nic_hdl;
|
|
||||||
|
|
||||||
typedef void* _thread_hdl_;
|
|
||||||
typedef int thread_return;
|
|
||||||
typedef void* thread_context;
|
|
||||||
|
|
||||||
#define thread_exit() complete_and_exit(NULL, 0)
|
#define thread_exit() complete_and_exit(NULL, 0)
|
||||||
|
|
||||||
typedef void timer_hdl_return;
|
|
||||||
typedef void* timer_hdl_context;
|
|
||||||
typedef struct work_struct _workitem;
|
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
|
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
|
||||||
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
|
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
|
||||||
#endif
|
#endif
|
||||||
|
@ -164,12 +141,12 @@ static inline unsigned char *skb_end_pointer(const struct sk_buff *skb)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__inline static _list *get_next(_list *list)
|
__inline static struct list_head *get_next(struct list_head *list)
|
||||||
{
|
{
|
||||||
return list->next;
|
return list->next;
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static _list *get_list_head(_queue *queue)
|
__inline static struct list_head *get_list_head(struct __queue *queue)
|
||||||
{
|
{
|
||||||
return (&(queue->queue));
|
return (&(queue->queue));
|
||||||
}
|
}
|
||||||
|
@ -179,31 +156,30 @@ __inline static _list *get_list_head(_queue *queue)
|
||||||
((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member)))
|
((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member)))
|
||||||
|
|
||||||
|
|
||||||
__inline static void _enter_critical(_lock *plock, _irqL *pirqL)
|
__inline static void _enter_critical(spinlock_t *plock, unsigned long *pirqL)
|
||||||
{
|
{
|
||||||
spin_lock_irqsave(plock, *pirqL);
|
spin_lock_irqsave(plock, *pirqL);
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void _exit_critical(_lock *plock, _irqL *pirqL)
|
__inline static void _exit_critical(spinlock_t *plock, unsigned long *pirqL)
|
||||||
{
|
{
|
||||||
spin_unlock_irqrestore(plock, *pirqL);
|
spin_unlock_irqrestore(plock, *pirqL);
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void _enter_critical_ex(_lock *plock, _irqL *pirqL)
|
__inline static void _enter_critical_ex(spinlock_t *plock, unsigned long *pirqL)
|
||||||
{
|
{
|
||||||
spin_lock_irqsave(plock, *pirqL);
|
spin_lock_irqsave(plock, *pirqL);
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void _exit_critical_ex(_lock *plock, _irqL *pirqL)
|
__inline static void _exit_critical_ex(spinlock_t *plock, unsigned long *pirqL)
|
||||||
{
|
{
|
||||||
spin_unlock_irqrestore(plock, *pirqL);
|
spin_unlock_irqrestore(plock, *pirqL);
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static int _enter_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
__inline static int _enter_critical_mutex(_mutex *pmutex, unsigned long *pirqL)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||||
//mutex_lock(pmutex);
|
|
||||||
ret = mutex_lock_interruptible(pmutex);
|
ret = mutex_lock_interruptible(pmutex);
|
||||||
#else
|
#else
|
||||||
ret = down_interruptible(pmutex);
|
ret = down_interruptible(pmutex);
|
||||||
|
@ -212,7 +188,7 @@ __inline static int _enter_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
__inline static void _exit_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
__inline static void _exit_critical_mutex(_mutex *pmutex, unsigned long *pirqL)
|
||||||
{
|
{
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
|
||||||
mutex_unlock(pmutex);
|
mutex_unlock(pmutex);
|
||||||
|
@ -221,25 +197,24 @@ __inline static void _exit_critical_mutex(_mutex *pmutex, _irqL *pirqL)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void rtw_list_delete(_list *plist)
|
__inline static void rtw_list_delete(struct list_head *plist)
|
||||||
{
|
{
|
||||||
list_del_init(plist);
|
list_del_init(plist);
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void _init_timer(_timer *ptimer,_nic_hdl nic_hdl,void *pfunc,void* cntx)
|
__inline static void _init_timer(struct timer_list *ptimer,struct net_device * nic_hdl,void *pfunc,void* cntx)
|
||||||
{
|
{
|
||||||
//setup_timer(ptimer, pfunc,(u32)cntx);
|
|
||||||
ptimer->function = pfunc;
|
ptimer->function = pfunc;
|
||||||
ptimer->data = (unsigned long)cntx;
|
ptimer->data = (unsigned long)cntx;
|
||||||
init_timer(ptimer);
|
init_timer(ptimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void _set_timer(_timer *ptimer,u32 delay_time)
|
__inline static void _set_timer(struct timer_list *ptimer,u32 delay_time)
|
||||||
{
|
{
|
||||||
mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
|
mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
|
__inline static void _cancel_timer(struct timer_list *ptimer,u8 *bcancelled)
|
||||||
{
|
{
|
||||||
del_timer_sync(ptimer);
|
del_timer_sync(ptimer);
|
||||||
*bcancelled= true;//true ==1; false==0
|
*bcancelled= true;//true ==1; false==0
|
||||||
|
@ -251,7 +226,7 @@ __inline static void _cancel_timer(_timer *ptimer,u8 *bcancelled)
|
||||||
#define RTW_DECLARE_TIMER_HDL(name) void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS)
|
#define RTW_DECLARE_TIMER_HDL(name) void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS)
|
||||||
|
|
||||||
|
|
||||||
__inline static void _init_workitem(_workitem *pwork, void *pfunc, void * cntx)
|
__inline static void _init_workitem(struct work_struct *pwork, void *pfunc, void * cntx)
|
||||||
{
|
{
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20))
|
||||||
INIT_WORK(pwork, pfunc);
|
INIT_WORK(pwork, pfunc);
|
||||||
|
@ -260,12 +235,12 @@ __inline static void _init_workitem(_workitem *pwork, void *pfunc, void * cntx)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void _set_workitem(_workitem *pwork)
|
__inline static void _set_workitem(struct work_struct *pwork)
|
||||||
{
|
{
|
||||||
schedule_work(pwork);
|
schedule_work(pwork);
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void _cancel_workitem_sync(_workitem *pwork)
|
__inline static void _cancel_workitem_sync(struct work_struct *pwork)
|
||||||
{
|
{
|
||||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,22))
|
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,22))
|
||||||
cancel_work_sync(pwork);
|
cancel_work_sync(pwork);
|
||||||
|
@ -398,11 +373,11 @@ enum mstat_f {
|
||||||
#define mstat_tf_idx(flags) ((flags)&0xff)
|
#define mstat_tf_idx(flags) ((flags)&0xff)
|
||||||
#define mstat_ff_idx(flags) (((flags)&0xff00) >> 8)
|
#define mstat_ff_idx(flags) (((flags)&0xff00) >> 8)
|
||||||
|
|
||||||
typedef enum mstat_status{
|
enum mstat_status {
|
||||||
MSTAT_ALLOC_SUCCESS = 0,
|
MSTAT_ALLOC_SUCCESS = 0,
|
||||||
MSTAT_ALLOC_FAIL,
|
MSTAT_ALLOC_FAIL,
|
||||||
MSTAT_FREE
|
MSTAT_FREE
|
||||||
} MSTAT_STATUS;
|
};
|
||||||
|
|
||||||
#ifdef DBG_MEM_ALLOC
|
#ifdef DBG_MEM_ALLOC
|
||||||
void rtw_mstat_update(const enum mstat_f flags, const MSTAT_STATUS status, u32 sz);
|
void rtw_mstat_update(const enum mstat_f flags, const MSTAT_STATUS status, u32 sz);
|
||||||
|
@ -419,7 +394,7 @@ struct sk_buff * dbg_rtw_skb_alloc(unsigned int size, const enum mstat_f flags,
|
||||||
void dbg_rtw_skb_free(struct sk_buff *skb, const enum mstat_f flags, const char *func, const int line);
|
void dbg_rtw_skb_free(struct sk_buff *skb, const enum mstat_f flags, const char *func, const int line);
|
||||||
struct sk_buff *dbg_rtw_skb_copy(const struct sk_buff *skb, const enum mstat_f flags, const char *func, const int line);
|
struct sk_buff *dbg_rtw_skb_copy(const struct sk_buff *skb, const enum mstat_f flags, const char *func, const int line);
|
||||||
struct sk_buff *dbg_rtw_skb_clone(struct sk_buff *skb, const enum mstat_f flags, const char *func, const int line);
|
struct sk_buff *dbg_rtw_skb_clone(struct sk_buff *skb, const enum mstat_f flags, const char *func, const int line);
|
||||||
int dbg_rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb, const enum mstat_f flags, const char *func, int line);
|
int dbg_rtw_netif_rx(struct net_device * ndev, struct sk_buff *skb, const enum mstat_f flags, const char *func, int line);
|
||||||
void dbg_rtw_skb_queue_purge(struct sk_buff_head *list, enum mstat_f flags, const char *func, int line);
|
void dbg_rtw_skb_queue_purge(struct sk_buff_head *list, enum mstat_f flags, const char *func, int line);
|
||||||
|
|
||||||
void *dbg_rtw_usb_buffer_alloc(struct usb_device *dev, size_t size, dma_addr_t *dma, const enum mstat_f flags, const char *func, const int line);
|
void *dbg_rtw_usb_buffer_alloc(struct usb_device *dev, size_t size, dma_addr_t *dma, const enum mstat_f flags, const char *func, const int line);
|
||||||
|
@ -476,7 +451,7 @@ struct sk_buff *_rtw_skb_alloc(u32 sz);
|
||||||
void _rtw_skb_free(struct sk_buff *skb);
|
void _rtw_skb_free(struct sk_buff *skb);
|
||||||
struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb);
|
struct sk_buff *_rtw_skb_copy(const struct sk_buff *skb);
|
||||||
struct sk_buff *_rtw_skb_clone(struct sk_buff *skb);
|
struct sk_buff *_rtw_skb_clone(struct sk_buff *skb);
|
||||||
int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb);
|
int _rtw_netif_rx(struct net_device * ndev, struct sk_buff *skb);
|
||||||
void _rtw_skb_queue_purge(struct sk_buff_head *list);
|
void _rtw_skb_queue_purge(struct sk_buff_head *list);
|
||||||
|
|
||||||
void *_rtw_usb_buffer_alloc(struct usb_device *dev, size_t size, dma_addr_t *dma);
|
void *_rtw_usb_buffer_alloc(struct usb_device *dev, size_t size, dma_addr_t *dma);
|
||||||
|
@ -520,23 +495,23 @@ void _rtw_usb_buffer_free(struct usb_device *dev, size_t size, void *addr, dma_a
|
||||||
#define rtw_usb_buffer_free_f(dev, size, addr, dma, mstat_f) _rtw_usb_buffer_free((dev), (size), (addr), (dma))
|
#define rtw_usb_buffer_free_f(dev, size, addr, dma, mstat_f) _rtw_usb_buffer_free((dev), (size), (addr), (dma))
|
||||||
#endif /* DBG_MEM_ALLOC */
|
#endif /* DBG_MEM_ALLOC */
|
||||||
|
|
||||||
static inline void _rtw_spinlock(_lock *plock)
|
static inline void _rtw_spinlock(spinlock_t *plock)
|
||||||
{
|
{
|
||||||
spin_lock(plock);
|
spin_lock(plock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void _rtw_spinunlock(_lock *plock)
|
static inline void _rtw_spinunlock(spinlock_t *plock)
|
||||||
{
|
{
|
||||||
spin_unlock(plock);
|
spin_unlock(plock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void _rtw_spinlock_ex(_lock *plock)
|
static inline void _rtw_spinlock_ex(spinlock_t *plock)
|
||||||
{
|
{
|
||||||
spin_lock(plock);
|
spin_lock(plock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void _rtw_spinunlock_ex(_lock *plock)
|
static inline void _rtw_spinunlock_ex(spinlock_t *plock)
|
||||||
{
|
{
|
||||||
spin_unlock(plock);
|
spin_unlock(plock);
|
||||||
}
|
}
|
||||||
|
@ -546,22 +521,22 @@ void rtw_mfree2d(void *pbuf, int h, int w, int size);
|
||||||
|
|
||||||
int _rtw_memcmp(void *dst, void *src, u32 sz);
|
int _rtw_memcmp(void *dst, void *src, u32 sz);
|
||||||
|
|
||||||
void _rtw_init_listhead(_list *list);
|
void _rtw_init_listhead(struct list_head *list);
|
||||||
u32 rtw_is_list_empty(_list *phead);
|
u32 rtw_is_list_empty(struct list_head *phead);
|
||||||
void rtw_list_insert_head(_list *plist, _list *phead);
|
void rtw_list_insert_head(struct list_head *plist, struct list_head *phead);
|
||||||
void rtw_list_insert_tail(_list *plist, _list *phead);
|
void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead);
|
||||||
void rtw_list_delete(_list *plist);
|
void rtw_list_delete(struct list_head *plist);
|
||||||
|
|
||||||
void _rtw_init_sema(_sema *sema, int init_val);
|
void _rtw_init_sema(struct semaphore *sema, int init_val);
|
||||||
void _rtw_free_sema(_sema *sema);
|
void _rtw_free_sema(struct semaphore *sema);
|
||||||
void _rtw_up_sema(_sema *sema);
|
void _rtw_up_sema(struct semaphore *sema);
|
||||||
u32 _rtw_down_sema(_sema *sema);
|
u32 _rtw_down_sema(struct semaphore *sema);
|
||||||
void _rtw_mutex_init(_mutex *pmutex);
|
void _rtw_mutex_init(_mutex *pmutex);
|
||||||
void _rtw_mutex_free(_mutex *pmutex);
|
void _rtw_mutex_free(_mutex *pmutex);
|
||||||
|
|
||||||
void _rtw_init_queue(_queue *pqueue);
|
void _rtw_init_queue(struct __queue *pqueue);
|
||||||
u32 _rtw_queue_empty(_queue *pqueue);
|
u32 _rtw_queue_empty(struct __queue *pqueue);
|
||||||
u32 rtw_end_of_queue_search(_list *queue, _list *pelement);
|
u32 rtw_end_of_queue_search(struct list_head *queue, struct list_head *pelement);
|
||||||
|
|
||||||
u32 rtw_get_current_time(void);
|
u32 rtw_get_current_time(void);
|
||||||
u32 rtw_systime_to_ms(u32 systime);
|
u32 rtw_systime_to_ms(u32 systime);
|
||||||
|
@ -589,7 +564,7 @@ void rtw_udelay_os(int us);
|
||||||
void rtw_yield_os(void);
|
void rtw_yield_os(void);
|
||||||
|
|
||||||
|
|
||||||
__inline static unsigned char _cancel_timer_ex(_timer *ptimer)
|
__inline static unsigned char _cancel_timer_ex(struct timer_list *ptimer)
|
||||||
{
|
{
|
||||||
return del_timer_sync(ptimer);
|
return del_timer_sync(ptimer);
|
||||||
}
|
}
|
||||||
|
@ -610,11 +585,6 @@ __inline static void flush_signals_thread(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static _OS_STATUS res_to_status(sint res)
|
|
||||||
{
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
__inline static void rtw_dump_stack(void)
|
__inline static void rtw_dump_stack(void)
|
||||||
{
|
{
|
||||||
dump_stack();
|
dump_stack();
|
||||||
|
|
|
@ -34,7 +34,7 @@ void _rtw_free_recv_priv (struct recv_priv *precvpriv);
|
||||||
|
|
||||||
s32 rtw_recv_entry(union recv_frame *precv_frame);
|
s32 rtw_recv_entry(union recv_frame *precv_frame);
|
||||||
int rtw_recv_indicatepkt(struct adapter *adapter, union recv_frame *precv_frame);
|
int rtw_recv_indicatepkt(struct adapter *adapter, union recv_frame *precv_frame);
|
||||||
void rtw_recv_returnpacket(_nic_hdl cnxt, _pkt *preturnedpkt);
|
void rtw_recv_returnpacket(struct net_device * cnxt, struct sk_buff *preturnedpkt);
|
||||||
|
|
||||||
void rtw_hostapd_mlme_rx(struct adapter *padapter, union recv_frame *precv_frame);
|
void rtw_hostapd_mlme_rx(struct adapter *padapter, union recv_frame *precv_frame);
|
||||||
void rtw_handle_tkip_mic_err(struct adapter *padapter,u8 bgroup);
|
void rtw_handle_tkip_mic_err(struct adapter *padapter,u8 bgroup);
|
||||||
|
|
|
@ -396,7 +396,6 @@ typedef struct hal_data_8188e
|
||||||
|
|
||||||
struct dm_priv dmpriv;
|
struct dm_priv dmpriv;
|
||||||
DM_ODM_T odmpriv;
|
DM_ODM_T odmpriv;
|
||||||
//_lock odm_stainfo_lock;
|
|
||||||
struct sreset_priv srestpriv;
|
struct sreset_priv srestpriv;
|
||||||
|
|
||||||
#ifdef CONFIG_BT_COEXIST
|
#ifdef CONFIG_BT_COEXIST
|
||||||
|
|
|
@ -47,15 +47,13 @@
|
||||||
u32 cmdsz;
|
u32 cmdsz;
|
||||||
u8 *rsp;
|
u8 *rsp;
|
||||||
u32 rspsz;
|
u32 rspsz;
|
||||||
//_sema cmd_sem;
|
struct list_head list;
|
||||||
_list list;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cmd_priv {
|
struct cmd_priv {
|
||||||
_sema cmd_queue_sema;
|
struct semaphore cmd_queue_sema;
|
||||||
//_sema cmd_done_sema;
|
struct semaphore terminate_cmdthread_sema;
|
||||||
_sema terminate_cmdthread_sema;
|
struct __queue cmd_queue;
|
||||||
_queue cmd_queue;
|
|
||||||
u8 cmd_seq;
|
u8 cmd_seq;
|
||||||
u8 *cmd_buf; //shall be non-paged, and 4 bytes aligned
|
u8 *cmd_buf; //shall be non-paged, and 4 bytes aligned
|
||||||
u8 *cmd_allocated_buf;
|
u8 *cmd_allocated_buf;
|
||||||
|
@ -72,14 +70,14 @@
|
||||||
struct evt_priv {
|
struct evt_priv {
|
||||||
#define CONFIG_C2H_WK
|
#define CONFIG_C2H_WK
|
||||||
#ifdef CONFIG_C2H_WK
|
#ifdef CONFIG_C2H_WK
|
||||||
_workitem c2h_wk;
|
struct work_struct c2h_wk;
|
||||||
bool c2h_wk_alive;
|
bool c2h_wk_alive;
|
||||||
struct rtw_cbuf *c2h_queue;
|
struct rtw_cbuf *c2h_queue;
|
||||||
#define C2H_QUEUE_MAX_LEN 10
|
#define C2H_QUEUE_MAX_LEN 10
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_H2CLBK
|
#ifdef CONFIG_H2CLBK
|
||||||
_sema lbkevt_done;
|
struct semaphore lbkevt_done;
|
||||||
u8 lbkevt_limit;
|
u8 lbkevt_limit;
|
||||||
u8 lbkevt_num;
|
u8 lbkevt_num;
|
||||||
u8 *cmdevt_parm;
|
u8 *cmdevt_parm;
|
||||||
|
@ -114,7 +112,7 @@ struct cmd_obj *rtw_dequeue_cmd(struct cmd_priv *pcmdpriv);
|
||||||
void rtw_free_cmd_obj(struct cmd_obj *pcmd);
|
void rtw_free_cmd_obj(struct cmd_obj *pcmd);
|
||||||
|
|
||||||
void rtw_stop_cmd_thread(struct adapter *adapter);
|
void rtw_stop_cmd_thread(struct adapter *adapter);
|
||||||
thread_return rtw_cmd_thread(thread_context context);
|
int rtw_cmd_thread(void * context);
|
||||||
|
|
||||||
u32 rtw_init_cmd_priv (struct cmd_priv *pcmdpriv);
|
u32 rtw_init_cmd_priv (struct cmd_priv *pcmdpriv);
|
||||||
void rtw_free_cmd_priv (struct cmd_priv *pcmdpriv);
|
void rtw_free_cmd_priv (struct cmd_priv *pcmdpriv);
|
||||||
|
|
|
@ -32,7 +32,6 @@
|
||||||
#include <linux/semaphore.h>
|
#include <linux/semaphore.h>
|
||||||
#endif
|
#endif
|
||||||
#include <linux/list.h>
|
#include <linux/list.h>
|
||||||
//#include <linux/smp_lock.h>
|
|
||||||
#include <linux/spinlock.h>
|
#include <linux/spinlock.h>
|
||||||
#include <asm/atomic.h>
|
#include <asm/atomic.h>
|
||||||
|
|
||||||
|
@ -144,13 +143,13 @@ struct _io_ops
|
||||||
};
|
};
|
||||||
|
|
||||||
struct io_req {
|
struct io_req {
|
||||||
_list list;
|
struct list_head list;
|
||||||
u32 addr;
|
u32 addr;
|
||||||
volatile u32 val;
|
volatile u32 val;
|
||||||
u32 command;
|
u32 command;
|
||||||
u32 status;
|
u32 status;
|
||||||
u8 *pbuf;
|
u8 *pbuf;
|
||||||
_sema sema;
|
struct semaphore sema;
|
||||||
|
|
||||||
void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt);
|
void (*_async_io_callback)(struct adapter *padater, struct io_req *pio_req, u8 *cnxt);
|
||||||
u8 *cnxt;
|
u8 *cnxt;
|
||||||
|
@ -287,10 +286,10 @@ Below is the data structure used by _io_handler
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct io_queue {
|
struct io_queue {
|
||||||
_lock lock;
|
spinlock_t lock;
|
||||||
_list free_ioreqs;
|
struct list_head free_ioreqs;
|
||||||
_list pending; //The io_req list that will be served in the single protocol read/write.
|
struct list_head pending; //The io_req list that will be served in the single protocol read/write.
|
||||||
_list processing;
|
struct list_head processing;
|
||||||
u8 *free_ioreqs_buf; // 4-byte aligned
|
u8 *free_ioreqs_buf; // 4-byte aligned
|
||||||
u8 *pallocated_free_ioreqs_buf;
|
u8 *pallocated_free_ioreqs_buf;
|
||||||
struct intf_hdl intf;
|
struct intf_hdl intf;
|
||||||
|
|
|
@ -108,7 +108,7 @@ extern struct iw_handler_def rtw_handlers_def;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern NDIS_STATUS drv_query_info(
|
extern NDIS_STATUS drv_query_info(
|
||||||
_nic_hdl MiniportAdapterContext,
|
struct net_device * MiniportAdapterContext,
|
||||||
NDIS_OID Oid,
|
NDIS_OID Oid,
|
||||||
void * InformationBuffer,
|
void * InformationBuffer,
|
||||||
u32 InformationBufferLength,
|
u32 InformationBufferLength,
|
||||||
|
@ -117,7 +117,7 @@ extern NDIS_STATUS drv_query_info(
|
||||||
);
|
);
|
||||||
|
|
||||||
extern NDIS_STATUS drv_set_info(
|
extern NDIS_STATUS drv_set_info(
|
||||||
_nic_hdl MiniportAdapterContext,
|
struct net_device * MiniportAdapterContext,
|
||||||
NDIS_OID Oid,
|
NDIS_OID Oid,
|
||||||
void * InformationBuffer,
|
void * InformationBuffer,
|
||||||
u32 InformationBufferLength,
|
u32 InformationBufferLength,
|
||||||
|
|
|
@ -117,7 +117,7 @@ typedef struct _LED_871x{
|
||||||
|
|
||||||
u32 BlinkTimes; // Number of times to toggle led state for blinking.
|
u32 BlinkTimes; // Number of times to toggle led state for blinking.
|
||||||
|
|
||||||
_timer BlinkTimer; // Timer object for led blinking.
|
struct timer_list BlinkTimer; // Timer object for led blinking.
|
||||||
|
|
||||||
u8 bSWLedCtrl;
|
u8 bSWLedCtrl;
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ typedef struct _LED_871x{
|
||||||
u8 bLedScanBlinkInProgress;
|
u8 bLedScanBlinkInProgress;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
|
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
|
||||||
_workitem BlinkWorkItem; // Workitem used by BlinkTimer to manipulate H/W to blink LED.
|
struct work_struct BlinkWorkItem; // Workitem used by BlinkTimer to manipulate H/W to blink LED.
|
||||||
#endif
|
#endif
|
||||||
} LED_871x, *PLED_871x;
|
} LED_871x, *PLED_871x;
|
||||||
|
|
||||||
|
|
|
@ -152,7 +152,7 @@ struct sitesurvey_ctrl {
|
||||||
u64 last_tx_pkts;
|
u64 last_tx_pkts;
|
||||||
uint last_rx_pkts;
|
uint last_rx_pkts;
|
||||||
sint traffic_busy;
|
sint traffic_busy;
|
||||||
_timer sitesurvey_ctrl_timer;
|
struct timer_list sitesurvey_ctrl_timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _RT_LINK_DETECT_T{
|
typedef struct _RT_LINK_DETECT_T{
|
||||||
|
@ -249,7 +249,7 @@ struct scan_limit_info{
|
||||||
};
|
};
|
||||||
|
|
||||||
struct cfg80211_wifidirect_info{
|
struct cfg80211_wifidirect_info{
|
||||||
_timer remain_on_ch_timer;
|
struct timer_list remain_on_ch_timer;
|
||||||
u8 restore_channel;
|
u8 restore_channel;
|
||||||
struct ieee80211_channel remain_on_ch_channel;
|
struct ieee80211_channel remain_on_ch_channel;
|
||||||
enum nl80211_channel_type remain_on_ch_type;
|
enum nl80211_channel_type remain_on_ch_type;
|
||||||
|
@ -259,13 +259,13 @@ struct cfg80211_wifidirect_info{
|
||||||
|
|
||||||
struct wifidirect_info{
|
struct wifidirect_info{
|
||||||
struct adapter* padapter;
|
struct adapter* padapter;
|
||||||
_timer find_phase_timer;
|
struct timer_list find_phase_timer;
|
||||||
_timer restore_p2p_state_timer;
|
struct timer_list restore_p2p_state_timer;
|
||||||
|
|
||||||
// Used to do the scanning. After confirming the peer is availalble, the driver transmits the P2P frame to peer.
|
// Used to do the scanning. After confirming the peer is availalble, the driver transmits the P2P frame to peer.
|
||||||
_timer pre_tx_scan_timer;
|
struct timer_list pre_tx_scan_timer;
|
||||||
_timer reset_ch_sitesurvey;
|
struct timer_list reset_ch_sitesurvey;
|
||||||
_timer reset_ch_sitesurvey2; // Just for resetting the scan limit function by using p2p nego
|
struct timer_list reset_ch_sitesurvey2; // Just for resetting the scan limit function by using p2p nego
|
||||||
struct tx_provdisc_req_info tx_prov_disc_info;
|
struct tx_provdisc_req_info tx_prov_disc_info;
|
||||||
struct rx_provdisc_req_info rx_prov_disc_info;
|
struct rx_provdisc_req_info rx_prov_disc_info;
|
||||||
struct tx_invite_req_info invitereq_info;
|
struct tx_invite_req_info invitereq_info;
|
||||||
|
@ -365,8 +365,8 @@ struct tdls_info{
|
||||||
u8 cur_channel;
|
u8 cur_channel;
|
||||||
u8 candidate_ch;
|
u8 candidate_ch;
|
||||||
u8 collect_pkt_num[MAX_CHANNEL_NUM];
|
u8 collect_pkt_num[MAX_CHANNEL_NUM];
|
||||||
_lock cmd_lock;
|
spinlock_t cmd_lock;
|
||||||
_lock hdl_lock;
|
spinlock_t hdl_lock;
|
||||||
u8 watchdog_count;
|
u8 watchdog_count;
|
||||||
u8 dev_discovered; //WFD_TDLS: for sigma test
|
u8 dev_discovered; //WFD_TDLS: for sigma test
|
||||||
u8 enable;
|
u8 enable;
|
||||||
|
@ -377,7 +377,7 @@ struct tdls_info{
|
||||||
|
|
||||||
struct mlme_priv {
|
struct mlme_priv {
|
||||||
|
|
||||||
_lock lock;
|
spinlock_t lock;
|
||||||
sint fw_state; //shall we protect this variable? maybe not necessarily...
|
sint fw_state; //shall we protect this variable? maybe not necessarily...
|
||||||
u8 bScanInProcess;
|
u8 bScanInProcess;
|
||||||
u8 to_join; //flag
|
u8 to_join; //flag
|
||||||
|
@ -386,9 +386,9 @@ struct mlme_priv {
|
||||||
u8 *nic_hdl;
|
u8 *nic_hdl;
|
||||||
|
|
||||||
u8 not_indic_disco;
|
u8 not_indic_disco;
|
||||||
_list *pscanned;
|
struct list_head *pscanned;
|
||||||
_queue free_bss_pool;
|
struct __queue free_bss_pool;
|
||||||
_queue scanned_queue;
|
struct __queue scanned_queue;
|
||||||
u8 *free_bss_buf;
|
u8 *free_bss_buf;
|
||||||
u32 num_of_scanned;
|
u32 num_of_scanned;
|
||||||
|
|
||||||
|
@ -407,15 +407,15 @@ struct mlme_priv {
|
||||||
|
|
||||||
u32 scan_interval;
|
u32 scan_interval;
|
||||||
|
|
||||||
_timer assoc_timer;
|
struct timer_list assoc_timer;
|
||||||
|
|
||||||
uint assoc_by_bssid;
|
uint assoc_by_bssid;
|
||||||
uint assoc_by_rssi;
|
uint assoc_by_rssi;
|
||||||
|
|
||||||
_timer scan_to_timer; // driver itself handles scan_timeout status.
|
struct timer_list scan_to_timer; // driver itself handles scan_timeout status.
|
||||||
u32 scan_start_time; // used to evaluate the time spent in scanning
|
u32 scan_start_time; // used to evaluate the time spent in scanning
|
||||||
|
|
||||||
_timer set_scan_deny_timer;
|
struct timer_list set_scan_deny_timer;
|
||||||
ATOMIC_T set_scan_deny; //0: allowed, 1: deny
|
ATOMIC_T set_scan_deny; //0: allowed, 1: deny
|
||||||
|
|
||||||
struct qos_priv qospriv;
|
struct qos_priv qospriv;
|
||||||
|
@ -432,7 +432,7 @@ struct mlme_priv {
|
||||||
struct ht_priv htpriv;
|
struct ht_priv htpriv;
|
||||||
|
|
||||||
RT_LINK_DETECT_T LinkDetectInfo;
|
RT_LINK_DETECT_T LinkDetectInfo;
|
||||||
_timer dynamic_chk_timer; //dynamic/periodic check timer
|
struct timer_list dynamic_chk_timer; //dynamic/periodic check timer
|
||||||
|
|
||||||
u8 acm_mask; // for wmm acm mask
|
u8 acm_mask; // for wmm acm mask
|
||||||
u8 ChannelPlan;
|
u8 ChannelPlan;
|
||||||
|
@ -495,7 +495,7 @@ struct mlme_priv {
|
||||||
u32 p2p_probe_resp_ie_len;
|
u32 p2p_probe_resp_ie_len;
|
||||||
u32 p2p_go_probe_resp_ie_len; //for GO
|
u32 p2p_go_probe_resp_ie_len; //for GO
|
||||||
u32 p2p_assoc_req_ie_len;
|
u32 p2p_assoc_req_ie_len;
|
||||||
_lock bcn_update_lock;
|
spinlock_t bcn_update_lock;
|
||||||
u8 update_bcn;
|
u8 update_bcn;
|
||||||
|
|
||||||
|
|
||||||
|
@ -608,8 +608,6 @@ __inline static void _clr_fwstate_(struct mlme_priv *pmlmepriv, sint state)
|
||||||
*/
|
*/
|
||||||
__inline static void clr_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
__inline static void clr_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
if (check_fwstate(pmlmepriv, state) == true)
|
if (check_fwstate(pmlmepriv, state) == true)
|
||||||
pmlmepriv->fw_state ^= state;
|
pmlmepriv->fw_state ^= state;
|
||||||
|
@ -618,8 +616,6 @@ __inline static void clr_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
||||||
|
|
||||||
__inline static void clr_fwstate_ex(struct mlme_priv *pmlmepriv, sint state)
|
__inline static void clr_fwstate_ex(struct mlme_priv *pmlmepriv, sint state)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
_clr_fwstate_(pmlmepriv, state);
|
_clr_fwstate_(pmlmepriv, state);
|
||||||
spin_unlock_bh(&pmlmepriv->lock);
|
spin_unlock_bh(&pmlmepriv->lock);
|
||||||
|
@ -627,8 +623,6 @@ __inline static void clr_fwstate_ex(struct mlme_priv *pmlmepriv, sint state)
|
||||||
|
|
||||||
__inline static void up_scanned_network(struct mlme_priv *pmlmepriv)
|
__inline static void up_scanned_network(struct mlme_priv *pmlmepriv)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
pmlmepriv->num_of_scanned++;
|
pmlmepriv->num_of_scanned++;
|
||||||
spin_unlock_bh(&pmlmepriv->lock);
|
spin_unlock_bh(&pmlmepriv->lock);
|
||||||
|
@ -636,8 +630,6 @@ __inline static void up_scanned_network(struct mlme_priv *pmlmepriv)
|
||||||
|
|
||||||
__inline static void down_scanned_network(struct mlme_priv *pmlmepriv)
|
__inline static void down_scanned_network(struct mlme_priv *pmlmepriv)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
pmlmepriv->num_of_scanned--;
|
pmlmepriv->num_of_scanned--;
|
||||||
spin_unlock_bh(&pmlmepriv->lock);
|
spin_unlock_bh(&pmlmepriv->lock);
|
||||||
|
@ -645,8 +637,6 @@ __inline static void down_scanned_network(struct mlme_priv *pmlmepriv)
|
||||||
|
|
||||||
__inline static void set_scanned_network_val(struct mlme_priv *pmlmepriv, sint val)
|
__inline static void set_scanned_network_val(struct mlme_priv *pmlmepriv, sint val)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
|
||||||
|
|
||||||
spin_lock_bh(&pmlmepriv->lock);
|
spin_lock_bh(&pmlmepriv->lock);
|
||||||
pmlmepriv->num_of_scanned = val;
|
pmlmepriv->num_of_scanned = val;
|
||||||
spin_unlock_bh(&pmlmepriv->lock);
|
spin_unlock_bh(&pmlmepriv->lock);
|
||||||
|
@ -656,8 +646,8 @@ extern u16 rtw_get_capability(struct wlan_bssid_ex *bss);
|
||||||
extern void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target);
|
extern void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *target);
|
||||||
extern void rtw_disconnect_hdl_under_linked(struct adapter* adapter, struct sta_info *psta, u8 free_assoc);
|
extern void rtw_disconnect_hdl_under_linked(struct adapter* adapter, struct sta_info *psta, u8 free_assoc);
|
||||||
extern void rtw_generate_random_ibss(u8 *pibss);
|
extern void rtw_generate_random_ibss(u8 *pibss);
|
||||||
extern struct wlan_network* rtw_find_network(_queue *scanned_queue, u8 *addr);
|
extern struct wlan_network* rtw_find_network(struct __queue *scanned_queue, u8 *addr);
|
||||||
extern struct wlan_network* rtw_get_oldest_wlan_network(_queue *scanned_queue);
|
extern struct wlan_network* rtw_get_oldest_wlan_network(struct __queue *scanned_queue);
|
||||||
|
|
||||||
extern void rtw_free_assoc_resources(struct adapter* adapter, int lock_scanned_queue);
|
extern void rtw_free_assoc_resources(struct adapter* adapter, int lock_scanned_queue);
|
||||||
extern void rtw_indicate_disconnect(struct adapter* adapter);
|
extern void rtw_indicate_disconnect(struct adapter* adapter);
|
||||||
|
@ -688,9 +678,9 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
|
||||||
|
|
||||||
extern void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
|
extern void _rtw_free_mlme_priv(struct mlme_priv *pmlmepriv);
|
||||||
|
|
||||||
extern int _rtw_enqueue_network(_queue *queue, struct wlan_network *pnetwork);
|
extern int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork);
|
||||||
|
|
||||||
extern struct wlan_network* _rtw_dequeue_network(_queue *queue);
|
extern struct wlan_network* _rtw_dequeue_network(struct __queue *queue);
|
||||||
|
|
||||||
extern struct wlan_network* _rtw_alloc_network(struct mlme_priv *pmlmepriv);
|
extern struct wlan_network* _rtw_alloc_network(struct mlme_priv *pmlmepriv);
|
||||||
|
|
||||||
|
@ -699,7 +689,7 @@ extern void _rtw_free_network(struct mlme_priv *pmlmepriv, struct wlan_network *
|
||||||
extern void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork);
|
extern void _rtw_free_network_nolock(struct mlme_priv *pmlmepriv, struct wlan_network *pnetwork);
|
||||||
|
|
||||||
|
|
||||||
extern struct wlan_network* _rtw_find_network(_queue *scanned_queue, u8 *addr);
|
extern struct wlan_network* _rtw_find_network(struct __queue *scanned_queue, u8 *addr);
|
||||||
|
|
||||||
extern void _rtw_free_network_queue(struct adapter* padapter, u8 isfreeall);
|
extern void _rtw_free_network_queue(struct adapter* padapter, u8 isfreeall);
|
||||||
|
|
||||||
|
|
|
@ -447,12 +447,11 @@ struct mlme_ext_priv
|
||||||
struct ss_res sitesurvey_res;
|
struct ss_res sitesurvey_res;
|
||||||
struct mlme_ext_info mlmext_info;//for sta/adhoc mode, including current scanning/connecting/connected related info.
|
struct mlme_ext_info mlmext_info;//for sta/adhoc mode, including current scanning/connecting/connected related info.
|
||||||
//for ap mode, network includes ap's cap_info
|
//for ap mode, network includes ap's cap_info
|
||||||
_timer survey_timer;
|
struct timer_list survey_timer;
|
||||||
_timer link_timer;
|
struct timer_list link_timer;
|
||||||
#ifdef CONFIG_IEEE80211W
|
#ifdef CONFIG_IEEE80211W
|
||||||
_timer sa_query_timer;
|
struct timer_list sa_query_timer;
|
||||||
#endif //CONFIG_IEEE80211W
|
#endif //CONFIG_IEEE80211W
|
||||||
//_timer ADDBA_timer;
|
|
||||||
u16 chan_scan_time;
|
u16 chan_scan_time;
|
||||||
|
|
||||||
u8 scan_abort;
|
u8 scan_abort;
|
||||||
|
@ -670,18 +669,14 @@ void addba_timer_hdl(struct sta_info *psta);
|
||||||
#ifdef CONFIG_IEEE80211W
|
#ifdef CONFIG_IEEE80211W
|
||||||
void sa_query_timer_hdl(struct adapter *padapter);
|
void sa_query_timer_hdl(struct adapter *padapter);
|
||||||
#endif //CONFIG_IEEE80211W
|
#endif //CONFIG_IEEE80211W
|
||||||
//void reauth_timer_hdl(struct adapter *padapter);
|
|
||||||
//void reassoc_timer_hdl(struct adapter *padapter);
|
|
||||||
|
|
||||||
#define set_survey_timer(mlmeext, ms) \
|
#define set_survey_timer(mlmeext, ms) \
|
||||||
do { \
|
do { \
|
||||||
/*DBG_871X("%s set_survey_timer(%p, %d)\n", __FUNCTION__, (mlmeext), (ms));*/ \
|
|
||||||
_set_timer(&(mlmeext)->survey_timer, (ms)); \
|
_set_timer(&(mlmeext)->survey_timer, (ms)); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define set_link_timer(mlmeext, ms) \
|
#define set_link_timer(mlmeext, ms) \
|
||||||
do { \
|
do { \
|
||||||
/*DBG_871X("%s set_link_timer(%p, %d)\n", __FUNCTION__, (mlmeext), (ms));*/ \
|
|
||||||
_set_timer(&(mlmeext)->link_timer, (ms)); \
|
_set_timer(&(mlmeext)->link_timer, (ms)); \
|
||||||
} while(0)
|
} while(0)
|
||||||
#ifdef CONFIG_IEEE80211W
|
#ifdef CONFIG_IEEE80211W
|
||||||
|
|
|
@ -105,11 +105,11 @@ typedef enum _ANTENNA_PATH{
|
||||||
|
|
||||||
struct mp_xmit_frame
|
struct mp_xmit_frame
|
||||||
{
|
{
|
||||||
_list list;
|
struct list_head list;
|
||||||
|
|
||||||
struct pkt_attrib attrib;
|
struct pkt_attrib attrib;
|
||||||
|
|
||||||
_pkt *pkt;
|
struct sk_buff *pkt;
|
||||||
|
|
||||||
int frame_tag;
|
int frame_tag;
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ struct mp_xmit_frame
|
||||||
u8 *mem_addr;
|
u8 *mem_addr;
|
||||||
u32 sz[8];
|
u32 sz[8];
|
||||||
|
|
||||||
PURB pxmit_urb[8];
|
struct urb * pxmit_urb[8];
|
||||||
|
|
||||||
u8 bpending[8];
|
u8 bpending[8];
|
||||||
sint ac_tag[8];
|
sint ac_tag[8];
|
||||||
|
@ -152,7 +152,7 @@ struct mp_tx
|
||||||
u8 *pallocated_buf;
|
u8 *pallocated_buf;
|
||||||
u8 *buf;
|
u8 *buf;
|
||||||
u32 buf_size, write_size;
|
u32 buf_size, write_size;
|
||||||
_thread_hdl_ PktTxThread;
|
void * PktTxThread;
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <Hal8188EPhyCfg.h>
|
#include <Hal8188EPhyCfg.h>
|
||||||
|
@ -174,8 +174,8 @@ typedef struct _MPT_CONTEXT
|
||||||
// Indicate if the driver is unloading or unloaded.
|
// Indicate if the driver is unloading or unloaded.
|
||||||
bool bMptDrvUnload;
|
bool bMptDrvUnload;
|
||||||
|
|
||||||
_sema MPh2c_Sema;
|
struct semaphore MPh2c_Sema;
|
||||||
_timer MPh2c_timeout_timer;
|
struct timer_list MPh2c_timeout_timer;
|
||||||
// Event used to sync H2c for BT control
|
// Event used to sync H2c for BT control
|
||||||
|
|
||||||
bool MptH2cRspEvent;
|
bool MptH2cRspEvent;
|
||||||
|
@ -343,7 +343,7 @@ struct mp_priv {
|
||||||
|
|
||||||
u8 *pallocated_mp_xmitframe_buf;
|
u8 *pallocated_mp_xmitframe_buf;
|
||||||
u8 *pmp_xmtframe_buf;
|
u8 *pmp_xmtframe_buf;
|
||||||
_queue free_mp_xmitqueue;
|
struct __queue free_mp_xmitqueue;
|
||||||
u32 free_mp_xmitframe_cnt;
|
u32 free_mp_xmitframe_cnt;
|
||||||
MPT_CONTEXT MptCtx;
|
MPT_CONTEXT MptCtx;
|
||||||
};
|
};
|
||||||
|
|
|
@ -76,27 +76,7 @@ typedef struct _DR_VARIABLE_STRUCT_ {
|
||||||
|
|
||||||
//int mp_start_joinbss(struct adapter *padapter, NDIS_802_11_SSID *pssid);
|
//int mp_start_joinbss(struct adapter *padapter, NDIS_802_11_SSID *pssid);
|
||||||
|
|
||||||
//void _irqlevel_changed_(_irqL *irqlevel, /*bool*/unsigned char bLower);
|
|
||||||
#ifdef PLATFORM_OS_XP
|
|
||||||
static void _irqlevel_changed_(_irqL *irqlevel, u8 bLower)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (bLower == LOWER) {
|
|
||||||
*irqlevel = KeGetCurrentIrql();
|
|
||||||
|
|
||||||
if (*irqlevel > PASSIVE_LEVEL) {
|
|
||||||
KeLowerIrql(PASSIVE_LEVEL);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (KeGetCurrentIrql() == PASSIVE_LEVEL) {
|
|
||||||
KeRaiseIrql(DISPATCH_LEVEL, irqlevel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
#define _irqlevel_changed_(a,b)
|
#define _irqlevel_changed_(a,b)
|
||||||
#endif
|
|
||||||
|
|
||||||
//oid_rtl_seg_81_80_00
|
//oid_rtl_seg_81_80_00
|
||||||
NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv* poid_par_priv);
|
NDIS_STATUS oid_rt_pro_set_data_rate_hdl(struct oid_par_priv* poid_par_priv);
|
||||||
|
|
|
@ -110,28 +110,24 @@ struct reportpwrstate_parm {
|
||||||
unsigned short rsvd;
|
unsigned short rsvd;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
__inline static void _init_pwrlock(struct semaphore *plock)
|
||||||
typedef _sema _pwrlock;
|
|
||||||
|
|
||||||
|
|
||||||
__inline static void _init_pwrlock(_pwrlock *plock)
|
|
||||||
{
|
{
|
||||||
_rtw_init_sema(plock, 1);
|
_rtw_init_sema(plock, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static void _free_pwrlock(_pwrlock *plock)
|
__inline static void _free_pwrlock(struct semaphore *plock)
|
||||||
{
|
{
|
||||||
_rtw_free_sema(plock);
|
_rtw_free_sema(plock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
__inline static void _enter_pwrlock(_pwrlock *plock)
|
__inline static void _enter_pwrlock(struct semaphore *plock)
|
||||||
{
|
{
|
||||||
_rtw_down_sema(plock);
|
_rtw_down_sema(plock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
__inline static void _exit_pwrlock(_pwrlock *plock)
|
__inline static void _exit_pwrlock(struct semaphore *plock)
|
||||||
{
|
{
|
||||||
_rtw_up_sema(plock);
|
_rtw_up_sema(plock);
|
||||||
}
|
}
|
||||||
|
@ -184,7 +180,7 @@ enum { // for ips_mode
|
||||||
|
|
||||||
struct pwrctrl_priv
|
struct pwrctrl_priv
|
||||||
{
|
{
|
||||||
_pwrlock lock;
|
struct semaphore lock;
|
||||||
volatile u8 rpwm; // requested power state for fw
|
volatile u8 rpwm; // requested power state for fw
|
||||||
volatile u8 cpwm; // fw current power state. updated when 1. read from HCPWM 2. driver lowers power level
|
volatile u8 cpwm; // fw current power state. updated when 1. read from HCPWM 2. driver lowers power level
|
||||||
volatile u8 tog; // toggling
|
volatile u8 tog; // toggling
|
||||||
|
@ -195,7 +191,7 @@ struct pwrctrl_priv
|
||||||
u8 bcn_ant_mode;
|
u8 bcn_ant_mode;
|
||||||
|
|
||||||
u32 alives;
|
u32 alives;
|
||||||
_workitem cpwm_event;
|
struct work_struct cpwm_event;
|
||||||
u8 bpower_saving;
|
u8 bpower_saving;
|
||||||
|
|
||||||
u8 b_hw_radio_off;
|
u8 b_hw_radio_off;
|
||||||
|
@ -233,7 +229,7 @@ struct pwrctrl_priv
|
||||||
u8 autopm_cnt;
|
u8 autopm_cnt;
|
||||||
#endif
|
#endif
|
||||||
u8 bSupportRemoteWakeup;
|
u8 bSupportRemoteWakeup;
|
||||||
_timer pwr_state_check_timer;
|
struct timer_list pwr_state_check_timer;
|
||||||
int pwr_state_check_interval;
|
int pwr_state_check_interval;
|
||||||
u8 pwr_state_check_cnts;
|
u8 pwr_state_check_cnts;
|
||||||
|
|
||||||
|
@ -274,7 +270,6 @@ struct pwrctrl_priv
|
||||||
|
|
||||||
#define _rtw_set_pwr_state_check_timer(pwrctl, ms) \
|
#define _rtw_set_pwr_state_check_timer(pwrctl, ms) \
|
||||||
do { \
|
do { \
|
||||||
/*DBG_871X("%s _rtw_set_pwr_state_check_timer(%p, %d)\n", __FUNCTION__, (pwrctl), (ms));*/ \
|
|
||||||
_set_timer(&(pwrctl)->pwr_state_check_timer, (ms)); \
|
_set_timer(&(pwrctl)->pwr_state_check_timer, (ms)); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
|
|
|
@ -61,30 +61,12 @@ struct recv_reorder_ctrl
|
||||||
u16 indicate_seq;//=wstart_b, init_value=0xffff
|
u16 indicate_seq;//=wstart_b, init_value=0xffff
|
||||||
u16 wend_b;
|
u16 wend_b;
|
||||||
u8 wsize_b;
|
u8 wsize_b;
|
||||||
_queue pending_recvframe_queue;
|
struct __queue pending_recvframe_queue;
|
||||||
_timer reordering_ctrl_timer;
|
struct timer_list reordering_ctrl_timer;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct stainfo_rxcache {
|
struct stainfo_rxcache {
|
||||||
u16 tid_rxseq[16];
|
u16 tid_rxseq[16];
|
||||||
/*
|
|
||||||
unsigned short tid0_rxseq;
|
|
||||||
unsigned short tid1_rxseq;
|
|
||||||
unsigned short tid2_rxseq;
|
|
||||||
unsigned short tid3_rxseq;
|
|
||||||
unsigned short tid4_rxseq;
|
|
||||||
unsigned short tid5_rxseq;
|
|
||||||
unsigned short tid6_rxseq;
|
|
||||||
unsigned short tid7_rxseq;
|
|
||||||
unsigned short tid8_rxseq;
|
|
||||||
unsigned short tid9_rxseq;
|
|
||||||
unsigned short tid10_rxseq;
|
|
||||||
unsigned short tid11_rxseq;
|
|
||||||
unsigned short tid12_rxseq;
|
|
||||||
unsigned short tid13_rxseq;
|
|
||||||
unsigned short tid14_rxseq;
|
|
||||||
unsigned short tid15_rxseq;
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -196,13 +178,12 @@ accesser of recv_priv: rtw_recv_entry(dispatch / passive level); recv_thread(pas
|
||||||
|
|
||||||
using enter_critical section to protect
|
using enter_critical section to protect
|
||||||
*/
|
*/
|
||||||
struct recv_priv
|
struct recv_priv {
|
||||||
{
|
spinlock_t lock;
|
||||||
_lock lock;
|
|
||||||
|
|
||||||
_queue free_recv_queue;
|
struct __queue free_recv_queue;
|
||||||
_queue recv_pending_queue;
|
struct __queue recv_pending_queue;
|
||||||
_queue uc_swdec_pending_queue;
|
struct __queue uc_swdec_pending_queue;
|
||||||
|
|
||||||
u8 *pallocated_frame_buf;
|
u8 *pallocated_frame_buf;
|
||||||
u8 *precv_frame_buf;
|
u8 *precv_frame_buf;
|
||||||
|
@ -223,12 +204,12 @@ struct recv_priv
|
||||||
uint rx_middlepacket_crcerr;
|
uint rx_middlepacket_crcerr;
|
||||||
|
|
||||||
//u8 *pallocated_urb_buf;
|
//u8 *pallocated_urb_buf;
|
||||||
_sema allrxreturnevt;
|
struct semaphore allrxreturnevt;
|
||||||
uint ff_hwaddr;
|
uint ff_hwaddr;
|
||||||
u8 rx_pending_cnt;
|
u8 rx_pending_cnt;
|
||||||
|
|
||||||
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
#ifdef CONFIG_USB_INTERRUPT_IN_PIPE
|
||||||
PURB int_in_urb;
|
struct urb * int_in_urb;
|
||||||
|
|
||||||
u8 *int_in_buf;
|
u8 *int_in_buf;
|
||||||
#endif //CONFIG_USB_INTERRUPT_IN_PIPE
|
#endif //CONFIG_USB_INTERRUPT_IN_PIPE
|
||||||
|
@ -244,7 +225,7 @@ struct recv_priv
|
||||||
|
|
||||||
u8 *pallocated_recv_buf;
|
u8 *pallocated_recv_buf;
|
||||||
u8 *precv_buf; // 4 alignment
|
u8 *precv_buf; // 4 alignment
|
||||||
_queue free_recv_buf_queue;
|
struct __queue free_recv_buf_queue;
|
||||||
u32 free_recv_buf_queue_cnt;
|
u32 free_recv_buf_queue_cnt;
|
||||||
|
|
||||||
u8 is_signal_dbg; // for debug
|
u8 is_signal_dbg; // for debug
|
||||||
|
@ -258,7 +239,7 @@ struct recv_priv
|
||||||
s8 RxRssi[2];
|
s8 RxRssi[2];
|
||||||
int FalseAlmCnt_all;
|
int FalseAlmCnt_all;
|
||||||
|
|
||||||
_timer signal_stat_timer;
|
struct timer_list signal_stat_timer;
|
||||||
u32 signal_stat_sampling_interval;
|
u32 signal_stat_sampling_interval;
|
||||||
struct signal_stat signal_qual_data;
|
struct signal_stat signal_qual_data;
|
||||||
struct signal_stat signal_strength_data;
|
struct signal_stat signal_strength_data;
|
||||||
|
@ -268,48 +249,33 @@ struct recv_priv
|
||||||
|
|
||||||
struct sta_recv_priv {
|
struct sta_recv_priv {
|
||||||
|
|
||||||
_lock lock;
|
spinlock_t lock;
|
||||||
sint option;
|
sint option;
|
||||||
|
struct __queue defrag_q; //keeping the fragment frame until defrag
|
||||||
//_queue blk_strms[MAX_RX_NUMBLKS];
|
|
||||||
_queue defrag_q; //keeping the fragment frame until defrag
|
|
||||||
|
|
||||||
struct stainfo_rxcache rxcache;
|
struct stainfo_rxcache rxcache;
|
||||||
|
|
||||||
//uint sta_rx_bytes;
|
|
||||||
//uint sta_rx_pkts;
|
|
||||||
//uint sta_rx_fail;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct recv_buf {
|
||||||
struct recv_buf
|
struct list_head list;
|
||||||
{
|
spinlock_t recvbuf_lock;
|
||||||
_list list;
|
|
||||||
|
|
||||||
_lock recvbuf_lock;
|
|
||||||
|
|
||||||
u32 ref_cnt;
|
u32 ref_cnt;
|
||||||
|
|
||||||
struct adapter *adapter;
|
struct adapter *adapter;
|
||||||
|
|
||||||
u8 *pbuf;
|
u8 *pbuf;
|
||||||
u8 *pallocated_buf;
|
u8 *pallocated_buf;
|
||||||
|
|
||||||
u32 len;
|
u32 len;
|
||||||
u8 *phead;
|
u8 *phead;
|
||||||
u8 *pdata;
|
u8 *pdata;
|
||||||
u8 *ptail;
|
u8 *ptail;
|
||||||
u8 *pend;
|
u8 *pend;
|
||||||
|
|
||||||
PURB purb;
|
struct urb *purb;
|
||||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||||
u32 alloc_sz;
|
u32 alloc_sz;
|
||||||
|
|
||||||
u8 irp_pending;
|
u8 irp_pending;
|
||||||
int transfer_len;
|
int transfer_len;
|
||||||
|
|
||||||
_pkt *pskb;
|
struct sk_buff *pskb;
|
||||||
u8 reuse;
|
u8 reuse;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -330,7 +296,7 @@ struct recv_buf
|
||||||
|
|
||||||
*/
|
*/
|
||||||
struct recv_frame_hdr {
|
struct recv_frame_hdr {
|
||||||
_list list;
|
struct list_head list;
|
||||||
struct sk_buff *pkt;
|
struct sk_buff *pkt;
|
||||||
struct sk_buff *pkt_newalloc;
|
struct sk_buff *pkt_newalloc;
|
||||||
struct adapter *adapter;
|
struct adapter *adapter;
|
||||||
|
@ -359,27 +325,27 @@ struct recv_frame_hdr {
|
||||||
|
|
||||||
union recv_frame{
|
union recv_frame{
|
||||||
union{
|
union{
|
||||||
_list list;
|
struct list_head list;
|
||||||
struct recv_frame_hdr hdr;
|
struct recv_frame_hdr hdr;
|
||||||
uint mem[RECVFRAME_HDR_ALIGN>>2];
|
uint mem[RECVFRAME_HDR_ALIGN>>2];
|
||||||
}u;
|
}u;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern union recv_frame *_rtw_alloc_recvframe (_queue *pfree_recv_queue); //get a free recv_frame from pfree_recv_queue
|
extern union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue); //get a free recv_frame from pfree_recv_queue
|
||||||
extern union recv_frame *rtw_alloc_recvframe (_queue *pfree_recv_queue); //get a free recv_frame from pfree_recv_queue
|
extern union recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue); //get a free recv_frame from pfree_recv_queue
|
||||||
extern void rtw_init_recvframe(union recv_frame *precvframe ,struct recv_priv *precvpriv);
|
extern void rtw_init_recvframe(union recv_frame *precvframe ,struct recv_priv *precvpriv);
|
||||||
extern int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue);
|
extern int rtw_free_recvframe(union recv_frame *precvframe, struct __queue *pfree_recv_queue);
|
||||||
|
|
||||||
#define rtw_dequeue_recvframe(queue) rtw_alloc_recvframe(queue)
|
#define rtw_dequeue_recvframe(queue) rtw_alloc_recvframe(queue)
|
||||||
extern int _rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue);
|
extern int _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
|
||||||
extern int rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue);
|
extern int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
|
||||||
|
|
||||||
extern void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue);
|
extern void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue);
|
||||||
u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
|
u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
|
||||||
|
|
||||||
sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue);
|
sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue);
|
||||||
sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue);
|
sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
|
||||||
struct recv_buf *rtw_dequeue_recvbuf (_queue *queue);
|
struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue);
|
||||||
|
|
||||||
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
|
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
|
||||||
|
|
||||||
|
@ -518,9 +484,9 @@ __inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
__inline static _buffer * get_rxbuf_desc(union recv_frame *precvframe)
|
__inline static unsigned char *get_rxbuf_desc(union recv_frame *precvframe)
|
||||||
{
|
{
|
||||||
_buffer * buf_desc;
|
unsigned char *buf_desc;
|
||||||
|
|
||||||
if(precvframe==NULL)
|
if(precvframe==NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -538,7 +504,7 @@ __inline static union recv_frame *rxmem_to_recvframe(u8 *rxmem)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static union recv_frame *pkt_to_recvframe(_pkt *pkt)
|
__inline static union recv_frame *pkt_to_recvframe(struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
|
|
||||||
u8 * buf_star;
|
u8 * buf_star;
|
||||||
|
@ -548,7 +514,7 @@ __inline static union recv_frame *pkt_to_recvframe(_pkt *pkt)
|
||||||
return precv_frame;
|
return precv_frame;
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static u8 *pkt_to_recvmem(_pkt *pkt)
|
__inline static u8 *pkt_to_recvmem(struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
// return the rx_head
|
// return the rx_head
|
||||||
|
|
||||||
|
@ -558,7 +524,7 @@ __inline static u8 *pkt_to_recvmem(_pkt *pkt)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__inline static u8 *pkt_to_recvdata(_pkt *pkt)
|
__inline static u8 *pkt_to_recvdata(struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
// return the rx_data
|
// return the rx_data
|
||||||
|
|
||||||
|
|
|
@ -158,18 +158,14 @@ struct security_priv
|
||||||
u8 binstallBIPkey;
|
u8 binstallBIPkey;
|
||||||
#endif //CONFIG_IEEE80211W
|
#endif //CONFIG_IEEE80211W
|
||||||
u8 busetkipkey;
|
u8 busetkipkey;
|
||||||
//_timer tkip_timer;
|
|
||||||
u8 bcheck_grpkey;
|
u8 bcheck_grpkey;
|
||||||
u8 bgrpkey_handshake;
|
u8 bgrpkey_handshake;
|
||||||
|
|
||||||
//u8 packet_cnt;//unused, removed
|
|
||||||
|
|
||||||
s32 sw_encrypt;//from registry_priv
|
s32 sw_encrypt;//from registry_priv
|
||||||
s32 sw_decrypt;//from registry_priv
|
s32 sw_decrypt;//from registry_priv
|
||||||
|
|
||||||
s32 hw_decrypted;//if the rx packets is hw_decrypted==false, it means the hw has not been ready.
|
s32 hw_decrypted;//if the rx packets is hw_decrypted==false, it means the hw has not been ready.
|
||||||
|
|
||||||
|
|
||||||
//keeps the auth_type & enc_status from upper layer ioctl(wpa_supplicant or wzc)
|
//keeps the auth_type & enc_status from upper layer ioctl(wpa_supplicant or wzc)
|
||||||
u32 ndisauthtype; // enum NDIS_802_11_AUTHENTICATION_MODE
|
u32 ndisauthtype; // enum NDIS_802_11_AUTHENTICATION_MODE
|
||||||
u32 ndisencryptstatus; // NDIS_802_11_ENCRYPTION_STATUS
|
u32 ndisencryptstatus; // NDIS_802_11_ENCRYPTION_STATUS
|
||||||
|
@ -184,7 +180,6 @@ struct security_priv
|
||||||
u8 authenticator_ie[256]; //store ap security information element
|
u8 authenticator_ie[256]; //store ap security information element
|
||||||
u8 supplicant_ie[256]; //store sta security information element
|
u8 supplicant_ie[256]; //store sta security information element
|
||||||
|
|
||||||
|
|
||||||
//for tkip countermeasure
|
//for tkip countermeasure
|
||||||
u32 last_mic_err_time;
|
u32 last_mic_err_time;
|
||||||
u8 btkip_countermeasure;
|
u8 btkip_countermeasure;
|
||||||
|
|
|
@ -119,11 +119,7 @@ union txdesc {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct hw_xmit {
|
struct hw_xmit {
|
||||||
//_lock xmit_lock;
|
struct __queue *sta_queue;
|
||||||
//_list pending;
|
|
||||||
_queue *sta_queue;
|
|
||||||
//struct hw_txqueue *phwtxqueue;
|
|
||||||
//sint txcmdcnt;
|
|
||||||
int accnt;
|
int accnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -218,7 +214,7 @@ void rtw_sctx_done(struct submit_ctx **sctx);
|
||||||
|
|
||||||
struct xmit_buf
|
struct xmit_buf
|
||||||
{
|
{
|
||||||
_list list;
|
struct list_head list;
|
||||||
|
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
|
|
||||||
|
@ -238,7 +234,7 @@ struct xmit_buf
|
||||||
|
|
||||||
u32 ff_hwaddr;
|
u32 ff_hwaddr;
|
||||||
|
|
||||||
PURB pxmit_urb[8];
|
struct urb *pxmit_urb[8];
|
||||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||||
u8 bpending[8];
|
u8 bpending[8];
|
||||||
|
|
||||||
|
@ -251,13 +247,12 @@ struct xmit_buf
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct xmit_frame
|
struct xmit_frame {
|
||||||
{
|
struct list_head list;
|
||||||
_list list;
|
|
||||||
|
|
||||||
struct pkt_attrib attrib;
|
struct pkt_attrib attrib;
|
||||||
|
|
||||||
_pkt *pkt;
|
struct sk_buff *pkt;
|
||||||
|
|
||||||
int frame_tag;
|
int frame_tag;
|
||||||
|
|
||||||
|
@ -278,34 +273,26 @@ struct xmit_frame
|
||||||
};
|
};
|
||||||
|
|
||||||
struct tx_servq {
|
struct tx_servq {
|
||||||
_list tx_pending;
|
struct list_head tx_pending;
|
||||||
_queue sta_pending;
|
struct __queue sta_pending;
|
||||||
int qcnt;
|
int qcnt;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
struct sta_xmit_priv
|
struct sta_xmit_priv
|
||||||
{
|
{
|
||||||
_lock lock;
|
spinlock_t lock;
|
||||||
sint option;
|
sint option;
|
||||||
sint apsd_setting; //When bit mask is on, the associated edca queue supports APSD.
|
sint apsd_setting; //When bit mask is on, the associated edca queue supports APSD.
|
||||||
|
|
||||||
|
|
||||||
//struct tx_servq blk_q[MAX_NUMBLKS];
|
|
||||||
struct tx_servq be_q; //priority == 0,3
|
struct tx_servq be_q; //priority == 0,3
|
||||||
struct tx_servq bk_q; //priority == 1,2
|
struct tx_servq bk_q; //priority == 1,2
|
||||||
struct tx_servq vi_q; //priority == 4,5
|
struct tx_servq vi_q; //priority == 4,5
|
||||||
struct tx_servq vo_q; //priority == 6,7
|
struct tx_servq vo_q; //priority == 6,7
|
||||||
_list legacy_dz;
|
struct list_head legacy_dz;
|
||||||
_list apsd;
|
struct list_head apsd;
|
||||||
|
|
||||||
u16 txseq_tid[16];
|
u16 txseq_tid[16];
|
||||||
|
|
||||||
//uint sta_tx_bytes;
|
|
||||||
//u64 sta_tx_pkts;
|
|
||||||
//uint sta_tx_fail;
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -327,39 +314,25 @@ struct agg_pkt_info{
|
||||||
|
|
||||||
struct xmit_priv {
|
struct xmit_priv {
|
||||||
|
|
||||||
_lock lock;
|
spinlock_t lock;
|
||||||
|
|
||||||
_sema xmit_sema;
|
struct semaphore xmit_sema;
|
||||||
_sema terminate_xmitthread_sema;
|
struct semaphore terminate_xmitthread_sema;
|
||||||
|
struct __queue be_pending;
|
||||||
//_queue blk_strms[MAX_NUMBLKS];
|
struct __queue bk_pending;
|
||||||
_queue be_pending;
|
struct __queue vi_pending;
|
||||||
_queue bk_pending;
|
struct __queue vo_pending;
|
||||||
_queue vi_pending;
|
struct __queue bm_pending;
|
||||||
_queue vo_pending;
|
|
||||||
_queue bm_pending;
|
|
||||||
|
|
||||||
//_queue legacy_dz_queue;
|
|
||||||
//_queue apsd_queue;
|
|
||||||
|
|
||||||
u8 *pallocated_frame_buf;
|
u8 *pallocated_frame_buf;
|
||||||
u8 *pxmit_frame_buf;
|
u8 *pxmit_frame_buf;
|
||||||
uint free_xmitframe_cnt;
|
uint free_xmitframe_cnt;
|
||||||
_queue free_xmit_queue;
|
struct __queue free_xmit_queue;
|
||||||
|
|
||||||
//uint mapping_addr;
|
|
||||||
//uint pkt_sz;
|
|
||||||
|
|
||||||
u8 *xframe_ext_alloc_addr;
|
u8 *xframe_ext_alloc_addr;
|
||||||
u8 *xframe_ext;
|
u8 *xframe_ext;
|
||||||
uint free_xframe_ext_cnt;
|
uint free_xframe_ext_cnt;
|
||||||
_queue free_xframe_ext_queue;
|
struct __queue free_xframe_ext_queue;
|
||||||
|
|
||||||
//struct hw_txqueue be_txqueue;
|
|
||||||
//struct hw_txqueue bk_txqueue;
|
|
||||||
//struct hw_txqueue vi_txqueue;
|
|
||||||
//struct hw_txqueue vo_txqueue;
|
|
||||||
//struct hw_txqueue bmc_txqueue;
|
|
||||||
|
|
||||||
uint frag_len;
|
uint frag_len;
|
||||||
|
|
||||||
|
@ -381,7 +354,7 @@ struct xmit_priv {
|
||||||
|
|
||||||
u8 wmm_para_seq[4];//sequence for wmm ac parameter strength from large to small. it's value is 0->vo, 1->vi, 2->be, 3->bk.
|
u8 wmm_para_seq[4];//sequence for wmm ac parameter strength from large to small. it's value is 0->vo, 1->vi, 2->be, 3->bk.
|
||||||
|
|
||||||
_sema tx_retevt;//all tx return event;
|
struct semaphore tx_retevt;//all tx return event;
|
||||||
u8 txirp_cnt;//
|
u8 txirp_cnt;//
|
||||||
|
|
||||||
struct tasklet_struct xmit_tasklet;
|
struct tasklet_struct xmit_tasklet;
|
||||||
|
@ -391,13 +364,13 @@ struct xmit_priv {
|
||||||
int viq_cnt;
|
int viq_cnt;
|
||||||
int voq_cnt;
|
int voq_cnt;
|
||||||
|
|
||||||
_queue free_xmitbuf_queue;
|
struct __queue free_xmitbuf_queue;
|
||||||
_queue pending_xmitbuf_queue;
|
struct __queue pending_xmitbuf_queue;
|
||||||
u8 *pallocated_xmitbuf;
|
u8 *pallocated_xmitbuf;
|
||||||
u8 *pxmitbuf;
|
u8 *pxmitbuf;
|
||||||
uint free_xmitbuf_cnt;
|
uint free_xmitbuf_cnt;
|
||||||
|
|
||||||
_queue free_xmit_extbuf_queue;
|
struct __queue free_xmit_extbuf_queue;
|
||||||
u8 *pallocated_xmit_extbuf;
|
u8 *pallocated_xmit_extbuf;
|
||||||
u8 *pxmit_extbuf;
|
u8 *pxmit_extbuf;
|
||||||
uint free_xmit_extbuf_cnt;
|
uint free_xmit_extbuf_cnt;
|
||||||
|
@ -406,7 +379,7 @@ struct xmit_priv {
|
||||||
int ack_tx;
|
int ack_tx;
|
||||||
_mutex ack_tx_mutex;
|
_mutex ack_tx_mutex;
|
||||||
struct submit_ctx ack_tx_ops;
|
struct submit_ctx ack_tx_ops;
|
||||||
_lock lock_sctx;
|
spinlock_t lock_sctx;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv);
|
extern struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv);
|
||||||
|
@ -424,7 +397,7 @@ extern struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv);
|
||||||
struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv);
|
struct xmit_frame *rtw_alloc_xmitframe_ext(struct xmit_priv *pxmitpriv);
|
||||||
struct xmit_frame *rtw_alloc_xmitframe_once(struct xmit_priv *pxmitpriv);
|
struct xmit_frame *rtw_alloc_xmitframe_once(struct xmit_priv *pxmitpriv);
|
||||||
extern s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe);
|
extern s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe);
|
||||||
extern void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, _queue *pframequeue);
|
extern void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pframequeue);
|
||||||
struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info *psta, sint up, u8 *ac);
|
struct tx_servq *rtw_get_sta_pending(struct adapter *padapter, struct sta_info *psta, sint up, u8 *ac);
|
||||||
extern s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
extern s32 rtw_xmitframe_enqueue(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
||||||
extern struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i, sint entry);
|
extern struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmit *phwxmit_i, sint entry);
|
||||||
|
@ -432,9 +405,9 @@ extern struct xmit_frame* rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct
|
||||||
extern s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
extern s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
||||||
extern u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
|
extern u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
|
||||||
#define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib)
|
#define rtw_wlan_pkt_size(f) rtw_calculate_wlan_pkt_size_by_attribue(&f->attrib)
|
||||||
extern s32 rtw_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_frame *pxmitframe);
|
extern s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe);
|
||||||
#ifdef CONFIG_IEEE80211W
|
#ifdef CONFIG_IEEE80211W
|
||||||
extern s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, _pkt *pkt, struct xmit_frame *pxmitframe);
|
extern s32 rtw_mgmt_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct xmit_frame *pxmitframe);
|
||||||
#endif //CONFIG_IEEE80211W
|
#endif //CONFIG_IEEE80211W
|
||||||
s32 _rtw_init_hw_txqueue(struct hw_txqueue* phw_txqueue, u8 ac_tag);
|
s32 _rtw_init_hw_txqueue(struct hw_txqueue* phw_txqueue, u8 ac_tag);
|
||||||
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv);
|
void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv);
|
||||||
|
@ -453,7 +426,7 @@ void rtw_alloc_hwxmits(struct adapter *padapter);
|
||||||
void rtw_free_hwxmits(struct adapter *padapter);
|
void rtw_free_hwxmits(struct adapter *padapter);
|
||||||
|
|
||||||
|
|
||||||
s32 rtw_xmit(struct adapter *padapter, _pkt **pkt);
|
s32 rtw_xmit(struct adapter *padapter, struct sk_buff **pkt);
|
||||||
|
|
||||||
#if defined(CONFIG_AP_MODE)
|
#if defined(CONFIG_AP_MODE)
|
||||||
sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
sint xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_frame *pxmitframe);
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
//if mode ==0, then the sta is allowed once the addr is hit.
|
//if mode ==0, then the sta is allowed once the addr is hit.
|
||||||
//if mode ==1, then the sta is rejected once the addr is non-hit.
|
//if mode ==1, then the sta is rejected once the addr is non-hit.
|
||||||
struct rtw_wlan_acl_node {
|
struct rtw_wlan_acl_node {
|
||||||
_list list;
|
struct list_head list;
|
||||||
u8 addr[ETH_ALEN];
|
u8 addr[ETH_ALEN];
|
||||||
u8 valid;
|
u8 valid;
|
||||||
};
|
};
|
||||||
|
@ -45,7 +45,7 @@ struct wlan_acl_pool {
|
||||||
int mode;
|
int mode;
|
||||||
int num;
|
int num;
|
||||||
struct rtw_wlan_acl_node aclnode[NUM_ACL];
|
struct rtw_wlan_acl_node aclnode[NUM_ACL];
|
||||||
_queue acl_node_q;
|
struct __queue acl_node_q;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _RSSI_STA{
|
typedef struct _RSSI_STA{
|
||||||
|
@ -87,18 +87,15 @@ struct stainfo_stats {
|
||||||
|
|
||||||
struct sta_info {
|
struct sta_info {
|
||||||
|
|
||||||
_lock lock;
|
spinlock_t lock;
|
||||||
_list list; //free_sta_queue
|
struct list_head list; //free_sta_queue
|
||||||
_list hash_list; //sta_hash
|
struct list_head hash_list; //sta_hash
|
||||||
//_list asoc_list; //20061114
|
|
||||||
//_list sleep_list;//sleep_q
|
|
||||||
//_list wakeup_list;//wakeup_q
|
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
|
|
||||||
struct sta_xmit_priv sta_xmitpriv;
|
struct sta_xmit_priv sta_xmitpriv;
|
||||||
struct sta_recv_priv sta_recvpriv;
|
struct sta_recv_priv sta_recvpriv;
|
||||||
|
|
||||||
_queue sleep_q;
|
struct __queue sleep_q;
|
||||||
unsigned int sleepq_len;
|
unsigned int sleepq_len;
|
||||||
|
|
||||||
uint state;
|
uint state;
|
||||||
|
@ -134,7 +131,7 @@ struct sta_info {
|
||||||
struct stainfo_stats sta_stats;
|
struct stainfo_stats sta_stats;
|
||||||
|
|
||||||
//for A-MPDU TX, ADDBA timeout check
|
//for A-MPDU TX, ADDBA timeout check
|
||||||
_timer addba_retry_timer;
|
struct timer_list addba_retry_timer;
|
||||||
|
|
||||||
//for A-MPDU Rx reordering buffer control
|
//for A-MPDU Rx reordering buffer control
|
||||||
struct recv_reorder_ctrl recvreorder_ctrl[16];
|
struct recv_reorder_ctrl recvreorder_ctrl[16];
|
||||||
|
@ -156,8 +153,8 @@ struct sta_info {
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
|
|
||||||
_list asoc_list;
|
struct list_head asoc_list;
|
||||||
_list auth_list;
|
struct list_head auth_list;
|
||||||
|
|
||||||
unsigned int expire_to;
|
unsigned int expire_to;
|
||||||
unsigned int auth_seq;
|
unsigned int auth_seq;
|
||||||
|
@ -353,22 +350,21 @@ struct sta_priv {
|
||||||
|
|
||||||
u8 *pallocated_stainfo_buf;
|
u8 *pallocated_stainfo_buf;
|
||||||
u8 *pstainfo_buf;
|
u8 *pstainfo_buf;
|
||||||
_queue free_sta_queue;
|
struct __queue free_sta_queue;
|
||||||
|
|
||||||
_lock sta_hash_lock;
|
spinlock_t sta_hash_lock;
|
||||||
_list sta_hash[NUM_STA];
|
struct list_head sta_hash[NUM_STA];
|
||||||
int asoc_sta_count;
|
int asoc_sta_count;
|
||||||
_queue sleep_q;
|
struct __queue sleep_q;
|
||||||
_queue wakeup_q;
|
struct __queue wakeup_q;
|
||||||
|
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
|
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
_list asoc_list;
|
struct list_head asoc_list;
|
||||||
_list auth_list;
|
struct list_head auth_list;
|
||||||
_lock asoc_list_lock;
|
spinlock_t asoc_list_lock;
|
||||||
_lock auth_list_lock;
|
spinlock_t auth_list_lock;
|
||||||
u8 asoc_list_cnt;
|
u8 asoc_list_cnt;
|
||||||
u8 auth_list_cnt;
|
u8 auth_list_cnt;
|
||||||
|
|
||||||
|
|
|
@ -232,7 +232,7 @@ __inline static uint get_wlan_bssid_ex_sz(struct wlan_bssid_ex *bss)
|
||||||
}
|
}
|
||||||
|
|
||||||
struct wlan_network {
|
struct wlan_network {
|
||||||
_list list;
|
struct list_head list;
|
||||||
int network_type; //refer to ieee80211.h for WIRELESS_11A/B/G
|
int network_type; //refer to ieee80211.h for WIRELESS_11A/B/G
|
||||||
int fixed; // set to fixed when not to be removed as site-surveying
|
int fixed; // set to fixed when not to be removed as site-surveying
|
||||||
unsigned long last_scanned; //timestamp for the network
|
unsigned long last_scanned; //timestamp for the network
|
||||||
|
|
|
@ -25,9 +25,9 @@
|
||||||
#include <drv_types.h>
|
#include <drv_types.h>
|
||||||
|
|
||||||
struct pkt_file {
|
struct pkt_file {
|
||||||
_pkt *pkt;
|
struct sk_buff *pkt;
|
||||||
SIZE_T pkt_len; //the remainder length of the open_file
|
SIZE_T pkt_len; //the remainder length of the open_file
|
||||||
_buffer *cur_buffer;
|
unsigned char *cur_buffer;
|
||||||
u8 *buf_start;
|
u8 *buf_start;
|
||||||
u8 *cur_addr;
|
u8 *cur_addr;
|
||||||
SIZE_T buf_len;
|
SIZE_T buf_len;
|
||||||
|
@ -41,8 +41,8 @@ struct sta_xmit_priv;
|
||||||
struct xmit_frame;
|
struct xmit_frame;
|
||||||
struct xmit_buf;
|
struct xmit_buf;
|
||||||
|
|
||||||
int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device * pnetdev);
|
||||||
int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev);
|
int rtw_xmit_entry(struct sk_buff *pkt, struct net_device * pnetdev);
|
||||||
|
|
||||||
void rtw_os_xmit_schedule(struct adapter *padapter);
|
void rtw_os_xmit_schedule(struct adapter *padapter);
|
||||||
|
|
||||||
|
@ -50,11 +50,11 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitb
|
||||||
void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz);
|
void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitbuf,u32 free_sz);
|
||||||
|
|
||||||
uint rtw_remainder_len(struct pkt_file *pfile);
|
uint rtw_remainder_len(struct pkt_file *pfile);
|
||||||
void _rtw_open_pktfile(_pkt *pkt, struct pkt_file *pfile);
|
void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
|
||||||
uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen);
|
uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen);
|
||||||
sint rtw_endofpktfile (struct pkt_file *pfile);
|
sint rtw_endofpktfile (struct pkt_file *pfile);
|
||||||
|
|
||||||
void rtw_os_pkt_complete(struct adapter *padapter, _pkt *pkt);
|
void rtw_os_pkt_complete(struct adapter *padapter, struct sk_buff *pkt);
|
||||||
void rtw_os_xmit_complete(struct adapter *padapter, struct xmit_frame *pxframe);
|
void rtw_os_xmit_complete(struct adapter *padapter, struct xmit_frame *pxframe);
|
||||||
|
|
||||||
#endif //__XMIT_OSDEP_H_
|
#endif //__XMIT_OSDEP_H_
|
||||||
|
|
|
@ -1742,7 +1742,7 @@ exit:
|
||||||
|
|
||||||
void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool aborted)
|
void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool aborted)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
spin_lock_bh(&pwdev_priv->scan_req_lock);
|
spin_lock_bh(&pwdev_priv->scan_req_lock);
|
||||||
if(pwdev_priv->scan_request != NULL)
|
if(pwdev_priv->scan_request != NULL)
|
||||||
|
@ -1776,10 +1776,10 @@ void rtw_cfg80211_indicate_scan_done(struct rtw_wdev_priv *pwdev_priv, bool abor
|
||||||
|
|
||||||
void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)
|
void rtw_cfg80211_surveydone_event_callback(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
u32 cnt=0;
|
u32 cnt=0;
|
||||||
u32 wait_for_surveydone;
|
u32 wait_for_surveydone;
|
||||||
|
@ -1956,7 +1956,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
|
||||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||||
struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
|
struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
|
||||||
struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
|
struct rtw_ieee80211_channel ch[RTW_CHANNEL_SCAN_AMOUNT];
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u8 *wps_ie=NULL;
|
u8 *wps_ie=NULL;
|
||||||
uint wps_ielen=0;
|
uint wps_ielen=0;
|
||||||
u8 *p2p_ie=NULL;
|
u8 *p2p_ie=NULL;
|
||||||
|
@ -2522,8 +2522,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
struct cfg80211_connect_params *sme)
|
struct cfg80211_connect_params *sme)
|
||||||
{
|
{
|
||||||
int ret=0;
|
int ret=0;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead;
|
struct list_head *phead;
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||||
struct ndis_802_11_ssid ndis_ssid;
|
struct ndis_802_11_ssid ndis_ssid;
|
||||||
|
@ -2535,7 +2535,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
||||||
struct adapter *padapter = wiphy_to_adapter(wiphy);
|
struct adapter *padapter = wiphy_to_adapter(wiphy);
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||||
_queue *queue = &pmlmepriv->scanned_queue;
|
struct __queue *queue = &pmlmepriv->scanned_queue;
|
||||||
|
|
||||||
padapter->mlmepriv.not_indic_disco = true;
|
padapter->mlmepriv.not_indic_disco = true;
|
||||||
|
|
||||||
|
@ -3525,8 +3525,8 @@ static int cfg80211_rtw_del_station(struct wiphy *wiphy, struct net_device *ndev
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
int ret=0;
|
int ret=0;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
u8 updated;
|
u8 updated;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(ndev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(ndev);
|
||||||
|
|
|
@ -1377,14 +1377,14 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
||||||
union iwreq_data *awrq,
|
union iwreq_data *awrq,
|
||||||
char *extra)
|
char *extra)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
uint ret = 0;
|
uint ret = 0;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct sockaddr *temp = (struct sockaddr *)awrq;
|
struct sockaddr *temp = (struct sockaddr *)awrq;
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
_list *phead;
|
struct list_head *phead;
|
||||||
u8 *dst_bssid, *src_bssid;
|
u8 *dst_bssid, *src_bssid;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||||
|
|
||||||
|
@ -1530,7 +1530,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv= &padapter->mlmepriv;
|
||||||
struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
|
struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||||
#endif /* CONFIG_P2P */
|
#endif /* CONFIG_P2P */
|
||||||
|
@ -1719,11 +1719,11 @@ exit:
|
||||||
static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
||||||
union iwreq_data *wrqu, char *extra)
|
union iwreq_data *wrqu, char *extra)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
char *ev = extra;
|
char *ev = extra;
|
||||||
char *stop = ev + wrqu->data.length;
|
char *stop = ev + wrqu->data.length;
|
||||||
|
@ -1833,11 +1833,11 @@ static int rtw_wx_set_essid(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)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_queue *queue = &pmlmepriv->scanned_queue;
|
struct __queue *queue = &pmlmepriv->scanned_queue;
|
||||||
_list *phead;
|
struct list_head *phead;
|
||||||
s8 status = true;
|
s8 status = true;
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
enum NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||||
|
@ -3080,15 +3080,15 @@ static int rtw_get_ap_info(struct net_device *dev,
|
||||||
{
|
{
|
||||||
int bssid_match, ret = 0;
|
int bssid_match, ret = 0;
|
||||||
u32 cnt=0, wpa_ielen;
|
u32 cnt=0, wpa_ielen;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
unsigned char *pbuf;
|
unsigned char *pbuf;
|
||||||
u8 bssid[ETH_ALEN];
|
u8 bssid[ETH_ALEN];
|
||||||
char data[32];
|
char data[32];
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct iw_point *pdata = &wrqu->data;
|
struct iw_point *pdata = &wrqu->data;
|
||||||
|
|
||||||
DBG_871X("+rtw_get_aplist_info\n");
|
DBG_871X("+rtw_get_aplist_info\n");
|
||||||
|
@ -3705,9 +3705,9 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
u8 peerMAC[ETH_ALEN] = { 0x00 };
|
u8 peerMAC[ETH_ALEN] = { 0x00 };
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list * plist,*phead;
|
struct list_head *plist,*phead;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
u8 blnMatch = 0;
|
u8 blnMatch = 0;
|
||||||
__be16 be_attr_content = 0;
|
__be16 be_attr_content = 0;
|
||||||
|
@ -3839,9 +3839,9 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
u8 peerMAC[ETH_ALEN] = { 0x00 };
|
u8 peerMAC[ETH_ALEN] = { 0x00 };
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
u8 blnMatch = 0;
|
u8 blnMatch = 0;
|
||||||
u8 *p2pie;
|
u8 *p2pie;
|
||||||
|
@ -3929,9 +3929,9 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
u8 peerMAC[ETH_ALEN] = { 0x00 };
|
u8 peerMAC[ETH_ALEN] = { 0x00 };
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
u8 blnMatch = 0;
|
u8 blnMatch = 0;
|
||||||
u8 dev_type[8] = { 0x00 };
|
u8 dev_type[8] = { 0x00 };
|
||||||
|
@ -4004,9 +4004,9 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
u8 peerMAC[ETH_ALEN] = { 0x00 };
|
u8 peerMAC[ETH_ALEN] = { 0x00 };
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
u8 blnMatch = 0;
|
u8 blnMatch = 0;
|
||||||
u8 dev_name[WPS_MAX_DEVICE_NAME_LEN] = { 0x00 };
|
u8 dev_name[WPS_MAX_DEVICE_NAME_LEN] = { 0x00 };
|
||||||
|
@ -4075,9 +4075,9 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
u8 peerMAC[ETH_ALEN] = { 0x00 };
|
u8 peerMAC[ETH_ALEN] = { 0x00 };
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
u8 blnMatch = 0;
|
u8 blnMatch = 0;
|
||||||
u8 *p2pie;
|
u8 *p2pie;
|
||||||
|
@ -4161,9 +4161,9 @@ static int rtw_p2p_connect(struct net_device *dev,
|
||||||
int jj,kk;
|
int jj,kk;
|
||||||
u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 };
|
u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 };
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
uint uintPeerChannel = 0;
|
uint uintPeerChannel = 0;
|
||||||
|
|
||||||
|
@ -4256,14 +4256,14 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
||||||
int jj,kk;
|
int jj,kk;
|
||||||
u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 };
|
u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 };
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
uint uintPeerChannel = 0;
|
uint uintPeerChannel = 0;
|
||||||
u8 attr_content[50] = { 0x00 }, _status = 0;
|
u8 attr_content[50] = { 0x00 }, _status = 0;
|
||||||
u8 *p2pie;
|
u8 *p2pie;
|
||||||
uint p2pielen = 0, attr_contentlen = 0;
|
uint p2pielen = 0, attr_contentlen = 0;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct tx_invite_req_info* pinvite_req_info = &pwdinfo->invitereq_info;
|
struct tx_invite_req_info* pinvite_req_info = &pwdinfo->invitereq_info;
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
|
@ -4436,14 +4436,14 @@ static int rtw_p2p_set_persistent(struct net_device *dev,
|
||||||
int jj,kk;
|
int jj,kk;
|
||||||
u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 };
|
u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 };
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
uint uintPeerChannel = 0;
|
uint uintPeerChannel = 0;
|
||||||
u8 attr_content[50] = { 0x00 }, _status = 0;
|
u8 attr_content[50] = { 0x00 }, _status = 0;
|
||||||
u8 *p2pie;
|
u8 *p2pie;
|
||||||
uint p2pielen = 0, attr_contentlen = 0;
|
uint p2pielen = 0, attr_contentlen = 0;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct tx_invite_req_info* pinvite_req_info = &pwdinfo->invitereq_info;
|
struct tx_invite_req_info* pinvite_req_info = &pwdinfo->invitereq_info;
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
|
@ -4572,13 +4572,13 @@ static int rtw_p2p_set_pc(struct net_device *dev,
|
||||||
int jj,kk;
|
int jj,kk;
|
||||||
u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 };
|
u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 };
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
u8 attr_content[50] = { 0x00 }, _status = 0;
|
u8 attr_content[50] = { 0x00 }, _status = 0;
|
||||||
u8 *p2pie;
|
u8 *p2pie;
|
||||||
uint p2pielen = 0, attr_contentlen = 0;
|
uint p2pielen = 0, attr_contentlen = 0;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
uint uintPeerChannel = 0;
|
uint uintPeerChannel = 0;
|
||||||
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
|
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
|
||||||
|
|
||||||
|
@ -4869,14 +4869,14 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
||||||
int jj,kk;
|
int jj,kk;
|
||||||
u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 };
|
u8 peerMACStr[ ETH_ALEN * 2 ] = { 0x00 };
|
||||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
_queue *queue = &(pmlmepriv->scanned_queue);
|
struct __queue *queue = &(pmlmepriv->scanned_queue);
|
||||||
struct wlan_network *pnetwork = NULL;
|
struct wlan_network *pnetwork = NULL;
|
||||||
uint uintPeerChannel = 0;
|
uint uintPeerChannel = 0;
|
||||||
u8 attr_content[100] = { 0x00 }, _status = 0;
|
u8 attr_content[100] = { 0x00 }, _status = 0;
|
||||||
u8 *p2pie;
|
u8 *p2pie;
|
||||||
uint p2pielen = 0, attr_contentlen = 0;
|
uint p2pielen = 0, attr_contentlen = 0;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
u8 ie_offset;
|
u8 ie_offset;
|
||||||
|
|
||||||
#ifdef CONFIG_P2P
|
#ifdef CONFIG_P2P
|
||||||
|
@ -5505,7 +5505,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
||||||
struct iw_request_info *info,
|
struct iw_request_info *info,
|
||||||
union iwreq_data *wrqu, char *extra)
|
union iwreq_data *wrqu, char *extra)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
u8 major_cmd, minor_cmd;
|
u8 major_cmd, minor_cmd;
|
||||||
u16 arg;
|
u16 arg;
|
||||||
|
@ -5842,7 +5842,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
||||||
case 0x09:
|
case 0x09:
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
struct recv_reorder_ctrl *preorder_ctrl;
|
struct recv_reorder_ctrl *preorder_ctrl;
|
||||||
|
|
||||||
#ifdef CONFIG_AP_MODE
|
#ifdef CONFIG_AP_MODE
|
||||||
|
@ -5905,7 +5905,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
||||||
{
|
{
|
||||||
#ifdef DBG_TRX_STA_PKTS
|
#ifdef DBG_TRX_STA_PKTS
|
||||||
int i, j;
|
int i, j;
|
||||||
_list *plist, *phead;
|
struct list_head *plist, *phead;
|
||||||
|
|
||||||
spin_lock_bh(&pstapriv->sta_hash_lock);
|
spin_lock_bh(&pstapriv->sta_hash_lock);
|
||||||
|
|
||||||
|
@ -6796,12 +6796,8 @@ static int rtw_set_beacon(struct net_device *dev, struct ieee_param *param, int
|
||||||
|
|
||||||
static int rtw_hostapd_sta_flush(struct net_device *dev)
|
static int rtw_hostapd_sta_flush(struct net_device *dev)
|
||||||
{
|
{
|
||||||
/* _irqL irqL; */
|
|
||||||
/* _list *phead, *plist; */
|
|
||||||
int ret=0;
|
|
||||||
/* struct sta_info *psta = NULL; */
|
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
/* struct sta_priv *pstapriv = &padapter->stapriv; */
|
int ret=0;
|
||||||
|
|
||||||
DBG_871X("%s\n", __FUNCTION__);
|
DBG_871X("%s\n", __FUNCTION__);
|
||||||
|
|
||||||
|
@ -6815,7 +6811,7 @@ static int rtw_hostapd_sta_flush(struct net_device *dev)
|
||||||
|
|
||||||
static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
|
static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
int ret=0;
|
int ret=0;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
|
@ -6882,7 +6878,7 @@ static int rtw_add_sta(struct net_device *dev, struct ieee_param *param)
|
||||||
|
|
||||||
static int rtw_del_sta(struct net_device *dev, struct ieee_param *param)
|
static int rtw_del_sta(struct net_device *dev, struct ieee_param *param)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
int ret=0;
|
int ret=0;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||||
|
@ -8745,7 +8741,7 @@ static s32 createpseudoadhoc(struct adapter *padapter)
|
||||||
u8 *pibss;
|
u8 *pibss;
|
||||||
u8 ssid[] = "pseduo_ad-hoc";
|
u8 ssid[] = "pseduo_ad-hoc";
|
||||||
s32 err;
|
s32 err;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
|
|
||||||
pmlmepriv = &padapter->mlmepriv;
|
pmlmepriv = &padapter->mlmepriv;
|
||||||
|
@ -8811,7 +8807,7 @@ static struct xmit_frame* createloopbackpkt(struct adapter *padapter, u32 size)
|
||||||
u8 *pkt_start, *pkt_end, *ptr;
|
u8 *pkt_start, *pkt_end, *ptr;
|
||||||
struct rtw_ieee80211_hdr *hdr;
|
struct rtw_ieee80211_hdr *hdr;
|
||||||
s32 bmcast;
|
s32 bmcast;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
|
|
||||||
|
|
||||||
if ((TXDESC_SIZE + WLANHDR_OFFSET + size) > MAX_XMITBUF_SZ) return NULL;
|
if ((TXDESC_SIZE + WLANHDR_OFFSET + size) > MAX_XMITBUF_SZ) return NULL;
|
||||||
|
@ -8857,7 +8853,6 @@ static struct xmit_frame* createloopbackpkt(struct adapter *padapter, u32 size)
|
||||||
pattrib->subtype = WIFI_DATA;
|
pattrib->subtype = WIFI_DATA;
|
||||||
pattrib->priority = 0;
|
pattrib->priority = 0;
|
||||||
pattrib->qsel = pattrib->priority;
|
pattrib->qsel = pattrib->priority;
|
||||||
/* do_queue_select(padapter, pattrib); */
|
|
||||||
pattrib->nr_frags = 1;
|
pattrib->nr_frags = 1;
|
||||||
pattrib->encrypt = 0;
|
pattrib->encrypt = 0;
|
||||||
pattrib->bswenc = false;
|
pattrib->bswenc = false;
|
||||||
|
@ -9030,7 +9025,7 @@ static u8 pktcmp(struct adapter *padapter, u8 *txbuf, u32 txsz, u8 *rxbuf, u32 r
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
thread_return lbk_thread(thread_context context)
|
int lbk_thread(void * context)
|
||||||
{
|
{
|
||||||
s32 err;
|
s32 err;
|
||||||
struct adapter *padapter;
|
struct adapter *padapter;
|
||||||
|
|
|
@ -103,7 +103,7 @@ void rtw_reset_securitypriv( struct adapter *adapter )
|
||||||
u8 backupTKIPCountermeasure = 0x00;
|
u8 backupTKIPCountermeasure = 0x00;
|
||||||
u32 backupTKIPcountermeasure_time = 0;
|
u32 backupTKIPcountermeasure_time = 0;
|
||||||
/* add for CONFIG_IEEE80211W, none 11w also can use */
|
/* add for CONFIG_IEEE80211W, none 11w also can use */
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
|
struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
|
||||||
|
|
||||||
spin_lock_bh(&adapter->security_key_mutex);
|
spin_lock_bh(&adapter->security_key_mutex);
|
||||||
|
|
|
@ -228,7 +228,7 @@ MODULE_PARM_DESC(rtw_notch_filter, "0:Disable, 1:Enable, 2:Enable only for P2P")
|
||||||
module_param_named(debug, rtw_debug, int, 0444);
|
module_param_named(debug, rtw_debug, int, 0444);
|
||||||
MODULE_PARM_DESC(debug, "Set debug level (1-9) (default 1)");
|
MODULE_PARM_DESC(debug, "Set debug level (1-9) (default 1)");
|
||||||
|
|
||||||
static uint loadparam(struct adapter *padapter, _nic_hdl pnetdev);
|
static uint loadparam(struct adapter *padapter, struct net_device * pnetdev);
|
||||||
int _netdev_open(struct net_device *pnetdev);
|
int _netdev_open(struct net_device *pnetdev);
|
||||||
int netdev_open (struct net_device *pnetdev);
|
int netdev_open (struct net_device *pnetdev);
|
||||||
static int netdev_close (struct net_device *pnetdev);
|
static int netdev_close (struct net_device *pnetdev);
|
||||||
|
@ -251,7 +251,7 @@ void rtw_proc_remove_one(struct net_device *dev)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static uint loadparam( struct adapter *padapter, _nic_hdl pnetdev)
|
static uint loadparam( struct adapter *padapter, struct net_device * pnetdev)
|
||||||
{
|
{
|
||||||
|
|
||||||
uint status = _SUCCESS;
|
uint status = _SUCCESS;
|
||||||
|
|
|
@ -136,7 +136,7 @@ inline struct sk_buff *_rtw_skb_clone(struct sk_buff *skb)
|
||||||
return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
return skb_clone(skb, in_interrupt() ? GFP_ATOMIC : GFP_KERNEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int _rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb)
|
inline int _rtw_netif_rx(struct net_device * ndev, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
skb->dev = ndev;
|
skb->dev = ndev;
|
||||||
return netif_rx(skb);
|
return netif_rx(skb);
|
||||||
|
@ -474,7 +474,7 @@ inline struct sk_buff *dbg_rtw_skb_clone(struct sk_buff *skb, const enum mstat_f
|
||||||
return skb_cl;
|
return skb_cl;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline int dbg_rtw_netif_rx(_nic_hdl ndev, struct sk_buff *skb, const enum mstat_f flags, const char *func, int line)
|
inline int dbg_rtw_netif_rx(struct net_device * ndev, struct sk_buff *skb, const enum mstat_f flags, const char *func, int line)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int truesize = skb->truesize;
|
unsigned int truesize = skb->truesize;
|
||||||
|
@ -562,7 +562,7 @@ int _rtw_memcmp(void *dst, void *src, u32 sz)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_init_listhead(_list *list)
|
void _rtw_init_listhead(struct list_head *list)
|
||||||
{
|
{
|
||||||
INIT_LIST_HEAD(list);
|
INIT_LIST_HEAD(list);
|
||||||
}
|
}
|
||||||
|
@ -573,7 +573,7 @@ For the following list_xxx operations,
|
||||||
caller must guarantee the atomic context.
|
caller must guarantee the atomic context.
|
||||||
Otherwise, there will be racing condition.
|
Otherwise, there will be racing condition.
|
||||||
*/
|
*/
|
||||||
u32 rtw_is_list_empty(_list *phead)
|
u32 rtw_is_list_empty(struct list_head *phead)
|
||||||
{
|
{
|
||||||
if (list_empty(phead))
|
if (list_empty(phead))
|
||||||
return true;
|
return true;
|
||||||
|
@ -581,12 +581,12 @@ u32 rtw_is_list_empty(_list *phead)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_list_insert_head(_list *plist, _list *phead)
|
void rtw_list_insert_head(struct list_head *plist, struct list_head *phead)
|
||||||
{
|
{
|
||||||
list_add(plist, phead);
|
list_add(plist, phead);
|
||||||
}
|
}
|
||||||
|
|
||||||
void rtw_list_insert_tail(_list *plist, _list *phead)
|
void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead)
|
||||||
{
|
{
|
||||||
list_add_tail(plist, phead);
|
list_add_tail(plist, phead);
|
||||||
}
|
}
|
||||||
|
@ -599,21 +599,21 @@ Caller must check if the list is empty before calling rtw_list_delete
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
void _rtw_init_sema(_sema *sema, int init_val)
|
void _rtw_init_sema(struct semaphore *sema, int init_val)
|
||||||
{
|
{
|
||||||
sema_init(sema, init_val);
|
sema_init(sema, init_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_free_sema(_sema *sema)
|
void _rtw_free_sema(struct semaphore *sema)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_up_sema(_sema *sema)
|
void _rtw_up_sema(struct semaphore *sema)
|
||||||
{
|
{
|
||||||
up(sema);
|
up(sema);
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 _rtw_down_sema(_sema *sema)
|
u32 _rtw_down_sema(struct semaphore *sema)
|
||||||
{
|
{
|
||||||
if (down_interruptible(sema))
|
if (down_interruptible(sema))
|
||||||
return _FAIL;
|
return _FAIL;
|
||||||
|
@ -639,7 +639,7 @@ void _rtw_mutex_free(_mutex *pmutex)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_init_queue(_queue *pqueue)
|
void _rtw_init_queue(struct __queue *pqueue)
|
||||||
{
|
{
|
||||||
|
|
||||||
_rtw_init_listhead(&(pqueue->queue));
|
_rtw_init_listhead(&(pqueue->queue));
|
||||||
|
@ -648,13 +648,13 @@ void _rtw_init_queue(_queue *pqueue)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 _rtw_queue_empty(_queue *pqueue)
|
u32 _rtw_queue_empty(struct __queue *pqueue)
|
||||||
{
|
{
|
||||||
return (rtw_is_list_empty(&(pqueue->queue)));
|
return (rtw_is_list_empty(&(pqueue->queue)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
u32 rtw_end_of_queue_search(_list *head, _list *plist)
|
u32 rtw_end_of_queue_search(struct list_head *head, struct list_head *plist)
|
||||||
{
|
{
|
||||||
if (head == plist)
|
if (head == plist)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -158,7 +158,7 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter,u8 bgroup)
|
||||||
void rtw_hostapd_mlme_rx(struct adapter *padapter, union recv_frame *precv_frame)
|
void rtw_hostapd_mlme_rx(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
#ifdef CONFIG_HOSTAPD_MLME
|
#ifdef CONFIG_HOSTAPD_MLME
|
||||||
_pkt *skb;
|
struct sk_buff *skb;
|
||||||
struct hostapd_priv *phostapdpriv = padapter->phostapdpriv;
|
struct hostapd_priv *phostapdpriv = padapter->phostapdpriv;
|
||||||
struct net_device *pmgnt_netdev = phostapdpriv->pmgnt_netdev;
|
struct net_device *pmgnt_netdev = phostapdpriv->pmgnt_netdev;
|
||||||
|
|
||||||
|
@ -194,8 +194,8 @@ void rtw_hostapd_mlme_rx(struct adapter *padapter, union recv_frame *precv_frame
|
||||||
int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame)
|
int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame)
|
||||||
{
|
{
|
||||||
struct recv_priv *precvpriv;
|
struct recv_priv *precvpriv;
|
||||||
_queue *pfree_recv_queue;
|
struct __queue *pfree_recv_queue;
|
||||||
_pkt *skb;
|
struct sk_buff *skb;
|
||||||
struct mlme_priv*pmlmepriv = &padapter->mlmepriv;
|
struct mlme_priv*pmlmepriv = &padapter->mlmepriv;
|
||||||
#ifdef CONFIG_BR_EXT
|
#ifdef CONFIG_BR_EXT
|
||||||
void *br_port = NULL;
|
void *br_port = NULL;
|
||||||
|
@ -234,7 +234,7 @@ int rtw_recv_indicatepkt(struct adapter *padapter, union recv_frame *precv_frame
|
||||||
|
|
||||||
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true)
|
||||||
{
|
{
|
||||||
_pkt *pskb2=NULL;
|
struct sk_buff *pskb2=NULL;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
|
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
|
||||||
|
|
|
@ -215,7 +215,7 @@ static u32 usb_bulkout_zero(struct intf_hdl *pintfhdl, u32 addr)
|
||||||
u32 ret;
|
u32 ret;
|
||||||
unsigned char *pbuf;
|
unsigned char *pbuf;
|
||||||
struct zero_bulkout_context *pcontext;
|
struct zero_bulkout_context *pcontext;
|
||||||
PURB purb = NULL;
|
struct urb * purb = NULL;
|
||||||
struct adapter *padapter = (struct adapter *)pintfhdl->padapter;
|
struct adapter *padapter = (struct adapter *)pintfhdl->padapter;
|
||||||
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
|
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
|
||||||
struct usb_device *pusbd = pdvobj->pusbdev;
|
struct usb_device *pusbd = pdvobj->pusbdev;
|
||||||
|
@ -305,7 +305,7 @@ void usb_read_port_cancel(struct intf_hdl *pintfhdl)
|
||||||
|
|
||||||
static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
|
static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
int i;
|
int i;
|
||||||
struct xmit_buf *pxmitbuf = (struct xmit_buf *)purb->context;
|
struct xmit_buf *pxmitbuf = (struct xmit_buf *)purb->context;
|
||||||
/* struct xmit_frame *pxmitframe = (struct xmit_frame *)pxmitbuf->priv_data; */
|
/* struct xmit_frame *pxmitframe = (struct xmit_frame *)pxmitbuf->priv_data; */
|
||||||
|
@ -413,11 +413,11 @@ check_completion:
|
||||||
|
|
||||||
u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
|
u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
|
||||||
{
|
{
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
unsigned int pipe;
|
unsigned int pipe;
|
||||||
int status;
|
int status;
|
||||||
u32 ret = _FAIL, bwritezero = false;
|
u32 ret = _FAIL, bwritezero = false;
|
||||||
PURB purb = NULL;
|
struct urb *purb = NULL;
|
||||||
struct adapter *padapter = (struct adapter *)pintfhdl->padapter;
|
struct adapter *padapter = (struct adapter *)pintfhdl->padapter;
|
||||||
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
|
struct dvobj_priv *pdvobj = adapter_to_dvobj(padapter);
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
|
@ -426,8 +426,6 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
|
||||||
struct usb_device *pusbd = pdvobj->pusbdev;
|
struct usb_device *pusbd = pdvobj->pusbdev;
|
||||||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||||
|
|
||||||
;
|
|
||||||
|
|
||||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("+usb_write_port\n"));
|
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("+usb_write_port\n"));
|
||||||
|
|
||||||
if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) ||(dvobj_to_pwrctl(pdvobj)->pnp_bstop_trx)) {
|
if ((padapter->bDriverStopped) || (padapter->bSurpriseRemoved) ||(dvobj_to_pwrctl(pdvobj)->pnp_bstop_trx)) {
|
||||||
|
|
|
@ -36,7 +36,7 @@ uint rtw_remainder_len(struct pkt_file *pfile)
|
||||||
return (pfile->buf_len - ((SIZE_PTR)(pfile->cur_addr) - (SIZE_PTR)(pfile->buf_start)));
|
return (pfile->buf_len - ((SIZE_PTR)(pfile->cur_addr) - (SIZE_PTR)(pfile->buf_start)));
|
||||||
}
|
}
|
||||||
|
|
||||||
void _rtw_open_pktfile (_pkt *pktptr, struct pkt_file *pfile)
|
void _rtw_open_pktfile (struct sk_buff *pktptr, struct pkt_file *pfile)
|
||||||
{
|
{
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -120,7 +120,7 @@ void rtw_os_xmit_resource_free(struct adapter *padapter, struct xmit_buf *pxmitb
|
||||||
|
|
||||||
#define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5)
|
#define WMM_XMIT_THRESHOLD (NR_XMITFRAME*2/5)
|
||||||
|
|
||||||
void rtw_os_pkt_complete(struct adapter *padapter, _pkt *pkt)
|
void rtw_os_pkt_complete(struct adapter *padapter, struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||||
u16 queue;
|
u16 queue;
|
||||||
|
@ -157,7 +157,7 @@ void rtw_os_xmit_schedule(struct adapter *padapter)
|
||||||
{
|
{
|
||||||
struct adapter *pri_adapter = padapter;
|
struct adapter *pri_adapter = padapter;
|
||||||
|
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
struct xmit_priv *pxmitpriv;
|
struct xmit_priv *pxmitpriv;
|
||||||
|
|
||||||
if(!padapter)
|
if(!padapter)
|
||||||
|
@ -173,7 +173,7 @@ void rtw_os_xmit_schedule(struct adapter *padapter)
|
||||||
spin_unlock_bh(&pxmitpriv->lock);
|
spin_unlock_bh(&pxmitpriv->lock);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rtw_check_xmit_resource(struct adapter *padapter, _pkt *pkt)
|
static void rtw_check_xmit_resource(struct adapter *padapter, struct sk_buff *pkt)
|
||||||
{
|
{
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))
|
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))
|
||||||
|
@ -205,15 +205,14 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
|
||||||
{
|
{
|
||||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
_irqL irqL;
|
unsigned long irqL;
|
||||||
_list *phead, *plist;
|
struct list_head *phead, *plist;
|
||||||
struct sk_buff *newskb;
|
struct sk_buff *newskb;
|
||||||
struct sta_info *psta = NULL;
|
struct sta_info *psta = NULL;
|
||||||
u8 chk_alive_num = 0;
|
u8 chk_alive_num = 0;
|
||||||
char chk_alive_list[NUM_STA];
|
char chk_alive_list[NUM_STA];
|
||||||
u8 bc_addr[6]={0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
u8 bc_addr[6]={0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
|
||||||
u8 null_addr[6]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
u8 null_addr[6]={0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
s32 res;
|
s32 res;
|
||||||
|
|
||||||
|
@ -269,7 +268,7 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
int _rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
|
int _rtw_xmit_entry(struct sk_buff *pkt, struct net_device * pnetdev)
|
||||||
{
|
{
|
||||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
|
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
|
||||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||||
|
@ -332,7 +331,7 @@ exit:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int rtw_xmit_entry(_pkt *pkt, _nic_hdl pnetdev)
|
int rtw_xmit_entry(struct sk_buff *pkt, struct net_device * pnetdev)
|
||||||
{
|
{
|
||||||
if (pkt)
|
if (pkt)
|
||||||
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, pkt->truesize);
|
rtw_mstat_update(MSTAT_TYPE_SKB, MSTAT_ALLOC_SUCCESS, pkt->truesize);
|
||||||
|
|
Loading…
Reference in a new issue