mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Remove code selected when CONFIG_CONCURRENT_MODE is defined
This parameter can only be set for RTL8192DU. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
1305b2dc4b
commit
020675ff42
28 changed files with 78 additions and 3708 deletions
119
core/rtw_ap.c
119
core/rtw_ap.c
|
@ -1018,11 +1018,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
|||
rtw_hal_set_hwreg(padapter, HW_VAR_BSSID, pnetwork->MacAddress);
|
||||
|
||||
//Set EDCA param reg
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
acparm = 0x005ea42b;
|
||||
#else
|
||||
acparm = 0x002F3217; // VO
|
||||
#endif
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VO, (u8 *)(&acparm));
|
||||
acparm = 0x005E4317; // VI
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_AC_PARAM_VI, (u8 *)(&acparm));
|
||||
|
@ -1045,37 +1041,8 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
|||
|
||||
if(pmlmepriv->cur_network.join_res != true) //setting only at first time
|
||||
{
|
||||
//u32 initialgain;
|
||||
|
||||
//initialgain = 0x1e;
|
||||
|
||||
|
||||
//disable dynamic functions, such as high power, DIG
|
||||
//Save_DM_Func_Flag(padapter);
|
||||
//Switch_DM_Func(padapter, DYNAMIC_FUNC_DISABLE, false);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(padapter->adapter_type > PRIMARY_ADAPTER)
|
||||
{
|
||||
if(rtw_buddy_adapter_up(padapter))
|
||||
{
|
||||
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
|
||||
//turn on all dynamic functions on PRIMARY_ADAPTER, dynamic functions only runs at PRIMARY_ADAPTER
|
||||
Switch_DM_Func(pbuddy_adapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||
|
||||
//rtw_hal_set_hwreg(pbuddy_adapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
//turn on all dynamic functions
|
||||
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||
|
||||
//rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain));
|
||||
}
|
||||
|
||||
//turn on all dynamic functions
|
||||
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||
}
|
||||
#ifdef CONFIG_80211N_HT
|
||||
//set channel, bwmode
|
||||
|
@ -1116,89 +1083,7 @@ static void start_bss_network(struct adapter *padapter, u8 *pbuf)
|
|||
#else
|
||||
//TODO: need to judge the phy parameters on concurrent mode for single phy
|
||||
//set_channel_bwmode(padapter, pmlmeext->cur_channel, pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(!check_buddy_fwstate(padapter, _FW_LINKED|_FW_UNDER_LINKING|_FW_UNDER_SURVEY))
|
||||
{
|
||||
set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
||||
}
|
||||
else if(check_buddy_fwstate(padapter, _FW_LINKED)==true)//only second adapter can enter AP Mode
|
||||
{
|
||||
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
||||
//To sync cur_channel/cur_bwmode/cur_ch_offset with primary adapter
|
||||
DBG_871X("primary iface is at linked state, sync cur_channel/cur_bwmode/cur_ch_offset\n");
|
||||
DBG_871X("primary adapter, CH=%d, BW=%d, offset=%d\n", pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_bwmode, pbuddy_mlmeext->cur_ch_offset);
|
||||
DBG_871X("second adapter, CH=%d, BW=%d, offset=%d\n", cur_channel, cur_bwmode, cur_ch_offset);
|
||||
|
||||
cur_channel = pbuddy_mlmeext->cur_channel;
|
||||
if(cur_bwmode == HT_CHANNEL_WIDTH_40)
|
||||
{
|
||||
if(pht_info)
|
||||
pht_info->infos[0] &= ~(BIT(0)|BIT(1));
|
||||
|
||||
if(pbuddy_mlmeext->cur_bwmode == HT_CHANNEL_WIDTH_40)
|
||||
{
|
||||
cur_ch_offset = pbuddy_mlmeext->cur_ch_offset;
|
||||
|
||||
//to update cur_ch_offset value in beacon
|
||||
if(pht_info)
|
||||
{
|
||||
switch(cur_ch_offset)
|
||||
{
|
||||
case HAL_PRIME_CHNL_OFFSET_LOWER:
|
||||
pht_info->infos[0] |= 0x1;
|
||||
break;
|
||||
case HAL_PRIME_CHNL_OFFSET_UPPER:
|
||||
pht_info->infos[0] |= 0x3;
|
||||
break;
|
||||
case HAL_PRIME_CHNL_OFFSET_DONT_CARE:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else if(pbuddy_mlmeext->cur_bwmode == HT_CHANNEL_WIDTH_20)
|
||||
{
|
||||
cur_bwmode = HT_CHANNEL_WIDTH_20;
|
||||
cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
|
||||
if(cur_channel>0 && cur_channel<5)
|
||||
{
|
||||
if(pht_info)
|
||||
pht_info->infos[0] |= 0x1;
|
||||
|
||||
cur_bwmode = HT_CHANNEL_WIDTH_40;
|
||||
cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
|
||||
}
|
||||
|
||||
if(cur_channel>7 && cur_channel<(14+1))
|
||||
{
|
||||
if(pht_info)
|
||||
pht_info->infos[0] |= 0x3;
|
||||
|
||||
cur_bwmode = HT_CHANNEL_WIDTH_40;
|
||||
cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
|
||||
}
|
||||
|
||||
set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// to update channel value in beacon
|
||||
pnetwork->Configuration.DSConfig = cur_channel;
|
||||
p = rtw_get_ie((pnetwork->IEs + sizeof(NDIS_802_11_FIXED_IEs)), _DSSET_IE_, &ie_len, (pnetwork->IELength - sizeof(NDIS_802_11_FIXED_IEs)));
|
||||
if(p && ie_len>0)
|
||||
*(p + 2) = cur_channel;
|
||||
|
||||
if(pht_info)
|
||||
pht_info->primary_channel = cur_channel;
|
||||
}
|
||||
#else
|
||||
set_channel_bwmode(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
DBG_871X("CH=%d, BW=%d, offset=%d\n", cur_channel, cur_bwmode, cur_ch_offset);
|
||||
|
||||
|
|
|
@ -336,12 +336,6 @@ u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
|||
|
||||
cmd_obj->padapter = padapter;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
//change pcmdpriv to primary's pcmdpriv
|
||||
if (padapter->adapter_type != PRIMARY_ADAPTER && padapter->pbuddy_adapter)
|
||||
pcmdpriv = &(padapter->pbuddy_adapter->cmdpriv);
|
||||
#endif
|
||||
|
||||
if( _FAIL == (res=rtw_cmd_filter(pcmdpriv, cmd_obj)) ) {
|
||||
rtw_free_cmd_obj(cmd_obj);
|
||||
goto exit;
|
||||
|
@ -353,9 +347,6 @@ u32 rtw_enqueue_cmd(struct cmd_priv *pcmdpriv, struct cmd_obj *cmd_obj)
|
|||
_rtw_up_sema(&pcmdpriv->cmd_queue_sema);
|
||||
|
||||
exit:
|
||||
|
||||
;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1781,13 +1772,6 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter*padapter)
|
|||
struct cmd_priv *pcmdpriv=&padapter->cmdpriv;
|
||||
u8 res=_SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->adapter_type != PRIMARY_ADAPTER && padapter->pbuddy_adapter)
|
||||
pcmdpriv = &(padapter->pbuddy_adapter->cmdpriv);
|
||||
#endif
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if(ph2c==NULL){
|
||||
res= _FAIL;
|
||||
|
@ -2061,15 +2045,6 @@ u8 rtw_event_polling_cmd(struct adapter*padapter)
|
|||
struct cmd_priv *pcmdpriv=&padapter->cmdpriv;
|
||||
u8 res=_SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
if (padapter->adapter_type != PRIMARY_ADAPTER)
|
||||
{
|
||||
return _FAIL;
|
||||
}
|
||||
#endif
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if(ph2c==NULL){
|
||||
res= _FAIL;
|
||||
|
@ -2371,21 +2346,9 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter*padapter, u8 lps_ctrl_type, u8 enqueue)
|
|||
struct cmd_obj *ph2c;
|
||||
struct drvextra_cmd_parm *pdrvextra_cmd_parm;
|
||||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
//struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter);
|
||||
u8 res = _SUCCESS;
|
||||
|
||||
;
|
||||
|
||||
//if(!pwrctrlpriv->bLeisurePs)
|
||||
// return res;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type != IFACE_PORT0)
|
||||
return res;
|
||||
#endif
|
||||
|
||||
if(enqueue)
|
||||
{
|
||||
if(enqueue) {
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if(ph2c==NULL){
|
||||
res= _FAIL;
|
||||
|
@ -2587,12 +2550,6 @@ u8 rtw_ps_cmd(struct adapter*padapter)
|
|||
struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
|
||||
|
||||
u8 res = _SUCCESS;
|
||||
;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->adapter_type != PRIMARY_ADAPTER)
|
||||
goto exit;
|
||||
#endif
|
||||
|
||||
ppscmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if(ppscmd==NULL){
|
||||
|
|
142
core/rtw_mlme.c
142
core/rtw_mlme.c
|
@ -1214,9 +1214,6 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
#endif // CONFIG_P2P_PS
|
||||
|
||||
rtw_os_xmit_schedule(adapter);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
rtw_os_xmit_schedule(adapter->pbuddy_adapter);
|
||||
#endif
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
dc_resume_xmit(adapter);
|
||||
#endif
|
||||
|
@ -1562,15 +1559,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
|
|||
DBG_871X("%s\n", __FUNCTION__);
|
||||
|
||||
psta->aid = pnetwork->join_res;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
||||
if(PRIMARY_ADAPTER == padapter->adapter_type)
|
||||
psta->mac_id=0;
|
||||
else
|
||||
psta->mac_id=2;
|
||||
#else
|
||||
psta->mac_id=0;
|
||||
#endif
|
||||
|
||||
//sta mode
|
||||
rtw_hal_set_odm_var(padapter,HAL_ODM_STA_INFO,psta,true);
|
||||
|
@ -1884,21 +1873,13 @@ void rtw_joinbss_event_callback(struct adapter *adapter, u8 *pbuf)
|
|||
{
|
||||
struct wlan_network *pnetwork = (struct wlan_network *)pbuf;
|
||||
|
||||
;
|
||||
|
||||
mlmeext_joinbss_event_callback(adapter, pnetwork->join_res);
|
||||
|
||||
rtw_os_xmit_schedule(adapter);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
rtw_os_xmit_schedule(adapter->pbuddy_adapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
dc_resume_xmit(adapter);
|
||||
#endif
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
static u8 search_max_mac_id(struct adapter *padapter)
|
||||
|
@ -2351,32 +2332,6 @@ static void rtw_auto_scan_handler(struct adapter *padapter)
|
|||
pmlmepriv->scan_interval--;
|
||||
if(pmlmepriv->scan_interval==0)
|
||||
{
|
||||
/*
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
DBG_871X("exit %s when _FW_UNDER_SURVEY|_FW_UNDER_LINKING -> \n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
|
||||
if(pmlmepriv->sitesurveyctrl.traffic_busy == true)
|
||||
{
|
||||
DBG_871X("%s exit cause traffic_busy(%x)\n",__FUNCTION__, pmlmepriv->sitesurveyctrl.traffic_busy);
|
||||
return;
|
||||
}
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter))
|
||||
{
|
||||
if ((check_buddy_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true) ||
|
||||
(padapter->pbuddy_adapter->mlmepriv.LinkDetectInfo.bBusyTraffic == true))
|
||||
{
|
||||
DBG_871X("%s, but buddy_intf is under scanning or linking or BusyTraffic\n", __FUNCTION__);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
DBG_871X("%s\n", __FUNCTION__);
|
||||
|
||||
rtw_set_802_11_bssid_list_scan(padapter, NULL, 0);
|
||||
|
@ -2395,20 +2350,12 @@ void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
|
|||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
#endif //CONFIG_AP_MODE
|
||||
struct registry_priv *pregistrypriv = &adapter->registrypriv;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
struct adapter *pbuddy_adapter = adapter->pbuddy_adapter;
|
||||
#endif
|
||||
|
||||
if(!adapter)
|
||||
return;
|
||||
#if defined(CONFIG_CHECK_BT_HANG) && defined(CONFIG_BT_COEXIST)
|
||||
if(adapter->HalFunc.hal_checke_bt_hang)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (adapter->adapter_type == PRIMARY_ADAPTER)
|
||||
#endif
|
||||
adapter->HalFunc.hal_checke_bt_hang(adapter);
|
||||
}
|
||||
adapter->HalFunc.hal_checke_bt_hang(adapter);
|
||||
#endif
|
||||
if(adapter->hw_init_completed == false)
|
||||
return;
|
||||
|
@ -2416,21 +2363,8 @@ void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
|
|||
if ((adapter->bDriverStopped == true)||(adapter->bSurpriseRemoved== true))
|
||||
return;
|
||||
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(pbuddy_adapter)
|
||||
{
|
||||
if(adapter->net_closed == true && pbuddy_adapter->net_closed == true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
if(adapter->net_closed == true)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
rtw_dynamic_chk_wk_cmd(adapter);
|
||||
|
||||
|
@ -2513,26 +2447,10 @@ void rtw_set_scan_deny_timer_hdl(struct adapter *adapter)
|
|||
void rtw_set_scan_deny(struct adapter *adapter, u32 ms)
|
||||
{
|
||||
struct mlme_priv *mlmepriv = &adapter->mlmepriv;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
struct mlme_priv *b_mlmepriv;
|
||||
#endif
|
||||
|
||||
if (0)
|
||||
DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(adapter));
|
||||
ATOMIC_SET(&mlmepriv->set_scan_deny, 1);
|
||||
_set_timer(&mlmepriv->set_scan_deny_timer, ms);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (!adapter->pbuddy_adapter)
|
||||
return;
|
||||
|
||||
if (0)
|
||||
DBG_871X(FUNC_ADPT_FMT"\n", FUNC_ADPT_ARG(adapter->pbuddy_adapter));
|
||||
b_mlmepriv = &adapter->pbuddy_adapter->mlmepriv;
|
||||
ATOMIC_SET(&b_mlmepriv->set_scan_deny, 1);
|
||||
_set_timer(&b_mlmepriv->set_scan_deny_timer, ms);
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3532,61 +3450,3 @@ sint rtw_linked_check(struct adapter *padapter)
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
sint rtw_buddy_adapter_up(struct adapter *padapter)
|
||||
{
|
||||
sint res = false;
|
||||
|
||||
if(padapter == NULL)
|
||||
return res;
|
||||
|
||||
|
||||
if(padapter->pbuddy_adapter == NULL)
|
||||
{
|
||||
res = false;
|
||||
}
|
||||
else if( (padapter->pbuddy_adapter->bDriverStopped) || (padapter->pbuddy_adapter->bSurpriseRemoved) ||
|
||||
(padapter->pbuddy_adapter->bup == false) || (padapter->pbuddy_adapter->hw_init_completed == false))
|
||||
{
|
||||
res = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
res = true;
|
||||
}
|
||||
|
||||
return res;
|
||||
|
||||
}
|
||||
|
||||
sint check_buddy_fwstate(struct adapter *padapter, sint state)
|
||||
{
|
||||
if(padapter == NULL)
|
||||
return false;
|
||||
|
||||
if(padapter->pbuddy_adapter == NULL)
|
||||
return false;
|
||||
|
||||
if ((state == WIFI_FW_NULL_STATE) &&
|
||||
(padapter->pbuddy_adapter->mlmepriv.fw_state == WIFI_FW_NULL_STATE))
|
||||
return true;
|
||||
|
||||
if (padapter->pbuddy_adapter->mlmepriv.fw_state & state)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
u8 rtw_get_buddy_bBusyTraffic(struct adapter *padapter)
|
||||
{
|
||||
if(padapter == NULL)
|
||||
return false;
|
||||
|
||||
if(padapter->pbuddy_adapter == NULL)
|
||||
return false;
|
||||
|
||||
return padapter->pbuddy_adapter->mlmepriv.LinkDetectInfo.bBusyTraffic;
|
||||
}
|
||||
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
|
File diff suppressed because it is too large
Load diff
572
core/rtw_p2p.c
572
core/rtw_p2p.c
|
@ -899,28 +899,6 @@ u32 build_probe_resp_wfd_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8 tunnel
|
|||
// Todo: to add the list of WFD device info descriptor in WFD group.
|
||||
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_TDLS
|
||||
if ( ( tunneled == 0 ) && ( padapter->pbuddy_adapter->wdinfo.wfd_tdls_enable == 1 ) )
|
||||
{
|
||||
// Alternative MAC Address ATTR
|
||||
// Type:
|
||||
wfdie[ wfdielen++ ] = WFD_ATTR_ALTER_MAC;
|
||||
|
||||
// Length:
|
||||
// Note: In the WFD specification, the size of length field is 2.
|
||||
RTW_PUT_BE16(wfdie + wfdielen, ETH_ALEN );
|
||||
wfdielen += 2;
|
||||
|
||||
// Value:
|
||||
// Alternative MAC Address
|
||||
_rtw_memcpy( wfdie + wfdielen, &padapter->pbuddy_adapter->eeprompriv.mac_addr[ 0 ], ETH_ALEN );
|
||||
// This mac address is used to make the WFD session when TDLS is enable.
|
||||
|
||||
wfdielen += ETH_ALEN;
|
||||
}
|
||||
#endif // CONFIG_TDLS
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
|
@ -2695,12 +2673,6 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
|
||||
#endif // CONFIG_TDLS
|
||||
#endif // CONFIG_WFD
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
struct adapter *pbuddy_adapter = pwdinfo->padapter->pbuddy_adapter;
|
||||
struct wifidirect_info *pbuddy_wdinfo = &pbuddy_adapter->wdinfo;
|
||||
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)) )
|
||||
|
@ -2850,16 +2822,6 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
if ( !rtw_p2p_is_channel_list_ok( pwdinfo->operating_channel,
|
||||
ch_list_inclusioned, ch_num_inclusioned) )
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
DBG_871X( "[%s] desired channel NOT Found!\n", __FUNCTION__ );
|
||||
result = P2P_STATUS_FAIL_NO_COMMON_CH;
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL);
|
||||
break;
|
||||
}
|
||||
else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
u8 operatingch_info[5] = { 0x00 }, peer_operating_ch = 0;
|
||||
attr_contentlen = 0;
|
||||
|
@ -3096,16 +3058,6 @@ u8 process_p2p_group_negotation_resp( struct wifidirect_info *pwdinfo, u8 *pfram
|
|||
if ( !rtw_p2p_is_channel_list_ok( pwdinfo->operating_channel,
|
||||
ch_list_inclusioned, ch_num_inclusioned) )
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
DBG_871X( "[%s] desired channel NOT Found!\n", __FUNCTION__ );
|
||||
result = P2P_STATUS_FAIL_NO_COMMON_CH;
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL);
|
||||
break;
|
||||
}
|
||||
else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
u8 operatingch_info[5] = { 0x00 }, peer_operating_ch = 0;
|
||||
attr_contentlen = 0;
|
||||
|
@ -3232,17 +3184,7 @@ u8 process_p2p_group_negotation_confirm( struct wifidirect_info *pwdinfo, u8 *pf
|
|||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_GO);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(pwdinfo->padapter , _FW_LINKED ) )
|
||||
{
|
||||
// Switch back to the AP channel soon.
|
||||
_set_timer( &pwdinfo->ap_p2p_switch_timer, 100 );
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE);
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL);
|
||||
break;
|
||||
|
@ -3326,33 +3268,13 @@ static void restore_p2p_state_handler( struct adapter* padapter )
|
|||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
||||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_RSP))
|
||||
{
|
||||
set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode);
|
||||
|
||||
issue_nulldata(pbuddy_adapter, NULL, 0, 3, 500);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo));
|
||||
|
||||
if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE))
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
p2p_concurrent_handler( padapter );
|
||||
#else
|
||||
// In the P2P client mode, the driver should not switch back to its listen channel
|
||||
// because this P2P client should stay at the operating channel of P2P GO.
|
||||
set_channel_bwmode( padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3389,124 +3311,6 @@ static void pre_tx_negoreq_handler( struct adapter* padapter )
|
|||
_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT );
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
void p2p_concurrent_handler( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
//struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
//struct wifidirect_info *pbuddy_wdinfo = &pbuddy_adapter->wdinfo;
|
||||
//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 ) )
|
||||
{
|
||||
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
||||
pwdinfo->operating_channel = pbuddy_mlmeext->cur_channel;
|
||||
|
||||
if( pwdinfo->driver_interface == DRIVER_CFG80211 )
|
||||
{
|
||||
DBG_871X("%s, switch ch back to buddy's cur_channel=%d\n", __func__, pbuddy_mlmeext->cur_channel);
|
||||
|
||||
set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode);
|
||||
|
||||
issue_nulldata(pbuddy_adapter, NULL, 0, 3, 500);
|
||||
}
|
||||
else if( pwdinfo->driver_interface == DRIVER_WEXT )
|
||||
{
|
||||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
|
||||
{
|
||||
// Now, the driver stays on the AP's channel.
|
||||
// If the pwdinfo->ext_listen_period = 0, that means the P2P listen state is not available on listen channel.
|
||||
if ( pwdinfo->ext_listen_period > 0 )
|
||||
{
|
||||
DBG_8192C( "[%s] P2P_STATE_IDLE, ext_listen_period = %d\n", __FUNCTION__, pwdinfo->ext_listen_period );
|
||||
|
||||
if ( pbuddy_mlmeext->cur_channel != pwdinfo->listen_channel )
|
||||
{
|
||||
// Will switch to listen channel so that need to send the NULL data with PW bit to AP.
|
||||
issue_nulldata(pbuddy_adapter, NULL, 1, 3, 500);
|
||||
set_channel_bwmode(padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_LISTEN);
|
||||
val8 = 1;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
|
||||
// Todo: To check the value of pwdinfo->ext_listen_period is equal to 0 or not.
|
||||
_set_timer( &pwdinfo->ap_p2p_switch_timer, pwdinfo->ext_listen_period );
|
||||
}
|
||||
}
|
||||
else if ( rtw_p2p_chk_state(pwdinfo, P2P_STATE_LISTEN) ||
|
||||
rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL) ||
|
||||
( rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) && pwdinfo->nego_req_info.benable == false ) ||
|
||||
rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ) )
|
||||
{
|
||||
// Now, the driver is in the listen state of P2P mode.
|
||||
DBG_8192C( "[%s] P2P_STATE_IDLE, ext_listen_interval = %d\n", __FUNCTION__, pwdinfo->ext_listen_interval );
|
||||
|
||||
// Commented by Albert 2012/11/01
|
||||
// If the AP's channel is the same as the listen channel, we should still be in the listen state
|
||||
// Other P2P device is still able to find this device out even this device is in the AP's channel.
|
||||
// So, configure this device to be able to receive the probe request frame and set it to listen state.
|
||||
if ( pbuddy_mlmeext->cur_channel != pwdinfo->listen_channel )
|
||||
{
|
||||
set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode);
|
||||
val8 = 0;
|
||||
padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_IDLE);
|
||||
issue_nulldata(pbuddy_adapter, NULL, 0, 3, 500);
|
||||
}
|
||||
|
||||
// Todo: To check the value of pwdinfo->ext_listen_interval is equal to 0 or not.
|
||||
_set_timer( &pwdinfo->ap_p2p_switch_timer, pwdinfo->ext_listen_interval );
|
||||
}
|
||||
else if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_OK))
|
||||
{
|
||||
// The driver had finished the P2P handshake successfully.
|
||||
val8 = 0;
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_MLME_SITESURVEY, (u8 *)(&val8));
|
||||
set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode);
|
||||
issue_nulldata(pbuddy_adapter, NULL, 0, 3, 500);
|
||||
}
|
||||
else if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_PROVISION_DIS_REQ))
|
||||
{
|
||||
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 );
|
||||
}
|
||||
else if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING) && pwdinfo->nego_req_info.benable == true)
|
||||
{
|
||||
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 );
|
||||
}
|
||||
else if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_TX_INVITE_REQ ) && pwdinfo->invitereq_info.benable == true)
|
||||
{
|
||||
/*
|
||||
val8 = 1;
|
||||
set_channel_bwmode(padapter, , 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 );
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
set_channel_bwmode( padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
static void ro_ch_handler(struct adapter *padapter)
|
||||
{
|
||||
|
@ -3560,12 +3364,6 @@ static void ro_ch_timer_process (void *FunctionContext)
|
|||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(adapter->rtw_wdev);
|
||||
|
||||
//printk("%s \n", __FUNCTION__);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 1);
|
||||
#endif
|
||||
|
||||
p2p_protocol_wk_cmd( adapter, P2P_RO_CH_WK);
|
||||
}
|
||||
|
||||
|
@ -3641,143 +3439,17 @@ static void rtw_change_p2pie_ch_list(struct adapter *padapter, const u8 *frame_b
|
|||
static bool rtw_chk_p2pie_ch_list_with_buddy(struct adapter *padapter, const u8 *frame_body, u32 len)
|
||||
{
|
||||
bool fit = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 *ies, *p2p_ie;
|
||||
u32 ies_len, p2p_ielen;
|
||||
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
u8 buddy_ch = pbuddy_mlmeext->cur_channel;
|
||||
|
||||
ies = (u8*)(frame_body + _PUBLIC_ACTION_IE_OFFSET_);
|
||||
ies_len = len - _PUBLIC_ACTION_IE_OFFSET_;
|
||||
|
||||
p2p_ie = rtw_get_p2p_ie( ies, ies_len, NULL, &p2p_ielen );
|
||||
|
||||
while (p2p_ie) {
|
||||
u32 attr_contentlen = 0;
|
||||
u8 *pattr = NULL;
|
||||
|
||||
//Check P2P_ATTR_CH_LIST
|
||||
if ((pattr=rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, (uint*)&attr_contentlen))!=NULL) {
|
||||
int i;
|
||||
u32 num_of_ch;
|
||||
u8 *pattr_temp = pattr + 3 ;
|
||||
|
||||
attr_contentlen -= 3;
|
||||
|
||||
while (attr_contentlen>0) {
|
||||
num_of_ch = *(pattr_temp+1);
|
||||
|
||||
for(i=0; i<num_of_ch; i++) {
|
||||
if (*(pattr_temp+2+i) == buddy_ch) {
|
||||
DBG_871X(FUNC_ADPT_FMT" ch_list fit buddy_ch:%u\n", FUNC_ADPT_ARG(padapter), buddy_ch);
|
||||
fit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pattr_temp += (2+num_of_ch);
|
||||
attr_contentlen -= (2+num_of_ch);
|
||||
}
|
||||
}
|
||||
|
||||
//Get the next P2P IE
|
||||
p2p_ie = rtw_get_p2p_ie(p2p_ie+p2p_ielen, ies_len -(p2p_ie -ies + p2p_ielen), NULL, &p2p_ielen);
|
||||
}
|
||||
#endif
|
||||
return fit;
|
||||
}
|
||||
|
||||
static bool rtw_chk_p2pie_op_ch_with_buddy(struct adapter *padapter, const u8 *frame_body, u32 len)
|
||||
{
|
||||
bool fit = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 *ies, *p2p_ie;
|
||||
u32 ies_len, p2p_ielen;
|
||||
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
u8 buddy_ch = pbuddy_mlmeext->cur_channel;
|
||||
|
||||
ies = (u8*)(frame_body + _PUBLIC_ACTION_IE_OFFSET_);
|
||||
ies_len = len - _PUBLIC_ACTION_IE_OFFSET_;
|
||||
|
||||
p2p_ie = rtw_get_p2p_ie( ies, ies_len, NULL, &p2p_ielen );
|
||||
|
||||
while (p2p_ie) {
|
||||
u32 attr_contentlen = 0;
|
||||
u8 *pattr = NULL;
|
||||
|
||||
//Check P2P_ATTR_OPERATING_CH
|
||||
attr_contentlen = 0;
|
||||
pattr = NULL;
|
||||
if((pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, (uint*)&attr_contentlen))!=NULL) {
|
||||
if (*(pattr+4) == buddy_ch) {
|
||||
DBG_871X(FUNC_ADPT_FMT" op_ch fit buddy_ch:%u\n", FUNC_ADPT_ARG(padapter), buddy_ch);
|
||||
fit = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//Get the next P2P IE
|
||||
p2p_ie = rtw_get_p2p_ie(p2p_ie+p2p_ielen, ies_len -(p2p_ie -ies + p2p_ielen), NULL, &p2p_ielen);
|
||||
}
|
||||
#endif
|
||||
return fit;
|
||||
}
|
||||
|
||||
static void rtw_cfg80211_adjust_p2pie_channel(struct adapter *padapter, const u8 *frame_body, u32 len)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 *ies, *p2p_ie;
|
||||
u32 ies_len, p2p_ielen;
|
||||
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
||||
ies = (u8*)(frame_body + _PUBLIC_ACTION_IE_OFFSET_);
|
||||
ies_len = len - _PUBLIC_ACTION_IE_OFFSET_;
|
||||
|
||||
p2p_ie = rtw_get_p2p_ie( ies, ies_len, NULL, &p2p_ielen );
|
||||
|
||||
while ( p2p_ie )
|
||||
{
|
||||
u32 attr_contentlen = 0;
|
||||
u8 *pattr = NULL;
|
||||
|
||||
//Check P2P_ATTR_CH_LIST
|
||||
if((pattr=rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, NULL, (uint*)&attr_contentlen))!=NULL)
|
||||
{
|
||||
int i;
|
||||
u32 num_of_ch;
|
||||
u8 *pattr_temp = pattr + 3 ;
|
||||
|
||||
attr_contentlen -= 3;
|
||||
|
||||
while(attr_contentlen>0)
|
||||
{
|
||||
num_of_ch = *(pattr_temp+1);
|
||||
|
||||
for(i=0; i<num_of_ch; i++)
|
||||
*(pattr_temp+2+i) = pbuddy_mlmeext->cur_channel;//forcing to the same channel
|
||||
|
||||
pattr_temp += (2+num_of_ch);
|
||||
attr_contentlen -= (2+num_of_ch);
|
||||
}
|
||||
}
|
||||
|
||||
//Check P2P_ATTR_OPERATING_CH
|
||||
attr_contentlen = 0;
|
||||
pattr = NULL;
|
||||
if((pattr = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, (uint*)&attr_contentlen))!=NULL)
|
||||
{
|
||||
*(pattr+4) = pbuddy_mlmeext->cur_channel;//forcing to the same channel
|
||||
}
|
||||
|
||||
//Get the next P2P IE
|
||||
p2p_ie = rtw_get_p2p_ie(p2p_ie+p2p_ielen, ies_len -(p2p_ie -ies + p2p_ielen), NULL, &p2p_ielen);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
|
@ -4010,14 +3682,6 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
if(pwdev_priv->provdisc_req_issued == false)
|
||||
rtw_cfg80211_issue_p2p_provision_request(padapter, buf, len);
|
||||
#endif //CONFIG_DRV_ISSUE_PROV_REQ
|
||||
|
||||
//pwdev_priv->provdisc_req_issued = false;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(check_buddy_fwstate(padapter, _FW_LINKED)
|
||||
|| check_buddy_fwstate(padapter, WIFI_AP_STATE))
|
||||
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, &cont_len)))
|
||||
|
@ -4041,33 +3705,12 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
DBG_871X("RTW_%s:P2P_GO_NEGO_REQ, dialogToken=%d, intent:%u%s, listen_ch:%d, op_ch:%d, ch_list:%s\n",
|
||||
(tx==true)?"Tx":"Rx", dialogToken, (intent>>1), intent&0x1 ? "+" : "-", listen_ch, op_ch, ch_list_buf);
|
||||
|
||||
if (!tx) {
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if((check_buddy_fwstate(padapter, _FW_LINKED)
|
||||
|| check_buddy_fwstate(padapter, WIFI_AP_STATE))
|
||||
&& rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr)) == false)
|
||||
{
|
||||
DBG_871X(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter));
|
||||
rtw_change_p2pie_ch_list(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr), 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case P2P_GO_NEGO_RESP:
|
||||
{
|
||||
struct rtw_wdev_nego_info* nego_info = &pwdev_priv->nego_info;
|
||||
|
||||
if (tx) {
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(check_buddy_fwstate(padapter, _FW_LINKED)
|
||||
|| check_buddy_fwstate(padapter, WIFI_AP_STATE))
|
||||
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, &cont_len)))
|
||||
op_ch = *(cont+4);
|
||||
if ((cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GO_INTENT, NULL, &cont_len)))
|
||||
|
@ -4092,15 +3735,6 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
|
||||
if (!tx) {
|
||||
pwdev_priv->provdisc_req_issued = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if((check_buddy_fwstate(padapter, _FW_LINKED)
|
||||
|| check_buddy_fwstate(padapter, WIFI_AP_STATE))
|
||||
&& rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr)) == false)
|
||||
{
|
||||
DBG_871X(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter));
|
||||
rtw_change_p2pie_ch_list(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr), 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -4110,14 +3744,6 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
struct rtw_wdev_nego_info* nego_info = &pwdev_priv->nego_info;
|
||||
bool is_go = false;
|
||||
|
||||
if (tx) {
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(check_buddy_fwstate(padapter, _FW_LINKED)
|
||||
|| check_buddy_fwstate(padapter, WIFI_AP_STATE))
|
||||
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, &cont_len)))
|
||||
op_ch = *(cont+4);
|
||||
if ((cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len)))
|
||||
|
@ -4141,10 +3767,6 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
dump_p2p_attr_ch_list(p2p_ie, p2p_ielen, ch_list_buf, 128);
|
||||
DBG_871X("RTW_%s:P2P_GO_NEGO_CONF, dialogToken=%d, status:%d, op_ch:%d, ch_list:%s\n",
|
||||
(tx==true)?"Tx":"Rx", dialogToken, status, op_ch, ch_list_buf);
|
||||
|
||||
if (!tx) {
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case P2P_INVIT_REQ:
|
||||
|
@ -4152,14 +3774,6 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
struct rtw_wdev_invit_info* invit_info = &pwdev_priv->invit_info;
|
||||
int flags = -1;
|
||||
|
||||
if (tx) {
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(check_buddy_fwstate(padapter, _FW_LINKED)
|
||||
|| check_buddy_fwstate(padapter, WIFI_AP_STATE))
|
||||
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_INVITATION_FLAGS, NULL, &cont_len)))
|
||||
flags = *cont;
|
||||
if ((cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, &cont_len)))
|
||||
|
@ -4179,35 +3793,12 @@ int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx
|
|||
DBG_871X("RTW_%s:P2P_INVIT_REQ, dialogToken=%d, flags:0x%02x, op_ch:%d, ch_list:%s\n",
|
||||
(tx==true)?"Tx":"Rx", dialogToken, flags, op_ch, ch_list_buf);
|
||||
|
||||
if (!tx) {
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(check_buddy_fwstate(padapter, _FW_LINKED)
|
||||
|| check_buddy_fwstate(padapter, WIFI_AP_STATE)) {
|
||||
if (op_ch != -1 && rtw_chk_p2pie_op_ch_with_buddy(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr)) == false) {
|
||||
DBG_871X(FUNC_ADPT_FMT" op_ch:%u has no intersect with buddy\n", FUNC_ADPT_ARG(padapter), op_ch);
|
||||
rtw_change_p2pie_ch_list(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr), 0);
|
||||
} else if (rtw_chk_p2pie_ch_list_with_buddy(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr)) == false) {
|
||||
DBG_871X(FUNC_ADPT_FMT" ch_list has no intersect with buddy\n", FUNC_ADPT_ARG(padapter));
|
||||
rtw_change_p2pie_ch_list(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr), 0);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case P2P_INVIT_RESP:
|
||||
{
|
||||
struct rtw_wdev_invit_info* invit_info = &pwdev_priv->invit_info;
|
||||
|
||||
if (tx) {
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(check_buddy_fwstate(padapter, _FW_LINKED)
|
||||
|| check_buddy_fwstate(padapter, WIFI_AP_STATE))
|
||||
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len)))
|
||||
{
|
||||
#ifdef CONFIG_P2P_INVITE_IOT
|
||||
|
@ -4358,62 +3949,14 @@ void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
|
|||
break;
|
||||
}
|
||||
case P2P_PRE_TX_PROVDISC_PROCESS_WK:
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
p2p_concurrent_handler( padapter );
|
||||
}
|
||||
else
|
||||
{
|
||||
pre_tx_provdisc_handler( padapter );
|
||||
}
|
||||
#else
|
||||
pre_tx_provdisc_handler( padapter );
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case P2P_PRE_TX_INVITEREQ_PROCESS_WK:
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
p2p_concurrent_handler( padapter );
|
||||
}
|
||||
else
|
||||
{
|
||||
pre_tx_invitereq_handler( padapter );
|
||||
}
|
||||
#else
|
||||
pre_tx_invitereq_handler( padapter );
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
case P2P_PRE_TX_NEGOREQ_PROCESS_WK:
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
p2p_concurrent_handler( padapter );
|
||||
}
|
||||
else
|
||||
{
|
||||
pre_tx_negoreq_handler( padapter );
|
||||
}
|
||||
#else
|
||||
pre_tx_negoreq_handler( padapter );
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
#ifdef CONFIG_P2P
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
case P2P_AP_P2P_CH_SWITCH_PROCESS_WK:
|
||||
{
|
||||
p2p_concurrent_handler( padapter );
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
case P2P_RO_CH_WK:
|
||||
{
|
||||
|
@ -4445,10 +3988,6 @@ void process_p2p_ps_ie(struct adapter *padapter, u8 *IEs, u32 IELength)
|
|||
{
|
||||
return;
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(padapter->iface_type != IFACE_PORT0)
|
||||
return;
|
||||
#endif
|
||||
if(IELength <= _BEACON_IE_OFFSET_)
|
||||
return;
|
||||
|
||||
|
@ -4603,14 +4142,8 @@ u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
|||
u8 res = _SUCCESS;
|
||||
|
||||
|
||||
if ( rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|| (padapter->iface_type != IFACE_PORT0)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if ( rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
return res;
|
||||
}
|
||||
|
||||
if(enqueue)
|
||||
{
|
||||
|
@ -4753,26 +4286,6 @@ static void find_phase_timer_process (void *FunctionContext)
|
|||
p2p_protocol_wk_cmd( adapter, P2P_FIND_PHASE_WK );
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
void ap_p2p_switch_timer_process (void *FunctionContext)
|
||||
{
|
||||
struct adapter *adapter = (struct adapter *)FunctionContext;
|
||||
struct wifidirect_info *pwdinfo = &adapter->wdinfo;
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(adapter->rtw_wdev);
|
||||
#endif
|
||||
|
||||
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
return;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
ATOMIC_SET(&pwdev_priv->switch_ch_to, 1);
|
||||
#endif
|
||||
|
||||
p2p_protocol_wk_cmd( adapter, P2P_AP_P2P_CH_SWITCH_PROCESS_WK );
|
||||
}
|
||||
#endif
|
||||
|
||||
void reset_global_wifidirect_info( struct adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo;
|
||||
|
@ -4818,9 +4331,6 @@ void rtw_init_wifidirect_timers(struct adapter* padapter)
|
|||
_init_timer( &pwdinfo->pre_tx_scan_timer, padapter->pnetdev, pre_tx_scan_timer_process, padapter );
|
||||
_init_timer( &pwdinfo->reset_ch_sitesurvey, padapter->pnetdev, reset_ch_sitesurvey_timer_process, padapter );
|
||||
_init_timer( &pwdinfo->reset_ch_sitesurvey2, padapter->pnetdev, reset_ch_sitesurvey_timer_process2, padapter );
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_init_timer( &pwdinfo->ap_p2p_switch_timer, padapter->pnetdev, ap_p2p_switch_timer_process, padapter );
|
||||
#endif
|
||||
}
|
||||
|
||||
void rtw_init_wifidirect_addrs(struct adapter* padapter, u8 *dev_addr, u8 *iface_addr)
|
||||
|
@ -4844,12 +4354,6 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
|
|||
#ifdef CONFIG_WFD
|
||||
struct wifi_display_info *pwfd_info = &padapter->wfd_info;
|
||||
#endif
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct wifidirect_info *pbuddy_wdinfo;
|
||||
struct mlme_priv *pbuddy_mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext;
|
||||
#endif
|
||||
|
||||
pwdinfo = &padapter->wdinfo;
|
||||
|
||||
|
@ -4861,53 +4365,20 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
|
|||
pwdinfo->social_chan[2] = 11;
|
||||
pwdinfo->social_chan[3] = 0; // channel 0 for scanning ending in site survey function.
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (pbuddy_adapter) {
|
||||
pbuddy_wdinfo = &pbuddy_adapter->wdinfo;
|
||||
pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
}
|
||||
// Use the channel 11 as the listen channel
|
||||
pwdinfo->listen_channel = 11;
|
||||
|
||||
if ( ( check_buddy_fwstate(padapter, _FW_LINKED ) == true ) &&
|
||||
( ( pbuddy_mlmeext->cur_channel == 1) || ( pbuddy_mlmeext->cur_channel == 6 ) || ( pbuddy_mlmeext->cur_channel == 11 ) )
|
||||
)
|
||||
{
|
||||
// Use the AP's channel as the listen channel
|
||||
// This will avoid the channel switch between AP's channel and listen channel.
|
||||
pwdinfo->listen_channel = pbuddy_mlmeext->cur_channel;
|
||||
}
|
||||
else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
// Use the channel 11 as the listen channel
|
||||
pwdinfo->listen_channel = 11;
|
||||
}
|
||||
|
||||
if (role == P2P_ROLE_DEVICE)
|
||||
{
|
||||
if (role == P2P_ROLE_DEVICE) {
|
||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) == true )
|
||||
{
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_IDLE);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_LISTEN);
|
||||
}
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_LISTEN);
|
||||
pwdinfo->intent = 1;
|
||||
rtw_p2p_set_pre_state(pwdinfo, P2P_STATE_LISTEN);
|
||||
}
|
||||
else if (role == P2P_ROLE_CLIENT)
|
||||
{
|
||||
} else if (role == P2P_ROLE_CLIENT) {
|
||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_CLIENT);
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_OK);
|
||||
pwdinfo->intent = 1;
|
||||
rtw_p2p_set_pre_state(pwdinfo, P2P_STATE_GONEGO_OK);
|
||||
}
|
||||
else if (role == P2P_ROLE_GO)
|
||||
{
|
||||
} else if (role == P2P_ROLE_GO) {
|
||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_GO);
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_OK);
|
||||
pwdinfo->intent = 15;
|
||||
|
@ -4967,17 +4438,6 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
|
|||
_rtw_memset( pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, 0x00, 4 );
|
||||
_rtw_memset( pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, '0', 3 );
|
||||
_rtw_memset( &pwdinfo->groupid_info, 0x00, sizeof( struct group_id_info ) );
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
pwdinfo->ext_listen_interval = 1000; //The interval to be available with legacy AP during p2p0-find/scan
|
||||
pwdinfo->ext_listen_period = 3000; //The time period to be available for P2P during nego
|
||||
#else //!CONFIG_IOCTL_CFG80211
|
||||
//pwdinfo->ext_listen_interval = 3000;
|
||||
//pwdinfo->ext_listen_period = 400;
|
||||
pwdinfo->ext_listen_interval = 1000;
|
||||
pwdinfo->ext_listen_period = 1000;
|
||||
#endif //!CONFIG_IOCTL_CFG80211
|
||||
#endif
|
||||
|
||||
// Commented by Kurt 20130319
|
||||
// For WiDi purpose: Use CFG80211 interface but controled WFD/RDS frame by driver itself.
|
||||
|
@ -5147,19 +4607,6 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
|||
u8 channel, ch_offset;
|
||||
u16 bwmode;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct wifidirect_info *pbuddy_wdinfo = &pbuddy_adapter->wdinfo;
|
||||
// Commented by Albert 2011/12/30
|
||||
// The driver just supports 1 P2P group operation.
|
||||
// So, this function will do nothing if the buddy adapter had enabled the P2P function.
|
||||
if(!rtw_p2p_chk_state(pbuddy_wdinfo, P2P_STATE_NONE))
|
||||
{
|
||||
// The buddy adapter had enabled the P2P function.
|
||||
return ret;
|
||||
}
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
//leave IPS/Autosuspend
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
||||
ret = _FAIL;
|
||||
|
@ -5207,9 +4654,6 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
|
|||
_cancel_timer_ex( &pwdinfo->reset_ch_sitesurvey2);
|
||||
reset_ch_sitesurvey_timer_process( padapter );
|
||||
reset_ch_sitesurvey_timer_process2( padapter );
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_cancel_timer_ex( &pwdinfo->ap_p2p_switch_timer);
|
||||
#endif
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
|
||||
rtw_p2p_set_pre_state(pwdinfo, P2P_STATE_NONE);
|
||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DISABLE);
|
||||
|
|
|
@ -727,45 +727,10 @@ void LPS_Enter(struct adapter *padapter)
|
|||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
struct adapter *buddy = padapter->pbuddy_adapter;
|
||||
|
||||
;
|
||||
|
||||
// DBG_871X("+LeisurePSEnter\n");
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type != IFACE_PORT0)
|
||||
return; /* Skip power saving for concurrent mode port 1*/
|
||||
|
||||
/* consider buddy, if exist */
|
||||
if (buddy) {
|
||||
struct mlme_priv *b_pmlmepriv = &(buddy->mlmepriv);
|
||||
#ifdef CONFIG_P2P
|
||||
struct wifidirect_info *b_pwdinfo = &(buddy->wdinfo);
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
struct cfg80211_wifidirect_info *b_pcfg80211_wdinfo = &buddy->cfg80211_wdinfo;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
if (check_fwstate(b_pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR)
|
||||
|| check_fwstate(b_pmlmepriv, WIFI_UNDER_LINKING|WIFI_UNDER_WPS)
|
||||
|| check_fwstate(b_pmlmepriv, WIFI_AP_STATE)
|
||||
|| check_fwstate(b_pmlmepriv, WIFI_ADHOC_MASTER_STATE|WIFI_ADHOC_STATE)
|
||||
#if defined(CONFIG_P2P) && defined(CONFIG_IOCTL_CFG80211) && defined(CONFIG_P2P_IPS)
|
||||
|| b_pcfg80211_wdinfo->is_ro_ch
|
||||
#elif defined(CONFIG_P2P)
|
||||
|| !rtw_p2p_chk_state(b_pwdinfo, P2P_STATE_NONE)
|
||||
#endif
|
||||
|| rtw_is_scan_deny(buddy)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (PS_RDY_CHECK(padapter) == false)
|
||||
return;
|
||||
|
||||
if (true == pwrpriv->bLeisurePs)
|
||||
{
|
||||
if (pwrpriv->bLeisurePs) {
|
||||
// Idle for a while if we connect to AP a while ago.
|
||||
if(pwrpriv->LpsIdleCount >= 2) // 4 Sec
|
||||
{
|
||||
|
@ -780,10 +745,6 @@ void LPS_Enter(struct adapter *padapter)
|
|||
else
|
||||
pwrpriv->LpsIdleCount++;
|
||||
}
|
||||
|
||||
// DBG_871X("-LeisurePSEnter\n");
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -798,19 +759,8 @@ void LPS_Leave(struct adapter *padapter)
|
|||
u32 start_time;
|
||||
u8 bAwake = false;
|
||||
|
||||
;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type != IFACE_PORT0)
|
||||
return; /* Skip power saving for concurrent mode port 1*/
|
||||
#endif
|
||||
|
||||
// DBG_871X("+LeisurePSLeave\n");
|
||||
|
||||
if (pwrpriv->bLeisurePs)
|
||||
{
|
||||
if(pwrpriv->pwr_mode != PS_MODE_ACTIVE)
|
||||
{
|
||||
if (pwrpriv->bLeisurePs) {
|
||||
if(pwrpriv->pwr_mode != PS_MODE_ACTIVE) {
|
||||
rtw_set_ps_mode(padapter, PS_MODE_ACTIVE, 0, 0x40);
|
||||
|
||||
if(pwrpriv->pwr_mode == PS_MODE_ACTIVE)
|
||||
|
@ -1400,13 +1350,6 @@ void rtw_init_pwrctrl_priv(struct adapter *padapter)
|
|||
{
|
||||
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(padapter);
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
if (padapter->adapter_type != PRIMARY_ADAPTER)
|
||||
return;
|
||||
#endif
|
||||
|
||||
;
|
||||
|
||||
_init_pwrlock(&pwrctrlpriv->lock);
|
||||
pwrctrlpriv->rf_pwrstate = rf_on;
|
||||
pwrctrlpriv->ips_enter_cnts=0;
|
||||
|
@ -1483,16 +1426,6 @@ void rtw_free_pwrctrl_priv(struct adapter *adapter)
|
|||
{
|
||||
struct pwrctrl_priv *pwrctrlpriv = adapter_to_pwrctl(adapter);
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
if (adapter->adapter_type != PRIMARY_ADAPTER)
|
||||
return;
|
||||
#endif
|
||||
|
||||
;
|
||||
|
||||
//_rtw_memset((unsigned char *)pwrctrlpriv, 0, sizeof(struct pwrctrl_priv));
|
||||
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
if (pwrctrlpriv->rtw_workqueue) {
|
||||
flush_workqueue(pwrctrlpriv->rtw_workqueue);
|
||||
|
@ -1506,8 +1439,6 @@ void rtw_free_pwrctrl_priv(struct adapter *adapter)
|
|||
#endif //CONFIG_HAS_EARLYSUSPEND || CONFIG_ANDROID_POWER
|
||||
|
||||
_free_pwrlock(&pwrctrlpriv->lock);
|
||||
|
||||
;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RESUME_IN_WORKQUEUE
|
||||
|
@ -1678,16 +1609,6 @@ int _rtw_pwr_wakeup(struct adapter *padapter, u32 ips_deffer_ms, const char *cal
|
|||
int ret = _SUCCESS;
|
||||
u32 start = rtw_get_current_time();
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->pbuddy_adapter)
|
||||
LeaveAllPowerSaveMode(padapter->pbuddy_adapter);
|
||||
|
||||
if ((padapter->isprimary == false) && padapter->pbuddy_adapter){
|
||||
padapter = padapter->pbuddy_adapter;
|
||||
pmlmepriv = &padapter->mlmepriv;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pwrpriv->ips_deny_time < rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms))
|
||||
pwrpriv->ips_deny_time = rtw_get_current_time() + rtw_ms_to_systime(ips_deffer_ms);
|
||||
|
||||
|
|
|
@ -241,19 +241,6 @@ int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue)
|
|||
struct adapter *padapter=precvframe->u.hdr.adapter;
|
||||
struct recv_priv *precvpriv = &padapter->recvpriv;
|
||||
|
||||
;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(padapter->adapter_type > PRIMARY_ADAPTER)
|
||||
{
|
||||
padapter = padapter->pbuddy_adapter;//get primary_padapter
|
||||
precvpriv = &padapter->recvpriv;
|
||||
pfree_recv_queue = &precvpriv->free_recv_queue;
|
||||
precvframe->u.hdr.adapter = padapter;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if(precvframe->u.hdr.pkt)
|
||||
{
|
||||
#ifdef CONFIG_BSD_RX_USE_MBUF
|
||||
|
@ -625,10 +612,6 @@ static union recv_frame *decryptor(struct adapter *padapter,union recv_frame *pr
|
|||
|
||||
if((prxattrib->encrypt>0) && ((prxattrib->bdecrypted==0) ||(psecuritypriv->sw_decrypt==true)))
|
||||
{
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(!IS_MCAST(prxattrib->ra))//bc/mc packets use sw decryption for concurrent mode
|
||||
#endif
|
||||
psecuritypriv->hw_decrypted=false;
|
||||
|
||||
#ifdef DBG_RX_DECRYPTOR
|
||||
|
@ -3675,11 +3658,6 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS){
|
|||
goto set_timer;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(adapter, _FW_UNDER_SURVEY) == true)
|
||||
goto set_timer;
|
||||
#endif
|
||||
|
||||
//update value of signal_strength, rssi, signal_qual
|
||||
tmp_s = (avg_signal_strength+(_alpha-1)*recvpriv->signal_strength);
|
||||
if(tmp_s %_alpha)
|
||||
|
|
|
@ -291,9 +291,6 @@ void sreset_reset(struct adapter *padapter)
|
|||
pwrpriv->change_rfpwrstate = rf_off;
|
||||
|
||||
sreset_stop_adapter(padapter);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
sreset_stop_adapter(padapter->pbuddy_adapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IPS
|
||||
_ips_enter(padapter);
|
||||
|
@ -301,9 +298,6 @@ void sreset_reset(struct adapter *padapter)
|
|||
#endif
|
||||
|
||||
sreset_start_adapter(padapter);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
sreset_start_adapter(padapter->pbuddy_adapter);
|
||||
#endif
|
||||
|
||||
psrtpriv->silent_reset_inprogress = false;
|
||||
|
||||
|
|
|
@ -385,16 +385,7 @@ static void Set_NETYPE0_MSR(struct adapter *padapter, u8 type)
|
|||
|
||||
void Set_MSR(struct adapter *padapter, u8 type)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if(padapter->iface_type == IFACE_PORT1)
|
||||
{
|
||||
Set_NETYPE1_MSR(padapter, type);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
Set_NETYPE0_MSR(padapter, type);
|
||||
}
|
||||
Set_NETYPE0_MSR(padapter, type);
|
||||
}
|
||||
|
||||
inline u8 rtw_get_oper_ch(struct adapter *adapter)
|
||||
|
@ -737,42 +728,7 @@ void flush_all_cam_entry(struct adapter *padapter)
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
||||
struct mlme_priv *pmlmepriv = &(padapter->mlmepriv);
|
||||
|
||||
//if(check_buddy_mlmeinfo_state(padapter, _HW_STATE_NOLINK_))
|
||||
if(check_buddy_fwstate(padapter, _FW_LINKED) == false) {
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, 0);
|
||||
} else {
|
||||
if(check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
|
||||
struct sta_priv *pstapriv = &padapter->stapriv;
|
||||
struct sta_info *psta;
|
||||
u8 cam_id;//cam_entry
|
||||
|
||||
psta = rtw_get_stainfo(pstapriv, pmlmeinfo->network.MacAddress);
|
||||
if(psta) {
|
||||
if(psta->state & WIFI_AP_STATE)
|
||||
{} //clear cam when ap free per sta_info
|
||||
else {
|
||||
if(psta->mac_id==2)
|
||||
cam_id = 5;
|
||||
else
|
||||
cam_id = 4;
|
||||
}
|
||||
//clear_cam_entry(padapter, cam_id);
|
||||
rtw_clearstakey_cmd(padapter, (u8*)psta, cam_id, false);
|
||||
}
|
||||
} else if(check_fwstate(pmlmepriv, WIFI_AP_STATE) == true) {
|
||||
//clear cam when ap free per sta_info
|
||||
}
|
||||
}
|
||||
#else //CONFIG_CONCURRENT_MODE
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, NULL);
|
||||
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
memset((u8 *)(pmlmeinfo->FW_sta_info), 0, sizeof(pmlmeinfo->FW_sta_info));
|
||||
}
|
||||
|
||||
|
|
|
@ -899,27 +899,16 @@ static s32 update_attrib(struct adapter *padapter, _pkt *pkt, struct pkt_attrib
|
|||
pattrib->bswenc = false;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("update_attrib: bswenc=false\n"));
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if((pattrib->encrypt && bmcast) || (pattrib->encrypt ==_WEP40_) || (pattrib->encrypt ==_WEP104_))
|
||||
{
|
||||
pattrib->bswenc = true;//force using sw enc.
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_WAPI_SUPPORT
|
||||
if(pattrib->encrypt == _SMS4_)
|
||||
pattrib->bswenc = false;
|
||||
#endif
|
||||
|
||||
rtw_set_tx_chksum_offload(pkt, pattrib);
|
||||
|
||||
update_attrib_phy_info(pattrib, psta);
|
||||
|
||||
exit:
|
||||
|
||||
;
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -3184,11 +3173,6 @@ static void do_queue_select(struct adapter *padapter, struct pkt_attrib *pattrib
|
|||
qsel = pattrib->priority;
|
||||
RT_TRACE(_module_rtl871x_xmit_c_,_drv_info_,("### do_queue_select priority=%d ,qsel = %d\n",pattrib->priority ,qsel));
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
// if (check_fwstate(&padapter->mlmepriv, WIFI_AP_STATE) == true)
|
||||
// qsel = 7;//
|
||||
#endif
|
||||
|
||||
pattrib->qsel = qsel;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue