mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-05-08 14:33:05 +00:00
rtl8188eu: Remove dead code associated with CONFIG_CONCURRENT snd CONFIG_DUALMAC_CONCURRENT
These two configuration parameters are only associated with the RTL8192DU device, and can be removed here. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
e79535e153
commit
7c593a903d
30 changed files with 103 additions and 4328 deletions
|
@ -841,11 +841,7 @@ static void start_bss_network(_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));
|
||||
|
@ -865,20 +861,8 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
rtw_hal_set_hwreg(padapter, HW_VAR_BASIC_RATE, pnetwork->SupportedRates);
|
||||
|
||||
if (pmlmepriv->cur_network.join_res != true) { /* setting only at first time */
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->adapter_type > PRIMARY_ADAPTER) {
|
||||
if (rtw_buddy_adapter_up(padapter)) {
|
||||
_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);
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
/* turn on all dynamic functions */
|
||||
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||
}
|
||||
/* turn on all dynamic functions */
|
||||
Switch_DM_Func(padapter, DYNAMIC_ALL_FUNC_ENABLE, true);
|
||||
}
|
||||
#ifdef CONFIG_80211N_HT
|
||||
/* set channel, bwmode */
|
||||
|
@ -903,80 +887,8 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
}
|
||||
}
|
||||
#endif /* CONFIG_80211N_HT */
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
dc_set_ap_channel_bandwidth(padapter, cur_channel, cur_ch_offset, cur_bwmode);
|
||||
#else
|
||||
/* TODO: need to judge the phy parameters on concurrent mode for single phy */
|
||||
#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 */
|
||||
_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_88E("primary iface is at linked state, sync cur_channel/cur_bwmode/cur_ch_offset\n");
|
||||
DBG_88E("primary adapter, CH=%d, BW=%d, offset=%d\n", pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_bwmode, pbuddy_mlmeext->cur_ch_offset);
|
||||
DBG_88E("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_88E("CH=%d, BW=%d, offset=%d\n", cur_channel, cur_bwmode, cur_ch_offset);
|
||||
|
||||
|
@ -984,7 +896,6 @@ static void start_bss_network(_adapter *padapter, u8 *pbuf)
|
|||
pmlmeext->cur_channel = cur_channel;
|
||||
pmlmeext->cur_bwmode = cur_bwmode;
|
||||
pmlmeext->cur_ch_offset = cur_ch_offset;
|
||||
#endif /* CONFIG_DUALMAC_CONCURRENT */
|
||||
pmlmeext->cur_wireless_mode = pmlmepriv->cur_network.network_type;
|
||||
|
||||
/* update cur_wireless_mode */
|
||||
|
|
|
@ -336,11 +336,6 @@ _func_enter_;
|
|||
|
||||
cmd_obj->padapter = padapter;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
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;
|
||||
|
@ -1647,11 +1642,6 @@ u8 rtw_dynamic_chk_wk_cmd(_adapter*padapter)
|
|||
|
||||
_func_enter_;
|
||||
|
||||
#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;
|
||||
|
@ -2320,11 +2310,6 @@ u8 rtw_ps_cmd(_adapter*padapter)
|
|||
u8 res = _SUCCESS;
|
||||
_func_enter_;
|
||||
|
||||
#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){
|
||||
res= _FAIL;
|
||||
|
|
143
core/rtw_mlme.c
143
core/rtw_mlme.c
|
@ -1133,12 +1133,6 @@ _func_enter_;
|
|||
#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
|
||||
|
||||
#ifdef CONFIG_DRVEXT_MODULE_WSC
|
||||
drvext_surveydone_callback(&adapter->drvextpriv);
|
||||
|
@ -1426,15 +1420,7 @@ static struct sta_info *rtw_joinbss_update_stainfo(_adapter *padapter, struct wl
|
|||
DBG_88E("%s\n", __func__);
|
||||
|
||||
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);
|
||||
|
@ -1763,14 +1749,6 @@ _func_enter_;
|
|||
|
||||
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
|
||||
|
||||
_func_exit_;
|
||||
}
|
||||
|
||||
|
@ -2201,32 +2179,6 @@ static void rtw_auto_scan_handler(_adapter *padapter)
|
|||
pmlmepriv->scan_interval--;
|
||||
if (pmlmepriv->scan_interval==0)
|
||||
{
|
||||
/*
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
DBG_88E("exit %s when _FW_UNDER_SURVEY|_FW_UNDER_LINKING ->\n", __func__);
|
||||
return;
|
||||
}
|
||||
|
||||
if (pmlmepriv->sitesurveyctrl.traffic_busy == true)
|
||||
{
|
||||
DBG_88E("%s exit cause traffic_busy(%x)\n",__func__, 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_88E("%s, but buddy_intf is under scanning or linking or BusyTraffic\n", __func__);
|
||||
return;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
DBG_88E("%s\n", __func__);
|
||||
|
||||
rtw_set_802_11_bssid_list_scan(padapter, NULL, 0);
|
||||
|
@ -2245,9 +2197,6 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
|||
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
|
||||
#endif /* CONFIG_AP_MODE */
|
||||
struct registry_priv *pregistrypriv = &adapter->registrypriv;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
PADAPTER pbuddy_adapter = adapter->pbuddy_adapter;
|
||||
#endif
|
||||
|
||||
if (!adapter)
|
||||
return;
|
||||
|
@ -2262,20 +2211,8 @@ void rtw_dynamic_check_timer_handlder(_adapter *adapter)
|
|||
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);
|
||||
|
||||
|
@ -2359,26 +2296,8 @@ void rtw_set_scan_deny_timer_hdl(_adapter *adapter)
|
|||
void rtw_set_scan_deny(_adapter *adapter, u32 ms)
|
||||
{
|
||||
struct mlme_priv *mlmepriv = &adapter->mlmepriv;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
struct mlme_priv *b_mlmepriv;
|
||||
#endif
|
||||
|
||||
if (0)
|
||||
DBG_88E(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_88E(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
|
||||
|
||||
|
@ -3292,65 +3211,3 @@ void _rtw_roaming(_adapter *padapter, struct wlan_network *tgt_network)
|
|||
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
sint rtw_buddy_adapter_up(_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(_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;
|
||||
}
|
||||
|
||||
sint check_buddy_fw_link(_adapter *padapter)
|
||||
{
|
||||
if ( (check_buddy_fwstate(padapter, WIFI_AP_STATE) == true) ||
|
||||
(check_buddy_fwstate(padapter, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE) == true))
|
||||
{
|
||||
if (padapter->pbuddy_adapter->stapriv.asoc_sta_count > 2)
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{ /* Station mode */
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED)== true)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
|
1476
core/rtw_mlme_ext.c
1476
core/rtw_mlme_ext.c
File diff suppressed because it is too large
Load diff
531
core/rtw_p2p.c
531
core/rtw_p2p.c
|
@ -928,8 +928,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
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
pbuf = rtw_set_ie(pbuf, _VENDOR_SPECIFIC_IE_, wfdielen, (unsigned char *) wfdie, &len);
|
||||
|
||||
|
@ -2613,12 +2611,6 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
u8 wfd_ie[ 128 ] = { 0x00 };
|
||||
u32 wfd_ielen = 0;
|
||||
#endif /* CONFIG_WFD */
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_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
|
||||
|
||||
if ( (wpsie=rtw_get_wps_ie( pframe + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &wps_ielen)) )
|
||||
{
|
||||
|
@ -2743,45 +2735,26 @@ u8 process_p2p_group_negotation_req( struct wifidirect_info *pwdinfo, u8 *pframe
|
|||
|
||||
if (rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
|
||||
{
|
||||
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_88E( "[%s] desired channel NOT Found!\n", __func__ );
|
||||
result = P2P_STATUS_FAIL_NO_COMMON_CH;
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL);
|
||||
break;
|
||||
if (!rtw_p2p_is_channel_list_ok(pwdinfo->operating_channel,
|
||||
ch_list_inclusioned, ch_num_inclusioned)) {
|
||||
u8 operatingch_info[5] = { 0x00 }, peer_operating_ch = 0;
|
||||
attr_contentlen = 0;
|
||||
|
||||
if ( rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen) )
|
||||
peer_operating_ch = operatingch_info[4];
|
||||
|
||||
if (rtw_p2p_is_channel_list_ok(peer_operating_ch,
|
||||
ch_list_inclusioned, ch_num_inclusioned) ) {
|
||||
/**
|
||||
* Change our operating channel as peer's for compatibility.
|
||||
*/
|
||||
pwdinfo->operating_channel = peer_operating_ch;
|
||||
DBG_88E( "[%s] Change op ch to %02x as peer's\n", __func__, pwdinfo->operating_channel);
|
||||
} else {
|
||||
/* Take first channel of ch_list_inclusioned as operating channel */
|
||||
pwdinfo->operating_channel = ch_list_inclusioned[0];
|
||||
DBG_88E( "[%s] Change op ch to %02x\n", __func__, pwdinfo->operating_channel);
|
||||
}
|
||||
else
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
{
|
||||
u8 operatingch_info[5] = { 0x00 }, peer_operating_ch = 0;
|
||||
attr_contentlen = 0;
|
||||
|
||||
if ( rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen) )
|
||||
{
|
||||
peer_operating_ch = operatingch_info[4];
|
||||
}
|
||||
|
||||
if ( rtw_p2p_is_channel_list_ok( peer_operating_ch,
|
||||
ch_list_inclusioned, ch_num_inclusioned) )
|
||||
{
|
||||
/**
|
||||
* Change our operating channel as peer's for compatibility.
|
||||
*/
|
||||
pwdinfo->operating_channel = peer_operating_ch;
|
||||
DBG_88E( "[%s] Change op ch to %02x as peer's\n", __func__, pwdinfo->operating_channel);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Take first channel of ch_list_inclusioned as operating channel */
|
||||
pwdinfo->operating_channel = ch_list_inclusioned[0];
|
||||
DBG_88E( "[%s] Change op ch to %02x\n", __func__, pwdinfo->operating_channel);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2973,40 +2946,28 @@ 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 ) )
|
||||
u8 operatingch_info[5] = { 0x00 }, peer_operating_ch = 0;
|
||||
attr_contentlen = 0;
|
||||
|
||||
if ( rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen) )
|
||||
{
|
||||
DBG_88E( "[%s] desired channel NOT Found!\n", __func__ );
|
||||
result = P2P_STATUS_FAIL_NO_COMMON_CH;
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_FAIL);
|
||||
break;
|
||||
peer_operating_ch = operatingch_info[4];
|
||||
}
|
||||
|
||||
if ( rtw_p2p_is_channel_list_ok( peer_operating_ch,
|
||||
ch_list_inclusioned, ch_num_inclusioned) )
|
||||
{
|
||||
/**
|
||||
* Change our operating channel as peer's for compatibility.
|
||||
*/
|
||||
pwdinfo->operating_channel = peer_operating_ch;
|
||||
DBG_88E( "[%s] Change op ch to %02x as peer's\n", __func__, pwdinfo->operating_channel);
|
||||
}
|
||||
else
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
{
|
||||
u8 operatingch_info[5] = { 0x00 }, peer_operating_ch = 0;
|
||||
attr_contentlen = 0;
|
||||
|
||||
if ( rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, operatingch_info, &attr_contentlen) )
|
||||
{
|
||||
peer_operating_ch = operatingch_info[4];
|
||||
}
|
||||
|
||||
if ( rtw_p2p_is_channel_list_ok( peer_operating_ch,
|
||||
ch_list_inclusioned, ch_num_inclusioned) )
|
||||
{
|
||||
/**
|
||||
* Change our operating channel as peer's for compatibility.
|
||||
*/
|
||||
pwdinfo->operating_channel = peer_operating_ch;
|
||||
DBG_88E( "[%s] Change op ch to %02x as peer's\n", __func__, pwdinfo->operating_channel);
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Take first channel of ch_list_inclusioned as operating channel */
|
||||
pwdinfo->operating_channel = ch_list_inclusioned[0];
|
||||
DBG_88E( "[%s] Change op ch to %02x\n", __func__, pwdinfo->operating_channel);
|
||||
}
|
||||
/* Take first channel of ch_list_inclusioned as operating channel */
|
||||
pwdinfo->operating_channel = ch_list_inclusioned[0];
|
||||
DBG_88E( "[%s] Change op ch to %02x\n", __func__, pwdinfo->operating_channel);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -3109,14 +3070,6 @@ 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
|
||||
{
|
||||
|
@ -3203,34 +3156,13 @@ _func_enter_;
|
|||
{
|
||||
rtw_p2p_set_role(pwdinfo, P2P_ROLE_DEVICE);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
_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
|
||||
}
|
||||
_func_exit_;
|
||||
}
|
||||
|
@ -3277,124 +3209,6 @@ _func_enter_;
|
|||
_func_exit_;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
void p2p_concurrent_handler( _adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo = &padapter->wdinfo;
|
||||
/* _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;
|
||||
_func_enter_;
|
||||
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
PADAPTER pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
||||
pwdinfo->operating_channel = pbuddy_mlmeext->cur_channel;
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
|
||||
DBG_88E("%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 /* CONFIG_IOCTL_CFG80211 */
|
||||
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_88E( "[%s] P2P_STATE_IDLE, ext_listen_period = %d\n", __func__, 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_88E( "[%s] P2P_STATE_IDLE, ext_listen_interval = %d\n", __func__, 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 );
|
||||
*/
|
||||
}
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
}
|
||||
else
|
||||
{
|
||||
set_channel_bwmode( padapter, pwdinfo->listen_channel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
|
||||
_func_exit_;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
static void ro_ch_handler( _adapter* padapter )
|
||||
{
|
||||
|
@ -3405,21 +3219,6 @@ static void ro_ch_handler( _adapter* padapter )
|
|||
_func_enter_;
|
||||
|
||||
{
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ( check_buddy_fwstate(padapter, _FW_LINKED ) )
|
||||
{
|
||||
PADAPTER pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
||||
DBG_88E("%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);
|
||||
|
||||
pmlmeext->cur_channel = pbuddy_mlmeext->cur_channel;
|
||||
|
||||
}else
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
if ( pcfg80211_wdinfo->restore_channel != pmlmeext->cur_channel )
|
||||
{
|
||||
if ( !check_fwstate(&padapter->mlmepriv, _FW_LINKED ) )
|
||||
|
@ -3450,68 +3249,11 @@ static void ro_ch_timer_process (void *FunctionContext)
|
|||
_adapter *adapter = (_adapter *)FunctionContext;
|
||||
struct rtw_wdev_priv *pwdev_priv = wdev_to_priv(adapter->rtw_wdev);
|
||||
|
||||
/* printk("%s\n", __func__); */
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 1);
|
||||
#endif
|
||||
|
||||
p2p_protocol_wk_cmd( adapter, P2P_RO_CH_WK);
|
||||
}
|
||||
|
||||
static void rtw_cfg80211_adjust_p2pie_channel(_adapter *padapter, const u8 *frame_body, u32 len)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 *ies, *p2p_ie;
|
||||
u32 ies_len, p2p_ielen;
|
||||
PADAPTER 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
|
||||
|
@ -3676,13 +3418,6 @@ int rtw_p2p_check_frames(_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))
|
||||
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
#endif
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -3691,28 +3426,11 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
DBG_88E("RTW_%s:P2P_GO_NEGO_RESP, dialogToken=%d, status:%d\n", (tx==true)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||
|
||||
if (!tx)
|
||||
{
|
||||
pwdev_priv->provdisc_req_issued = false;
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
else
|
||||
{
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED))
|
||||
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case P2P_GO_NEGO_CONF:
|
||||
cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, NULL, &cont_len);
|
||||
DBG_88E("RTW_%s:P2P_GO_NEGO_CONF, dialogToken=%d, status:%d\n", (tx==true)?"Tx":"Rx", dialogToken, cont?*cont:-1);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (tx)
|
||||
{
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED))
|
||||
rtw_cfg80211_adjust_p2pie_channel(padapter, frame_body, len-sizeof(struct rtw_ieee80211_hdr_3addr));
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case P2P_INVIT_REQ:
|
||||
{
|
||||
|
@ -3720,14 +3438,6 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
int flags = -1;
|
||||
int op_ch = 0;
|
||||
|
||||
if (tx)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED))
|
||||
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)))
|
||||
|
@ -3749,14 +3459,6 @@ int rtw_p2p_check_frames(_adapter *padapter, const u8 *buf, u32 len, u8 tx)
|
|||
int status = -1;
|
||||
int op_ch = 0;
|
||||
|
||||
if (tx)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED))
|
||||
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)))
|
||||
status = *cont;
|
||||
if ((cont = rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_OPERATING_CH, NULL, &cont_len)))
|
||||
|
@ -3883,72 +3585,20 @@ _func_enter_;
|
|||
switch (intCmdType)
|
||||
{
|
||||
case P2P_FIND_PHASE_WK:
|
||||
{
|
||||
find_phase_handler( padapter );
|
||||
break;
|
||||
}
|
||||
case P2P_RESTORE_STATE_WK:
|
||||
{
|
||||
restore_p2p_state_handler( padapter );
|
||||
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:
|
||||
{
|
||||
|
@ -3982,10 +3632,6 @@ _func_enter_;
|
|||
{
|
||||
return;
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type != IFACE_PORT0)
|
||||
return;
|
||||
#endif
|
||||
if (IELength <= _BEACON_IE_OFFSET_)
|
||||
return;
|
||||
|
||||
|
@ -4144,17 +3790,10 @@ u8 p2p_ps_wk_cmd(_adapter*padapter, u8 p2p_ps_state, u8 enqueue)
|
|||
|
||||
_func_enter_;
|
||||
|
||||
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)
|
||||
{
|
||||
if (enqueue) {
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (ph2c==NULL){
|
||||
res= _FAIL;
|
||||
|
@ -4287,26 +3926,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)
|
||||
{
|
||||
_adapter *adapter = (_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( _adapter* padapter )
|
||||
{
|
||||
struct wifidirect_info *pwdinfo;
|
||||
|
@ -4352,9 +3971,6 @@ void rtw_init_wifidirect_timers(_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(_adapter* padapter, u8 *dev_addr, u8 *iface_addr)
|
||||
|
@ -4378,15 +3994,7 @@ void init_wifidirect_info( _adapter* padapter, enum P2P_ROLE role)
|
|||
#ifdef CONFIG_WFD
|
||||
struct wifi_display_info *pwfd_info = &padapter->wfd_info;
|
||||
#endif
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_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;
|
||||
|
||||
pwdinfo->padapter = padapter;
|
||||
|
||||
/* 1, 6, 11 are the social channel defined in the WiFi Direct specification. */
|
||||
|
@ -4395,41 +4003,13 @@ void init_wifidirect_info( _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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
/* Use the channel 11 as the listen channel */
|
||||
pwdinfo->listen_channel = 11;
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -4501,17 +4081,6 @@ void init_wifidirect_info( _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
|
||||
pwdinfo->wfd_tdls_enable = 0;
|
||||
_rtw_memset( pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN );
|
||||
_rtw_memset( pwdinfo->p2p_peer_device_addr, 0x00, ETH_ALEN );
|
||||
|
@ -4608,19 +4177,6 @@ int rtw_p2p_enable(_adapter *padapter, enum P2P_ROLE role)
|
|||
u8 channel, ch_offset;
|
||||
u16 bwmode;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_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;
|
||||
|
@ -4658,9 +4214,6 @@ int rtw_p2p_enable(_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_role(pwdinfo, P2P_ROLE_DISABLE);
|
||||
_rtw_memset(&pwdinfo->rx_prov_disc_info, 0x00, sizeof(struct rx_provdisc_req_info));
|
||||
|
|
|
@ -266,11 +266,7 @@ void rtw_ps_processor(_adapter*padapter)
|
|||
}
|
||||
#endif /* SUPPORT_HW_RFOFF_DETECTED */
|
||||
|
||||
if (pwrpriv->ips_mode_req == IPS_NONE
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|| padapter->pbuddy_adapter->pwrctrlpriv.ips_mode_req == IPS_NONE
|
||||
#endif
|
||||
)
|
||||
if (pwrpriv->ips_mode_req == IPS_NONE)
|
||||
goto exit;
|
||||
|
||||
if (rtw_pwr_unassociated_idle(padapter) == false)
|
||||
|
@ -613,38 +609,6 @@ void LPS_Enter(PADAPTER padapter)
|
|||
|
||||
_func_enter_;
|
||||
|
||||
/* DBG_88E("+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;
|
||||
|
||||
|
@ -684,13 +648,6 @@ void LPS_Leave(PADAPTER padapter)
|
|||
|
||||
_func_enter_;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type != IFACE_PORT0)
|
||||
return; /* Skip power saving for concurrent mode port 1*/
|
||||
#endif
|
||||
|
||||
/* DBG_88E("+LeisurePSLeave\n"); */
|
||||
|
||||
if (pwrpriv->bLeisurePs)
|
||||
{
|
||||
if (pwrpriv->pwr_mode != PS_MODE_ACTIVE)
|
||||
|
@ -1506,17 +1463,6 @@ int _rtw_pwr_wakeup(_adapter *padapter, u32 ips_deffer_ms, const char *caller)
|
|||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
int ret = _SUCCESS;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->pbuddy_adapter)
|
||||
LeaveAllPowerSaveMode(padapter->pbuddy_adapter);
|
||||
|
||||
if ((padapter->isprimary == false) && padapter->pbuddy_adapter){
|
||||
padapter = padapter->pbuddy_adapter;
|
||||
pwrpriv = &padapter->pwrctrlpriv;
|
||||
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);
|
||||
|
||||
|
|
|
@ -227,16 +227,6 @@ int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue)
|
|||
|
||||
_func_enter_;
|
||||
|
||||
#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
|
||||
|
@ -597,9 +587,6 @@ _func_enter_;
|
|||
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
|
||||
|
|
|
@ -356,49 +356,22 @@ void Save_DM_Func_Flag(_adapter *padapter)
|
|||
{
|
||||
u8 bSaveFlag = true;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
if (pbuddy_adapter)
|
||||
rtw_hal_set_hwreg(pbuddy_adapter, HW_VAR_DM_FUNC_OP, (u8 *)(&bSaveFlag));
|
||||
#endif
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_DM_FUNC_OP, (u8 *)(&bSaveFlag));
|
||||
|
||||
}
|
||||
|
||||
void Restore_DM_Func_Flag(_adapter *padapter)
|
||||
{
|
||||
u8 bSaveFlag = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
if (pbuddy_adapter)
|
||||
rtw_hal_set_hwreg(pbuddy_adapter, HW_VAR_DM_FUNC_OP, (u8 *)(&bSaveFlag));
|
||||
#endif
|
||||
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_DM_FUNC_OP, (u8 *)(&bSaveFlag));
|
||||
}
|
||||
|
||||
void Switch_DM_Func(_adapter *padapter, u32 mode, u8 enable)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
#endif
|
||||
|
||||
if (enable == true)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (pbuddy_adapter)
|
||||
rtw_hal_set_hwreg(pbuddy_adapter, HW_VAR_DM_FUNC_SET, (u8 *)(&mode));
|
||||
#endif
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_DM_FUNC_SET, (u8 *)(&mode));
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (pbuddy_adapter)
|
||||
rtw_hal_set_hwreg(pbuddy_adapter, HW_VAR_DM_FUNC_CLR, (u8 *)(&mode));
|
||||
#endif
|
||||
rtw_hal_set_hwreg(padapter, HW_VAR_DM_FUNC_CLR, (u8 *)(&mode));
|
||||
}
|
||||
}
|
||||
|
||||
static void Set_NETYPE1_MSR(_adapter *padapter, u8 type)
|
||||
|
@ -413,72 +386,36 @@ static void Set_NETYPE0_MSR(_adapter *padapter, u8 type)
|
|||
|
||||
void Set_MSR(_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(_adapter *adapter)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (adapter->pcodatapriv)
|
||||
return adapter->pcodatapriv->co_ch;
|
||||
else
|
||||
#endif
|
||||
return adapter->mlmeextpriv.oper_channel;
|
||||
}
|
||||
|
||||
inline void rtw_set_oper_ch(_adapter *adapter, u8 ch)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (adapter->pcodatapriv)
|
||||
adapter->pcodatapriv->co_ch = ch;
|
||||
#endif
|
||||
adapter->mlmeextpriv.oper_channel = ch;
|
||||
}
|
||||
|
||||
inline u8 rtw_get_oper_bw(_adapter *adapter)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (adapter->pcodatapriv)
|
||||
return adapter->pcodatapriv->co_bw;
|
||||
else
|
||||
#endif
|
||||
return adapter->mlmeextpriv.oper_bwmode;
|
||||
}
|
||||
|
||||
inline void rtw_set_oper_bw(_adapter *adapter, u8 bw)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (adapter->pcodatapriv)
|
||||
adapter->pcodatapriv->co_bw = bw;
|
||||
#endif
|
||||
adapter->mlmeextpriv.oper_bwmode = bw;
|
||||
}
|
||||
|
||||
inline u8 rtw_get_oper_choffset(_adapter *adapter)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (adapter->pcodatapriv)
|
||||
return adapter->pcodatapriv->co_ch_offset;
|
||||
else
|
||||
#endif
|
||||
return adapter->mlmeextpriv.oper_ch_offset;
|
||||
}
|
||||
|
||||
inline void rtw_set_oper_choffset(_adapter *adapter, u8 offset)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (adapter->pcodatapriv)
|
||||
adapter->pcodatapriv->co_ch_offset = offset;
|
||||
#endif
|
||||
adapter->mlmeextpriv.oper_ch_offset = offset;
|
||||
}
|
||||
|
||||
|
@ -486,56 +423,21 @@ void SelectChannel(_adapter *padapter, unsigned char channel)
|
|||
{
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
/* saved channel info */
|
||||
rtw_set_oper_ch(padapter, channel);
|
||||
dc_SelectChannel(padapter, channel);
|
||||
#else /* CONFIG_DUALMAC_CONCURRENT */
|
||||
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_enter_critical_mutex(padapter->psetch_mutex, NULL);
|
||||
#endif
|
||||
|
||||
/* saved channel info */
|
||||
rtw_set_oper_ch(padapter, channel);
|
||||
|
||||
rtw_hal_set_chan(padapter, channel);
|
||||
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_exit_critical_mutex(padapter->psetch_mutex, NULL);
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_DUALMAC_CONCURRENT */
|
||||
}
|
||||
|
||||
void SetBWMode(_adapter *padapter, unsigned short bwmode, unsigned char channel_offset)
|
||||
{
|
||||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
/* saved bw info */
|
||||
rtw_set_oper_bw(padapter, bwmode);
|
||||
rtw_set_oper_choffset(padapter, channel_offset);
|
||||
dc_SetBWMode(padapter, bwmode, channel_offset);
|
||||
#else /* CONFIG_DUALMAC_CONCURRENT */
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_enter_critical_mutex(padapter->psetbw_mutex, NULL);
|
||||
#endif
|
||||
|
||||
/* saved bw info */
|
||||
rtw_set_oper_bw(padapter, bwmode);
|
||||
rtw_set_oper_choffset(padapter, channel_offset);
|
||||
|
||||
rtw_hal_set_bwmode(padapter, (HT_CHANNEL_WIDTH)bwmode, channel_offset);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_exit_critical_mutex(padapter->psetbw_mutex, NULL);
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_DUALMAC_CONCURRENT */
|
||||
}
|
||||
|
||||
void set_channel_bwmode(_adapter *padapter, unsigned char channel, unsigned char channel_offset, unsigned short bwmode)
|
||||
|
@ -569,35 +471,13 @@ void set_channel_bwmode(_adapter *padapter, unsigned char channel, unsigned char
|
|||
}
|
||||
|
||||
/* set Channel */
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
/* saved channel/bw info */
|
||||
rtw_set_oper_ch(padapter, channel);
|
||||
rtw_set_oper_bw(padapter, bwmode);
|
||||
rtw_set_oper_choffset(padapter, channel_offset);
|
||||
dc_SelectChannel(padapter, center_ch);/* set center channel */
|
||||
#else /* CONFIG_DUALMAC_CONCURRENT */
|
||||
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_enter_critical_mutex(padapter->psetch_mutex, NULL);
|
||||
#endif
|
||||
|
||||
/* saved channel/bw info */
|
||||
rtw_set_oper_ch(padapter, channel);
|
||||
rtw_set_oper_bw(padapter, bwmode);
|
||||
rtw_set_oper_choffset(padapter, channel_offset);
|
||||
|
||||
rtw_hal_set_chan(padapter, center_ch); /* set center channel */
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_exit_critical_mutex(padapter->psetch_mutex, NULL);
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_DUALMAC_CONCURRENT */
|
||||
|
||||
|
||||
SetBWMode(padapter, bwmode, channel_offset);
|
||||
|
||||
}
|
||||
|
||||
int get_bsstype(unsigned short capability)
|
||||
|
@ -788,50 +668,9 @@ void flush_all_cam_entry(_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 */
|
||||
|
||||
_rtw_memset((u8 *)(pmlmeinfo->FW_sta_info), 0, sizeof(pmlmeinfo->FW_sta_info));
|
||||
|
||||
}
|
||||
|
||||
#if defined(CONFIG_P2P) && defined(CONFIG_WFD)
|
||||
|
@ -2280,21 +2119,6 @@ int rtw_handle_dualmac(_adapter *adapter, bool init)
|
|||
pbuddy_padapter = NULL;
|
||||
DBG_88E("%s(): pbuddy_padapter exist, Exchange Information\n",__func__);
|
||||
}
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
if (dvobj->InterfaceNumber == 0) {
|
||||
/* set adapter_type/iface type */
|
||||
adapter->isprimary = true;
|
||||
adapter->adapter_type = PRIMARY_ADAPTER;
|
||||
adapter->iface_type = IFACE_PORT0;
|
||||
DBG_88E("%s(): PRIMARY_ADAPTER\n",__func__);
|
||||
} else {
|
||||
/* set adapter_type/iface type */
|
||||
adapter->isprimary = false;
|
||||
adapter->adapter_type = SECONDARY_ADAPTER;
|
||||
adapter->iface_type = IFACE_PORT1;
|
||||
DBG_88E("%s(): SECONDARY_ADAPTER\n",__func__);
|
||||
}
|
||||
#endif
|
||||
}else {
|
||||
pbuddy_padapter = NULL;
|
||||
}
|
||||
|
|
|
@ -813,13 +813,6 @@ static s32 update_attrib(_adapter *padapter, _pkt *pkt, struct pkt_attrib *pattr
|
|||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue