From 90df80d763170e90d0c5174ca6a201c3ee35cd8d Mon Sep 17 00:00:00 2001 From: Larry Finger Date: Tue, 10 Mar 2015 21:45:35 -0500 Subject: [PATCH] rtl8188eu: Fix build when CONFIG_P2P is not defined Signed-off-by: Larry Finger --- core/rtw_cmd.c | 2 +- core/rtw_mlme_ext.c | 8 ++++---- include/drv_types.h | 3 --- os_dep/usb_intf.c | 3 ++- 4 files changed, 7 insertions(+), 9 deletions(-) diff --git a/core/rtw_cmd.c b/core/rtw_cmd.c index 7ee2a5d..d4d998c 100755 --- a/core/rtw_cmd.c +++ b/core/rtw_cmd.c @@ -2693,12 +2693,12 @@ u8 rtw_drvextra_cmd_hdl(struct adapter *padapter, unsigned char *pbuf) case P2P_PS_WK_CID: p2p_ps_wk_hdl(padapter, pdrvextra_cmd->type_size); break; -#endif /* CONFIG_P2P */ case P2P_PROTO_WK_CID: /* Commented by Albert 2011/07/01 */ /* I used the type_size as the type command */ p2p_protocol_wk_hdl( padapter, pdrvextra_cmd->type_size ); break; +#endif /* CONFIG_P2P */ #ifdef CONFIG_AP_MODE case CHECK_HIQ_WK_CID: rtw_chk_hi_queue_hdl(padapter); diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 8a26615..73ab0b3 100755 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -4848,18 +4848,18 @@ static s32 rtw_action_public_decache(union recv_frame *recv_frame, s32 token) static unsigned int on_action_public_p2p(union recv_frame *precv_frame) { struct adapter *padapter = precv_frame->u.hdr.adapter; + struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); u8 *pframe = precv_frame->u.hdr.rx_data; uint len = precv_frame->u.hdr.len; u8 *frame_body; u8 dialogToken=0; + u8 *merged_p2pie = NULL; + u32 merged_p2p_ielen = 0; #ifdef CONFIG_P2P u8 *p2p_ie; u32 p2p_ielen, wps_ielen; - struct wifidirect_info *pwdinfo = &( padapter->wdinfo ); u8 result = P2P_STATUS_SUCCESS; u8 empty_addr[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - u8 *merged_p2pie = NULL; - u32 merged_p2p_ielen = 0; #endif /* CONFIG_P2P */ frame_body = (unsigned char *)(pframe + sizeof(struct rtw_ieee80211_hdr_3addr)); @@ -8043,8 +8043,8 @@ void site_survey(struct adapter *padapter) struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); u32 initialgain = 0; -#ifdef CONFIG_P2P struct wifidirect_info *pwdinfo= &(padapter->wdinfo); +#ifdef CONFIG_P2P static unsigned char prev_survey_channel = 0; static unsigned int p2p_scan_count = 0; diff --git a/include/drv_types.h b/include/drv_types.h index e1f2d30..69842b4 100755 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -364,14 +364,11 @@ struct adapter { #ifdef CONFIG_AP_MODE struct hostapd_priv *phostapdpriv; #endif - #ifdef CONFIG_P2P struct cfg80211_wifidirect_info cfg80211_wdinfo; #endif //CONFIG_P2P u32 setband; -#ifdef CONFIG_P2P struct wifidirect_info wdinfo; -#endif //CONFIG_P2P #ifdef CONFIG_P2P struct wifi_display_info wfd_info; diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index 4bc067a..2b41bda 100755 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -1043,8 +1043,9 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj, /* set mac addr */ rtw_macaddr_cfg(padapter->eeprompriv.mac_addr); +#ifdef CONFIG_P2P rtw_init_wifidirect_addrs(padapter, padapter->eeprompriv.mac_addr, padapter->eeprompriv.mac_addr); - +#endif DBG_871X("bDriverStopped:%d, bSurpriseRemoved:%d, bup:%d, hw_init_completed:%d\n" , padapter->bDriverStopped , padapter->bSurpriseRemoved