mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-09 14:53:05 +00:00
rtl8188eu: Fix some sparse warnings
The driver did not work on PowerPC, which is big endian. This patch fixes all the sparse warnings concerning improper use of __le16 and __le32 variables. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
77e8b5de91
commit
7c7f632ac7
25 changed files with 502 additions and 684 deletions
133
core/rtw_p2p.c
133
core/rtw_p2p.c
|
@ -25,7 +25,7 @@
|
|||
|
||||
#ifdef CONFIG_P2P
|
||||
|
||||
int rtw_p2p_is_channel_list_ok( u8 desired_ch, u8* ch_list, u8 ch_cnt )
|
||||
static int rtw_p2p_is_channel_list_ok( u8 desired_ch, u8* ch_list, u8 ch_cnt )
|
||||
{
|
||||
int found = 0, i = 0;
|
||||
|
||||
|
@ -40,7 +40,7 @@ int rtw_p2p_is_channel_list_ok( u8 desired_ch, u8* ch_list, u8 ch_cnt )
|
|||
return( found );
|
||||
}
|
||||
|
||||
int is_any_client_associated(struct adapter *padapter)
|
||||
static int is_any_client_associated(struct adapter *padapter)
|
||||
{
|
||||
return padapter->stapriv.asoc_list_cnt ? true : false;
|
||||
}
|
||||
|
@ -152,12 +152,12 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
|
|||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
__le16 *fctrl;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
unsigned char category = RTW_WLAN_CATEGORY_P2P;//P2P action frame
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_GO_DISC_REQUEST;
|
||||
u8 dialogToken=0;
|
||||
|
||||
|
@ -211,14 +211,14 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
|
|||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
__le16 *fctrl;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
||||
u8 action = P2P_PUB_ACTION_ACTION;
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_DEVDISC_RESP;
|
||||
u8 action = P2P_PUB_ACTION_ACTION;
|
||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_DEVDISC_RESP;
|
||||
u8 p2pie[8] = { 0x00 };
|
||||
u32 p2pielen = 0;
|
||||
|
||||
|
@ -285,7 +285,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8* raddr,
|
|||
unsigned char category = RTW_WLAN_CATEGORY_PUBLIC;
|
||||
u8 action = P2P_PUB_ACTION_ACTION;
|
||||
u8 dialogToken = frame_body[7]; // The Dialog Token of provisioning discovery request frame.
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_PROVISION_DISC_RESP;
|
||||
u8 wpsie[ 100 ] = { 0x00 };
|
||||
u8 wpsielen = 0;
|
||||
|
@ -297,7 +297,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8* raddr,
|
|||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
__le16 *fctrl;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
@ -381,12 +381,12 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
|
|||
struct pkt_attrib *pattrib;
|
||||
unsigned char *pframe;
|
||||
struct rtw_ieee80211_hdr *pwlanhdr;
|
||||
unsigned short *fctrl;
|
||||
__le16 *fctrl;
|
||||
struct adapter *padapter = pwdinfo->padapter;
|
||||
struct xmit_priv *pxmitpriv = &(padapter->xmitpriv);
|
||||
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
|
||||
unsigned char category = RTW_WLAN_CATEGORY_P2P;//P2P action frame
|
||||
u32 p2poui = cpu_to_be32(P2POUI);
|
||||
__be32 p2poui = cpu_to_be32(P2POUI);
|
||||
u8 oui_subtype = P2P_PRESENCE_RESPONSE;
|
||||
u8 p2pie[ MAX_P2P_IE_LEN] = { 0x00 };
|
||||
u8 noa_attr_content[32] = { 0x00 };
|
||||
|
@ -464,7 +464,7 @@ u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
u8 p2pie[ MAX_P2P_IE_LEN] = { 0x00 };
|
||||
u16 capability=0;
|
||||
u32 len=0, p2pielen = 0;
|
||||
|
||||
__le16 le_tmp;
|
||||
|
||||
// P2P OUI
|
||||
p2pielen = 0;
|
||||
|
@ -492,28 +492,14 @@ u32 build_beacon_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
|
|||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_PROVISIONING_ING))
|
||||
capability |= (P2P_GRPCAP_GROUP_FORMATION<<8);
|
||||
|
||||
capability = cpu_to_le16(capability);
|
||||
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_CAPABILITY, 2, (u8*)&capability);
|
||||
le_tmp = cpu_to_le16(capability);
|
||||
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_CAPABILITY, 2, (u8*)&le_tmp);
|
||||
|
||||
// P2P Device ID ATTR
|
||||
p2pielen += rtw_set_p2p_attr_content(&p2pie[p2pielen], P2P_ATTR_DEVICE_ID, ETH_ALEN, pwdinfo->device_addr);
|
||||
|
||||
|
||||
// Notice of Absence ATTR
|
||||
// Type:
|
||||
// Length:
|
||||
// Value:
|
||||
|
||||
//go_add_noa_attr(pwdinfo);
|
||||
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, p2pielen, (unsigned char *) p2pie, &len);
|
||||
|
||||
|
||||
return len;
|
||||
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
|
@ -2369,6 +2355,8 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
u32 ies_len;
|
||||
u8 * p2p_ie;
|
||||
u32 p2p_ielen = 0;
|
||||
__le16 le_tmp;
|
||||
__be16 be_tmp;
|
||||
|
||||
if(!rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
|
||||
return P2P_STATUS_FAIL_REQUEST_UNABLE;
|
||||
|
@ -2401,10 +2389,10 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
while ( p2p_ie )
|
||||
{
|
||||
//Check P2P Capability ATTR
|
||||
if( rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&cap_attr, (uint*) &attr_contentlen) )
|
||||
if( rtw_get_p2p_attr_content( p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&le_tmp, (uint*) &attr_contentlen) )
|
||||
{
|
||||
DBG_8192C( "[%s] Got P2P Capability Attr!!\n", __FUNCTION__ );
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
cap_attr = le16_to_cpu(le_tmp);
|
||||
psta->dev_cap = cap_attr&0xff;
|
||||
}
|
||||
|
||||
|
@ -2416,20 +2404,18 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
{
|
||||
DBG_8192C( "[%s] Got P2P DEVICE INFO Attr!!\n", __FUNCTION__ );
|
||||
pattr_content = pbuf = rtw_zmalloc(attr_contentlen);
|
||||
if(pattr_content)
|
||||
{
|
||||
if(pattr_content) {
|
||||
u8 num_of_secdev_type;
|
||||
u16 dev_name_len;
|
||||
|
||||
|
||||
rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO , pattr_content, (uint*)&attr_contentlen);
|
||||
|
||||
_rtw_memcpy(psta->dev_addr, pattr_content, ETH_ALEN);//P2P Device Address
|
||||
|
||||
pattr_content += ETH_ALEN;
|
||||
|
||||
_rtw_memcpy(&psta->config_methods, pattr_content, 2);//Config Methods
|
||||
psta->config_methods = be16_to_cpu(psta->config_methods);
|
||||
memcpy(&be_tmp, pattr_content, 2);//Config Methods
|
||||
psta->config_methods = be16_to_cpu(be_tmp);
|
||||
|
||||
pattr_content += 2;
|
||||
|
||||
|
@ -2460,9 +2446,9 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
|
||||
//dev_name_len = attr_contentlen - ETH_ALEN - 2 - 8 - 1 - (num_of_secdev_type*8);
|
||||
psta->dev_name_len=0;
|
||||
if(WPS_ATTR_DEVICE_NAME == be16_to_cpu(*(u16*)pattr_content))
|
||||
if(WPS_ATTR_DEVICE_NAME == be16_to_cpu(*(__be16*)pattr_content))
|
||||
{
|
||||
dev_name_len = be16_to_cpu(*(u16*)(pattr_content+2));
|
||||
dev_name_len = be16_to_cpu(*(__be16*)(pattr_content+2));
|
||||
|
||||
psta->dev_name_len = (sizeof(psta->dev_name)<dev_name_len) ? sizeof(psta->dev_name):dev_name_len;
|
||||
|
||||
|
@ -2584,15 +2570,15 @@ u8 process_p2p_provdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
|
|||
u8 *wpsie;
|
||||
uint wps_ielen = 0, attr_contentlen = 0;
|
||||
u16 uconfig_method = 0;
|
||||
|
||||
__be16 be_tmp;
|
||||
|
||||
frame_body = (pframe + sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
|
||||
if ( (wpsie=rtw_get_wps_ie( frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen)) )
|
||||
{
|
||||
if ( rtw_get_wps_attr_content( wpsie, wps_ielen, WPS_ATTR_CONF_METHOD , ( u8* ) &uconfig_method, &attr_contentlen) )
|
||||
if ( rtw_get_wps_attr_content( wpsie, wps_ielen, WPS_ATTR_CONF_METHOD , ( u8 *)&be_tmp, &attr_contentlen) )
|
||||
{
|
||||
uconfig_method = be16_to_cpu( uconfig_method );
|
||||
uconfig_method = be16_to_cpu(be_tmp);
|
||||
switch( uconfig_method )
|
||||
{
|
||||
case WPS_CM_DISPLYA:
|
||||
|
@ -2630,7 +2616,7 @@ u8 process_p2p_provdisc_resp(struct wifidirect_info *pwdinfo, u8 *pframe)
|
|||
return true;
|
||||
}
|
||||
|
||||
u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8 ch_cnt, u8 *peer_ch_list)
|
||||
static u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8 ch_cnt, u8 *peer_ch_list)
|
||||
{
|
||||
u8 i = 0, j = 0;
|
||||
u8 temp = 0;
|
||||
|
@ -2655,7 +2641,7 @@ u8 rtw_p2p_get_peer_ch_list(struct wifidirect_info *pwdinfo, u8 *ch_content, u8
|
|||
return ch_no;
|
||||
}
|
||||
|
||||
u8 rtw_p2p_check_peer_oper_ch(struct mlme_ext_priv *pmlmeext, u8 ch)
|
||||
static u8 rtw_p2p_check_peer_oper_ch(struct mlme_ext_priv *pmlmeext, u8 ch)
|
||||
{
|
||||
u8 i = 0;
|
||||
|
||||
|
@ -2670,7 +2656,7 @@ u8 rtw_p2p_check_peer_oper_ch(struct mlme_ext_priv *pmlmeext, u8 ch)
|
|||
return _FAIL;
|
||||
}
|
||||
|
||||
u8 rtw_p2p_ch_inclusion(struct mlme_ext_priv *pmlmeext, u8 *peer_ch_list, u8 peer_ch_num, u8 *ch_list_inclusioned)
|
||||
static u8 rtw_p2p_ch_inclusion(struct mlme_ext_priv *pmlmeext, u8 *peer_ch_list, u8 peer_ch_num, u8 *ch_list_inclusioned)
|
||||
{
|
||||
int i = 0, j = 0, temp = 0;
|
||||
u8 ch_no = 0;
|
||||
|
@ -2715,6 +2701,7 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif
|
||||
__be16 be_tmp;
|
||||
|
||||
if ( (wpsie=rtw_get_wps_ie( pframe + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen)) )
|
||||
{
|
||||
|
@ -2723,8 +2710,8 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
// We have to get peer_req_cm from here.
|
||||
if(_rtw_memcmp( pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, "000", 3) )
|
||||
{
|
||||
rtw_get_wps_attr_content( wpsie, wps_ielen, WPS_ATTR_DEVICE_PWID, (u8*) &wps_devicepassword_id, &wps_devicepassword_id_len);
|
||||
wps_devicepassword_id = be16_to_cpu( wps_devicepassword_id );
|
||||
rtw_get_wps_attr_content( wpsie, wps_ielen, WPS_ATTR_DEVICE_PWID, (u8*) &be_tmp, &wps_devicepassword_id_len);
|
||||
wps_devicepassword_id = be16_to_cpu(be_tmp);
|
||||
|
||||
if ( wps_devicepassword_id == WPS_DPID_USER_SPEC )
|
||||
{
|
||||
|
@ -2778,13 +2765,14 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
u8 ch_list_inclusioned[100] = { 0x00 };
|
||||
u8 ch_num_inclusioned = 0;
|
||||
u16 cap_attr;
|
||||
__le16 le_tmp;
|
||||
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_ING);
|
||||
|
||||
//Check P2P Capability ATTR
|
||||
if(rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&cap_attr, (uint*)&attr_contentlen) )
|
||||
if(rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&le_tmp, (uint*)&attr_contentlen) )
|
||||
{
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
cap_attr = le16_to_cpu(le_tmp);
|
||||
|
||||
#if defined(CONFIG_WFD) && defined(CONFIG_TDLS)
|
||||
if(!(cap_attr & P2P_GRPCAP_INTRABSS) )
|
||||
|
@ -2968,7 +2956,6 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
|||
}
|
||||
else
|
||||
{
|
||||
|
||||
u8 attr_content = 0x00;
|
||||
u32 attr_contentlen = 0;
|
||||
u8 operatingch_info[5] = { 0x00 };
|
||||
|
@ -2980,14 +2967,15 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
|||
u8 peer_ch_num = 0;
|
||||
u8 ch_list_inclusioned[100] = { 0x00 };
|
||||
u8 ch_num_inclusioned = 0;
|
||||
__le16 le_tmp;
|
||||
|
||||
while ( p2p_ie ) // Found the P2P IE.
|
||||
{
|
||||
|
||||
//Check P2P Capability ATTR
|
||||
if(rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&cap_attr, (uint*)&attr_contentlen) )
|
||||
if(rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CAPABILITY, (u8*)&le_tmp, (uint*)&attr_contentlen) )
|
||||
{
|
||||
cap_attr = le16_to_cpu(cap_attr);
|
||||
cap_attr = le16_to_cpu(le_tmp);
|
||||
#ifdef CONFIG_TDLS
|
||||
if(!(cap_attr & P2P_GRPCAP_INTRABSS) )
|
||||
ptdlsinfo->ap_prohibited = true;
|
||||
|
@ -3303,7 +3291,7 @@ u8 process_p2p_presence_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
|
|||
return true;
|
||||
}
|
||||
|
||||
void find_phase_handler( struct adapter* padapter )
|
||||
static void find_phase_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
@ -3311,7 +3299,6 @@ void find_phase_handler( struct adapter* padapter )
|
|||
_irqL irqL;
|
||||
u8 _status = 0;
|
||||
|
||||
;
|
||||
|
||||
_rtw_memset((unsigned char*)&ssid, 0, sizeof(NDIS_802_11_SSID));
|
||||
_rtw_memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN );
|
||||
|
@ -3324,17 +3311,15 @@ void find_phase_handler( struct adapter* padapter )
|
|||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
void p2p_concurrent_handler( struct adapter* padapter );
|
||||
|
||||
void restore_p2p_state_handler( struct adapter* padapter )
|
||||
static void restore_p2p_state_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
|
||||
;
|
||||
|
||||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL))
|
||||
{
|
||||
|
@ -3369,49 +3354,39 @@ void restore_p2p_state_handler( struct adapter* padapter )
|
|||
set_channel_bwmode( padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
#endif
|
||||
}
|
||||
;
|
||||
}
|
||||
|
||||
void pre_tx_invitereq_handler( struct adapter* padapter )
|
||||
static void pre_tx_invitereq_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
u8 val8 = 1;
|
||||
;
|
||||
|
||||
set_channel_bwmode(padapter, pwdinfo->invitereq_info.peer_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
issue_probereq_p2p(padapter, NULL);
|
||||
_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT );
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
void pre_tx_provdisc_handler( struct adapter* padapter )
|
||||
static void pre_tx_provdisc_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
u8 val8 = 1;
|
||||
;
|
||||
|
||||
set_channel_bwmode(padapter, pwdinfo->tx_prov_disc_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
issue_probereq_p2p(padapter, NULL);
|
||||
_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT );
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
void pre_tx_negoreq_handler( struct adapter* padapter )
|
||||
static void pre_tx_negoreq_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
u8 val8 = 1;
|
||||
;
|
||||
|
||||
set_channel_bwmode(padapter, pwdinfo->nego_req_info.peer_channel_num[0], HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
issue_probereq_p2p(padapter, NULL);
|
||||
_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT );
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
@ -3423,7 +3398,6 @@ void p2p_concurrent_handler( struct adapter* padapter )
|
|||
//struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
//struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
u8 val8;
|
||||
;
|
||||
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
|
@ -3530,7 +3504,6 @@ void p2p_concurrent_handler( struct adapter* padapter )
|
|||
set_channel_bwmode( padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3541,7 +3514,6 @@ static void ro_ch_handler(struct adapter *padapter)
|
|||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
u8 ch, bw, offset;
|
||||
;
|
||||
|
||||
if (rtw_get_ch_setting_union(padapter, &ch, &bw, &offset) != 0) {
|
||||
if (0)
|
||||
|
@ -3581,7 +3553,6 @@ static void ro_ch_handler(struct adapter *padapter)
|
|||
&pcfg80211_wdinfo->remain_on_ch_channel,
|
||||
pcfg80211_wdinfo->remain_on_ch_type, GFP_KERNEL);
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
static void ro_ch_timer_process (void *FunctionContext)
|
||||
|
@ -3926,7 +3897,7 @@ void rtw_append_wfd_ie(struct adapter *padapter, u8 *buf, u32* len)
|
|||
}
|
||||
#endif
|
||||
|
||||
u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_len)
|
||||
static u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_len)
|
||||
{
|
||||
uint attr_contentlen = 0;
|
||||
u8 *pattr = NULL;
|
||||
|
@ -3979,7 +3950,7 @@ u8 *dump_p2p_attr_ch_list(u8 *p2p_ie, uint p2p_ielen, u8 *buf, u32 buf_len)
|
|||
/*
|
||||
* return true if requester is GO, false if responder is GO
|
||||
*/
|
||||
bool rtw_p2p_nego_intent_compare(u8 req, u8 resp)
|
||||
static bool rtw_p2p_nego_intent_compare(u8 req, u8 resp)
|
||||
{
|
||||
if (req>>1 == resp >>1)
|
||||
return req&0x01 ? true : false;
|
||||
|
@ -4373,7 +4344,6 @@ void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
|
|||
{
|
||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
|
||||
;
|
||||
|
||||
switch(intCmdType)
|
||||
{
|
||||
|
@ -4454,7 +4424,6 @@ void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
|
|||
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
|
@ -4471,7 +4440,6 @@ void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
|
|||
u8 find_p2p = false, find_p2p_ps = false;
|
||||
u8 noa_offset, noa_num, noa_index;
|
||||
|
||||
;
|
||||
|
||||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
{
|
||||
|
@ -4566,7 +4534,6 @@ void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
|
|||
}
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
|
||||
|
@ -4574,7 +4541,6 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
|
|||
struct pwrctrl_priv *pwrpriv = adapter_to_pwrctl(padapter);
|
||||
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
|
||||
|
||||
;
|
||||
|
||||
// Pre action for p2p state
|
||||
switch(p2p_ps_state)
|
||||
|
@ -4626,7 +4592,6 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state)
|
|||
break;
|
||||
}
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
||||
|
@ -4637,7 +4602,6 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
|||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
if ( rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
@ -4670,15 +4634,12 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
|||
init_h2fwcmd_w_parm_no_rsp(ph2c, pdrvextra_cmd_parm, GEN_CMD_CODE(_Set_Drv_Extra));
|
||||
|
||||
res = rtw_enqueue_cmd(pcmdpriv, ph2c);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
p2p_ps_wk_hdl(padapter, p2p_ps_state);
|
||||
}
|
||||
|
||||
exit:
|
||||
|
||||
;
|
||||
|
||||
return res;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue