rtl8188eu: Remove CONFIG_IOCTL_CFG80211

This one is always selected.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-02-19 22:52:01 -06:00
parent 34c3293686
commit 5470a10d13
18 changed files with 29 additions and 344 deletions

View file

@ -2192,7 +2192,6 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16
psta->state &= ~_FW_LINKED;
_exit_critical_bh(&psta->lock, &irqL);
#ifdef CONFIG_IOCTL_CFG80211
if (1) {
#ifdef COMPAT_KERNEL_RELEASE
rtw_cfg80211_indicate_sta_disassoc(padapter, psta->hwaddr, reason);
@ -2201,9 +2200,7 @@ u8 ap_free_sta(struct adapter *padapter, struct sta_info *psta, bool active, u16
#else /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) && !defined(CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER) */
/* will call rtw_cfg80211_indicate_sta_disassoc() in cmd_thread for old API context */
#endif /* LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) && !defined(CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER) */
} else
#endif /* CONFIG_IOCTL_CFG80211 */
{
} else {
rtw_indicate_sta_disassoc_event(padapter, psta);
}

View file

@ -143,7 +143,7 @@ void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
rtw_free_mlme_ie_data(&pmlmepriv->p2p_assoc_req_ie, &pmlmepriv->p2p_assoc_req_ie_len);
#endif
#if defined(CONFIG_WFD) && defined(CONFIG_IOCTL_CFG80211)
#if defined(CONFIG_WFD)
rtw_free_mlme_ie_data(&pmlmepriv->wfd_beacon_ie, &pmlmepriv->wfd_beacon_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->wfd_probe_req_ie, &pmlmepriv->wfd_probe_req_ie_len);
rtw_free_mlme_ie_data(&pmlmepriv->wfd_probe_resp_ie, &pmlmepriv->wfd_probe_resp_ie_len);
@ -1226,12 +1226,7 @@ void rtw_surveydone_event_callback(struct adapter *adapter, u8 *pbuf)
}
#endif
#ifdef CONFIG_IOCTL_CFG80211
rtw_cfg80211_surveydone_event_callback(adapter);
#endif /* CONFIG_IOCTL_CFG80211 */
;
}
void rtw_dummy_event_callback(struct adapter *adapter , u8 *pbuf)
@ -1963,7 +1958,6 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
/* report to upper layer */
DBG_871X("indicate_sta_assoc_event to upper layer - hostapd\n");
#ifdef CONFIG_IOCTL_CFG80211
_enter_critical_bh(&psta->lock, &irqL);
if(psta->passoc_req && psta->assoc_req_len>0)
{
@ -1986,9 +1980,6 @@ void rtw_stassoc_event_callback(struct adapter *adapter, u8 *pbuf)
rtw_mfree(passoc_req, assoc_req_len);
}
#else /* CONFIG_IOCTL_CFG80211 */
rtw_indicate_sta_assoc_event(adapter, psta);
#endif /* CONFIG_IOCTL_CFG80211 */
#endif /* CONFIG_AUTO_AP_MODE */
}
goto exit;
@ -2087,14 +2078,11 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
if(check_fwstate(pmlmepriv, WIFI_AP_STATE))
{
#ifdef CONFIG_IOCTL_CFG80211
#ifdef COMPAT_KERNEL_RELEASE
#elif (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) || defined(CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER)
rtw_cfg80211_indicate_sta_disassoc(adapter, pstadel->macaddr, *(u16*)pstadel->rsvd);
#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,6,37)) || defined(CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER) */
#endif /* CONFIG_IOCTL_CFG80211 */
return;
}
@ -2271,11 +2259,8 @@ void _rtw_join_timeout_handler (struct adapter *adapter)
rtw_indicate_disconnect(adapter);
free_scanqueue(pmlmepriv);/* */
#ifdef CONFIG_IOCTL_CFG80211
/* indicate disconnect for the case that join_timeout and check_fwstate != FW_LINKED */
rtw_cfg80211_indicate_disconnect(adapter);
#endif /* CONFIG_IOCTL_CFG80211 */
}
_exit_critical_bh(&pmlmepriv->lock, &irqL);

View file

@ -735,7 +735,6 @@ static u32 p2p_listen_state_process(struct adapter *padapter, unsigned char *da)
{
bool response = true;
#ifdef CONFIG_IOCTL_CFG80211
if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 )
{
if(padapter->cfg80211_wdinfo.is_ro_ch == false
@ -759,7 +758,6 @@ static u32 p2p_listen_state_process(struct adapter *padapter, unsigned char *da)
}
}
else
#endif /* CONFIG_IOCTL_CFG80211 */
if( padapter->wdinfo.driver_interface == DRIVER_WEXT )
{
/* do nothing if the device name is empty */
@ -838,10 +836,6 @@ unsigned int OnProbeReq(struct adapter *padapter, union recv_frame *precv_frame)
{
if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_DEVICE))
{
#ifndef CONFIG_IOCTL_CFG80211
/* FIXME */
report_survey_event(padapter, precv_frame);
#endif
p2p_listen_state_process( padapter, get_sa(pframe));
return _SUCCESS;
@ -1976,7 +1970,6 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
else
issue_asocrsp(padapter, status, pstat, WIFI_REASSOCRSP);
#ifdef CONFIG_IOCTL_CFG80211
_enter_critical_bh(&pstat->lock, &irqL);
if(pstat->passoc_req)
{
@ -1992,7 +1985,6 @@ unsigned int OnAssocReq(struct adapter *padapter, union recv_frame *precv_frame)
pstat->assoc_req_len = pkt_len;
}
_exit_critical_bh(&pstat->lock, &irqL);
#endif /* CONFIG_IOCTL_CFG80211 */
/* 3-(1) report sta add event */
report_add_sta_event(padapter, pstat->hwaddr, pstat->aid);
@ -4364,7 +4356,6 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
/* DS parameter set */
pframe = rtw_set_ie(pframe, _DSSET_IE_, 1, (unsigned char *)&pwdinfo->listen_channel, &pattrib->pktlen);
#ifdef CONFIG_IOCTL_CFG80211
if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 )
{
if( pmlmepriv->wps_probe_resp_ie != NULL && pmlmepriv->p2p_probe_resp_ie != NULL )
@ -4379,10 +4370,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
pattrib->pktlen += pmlmepriv->p2p_probe_resp_ie_len;
pframe += pmlmepriv->p2p_probe_resp_ie_len;
}
}
else
#endif /* CONFIG_IOCTL_CFG80211 */
{
} else {
/* Todo: WPS IE */
/* Noted by Albert 20100907 */
@ -4594,15 +4582,11 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
}
#ifdef CONFIG_WFD
#ifdef CONFIG_IOCTL_CFG80211
if ( true == pwdinfo->wfd_info->wfd_enable )
#endif /* CONFIG_IOCTL_CFG80211 */
{
if ( true == pwdinfo->wfd_info->wfd_enable ) {
wfdielen = build_probe_resp_wfd_ie(pwdinfo, pframe, 0);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
}
#ifdef CONFIG_IOCTL_CFG80211
else if (pmlmepriv->wfd_probe_resp_ie != NULL && pmlmepriv->wfd_probe_resp_ie_len>0)
{
/* WFD IE */
@ -4610,7 +4594,6 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
pattrib->pktlen += pmlmepriv->wfd_probe_resp_ie_len;
pframe += pmlmepriv->wfd_probe_resp_ie_len;
}
#endif /* CONFIG_IOCTL_CFG80211 */
#endif /* CONFIG_WFD */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -4704,7 +4687,6 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
/* Use the OFDM rate in the P2P probe request frame. ( 6(B), 9(B), 12(B), 24(B), 36, 48, 54 ) */
pframe = rtw_set_ie(pframe, _SUPPORTEDRATES_IE_, 8, pwdinfo->support_rate, &pattrib->pktlen);
#ifdef CONFIG_IOCTL_CFG80211
if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 )
{
if( pmlmepriv->wps_probe_req_ie != NULL && pmlmepriv->p2p_probe_req_ie != NULL )
@ -4719,10 +4701,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
pattrib->pktlen += pmlmepriv->p2p_probe_req_ie_len;
pframe += pmlmepriv->p2p_probe_req_ie_len;
}
}
else
#endif /* CONFIG_IOCTL_CFG80211 */
{
} else {
/* WPS IE */
/* Noted by Albert 20110221 */
@ -4942,15 +4921,12 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
}
#ifdef CONFIG_WFD
#ifdef CONFIG_IOCTL_CFG80211
if ( true == pwdinfo->wfd_info->wfd_enable )
#endif
{
wfdielen = build_probe_req_wfd_ie(pwdinfo, pframe);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
}
#ifdef CONFIG_IOCTL_CFG80211
else if (pmlmepriv->wfd_probe_req_ie != NULL && pmlmepriv->wfd_probe_req_ie_len>0)
{
/* WFD IE */
@ -4958,7 +4934,6 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
pattrib->pktlen += pmlmepriv->wfd_probe_req_ie_len;
pframe += pmlmepriv->wfd_probe_req_ie_len;
}
#endif /* CONFIG_IOCTL_CFG80211 */
#endif /* CONFIG_WFD */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -5084,14 +5059,10 @@ static unsigned int on_action_public_p2p(union recv_frame *precv_frame)
#ifdef CONFIG_P2P
_cancel_timer_ex( &pwdinfo->reset_ch_sitesurvey );
#ifdef CONFIG_IOCTL_CFG80211
if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211)
{
rtw_cfg80211_rx_p2p_action_public(padapter, pframe, len);
}
else
#endif /* CONFIG_IOCTL_CFG80211 */
{
} else {
/* Do nothing if the driver doesn't enable the P2P function. */
if(rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
return _SUCCESS;
@ -5529,10 +5500,8 @@ static unsigned int on_action_public_default(union recv_frame *precv_frame, u8 a
if (rtw_action_public_decache(precv_frame, token) == _FAIL)
goto exit;
#ifdef CONFIG_IOCTL_CFG80211
cnt += sprintf((msg+cnt), "%s(token:%u)", action_public_str(action), token);
rtw_cfg80211_rx_action(adapter, pframe, frame_len, msg);
#endif
ret = _SUCCESS;
@ -5644,15 +5613,11 @@ unsigned int OnAction_p2p(struct adapter *padapter, union recv_frame *precv_fram
if (be32_to_cpu(*((__be32*)(frame_body + 1))) != P2POUI)
return _SUCCESS;
#ifdef CONFIG_IOCTL_CFG80211
if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 )
{
rtw_cfg80211_rx_action_p2p(padapter, pframe, len);
return _SUCCESS;
}
else
#endif /* CONFIG_IOCTL_CFG80211 */
{
} else {
len -= sizeof(struct rtw_ieee80211_hdr_3addr);
OUI_Subtype = frame_body[5];
dialogToken = frame_body[6];
@ -6005,7 +5970,6 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
remainder_ielen = cur_network->IELength - wps_offset - wpsielen;
#ifdef CONFIG_IOCTL_CFG80211
if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 )
{
if(pmlmepriv->wps_beacon_ie && pmlmepriv->wps_beacon_ie_len>0)
@ -6029,10 +5993,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
pframe += cur_network->IELength;
pattrib->pktlen += cur_network->IELength;
}
}
else
#endif /* CONFIG_IOCTL_CFG80211 */
{
} else {
pframe_wscie = pframe + wps_offset;
memcpy(pframe, cur_network->IEs, wps_offset+wpsielen);
pframe += (wps_offset + wpsielen);
@ -6122,31 +6083,21 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO))
{
u32 len;
#ifdef CONFIG_IOCTL_CFG80211
if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 )
{
len = pmlmepriv->p2p_beacon_ie_len;
if(pmlmepriv->p2p_beacon_ie && len>0)
memcpy(pframe, pmlmepriv->p2p_beacon_ie, len);
}
else
#endif /* CONFIG_IOCTL_CFG80211 */
{
} else {
len = build_beacon_p2p_ie(pwdinfo, pframe);
}
pframe += len;
pattrib->pktlen += len;
#ifdef CONFIG_WFD
#ifdef CONFIG_IOCTL_CFG80211
if(true == pwdinfo->wfd_info->wfd_enable)
#endif /* CONFIG_IOCTL_CFG80211 */
{
if(pwdinfo->wfd_info->wfd_enable) {
len = build_beacon_wfd_ie( pwdinfo, pframe );
}
#ifdef CONFIG_IOCTL_CFG80211
else
{
} else {
len = 0;
if(pmlmepriv->wfd_beacon_ie && pmlmepriv->wfd_beacon_ie_len>0)
{
@ -6154,7 +6105,6 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
memcpy(pframe, pmlmepriv->wfd_beacon_ie, len);
}
}
#endif /* CONFIG_IOCTL_CFG80211 */
pframe += len;
pattrib->pktlen += len;
#endif /* CONFIG_WFD */
@ -6446,17 +6396,13 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO) /*&& is_valid_p2p_probereq*/)
{
u32 len;
#ifdef CONFIG_IOCTL_CFG80211
if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 )
{
/* if pwdinfo->role == P2P_ROLE_DEVICE will call issue_probersp_p2p() */
len = pmlmepriv->p2p_go_probe_resp_ie_len;
if(pmlmepriv->p2p_go_probe_resp_ie && len>0)
memcpy(pframe, pmlmepriv->p2p_go_probe_resp_ie, len);
}
else
#endif /* CONFIG_IOCTL_CFG80211 */
{
} else {
len = build_probe_resp_p2p_ie(pwdinfo, pframe);
}
@ -6464,13 +6410,10 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
pattrib->pktlen += len;
#ifdef CONFIG_WFD
#ifdef CONFIG_IOCTL_CFG80211
if(true == pwdinfo->wfd_info->wfd_enable)
#endif /* CONFIG_IOCTL_CFG80211 */
{
len = build_probe_resp_wfd_ie(pwdinfo, pframe, 0);
}
#ifdef CONFIG_IOCTL_CFG80211
else
{
len = 0;
@ -6480,7 +6423,6 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
memcpy(pframe, pmlmepriv->wfd_probe_resp_ie, len);
}
}
#endif /* CONFIG_IOCTL_CFG80211 */
pframe += len;
pattrib->pktlen += len;
#endif /* CONFIG_WFD */
@ -6924,9 +6866,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
}
#ifdef CONFIG_WFD
if(rtw_p2p_chk_role(pwdinfo, P2P_ROLE_GO)
#ifdef CONFIG_IOCTL_CFG80211
&& (true == pwdinfo->wfd_info->wfd_enable)
#endif /* CONFIG_IOCTL_CFG80211 */
)
{
wfdielen = build_assoc_resp_wfd_ie(pwdinfo, pframe);
@ -7205,7 +7145,6 @@ void issue_assocreq(struct adapter *padapter)
#ifdef CONFIG_P2P
#ifdef CONFIG_IOCTL_CFG80211
if(wdev_to_priv(padapter->rtw_wdev)->p2p_enabled && pwdinfo->driver_interface == DRIVER_CFG80211 )
{
if(pmlmepriv->p2p_assoc_req_ie && pmlmepriv->p2p_assoc_req_ie_len>0)
@ -7214,10 +7153,7 @@ void issue_assocreq(struct adapter *padapter)
pframe += pmlmepriv->p2p_assoc_req_ie_len;
pattrib->pktlen += pmlmepriv->p2p_assoc_req_ie_len;
}
}
else
#endif /* CONFIG_IOCTL_CFG80211 */
{
} else {
if(!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) && !rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
{
/* Should add the P2P IE in the association request frame. */
@ -7360,15 +7296,12 @@ void issue_assocreq(struct adapter *padapter)
#endif /* CONFIG_P2P */
#ifdef CONFIG_WFD
#ifdef CONFIG_IOCTL_CFG80211
if ( true == pwdinfo->wfd_info->wfd_enable )
#endif /* CONFIG_IOCTL_CFG80211 */
{
wfdielen = build_assoc_req_wfd_ie(pwdinfo, pframe);
pframe += wfdielen;
pattrib->pktlen += wfdielen;
}
#ifdef CONFIG_IOCTL_CFG80211
else if (pmlmepriv->wfd_assoc_req_ie != NULL && pmlmepriv->wfd_assoc_req_ie_len>0)
{
/* WFD IE */
@ -7376,7 +7309,6 @@ void issue_assocreq(struct adapter *padapter)
pattrib->pktlen += pmlmepriv->wfd_assoc_req_ie_len;
pframe += pmlmepriv->wfd_assoc_req_ie_len;
}
#endif /* CONFIG_IOCTL_CFG80211 */
#endif /* CONFIG_WFD */
pattrib->last_txcmdsz = pattrib->pktlen;
@ -10755,11 +10687,9 @@ u8 sitesurvey_cmd_hdl(struct adapter *padapter, u8 *pbuf)
/* config the initial gain under scaning, need to write the BB registers */
#ifdef CONFIG_P2P
#ifdef CONFIG_IOCTL_CFG80211
if((wdev_to_priv(padapter->rtw_wdev))->p2p_enabled == true && pwdinfo->driver_interface == DRIVER_CFG80211 )
initialgain = 0x30;
else
#endif /* CONFIG_IOCTL_CFG80211 */
if ( !rtw_p2p_chk_state( pwdinfo, P2P_STATE_NONE ) )
initialgain = 0x28;
else

View file

@ -3311,7 +3311,6 @@ static void pre_tx_negoreq_handler( struct adapter* padapter )
_set_timer( &pwdinfo->pre_tx_scan_timer, P2P_TX_PRESCAN_TIMEOUT );
}
#ifdef CONFIG_IOCTL_CFG80211
static void ro_ch_handler(struct adapter *padapter)
{
struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &padapter->cfg80211_wdinfo;
@ -3929,7 +3928,6 @@ void rtw_init_cfg80211_wifidirect_info( struct adapter* padapter)
_init_timer( &pcfg80211_wdinfo->remain_on_ch_timer, padapter->pnetdev, ro_ch_timer_process, padapter );
}
#endif /* CONFIG_IOCTL_CFG80211 */
void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
{
@ -3957,14 +3955,11 @@ void p2p_protocol_wk_hdl(struct adapter *padapter, int intCmdType)
case P2P_PRE_TX_NEGOREQ_PROCESS_WK:
pre_tx_negoreq_handler( padapter );
break;
#ifdef CONFIG_IOCTL_CFG80211
case P2P_RO_CH_WK:
{
ro_ch_handler( padapter );
break;
}
#endif /* CONFIG_IOCTL_CFG80211 */
}
}
@ -4441,12 +4436,7 @@ void init_wifidirect_info( struct adapter* padapter, enum P2P_ROLE role)
/* Commented by Kurt 20130319 */
/* For WiDi purpose: Use CFG80211 interface but controled WFD/RDS frame by driver itself. */
#ifdef CONFIG_IOCTL_CFG80211
pwdinfo->driver_interface = DRIVER_CFG80211;
#else
pwdinfo->driver_interface = DRIVER_WEXT;
#endif /* CONFIG_IOCTL_CFG80211 */
pwdinfo->wfd_tdls_enable = 0;
memset( pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN );
memset( pwdinfo->p2p_peer_device_addr, 0x00, ETH_ALEN );
@ -4634,10 +4624,8 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
return ret;
#endif /* CONFIG_INTEL_WIDI */
#ifdef CONFIG_IOCTL_CFG80211
if( padapter->wdinfo.driver_interface == DRIVER_CFG80211 )
wdev_to_priv(padapter->rtw_wdev)->p2p_enabled = false;
#endif /* CONFIG_IOCTL_CFG80211 */
if (_FAIL == rtw_pwr_wakeup(padapter)) {
ret = _FAIL;
@ -4673,14 +4661,8 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
#endif /* CONFIG_INTEL_WIDI */
/* For WiDi purpose. */
#ifdef CONFIG_IOCTL_CFG80211
pwdinfo->driver_interface = DRIVER_CFG80211;
#else
pwdinfo->driver_interface = DRIVER_WEXT;
#endif /* CONFIG_IOCTL_CFG80211 */
}
exit:
return ret;
}

View file

@ -126,9 +126,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
struct xmit_priv *pxmit_priv = &adapter->xmitpriv;
#ifdef CONFIG_P2P
struct wifidirect_info *pwdinfo = &(adapter->wdinfo);
#ifdef CONFIG_IOCTL_CFG80211
struct cfg80211_wifidirect_info *pcfg80211_wdinfo = &adapter->cfg80211_wdinfo;
#endif
#endif
bool ret = false;
@ -142,7 +140,7 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
|| check_fwstate(pmlmepriv, WIFI_UNDER_LINKING|WIFI_UNDER_WPS)
|| check_fwstate(pmlmepriv, WIFI_AP_STATE)
|| check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE|WIFI_ADHOC_STATE)
#if defined(CONFIG_P2P) && defined(CONFIG_IOCTL_CFG80211) && defined(CONFIG_P2P_IPS)
#if defined(CONFIG_P2P) && defined(CONFIG_P2P_IPS)
|| pcfg80211_wdinfo->is_ro_ch
#elif defined(CONFIG_P2P)
|| !rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)
@ -156,16 +154,14 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
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)
#if defined(CONFIG_P2P) && defined(CONFIG_P2P_IPS)
|| b_pcfg80211_wdinfo->is_ro_ch
#elif defined(CONFIG_P2P)
|| !rtw_p2p_chk_state(b_pwdinfo, P2P_STATE_NONE)
@ -512,11 +508,8 @@ u8 PS_RDY_CHECK(struct adapter * padapter)
return false;
}
#ifdef CONFIG_IOCTL_CFG80211
if (!rtw_cfg80211_pwr_mgmt(padapter))
return false;
#endif
return true;
}

View file

@ -39,20 +39,8 @@
#define CONFIG_RTL8188E
#if defined(CONFIG_PLATFORM_ACTIONS_ATM702X)
#ifndef CONFIG_IOCTL_CFG80211
#define CONFIG_IOCTL_CFG80211
#endif
#endif
#ifdef CONFIG_IOCTL_CFG80211
//#define RTW_USE_CFG80211_STA_EVENT /* Indecate new sta asoc through cfg80211_new_sta */
#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
//#define CONFIG_DEBUG_CFG80211
//#define CONFIG_DRV_ISSUE_PROV_REQ // IOT FOR S2
#define CONFIG_SET_SCAN_DENY_TIMER
#endif
#define CONFIG_CFG80211_FORCE_COMPATIBLE_2_6_37_UNDER
#define CONFIG_SET_SCAN_DENY_TIMER
/*
* Internal General Config

View file

@ -82,9 +82,7 @@ enum _NIC_VERSION {
#include <rtw_br_ext.h>
#endif // CONFIG_BR_EXT
#ifdef CONFIG_IOCTL_CFG80211
#include "ioctl_cfg80211.h"
#endif //CONFIG_IOCTL_CFG80211
#include "ioctl_cfg80211.h"
#define SPEC_DEV_ID_NONE BIT(0)
#define SPEC_DEV_ID_DISABLE_HT BIT(1)
@ -388,11 +386,9 @@ struct adapter {
struct hostapd_priv *phostapdpriv;
#endif
#ifdef CONFIG_IOCTL_CFG80211
#ifdef CONFIG_P2P
struct cfg80211_wifidirect_info cfg80211_wdinfo;
#endif //CONFIG_P2P
#endif //CONFIG_IOCTL_CFG80211
u32 setband;
#ifdef CONFIG_P2P
struct wifidirect_info wdinfo;
@ -453,9 +449,7 @@ struct adapter {
struct proc_dir_entry *dir_dev;// for proc directory
struct proc_dir_entry *dir_odm;
#ifdef CONFIG_IOCTL_CFG80211
struct wireless_dev *rtw_wdev;
#endif //CONFIG_IOCTL_CFG80211
int net_closed;

View file

@ -68,11 +68,8 @@
#include <net/flow.h>
#include <net/arp.h>
#ifdef CONFIG_IOCTL_CFG80211
// #include <linux/ieee80211.h>
#include <net/ieee80211_radiotap.h>
#include <net/cfg80211.h>
#endif //CONFIG_IOCTL_CFG80211
#ifdef CONFIG_TCP_CSUM_OFFLOAD_TX
#include <linux/in.h>

View file

@ -254,7 +254,6 @@ struct scan_limit_info{
#endif //P2P_OP_CHECK_SOCIAL_CH
};
#ifdef CONFIG_IOCTL_CFG80211
struct cfg80211_wifidirect_info{
_timer remain_on_ch_timer;
u8 restore_channel;
@ -263,7 +262,6 @@ struct cfg80211_wifidirect_info{
u64 remain_on_ch_cookie;
bool is_ro_ch;
};
#endif //CONFIG_IOCTL_CFG80211
struct wifidirect_info{
struct adapter* padapter;
@ -498,14 +496,13 @@ struct mlme_priv {
u32 assoc_rsp_len;
u8 *wps_beacon_ie;
//u8 *wps_probe_req_ie;
u8 *wps_probe_resp_ie;
u8 *wps_assoc_resp_ie; // for CONFIG_IOCTL_CFG80211, this IE could include p2p ie / wfd ie
u8 *wps_assoc_resp_ie; // this IE includes p2p ie / wfd ie
u32 wps_beacon_ie_len;
//u32 wps_probe_req_ie_len;
u32 wps_probe_resp_ie_len;
u32 wps_assoc_resp_ie_len; // for CONFIG_IOCTL_CFG80211, this IE len could include p2p ie / wfd ie
u32 wps_assoc_resp_ie_len; // this IE len includes p2p ie / wfd ie
u8 *p2p_beacon_ie;
u8 *p2p_probe_req_ie;
@ -518,26 +515,13 @@ struct mlme_priv {
u32 p2p_probe_resp_ie_len;
u32 p2p_go_probe_resp_ie_len; //for GO
u32 p2p_assoc_req_ie_len;
/*
#if defined(CONFIG_P2P) && defined(CONFIG_IOCTL_CFG80211)
//u8 *wps_p2p_beacon_ie;
u8 *p2p_beacon_ie;
u8 *wps_p2p_probe_resp_ie;
u8 *wps_p2p_assoc_resp_ie;
//u32 wps_p2p_beacon_ie_len;
u32 p2p_beacon_ie_len;
u32 wps_p2p_probe_resp_ie_len;
u32 wps_p2p_assoc_resp_ie_len;
#endif
*/
_lock bcn_update_lock;
u8 update_bcn;
#endif //#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME)
#if defined(CONFIG_WFD) && defined(CONFIG_IOCTL_CFG80211)
#if defined(CONFIG_WFD)
u8 *wfd_beacon_ie;
u8 *wfd_probe_req_ie;

View file

@ -61,11 +61,9 @@ void p2p_ps_wk_hdl(struct adapter *padapter, u8 p2p_ps_state);
u8 p2p_ps_wk_cmd(struct adapter*padapter, u8 p2p_ps_state, u8 enqueue);
#endif // CONFIG_P2P_PS
#ifdef CONFIG_IOCTL_CFG80211
void rtw_init_cfg80211_wifidirect_info( struct adapter* padapter);
int rtw_p2p_check_frames(struct adapter *padapter, const u8 *buf, u32 len, u8 tx);
void rtw_append_wfd_ie(struct adapter *padapter, u8 *buf, u32 *len);
#endif //CONFIG_IOCTL_CFG80211
void reset_global_wifidirect_info( struct adapter* padapter );
int rtw_init_wifi_display_info(struct adapter* padapter);

View file

@ -263,10 +263,8 @@ struct sta_info {
#endif // CONFIG_AP_MODE
#ifdef CONFIG_IOCTL_CFG80211
u8 *passoc_req;
u32 assoc_req_len;
#endif
#ifdef DBG_TRX_STA_PKTS
//per AC dbg irp cnts

View file

@ -27,8 +27,6 @@
#include <rtw_ioctl_query.h>
#include <xmit_osdep.h>
#ifdef CONFIG_IOCTL_CFG80211
#include "ioctl_cfg80211.h"
#define RTW_MAX_MGMT_TX_CNT (8)
@ -5416,5 +5414,3 @@ void rtw_wdev_unregister(struct wireless_dev *wdev)
wiphy_unregister(wdev->wiphy);
}
#endif /* CONFIG_IOCTL_CFG80211 */

View file

