mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2024-11-25 14:03:40 +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;
|
||||
|
|
|
@ -340,10 +340,6 @@ Hal_MappingOutPipe(
|
|||
void hal_init_macaddr(_adapter *adapter)
|
||||
{
|
||||
rtw_hal_set_hwreg(adapter, HW_VAR_MAC_ADDR, adapter->eeprompriv.mac_addr);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (adapter->pbuddy_adapter)
|
||||
rtw_hal_set_hwreg(adapter->pbuddy_adapter, HW_VAR_MAC_ADDR, adapter->pbuddy_adapter->eeprompriv.mac_addr);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -88,37 +88,6 @@ uint rtw_hal_init(_adapter *padapter)
|
|||
{
|
||||
uint status = _SUCCESS;
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
if (padapter->hw_init_completed == true)
|
||||
{
|
||||
DBG_88E("rtw_hal_init: hw_init_completed == true\n");
|
||||
return status;
|
||||
}
|
||||
|
||||
/* before init mac0, driver must init mac1 first to avoid usb rx error. */
|
||||
if ((padapter->pbuddy_adapter != NULL) && (padapter->DualMacConcurrent == true)
|
||||
&& (padapter->adapter_type == PRIMARY_ADAPTER))
|
||||
{
|
||||
if (padapter->pbuddy_adapter->hw_init_completed == true)
|
||||
{
|
||||
DBG_88E("rtw_hal_init: pbuddy_adapter hw_init_completed == true\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
status = padapter->HalFunc.hal_init(padapter->pbuddy_adapter);
|
||||
if (status == _SUCCESS){
|
||||
padapter->pbuddy_adapter->hw_init_completed = true;
|
||||
}
|
||||
else{
|
||||
padapter->pbuddy_adapter->hw_init_completed = false;
|
||||
RT_TRACE(_module_hal_init_c_,_drv_err_,("rtw_hal_init: hal__init fail(pbuddy_adapter)\n"));
|
||||
DBG_88E("rtw_hal_init: hal__init fail(pbuddy_adapter)\n");
|
||||
return status;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
padapter->hw_init_completed=false;
|
||||
|
||||
status = padapter->HalFunc.hal_init(padapter);
|
||||
|
@ -312,13 +281,6 @@ void rtw_hal_add_ra_tid(_adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level)
|
|||
if (padapter->HalFunc.Add_RateATid)
|
||||
padapter->HalFunc.Add_RateATid(padapter, bitmap, arg, rssi_level);
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
void rtw_hal_clone_data(_adapter *dst_padapter, _adapter *src_padapter)
|
||||
{
|
||||
if (dst_padapter->HalFunc.clone_haldata)
|
||||
dst_padapter->HalFunc.clone_haldata(dst_padapter, src_padapter);
|
||||
}
|
||||
#endif
|
||||
/* Start specifical interface thread */
|
||||
void rtw_hal_start_thread(_adapter *padapter)
|
||||
{
|
||||
|
@ -379,10 +341,6 @@ void rtw_hal_set_chan(_adapter *padapter, u8 channel)
|
|||
|
||||
void rtw_hal_dm_watchdog(_adapter *padapter)
|
||||
{
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
if (padapter->adapter_type != PRIMARY_ADAPTER)
|
||||
return;
|
||||
#endif
|
||||
if (padapter->HalFunc.hal_dm_watchdog)
|
||||
padapter->HalFunc.hal_dm_watchdog(padapter);
|
||||
}
|
||||
|
@ -437,10 +395,6 @@ void rtw_hal_sreset_reset_value(_adapter *padapter)
|
|||
|
||||
void rtw_hal_sreset_xmit_status_check(_adapter *padapter)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->adapter_type != PRIMARY_ADAPTER)
|
||||
return;
|
||||
#endif
|
||||
if (padapter->HalFunc.sreset_xmit_status_check)
|
||||
padapter->HalFunc.sreset_xmit_status_check(padapter);
|
||||
}
|
||||
|
|
35
hal/odm.c
35
hal/odm.c
|
@ -3898,31 +3898,6 @@ FindMinimumRSSI(
|
|||
struct mlme_priv *pmlmepriv = &pAdapter->mlmepriv;
|
||||
|
||||
/* 1 1.Determine the minimum RSSI */
|
||||
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
/* FindMinimumRSSI() per-adapter */
|
||||
if (rtw_buddy_adapter_up(pAdapter)){
|
||||
PADAPTER pbuddy_adapter = pAdapter->pbuddy_adapter;
|
||||
PHAL_DATA_TYPE pbuddy_HalData = GET_HAL_DATA(pbuddy_adapter);
|
||||
struct dm_priv *pbuddy_dmpriv = &pbuddy_HalData->dmpriv;
|
||||
|
||||
if ((pdmpriv->EntryMinUndecoratedSmoothedPWDB != 0) &&
|
||||
(pbuddy_dmpriv->EntryMinUndecoratedSmoothedPWDB != 0))
|
||||
{
|
||||
|
||||
if (pdmpriv->EntryMinUndecoratedSmoothedPWDB > pbuddy_dmpriv->EntryMinUndecoratedSmoothedPWDB)
|
||||
pdmpriv->EntryMinUndecoratedSmoothedPWDB = pbuddy_dmpriv->EntryMinUndecoratedSmoothedPWDB;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (pdmpriv->EntryMinUndecoratedSmoothedPWDB == 0)
|
||||
pdmpriv->EntryMinUndecoratedSmoothedPWDB = pbuddy_dmpriv->EntryMinUndecoratedSmoothedPWDB;
|
||||
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((check_fwstate(pmlmepriv, _FW_LINKED) == false) &&
|
||||
(pdmpriv->EntryMinUndecoratedSmoothedPWDB == 0))
|
||||
{
|
||||
|
@ -3956,13 +3931,8 @@ odm_RSSIMonitorCheckCE(
|
|||
u8 sta_cnt=0;
|
||||
u32 PWDB_rssi[NUM_STA]={0};/* 0~15]:MACID, [16~31]:PWDB_rssi */
|
||||
|
||||
if (!check_fwstate(&Adapter->mlmepriv, _FW_LINKED)
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
&& !check_buddy_fwstate(Adapter, _FW_LINKED)
|
||||
#endif
|
||||
) {
|
||||
if (!check_fwstate(&Adapter->mlmepriv, _FW_LINKED))
|
||||
return;
|
||||
}
|
||||
|
||||
{
|
||||
struct sta_info *psta;
|
||||
|
@ -3974,9 +3944,6 @@ odm_RSSIMonitorCheckCE(
|
|||
&& (psta->state & WIFI_ASOC_STATE)
|
||||
&& _rtw_memcmp(psta->hwaddr, bcast_addr, ETH_ALEN) == false
|
||||
&& _rtw_memcmp(psta->hwaddr, myid(&Adapter->eeprompriv), ETH_ALEN) == false
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
&& (!Adapter->pbuddy_adapter || _rtw_memcmp(psta->hwaddr, myid(&Adapter->pbuddy_adapter->eeprompriv), ETH_ALEN) == false)
|
||||
#endif
|
||||
) {
|
||||
if (psta->rssi_stat.UndecoratedSmoothedPWDB < tmpEntryMinPWDB)
|
||||
tmpEntryMinPWDB = psta->rssi_stat.UndecoratedSmoothedPWDB;
|
||||
|
|
|
@ -91,19 +91,6 @@ _func_enter_;
|
|||
return ret;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
|
||||
if (padapter->adapter_type > PRIMARY_ADAPTER)
|
||||
{
|
||||
padapter = padapter->pbuddy_adapter;
|
||||
}
|
||||
|
||||
pHalData = GET_HAL_DATA(padapter);
|
||||
|
||||
_enter_critical_mutex(padapter->ph2c_fwcmd_mutex, NULL);
|
||||
|
||||
#endif
|
||||
|
||||
if (!pCmdBuffer) {
|
||||
goto exit;
|
||||
}
|
||||
|
@ -165,10 +152,6 @@ _func_enter_;
|
|||
|
||||
exit:
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_exit_critical_mutex(padapter->ph2c_fwcmd_mutex, NULL);
|
||||
#endif
|
||||
|
||||
_func_exit_;
|
||||
|
||||
return ret;
|
||||
|
@ -228,11 +211,6 @@ void rtl8188e_Add_RateATid(PADAPTER pAdapter, u32 bitmap, u8 arg, u8 rssi_level)
|
|||
|
||||
u8 macid, init_rate, raid, shortGIrate=false;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(pAdapter) && pAdapter->adapter_type > PRIMARY_ADAPTER)
|
||||
pHalData = GET_HAL_DATA(pAdapter->pbuddy_adapter);
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
macid = arg&0x1f;
|
||||
|
||||
#ifdef CONFIG_ODM_REFRESH_RAMASK
|
||||
|
|
|
@ -278,35 +278,17 @@ rtl8188e_HalDmWatchDog(
|
|||
PHAL_DATA_TYPE pHalData = GET_HAL_DATA(Adapter);
|
||||
struct dm_priv *pdmpriv = &pHalData->dmpriv;
|
||||
PDM_ODM_T pDM_Odm = &(pHalData->odmpriv);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
PADAPTER pbuddy_adapter = Adapter->pbuddy_adapter;
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
_func_enter_;
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
if (Adapter->isprimary == false && pbuddy_adapter) {
|
||||
hw_init_completed = pbuddy_adapter->hw_init_completed;
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
hw_init_completed = Adapter->hw_init_completed;
|
||||
}
|
||||
hw_init_completed = Adapter->hw_init_completed;
|
||||
|
||||
if (hw_init_completed == false)
|
||||
goto skip_dm;
|
||||
|
||||
#ifdef CONFIG_LPS
|
||||
#if defined(CONFIG_CONCURRENT_MODE)
|
||||
if (Adapter->iface_type != IFACE_PORT0 && pbuddy_adapter) {
|
||||
bFwCurrentInPSMode = pbuddy_adapter->pwrctrlpriv.bFwCurrentInPSMode;
|
||||
rtw_hal_get_hwreg(pbuddy_adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
bFwCurrentInPSMode = Adapter->pwrctrlpriv.bFwCurrentInPSMode;
|
||||
rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
|
||||
}
|
||||
bFwCurrentInPSMode = Adapter->pwrctrlpriv.bFwCurrentInPSMode;
|
||||
rtw_hal_get_hwreg(Adapter, HW_VAR_FWLPS_RF_ON, (u8 *)(&bFwPSAwake));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_P2P_PS
|
||||
|
@ -324,11 +306,6 @@ rtl8188e_HalDmWatchDog(
|
|||
/* */
|
||||
dm_CheckStatistics(Adapter);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (Adapter->adapter_type > PRIMARY_ADAPTER)
|
||||
goto _record_initrate;
|
||||
#endif
|
||||
|
||||
_record_initrate:
|
||||
_func_exit_;
|
||||
}
|
||||
|
@ -354,11 +331,6 @@ _record_initrate:
|
|||
bLinked = true;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fw_link(Adapter))
|
||||
bLinked = true;
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
ODM_CmnInfoUpdate(&pHalData->odmpriv ,ODM_CMNINFO_LINK, bLinked);
|
||||
ODM_DMWatchdog(&pHalData->odmpriv);
|
||||
|
||||
|
|
|
@ -2491,13 +2491,6 @@ static void rtl8188e_SetHalODMVar(
|
|||
case HAL_ODM_STA_INFO:
|
||||
{
|
||||
struct sta_info *psta = (struct sta_info *)pValue1;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
/* get Primary adapter's odmpriv */
|
||||
if (Adapter->adapter_type > PRIMARY_ADAPTER){
|
||||
pHalData = GET_HAL_DATA(Adapter->pbuddy_adapter);
|
||||
podmpriv = &pHalData->odmpriv;
|
||||
}
|
||||
#endif
|
||||
if (bSet){
|
||||
DBG_88E("### Set STA_(%d) info\n",psta->mac_id);
|
||||
ODM_CmnInfoPtrArrayHook(podmpriv, ODM_CMNINFO_STA_STATUS,psta->mac_id,psta);
|
||||
|
@ -2560,9 +2553,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
|
|||
pHalFunc->hal_dm_watchdog = &rtl8188e_HalDmWatchDog;
|
||||
|
||||
pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
pHalFunc->clone_haldata = &rtl8188e_clone_haldata;
|
||||
#endif
|
||||
pHalFunc->run_thread= &rtl8188e_start_thread;
|
||||
pHalFunc->cancel_thread= &rtl8188e_stop_thread;
|
||||
|
||||
|
|
|
@ -285,12 +285,6 @@ void update_recvframe_phyinfo_88e(
|
|||
pkt_info.StationID = psta->mac_id;
|
||||
pkt_info.Rate = pattrib->mcs_rate;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
/* get Primary adapter's odmpriv */
|
||||
if (padapter->adapter_type > PRIMARY_ADAPTER){
|
||||
pHalData = GET_HAL_DATA(padapter->pbuddy_adapter);
|
||||
}
|
||||
#endif
|
||||
ODM_PhyStatusQuery(&pHalData->odmpriv,pPHYInfo,(u8 *)pphy_status,&(pkt_info));
|
||||
|
||||
precvframe->u.hdr.psta = NULL;
|
||||
|
|
|
@ -220,11 +220,6 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz ,u8 bag
|
|||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter) && padapter->adapter_type > PRIMARY_ADAPTER)
|
||||
pHalData = GET_HAL_DATA(padapter->pbuddy_adapter);
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
#ifndef CONFIG_USE_USB_BUFFER_ALLOC_TX
|
||||
if (padapter->registrypriv.mp_mode == 0)
|
||||
{
|
||||
|
@ -1038,10 +1033,6 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
|
||||
struct pkt_attrib *pattrib = &pxmitframe->attrib;
|
||||
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
PADAPTER pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv);
|
||||
#endif
|
||||
|
||||
_enter_critical_bh(&pxmitpriv->lock, &irqL);
|
||||
|
||||
|
@ -1054,11 +1045,6 @@ static s32 pre_xmitframe(_adapter *padapter, struct xmit_frame *pxmitframe)
|
|||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
goto enqueue;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
goto enqueue;
|
||||
#endif
|
||||
|
||||
pxmitbuf = rtw_alloc_xmitbuf(pxmitpriv);
|
||||
if (pxmitbuf == NULL)
|
||||
goto enqueue;
|
||||
|
|
|
@ -286,14 +286,9 @@ _SetMacID(
|
|||
)
|
||||
{
|
||||
u32 i;
|
||||
for (i=0 ; i< MAC_ADDR_LEN ; i++){
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
rtw_write32(Adapter, REG_MACID1+i, MacID[i]);
|
||||
else
|
||||
#endif
|
||||
|
||||
for (i=0 ; i< MAC_ADDR_LEN ; i++)
|
||||
rtw_write32(Adapter, REG_MACID+i, MacID[i]);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -302,14 +297,9 @@ _SetBSSID(
|
|||
)
|
||||
{
|
||||
u32 i;
|
||||
for (i=0 ; i< MAC_ADDR_LEN ; i++){
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
rtw_write32(Adapter, REG_BSSID1+i, BSSID[i]);
|
||||
else
|
||||
#endif
|
||||
|
||||
for (i=0 ; i< MAC_ADDR_LEN ; i++)
|
||||
rtw_write32(Adapter, REG_BSSID+i, BSSID[i]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1489,7 +1479,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC02);
|
|||
rtw_write8(Adapter, REG_EARLY_MODE_CONTROL, 0);
|
||||
}
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_TX_MCAST2UNI)
|
||||
#if defined(CONFIG_TX_MCAST2UNI)
|
||||
|
||||
#ifdef CONFIG_CHECK_AC_LIFETIME
|
||||
/* Enable lifetime check for the four ACs */
|
||||
|
@ -1503,7 +1493,7 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC02);
|
|||
rtw_write16(Adapter, REG_PKT_VO_VI_LIFE_TIME, 0x3000); /* unit: 256us. 3s */
|
||||
rtw_write16(Adapter, REG_PKT_BE_BK_LIFE_TIME, 0x3000); /* unit: 256us. 3s */
|
||||
#endif /* CONFIG_TX_MCAST2UNI */
|
||||
#endif /* CONFIG_CONCURRENT_MODE || CONFIG_TX_MCAST2UNI */
|
||||
#endif /* CONFIG_TX_MCAST2UNI */
|
||||
|
||||
|
||||
#ifdef CONFIG_LED
|
||||
|
@ -2290,112 +2280,6 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8* val)
|
|||
u8 val8;
|
||||
u8 mode = *((u8 *)val);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
{
|
||||
/* disable Port1 TSF update */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)|BIT(4));
|
||||
|
||||
/* set net_type */
|
||||
val8 = rtw_read8(Adapter, MSR)&0x03;
|
||||
val8 |= (mode<<2);
|
||||
rtw_write8(Adapter, MSR, val8);
|
||||
|
||||
DBG_88E("%s()-%d mode = %d\n", __func__, __LINE__, mode);
|
||||
|
||||
if ((mode == _HW_STATE_STATION_) || (mode == _HW_STATE_NOLINK_))
|
||||
{
|
||||
if (!check_buddy_mlmeinfo_state(Adapter, WIFI_FW_AP_STATE))
|
||||
{
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
|
||||
rtw_write8(Adapter, REG_DRVERLYINT, 0x05);/* restore early int time to 5ms */
|
||||
UpdateInterruptMask8188EU(Adapter,true, 0, IMR_BCNDMAINT0_88E);
|
||||
#endif /* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
|
||||
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
|
||||
UpdateInterruptMask8188EU(Adapter,true ,0, (IMR_TBDER_88E|IMR_TBDOK_88E));
|
||||
#endif/* CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */
|
||||
|
||||
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
|
||||
|
||||
|
||||
StopTxBeacon(Adapter);
|
||||
}
|
||||
|
||||
rtw_write8(Adapter,REG_BCN_CTRL_1, 0x19);/* disable atim wnd */
|
||||
/* rtw_write8(Adapter,REG_BCN_CTRL_1, 0x18); */
|
||||
}
|
||||
else if ((mode == _HW_STATE_ADHOC_) /*|| (mode == _HW_STATE_AP_)*/)
|
||||
{
|
||||
ResumeTxBeacon(Adapter);
|
||||
rtw_write8(Adapter,REG_BCN_CTRL_1, 0x1a);
|
||||
}
|
||||
else if (mode == _HW_STATE_AP_)
|
||||
{
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
|
||||
UpdateInterruptMask8188EU(Adapter,true ,IMR_BCNDMAINT0_88E, 0);
|
||||
#endif/* CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT */
|
||||
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
|
||||
UpdateInterruptMask8188EU(Adapter,true ,(IMR_TBDER_88E|IMR_TBDOK_88E), 0);
|
||||
#endif/* CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR */
|
||||
|
||||
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
|
||||
|
||||
ResumeTxBeacon(Adapter);
|
||||
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, 0x12);
|
||||
|
||||
/* Set RCR */
|
||||
rtw_write32(Adapter, REG_RCR, 0x7000208e);/* CBSSID_DATA must set to 0,reject ICV_ERR packet */
|
||||
/* enable to rx data frame */
|
||||
rtw_write16(Adapter, REG_RXFLTMAP2, 0xFFFF);
|
||||
/* enable to rx ps-poll */
|
||||
rtw_write16(Adapter, REG_RXFLTMAP1, 0x0400);
|
||||
|
||||
/* Beacon Control related register for first time */
|
||||
rtw_write8(Adapter, REG_BCNDMATIM, 0x02); /* 2ms */
|
||||
|
||||
rtw_write8(Adapter, REG_ATIMWND_1, 0x0a); /* 10ms for port1 */
|
||||
rtw_write16(Adapter, REG_BCNTCFG, 0x00);
|
||||
rtw_write16(Adapter, REG_TBTT_PROHIBIT, 0xff04);
|
||||
rtw_write16(Adapter, REG_TSFTR_SYN_OFFSET, 0x7fff);/* +32767 (~32ms) */
|
||||
|
||||
/* reset TSF2 */
|
||||
rtw_write8(Adapter, REG_DUAL_TSF_RST, BIT(1));
|
||||
|
||||
|
||||
/* BIT4 - If set 0, hw will clr bcnq when tx becon ok/fail or port 1 */
|
||||
rtw_write8(Adapter, REG_MBID_NUM, rtw_read8(Adapter, REG_MBID_NUM)|BIT(3)|BIT(4));
|
||||
/* enable BCN1 Function for if2 */
|
||||
/* don't enable update TSF1 for if2 (due to TSF update when beacon/probe rsp are received) */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, (DIS_TSF_UDT0_NORMAL_CHIP|EN_BCN_FUNCTION | EN_TXBCN_RPT|BIT(1)));
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(Adapter, WIFI_FW_NULL_STATE))
|
||||
rtw_write8(Adapter, REG_BCN_CTRL,
|
||||
rtw_read8(Adapter, REG_BCN_CTRL) & ~EN_BCN_FUNCTION);
|
||||
#endif
|
||||
/* BCN1 TSF will sync to BCN0 TSF with offset(0x518) if if1_sta linked */
|
||||
|
||||
/* dis BCN0 ATIM WND if if1 is station */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(0));
|
||||
|
||||
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
||||
/* Reset TSF for STA+AP concurrent mode */
|
||||
if ( check_buddy_fwstate(Adapter, (WIFI_STATION_STATE|WIFI_ASOC_STATE)) ) {
|
||||
if (reset_tsf(Adapter, IFACE_PORT1) == false)
|
||||
DBG_88E("ERROR! %s()-%d: Reset port1 TSF fail\n",
|
||||
__func__, __LINE__);
|
||||
}
|
||||
#endif /* CONFIG_TSF_RESET_OFFLOAD */
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
{
|
||||
/* disable Port0 TSF update */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(4));
|
||||
|
@ -2409,9 +2293,6 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8* val)
|
|||
|
||||
if ((mode == _HW_STATE_STATION_) || (mode == _HW_STATE_NOLINK_))
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (!check_buddy_mlmeinfo_state(Adapter, WIFI_FW_AP_STATE))
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
{
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
|
||||
|
@ -2482,12 +2363,6 @@ static void hw_var_set_opmode(PADAPTER Adapter, u8 variable, u8* val)
|
|||
rtw_write8(Adapter, REG_BCN_CTRL, (DIS_TSF_UDT0_NORMAL_CHIP|EN_BCN_FUNCTION |BIT(1)));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(Adapter, WIFI_FW_NULL_STATE))
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1,
|
||||
rtw_read8(Adapter, REG_BCN_CTRL_1) & ~EN_BCN_FUNCTION);
|
||||
#endif
|
||||
|
||||
/* dis BCN1 ATIM WND if if2 is station */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)|BIT(0));
|
||||
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
||||
|
@ -2508,22 +2383,10 @@ static void hw_var_set_macaddr(PADAPTER Adapter, u8 variable, u8* val)
|
|||
u8 idx = 0;
|
||||
u32 reg_macid;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
{
|
||||
reg_macid = REG_MACID1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
reg_macid = REG_MACID;
|
||||
}
|
||||
reg_macid = REG_MACID;
|
||||
|
||||
for (idx = 0 ; idx < 6; idx++)
|
||||
{
|
||||
rtw_write8(Adapter, (reg_macid+idx), val[idx]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void hw_var_set_bssid(PADAPTER Adapter, u8 variable, u8* val)
|
||||
|
@ -2531,307 +2394,38 @@ static void hw_var_set_bssid(PADAPTER Adapter, u8 variable, u8* val)
|
|||
u8 idx = 0;
|
||||
u32 reg_bssid;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
{
|
||||
reg_bssid = REG_BSSID1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
reg_bssid = REG_BSSID;
|
||||
}
|
||||
reg_bssid = REG_BSSID;
|
||||
|
||||
for (idx = 0 ; idx < 6; idx++)
|
||||
{
|
||||
rtw_write8(Adapter, (reg_bssid+idx), val[idx]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void hw_var_set_bcn_func(PADAPTER Adapter, u8 variable, u8* val)
|
||||
{
|
||||
u32 bcn_ctrl_reg;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
{
|
||||
bcn_ctrl_reg = REG_BCN_CTRL_1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
bcn_ctrl_reg = REG_BCN_CTRL;
|
||||
}
|
||||
bcn_ctrl_reg = REG_BCN_CTRL;
|
||||
|
||||
if (*((u8 *)val))
|
||||
{
|
||||
rtw_write8(Adapter, bcn_ctrl_reg, (EN_BCN_FUNCTION | EN_TXBCN_RPT));
|
||||
}
|
||||
else
|
||||
{
|
||||
rtw_write8(Adapter, bcn_ctrl_reg, rtw_read8(Adapter, bcn_ctrl_reg)&(~(EN_BCN_FUNCTION | EN_TXBCN_RPT)));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
static void hw_var_set_correct_tsf(PADAPTER Adapter, u8 variable, u8* val)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u64 tsf;
|
||||
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
PADAPTER pbuddy_adapter = Adapter->pbuddy_adapter;
|
||||
|
||||
tsf = pmlmeext->TSFValue - rtw_modular64(pmlmeext->TSFValue, (pmlmeinfo->bcn_interval*1024)) -1024; /* us */
|
||||
|
||||
if (((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE))
|
||||
{
|
||||
StopTxBeacon(Adapter);
|
||||
}
|
||||
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
{
|
||||
/* disable related TSF function */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)&(~BIT(3)));
|
||||
|
||||
rtw_write32(Adapter, REG_TSFTR1, tsf);
|
||||
rtw_write32(Adapter, REG_TSFTR1+4, tsf>>32);
|
||||
|
||||
|
||||
/* enable related TSF function */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)|BIT(3));
|
||||
|
||||
/* Update buddy port's TSF if it is SoftAP for beacon TX issue! */
|
||||
if ( (pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE
|
||||
&& check_buddy_fwstate(Adapter, WIFI_AP_STATE)
|
||||
) {
|
||||
/* disable related TSF function */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(3)));
|
||||
|
||||
rtw_write32(Adapter, REG_TSFTR, tsf);
|
||||
rtw_write32(Adapter, REG_TSFTR+4, tsf>>32);
|
||||
|
||||
/* enable related TSF function */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(3));
|
||||
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
||||
/* Update buddy port's TSF(TBTT) if it is SoftAP for beacon TX issue! */
|
||||
if (reset_tsf(Adapter, IFACE_PORT0) == false)
|
||||
DBG_88E("ERROR! %s()-%d: Reset port0 TSF fail\n",
|
||||
__func__, __LINE__);
|
||||
|
||||
#endif /* CONFIG_TSF_RESET_OFFLOAD */
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
/* disable related TSF function */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(3)));
|
||||
|
||||
rtw_write32(Adapter, REG_TSFTR, tsf);
|
||||
rtw_write32(Adapter, REG_TSFTR+4, tsf>>32);
|
||||
|
||||
/* enable related TSF function */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(3));
|
||||
|
||||
/* Update buddy port's TSF if it is SoftAP for beacon TX issue! */
|
||||
if ( (pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE
|
||||
&& check_buddy_fwstate(Adapter, WIFI_AP_STATE)
|
||||
) {
|
||||
/* disable related TSF function */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)&(~BIT(3)));
|
||||
|
||||
rtw_write32(Adapter, REG_TSFTR1, tsf);
|
||||
rtw_write32(Adapter, REG_TSFTR1+4, tsf>>32);
|
||||
|
||||
/* enable related TSF function */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)|BIT(3));
|
||||
#ifdef CONFIG_TSF_RESET_OFFLOAD
|
||||
/* Update buddy port's TSF if it is SoftAP for beacon TX issue! */
|
||||
if (reset_tsf(Adapter, IFACE_PORT1) == false)
|
||||
DBG_88E("ERROR! %s()-%d: Reset port1 TSF fail\n",
|
||||
__func__, __LINE__);
|
||||
#endif /* CONFIG_TSF_RESET_OFFLOAD */
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE))
|
||||
{
|
||||
ResumeTxBeacon(Adapter);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void hw_var_set_mlme_disconnect(PADAPTER Adapter, u8 variable, u8* val)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
PADAPTER pbuddy_adapter = Adapter->pbuddy_adapter;
|
||||
|
||||
|
||||
if (check_buddy_mlmeinfo_state(Adapter, _HW_STATE_NOLINK_))
|
||||
rtw_write16(Adapter, REG_RXFLTMAP2, 0x00);
|
||||
|
||||
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
{
|
||||
/* reset TSF1 */
|
||||
rtw_write8(Adapter, REG_DUAL_TSF_RST, BIT(1));
|
||||
|
||||
/* disable update TSF1 */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)|BIT(4));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* reset TSF */
|
||||
rtw_write8(Adapter, REG_DUAL_TSF_RST, BIT(0));
|
||||
|
||||
/* disable update TSF */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(4));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void hw_var_set_mlme_sitesurvey(PADAPTER Adapter, u8 variable, u8* val)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
|
||||
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
|
||||
if (*((u8 *)val))/* under sitesurvey */
|
||||
{
|
||||
/* config RCR to receive different BSSID & not to receive data frame */
|
||||
u32 v = rtw_read32(Adapter, REG_RCR);
|
||||
v &= ~(RCR_CBSSID_BCN);
|
||||
rtw_write32(Adapter, REG_RCR, v);
|
||||
|
||||
/* disable update TSF */
|
||||
if ((pmlmeinfo->state&0x03) == WIFI_FW_STATION_STATE)
|
||||
{
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
{
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)|BIT(4));
|
||||
}
|
||||
else
|
||||
{
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(4));
|
||||
}
|
||||
}
|
||||
|
||||
if (check_buddy_mlmeinfo_state(Adapter, WIFI_FW_AP_STATE) &&
|
||||
check_buddy_fwstate(Adapter, _FW_LINKED))
|
||||
{
|
||||
StopTxBeacon(Adapter);
|
||||
}
|
||||
}
|
||||
else/* sitesurvey done */
|
||||
{
|
||||
/* enable to rx data frame */
|
||||
rtw_write16(Adapter, REG_RXFLTMAP2,0xFFFF);
|
||||
|
||||
/* enable update TSF */
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)&(~BIT(4)));
|
||||
else
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(4)));
|
||||
|
||||
rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_BCN);
|
||||
|
||||
if (check_buddy_mlmeinfo_state(Adapter, WIFI_FW_AP_STATE) &&
|
||||
check_buddy_fwstate(Adapter, _FW_LINKED))
|
||||
{
|
||||
ResumeTxBeacon(Adapter);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void hw_var_set_mlme_join(PADAPTER Adapter, u8 variable, u8* val)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 RetryLimit = 0x30;
|
||||
u8 type = *((u8 *)val);
|
||||
HAL_DATA_TYPE *pHalData = GET_HAL_DATA(Adapter);
|
||||
struct mlme_priv *pmlmepriv = &Adapter->mlmepriv;
|
||||
|
||||
if (type == 0) /* prepare to join */
|
||||
{
|
||||
if (check_buddy_mlmeinfo_state(Adapter, WIFI_FW_AP_STATE) &&
|
||||
check_buddy_fwstate(Adapter, _FW_LINKED))
|
||||
{
|
||||
StopTxBeacon(Adapter);
|
||||
}
|
||||
|
||||
/* enable to rx data frame.Accept all data frame */
|
||||
rtw_write16(Adapter, REG_RXFLTMAP2,0xFFFF);
|
||||
|
||||
if (check_buddy_mlmeinfo_state(Adapter, WIFI_FW_AP_STATE))
|
||||
rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_BCN);
|
||||
else
|
||||
rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_DATA|RCR_CBSSID_BCN);
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) == true)
|
||||
{
|
||||
RetryLimit = (pHalData->CustomerID == RT_CID_CCX) ? 7 : 48;
|
||||
}
|
||||
else /* Ad-hoc Mode */
|
||||
{
|
||||
RetryLimit = 0x7;
|
||||
}
|
||||
}
|
||||
else if (type == 1) /* joinbss_event call back when join res < 0 */
|
||||
{
|
||||
if (check_buddy_mlmeinfo_state(Adapter, _HW_STATE_NOLINK_))
|
||||
rtw_write16(Adapter, REG_RXFLTMAP2,0x00);
|
||||
|
||||
if (check_buddy_mlmeinfo_state(Adapter, WIFI_FW_AP_STATE) &&
|
||||
check_buddy_fwstate(Adapter, _FW_LINKED))
|
||||
{
|
||||
ResumeTxBeacon(Adapter);
|
||||
|
||||
/* reset TSF 1/2 after ResumeTxBeacon */
|
||||
rtw_write8(Adapter, REG_DUAL_TSF_RST, BIT(1)|BIT(0));
|
||||
|
||||
}
|
||||
}
|
||||
else if (type == 2) /* sta add event call back */
|
||||
{
|
||||
|
||||
/* enable update TSF */
|
||||
if (Adapter->iface_type == IFACE_PORT1)
|
||||
rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1)&(~BIT(4)));
|
||||
else
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(4)));
|
||||
|
||||
|
||||
if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE))
|
||||
{
|
||||
/* fixed beacon issue for 8191su........... */
|
||||
rtw_write8(Adapter,0x542 ,0x02);
|
||||
RetryLimit = 0x7;
|
||||
}
|
||||
|
||||
|
||||
if (check_buddy_mlmeinfo_state(Adapter, WIFI_FW_AP_STATE) &&
|
||||
check_buddy_fwstate(Adapter, _FW_LINKED))
|
||||
{
|
||||
ResumeTxBeacon(Adapter);
|
||||
|
||||
/* reset TSF 1/2 after ResumeTxBeacon */
|
||||
rtw_write8(Adapter, REG_DUAL_TSF_RST, BIT(1)|BIT(0));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
rtw_write16(Adapter, REG_RL, RetryLimit << RETRY_LIMIT_SHORT_SHIFT | RetryLimit << RETRY_LIMIT_LONG_SHIFT);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
static void SetHwReg8188EU(PADAPTER Adapter, u8 variable, u8* val)
|
||||
|
@ -2912,9 +2506,6 @@ _func_enter_;
|
|||
hw_var_set_bcn_func(Adapter, variable, val);
|
||||
break;
|
||||
case HW_VAR_CORRECT_TSF:
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
hw_var_set_correct_tsf(Adapter, variable, val);
|
||||
#else
|
||||
{
|
||||
u64 tsf;
|
||||
struct mlme_ext_priv *pmlmeext = &Adapter->mlmeextpriv;
|
||||
|
@ -2942,7 +2533,6 @@ _func_enter_;
|
|||
ResumeTxBeacon(Adapter);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case HW_VAR_CHECK_BSSID:
|
||||
if (*((u8 *)val))
|
||||
|
@ -2961,9 +2551,6 @@ _func_enter_;
|
|||
}
|
||||
break;
|
||||
case HW_VAR_MLME_DISCONNECT:
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
hw_var_set_mlme_disconnect(Adapter, variable, val);
|
||||
#else
|
||||
{
|
||||
/* Set RCR to not to receive data frame when NO LINK state */
|
||||
/* reject all data frames */
|
||||
|
@ -2975,12 +2562,8 @@ _func_enter_;
|
|||
/* disable update TSF */
|
||||
rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(4));
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case HW_VAR_MLME_SITESURVEY:
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
hw_var_set_mlme_sitesurvey(Adapter, variable, val);
|
||||
#else
|
||||
if (*((u8 *)val))/* under sitesurvey */
|
||||
{
|
||||
/* config RCR to receive different BSSID & not to receive data frame */
|
||||
|
@ -3031,12 +2614,8 @@ _func_enter_;
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case HW_VAR_MLME_JOIN:
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
hw_var_set_mlme_join(Adapter, variable, val);
|
||||
#else
|
||||
{
|
||||
u8 RetryLimit = 0x30;
|
||||
u8 type = *((u8 *)val);
|
||||
|
@ -3084,7 +2663,6 @@ _func_enter_;
|
|||
|
||||
rtw_write16(Adapter, REG_RL, RetryLimit << RETRY_LIMIT_SHORT_SHIFT | RetryLimit << RETRY_LIMIT_LONG_SHIFT);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case HW_VAR_BEACON_INTERVAL:
|
||||
rtw_write16(Adapter, REG_BCN_INTERVAL, *((u16 *)val));
|
||||
|
@ -3147,11 +2725,7 @@ _func_enter_;
|
|||
}
|
||||
break;
|
||||
case HW_VAR_SEC_CFG:
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
rtw_write8(Adapter, REG_SECCFG, 0x0c|BIT(5));/* enable tx enc and rx dec engine, and no key search for MC/BC */
|
||||
#else
|
||||
rtw_write8(Adapter, REG_SECCFG, *((u8 *)val));
|
||||
#endif
|
||||
break;
|
||||
case HW_VAR_DM_FLAG:
|
||||
podmpriv->SupportAbility = *((u8 *)val);
|
||||
|
@ -3477,38 +3051,11 @@ _func_enter_;
|
|||
}
|
||||
break;
|
||||
case HW_VAR_CHECK_TXBUF:
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
int i;
|
||||
u8 RetryLimit = 0x01;
|
||||
|
||||
rtw_write16(Adapter, REG_RL, RetryLimit << RETRY_LIMIT_SHORT_SHIFT | RetryLimit << RETRY_LIMIT_LONG_SHIFT);
|
||||
|
||||
for (i=0;i<1000;i++)
|
||||
{
|
||||
if (rtw_read32(Adapter, 0x200) != rtw_read32(Adapter, 0x204))
|
||||
{
|
||||
rtw_msleep_os(10);
|
||||
}
|
||||
else
|
||||
{
|
||||
DBG_88E("no packet in tx packet buffer (%d)\n", i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
RetryLimit = 0x30;
|
||||
rtw_write16(Adapter, REG_RL, RetryLimit << RETRY_LIMIT_SHORT_SHIFT | RetryLimit << RETRY_LIMIT_LONG_SHIFT);
|
||||
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case HW_VAR_APFM_ON_MAC:
|
||||
case HW_VAR_APFM_ON_MAC:
|
||||
pHalData->bMacPwrCtrlOn = *val;
|
||||
DBG_88E("%s: bMacPwrCtrlOn=%d\n", __func__, pHalData->bMacPwrCtrlOn);
|
||||
break;
|
||||
|
||||
#ifdef CONFIG_WOWLAN
|
||||
case HW_VAR_WOWLAN:
|
||||
{
|
||||
|
@ -3934,28 +3481,17 @@ static void UpdateHalRAMask8188EUsb(PADAPTER padapter, u32 mac_id, u8 rssi_level
|
|||
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
|
||||
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
|
||||
WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter) && padapter->adapter_type > PRIMARY_ADAPTER)
|
||||
pHalData = GET_HAL_DATA(padapter->pbuddy_adapter);
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
if (mac_id >= NUM_STA) /* CAM_SIZE */
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
psta = pmlmeinfo->FW_sta_info[mac_id].psta;
|
||||
if (psta == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
switch (mac_id)
|
||||
{
|
||||
case 0:/* for infra mode */
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
case 2:/* first station uses macid=0, second station uses macid=2 */
|
||||
#endif
|
||||
supportRateNum = rtw_get_rateset_len(cur_network->SupportedRates);
|
||||
networkType = judge_network_type(padapter, cur_network->SupportedRates, supportRateNum) & 0xf;
|
||||
raid = networktype_to_raid(networkType);
|
||||
|
@ -4071,11 +3607,6 @@ static void SetBeaconRelatedRegisters8188EUsb(PADAPTER padapter)
|
|||
/* reset TSF, enable update TSF, correcting TSF On Beacon */
|
||||
|
||||
/* BCN interval */
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type == IFACE_PORT1){
|
||||
bcn_ctrl_reg = REG_BCN_CTRL_1;
|
||||
}
|
||||
#endif
|
||||
rtw_write16(padapter, REG_BCN_INTERVAL, pmlmeinfo->bcn_interval);
|
||||
rtw_write8(padapter, REG_ATIMWND, 0x02);/* 2ms */
|
||||
|
||||
|
|
|
@ -47,15 +47,6 @@ static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u
|
|||
u8 tmp_buf[MAX_USB_IO_CTL_SIZE];
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->adapter_type > PRIMARY_ADAPTER)
|
||||
{
|
||||
padapter = padapter->pbuddy_adapter;
|
||||
pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
udev = pdvobjpriv->pusbdev;
|
||||
}
|
||||
#endif
|
||||
|
||||
if ((padapter->bSurpriseRemoved) ||(padapter->pwrctrlpriv.pnp_bstop_trx)){
|
||||
RT_TRACE(_module_hci_ops_os_c_,_drv_err_,("usbctrl_vendorreq:(padapter->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n"));
|
||||
status = -EPERM;
|
||||
|
@ -402,19 +393,9 @@ static void interrupt_handler_8188eu(_adapter *padapter,u16 pkt_len,u8 *pbuf)
|
|||
if (pmlmepriv->update_bcn == true)
|
||||
set_tx_beacon_cmd(padapter);
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, WIFI_AP_STATE)) {
|
||||
if (padapter->pbuddy_adapter->mlmepriv.update_bcn == true)
|
||||
set_tx_beacon_cmd(padapter->pbuddy_adapter);
|
||||
}
|
||||
#endif
|
||||
|
||||
}
|
||||
#endif /* CONFIG_INTERRUPT_BASED_TXBCN */
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef DBG_CONFIG_ERROR_DETECT_INT
|
||||
if ( pHalData->IntArray[1] & IMR_TXERR_88E )
|
||||
DBG_88E("===> %s Tx Error Flag Interrupt Status\n",__func__);
|
||||
|
@ -529,125 +510,7 @@ _func_exit_;
|
|||
|
||||
static s32 pre_recv_entry(union recv_frame *precvframe, struct recv_stat *prxstat, struct phy_stat *pphy_status)
|
||||
{
|
||||
s32 ret=_SUCCESS;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 *primary_myid, *secondary_myid, *paddr1;
|
||||
union recv_frame *precvframe_if2 = NULL;
|
||||
_adapter *primary_padapter = precvframe->u.hdr.adapter;
|
||||
_adapter *secondary_padapter = primary_padapter->pbuddy_adapter;
|
||||
struct recv_priv *precvpriv = &primary_padapter->recvpriv;
|
||||
_queue *pfree_recv_queue = &precvpriv->free_recv_queue;
|
||||
u8 *pbuf = precvframe->u.hdr.rx_data;
|
||||
|
||||
if (!secondary_padapter)
|
||||
return ret;
|
||||
|
||||
paddr1 = GetAddr1Ptr(precvframe->u.hdr.rx_data);
|
||||
|
||||
if (IS_MCAST(paddr1) == false)/* unicast packets */
|
||||
{
|
||||
secondary_myid = myid(&secondary_padapter->eeprompriv);
|
||||
|
||||
if (_rtw_memcmp(paddr1, secondary_myid, ETH_ALEN))
|
||||
{
|
||||
/* change to secondary interface */
|
||||
precvframe->u.hdr.adapter = secondary_padapter;
|
||||
}
|
||||
}
|
||||
else /* Handle BC/MC Packets */
|
||||
{
|
||||
u8 clone = true;
|
||||
|
||||
if (true == clone)
|
||||
{
|
||||
/* clone/copy to if2 */
|
||||
u8 shift_sz = 0;
|
||||
u32 alloc_sz, skb_len;
|
||||
_pkt *pkt_copy = NULL;
|
||||
struct rx_pkt_attrib *pattrib = NULL;
|
||||
|
||||
precvframe_if2 = rtw_alloc_recvframe(pfree_recv_queue);
|
||||
if (precvframe_if2)
|
||||
{
|
||||
precvframe_if2->u.hdr.adapter = secondary_padapter;
|
||||
|
||||
_rtw_init_listhead(&precvframe_if2->u.hdr.list);
|
||||
precvframe_if2->u.hdr.precvbuf = NULL; /* can't access the precvbuf for new arch. */
|
||||
precvframe_if2->u.hdr.len=0;
|
||||
|
||||
_rtw_memcpy(&precvframe_if2->u.hdr.attrib, &precvframe->u.hdr.attrib, sizeof(struct rx_pkt_attrib));
|
||||
|
||||
pattrib = &precvframe_if2->u.hdr.attrib;
|
||||
|
||||
/* Modified by Albert 20101213 */
|
||||
/* For 8 bytes IP header alignment. */
|
||||
if (pattrib->qos) /* Qos data, wireless lan header length is 26 */
|
||||
{
|
||||
shift_sz = 6;
|
||||
}
|
||||
else
|
||||
{
|
||||
shift_sz = 0;
|
||||
}
|
||||
|
||||
skb_len = pattrib->pkt_len;
|
||||
|
||||
/* for first fragment packet, driver need allocate 1536+drvinfo_sz+RXDESC_SIZE to defrag packet. */
|
||||
/* modify alloc_sz for recvive crc error packet by thomas 2011-06-02 */
|
||||
if ((pattrib->mfrag == 1)&&(pattrib->frag_num == 0)){
|
||||
if (skb_len <= 1650)
|
||||
alloc_sz = 1664;
|
||||
else
|
||||
alloc_sz = skb_len + 14;
|
||||
}
|
||||
else {
|
||||
alloc_sz = skb_len;
|
||||
/* 6 is for IP header 8 bytes alignment in QoS packet case. */
|
||||
/* 8 is for skb->data 4 bytes alignment. */
|
||||
alloc_sz += 14;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)) /* www.mail-archive.com/netdev@vger.kernel.org/msg17214.html */
|
||||
pkt_copy = dev_alloc_skb(alloc_sz);
|
||||
#else
|
||||
pkt_copy = netdev_alloc_skb(secondary_padapter->pnetdev, alloc_sz);
|
||||
#endif
|
||||
if (pkt_copy)
|
||||
{
|
||||
pkt_copy->dev = secondary_padapter->pnetdev;
|
||||
precvframe_if2->u.hdr.pkt = pkt_copy;
|
||||
precvframe_if2->u.hdr.rx_head = pkt_copy->data;
|
||||
precvframe_if2->u.hdr.rx_end = pkt_copy->data + alloc_sz;
|
||||
skb_reserve( pkt_copy, 8 - ((SIZE_PTR)( pkt_copy->data ) & 7 ));/* force pkt_copy->data at 8-byte alignment address */
|
||||
skb_reserve( pkt_copy, shift_sz );/* force ip_hdr at 8-byte alignment address according to shift_sz. */
|
||||
_rtw_memcpy(pkt_copy->data, pbuf, skb_len);
|
||||
precvframe_if2->u.hdr.rx_data = precvframe_if2->u.hdr.rx_tail = pkt_copy->data;
|
||||
|
||||
|
||||
recvframe_put(precvframe_if2, skb_len);
|
||||
if (pattrib->physt)
|
||||
update_recvframe_phyinfo_88e(precvframe_if2, (struct phy_stat*)pphy_status);
|
||||
ret = rtw_recv_entry(precvframe_if2);
|
||||
|
||||
}
|
||||
else {
|
||||
rtw_free_recvframe(precvframe_if2, pfree_recv_queue);
|
||||
DBG_88E("%s()-%d: alloc_skb() failed!\n", __func__, __LINE__);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if (precvframe->u.hdr.attrib.physt)
|
||||
update_recvframe_phyinfo_88e(precvframe, (struct phy_stat*)pphy_status);
|
||||
ret = rtw_recv_entry(precvframe);
|
||||
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
|
||||
return _SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_USE_USB_BUFFER_ALLOC_RX
|
||||
|
@ -799,27 +662,12 @@ static int recvbuf2recvframe(_adapter *padapter, struct recv_buf *precvbuf)
|
|||
|
||||
if (pattrib->pkt_rpt_type == NORMAL_RX)/* Normal rx packet */
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter))
|
||||
{
|
||||
if (pre_recv_entry(precvframe, prxstat, pphy_status) != _SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
if (pattrib->physt)
|
||||
update_recvframe_phyinfo_88e(precvframe, (struct phy_stat*)pphy_status);
|
||||
if (rtw_recv_entry(precvframe) != _SUCCESS) {
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: rtw_recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (pattrib->physt)
|
||||
update_recvframe_phyinfo_88e(precvframe, (struct phy_stat*)pphy_status);
|
||||
if (rtw_recv_entry(precvframe) != _SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: rtw_recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else{ /* pkt_rpt_type == TX_REPORT1-CCX, TX_REPORT2-TX RTP,HIS_REPORT-USB HISR RTP */
|
||||
|
||||
|
@ -1193,25 +1041,12 @@ static int recvbuf2recvframe(_adapter *padapter, _pkt *pskb)
|
|||
|
||||
if (pattrib->pkt_rpt_type == NORMAL_RX)/* Normal rx packet */
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter))
|
||||
if (pattrib->physt)
|
||||
update_recvframe_phyinfo_88e(precvframe, (struct phy_stat*)pphy_status);
|
||||
if (rtw_recv_entry(precvframe) != _SUCCESS)
|
||||
{
|
||||
if (pre_recv_entry(precvframe, prxstat, pphy_status) != _SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (pattrib->physt)
|
||||
update_recvframe_phyinfo_88e(precvframe, (struct phy_stat*)pphy_status);
|
||||
if (rtw_recv_entry(precvframe) != _SUCCESS)
|
||||
{
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: rtw_recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
RT_TRACE(_module_rtl871x_recv_c_,_drv_err_,
|
||||
("recvbuf2recvframe: rtw_recv_entry(precvframe) != _SUCCESS\n"));
|
||||
}
|
||||
}
|
||||
else{ /* pkt_rpt_type == TX_REPORT1-CCX, TX_REPORT2-TX RTP,HIS_REPORT-USB HISR RTP */
|
||||
|
|
|
@ -95,23 +95,11 @@
|
|||
#endif
|
||||
|
||||
|
||||
//#define CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
//#define CONFIG_HWPORT_SWAP //Port0->Sec , Port1 -> Pri
|
||||
#define CONFIG_TSF_RESET_OFFLOAD // For 2 PORT TSF SYNC.
|
||||
#endif
|
||||
|
||||
#define CONFIG_IOL
|
||||
//#else //#ifndef CONFIG_MP_INCLUDED
|
||||
|
||||
//#endif //#ifndef CONFIG_MP_INCLUDED
|
||||
|
||||
#define CONFIG_AP_MODE
|
||||
#ifdef CONFIG_AP_MODE
|
||||
//#define CONFIG_INTERRUPT_BASED_TXBCN // Tx Beacon when driver BCN_OK ,BCN_ERR interrupt occurs
|
||||
#if defined(CONFIG_CONCURRENT_MODE) && defined(CONFIG_INTERRUPT_BASED_TXBCN)
|
||||
#undef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
#endif
|
||||
#ifdef CONFIG_INTERRUPT_BASED_TXBCN
|
||||
//#define CONFIG_INTERRUPT_BASED_TXBCN_EARLY_INT
|
||||
#define CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR
|
||||
|
|
|
@ -193,10 +193,6 @@ struct registry_priv
|
|||
u8 fw_iol; //enable iol without other concern
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
u8 dmsp;//0:disable,1:enable
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_80211D
|
||||
u8 enable80211d;
|
||||
#endif
|
||||
|
@ -292,22 +288,6 @@ enum _ADAPTER_TYPE {
|
|||
MAX_ADAPTER,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
struct co_data_priv{
|
||||
|
||||
//george@20120518
|
||||
//current operating channel/bw/ch_offset
|
||||
//save the correct ch/bw/ch_offset whatever the inputted values are
|
||||
//when calling set_channel_bwmode() at concurrent mode
|
||||
//for debug check or reporting to layer app (such as wpa_supplicant for nl80211)
|
||||
u8 co_ch;
|
||||
u8 co_bw;
|
||||
u8 co_ch_offset;
|
||||
u8 rsvd;
|
||||
|
||||
};
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
typedef enum _DRIVER_STATE{
|
||||
DRIVER_NORMAL = 0,
|
||||
DRIVER_DISAPPEAR = 1,
|
||||
|
@ -466,22 +446,6 @@ struct _ADAPTER{
|
|||
_adapter *pbuddy_adapter;
|
||||
|
||||
_mutex *hw_init_mutex;
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
u8 isprimary; //is primary adapter or not
|
||||
u8 adapter_type;
|
||||
u8 iface_type; //interface port type
|
||||
|
||||
//for global synchronization
|
||||
_mutex *ph2c_fwcmd_mutex;
|
||||
_mutex *psetch_mutex;
|
||||
_mutex *psetbw_mutex;
|
||||
|
||||
struct co_data_priv *pcodatapriv;//data buffer shared among interfaces
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
u8 DualMacConcurrent; // 1: DMSP 0:DMDP
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_BR_EXT
|
||||
_lock br_ext_lock;
|
||||
|
|
|
@ -201,9 +201,6 @@ struct hal_ops {
|
|||
void (*SetBeaconRelatedRegistersHandler)(_adapter *padapter);
|
||||
|
||||
void (*Add_RateATid)(_adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
void (*clone_haldata)(_adapter *dst_padapter, _adapter *src_padapter);
|
||||
#endif
|
||||
void (*run_thread)(_adapter *padapter);
|
||||
void (*cancel_thread)(_adapter *padapter);
|
||||
|
||||
|
|
|
@ -63,12 +63,6 @@ struct rtw_wdev_priv
|
|||
u8 bandroid_scan;
|
||||
bool block;
|
||||
bool power_mgmt;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_T ro_ch_to;
|
||||
ATOMIC_T switch_ch_to;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
#define wdev_to_priv(w) ((struct rtw_wdev_priv *)(wdev_priv(w)))
|
||||
|
|
|
@ -104,13 +104,6 @@ int rtw_ips_pwr_up(_adapter *padapter);
|
|||
void rtw_ips_pwr_down(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
struct _io_ops;
|
||||
_adapter *rtw_drv_if2_init(_adapter *primary_padapter, char *name, void (*set_intf_ops)(struct _io_ops *pops));
|
||||
void rtw_drv_if2_free(_adapter *if2);
|
||||
void rtw_drv_if2_stop(_adapter *if2);
|
||||
#endif
|
||||
|
||||
#ifdef SUPPORT_HW_RFOFF_DETECTED
|
||||
int rtw_hw_suspend(_adapter *padapter );
|
||||
int rtw_hw_resume(_adapter *padapter);
|
||||
|
|
|
@ -259,10 +259,6 @@ struct wifidirect_info{
|
|||
_timer pre_tx_scan_timer;
|
||||
_timer reset_ch_sitesurvey;
|
||||
_timer reset_ch_sitesurvey2; // Just for resetting the scan limit function by using p2p nego
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
// Used to switch the channel between legacy AP and listen state.
|
||||
_timer ap_p2p_switch_timer;
|
||||
#endif
|
||||
struct tx_provdisc_req_info tx_prov_disc_info;
|
||||
struct rx_provdisc_req_info rx_prov_disc_info;
|
||||
struct tx_invite_req_info invitereq_info;
|
||||
|
@ -326,10 +322,6 @@ struct wifidirect_info{
|
|||
uint channel_list_attr_len; // This field will contain the length of body of P2P Channel List attribute of group negotitation response frame.
|
||||
u8 channel_list_attr[100]; // This field will contain the body of P2P Channel List attribute of group negotitation response frame.
|
||||
// We will use the channel_cnt and channel_list fields when constructing the group negotitation confirm frame.
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u16 ext_listen_interval; // The interval to be available with legacy AP (ms)
|
||||
u16 ext_listen_period; // The time period to be available for P2P listen state (ms)
|
||||
#endif
|
||||
#ifdef CONFIG_P2P_PS
|
||||
enum P2P_PS_MODE p2p_ps_mode; // indicate p2p ps mode
|
||||
enum P2P_PS_STATE p2p_ps_state; // indicate p2p ps state
|
||||
|
@ -544,10 +536,6 @@ struct mlme_priv {
|
|||
u8 sa_ext[L2SDTA_SERVICE_VE_LEN];
|
||||
#endif // CONFIG_INTEL_WIDI
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
u8 scanning_via_buddy_intf;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_FTP_PROTECT
|
||||
u8 ftp_lock_flag;
|
||||
#endif //CONFIG_FTP_PROTECT
|
||||
|
@ -676,12 +664,6 @@ __inline static void up_scanned_network(struct mlme_priv *pmlmepriv)
|
|||
_exit_critical_bh(&pmlmepriv->lock, &irqL);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
sint rtw_buddy_adapter_up(_adapter *padapter);
|
||||
sint check_buddy_fwstate(_adapter *padapter, sint state);
|
||||
sint check_buddy_fw_link(_adapter *padapter);
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
__inline static void down_scanned_network(struct mlme_priv *pmlmepriv)
|
||||
{
|
||||
_irqL irqL;
|
||||
|
|
|
@ -346,14 +346,8 @@ struct FW_Sta_Info {
|
|||
* 4. Back to channel 1 for 300 milliseconds
|
||||
* 5. ... and so on, till survey done.
|
||||
*/
|
||||
#if defined CONFIG_STA_MODE_SCAN_UNDER_AP_MODE && defined CONFIG_CONCURRENT_MODE
|
||||
#define RTW_SCAN_NUM_OF_CH 8
|
||||
#define RTW_STAY_AP_CH_MILLISECOND 3 // this value is a multiplier,for example, when this value is 3, it would stay AP's op ch for
|
||||
// 3 * SURVEY_TO millisecond.
|
||||
#endif //defined CONFIG_STA_MODE_SCAN_UNDER_AP_MODE && defined CONFIG_CONCURRENT_MODE
|
||||
|
||||
struct mlme_ext_info
|
||||
{
|
||||
struct mlme_ext_info {
|
||||
u32 state;
|
||||
u32 reauth_count;
|
||||
u32 reassoc_count;
|
||||
|
@ -709,28 +703,6 @@ extern void process_addba_req(_adapter *padapter, u8 *paddba_req, u8 *addr);
|
|||
extern void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len);
|
||||
extern void correct_TSF(_adapter *padapter, struct mlme_ext_priv *pmlmeext);
|
||||
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
sint check_buddy_mlmeinfo_state(_adapter *padapter, u32 state);
|
||||
int concurrent_chk_start_clnt_join(_adapter *padapter);
|
||||
void concurrent_chk_joinbss_done(_adapter *padapter, int join_res);
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
void dc_SelectChannel(_adapter *padapter, unsigned char channel);
|
||||
void dc_SetBWMode(_adapter *padapter, unsigned short bwmode, unsigned char channel_offset);
|
||||
void dc_set_channel_bwmode_disconnect(_adapter *padapter);
|
||||
u8 dc_handle_join_request(_adapter *padapter);
|
||||
void dc_handle_join_done(_adapter *padapter, u8 join_res);
|
||||
sint dc_check_fwstate(_adapter *padapter, sint fw_state);
|
||||
u8 dc_handle_site_survey(_adapter *padapter);
|
||||
void dc_report_survey_event(_adapter *padapter, union recv_frame *precv_frame);
|
||||
void dc_set_channel_bwmode_survey_done(_adapter *padapter);
|
||||
void dc_set_ap_channel_bandwidth(_adapter *padapter, u8 channel, u8 channel_offset, u8 bwmode);
|
||||
void dc_resume_xmit(_adapter *padapter);
|
||||
u8 dc_check_xmit(_adapter *padapter);
|
||||
#endif
|
||||
|
||||
struct cmd_hdl {
|
||||
uint parmsize;
|
||||
u8 (*h2cfuns)(struct _ADAPTER *padapter, u8 *pbuf);
|
||||
|
@ -743,8 +715,6 @@ u8 read_bbreg_hdl(_adapter *padapter, u8 *pbuf);
|
|||
u8 write_bbreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 read_rfreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 write_rfreg_hdl(_adapter *padapter, u8 *pbuf);
|
||||
|
||||
|
||||
u8 NULL_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 join_cmd_hdl(_adapter *padapter, u8 *pbuf);
|
||||
u8 disconnect_hdl(_adapter *padapter, u8 *pbuf);
|
||||
|
|
|
@ -1524,27 +1524,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
|
|||
}
|
||||
|
||||
extern int netdev_open(struct net_device *pnetdev);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
extern int netdev_if2_open(struct net_device *pnetdev);
|
||||
#endif
|
||||
|
||||
/*
|
||||
enum nl80211_iftype {
|
||||
NL80211_IFTYPE_UNSPECIFIED,
|
||||
NL80211_IFTYPE_ADHOC, //1
|
||||
NL80211_IFTYPE_STATION, //2
|
||||
NL80211_IFTYPE_AP, //3
|
||||
NL80211_IFTYPE_AP_VLAN,
|
||||
NL80211_IFTYPE_WDS,
|
||||
NL80211_IFTYPE_MONITOR, //6
|
||||
NL80211_IFTYPE_MESH_POINT,
|
||||
NL80211_IFTYPE_P2P_CLIENT, //8
|
||||
NL80211_IFTYPE_P2P_GO, //9
|
||||
//keep last
|
||||
NUM_NL80211_IFTYPES,
|
||||
NL80211_IFTYPE_MAX = NUM_NL80211_IFTYPES - 1
|
||||
};
|
||||
*/
|
||||
static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
||||
struct net_device *ndev,
|
||||
enum nl80211_iftype type, u32 *flags,
|
||||
|
@ -1561,23 +1541,10 @@ static int cfg80211_rtw_change_iface(struct wiphy *wiphy,
|
|||
int ret = 0;
|
||||
u8 change = false;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (!padapter->isprimary)
|
||||
{
|
||||
DBG_88E(FUNC_NDEV_FMT" call netdev_if2_open\n", FUNC_NDEV_ARG(ndev));
|
||||
if (netdev_if2_open(ndev) != 0) {
|
||||
ret= -EPERM;
|
||||
goto exit;
|
||||
}
|
||||
}
|
||||
else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
DBG_88E(FUNC_NDEV_FMT" call netdev_open\n", FUNC_NDEV_ARG(ndev));
|
||||
if (netdev_open(ndev) != 0) {
|
||||
ret= -EPERM;
|
||||
goto exit;
|
||||
}
|
||||
DBG_88E(FUNC_NDEV_FMT" call netdev_open\n", FUNC_NDEV_ARG(ndev));
|
||||
if (netdev_open(ndev) != 0) {
|
||||
ret= -EPERM;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter)) {
|
||||
|
@ -1867,23 +1834,11 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy, struct net_device *ndev,
|
|||
struct cfg80211_ssid *ssids = request->ssids;
|
||||
int social_channel = 0, j = 0;
|
||||
bool need_indicate_scan_done = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
PADAPTER pbuddy_adapter = NULL;
|
||||
struct mlme_priv *pbuddy_mlmepriv = NULL;
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_DEBUG_CFG80211
|
||||
DBG_88E(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter))
|
||||
{
|
||||
pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv);
|
||||
}
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
{
|
||||
|
@ -1962,15 +1917,6 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (pbuddy_mlmepriv && (pbuddy_mlmepriv->LinkDetectInfo.bBusyTraffic == true))
|
||||
{
|
||||
DBG_88E("%s, bBusyTraffic == true at buddy_intf\n", __func__);
|
||||
need_indicate_scan_done = true;
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
DBG_88E("%s, fwstate=0x%x\n", __func__, pmlmepriv->fw_state);
|
||||
|
@ -1978,24 +1924,6 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter,
|
||||
_FW_UNDER_SURVEY|_FW_UNDER_LINKING|WIFI_UNDER_WPS) == true)
|
||||
{
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY))
|
||||
{
|
||||
DBG_88E("scanning_via_buddy_intf\n");
|
||||
pmlmepriv->scanning_via_buddy_intf = true;
|
||||
}
|
||||
|
||||
DBG_88E("buddy_intf's mlme state:0x%x\n", pbuddy_mlmepriv->fw_state);
|
||||
|
||||
need_indicate_scan_done = true;
|
||||
goto check_need_indicate_scan_done;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CONFIG_P2P
|
||||
if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && !rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
|
||||
{
|
||||
|
@ -2480,17 +2408,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_LINKING) == true) {
|
||||
DBG_88E("%s, but buddy_intf is under linking\n", __func__);
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY) == true) {
|
||||
rtw_scan_abort(padapter->pbuddy_adapter);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!sme->ssid || !sme->ssid_len)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
|
@ -4067,10 +3984,6 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
|
||||
_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 1);
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
p2p_protocol_wk_hdl(padapter, P2P_RO_CH_WK);
|
||||
}
|
||||
|
||||
|
@ -4087,14 +4000,8 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
pcfg80211_wdinfo->remain_on_ch_cookie= *cookie;
|
||||
|
||||
rtw_scan_abort(padapter);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter))
|
||||
rtw_scan_abort(padapter->pbuddy_adapter);
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
|
||||
//if (!rtw_p2p_chk_role(pwdinfo, P2P_ROLE_CLIENT) && !rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
|
||||
{
|
||||
if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) {
|
||||
rtw_p2p_enable(padapter, P2P_ROLE_DEVICE);
|
||||
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = true;
|
||||
}
|
||||
|
@ -4113,83 +4020,26 @@ static s32 cfg80211_rtw_remain_on_channel(struct wiphy *wiphy, struct net_device
|
|||
if (duration < 400)
|
||||
duration = duration*3;//extend from exper.
|
||||
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED) &&
|
||||
(duration<pwdinfo->ext_listen_interval))
|
||||
{
|
||||
duration = duration + pwdinfo->ext_listen_interval;
|
||||
}
|
||||
#endif
|
||||
|
||||
pcfg80211_wdinfo->restore_channel = pmlmeext->cur_channel;
|
||||
|
||||
if (rtw_ch_set_search_ch(pmlmeext->channel_set, remain_ch) >= 0) {
|
||||
#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;
|
||||
|
||||
if (remain_ch != pbuddy_mlmeext->cur_channel)
|
||||
{
|
||||
if (ATOMIC_READ(&pwdev_priv->switch_ch_to)==1 ||
|
||||
(remain_ch != pmlmeext->cur_channel))
|
||||
{
|
||||
DBG_88E("%s, issue nulldata pwrbit=1\n", __func__);
|
||||
issue_nulldata(padapter->pbuddy_adapter, NULL, 1, 3, 500);
|
||||
|
||||
ATOMIC_SET(&pwdev_priv->switch_ch_to, 0);
|
||||
|
||||
DBG_88E("%s, set switch ch timer, duration=%d\n", __func__, duration-pwdinfo->ext_listen_interval);
|
||||
_set_timer(&pwdinfo->ap_p2p_switch_timer, duration-pwdinfo->ext_listen_interval);
|
||||
}
|
||||
}
|
||||
|
||||
ready_on_channel = true;
|
||||
//pmlmeext->cur_channel = remain_ch;
|
||||
//set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
if (remain_ch != pmlmeext->cur_channel )
|
||||
{
|
||||
ready_on_channel = true;
|
||||
//pmlmeext->cur_channel = remain_ch;
|
||||
//set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
} else {
|
||||
DBG_88E("%s remain_ch:%u not in channel plan!!!!\n", __func__, remain_ch);
|
||||
}
|
||||
|
||||
|
||||
//call this after other things have been done
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (ATOMIC_READ(&pwdev_priv->ro_ch_to)==1 ||
|
||||
(remain_ch != pmlmeext->cur_channel))
|
||||
{
|
||||
u8 co_channel = 0xff;
|
||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 0);
|
||||
#endif
|
||||
if (ready_on_channel == true) {
|
||||
if ( !check_fwstate(&padapter->mlmepriv, _FW_LINKED ) )
|
||||
pmlmeext->cur_channel = remain_ch;
|
||||
|
||||
if (ready_on_channel == true)
|
||||
{
|
||||
if ( !check_fwstate(&padapter->mlmepriv, _FW_LINKED ) )
|
||||
pmlmeext->cur_channel = remain_ch;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
co_channel = rtw_get_oper_ch(padapter);
|
||||
|
||||
if (co_channel !=remain_ch)
|
||||
#endif
|
||||
set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
|
||||
DBG_88E("%s, set ro ch timer, duration=%d\n", __func__, duration);
|
||||
_set_timer( &pcfg80211_wdinfo->remain_on_ch_timer, duration);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
set_channel_bwmode(padapter, remain_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
#endif
|
||||
|
||||
DBG_88E("%s, set ro ch timer, duration=%d\n", __func__, duration);
|
||||
_set_timer( &pcfg80211_wdinfo->remain_on_ch_timer, duration);
|
||||
|
||||
cfg80211_ready_on_channel(ndev, *cookie, channel, channel_type, duration, GFP_KERNEL);
|
||||
|
||||
|
@ -4217,9 +4067,6 @@ static s32 cfg80211_rtw_cancel_remain_on_channel(struct wiphy *wiphy, struct net
|
|||
if (pcfg80211_wdinfo->is_ro_ch == true) {
|
||||
DBG_88E("%s, cancel ro ch timer\n", __func__);
|
||||
_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 1);
|
||||
#endif
|
||||
p2p_protocol_wk_hdl(padapter, P2P_RO_CH_WK);
|
||||
}
|
||||
|
||||
|
@ -4260,52 +4107,7 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
|||
rtw_set_scan_deny(padapter, 1000);
|
||||
|
||||
rtw_scan_abort(padapter);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (rtw_buddy_adapter_up(padapter))
|
||||
rtw_scan_abort(padapter->pbuddy_adapter);
|
||||
#endif /* CONFIG_CONCURRENT_MODE */
|
||||
|
||||
if (padapter->cfg80211_wdinfo.is_ro_ch == true) {
|
||||
//DBG_88E("%s, cancel ro ch timer\n", __func__);
|
||||
//_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
|
||||
//padapter->cfg80211_wdinfo.is_ro_ch = false;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
DBG_88E("%s, extend ro ch time\n", __func__);
|
||||
_set_timer( &padapter->cfg80211_wdinfo.remain_on_ch_timer, pwdinfo->ext_listen_period);
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_LINKED )) {
|
||||
u8 co_channel=0xff;
|
||||
PADAPTER pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
|
||||
co_channel = rtw_get_oper_ch(padapter);
|
||||
|
||||
if (tx_ch != pbuddy_mlmeext->cur_channel) {
|
||||
if (ATOMIC_READ(&pwdev_priv->switch_ch_to)==1) {
|
||||
DBG_88E("%s, issue nulldata pwrbit=1\n", __func__);
|
||||
issue_nulldata(padapter->pbuddy_adapter, NULL, 1, 3, 500);
|
||||
|
||||
ATOMIC_SET(&pwdev_priv->switch_ch_to, 0);
|
||||
|
||||
//DBG_88E("%s, set switch ch timer, period=%d\n", __func__, pwdinfo->ext_listen_period);
|
||||
//_set_timer(&pwdinfo->ap_p2p_switch_timer, pwdinfo->ext_listen_period);
|
||||
}
|
||||
|
||||
DBG_88E("%s, set switch ch timer, period=%d\n", __func__, pwdinfo->ext_listen_period);
|
||||
_set_timer(&pwdinfo->ap_p2p_switch_timer, pwdinfo->ext_listen_period);
|
||||
}
|
||||
|
||||
if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED ))
|
||||
pmlmeext->cur_channel = tx_ch;
|
||||
|
||||
if (tx_ch != co_channel)
|
||||
set_channel_bwmode(padapter, tx_ch, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}else
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
//if (tx_ch != pmlmeext->cur_channel) {
|
||||
if (tx_ch != rtw_get_oper_ch(padapter)) {
|
||||
if (!check_fwstate(&padapter->mlmepriv, _FW_LINKED ))
|
||||
pmlmeext->cur_channel = tx_ch;
|
||||
|
@ -4315,7 +4117,6 @@ static int _cfg80211_rtw_mgmt_tx(struct net_device *ndev, u8 tx_ch, const u8 *bu
|
|||
//starting alloc mgmt frame to dump it
|
||||
if ((pmgntframe = alloc_mgtxmitframe(pxmitpriv)) == NULL)
|
||||
{
|
||||
//ret = -ENOMEM;
|
||||
ret = _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -5084,13 +4885,7 @@ int rtw_wdev_alloc(_adapter *padapter, struct device *dev)
|
|||
else
|
||||
pwdev_priv->power_mgmt = false;
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
ATOMIC_SET(&pwdev_priv->switch_ch_to, 1);
|
||||
ATOMIC_SET(&pwdev_priv->ro_ch_to, 1);
|
||||
#endif
|
||||
|
||||
wdev->netdev = pnetdev;
|
||||
//wdev->iftype = NL80211_IFTYPE_STATION;
|
||||
wdev->iftype = NL80211_IFTYPE_MONITOR; // for rtw_setopmode_cmd() in cfg80211_rtw_change_iface()
|
||||
|
||||
rtw_cfg80211_preinit_wiphy(padapter, wdev->wiphy);
|
||||
|
|
|
@ -1629,35 +1629,6 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
|||
NDIS_802_11_AUTHENTICATION_MODE authmode;
|
||||
|
||||
_func_enter_;
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type > PRIMARY_IFACE)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
DBG_88E("set bssid, but buddy_intf is under scanning or linking\n");
|
||||
|
||||
ret = -EINVAL;
|
||||
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
if (dc_check_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING)== true)
|
||||
{
|
||||
DBG_88E("set bssid, but buddy_intf is under scanning or linking\n");
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter))
|
||||
{
|
||||
|
@ -1810,15 +1781,6 @@ _func_enter_;
|
|||
#ifdef DBG_IOCTL
|
||||
DBG_88E("DBG_IOCTL %s:%d\n",__func__, __LINE__);
|
||||
#endif
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type > PRIMARY_IFACE)
|
||||
{
|
||||
ret = -1;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_MP_INCLUDED
|
||||
if (padapter->registrypriv.mp_mode == 1)
|
||||
|
@ -1884,47 +1846,11 @@ if (padapter->registrypriv.mp_mode == 1)
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter,
|
||||
_FW_UNDER_SURVEY|_FW_UNDER_LINKING|WIFI_UNDER_WPS) == true)
|
||||
{
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY))
|
||||
{
|
||||
DBG_88E("scanning_via_buddy_intf\n");
|
||||
pmlmepriv->scanning_via_buddy_intf = true;
|
||||
}
|
||||
|
||||
indicate_wx_scan_complete_event(padapter);
|
||||
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
if (dc_check_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING)== true)
|
||||
{
|
||||
indicate_wx_scan_complete_event(padapter);
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Mareded by Albert 20101103
|
||||
// For the DMP WiFi Display project, the driver won't to scan because
|
||||
// the pmlmepriv->scan_interval is always equal to 3.
|
||||
// So, the wpa_supplicant won't find out the WPS SoftAP.
|
||||
|
||||
/*
|
||||
if (pmlmepriv->scan_interval>10)
|
||||
pmlmepriv->scan_interval = 0;
|
||||
|
||||
if (pmlmepriv->scan_interval > 0)
|
||||
{
|
||||
DBG_88E("scan done\n");
|
||||
ret = 0;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
*/
|
||||
#ifdef CONFIG_P2P
|
||||
if (pwdinfo->p2p_state != P2P_STATE_NONE)
|
||||
{
|
||||
|
@ -2067,10 +1993,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
u32 cnt=0;
|
||||
u32 wait_for_surveydone;
|
||||
sint wait_status;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
//PADAPTER pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
//struct mlme_priv *pbuddy_mlmepriv = &(pbuddy_adapter->mlmepriv);
|
||||
#endif
|
||||
#ifdef CONFIG_P2P
|
||||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||
#endif //CONFIG_P2P
|
||||
|
@ -2083,15 +2005,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
DBG_88E("DBG_IOCTL %s:%d\n",__func__, __LINE__);
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type > PRIMARY_IFACE)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
if (padapter->pwrctrlpriv.brfoffbyhw && padapter->bDriverStopped)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
|
@ -2118,37 +2031,12 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
}
|
||||
#endif //CONFIG_P2P
|
||||
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (pmlmepriv->scanning_via_buddy_intf == true)
|
||||
{
|
||||
pmlmepriv->scanning_via_buddy_intf = false;//reset
|
||||
|
||||
// change pointers to buddy interface
|
||||
padapter = pbuddy_adapter;
|
||||
pmlmepriv = pbuddy_mlmepriv;
|
||||
queue = &(pbuddy_mlmepriv->scanned_queue);
|
||||
|
||||
}
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
*/
|
||||
|
||||
wait_status = _FW_UNDER_SURVEY
|
||||
#ifndef CONFIG_ANDROID
|
||||
|_FW_UNDER_LINKING
|
||||
#endif
|
||||
;
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
while (dc_check_fwstate(padapter, wait_status)== true)
|
||||
{
|
||||
rtw_msleep_os(30);
|
||||
cnt++;
|
||||
if (cnt > wait_for_surveydone)
|
||||
break;
|
||||
}
|
||||
#endif // CONFIG_DUALMAC_CONCURRENT
|
||||
|
||||
while (check_fwstate(pmlmepriv, wait_status) == true)
|
||||
{
|
||||
rtw_msleep_os(30);
|
||||
|
@ -2234,36 +2122,6 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
|||
DBG_88E("DBG_IOCTL %s:%d\n",__func__, __LINE__);
|
||||
#endif
|
||||
|
||||
/*
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->iface_type > PRIMARY_IFACE)
|
||||
{
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_buddy_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING) == true)
|
||||
{
|
||||
DBG_88E("set ssid, but buddy_intf is under scanning or linking\n");
|
||||
|
||||
ret = -EINVAL;
|
||||
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
if (dc_check_fwstate(padapter, _FW_UNDER_SURVEY|_FW_UNDER_LINKING)== true)
|
||||
{
|
||||
DBG_88E("set bssid, but buddy_intf is under scanning or linking\n");
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
#endif
|
||||
|
||||
RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_info_,
|
||||
("+rtw_wx_set_essid: fw_state=0x%08x\n", get_fwstate(pmlmepriv)));
|
||||
if (_FAIL == rtw_pwr_wakeup(padapter))
|
||||
|
@ -3916,33 +3774,7 @@ static int rtw_wext_p2p_enable(struct net_device *dev,
|
|||
pwdinfo->operating_channel = pwdinfo->listen_channel;
|
||||
ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
bwmode = HT_CHANNEL_WIDTH_20;
|
||||
}
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
else if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
|
||||
{
|
||||
_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;
|
||||
|
||||
_set_timer(&pwdinfo->ap_p2p_switch_timer, pwdinfo->ext_listen_interval);
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
pwdinfo->operating_channel = pbuddy_mlmeext->cur_channel;
|
||||
// How about the ch_offset and bwmode ??
|
||||
}
|
||||
else
|
||||
{
|
||||
pwdinfo->operating_channel = pwdinfo->listen_channel;
|
||||
}
|
||||
|
||||
channel = pbuddy_mlmeext->cur_channel;
|
||||
ch_offset = pbuddy_mlmeext->cur_ch_offset;
|
||||
bwmode = pbuddy_mlmeext->cur_bwmode;
|
||||
}
|
||||
#endif
|
||||
else
|
||||
{
|
||||
} else {
|
||||
pwdinfo->operating_channel = pmlmeext->cur_channel;
|
||||
|
||||
channel = pwdinfo->operating_channel;
|
||||
|
@ -3955,7 +3787,6 @@ static int rtw_wext_p2p_enable(struct net_device *dev,
|
|||
|
||||
exit:
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
static int rtw_p2p_set_go_nego_ssid(struct net_device *dev,
|
||||
|
@ -4186,12 +4017,6 @@ static int rtw_p2p_get_status(struct net_device *dev,
|
|||
_adapter *padapter = (_adapter *)rtw_netdev_priv(dev);
|
||||
struct iw_point *pdata = &wrqu->data;
|
||||
struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_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;
|
||||
#endif
|
||||
|
||||
if (padapter->bShowGetP2PState)
|
||||
{
|
||||
|
@ -4911,11 +4736,6 @@ static int rtw_p2p_connect(struct net_device *dev,
|
|||
_queue *queue = &(pmlmepriv->scanned_queue);
|
||||
struct wlan_network *pnetwork = NULL;
|
||||
uint uintPeerChannel = 0;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
// Commented by Albert 20110304
|
||||
// The input data contains two informations.
|
||||
|
@ -4967,13 +4787,6 @@ static int rtw_p2p_connect(struct net_device *dev,
|
|||
|
||||
if (uintPeerChannel)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_cancel_timer_ex(&pwdinfo->ap_p2p_switch_timer);
|
||||
}
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
_rtw_memset(&pwdinfo->nego_req_info, 0x00, sizeof(struct tx_nego_req_info));
|
||||
_rtw_memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
|
||||
|
||||
|
@ -4991,31 +4804,9 @@ static int rtw_p2p_connect(struct net_device *dev,
|
|||
rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo));
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_GONEGO_ING);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
// Have to enter the power saving with the AP
|
||||
set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode);
|
||||
|
||||
issue_nulldata(pbuddy_adapter, NULL, 1, 3, 500);
|
||||
}
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
DBG_88E("[%s] Start PreTx Procedure!\n", __func__);
|
||||
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_CONCURRENT_GO_NEGO_TIMEOUT);
|
||||
}
|
||||
else
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_GO_NEGO_TIMEOUT);
|
||||
}
|
||||
#else
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_GO_NEGO_TIMEOUT);
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5047,11 +4838,6 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
uint p2pielen = 0, attr_contentlen = 0;
|
||||
_irqL irqL;
|
||||
struct tx_invite_req_info* pinvite_req_info = &pwdinfo->invitereq_info;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
|
||||
|
@ -5183,13 +4969,6 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
|
||||
if (uintPeerChannel)
|
||||
{
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_cancel_timer_ex(&pwdinfo->ap_p2p_switch_timer);
|
||||
}
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
// Store the GO's bssid
|
||||
for (jj = 0, kk = 18; jj < ETH_ALEN; jj++, kk += 3)
|
||||
{
|
||||
|
@ -5205,38 +4984,11 @@ static int rtw_p2p_invite_req(struct net_device *dev,
|
|||
rtw_p2p_set_pre_state(pwdinfo, rtw_p2p_state(pwdinfo));
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_TX_INVITE_REQ);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
// Have to enter the power saving with the AP
|
||||
set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode);
|
||||
|
||||
issue_nulldata(pbuddy_adapter, NULL, 1, 3, 500);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_channel_bwmode(padapter, uintPeerChannel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
#else
|
||||
set_channel_bwmode(padapter, uintPeerChannel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
#endif
|
||||
|
||||
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_CONCURRENT_INVITE_TIMEOUT);
|
||||
}
|
||||
else
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_INVITE_TIMEOUT);
|
||||
}
|
||||
#else
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_INVITE_TIMEOUT);
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -5269,11 +5021,6 @@ static int rtw_p2p_set_persistent(struct net_device *dev,
|
|||
uint p2pielen = 0, attr_contentlen = 0;
|
||||
_irqL irqL;
|
||||
struct tx_invite_req_info* pinvite_req_info = &pwdinfo->invitereq_info;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_WFD
|
||||
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
|
||||
|
@ -5336,10 +5083,6 @@ static int rtw_p2p_set_pc(struct net_device *dev,
|
|||
uint p2pielen = 0, attr_contentlen = 0;
|
||||
_irqL irqL;
|
||||
uint uintPeerChannel = 0;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
|
||||
|
||||
// Commented by Albert 20120512
|
||||
|
@ -5590,11 +5333,6 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
u8 *p2pie;
|
||||
uint p2pielen = 0, attr_contentlen = 0;
|
||||
_irqL irqL;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_adapter *pbuddy_adapter = padapter->pbuddy_adapter;
|
||||
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
|
||||
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
#ifdef CONFIG_WFD
|
||||
struct wifi_display_info* pwfd_info = pwdinfo->wfd_info;
|
||||
#endif // CONFIG_WFD
|
||||
|
@ -5752,12 +5490,6 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
{
|
||||
|
||||
DBG_88E("[%s] peer channel: %d!\n", __func__, uintPeerChannel);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_cancel_timer_ex(&pwdinfo->ap_p2p_switch_timer);
|
||||
}
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
_rtw_memcpy(pwdinfo->tx_prov_disc_info.peerIFAddr, pnetwork->network.MacAddress, ETH_ALEN);
|
||||
_rtw_memcpy(pwdinfo->tx_prov_disc_info.peerDevAddr, peerMAC, ETH_ALEN);
|
||||
pwdinfo->tx_prov_disc_info.peer_channel_num[0] = (u16) uintPeerChannel;
|
||||
|
@ -5775,37 +5507,11 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
|
|||
pwdinfo->tx_prov_disc_info.ssid.SsidLength= P2P_WILDCARD_SSID_LEN;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
// Have to enter the power saving with the AP
|
||||
set_channel_bwmode(padapter, pbuddy_mlmeext->cur_channel, pbuddy_mlmeext->cur_ch_offset, pbuddy_mlmeext->cur_bwmode);
|
||||
|
||||
issue_nulldata(pbuddy_adapter, NULL, 1, 3, 500);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_channel_bwmode(padapter, uintPeerChannel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
}
|
||||
#else
|
||||
set_channel_bwmode(padapter, uintPeerChannel, HAL_PRIME_CHNL_OFFSET_DONT_CARE, HT_CHANNEL_WIDTH_20);
|
||||
#endif
|
||||
|
||||
_set_timer(&pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (check_fwstate(pbuddy_mlmepriv, _FW_LINKED))
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_CONCURRENT_PROVISION_TIMEOUT);
|
||||
}
|
||||
else
|
||||
{
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_PROVISION_TIMEOUT);
|
||||
}
|
||||
#else
|
||||
_set_timer(&pwdinfo->restore_p2p_state_timer, P2P_PROVISION_TIMEOUT);
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -6112,11 +5818,6 @@ static int rtw_rereg_nd_name(struct net_device *dev,
|
|||
|
||||
if (rereg_priv->old_ifname[0] == 0) {
|
||||
char *reg_ifname;
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->isprimary)
|
||||
reg_ifname = padapter->registrypriv.ifname;
|
||||
else
|
||||
#endif
|
||||
reg_ifname = padapter->registrypriv.if2name;
|
||||
|
||||
strncpy(rereg_priv->old_ifname, reg_ifname, IFNAMSIZ);
|
||||
|
|
|
@ -156,10 +156,6 @@ static int rtw_hw_wps_pbc = 1;
|
|||
int rtw_mc2u_disable = 0;
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
int rtw_dmsp = 0;
|
||||
#endif // CONFIG_DUALMAC_CONCURRENT
|
||||
|
||||
#ifdef CONFIG_80211D
|
||||
static int rtw_80211d = 0;
|
||||
#endif
|
||||
|
@ -244,10 +240,6 @@ MODULE_PARM_DESC(rtw_fw_file_path, "The path of fw image");
|
|||
module_param(rtw_mc2u_disable, int, 0644);
|
||||
#endif // CONFIG_TX_MCAST2UNI
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
module_param(rtw_dmsp, int, 0644);
|
||||
#endif // CONFIG_DUALMAC_CONCURRENT
|
||||
|
||||
#ifdef CONFIG_80211D
|
||||
module_param(rtw_80211d, int, 0644);
|
||||
MODULE_PARM_DESC(rtw_80211d, "Enable 802.11d mechanism");
|
||||
|
@ -757,10 +749,6 @@ _func_enter_;
|
|||
registry_par->fw_iol = rtw_fw_iol;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DUALMAC_CONCURRENT
|
||||
registry_par->dmsp= (u8)rtw_dmsp;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_80211D
|
||||
registry_par->enable80211d = (u8)rtw_80211d;
|
||||
#endif
|
||||
|
@ -1002,17 +990,11 @@ u32 rtw_start_drv_threads(_adapter *padapter)
|
|||
_status = _FAIL;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->isprimary == true)
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
padapter->cmdThread = kthread_run(rtw_cmd_thread, padapter, "RTW_CMD_THREAD");
|
||||
if (IS_ERR(padapter->cmdThread))
|
||||
_status = _FAIL;
|
||||
else
|
||||
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); //wait for cmd_thread to run
|
||||
}
|
||||
|
||||
padapter->cmdThread = kthread_run(rtw_cmd_thread, padapter, "RTW_CMD_THREAD");
|
||||
if (IS_ERR(padapter->cmdThread))
|
||||
_status = _FAIL;
|
||||
else
|
||||
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); //wait for cmd_thread to run
|
||||
|
||||
#ifdef CONFIG_EVENT_THREAD_MODE
|
||||
padapter->evtThread = kthread_run(event_thread, padapter, "RTW_EVENT_THREAD");
|
||||
|
@ -1028,15 +1010,10 @@ void rtw_stop_drv_threads (_adapter *padapter)
|
|||
{
|
||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+rtw_stop_drv_threads\n"));
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if (padapter->isprimary == true)
|
||||
#endif //CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
//Below is to termindate rtw_cmd_thread & event_thread...
|
||||
_rtw_up_sema(&padapter->cmdpriv.cmd_queue_sema);
|
||||
if (padapter->cmdThread)
|
||||
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema);
|
||||
}
|
||||
//Below is to termindate rtw_cmd_thread & event_thread...
|
||||
_rtw_up_sema(&padapter->cmdpriv.cmd_queue_sema);
|
||||
if (padapter->cmdThread)
|
||||
_rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema);
|
||||
|
||||
#ifdef CONFIG_EVENT_THREAD_MODE
|
||||
_rtw_up_sema(&padapter->evtpriv.evt_notify);
|
||||
|
@ -1335,9 +1312,6 @@ u8 rtw_free_drv_sw(_adapter *padapter)
|
|||
_cancel_timer_ex( &pwdinfo->find_phase_timer );
|
||||
_cancel_timer_ex( &pwdinfo->restore_p2p_state_timer );
|
||||
_cancel_timer_ex( &pwdinfo->pre_tx_scan_timer);
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
_cancel_timer_ex( &pwdinfo->ap_p2p_switch_timer );
|
||||
#endif // CONFIG_CONCURRENT_MODE
|
||||
rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
|
||||
}
|
||||
}
|
||||
|
@ -1395,332 +1369,6 @@ u8 rtw_free_drv_sw(_adapter *padapter)
|
|||
return _SUCCESS;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
int _netdev_if2_open(struct net_device *pnetdev)
|
||||
{
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
||||
_adapter *primary_padapter = padapter->pbuddy_adapter;
|
||||
|
||||
DBG_88E("+88eu_drv - if2_open, bup=%d\n", padapter->bup);
|
||||
|
||||
if (primary_padapter->bup == false || primary_padapter->hw_init_completed == false)
|
||||
_netdev_open(primary_padapter->pnetdev);
|
||||
|
||||
if (padapter->bup == false && primary_padapter->bup == true &&
|
||||
primary_padapter->hw_init_completed == true) {
|
||||
int i;
|
||||
|
||||
padapter->bDriverStopped = false;
|
||||
padapter->bSurpriseRemoved = false;
|
||||
padapter->bCardDisableWOHSM = false;
|
||||
|
||||
rtw_hal_clone_data(padapter, primary_padapter);
|
||||
|
||||
padapter->bFWReady = primary_padapter->bFWReady;
|
||||
|
||||
if (rtw_start_drv_threads(padapter) == _FAIL)
|
||||
goto netdev_if2_open_error;
|
||||
|
||||
if (padapter->intf_start)
|
||||
padapter->intf_start(padapter);
|
||||
|
||||
padapter->hw_init_completed = true;
|
||||
|
||||
padapter->dir_dev = NULL;
|
||||
rtw_proc_init_one(pnetdev);
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_cfg80211_init_wiphy(padapter);
|
||||
#endif
|
||||
|
||||
padapter->bup = true;
|
||||
}
|
||||
padapter->net_closed = false;
|
||||
_set_timer(&padapter->mlmepriv.dynamic_chk_timer, 2000);
|
||||
if (!rtw_netif_queue_stopped(pnetdev))
|
||||
rtw_netif_start_queue(pnetdev);
|
||||
else
|
||||
rtw_netif_wake_queue(pnetdev);
|
||||
|
||||
DBG_88E("-88eu_drv - if2_open, bup=%d\n", padapter->bup);
|
||||
return 0;
|
||||
|
||||
netdev_if2_open_error:
|
||||
|
||||
padapter->bup = false;
|
||||
|
||||
netif_carrier_off(pnetdev);
|
||||
rtw_netif_stop_queue(pnetdev);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
int netdev_if2_open(struct net_device *pnetdev)
|
||||
{
|
||||
int ret;
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
||||
|
||||
_enter_critical_mutex(padapter->hw_init_mutex, NULL);
|
||||
ret = _netdev_if2_open(pnetdev);
|
||||
_exit_critical_mutex(padapter->hw_init_mutex, NULL);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int netdev_if2_close(struct net_device *pnetdev)
|
||||
{
|
||||
_adapter *padapter = (_adapter *)rtw_netdev_priv(pnetdev);
|
||||
|
||||
padapter->net_closed = true;
|
||||
|
||||
if (pnetdev) {
|
||||
if (!rtw_netif_queue_stopped(pnetdev))
|
||||
rtw_netif_stop_queue(pnetdev);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_scan_abort(padapter);
|
||||
wdev_to_priv(padapter->rtw_wdev)->bandroid_scan = false;
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29))
|
||||
static const struct net_device_ops rtw_netdev_if2_ops = {
|
||||
.ndo_open = netdev_if2_open,
|
||||
.ndo_stop = netdev_if2_close,
|
||||
.ndo_start_xmit = rtw_xmit_entry,
|
||||
.ndo_set_mac_address = rtw_net_set_mac_address,
|
||||
.ndo_get_stats = rtw_net_get_stats,
|
||||
.ndo_do_ioctl = rtw_ioctl,
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))
|
||||
.ndo_select_queue = rtw_select_queue,
|
||||
#endif
|
||||
};
|
||||
#endif
|
||||
|
||||
_adapter *rtw_drv_if2_init(_adapter *primary_padapter, char *name,
|
||||
void (*set_intf_ops)(struct _io_ops *pops))
|
||||
{
|
||||
int res = _FAIL;
|
||||
struct net_device *pnetdev;
|
||||
_adapter *padapter = NULL;
|
||||
struct dvobj_priv *pdvobjpriv;
|
||||
u8 mac[ETH_ALEN];
|
||||
|
||||
/****** init netdev ******/
|
||||
pnetdev = rtw_init_netdev(NULL);
|
||||
if (!pnetdev)
|
||||
goto error_rtw_drv_if2_init;
|
||||
|
||||
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,29))
|
||||
DBG_88E("register rtw_netdev_if2_ops to netdev_ops\n");
|
||||
pnetdev->netdev_ops = &rtw_netdev_if2_ops;
|
||||
#else
|
||||
pnetdev->open = netdev_if2_open;
|
||||
pnetdev->stop = netdev_if2_close;
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NO_WIRELESS_HANDLERS
|
||||
pnetdev->wireless_handlers = NULL;
|
||||
#endif
|
||||
|
||||
/****** init adapter ******/
|
||||
padapter = rtw_netdev_priv(pnetdev);
|
||||
_rtw_memcpy(padapter, primary_padapter, sizeof(_adapter));
|
||||
padapter->ph2c_fwcmd_mutex = primary_padapter->ph2c_fwcmd_mutex;
|
||||
padapter->psetch_mutex = primary_padapter->psetch_mutex;
|
||||
padapter->psetbw_mutex = primary_padapter->psetbw_mutex;
|
||||
padapter->hw_init_mutex = primary_padapter->hw_init_mutex;
|
||||
|
||||
padapter->bup = false;
|
||||
padapter->net_closed = true;
|
||||
padapter->hw_init_completed = false;
|
||||
|
||||
|
||||
//set adapter_type/iface type
|
||||
padapter->isprimary = false;
|
||||
padapter->adapter_type = SECONDARY_ADAPTER;
|
||||
padapter->pbuddy_adapter = primary_padapter;
|
||||
#ifndef CONFIG_HWPORT_SWAP //Port0 -> Pri , Port1 -> Sec
|
||||
padapter->iface_type = IFACE_PORT1;
|
||||
#else
|
||||
padapter->iface_type = IFACE_PORT0;
|
||||
#endif //CONFIG_HWPORT_SWAP
|
||||
padapter->pnetdev = pnetdev;
|
||||
|
||||
/****** setup dvobj ******/
|
||||
pdvobjpriv = adapter_to_dvobj(padapter);
|
||||
pdvobjpriv->if2 = padapter;
|
||||
|
||||
SET_NETDEV_DEV(pnetdev, dvobj_to_dev(pdvobjpriv));
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_wdev_alloc(padapter, dvobj_to_dev(pdvobjpriv));
|
||||
#endif //CONFIG_IOCTL_CFG80211
|
||||
|
||||
//set interface_type/chip_type/HardwareType
|
||||
padapter->interface_type = primary_padapter->interface_type;
|
||||
padapter->chip_type = primary_padapter->chip_type;
|
||||
padapter->HardwareType = primary_padapter->HardwareType;
|
||||
|
||||
//step 2. hook HalFunc, allocate HalData
|
||||
hal_set_hal_ops(padapter);
|
||||
|
||||
padapter->HalFunc.inirp_init = NULL;
|
||||
padapter->HalFunc.inirp_deinit = NULL;
|
||||
|
||||
padapter->intf_start = primary_padapter->intf_start;
|
||||
padapter->intf_stop = primary_padapter->intf_stop;
|
||||
|
||||
//step init_io_priv
|
||||
if ((rtw_init_io_priv(padapter, set_intf_ops)) == _FAIL) {
|
||||
RT_TRACE(_module_hci_intfs_c_,_drv_always_,("\n Can't init io_reqs\n"));
|
||||
}
|
||||
|
||||
pr_info("rtl8188eu - Driver version "DRIVERVERSION"\n");
|
||||
//step read_chip_version
|
||||
rtw_hal_read_chip_version(padapter);
|
||||
|
||||
//step usb endpoint mapping
|
||||
rtw_hal_chip_configure(padapter);
|
||||
|
||||
//init drv data
|
||||
if (rtw_init_drv_sw(padapter)!= _SUCCESS)
|
||||
goto error_rtw_drv_if2_init;
|
||||
|
||||
// alloc dev name after got efuse data.
|
||||
if (name == NULL)
|
||||
name = padapter->registrypriv.if2name;
|
||||
|
||||
rtw_init_netdev_name(pnetdev, name);
|
||||
//get mac address from primary_padapter
|
||||
_rtw_memcpy(mac, primary_padapter->eeprompriv.mac_addr, ETH_ALEN);
|
||||
|
||||
if (((mac[0]==0xff) &&(mac[1]==0xff) && (mac[2]==0xff) &&
|
||||
(mac[3]==0xff) && (mac[4]==0xff) &&(mac[5]==0xff)) ||
|
||||
((mac[0]==0x0) && (mac[1]==0x0) && (mac[2]==0x0) &&
|
||||
(mac[3]==0x0) && (mac[4]==0x0) &&(mac[5]==0x0))) {
|
||||
mac[0] = 0x00;
|
||||
mac[1] = 0xe0;
|
||||
mac[2] = 0x4c;
|
||||
mac[3] = 0x87;
|
||||
mac[4] = 0x11;
|
||||
mac[5] = 0x22;
|
||||
} else {
|
||||
//If the BIT1 is 0, the address is universally administered.
|
||||
//If it is 1, the address is locally administered
|
||||
mac[0] |= BIT(1); // locally administered
|
||||
}
|
||||
|
||||
_rtw_memcpy(padapter->eeprompriv.mac_addr, mac, ETH_ALEN);
|
||||
rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr, padapter->eeprompriv.mac_addr);
|
||||
|
||||
_rtw_memcpy(pnetdev->dev_addr, mac, ETH_ALEN);
|
||||
|
||||
pr_info("MAC Address (if2) = %pM\n", mac);
|
||||
|
||||
primary_padapter->pbuddy_adapter = padapter;
|
||||
|
||||
//prepare concurrent shared data buffer
|
||||
if (!primary_padapter->pcodatapriv) {
|
||||
struct co_data_priv *pcodatapriv;
|
||||
|
||||
pcodatapriv = (struct co_data_priv*)rtw_zvmalloc(sizeof(struct co_data_priv));
|
||||
|
||||
primary_padapter->pcodatapriv = pcodatapriv;
|
||||
padapter->pcodatapriv = pcodatapriv;
|
||||
|
||||
//concurrent shared data init.
|
||||
pcodatapriv->co_ch = rtw_channel;
|
||||
pcodatapriv->co_bw = HT_CHANNEL_WIDTH_20;
|
||||
pcodatapriv->co_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
|
||||
}
|
||||
|
||||
padapter->dir_dev = NULL;
|
||||
/* Tell the network stack we exist */
|
||||
if (register_netdev(pnetdev) != 0)
|
||||
goto error_rtw_drv_if2_init;
|
||||
|
||||
res = _SUCCESS;
|
||||
|
||||
return padapter;
|
||||
|
||||
error_rtw_drv_if2_init:
|
||||
|
||||
rtw_free_drv_sw(padapter);
|
||||
|
||||
if (pnetdev)
|
||||
rtw_free_netdev(pnetdev);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void rtw_drv_if2_free(_adapter *if2)
|
||||
{
|
||||
_adapter *padapter = if2;
|
||||
struct net_device *pnetdev = NULL;
|
||||
|
||||
if (padapter == NULL)
|
||||
return;
|
||||
|
||||
pnetdev = padapter->pnetdev;
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_wdev_free(padapter->rtw_wdev);
|
||||
#endif /* CONFIG_IOCTL_CFG80211 */
|
||||
|
||||
/* free concurrent shared data buffer */
|
||||
if (padapter->pcodatapriv) {
|
||||
rtw_vmfree((u8*)padapter->pcodatapriv, sizeof(struct co_data_priv));
|
||||
padapter->pcodatapriv = NULL;
|
||||
}
|
||||
|
||||
rtw_free_drv_sw(padapter);
|
||||
|
||||
rtw_free_netdev(pnetdev);
|
||||
}
|
||||
|
||||
void rtw_drv_if2_stop(_adapter *if2)
|
||||
{
|
||||
_adapter *padapter = if2;
|
||||
struct net_device *pnetdev = NULL;
|
||||
|
||||
if (padapter == NULL)
|
||||
return;
|
||||
|
||||
pnetdev = padapter->pnetdev;
|
||||
|
||||
if (pnetdev) {
|
||||
unregister_netdev(pnetdev); //will call netdev_close()
|
||||
rtw_proc_remove_one(pnetdev);
|
||||
}
|
||||
|
||||
rtw_cancel_all_timer(padapter);
|
||||
|
||||
if (padapter->bup == true) {
|
||||
padapter->bDriverStopped = true;
|
||||
#ifdef CONFIG_XMIT_ACK
|
||||
if (padapter->xmitpriv.ack_tx)
|
||||
rtw_ack_tx_done(&padapter->xmitpriv, RTW_SCTX_DONE_DRV_STOP);
|
||||
#endif
|
||||
|
||||
if (padapter->intf_stop)
|
||||
padapter->intf_stop(padapter);
|
||||
|
||||
rtw_stop_drv_threads(padapter);
|
||||
|
||||
padapter->bup = false;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_IOCTL_CFG80211
|
||||
rtw_wdev_unregister(padapter->rtw_wdev);
|
||||
#endif
|
||||
|
||||
if (padapter->pbuddy_adapter)
|
||||
padapter->pbuddy_adapter->pcodatapriv = NULL;
|
||||
}
|
||||
#endif //end of CONFIG_CONCURRENT_MODE
|
||||
|
||||
#ifdef CONFIG_BR_EXT
|
||||
void netdev_br_init(struct net_device *netdev)
|
||||
{
|
||||
|
@ -1843,14 +1491,6 @@ int _netdev_open(struct net_device *pnetdev)
|
|||
|
||||
netdev_open_normal_process:
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
{
|
||||
_adapter *sec_adapter = padapter->pbuddy_adapter;
|
||||
if (sec_adapter && (sec_adapter->bup == false || sec_adapter->hw_init_completed == false))
|
||||
_netdev_if2_open(sec_adapter->pnetdev);
|
||||
}
|
||||
#endif
|
||||
|
||||
RT_TRACE(_module_os_intfs_c_,_drv_info_,("-88eu_drv - dev_open\n"));
|
||||
DBG_88E("-88eu_drv - drv_open, bup=%d\n", padapter->bup);
|
||||
|
||||
|
|
|
@ -135,12 +135,6 @@ struct rtw_usb_drv {
|
|||
int drv_registered;
|
||||
|
||||
_mutex hw_init_mutex;
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
//global variable
|
||||
_mutex h2c_fwcmd_mutex;
|
||||
_mutex setch_mutex;
|
||||
_mutex setbw_mutex;
|
||||
#endif
|
||||
};
|
||||
|
||||
static struct usb_device_id rtl8188e_usb_id_tbl[] ={
|
||||
|
@ -1055,24 +1049,7 @@ static _adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
|
|||
|
||||
padapter->bDriverStopped=true;
|
||||
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
//set adapter_type/iface type for primary padapter
|
||||
padapter->isprimary = true;
|
||||
padapter->adapter_type = PRIMARY_ADAPTER;
|
||||
#ifndef CONFIG_HWPORT_SWAP
|
||||
padapter->iface_type = IFACE_PORT0;
|
||||
#else
|
||||
padapter->iface_type = IFACE_PORT1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
padapter->hw_init_mutex = &usb_drv->hw_init_mutex;
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
//set global variable to primary adapter
|
||||
padapter->ph2c_fwcmd_mutex = &usb_drv->h2c_fwcmd_mutex;
|
||||
padapter->psetch_mutex = &usb_drv->setch_mutex;
|
||||
padapter->psetbw_mutex = &usb_drv->setbw_mutex;
|
||||
#endif
|
||||
|
||||
#ifndef RTW_DVOBJ_CHIP_HW_TYPE
|
||||
//step 1-1., decide the chip_type via vid/pid
|
||||
|
@ -1427,12 +1404,6 @@ static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device
|
|||
goto free_dvobj;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
if ((if2 = rtw_drv_if2_init(if1, NULL, usb_set_intf_ops)) == NULL) {
|
||||
goto free_if1;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_INTEL_PROXIM
|
||||
rtw_sw_export=if1;
|
||||
#endif
|
||||
|
@ -1495,16 +1466,8 @@ _func_enter_;
|
|||
|
||||
LeaveAllPowerSaveMode(padapter);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
rtw_drv_if2_stop(dvobj->if2);
|
||||
#endif
|
||||
|
||||
rtw_usb_if1_deinit(padapter);
|
||||
|
||||
#ifdef CONFIG_CONCURRENT_MODE
|
||||
rtw_drv_if2_free(dvobj->if2);
|
||||
#endif
|
||||
|
||||
usb_dvobj_deinit(pusb_intf);
|
||||
|
||||
RT_TRACE(_module_hci_intfs_c_,_drv_err_,("-dev_remove()\n"));
|
||||
|
@ -1537,12 +1500,6 @@ static int __init rtw_drv_entry(void)
|
|||
rtw_suspend_lock_init();
|
||||
|
||||
_rtw_mutex_init(&usb_drv->hw_init_mutex);
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
//init global variable
|
||||
_rtw_mutex_init(&usb_drv->h2c_fwcmd_mutex);
|
||||
_rtw_mutex_init(&usb_drv->setch_mutex);
|
||||
_rtw_mutex_init(&usb_drv->setbw_mutex);
|
||||
#endif
|
||||
|
||||
usb_drv->drv_registered = true;
|
||||
return usb_register(&usb_drv->usbdrv);
|
||||
|
@ -1559,11 +1516,6 @@ static void __exit rtw_drv_halt(void)
|
|||
usb_deregister(&usb_drv->usbdrv);
|
||||
|
||||
_rtw_mutex_free(&usb_drv->hw_init_mutex);
|
||||
#if defined(CONFIG_CONCURRENT_MODE) || defined(CONFIG_DUALMAC_CONCURRENT)
|
||||
_rtw_mutex_free(&usb_drv->h2c_fwcmd_mutex);
|
||||
_rtw_mutex_free(&usb_drv->setch_mutex);
|
||||
_rtw_mutex_free(&usb_drv->setbw_mutex);
|
||||
#endif
|
||||
DBG_88E("-rtw_drv_halt\n");
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue