rtl8188eu: CONFIG_TDLS

This variable is not defined.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-03-04 15:31:57 -06:00
parent c372b989e3
commit 1bb0401638
22 changed files with 12 additions and 4974 deletions

View file

@ -8817,25 +8817,6 @@ static int rtw_wfd_tdls_enable(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
printk( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
if ( extra[ 0 ] == '0' )
{
padapter->wdinfo.wfd_tdls_enable = 0;
}
else
{
padapter->wdinfo.wfd_tdls_enable = 1;
}
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
}
@ -8845,23 +8826,6 @@ static int rtw_tdls_weaksec(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
u8 i, j;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
DBG_871X( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
if ( extra[ 0 ] == '0' )
{
padapter->wdinfo.wfd_tdls_weaksec = 0;
}
else
{
padapter->wdinfo.wfd_tdls_weaksec = 1;
}
#endif
return ret;
}
@ -8872,66 +8836,6 @@ static int rtw_tdls_enable(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
_irqL irqL;
_list *plist, *phead;
s32 index;
struct sta_info *psta = NULL;
struct sta_priv *pstapriv = &padapter->stapriv;
u8 tdls_sta[NUM_STA][ETH_ALEN];
u8 empty_hwaddr[ETH_ALEN] = { 0x00 };
printk( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
memset(tdls_sta, 0x00, sizeof(tdls_sta));
if ( extra[ 0 ] == '0' )
{
ptdlsinfo->enable = 0;
if(pstapriv->asoc_sta_count==1)
return ret;
_enter_critical_bh(&pstapriv->sta_hash_lock, &irqL);
for(index=0; index< NUM_STA; index++)
{
phead = &(pstapriv->sta_hash[index]);
plist = get_next(phead);
while ((rtw_end_of_queue_search(phead, plist)) == false)
{
psta = LIST_CONTAINOR(plist, struct sta_info ,hash_list);
plist = get_next(plist);
if(psta->tdls_sta_state != TDLS_STATE_NONE)
{
memcpy(tdls_sta[index], psta->hwaddr, ETH_ALEN);
}
}
}
_exit_critical_bh(&pstapriv->sta_hash_lock, &irqL);
for(index=0; index< NUM_STA; index++)
{
if( !_rtw_memcmp(tdls_sta[index], empty_hwaddr, ETH_ALEN) )
{
printk("issue tear down to "MAC_FMT"\n", MAC_ARG(tdls_sta[index]));
issue_tdls_teardown(padapter, tdls_sta[index]);
}
}
rtw_tdls_cmd(padapter, myid(&(padapter->eeprompriv)), TDLS_RS_RCR);
rtw_reset_tdls_info(padapter);
}
else if ( extra[ 0 ] == '1' )
{
ptdlsinfo->enable = 1;
}
#endif /* CONFIG_TDLS */
return ret;
}
@ -8941,43 +8845,6 @@ static int rtw_tdls_setup(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
u8 i, j;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
u8 mac_addr[ETH_ALEN];
#ifdef CONFIG_P2P
struct wifidirect_info *pwdinfo= &(padapter->wdinfo);
#endif /* CONFIG_P2P */
printk( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
for( i=0, j=0 ; i < ETH_ALEN; i++, j+=3 ){
mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1));
}
#ifdef CONFIG_P2P
if ( _AES_ != padapter->securitypriv.dot11PrivacyAlgrthm )
{
/* Weak Security situation with AP. */
if ( 0 == pwdinfo->wfd_tdls_weaksec )
{
/* Can't send the tdls setup request out!! */
DBG_871X( "[%s] Current link is not AES, SKIP sending the tdls setup request!!\n", __FUNCTION__ );
}
else
{
issue_tdls_setup_req(padapter, mac_addr);
}
}
else
#endif /* CONFIG_P2P */
{
issue_tdls_setup_req(padapter, mac_addr);
}
#endif
return ret;
}
@ -8987,29 +8854,6 @@ static int rtw_tdls_teardown(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
u8 i,j;
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct sta_info *ptdls_sta = NULL;
u8 mac_addr[ETH_ALEN];
DBG_871X( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
for( i=0, j=0 ; i < ETH_ALEN; i++, j+=3 ){
mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1));
}
ptdls_sta = rtw_get_stainfo( &(padapter->stapriv), mac_addr);
if(ptdls_sta != NULL)
{
ptdls_sta->stat_code = _RSON_TDLS_TEAR_UN_RSN_;
issue_tdls_teardown(padapter, mac_addr);
}
#endif /* CONFIG_TDLS */
return ret;
}
@ -9019,18 +8863,6 @@ static int rtw_tdls_discovery(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
DBG_871X( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
issue_tdls_dis_req(padapter, NULL);
#endif /* CONFIG_TDLS */
return ret;
}
@ -9040,28 +8872,6 @@ static int rtw_tdls_ch_switch(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
u8 i, j, mac_addr[ETH_ALEN];
struct sta_info *ptdls_sta = NULL;
DBG_8192C( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
for( i=0, j=0 ; i < ETH_ALEN; i++, j+=3 ){
mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1));
}
ptdls_sta = rtw_get_stainfo(&padapter->stapriv, mac_addr);
if( ptdls_sta == NULL )
return ret;
ptdlsinfo->ch_sensing=1;
rtw_tdls_cmd(padapter, ptdls_sta->hwaddr, TDLS_INIT_CH_SEN);
#endif /* CONFIG_TDLS */
return ret;
}
@ -9071,26 +8881,6 @@ static int rtw_tdls_pson(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u8 i, j, mac_addr[ETH_ALEN];
struct sta_info *ptdls_sta = NULL;
DBG_871X( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
for( i=0, j=0 ; i < ETH_ALEN; i++, j+=3 ){
mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1));
}
ptdls_sta = rtw_get_stainfo(&padapter->stapriv, mac_addr);
issue_nulldata_to_TDLS_peer_STA(padapter, ptdls_sta, 1);
#endif /* CONFIG_TDLS */
return ret;
}
@ -9100,26 +8890,6 @@ static int rtw_tdls_psoff(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv);
struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info);
u8 i, j, mac_addr[ETH_ALEN];
struct sta_info *ptdls_sta = NULL;
DBG_8192C( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
for( i=0, j=0 ; i < ETH_ALEN; i++, j+=3 ){
mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1));
}
ptdls_sta = rtw_get_stainfo(&padapter->stapriv, mac_addr);
issue_nulldata_to_TDLS_peer_STA(padapter, ptdls_sta, 0);
#endif /* CONFIG_TDLS */
return ret;
}
@ -9129,45 +8899,6 @@ static int rtw_tdls_setip(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
struct wifi_display_info *pwfd_info = ptdlsinfo->wfd_info;
u8 i=0, j=0, k=0, tag=0, ip[3] = { 0xff }, *ptr = extra;
printk( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length - 1 );
while( i < 4 )
{
for( j=0; j < 4; j++)
{
if( *( extra + j + tag ) == '.' || *( extra + j + tag ) == '\0' )
{
if( j == 1 )
pwfd_info->ip_address[i]=convert_ip_addr( '0', '0', *(extra+(j-1)+tag));
if( j == 2 )
pwfd_info->ip_address[i]=convert_ip_addr( '0', *(extra+(j-2)+tag), *(extra+(j-1)+tag));
if( j == 3 )
pwfd_info->ip_address[i]=convert_ip_addr( *(extra+(j-3)+tag), *(extra+(j-2)+tag), *(extra+(j-1)+tag));
tag += j + 1;
break;
}
}
i++;
}
printk( "[%s] Set IP = %u.%u.%u.%u \n", __FUNCTION__,
ptdlsinfo->wfd_info->ip_address[0], ptdlsinfo->wfd_info->ip_address[1],
ptdlsinfo->wfd_info->ip_address[2], ptdlsinfo->wfd_info->ip_address[3]
);
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
}
@ -9177,30 +8908,6 @@ static int rtw_tdls_getip(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
struct wifi_display_info *pwfd_info = ptdlsinfo->wfd_info;
printk( "[%s]\n", __FUNCTION__);
sprintf( extra, "\n\n%u.%u.%u.%u\n",
pwfd_info->peer_ip_address[0], pwfd_info->peer_ip_address[1],
pwfd_info->peer_ip_address[2], pwfd_info->peer_ip_address[3]
);
printk( "[%s] IP=%u.%u.%u.%u\n", __FUNCTION__,
pwfd_info->peer_ip_address[0], pwfd_info->peer_ip_address[1],
pwfd_info->peer_ip_address[2], pwfd_info->peer_ip_address[3]
);
wrqu->data.length = strlen( extra );
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
}
@ -9211,23 +8918,6 @@ static int rtw_tdls_getport(struct net_device *dev,
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
struct wifi_display_info *pwfd_info = ptdlsinfo->wfd_info;
printk( "[%s]\n", __FUNCTION__);
sprintf( extra, "\n\n%d\n", pwfd_info->peer_rtsp_ctrlport );
printk( "[%s] remote port = %d\n", __FUNCTION__, pwfd_info->peer_rtsp_ctrlport );
wrqu->data.length = strlen( extra );
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
}
@ -9240,26 +8930,6 @@ static int rtw_tdls_dis_result(struct net_device *dev,
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
struct wifi_display_info *pwfd_info = ptdlsinfo->wfd_info;
printk( "[%s]\n", __FUNCTION__);
if(ptdlsinfo->dev_discovered == 1 )
{
sprintf( extra, "\n\nDis=1\n" );
ptdlsinfo->dev_discovered = 0;
}
wrqu->data.length = strlen( extra );
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
}
@ -9272,31 +8942,7 @@ static int rtw_wfd_tdls_status(struct net_device *dev,
int ret = 0;
#ifdef CONFIG_TDLS
#ifdef CONFIG_P2P
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
struct tdls_info *ptdlsinfo = &padapter->tdlsinfo;
struct wifi_display_info *pwfd_info = ptdlsinfo->wfd_info;
printk( "[%s]\n", __FUNCTION__);
if(ptdlsinfo->setup_state == TDLS_LINKED_STATE )
{
sprintf( extra, "\n\nStatus=1\n" );
}
else
{
sprintf( extra, "\n\nStatus=0\n" );
}
wrqu->data.length = strlen( extra );
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
}
static int rtw_tdls_ch_switch_off(struct net_device *dev,
@ -9305,31 +8951,6 @@ static int rtw_tdls_ch_switch_off(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
u8 i, j, mac_addr[ETH_ALEN];
struct sta_info *ptdls_sta = NULL;
DBG_871X( "[%s] %s %d\n", __FUNCTION__, extra, wrqu->data.length -1 );
for( i=0, j=0 ; i < ETH_ALEN; i++, j+=3 ){
mac_addr[i]=key_2char2num(*(extra+j), *(extra+j+1));
}
ptdls_sta = rtw_get_stainfo(&padapter->stapriv, mac_addr);
ptdls_sta->tdls_sta_state |= TDLS_SW_OFF_STATE;
/*
if((ptdls_sta->tdls_sta_state & TDLS_AT_OFF_CH_STATE) && (ptdls_sta->tdls_sta_state & TDLS_PEER_AT_OFF_STATE)){
pmlmeinfo->tdls_candidate_ch= pmlmeext->cur_channel;
issue_tdls_ch_switch_req(padapter, mac_addr);
DBG_871X("issue tdls ch switch req back to base channel\n");
}
*/
#endif /* CONFIG_TDLS */
return ret;
}
@ -9339,85 +8960,6 @@ static int rtw_tdls(struct net_device *dev,
{
int ret = 0;
#ifdef CONFIG_TDLS
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
DBG_871X( "[%s] extra = %s\n", __FUNCTION__, extra );
/* WFD Sigma will use the tdls enable command to let the driver know we want to test the tdls now! */
if ( _rtw_memcmp( extra, "wfdenable=", 10 ) )
{
wrqu->data.length -=10;
rtw_wfd_tdls_enable( dev, info, wrqu, &extra[10] );
return ret;
}
else if ( _rtw_memcmp( extra, "weaksec=", 8 ) )
{
wrqu->data.length -=8;
rtw_tdls_weaksec( dev, info, wrqu, &extra[8] );
return ret;
}
else if ( _rtw_memcmp( extra, "tdlsenable=", 11 ) )
{
wrqu->data.length -=11;
rtw_tdls_enable( dev, info, wrqu, &extra[11] );
return ret;
}
if( padapter->tdlsinfo.enable == 0 )
{
printk("tdls haven't enabled\n");
return 0;
}
if ( _rtw_memcmp( extra, "setup=", 6 ) )
{
wrqu->data.length -=6;
rtw_tdls_setup( dev, info, wrqu, &extra[6] );
}
else if (_rtw_memcmp( extra, "tear=", 5 ) )
{
wrqu->data.length -= 5;
rtw_tdls_teardown( dev, info, wrqu, &extra[5] );
}
else if (_rtw_memcmp( extra, "dis=", 4 ) )
{
wrqu->data.length -= 4;
rtw_tdls_discovery( dev, info, wrqu, &extra[4] );
}
else if (_rtw_memcmp( extra, "sw=", 3 ) )
{
wrqu->data.length -= 3;
rtw_tdls_ch_switch( dev, info, wrqu, &extra[3] );
}
else if (_rtw_memcmp( extra, "swoff=", 6 ) )
{
wrqu->data.length -= 6;
rtw_tdls_ch_switch_off( dev, info, wrqu, &extra[6] );
}
else if (_rtw_memcmp( extra, "pson=", 5 ) )
{
wrqu->data.length -= 5;
rtw_tdls_pson( dev, info, wrqu, &extra[5] );
}
else if (_rtw_memcmp( extra, "psoff=", 6 ) )
{
wrqu->data.length -= 6;
rtw_tdls_psoff( dev, info, wrqu, &extra[6] );
}
#ifdef CONFIG_P2P
else if (_rtw_memcmp( extra, "setip=", 6 ) )
{
wrqu->data.length -= 6;
rtw_tdls_setip( dev, info, wrqu, &extra[6] );
}
else if (_rtw_memcmp( extra, "tprobe=", 6 ) )
{
issue_tunneled_probe_req((struct adapter *)rtw_netdev_priv(dev));
}
#endif /* CONFIG_P2P */
#endif /* CONFIG_TDLS */
return ret;
}

View file

@ -884,15 +884,6 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
goto exit;
}
#ifdef CONFIG_TDLS
if(rtw_init_tdls_info(padapter) == _FAIL)
{
DBG_871X("Can't rtw_init_tdls_info\n");
ret8=_FAIL;
goto exit;
}
#endif /* CONFIG_TDLS */
if(_rtw_init_xmit_priv(&padapter->xmitpriv, padapter) == _FAIL)
{
DBG_871X("Can't _rtw_init_xmit_priv\n");
@ -1018,10 +1009,6 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
free_mlme_ext_priv(&padapter->mlmeextpriv);
#ifdef CONFIG_TDLS
/* rtw_free_tdls_info(&padapter->tdlsinfo); */
#endif /* CONFIG_TDLS */
rtw_free_cmd_priv(&padapter->cmdpriv);
rtw_free_evt_priv(&padapter->evtpriv);