@ -146,15 +146,10 @@ static void indicate_wx_custom_event(struct adapter *padapter, char *msg)
wrqu.data.length = strlen(msg);
DBG_871X("%s %s\n", __FUNCTION__, buff);
#ifndef CONFIG_IOCTL_CFG80211
wireless_send_event(padapter->pnetdev, IWEVCUSTOM, &wrqu, buff);
#endif
rtw_mfree(buff, IW_CUSTOM_MAX+1);
}
static void request_wps_pbc_event(struct adapter *padapter)
{
u8 *buff, *p;
@ -179,10 +174,6 @@ static void request_wps_pbc_event(struct adapter *padapter)
DBG_871X("%s\n", __FUNCTION__);
#ifndef CONFIG_IOCTL_CFG80211
wireless_send_event(padapter->pnetdev, IWEVCUSTOM, &wrqu, buff);
#endif
if(buff)
{
rtw_mfree(buff, IW_CUSTOM_MAX);
@ -199,9 +190,6 @@ void indicate_wx_scan_complete_event(struct adapter *padapter)
memset(&wrqu, 0, sizeof(union iwreq_data));
/* DBG_871X("+rtw_indicate_wx_scan_complete_event\n"); */
#ifndef CONFIG_IOCTL_CFG80211
wireless_send_event(padapter->pnetdev, SIOCGIWSCAN, &wrqu, NULL);
#endif
}
@ -223,9 +211,6 @@ void rtw_indicate_wx_assoc_event(struct adapter *padapter)
memcpy(wrqu.ap_addr.sa_data, pmlmepriv->cur_network.network.MacAddress, ETH_ALEN);
DBG_871X_LEVEL(_drv_always_, "assoc success\n");
#ifndef CONFIG_IOCTL_CFG80211
wireless_send_event(padapter->pnetdev, SIOCGIWAP, &wrqu, NULL);
#endif
}
void rtw_indicate_wx_disassoc_event(struct adapter *padapter)
@ -236,11 +221,6 @@ void rtw_indicate_wx_disassoc_event(struct adapter *padapter)
wrqu.ap_addr.sa_family = ARPHRD_ETHER;
memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
#ifndef CONFIG_IOCTL_CFG80211
DBG_871X_LEVEL(_drv_always_, "indicate disassoc\n");
wireless_send_event(padapter->pnetdev, SIOCGIWAP, &wrqu, NULL);
#endif
}
/*
@ -2845,21 +2825,6 @@ static int rtw_wx_set_auth(struct net_device *dev,
switch (param->flags & IW_AUTH_INDEX) {
case IW_AUTH_WPA_VERSION:
#ifdef CONFIG_WAPI_SUPPORT
#ifndef CONFIG_IOCTL_CFG80211
padapter->wapiInfo.bWapiEnable = false;
if(value == IW_AUTH_WAPI_VERSION_1)
{
padapter->wapiInfo.bWapiEnable = true;
psecuritypriv->dot11PrivacyAlgrthm = _SMS4_;
psecuritypriv->dot118021XGrpPrivacy = _SMS4_;
psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_WAPI;
pmlmeinfo->auth_algo = psecuritypriv->dot11AuthAlgrthm;
padapter->wapiInfo.extra_prefix_len = WAPI_EXT_LEN;
padapter->wapiInfo.extra_postfix_len = SMS4_MIC_LEN;
}
#endif
#endif
break;
case IW_AUTH_CIPHER_PAIRWISE:
@ -2868,16 +2833,6 @@ static int rtw_wx_set_auth(struct net_device *dev,
break;
case IW_AUTH_KEY_MGMT:
#ifdef CONFIG_WAPI_SUPPORT
#ifndef CONFIG_IOCTL_CFG80211
DBG_871X("rtw_wx_set_auth: IW_AUTH_KEY_MGMT case \n");
if(value == IW_AUTH_KEY_MGMT_WAPI_PSK)
padapter->wapiInfo.bWapiPSK = true;
else
padapter->wapiInfo.bWapiPSK = false;
DBG_871X("rtw_wx_set_auth: IW_AUTH_KEY_MGMT bwapipsk %d \n",padapter->wapiInfo.bWapiPSK);
#endif
#endif
/*
* ??? does not use these parameters
*/
@ -2952,21 +2907,10 @@ static int rtw_wx_set_auth(struct net_device *dev,
break;
case IW_AUTH_PRIVACY_INVOKED:
break;
#ifdef CONFIG_WAPI_SUPPORT
#ifndef CONFIG_IOCTL_CFG80211
case IW_AUTH_WAPI_ENABLED:
break;
#endif
#endif
default:
return -EOPNOTSUPP;
}
return ret;
}
static int rtw_wx_set_enc_ext(struct net_device *dev,
@ -3011,15 +2955,6 @@ static int rtw_wx_set_enc_ext(struct net_device *dev,
alg_name = "BIP";
break;
#endif /* CONFIG_IEEE80211W */
#ifdef CONFIG_WAPI_SUPPORT
#ifndef CONFIG_IOCTL_CFG80211
case IW_ENCODE_ALG_SM4:
alg_name= "SMS4";
memcpy(param->sta_addr, pext->addr.sa_data, ETH_ALEN);
DBG_871X("rtw_wx_set_enc_ext: SMS4 case \n");
break;
#endif
#endif
default:
return -1;
}
@ -3047,19 +2982,9 @@ static int rtw_wx_set_enc_ext(struct net_device *dev,
param->u.crypt.idx = (pencoding->flags&0x00FF) -1 ;
if (pext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID)
{
#ifdef CONFIG_WAPI_SUPPORT
#ifndef CONFIG_IOCTL_CFG80211
if(pext->alg == IW_ENCODE_ALG_SM4)
memcpy(param->u.crypt.seq, pext->rx_seq, 16);
else
#endif /* CONFIG_IOCTL_CFG80211 */
#endif /* CONFIG_WAPI_SUPPORT */
memcpy(param->u.crypt.seq, pext->rx_seq, 8);
}
if(pext->key_len)
{
if(pext->key_len) {
param->u.crypt.key_len = pext->key_len;
/* memcpy(param + 1, pext + 1, pext->key_len); */
memcpy(param->u.crypt.key, pext + 1, pext->key_len);

View file

@ -156,15 +156,11 @@ void rtw_os_indicate_connect(struct adapter *adapter)
struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
;
#ifdef CONFIG_IOCTL_CFG80211
if ( (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)==true ) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)==true ) )
{
if ((check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) ||
(check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)))
rtw_cfg80211_ibss_indicate_connect(adapter);
}
else
rtw_cfg80211_indicate_connect(adapter);
#endif /* CONFIG_IOCTL_CFG80211 */
rtw_indicate_wx_assoc_event(adapter);
netif_carrier_on(adapter->pnetdev);
@ -182,9 +178,7 @@ void rtw_os_indicate_connect(struct adapter *adapter)
void rtw_os_indicate_scan_done( struct adapter *padapter, bool aborted)
{
#ifdef CONFIG_IOCTL_CFG80211
rtw_cfg80211_indicate_scan_done(wdev_to_priv(padapter->rtw_wdev), aborted);
#endif
indicate_wx_scan_complete_event(padapter);
}
@ -261,9 +255,7 @@ void rtw_os_indicate_disconnect( struct adapter *adapter )
netif_carrier_off(adapter->pnetdev); /* Do it first for tx broadcast pkt after disconnection issue! */
#ifdef CONFIG_IOCTL_CFG80211
rtw_cfg80211_indicate_disconnect(adapter);
#endif /* CONFIG_IOCTL_CFG80211 */
rtw_indicate_wx_disassoc_event(adapter);
@ -315,17 +307,9 @@ void rtw_report_sec_ie(struct adapter *adapter,u8 authmode,u8 *sec_ie)
wrqu.data.length = (wrqu.data.length<IW_CUSTOM_MAX) ? wrqu.data.length:IW_CUSTOM_MAX;
#ifndef CONFIG_IOCTL_CFG80211
wireless_send_event(adapter->pnetdev,IWEVCUSTOM,&wrqu,buff);
#endif
if(buff)
rtw_mfree(buff, IW_CUSTOM_MAX);
}
;
}
static void _survey_timer_hdl (void *FunctionContext)
@ -412,11 +396,6 @@ void rtw_indicate_sta_assoc_event(struct adapter *padapter, struct sta_info *pst
memcpy(wrqu.addr.sa_data, psta->hwaddr, ETH_ALEN);
DBG_871X("+rtw_indicate_sta_assoc_event\n");
#ifndef CONFIG_IOCTL_CFG80211
wireless_send_event(padapter->pnetdev, IWEVREGISTERED, &wrqu, NULL);
#endif
}
void rtw_indicate_sta_disassoc_event(struct adapter *padapter, struct sta_info *psta)
@ -439,14 +418,8 @@ void rtw_indicate_sta_disassoc_event(struct adapter *padapter, struct sta_info *
memcpy(wrqu.addr.sa_data, psta->hwaddr, ETH_ALEN);
DBG_871X("+rtw_indicate_sta_disassoc_event\n");
#ifndef CONFIG_IOCTL_CFG80211
wireless_send_event(padapter->pnetdev, IWEVEXPIRED, &wrqu, NULL);
#endif
}
#ifdef CONFIG_HOSTAPD_MLME
static int mgnt_xmit_entry(struct sk_buff *skb, struct net_device *pnetdev)

