mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-21 20:13:39 +00:00
rtl8188eu: Convert typedef statements from include/odm_HWConfig.h
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
a4a1896f86
commit
476eaf9a4e
25 changed files with 170 additions and 297 deletions
|
@ -96,7 +96,7 @@ static void update_BCNTIM(_adapter *padapter)
|
|||
if (p != NULL && tim_ielen>0) {
|
||||
tim_ielen += 2;
|
||||
premainder_ie = p+tim_ielen;
|
||||
tim_ie_offset = (sint)(p -pie);
|
||||
tim_ie_offset = (int)(p -pie);
|
||||
remainder_ielen = pnetwork_mlmeext->IELength - tim_ie_offset - tim_ielen;
|
||||
/* append TIM IE from dst_ie offset */
|
||||
dst_ie = p;
|
||||
|
@ -194,7 +194,7 @@ void rtw_add_bcn_ie(_adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 index
|
|||
|
||||
premainder_ie = p+ielen;
|
||||
|
||||
ie_offset = (sint)(p -pie);
|
||||
ie_offset = (int)(p -pie);
|
||||
|
||||
remainder_ielen = pnetwork->IELength - ie_offset - ielen;
|
||||
|
||||
|
@ -239,7 +239,7 @@ void rtw_remove_bcn_ie(_adapter *padapter, struct wlan_bssid_ex *pnetwork, u8 in
|
|||
|
||||
premainder_ie = p+ielen;
|
||||
|
||||
ie_offset = (sint)(p -pie);
|
||||
ie_offset = (int)(p -pie);
|
||||
|
||||
remainder_ielen = pnetwork->IELength - ie_offset - ielen;
|
||||
|
||||
|
|
|
@ -36,9 +36,9 @@ Caller and the rtw_cmd_thread can protect cmd_q by spin_lock.
|
|||
No irqsave is necessary.
|
||||
*/
|
||||
|
||||
sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv)
|
||||
int _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv)
|
||||
{
|
||||
sint res=_SUCCESS;
|
||||
int res=_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -83,9 +83,9 @@ _func_exit_;
|
|||
|
||||
static void c2h_wk_callback(struct work_struct *work);
|
||||
|
||||
sint _rtw_init_evt_priv(struct evt_priv *pevtpriv)
|
||||
int _rtw_init_evt_priv(struct evt_priv *pevtpriv)
|
||||
{
|
||||
sint res=_SUCCESS;
|
||||
int res=_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -154,7 +154,7 @@ ISR/Call-Back functions can't call this sub-function.
|
|||
|
||||
*/
|
||||
|
||||
sint _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
|
||||
int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
|
||||
{
|
||||
unsigned long irqL;
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *sourc
|
|||
u8 *rtw_set_ie
|
||||
(
|
||||
u8 *pbuf,
|
||||
sint index,
|
||||
int index,
|
||||
uint len,
|
||||
u8 *source,
|
||||
uint *frlen /* frame length */
|
||||
|
@ -224,9 +224,9 @@ inline u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl,
|
|||
/*----------------------------------------------------------------------------
|
||||
index: the information element id index, limit is the limit for search
|
||||
-----------------------------------------------------------------------------*/
|
||||
u8 *rtw_get_ie(u8 *pbuf, sint index, sint *len, sint limit)
|
||||
u8 *rtw_get_ie(u8 *pbuf, int index, int *len, int limit)
|
||||
{
|
||||
sint tmp,i;
|
||||
int tmp,i;
|
||||
u8 *p;
|
||||
_func_enter_;
|
||||
if (limit < 1){
|
||||
|
|
|
@ -590,7 +590,7 @@ _func_exit_;
|
|||
|
||||
u8 rtw_set_802_11_add_wep(_adapter* padapter, struct ndis_802_11_wep *wep){
|
||||
|
||||
sint keyid,res;
|
||||
int keyid,res;
|
||||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||
u8 ret=_SUCCESS;
|
||||
|
||||
|
|
|
@ -38,13 +38,13 @@ extern u8 rtw_do_join(_adapter * padapter);
|
|||
extern unsigned char MCS_rate_2R[16];
|
||||
extern unsigned char MCS_rate_1R[16];
|
||||
|
||||
sint _rtw_init_mlme_priv (_adapter* padapter)
|
||||
int _rtw_init_mlme_priv (_adapter* padapter)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
u8 *pbuf;
|
||||
struct wlan_network *pnetwork;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
sint res = _SUCCESS;
|
||||
int res = _SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -148,7 +148,7 @@ _func_enter_;
|
|||
_func_exit_;
|
||||
}
|
||||
|
||||
sint _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork)
|
||||
int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork)
|
||||
{
|
||||
unsigned long irqL;
|
||||
|
||||
|
@ -389,9 +389,9 @@ _func_exit_;
|
|||
|
||||
|
||||
|
||||
sint rtw_if_up(_adapter *padapter) {
|
||||
int rtw_if_up(_adapter *padapter) {
|
||||
|
||||
sint res;
|
||||
int res;
|
||||
_func_enter_;
|
||||
|
||||
if ( padapter->bDriverStopped || padapter->bSurpriseRemoved ||
|
||||
|
@ -2178,12 +2178,12 @@ _func_exit_;
|
|||
return ret;
|
||||
}
|
||||
|
||||
sint rtw_set_auth(_adapter * adapter,struct security_priv *psecuritypriv)
|
||||
int rtw_set_auth(_adapter * adapter,struct security_priv *psecuritypriv)
|
||||
{
|
||||
struct cmd_obj* pcmd;
|
||||
struct setauth_parm *psetauthparm;
|
||||
struct cmd_priv *pcmdpriv=&(adapter->cmdpriv);
|
||||
sint res=_SUCCESS;
|
||||
int res=_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -2225,14 +2225,14 @@ _func_exit_;
|
|||
}
|
||||
|
||||
|
||||
sint rtw_set_key(_adapter * adapter,struct security_priv *psecuritypriv,sint keyid, u8 set_tx)
|
||||
int rtw_set_key(_adapter * adapter, struct security_priv *psecuritypriv, int keyid, u8 set_tx)
|
||||
{
|
||||
u8 keylen;
|
||||
struct cmd_obj *pcmd;
|
||||
struct setkey_parm *psetkeyparm;
|
||||
struct cmd_priv *pcmdpriv = &(adapter->cmdpriv);
|
||||
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
|
||||
sint res=_SUCCESS;
|
||||
int res=_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -2418,7 +2418,8 @@ static int rtw_append_pmkid(_adapter *Adapter,int iEntry, u8 *ie, uint ie_len)
|
|||
return (ie_len);
|
||||
|
||||
}
|
||||
sint rtw_restruct_sec_ie(_adapter *adapter,u8 *in_ie, u8 *out_ie, uint in_len)
|
||||
|
||||
int rtw_restruct_sec_ie(_adapter *adapter,u8 *in_ie, u8 *out_ie, uint in_len)
|
||||
{
|
||||
u8 authmode, securitytype, match;
|
||||
u8 sec_ie[255], uncst_oui[4], bkup_ie[255];
|
||||
|
|
|
@ -5059,7 +5059,7 @@ s32 dump_mgntframe_and_wait_ack(_adapter *padapter, struct xmit_frame *pmgntfram
|
|||
static int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode)
|
||||
{
|
||||
u8 *ssid_ie;
|
||||
sint ssid_len_ori;
|
||||
int ssid_len_ori;
|
||||
int len_diff = 0;
|
||||
|
||||
ssid_ie = rtw_get_ie(ies, WLAN_EID_SSID, &ssid_len_ori, ies_len);
|
||||
|
|
|
@ -82,7 +82,7 @@ int ips_leave(_adapter * padapter)
|
|||
struct security_priv* psecuritypriv=&(padapter->securitypriv);
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
int result = _SUCCESS;
|
||||
sint keyid;
|
||||
int keyid;
|
||||
|
||||
|
||||
_enter_pwrlock(&pwrpriv->lock);
|
||||
|
|
187
core/rtw_recv.c
187
core/rtw_recv.c
|
@ -48,13 +48,13 @@ _func_exit_;
|
|||
|
||||
}
|
||||
|
||||
sint _rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter)
|
||||
int _rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
|
||||
union recv_frame *precvframe;
|
||||
|
||||
sint res=_SUCCESS;
|
||||
int res=_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
_rtw_spinlock_init(&precvpriv->lock);
|
||||
|
@ -239,7 +239,7 @@ _func_exit_;
|
|||
|
||||
|
||||
|
||||
sint _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue)
|
||||
int _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue)
|
||||
{
|
||||
|
||||
_adapter *padapter=precvframe->u.hdr.adapter;
|
||||
|
@ -260,9 +260,9 @@ _func_exit_;
|
|||
return _SUCCESS;
|
||||
}
|
||||
|
||||
sint rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue)
|
||||
int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue)
|
||||
{
|
||||
sint ret;
|
||||
int ret;
|
||||
unsigned long irqL;
|
||||
|
||||
_enter_critical_bh(&queue->lock, &irqL);
|
||||
|
@ -320,7 +320,7 @@ u32 rtw_free_uc_swdec_pending_queue(_adapter *adapter)
|
|||
}
|
||||
|
||||
|
||||
sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue)
|
||||
int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue)
|
||||
{
|
||||
unsigned long irqL;
|
||||
|
||||
|
@ -334,7 +334,7 @@ sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queu
|
|||
return _SUCCESS;
|
||||
}
|
||||
|
||||
sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
|
||||
int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue)
|
||||
{
|
||||
unsigned long irqL;
|
||||
_enter_critical_ex(&queue->lock, &irqL);
|
||||
|
@ -376,10 +376,9 @@ struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue)
|
|||
|
||||
}
|
||||
|
||||
sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe);
|
||||
sint recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe){
|
||||
int recvframe_chkmic(_adapter *adapter, union recv_frame *precvframe){
|
||||
|
||||
sint i,res=_SUCCESS;
|
||||
int i,res=_SUCCESS;
|
||||
u32 datalen;
|
||||
u8 miccode[8];
|
||||
u8 bmic_err=false,brpt_micerror = true;
|
||||
|
@ -673,10 +672,9 @@ _func_exit_;
|
|||
|
||||
}
|
||||
|
||||
sint recv_decache(union recv_frame *precv_frame, u8 bretry, struct stainfo_rxcache *prxcache);
|
||||
sint recv_decache(union recv_frame *precv_frame, u8 bretry, struct stainfo_rxcache *prxcache)
|
||||
int recv_decache(union recv_frame *precv_frame, u8 bretry, struct stainfo_rxcache *prxcache)
|
||||
{
|
||||
sint tid = precv_frame->u.hdr.attrib.priority;
|
||||
int tid = precv_frame->u.hdr.attrib.priority;
|
||||
|
||||
u16 seq_ctrl = ( (precv_frame->u.hdr.attrib.seq_num&0xffff) << 4) |
|
||||
(precv_frame->u.hdr.attrib.frag_num & 0xf);
|
||||
|
@ -849,26 +847,26 @@ void count_rx_stats(_adapter *padapter, union recv_frame *prframe, struct sta_in
|
|||
|
||||
}
|
||||
|
||||
sint sta2sta_data_frame(
|
||||
int sta2sta_data_frame(
|
||||
_adapter *adapter,
|
||||
union recv_frame *precv_frame,
|
||||
struct sta_info**psta
|
||||
);
|
||||
sint sta2sta_data_frame(
|
||||
int sta2sta_data_frame(
|
||||
_adapter *adapter,
|
||||
union recv_frame *precv_frame,
|
||||
struct sta_info**psta
|
||||
)
|
||||
{
|
||||
u8 *ptr = precv_frame->u.hdr.rx_data;
|
||||
sint ret = _SUCCESS;
|
||||
int ret = _SUCCESS;
|
||||
struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
u8 *mybssid = get_bssid(pmlmepriv);
|
||||
u8 *myhwaddr = myid(&adapter->eeprompriv);
|
||||
u8 * sta_addr = NULL;
|
||||
sint bmcast = IS_MCAST(pattrib->dst);
|
||||
int bmcast = IS_MCAST(pattrib->dst);
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -971,23 +969,19 @@ _func_exit_;
|
|||
|
||||
}
|
||||
|
||||
sint ap2sta_data_frame(
|
||||
_adapter *adapter,
|
||||
union recv_frame *precv_frame,
|
||||
struct sta_info**psta );
|
||||
sint ap2sta_data_frame(
|
||||
int ap2sta_data_frame(
|
||||
_adapter *adapter,
|
||||
union recv_frame *precv_frame,
|
||||
struct sta_info**psta )
|
||||
{
|
||||
u8 *ptr = precv_frame->u.hdr.rx_data;
|
||||
struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib;
|
||||
sint ret = _SUCCESS;
|
||||
int ret = _SUCCESS;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
u8 *mybssid = get_bssid(pmlmepriv);
|
||||
u8 *myhwaddr = myid(&adapter->eeprompriv);
|
||||
sint bmcast = IS_MCAST(pattrib->dst);
|
||||
int bmcast = IS_MCAST(pattrib->dst);
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -1107,11 +1101,7 @@ _func_exit_;
|
|||
|
||||
}
|
||||
|
||||
sint sta2ap_data_frame(
|
||||
_adapter *adapter,
|
||||
union recv_frame *precv_frame,
|
||||
struct sta_info**psta );
|
||||
sint sta2ap_data_frame(
|
||||
int sta2ap_data_frame(
|
||||
_adapter *adapter,
|
||||
union recv_frame *precv_frame,
|
||||
struct sta_info**psta )
|
||||
|
@ -1121,7 +1111,7 @@ sint sta2ap_data_frame(
|
|||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
unsigned char *mybssid = get_bssid(pmlmepriv);
|
||||
sint ret=_SUCCESS;
|
||||
int ret=_SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -1179,8 +1169,7 @@ _func_exit_;
|
|||
|
||||
}
|
||||
|
||||
sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame);
|
||||
sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||
int validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
||||
{
|
||||
#ifdef CONFIG_AP_MODE
|
||||
struct rx_pkt_attrib *pattrib = &precv_frame->u.hdr.attrib;
|
||||
|
@ -1339,8 +1328,8 @@ sint validate_recv_ctrl_frame(_adapter *padapter, union recv_frame *precv_frame)
|
|||
}
|
||||
|
||||
union recv_frame* recvframe_chk_defrag(PADAPTER padapter, union recv_frame *precv_frame);
|
||||
sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame);
|
||||
sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
||||
|
||||
int validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
||||
{
|
||||
/* struct mlme_priv *pmlmepriv = &adapter->mlmepriv; */
|
||||
|
||||
|
@ -1378,7 +1367,7 @@ sint validate_recv_mgnt_frame(PADAPTER padapter, union recv_frame *precv_frame)
|
|||
return _SUCCESS;
|
||||
}
|
||||
|
||||
sint validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame)
|
||||
int validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame)
|
||||
{
|
||||
u8 bretry;
|
||||
u8 *psa, *pda, *pbssid;
|
||||
|
@ -1387,7 +1376,7 @@ sint validate_recv_data_frame(_adapter *adapter, union recv_frame *precv_frame)
|
|||
struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib;
|
||||
struct sta_priv *pstapriv = &adapter->stapriv;
|
||||
struct security_priv *psecuritypriv = &adapter->securitypriv;
|
||||
sint ret = _SUCCESS;
|
||||
int ret = _SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -1518,8 +1507,7 @@ _func_exit_;
|
|||
return ret;
|
||||
}
|
||||
|
||||
sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame);
|
||||
sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame)
|
||||
int validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame)
|
||||
{
|
||||
/* shall check frame subtype, to / from ds, da, bssid */
|
||||
|
||||
|
@ -1527,7 +1515,7 @@ sint validate_recv_frame(_adapter *adapter, union recv_frame *precv_frame)
|
|||
|
||||
u8 type;
|
||||
u8 subtype;
|
||||
sint retval = _SUCCESS;
|
||||
int retval = _SUCCESS;
|
||||
|
||||
struct rx_pkt_attrib *pattrib = & precv_frame->u.hdr.attrib;
|
||||
|
||||
|
@ -1643,19 +1631,17 @@ _func_exit_;
|
|||
|
||||
|
||||
/* remove the wlanhdr and add the eth_hdr */
|
||||
#if 1
|
||||
|
||||
sint wlanhdr_to_ethhdr ( union recv_frame *precvframe);
|
||||
sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
||||
int wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
||||
{
|
||||
sint rmv_len;
|
||||
int rmv_len;
|
||||
u16 eth_type, len;
|
||||
__be16 be_tmp;
|
||||
u8 bsnaphdr;
|
||||
u8 *psnap_type;
|
||||
struct ieee80211_snap_hdr *psnap;
|
||||
|
||||
sint ret=_SUCCESS;
|
||||
int ret=_SUCCESS;
|
||||
_adapter *adapter =precvframe->u.hdr.adapter;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
|
||||
|
@ -1721,117 +1707,6 @@ _func_exit_;
|
|||
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
sint wlanhdr_to_ethhdr ( union recv_frame *precvframe)
|
||||
{
|
||||
sint rmv_len;
|
||||
u16 eth_type;
|
||||
u8 bsnaphdr;
|
||||
u8 *psnap_type;
|
||||
struct ieee80211_snap_hdr *psnap;
|
||||
__be16 be_tmp;
|
||||
sint ret=_SUCCESS;
|
||||
_adapter *adapter =precvframe->u.hdr.adapter;
|
||||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
u8 *ptr = get_recvframe_data(precvframe); /* point to frame_ctrl field */
|
||||
struct rx_pkt_attrib *pattrib = & precvframe->u.hdr.attrib;
|
||||
struct _vlan *pvlan = NULL;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
psnap=(struct ieee80211_snap_hdr *)(ptr+pattrib->hdrlen + pattrib->iv_len);
|
||||
psnap_type=ptr+pattrib->hdrlen + pattrib->iv_len+SNAP_SIZE;
|
||||
if (psnap->dsap==0xaa && psnap->ssap==0xaa && psnap->ctrl==0x03)
|
||||
{
|
||||
if (_rtw_memcmp(psnap->oui, oui_rfc1042, WLAN_IEEE_OUI_LEN))
|
||||
bsnaphdr=true;/* wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_RFC1042; */
|
||||
else if (_rtw_memcmp(psnap->oui, SNAP_HDR_APPLETALK_DDP, WLAN_IEEE_OUI_LEN) &&
|
||||
_rtw_memcmp(psnap_type, SNAP_ETH_TYPE_APPLETALK_DDP, 2) )
|
||||
bsnaphdr=true; /* wlan_pkt_format = WLAN_PKT_FORMAT_APPLETALK; */
|
||||
else if (_rtw_memcmp( psnap->oui, oui_8021h, WLAN_IEEE_OUI_LEN))
|
||||
bsnaphdr=true; /* wlan_pkt_format = WLAN_PKT_FORMAT_SNAP_TUNNEL; */
|
||||
else {
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,("drop pkt due to invalid frame format!\n"));
|
||||
ret= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
} else
|
||||
bsnaphdr=false;/* wlan_pkt_format = WLAN_PKT_FORMAT_OTHERS; */
|
||||
|
||||
rmv_len = pattrib->hdrlen + pattrib->iv_len +(bsnaphdr?SNAP_SIZE:0);
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("===pattrib->hdrlen: %x, pattrib->iv_len:%x ===\n", pattrib->hdrlen, pattrib->iv_len));
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_MP_STATE) == true)
|
||||
{
|
||||
ptr += rmv_len ;
|
||||
*ptr = 0x87;
|
||||
*(ptr+1) = 0x12;
|
||||
|
||||
/* back to original pointer */
|
||||
ptr -= rmv_len;
|
||||
}
|
||||
|
||||
ptr += rmv_len ;
|
||||
|
||||
_rtw_memcpy(&be_tmp, ptr, 2);
|
||||
eth_type= ntohs(be_tmp); /* pattrib->ether_type */
|
||||
ptr +=2;
|
||||
|
||||
if (pattrib->encrypt){
|
||||
recvframe_pull_tail(precvframe, pattrib->icv_len);
|
||||
}
|
||||
|
||||
if (eth_type == 0x8100) /* vlan */
|
||||
{
|
||||
pvlan = (struct _vlan *) ptr;
|
||||
|
||||
rmv_len += 4;
|
||||
ptr+=4;
|
||||
}
|
||||
|
||||
if (eth_type==0x0800)/* ip */
|
||||
{
|
||||
/* struct iphdr* piphdr = (struct iphdr*) ptr; */
|
||||
/* __u8 tos = (unsigned char)(pattrib->priority & 0xff); */
|
||||
|
||||
/* piphdr->tos = tos; */
|
||||
|
||||
/* if (piphdr->protocol == 0x06) */
|
||||
/* */
|
||||
/* RT_TRACE(_module_rtl871x_recv_c_,_drv_info_,("@@@===recv tcp len:%d @@@===\n", precvframe->u.hdr.len)); */
|
||||
/* */
|
||||
}
|
||||
else if (eth_type==0x8712)/* append rx status for mp test packets */
|
||||
{
|
||||
/* ptr -= 16; */
|
||||
/* _rtw_memcpy(ptr, get_rxmem(precvframe), 16); */
|
||||
}
|
||||
|
||||
if (eth_type==0x8712)/* append rx status for mp test packets */
|
||||
{
|
||||
ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr)+2)-24);
|
||||
_rtw_memcpy(ptr, get_rxmem(precvframe), 24);
|
||||
ptr+=24;
|
||||
}
|
||||
else
|
||||
ptr = recvframe_pull(precvframe, (rmv_len-sizeof(struct ethhdr)+2));
|
||||
|
||||
_rtw_memcpy(ptr, pattrib->dst, ETH_ALEN);
|
||||
_rtw_memcpy(ptr+ETH_ALEN, pattrib->src, ETH_ALEN);
|
||||
|
||||
eth_type = htons((unsigned short)eth_type) ;
|
||||
_rtw_memcpy(ptr+12, ð_type, 2);
|
||||
|
||||
exit:
|
||||
|
||||
_func_exit_;
|
||||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* perform defrag */
|
||||
union recv_frame *recvframe_defrag(_adapter *adapter, struct __queue *defrag_q)
|
||||
{
|
||||
|
|
|
@ -97,7 +97,7 @@ _func_enter_;
|
|||
_func_exit_;
|
||||
}
|
||||
|
||||
static sint bcrc32initialized = 0;
|
||||
static int bcrc32initialized = 0;
|
||||
static u32 crc32_table[256];
|
||||
|
||||
|
||||
|
@ -112,7 +112,7 @@ _func_enter_;
|
|||
if (bcrc32initialized == 1)
|
||||
goto exit;
|
||||
else{
|
||||
sint i, j;
|
||||
int i, j;
|
||||
u32 c;
|
||||
u8 *p=(u8 *)&c, *p1;
|
||||
u8 k;
|
||||
|
@ -138,7 +138,7 @@ exit:
|
|||
_func_exit_;
|
||||
}
|
||||
|
||||
static __le32 getcrc32(u8 *buf, sint len)
|
||||
static __le32 getcrc32(u8 *buf, int len)
|
||||
{
|
||||
u8 *p;
|
||||
u32 crc;
|
||||
|
@ -164,7 +164,7 @@ void rtw_wep_encrypt(_adapter *padapter, u8 *pxmitframe)
|
|||
unsigned char crc[4];
|
||||
struct arc4context mycontext;
|
||||
|
||||
sint curfragnum,length;
|
||||
int curfragnum,length;
|
||||
u32 keylength;
|
||||
|
||||
u8 *pframe, *payload,*iv; /* wepkey */
|
||||
|
@ -235,7 +235,7 @@ void rtw_wep_decrypt(_adapter *padapter, u8 *precvframe)
|
|||
/* exclude ICV */
|
||||
u8 crc[4];
|
||||
struct arc4context mycontext;
|
||||
sint length;
|
||||
int length;
|
||||
u32 keylength;
|
||||
u8 *pframe, *payload,*iv,wepkey[16];
|
||||
u8 keyindex;
|
||||
|
@ -540,7 +540,7 @@ static const unsigned short Sbox1[2][256]= /* Sbox for hash (can be in ROM
|
|||
*/
|
||||
static void phase1(u16 *p1k,const u8 *tk,const u8 *ta,u32 iv32)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
_func_enter_;
|
||||
/* Initialize the 80 bits of P1K[] from IV32 and TA[0..5] */
|
||||
p1k[0] = Lo16(iv32);
|
||||
|
@ -589,7 +589,7 @@ _func_exit_;
|
|||
*/
|
||||
static void phase2(u8 *rc4key,const u8 *tk,const u16 *p1k,u16 iv16)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
u16 PPK[6]; /* temporary key for mixing */
|
||||
_func_enter_;
|
||||
/* Note: all adds in the PPK[] equations below are mod 2**16 */
|
||||
|
@ -643,7 +643,7 @@ u32 rtw_tkip_encrypt(_adapter *padapter, u8 *pxmitframe)
|
|||
u8 crc[4];
|
||||
u8 hw_hdr_offset = 0;
|
||||
struct arc4context mycontext;
|
||||
sint curfragnum,length;
|
||||
int curfragnum,length;
|
||||
|
||||
u8 *pframe, *payload,*iv,*prwskey;
|
||||
union pn48 dot11txpn;
|
||||
|
@ -745,7 +745,7 @@ u32 rtw_tkip_decrypt(_adapter *padapter, u8 *precvframe)
|
|||
u8 ttkey[16];
|
||||
u8 crc[4];
|
||||
struct arc4context mycontext;
|
||||
sint length;
|
||||
int length;
|
||||
|
||||
u8 *pframe, *payload,*iv,*prwskey;
|
||||
union pn48 dot11txpn;
|
||||
|
@ -874,38 +874,38 @@ exit:
|
|||
static void bitwise_xor(u8 *ina, u8 *inb, u8 *out);
|
||||
static void construct_mic_iv(
|
||||
u8 *mic_header1,
|
||||
sint qc_exists,
|
||||
sint a4_exists,
|
||||
int qc_exists,
|
||||
int a4_exists,
|
||||
u8 *mpdu,
|
||||
uint payload_length,
|
||||
u8 * pn_vector);
|
||||
static void construct_mic_header1(
|
||||
u8 *mic_header1,
|
||||
sint header_length,
|
||||
int header_length,
|
||||
u8 *mpdu);
|
||||
static void construct_mic_header2(
|
||||
u8 *mic_header2,
|
||||
u8 *mpdu,
|
||||
sint a4_exists,
|
||||
sint qc_exists);
|
||||
int a4_exists,
|
||||
int qc_exists);
|
||||
static void construct_ctr_preload(
|
||||
u8 *ctr_preload,
|
||||
sint a4_exists,
|
||||
sint qc_exists,
|
||||
int a4_exists,
|
||||
int qc_exists,
|
||||
u8 *mpdu,
|
||||
u8 *pn_vector,
|
||||
sint c);
|
||||
int c);
|
||||
static void xor_128(u8 *a, u8 *b, u8 *out);
|
||||
static void xor_32(u8 *a, u8 *b, u8 *out);
|
||||
static u8 sbox(u8 a);
|
||||
static void next_key(u8 *key, sint round);
|
||||
static void next_key(u8 *key, int round);
|
||||
static void byte_sub(u8 *in, u8 *out);
|
||||
static void shift_row(u8 *in, u8 *out);
|
||||
static void mix_column(u8 *in, u8 *out);
|
||||
static void add_round_key( u8 *shiftrow_in,
|
||||
u8 *mcol_in,
|
||||
u8 *block_in,
|
||||
sint round,
|
||||
int round,
|
||||
u8 *out);
|
||||
static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext);
|
||||
|
||||
|
@ -917,7 +917,7 @@ static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext);
|
|||
/****************************************/
|
||||
static void xor_128(u8 *a, u8 *b, u8 *out)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
_func_enter_;
|
||||
for (i=0;i<16; i++)
|
||||
{
|
||||
|
@ -929,7 +929,7 @@ _func_exit_;
|
|||
|
||||
static void xor_32(u8 *a, u8 *b, u8 *out)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
_func_enter_;
|
||||
for (i=0;i<4; i++)
|
||||
{
|
||||
|
@ -941,11 +941,11 @@ _func_exit_;
|
|||
|
||||
static u8 sbox(u8 a)
|
||||
{
|
||||
return sbox_table[(sint)a];
|
||||
return sbox_table[(int)a];
|
||||
}
|
||||
|
||||
|
||||
static void next_key(u8 *key, sint round)
|
||||
static void next_key(u8 *key, int round)
|
||||
{
|
||||
u8 rcon;
|
||||
u8 sbox_key[4];
|
||||
|
@ -974,7 +974,7 @@ _func_exit_;
|
|||
|
||||
static void byte_sub(u8 *in, u8 *out)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
_func_enter_;
|
||||
for (i=0; i< 16; i++)
|
||||
{
|
||||
|
@ -1009,7 +1009,7 @@ _func_exit_;
|
|||
|
||||
static void mix_column(u8 *in, u8 *out)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
u8 add1b[4];
|
||||
u8 add1bf7[4];
|
||||
u8 rotl[4];
|
||||
|
@ -1072,8 +1072,8 @@ _func_exit_;
|
|||
|
||||
static void aes128k128d(u8 *key, u8 *data, u8 *ciphertext)
|
||||
{
|
||||
sint round;
|
||||
sint i;
|
||||
int round;
|
||||
int i;
|
||||
u8 intermediatea[16];
|
||||
u8 intermediateb[16];
|
||||
u8 round_key[16];
|
||||
|
@ -1115,14 +1115,14 @@ _func_exit_;
|
|||
/************************************************/
|
||||
static void construct_mic_iv(
|
||||
u8 *mic_iv,
|
||||
sint qc_exists,
|
||||
sint a4_exists,
|
||||
int qc_exists,
|
||||
int a4_exists,
|
||||
u8 *mpdu,
|
||||
uint payload_length,
|
||||
u8 *pn_vector
|
||||
)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
_func_enter_;
|
||||
mic_iv[0] = 0x59;
|
||||
if (qc_exists && a4_exists) mic_iv[1] = mpdu[30] & 0x0f; /* QoS_TC */
|
||||
|
@ -1145,7 +1145,7 @@ _func_exit_;
|
|||
/************************************************/
|
||||
static void construct_mic_header1(
|
||||
u8 *mic_header1,
|
||||
sint header_length,
|
||||
int header_length,
|
||||
u8 *mpdu
|
||||
)
|
||||
{
|
||||
|
@ -1178,11 +1178,11 @@ _func_exit_;
|
|||
static void construct_mic_header2(
|
||||
u8 *mic_header2,
|
||||
u8 *mpdu,
|
||||
sint a4_exists,
|
||||
sint qc_exists
|
||||
int a4_exists,
|
||||
int qc_exists
|
||||
)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
_func_enter_;
|
||||
for (i = 0; i<16; i++) mic_header2[i]=0x00;
|
||||
|
||||
|
@ -1228,14 +1228,14 @@ _func_exit_;
|
|||
/************************************************/
|
||||
static void construct_ctr_preload(
|
||||
u8 *ctr_preload,
|
||||
sint a4_exists,
|
||||
sint qc_exists,
|
||||
int a4_exists,
|
||||
int qc_exists,
|
||||
u8 *mpdu,
|
||||
u8 *pn_vector,
|
||||
sint c
|
||||
int c
|
||||
)
|
||||
{
|
||||
sint i = 0;
|
||||
int i = 0;
|
||||
_func_enter_;
|
||||
for (i=0; i<16; i++) ctr_preload[i] = 0x00;
|
||||
i = 0;
|
||||
|
@ -1261,7 +1261,7 @@ _func_exit_;
|
|||
/************************************/
|
||||
static void bitwise_xor(u8 *ina, u8 *inb, u8 *out)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
_func_enter_;
|
||||
for (i=0; i<16; i++)
|
||||
out[i] = ina[i] ^ inb[i];
|
||||
|
@ -1269,7 +1269,7 @@ _func_exit_;
|
|||
}
|
||||
|
||||
|
||||
static sint aes_cipher(u8 *key, uint hdrlen,
|
||||
static int aes_cipher(u8 *key, uint hdrlen,
|
||||
u8 *pframe, uint plen)
|
||||
{
|
||||
uint qc_exists, a4_exists, i, j, payload_remainder,
|
||||
|
@ -1470,7 +1470,7 @@ u32 rtw_aes_encrypt(_adapter *padapter, u8 *pxmitframe)
|
|||
/* unsigned char message[MAX_MSG_SIZE]; */
|
||||
|
||||
/* Intermediate Buffers */
|
||||
sint curfragnum,length;
|
||||
int curfragnum,length;
|
||||
u8 *pframe,*prwskey; /* *payload,*iv */
|
||||
u8 hw_hdr_offset = 0;
|
||||
struct sta_info *stainfo;
|
||||
|
@ -1545,13 +1545,13 @@ _func_exit_;
|
|||
return res;
|
||||
}
|
||||
|
||||
static sint aes_decipher(u8 *key, uint hdrlen,
|
||||
static int aes_decipher(u8 *key, uint hdrlen,
|
||||
u8 *pframe, uint plen)
|
||||
{
|
||||
static u8 message[MAX_MSG_SIZE];
|
||||
uint qc_exists, a4_exists, i, j, payload_remainder,
|
||||
num_blocks, payload_index;
|
||||
sint res = _SUCCESS;
|
||||
int res = _SUCCESS;
|
||||
u8 pn_vector[6];
|
||||
u8 mic_iv[16];
|
||||
u8 mic_header1[16];
|
||||
|
@ -1823,7 +1823,7 @@ u32 rtw_aes_decrypt(_adapter *padapter, u8 *precvframe)
|
|||
/* Intermediate Buffers */
|
||||
|
||||
|
||||
sint length;
|
||||
int length;
|
||||
u8 *pframe,*prwskey; /* *payload,*iv */
|
||||
struct sta_info *stainfo;
|
||||
struct rx_pkt_attrib *prxattrib = &((union recv_frame *)precvframe)->u.hdr.attrib;
|
||||
|
|
|
@ -70,7 +70,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter)
|
|||
int i;
|
||||
struct xmit_buf *pxmitbuf;
|
||||
struct xmit_frame *pxframe;
|
||||
sint res=_SUCCESS;
|
||||
int res=_SUCCESS;
|
||||
u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ;
|
||||
u32 num_xmit_extbuf = NR_XMIT_EXTBUFF;
|
||||
|
||||
|
@ -540,12 +540,12 @@ static s32 update_attrib(_adapter *padapter, struct sk_buff *pkt, struct pkt_att
|
|||
struct sta_info *psta = NULL;
|
||||
struct ethhdr etherhdr;
|
||||
|
||||
sint bmcast;
|
||||
int bmcast;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct security_priv *psecuritypriv = &padapter->securitypriv;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
struct qos_priv *pqospriv= &pmlmepriv->qospriv;
|
||||
sint res = _SUCCESS;
|
||||
int res = _SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -764,7 +764,7 @@ _func_exit_;
|
|||
}
|
||||
|
||||
static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe){
|
||||
sint curfragnum,length;
|
||||
int curfragnum,length;
|
||||
u8 *pframe, *payload,mic[8];
|
||||
struct mic_data micdata;
|
||||
struct sta_info *stainfo;
|
||||
|
@ -774,7 +774,7 @@ static s32 xmitframe_addmic(_adapter *padapter, struct xmit_frame *pxmitframe){
|
|||
struct xmit_priv *pxmitpriv=&padapter->xmitpriv;
|
||||
u8 priority[4]={0x0,0x0,0x0,0x0};
|
||||
u8 hw_hdr_offset = 0;
|
||||
sint bmcst = IS_MCAST(pattrib->ra);
|
||||
int bmcst = IS_MCAST(pattrib->ra);
|
||||
|
||||
if (pattrib->psta)
|
||||
{
|
||||
|
@ -936,12 +936,12 @@ s32 rtw_make_wlanhdr (_adapter *padapter , u8 *hdr, struct pkt_attrib *pattrib)
|
|||
struct qos_priv *pqospriv = &pmlmepriv->qospriv;
|
||||
u8 qos_option = false;
|
||||
|
||||
sint res = _SUCCESS;
|
||||
int res = _SUCCESS;
|
||||
u16 *fctrl = &pwlanhdr->frame_ctl;
|
||||
|
||||
struct sta_info *psta;
|
||||
|
||||
sint bmcst = IS_MCAST(pattrib->ra);
|
||||
int bmcst = IS_MCAST(pattrib->ra);
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -1369,7 +1369,7 @@ void rtw_update_protection(_adapter *padapter, u8 *ie, uint ie_len)
|
|||
|
||||
uint protection;
|
||||
u8 *perp;
|
||||
sint erp_len;
|
||||
int erp_len;
|
||||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
struct registry_priv *pregistrypriv = &padapter->registrypriv;
|
||||
|
||||
|
@ -1768,7 +1768,7 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
|
|||
return pxmitframe;
|
||||
}
|
||||
|
||||
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, int entry)
|
||||
{
|
||||
unsigned long irqL0;
|
||||
struct list_head *sta_plist, *sta_phead;
|
||||
|
@ -1831,7 +1831,7 @@ _func_exit_;
|
|||
}
|
||||
|
||||
#if 1
|
||||
struct tx_servq *rtw_get_sta_pending(_adapter *padapter, struct sta_info *psta, sint up, u8 *ac)
|
||||
struct tx_servq *rtw_get_sta_pending(_adapter *padapter, struct sta_info *psta, int up, u8 *ac)
|
||||
{
|
||||
struct tx_servq *ptxservq;
|
||||
|
||||
|
@ -1876,7 +1876,7 @@ _func_exit_;
|
|||
}
|
||||
#else
|
||||
__inline static struct tx_servq *rtw_get_sta_pending
|
||||
(_adapter *padapter, struct __queue **ppstapending, struct sta_info *psta, sint up)
|
||||
(_adapter *padapter, struct __queue **ppstapending, struct sta_info *psta, int up)
|
||||
{
|
||||
struct tx_servq *ptxservq;
|
||||
struct hw_xmit *phwxmits = padapter->xmitpriv.hwxmits;
|
||||
|
@ -1935,7 +1935,7 @@ s32 rtw_xmit_classifier(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct hw_xmit *phwxmits = padapter->xmitpriv.hwxmits;
|
||||
sint res = _SUCCESS;
|
||||
int res = _SUCCESS;
|
||||
|
||||
_func_enter_;
|
||||
|
||||
|
@ -2039,9 +2039,9 @@ void rtw_free_hwxmits(_adapter *padapter)
|
|||
rtw_mfree((u8 *)hwxmits, (sizeof (struct hw_xmit) * pxmitpriv->hwxmit_entry));
|
||||
}
|
||||
|
||||
void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry)
|
||||
void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry)
|
||||
{
|
||||
sint i;
|
||||
int i;
|
||||
_func_enter_;
|
||||
for (i = 0; i < entry; i++, phwxmit++)
|
||||
phwxmit->accnt = 0;
|
||||
|
@ -2316,15 +2316,15 @@ s32 rtw_xmit(_adapter *padapter, struct sk_buff **ppkt)
|
|||
|
||||
#if defined(CONFIG_AP_MODE)
|
||||
|
||||
sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
int xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe)
|
||||
{
|
||||
unsigned long irqL;
|
||||
sint ret=false;
|
||||
int ret=false;
|
||||
struct sta_info *psta=NULL;
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
sint bmcst = IS_MCAST(pattrib->ra);
|
||||
int bmcst = IS_MCAST(pattrib->ra);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_AP_STATE) == false)
|
||||
return ret;
|
||||
|
|
|
@ -203,7 +203,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
|
|||
struct tx_desc *ptxdesc = (struct tx_desc *)pmem;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
sint bmcst = IS_MCAST(pattrib->ra);
|
||||
int bmcst = IS_MCAST(pattrib->ra);
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||
|
|
|
@ -27,8 +27,6 @@
|
|||
#define NDIS_OID uint
|
||||
#define NDIS_STATUS uint
|
||||
|
||||
typedef signed int sint;
|
||||
|
||||
#define UCHAR u8
|
||||
#define USHORT u16
|
||||
#define UINT u32
|
||||
|
|
|
@ -23,11 +23,11 @@
|
|||
#include <osdep_service.h>
|
||||
#include <drv_types.h>
|
||||
|
||||
extern sint _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv);
|
||||
extern sint _rtw_init_evt_priv(struct evt_priv *pevtpriv);
|
||||
extern int _rtw_init_cmd_priv (struct cmd_priv *pcmdpriv);
|
||||
extern int _rtw_init_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 sint _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj);
|
||||
extern int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj);
|
||||
extern struct cmd_obj *_rtw_dequeue_cmd(struct __queue *queue);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1204,7 +1204,7 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
|
|||
int show_errors);
|
||||
|
||||
u8 *rtw_set_fixed_ie(unsigned char *pbuf, unsigned int len, unsigned char *source, unsigned int *frlen);
|
||||
u8 *rtw_set_ie(u8 *pbuf, sint index, uint len, u8 *source, uint *frlen);
|
||||
u8 *rtw_set_ie(u8 *pbuf, int index, uint len, u8 *source, uint *frlen);
|
||||
|
||||
enum secondary_ch_offset {
|
||||
SCN = 0, /* no secondary channel */
|
||||
|
@ -1217,7 +1217,7 @@ u8 *rtw_set_ie_ch_switch (u8 *buf, u32 *buf_len, u8 ch_switch_mode, u8 new_ch, u
|
|||
u8 *rtw_set_ie_secondary_ch_offset(u8 *buf, u32 *buf_len, u8 secondary_ch_offset);
|
||||
u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl, u8 flags, u16 reason, u16 precedence);
|
||||
|
||||
u8 *rtw_get_ie(u8*pbuf, sint index, sint *len, sint limit);
|
||||
u8 *rtw_get_ie(u8*pbuf, int index, int *len, int limit);
|
||||
u8 *rtw_get_ie_ex(u8 *in_ie, uint in_len, u8 eid, u8 *oui, u8 oui_len, u8 *ie, uint *ielen);
|
||||
int rtw_ies_remove_ie(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u8 oui_len);
|
||||
|
||||
|
|
|
@ -114,8 +114,8 @@ struct phy_status_rpt {
|
|||
#endif
|
||||
};
|
||||
|
||||
typedef struct _Phy_Status_Rpt_8195
|
||||
{
|
||||
#if 0
|
||||
struct phy_status_rpt_8195 {
|
||||
struct phy_rx_agc_info path_agc[2];
|
||||
u1Byte ch_num[2];
|
||||
u1Byte cck_sig_qual_ofdm_pwdb_all;
|
||||
|
@ -142,8 +142,8 @@ typedef struct _Phy_Status_Rpt_8195
|
|||
u1Byte antidx_antb:3;
|
||||
u1Byte antidx_anta:3;
|
||||
#endif
|
||||
} PHY_STATUS_RPT_8195_T,*pPHY_STATUS_RPT_8195_T;
|
||||
|
||||
};
|
||||
#endif
|
||||
|
||||
void
|
||||
odm_Init_RSSIForDM(
|
||||
|
|
|
@ -414,7 +414,7 @@ __inline static void flush_signals_thread(void)
|
|||
flush_signals(current);
|
||||
}
|
||||
|
||||
__inline static int res_to_status(sint res)
|
||||
__inline static int res_to_status(int res)
|
||||
{
|
||||
return res;
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#include <drv_types.h>
|
||||
|
||||
|
||||
extern sint _rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter);
|
||||
extern int _rtw_init_recv_priv(struct recv_priv *precvpriv, _adapter *padapter);
|
||||
extern void _rtw_free_recv_priv (struct recv_priv *precvpriv);
|
||||
|
||||
|
||||
|
|
|
@ -237,8 +237,7 @@ Command-Event Mode
|
|||
#define RTW_SSID_SCAN_AMOUNT 9 // for WEXT_CSCAN_AMOUNT 9
|
||||
#define RTW_CHANNEL_SCAN_AMOUNT (14+37)
|
||||
struct sitesurvey_parm {
|
||||
sint scan_mode; //active: 1, passive: 0
|
||||
/* sint bsslimit; // 1 ~ 48 */
|
||||
int scan_mode; //active: 1, passive: 0
|
||||
u8 ssid_num;
|
||||
u8 ch_num;
|
||||
struct ndis_802_11_ssid ssid[RTW_SSID_SCAN_AMOUNT];
|
||||
|
|
|
@ -112,7 +112,7 @@ SHALL not lock up more than one locks at a time!
|
|||
struct sitesurvey_ctrl {
|
||||
u64 last_tx_pkts;
|
||||
uint last_rx_pkts;
|
||||
sint traffic_busy;
|
||||
int traffic_busy;
|
||||
struct timer_list sitesurvey_ctrl_timer;
|
||||
};
|
||||
|
||||
|
@ -290,7 +290,7 @@ struct tdls_info{
|
|||
struct mlme_priv {
|
||||
|
||||
spinlock_t lock;
|
||||
sint fw_state; //shall we protect this variable? maybe not necessarily...
|
||||
int fw_state; //shall we protect this variable? maybe not necessarily...
|
||||
u8 bScanInProcess;
|
||||
u8 to_join; //flag
|
||||
u8 to_roaming; // roaming trying times
|
||||
|
@ -447,9 +447,9 @@ extern void _rtw_scan_timeout_handler(void* FunctionContext);
|
|||
extern void rtw_free_network_queue(_adapter *adapter,u8 isfreeall);
|
||||
extern int rtw_init_mlme_priv(_adapter *adapter);// (struct mlme_priv *pmlmepriv);
|
||||
extern void rtw_free_mlme_priv (struct mlme_priv *pmlmepriv);
|
||||
extern sint rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv);
|
||||
extern sint rtw_set_key(_adapter *adapter,struct security_priv *psecuritypriv,sint keyid, u8 set_tx);
|
||||
extern sint rtw_set_auth(_adapter *adapter,struct security_priv *psecuritypriv);
|
||||
extern int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv);
|
||||
extern int rtw_set_key(_adapter *adapter, struct security_priv *psecuritypriv, int keyid, u8 set_tx);
|
||||
extern int rtw_set_auth(_adapter *adapter, struct security_priv *psecuritypriv);
|
||||
|
||||
__inline static u8 *get_bssid(struct mlme_priv *pmlmepriv)
|
||||
{ //if sta_mode:pmlmepriv->cur_network.network.MacAddress=> bssid
|
||||
|
@ -457,7 +457,7 @@ __inline static u8 *get_bssid(struct mlme_priv *pmlmepriv)
|
|||
return pmlmepriv->cur_network.network.MacAddress;
|
||||
}
|
||||
|
||||
__inline static sint check_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
||||
__inline static int check_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
if (pmlmepriv->fw_state & state)
|
||||
return true;
|
||||
|
@ -465,7 +465,7 @@ __inline static sint check_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
|||
return false;
|
||||
}
|
||||
|
||||
__inline static sint get_fwstate(struct mlme_priv *pmlmepriv)
|
||||
__inline static int get_fwstate(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
return pmlmepriv->fw_state;
|
||||
}
|
||||
|
@ -477,7 +477,7 @@ __inline static sint get_fwstate(struct mlme_priv *pmlmepriv)
|
|||
* ### NOTE:#### (!!!!)
|
||||
* MUST TAKE CARE THAT BEFORE CALLING THIS FUNC, YOU SHOULD HAVE LOCKED pmlmepriv->lock
|
||||
*/
|
||||
__inline static void set_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
||||
__inline static void set_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
pmlmepriv->fw_state |= state;
|
||||
//FOR HW integration
|
||||
|
@ -486,7 +486,7 @@ __inline static void set_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, int state)
|
||||
{
|
||||
pmlmepriv->fw_state &= ~state;
|
||||
//FOR HW integration
|
||||
|
@ -499,7 +499,7 @@ __inline static void _clr_fwstate_(struct mlme_priv *pmlmepriv, sint state)
|
|||
* No Limit on the calling context,
|
||||
* therefore set it to be the critical section...
|
||||
*/
|
||||
__inline static void clr_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
||||
__inline static void clr_fwstate(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
unsigned long irqL;
|
||||
|
||||
|
@ -509,7 +509,7 @@ __inline static void clr_fwstate(struct mlme_priv *pmlmepriv, sint state)
|
|||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
}
|
||||
|
||||
__inline static void clr_fwstate_ex(struct mlme_priv *pmlmepriv, sint state)
|
||||
__inline static void clr_fwstate_ex(struct mlme_priv *pmlmepriv, int state)
|
||||
{
|
||||
unsigned long irqL;
|
||||
|
||||
|
@ -536,7 +536,7 @@ __inline static void down_scanned_network(struct mlme_priv *pmlmepriv)
|
|||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
}
|
||||
|
||||
__inline static void set_scanned_network_val(struct mlme_priv *pmlmepriv, sint val)
|
||||
__inline static void set_scanned_network_val(struct mlme_priv *pmlmepriv, int val)
|
||||
{
|
||||
unsigned long irqL;
|
||||
|
||||
|
@ -597,7 +597,7 @@ extern struct wlan_network* _rtw_find_network(struct __queue *scanned_queue, u8
|
|||
|
||||
extern void _rtw_free_network_queue(_adapter* padapter, u8 isfreeall);
|
||||
|
||||
extern sint rtw_if_up(_adapter *padapter);
|
||||
extern int rtw_if_up(_adapter *padapter);
|
||||
|
||||
|
||||
u8 *rtw_get_capability_from_ie(u8 *ie);
|
||||
|
|
|
@ -120,8 +120,8 @@ struct mp_xmit_frame
|
|||
u32 sz[8];
|
||||
struct urb * pxmit_urb[8];
|
||||
u8 bpending[8];
|
||||
sint ac_tag[8];
|
||||
sint last[8];
|
||||
int ac_tag[8];
|
||||
int last[8];
|
||||
uint irpcnt;
|
||||
uint fragcnt;
|
||||
uint mem[(MAX_MP_XMITBUF_SZ >> 2)];
|
||||
|
|
|
@ -244,7 +244,7 @@ struct recv_priv
|
|||
struct sta_recv_priv {
|
||||
|
||||
spinlock_t lock;
|
||||
sint option;
|
||||
int option;
|
||||
struct __queue defrag_q; //keeping the fragment frame until defrag
|
||||
struct stainfo_rxcache rxcache;
|
||||
};
|
||||
|
@ -348,8 +348,8 @@ extern int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *q
|
|||
extern void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue);
|
||||
u32 rtw_free_uc_swdec_pending_queue(_adapter *adapter);
|
||||
|
||||
sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue);
|
||||
sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
|
||||
int rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue);
|
||||
int rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
|
||||
struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue);
|
||||
|
||||
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
|
||||
|
@ -381,7 +381,7 @@ __inline static u8 *get_recvframe_data(union recv_frame *precvframe)
|
|||
|
||||
}
|
||||
|
||||
__inline static u8 *recvframe_push(union recv_frame *precvframe, sint sz)
|
||||
__inline static u8 *recvframe_push(union recv_frame *precvframe, int sz)
|
||||
{
|
||||
// append data before rx_data
|
||||
|
||||
|
@ -409,7 +409,7 @@ __inline static u8 *recvframe_push(union recv_frame *precvframe, sint sz)
|
|||
}
|
||||
|
||||
|
||||
__inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
|
||||
__inline static u8 *recvframe_pull(union recv_frame *precvframe, int sz)
|
||||
{
|
||||
// rx_data += sz; move rx_data sz bytes hereafter
|
||||
|
||||
|
@ -434,7 +434,7 @@ __inline static u8 *recvframe_pull(union recv_frame *precvframe, sint sz)
|
|||
|
||||
}
|
||||
|
||||
__inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz)
|
||||
__inline static u8 *recvframe_put(union recv_frame *precvframe, int sz)
|
||||
{
|
||||
//used for append sz bytes from ptr to rx_tail, update rx_tail and return the updated rx_tail to the caller
|
||||
//after putting, rx_tail must be still larger than rx_end.
|
||||
|
@ -452,7 +452,7 @@ __inline static u8 *recvframe_put(union recv_frame *precvframe, sint sz)
|
|||
return precvframe->u.hdr.rx_tail;
|
||||
}
|
||||
|
||||
__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, sint sz)
|
||||
__inline static u8 *recvframe_pull_tail(union recv_frame *precvframe, int sz)
|
||||
{
|
||||
// rmv data from rx_tail (by yitsen)
|
||||
|
||||
|
@ -529,7 +529,7 @@ __inline static u8 *pkt_to_recvdata(struct sk_buff *pkt)
|
|||
}
|
||||
|
||||
|
||||
__inline static sint get_recvframe_len(union recv_frame *precvframe)
|
||||
__inline static int get_recvframe_len(union recv_frame *precvframe)
|
||||
{
|
||||
return precvframe->u.hdr.len;
|
||||
}
|
||||
|
|
|
@ -222,7 +222,7 @@ struct xmit_buf
|
|||
struct urb *pxmit_urb[8];
|
||||
dma_addr_t dma_transfer_addr; /* (in) dma addr for transfer_buffer */
|
||||
u8 bpending[8];
|
||||
sint last[8];
|
||||
int last[8];
|
||||
};
|
||||
|
||||
struct xmit_frame
|
||||
|
@ -250,8 +250,8 @@ struct tx_servq {
|
|||
struct sta_xmit_priv
|
||||
{
|
||||
spinlock_t lock;
|
||||
sint option;
|
||||
sint apsd_setting; //When bit mask is on, the associated edca queue supports APSD.
|
||||
int option;
|
||||
int apsd_setting; //When bit mask is on, the associated edca queue supports APSD.
|
||||
|
||||
|
||||
//struct tx_servq blk_q[MAX_NUMBLKS];
|
||||
|
@ -267,14 +267,14 @@ struct sta_xmit_priv
|
|||
|
||||
|
||||
struct hw_txqueue {
|
||||
volatile sint head;
|
||||
volatile sint tail;
|
||||
volatile sint free_sz; //in units of 64 bytes
|
||||
volatile sint free_cmdsz;
|
||||
volatile sint txsz[8];
|
||||
volatile int head;
|
||||
volatile int tail;
|
||||
volatile int free_sz; //in units of 64 bytes
|
||||
volatile int free_cmdsz;
|
||||
volatile int txsz[8];
|
||||
uint ff_hwaddr;
|
||||
uint cmd_hwaddr;
|
||||
sint ac_tag;
|
||||
int ac_tag;
|
||||
};
|
||||
|
||||
struct agg_pkt_info{
|
||||
|
@ -358,9 +358,9 @@ extern s32 rtw_put_snap(u8 *data, u16 h_proto);
|
|||
extern struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv);
|
||||
extern s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitframe);
|
||||
extern void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pframequeue);
|
||||
struct tx_servq *rtw_get_sta_pending(_adapter *padapter, struct sta_info *psta, sint up, u8 *ac);
|
||||
struct tx_servq *rtw_get_sta_pending(_adapter *padapter, struct sta_info *psta, int up, u8 *ac);
|
||||
extern s32 rtw_xmitframe_enqueue(_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, int entry);
|
||||
|
||||
extern s32 rtw_xmit_classifier(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
extern u32 rtw_calculate_wlan_pkt_size_by_attribue(struct pkt_attrib *pattrib);
|
||||
|
@ -372,7 +372,7 @@ void _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv);
|
|||
|
||||
s32 rtw_txframes_pending(_adapter *padapter);
|
||||
s32 rtw_txframes_sta_ac_pending(_adapter *padapter, struct pkt_attrib *pattrib);
|
||||
void rtw_init_hwxmits(struct hw_xmit *phwxmit, sint entry);
|
||||
void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry);
|
||||
|
||||
|
||||
s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, _adapter *padapter);
|
||||
|
@ -386,7 +386,7 @@ void rtw_free_hwxmits(_adapter *padapter);
|
|||
s32 rtw_xmit(_adapter *padapter, struct sk_buff **pkt);
|
||||
|
||||
#if defined(CONFIG_AP_MODE)
|
||||
sint xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
int xmitframe_enqueue_for_sleeping_sta(_adapter *padapter, struct xmit_frame *pxmitframe);
|
||||
void stop_sta_xmit(_adapter *padapter, struct sta_info *psta);
|
||||
void wakeup_sta_to_xmit(_adapter *padapter, struct sta_info *psta);
|
||||
void xmit_delivery_enabled_frames(_adapter *padapter, struct sta_info *psta);
|
||||
|
|
|
@ -58,7 +58,7 @@ extern void rtw_set_tx_chksum_offload(struct sk_buff *pkt, struct pkt_attrib *pa
|
|||
extern uint rtw_remainder_len(struct pkt_file *pfile);
|
||||
extern void _rtw_open_pktfile(struct sk_buff *pkt, struct pkt_file *pfile);
|
||||
extern uint _rtw_pktfile_read (struct pkt_file *pfile, u8 *rmem, uint rlen);
|
||||
extern sint rtw_endofpktfile (struct pkt_file *pfile);
|
||||
extern int rtw_endofpktfile (struct pkt_file *pfile);
|
||||
|
||||
extern void rtw_os_pkt_complete(_adapter *padapter, struct sk_buff *pkt);
|
||||
extern void rtw_os_xmit_complete(_adapter *padapter, struct xmit_frame *pxframe);
|
||||
|
|
|
@ -1767,7 +1767,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
u32 ret = 0;
|
||||
u32 cnt=0;
|
||||
u32 wait_for_surveydone;
|
||||
sint wait_status;
|
||||
int wait_status;
|
||||
#ifdef CONFIG_P2P
|
||||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||
#endif //CONFIG_P2P
|
||||
|
|
|
@ -69,7 +69,7 @@ _func_exit_;
|
|||
return len;
|
||||
}
|
||||
|
||||
sint rtw_endofpktfile(struct pkt_file *pfile)
|
||||
int rtw_endofpktfile(struct pkt_file *pfile)
|
||||
{
|
||||
_func_enter_;
|
||||
|
||||
|
|
Loading…
Reference in a new issue