rtl8188eu: Remove code selected when CONFIG_CONCURRENT_MODE is defined

This parameter can only be set for RTL8192DU.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-02-15 14:31:30 -06:00
parent 1305b2dc4b
commit 020675ff42
28 changed files with 78 additions and 3708 deletions

View file

@ -1725,28 +1725,6 @@ static int rtw_wx_set_wap(struct net_device *dev,
struct wlan_network *pnetwork = NULL;
NDIS_802_11_AUTHENTICATION_MODE authmode;
;
/*
#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_871X("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)
{
@ -1934,12 +1912,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
// When Busy Traffic, driver do not site survey. So driver return success.
// wpa_supplicant will not issue SIOCSIWSCAN cmd again after scan timeout.
// modify by thomas 2011-02-22.
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == true
#ifdef CONFIG_CONCURRENT_MODE
|| rtw_get_buddy_bBusyTraffic(padapter) == true
#endif //CONFIG_CONCURRENT_MODE
)
{
if (pmlmepriv->LinkDetectInfo.bBusyTraffic == true) {
indicate_wx_scan_complete_event(padapter);
goto exit;
}
@ -1967,22 +1940,6 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
}
#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_871X("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)
{
@ -2164,15 +2121,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
DBG_871X("DBG_IOCTL %s:%d\n",__FUNCTION__, __LINE__);
#endif
/*
#ifdef CONFIG_CONCURRENT_MODE
if(padapter->iface_type > PRIMARY_IFACE)
{
ret = -EINVAL;
goto exit;
}
#endif
*/
if(adapter_to_pwrctl(padapter)->brfoffbyhw && padapter->bDriverStopped)
{
ret = -EINVAL;
@ -2199,21 +2147,6 @@ 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
*/
#if 1 // Wireless Extension use EAGAIN to try
wait_status = _FW_UNDER_SURVEY
#ifndef CONFIG_ANDROID
| _FW_UNDER_LINKING
@ -2224,31 +2157,6 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
{
return -EAGAIN;
}
#else
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);
cnt++;
if(cnt > wait_for_surveydone )
break;
}
#endif
_enter_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
@ -2324,27 +2232,6 @@ static int rtw_wx_set_essid(struct net_device *dev,
DBG_871X("DBG_IOCTL %s:%d\n",__FUNCTION__, __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_871X("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)
{
@ -3999,33 +3886,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))
{
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
//struct wifidirect_info *pbuddy_wdinfo = &pbuddy_adapter->wdinfo;
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
_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;
@ -4237,12 +4098,6 @@ static int rtw_p2p_get_status(struct net_device *dev,
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct iw_point *pdata = &wrqu->data;
struct wifidirect_info *pwdinfo = &( padapter->wdinfo );
#ifdef CONFIG_CONCURRENT_MODE
struct adapter *pbuddy_adapter = padapter->pbuddy_adapter;
struct wifidirect_info *pbuddy_wdinfo = &pbuddy_adapter->wdinfo;
struct mlme_priv *pbuddy_mlmepriv = &pbuddy_adapter->mlmepriv;
struct mlme_ext_priv *pbuddy_mlmeext = &pbuddy_adapter->mlmeextpriv;
#endif
if ( padapter->bShowGetP2PState )
{
@ -4913,11 +4768,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
struct 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,15 +4817,7 @@ static int rtw_p2p_connect(struct net_device *dev,
_exit_critical_bh(&(pmlmepriv->scanned_queue.lock), &irqL);
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
if ( uintPeerChannel ) {
_rtw_memset( &pwdinfo->nego_req_info, 0x00, sizeof( struct tx_nego_req_info ) );
_rtw_memset( &pwdinfo->groupid_info, 0x00, sizeof( struct group_id_info ) );
@ -4993,34 +4835,10 @@ 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_871X( "[%s] Start PreTx Procedure!\n", __FUNCTION__ );
_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
{
} else {
DBG_871X( "[%s] Not Found in Scanning Queue~\n", __FUNCTION__ );
ret = -1;
}
@ -5049,11 +4867,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
struct 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,15 +4996,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
}
#endif // CONFIG_WFD
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
if ( uintPeerChannel ) {
// Store the GO's bssid
for( jj = 0, kk = 18; jj < ETH_ALEN; jj++, kk += 3 )
{
@ -5207,41 +5012,12 @@ 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
{
} else {
DBG_871X( "[%s] NOT Found in the Scanning Queue!\n", __FUNCTION__ );
}
exit:
@ -5271,11 +5047,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
struct 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;
@ -5411,10 +5182,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
struct 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
@ -5713,11 +5480,6 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
uint p2pielen = 0, attr_contentlen = 0;
_irqL irqL;
u8 ie_offset;
#ifdef CONFIG_CONCURRENT_MODE
struct 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;
@ -5900,12 +5662,6 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
#endif // CONFIG_WFD
DBG_871X( "[%s] peer channel: %d!\n", __FUNCTION__, 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;
@ -5923,40 +5679,12 @@ 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
{
} else {
DBG_871X( "[%s] NOT Found in the Scanning Queue!\n", __FUNCTION__ );
#ifdef CONFIG_INTEL_WIDI
rtw_p2p_set_state(pwdinfo, P2P_STATE_FIND_PHASE_SEARCH);
@ -6305,18 +6033,12 @@ 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);
rereg_priv->old_ifname[IFNAMSIZ-1] = 0;
}
//DBG_871X("%s wrqu->data.length:%d\n", __FUNCTION__, wrqu->data.length);
if(wrqu->data.length > IFNAMSIZ)
return -EFAULT;