View file

@ -741,10 +741,7 @@ void rtw_unregister_netdevs(struct dvobj_priv *dvobj)
rtw_proc_remove_one(pnetdev);
}
#ifdef CONFIG_IOCTL_CFG80211
rtw_wdev_unregister(padapter->rtw_wdev);
#endif
}
}
@ -935,9 +932,7 @@ u8 rtw_init_drv_sw(struct adapter *padapter)
rtw_init_wifidirect_timers(padapter);
init_wifidirect_info(padapter, P2P_ROLE_DISABLE);
reset_global_wifidirect_info(padapter);
#ifdef CONFIG_IOCTL_CFG80211
rtw_init_cfg80211_wifidirect_info(padapter);
#endif
#ifdef CONFIG_WFD
if(rtw_init_wifi_display_info(padapter) == _FAIL)
RT_TRACE(_module_os_intfs_c_,_drv_err_,("\n Can't init init_wifi_display_info\n"));
@ -1062,11 +1057,9 @@ void rtw_cancel_all_timer(struct adapter *padapter)
_cancel_timer_ex(&(adapter_to_pwrctl(padapter)->pwr_state_check_timer));
#ifdef CONFIG_IOCTL_CFG80211
#ifdef CONFIG_P2P
_cancel_timer_ex(&padapter->cfg80211_wdinfo.remain_on_ch_timer);
#endif /* CONFIG_P2P */
#endif /* CONFIG_IOCTL_CFG80211 */
#ifdef CONFIG_SET_SCAN_DENY_TIMER
_cancel_timer_ex(&padapter->mlmepriv.set_scan_deny_timer);
@ -1346,9 +1339,7 @@ int _netdev_open(struct net_device *pnetdev)
rtw_proc_init_one(pnetdev);
#endif
#ifdef CONFIG_IOCTL_CFG80211
rtw_cfg80211_init_wiphy(padapter);
#endif
rtw_led_control(padapter, LED_CTL_NO_LINK);
@ -1608,11 +1599,9 @@ static int netdev_close(struct net_device *pnetdev)
rtw_p2p_enable(padapter, P2P_ROLE_DISABLE);
#endif /* CONFIG_P2P */
#ifdef CONFIG_IOCTL_CFG80211
rtw_scan_abort(padapter);
wdev_to_priv(padapter->rtw_wdev)->bandroid_scan = false;
padapter->rtw_wdev->iftype = NL80211_IFTYPE_MONITOR; /* set this at the end */
#endif /* CONFIG_IOCTL_CFG80211 */
#ifdef CONFIG_WAPI_SUPPORT
rtw_wapi_disable_tx(padapter);
@ -1629,10 +1618,8 @@ void rtw_ndev_destructor(struct net_device *ndev)
{
DBG_871X(FUNC_NDEV_FMT"\n", FUNC_NDEV_ARG(ndev));
#ifdef CONFIG_IOCTL_CFG80211
if (ndev->ieee80211_ptr)
rtw_mfree((u8 *)ndev->ieee80211_ptr, sizeof(struct wireless_dev));
#endif
free_netdev(ndev);
}

View file

@ -135,68 +135,46 @@ int rtw_os_recvbuf_resource_free(struct adapter *padapter, struct recv_buf *prec
void rtw_handle_tkip_mic_err(struct adapter *padapter,u8 bgroup)
{
#ifdef CONFIG_IOCTL_CFG80211
enum nl80211_key_type key_type;
#endif
union iwreq_data wrqu;
struct iw_michaelmicfailure ev;
struct mlme_priv* pmlmepriv = &padapter->mlmepriv;
struct security_priv *psecuritypriv = &padapter->securitypriv;
u32 cur_time = 0;
if( psecuritypriv->last_mic_err_time == 0 )
{
if( psecuritypriv->last_mic_err_time == 0 ) {
psecuritypriv->last_mic_err_time = rtw_get_current_time();
}
else
{
} else {
cur_time = rtw_get_current_time();
if( cur_time - psecuritypriv->last_mic_err_time < 60*HZ )
{
if( cur_time - psecuritypriv->last_mic_err_time < 60*HZ ) {
psecuritypriv->btkip_countermeasure = true;
psecuritypriv->last_mic_err_time = 0;
psecuritypriv->btkip_countermeasure_time = cur_time;
}
else
{
} else {
psecuritypriv->last_mic_err_time = rtw_get_current_time();
}
}
#ifdef CONFIG_IOCTL_CFG80211
if ( bgroup )
{
key_type |= NL80211_KEYTYPE_GROUP;
}
else
{
key_type |= NL80211_KEYTYPE_PAIRWISE;
}
cfg80211_michael_mic_failure(padapter->pnetdev, (u8 *)&pmlmepriv->assoc_bssid[ 0 ], key_type, -1,
NULL, GFP_ATOMIC);
#endif
memset( &ev, 0x00, sizeof( ev ) );
if ( bgroup )
{
ev.flags |= IW_MICFAILURE_GROUP;
}
else
{
ev.flags |= IW_MICFAILURE_PAIRWISE;
}
ev.src_addr.sa_family = ARPHRD_ETHER;
memcpy( ev.src_addr.sa_data, &pmlmepriv->assoc_bssid[ 0 ], ETH_ALEN );
memset( &wrqu, 0x00, sizeof( wrqu ) );
wrqu.data.length = sizeof( ev );
#ifndef CONFIG_IOCTL_CFG80211
wireless_send_event( padapter->pnetdev, IWEVMICHAELMICFAILURE, &wrqu, (char*) &ev );
#endif
}
void rtw_hostapd_mlme_rx(struct adapter *padapter, union recv_frame *precv_frame)
@ -223,15 +201,10 @@ void rtw_hostapd_mlme_rx(struct adapter *padapter, union recv_frame *precv_frame
skb->dev = pmgnt_netdev;
skb->ip_summed = CHECKSUM_NONE;
skb->pkt_type = PACKET_OTHERHOST;
/* skb->protocol = __constant_htons(0x0019); /*ETH_P_80211_RAW*/ */
skb->protocol = __constant_htons(0x0003); /*ETH_P_80211_RAW*/
/* DBG_871X("(1)data=0x%x, head=0x%x, tail=0x%x, mac_header=0x%x, len=%d\n", skb->data, skb->head, skb->tail, skb->mac_header, skb->len); */
/* skb->mac.raw = skb->data; */
skb_reset_mac_header(skb);
/* skb_pull(skb, 24); */
memset(skb->cb, 0, sizeof(skb->cb));
rtw_netif_rx(pmgnt_netdev, skb);

View file

@ -307,10 +307,7 @@ static int rtw_android_set_block(struct net_device *net, char *command, int tota
struct adapter *adapter = (struct adapter *)rtw_netdev_priv(net);
char *block_value = command + strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_BLOCK]) + 1;
#ifdef CONFIG_IOCTL_CFG80211
wdev_to_priv(adapter->rtw_wdev)->block = (*block_value=='0')?false:true;
#endif
return 0;
}
@ -401,9 +398,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
case ANDROID_WIFI_CMD_SCAN_ACTIVE:
/* rtw_set_scan_mode((struct adapter *)rtw_netdev_priv(net), SCAN_ACTIVE); */
#ifdef CONFIG_PLATFORM_MSTAR
#ifdef CONFIG_IOCTL_CFG80211
(wdev_to_priv(net->ieee80211_ptr))->bandroid_scan = true;
#endif /* CONFIG_IOCTL_CFG80211 */
#endif /* CONFIG_PLATFORM_MSTAR */
break;
case ANDROID_WIFI_CMD_SCAN_PASSIVE:
@ -497,14 +492,12 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
/* bytes_written = wl_cfg80211_set_p2p_ps(net, command + skip, priv_cmd.total_len - skip); */
break;
#ifdef CONFIG_IOCTL_CFG80211
case ANDROID_WIFI_CMD_SET_AP_WPS_P2P_IE:
{
int skip = strlen(android_wifi_cmd_str[ANDROID_WIFI_CMD_SET_AP_WPS_P2P_IE]) + 3;
bytes_written = rtw_cfg80211_set_mgnt_wpsp2pie(net, command + skip, priv_cmd.total_len - skip, *(command + skip - 2) - '0');
break;
}
#endif /* CONFIG_IOCTL_CFG80211 */
#ifdef CONFIG_WFD
case ANDROID_WIFI_CMD_WFD_ENABLE:

View file

@ -1137,12 +1137,9 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
SET_NETDEV_DEV(pnetdev, dvobj_to_dev(dvobj));
padapter = rtw_netdev_priv(pnetdev);
#ifdef CONFIG_IOCTL_CFG80211
if(rtw_wdev_alloc(padapter, dvobj_to_dev(dvobj)) != 0) {
goto handle_dualmac;
}
#endif
/* step 2. hook HalFunc, allocate HalData */
hal_set_hal_ops(padapter);
@ -1235,10 +1232,8 @@ free_hal_data:
kfree(padapter->HalData);
free_wdev:
if(status != _SUCCESS) {
#ifdef CONFIG_IOCTL_CFG80211
rtw_wdev_unregister(padapter->rtw_wdev);
rtw_wdev_free(padapter->rtw_wdev);
#endif
}
handle_dualmac:
if (status != _SUCCESS)
@ -1283,13 +1278,10 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
rtw_handle_dualmac(if1, 0);
#ifdef CONFIG_IOCTL_CFG80211
if(if1->rtw_wdev)
{
if(if1->rtw_wdev) {
/* rtw_wdev_unregister(if1->rtw_wdev); */
rtw_wdev_free(if1->rtw_wdev);
}
#endif
#ifdef CONFIG_BT_COEXIST
if(1 == pwrctl->autopm_cnt){