From f3c9d6409be5ec1d8925be2f04daaa0f6a9ff3bb Mon Sep 17 00:00:00 2001
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Date: Wed, 21 May 2014 09:38:22 +0200
Subject: [PATCH] staging: rtl8723au: Don't compile rtw_ap.c when
 CONFIG_8723AU_AP_MODE=n

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/rtl8723au/Makefile      | 2 +-
 drivers/staging/rtl8723au/core/rtw_ap.c | 4 ----
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/staging/rtl8723au/Makefile b/drivers/staging/rtl8723au/Makefile
index f0615d666d91..a6316af94b79 100644
--- a/drivers/staging/rtl8723au/Makefile
+++ b/drivers/staging/rtl8723au/Makefile
@@ -1,5 +1,4 @@
 r8723au-y :=				\
-		core/rtw_ap.o		\
 		core/rtw_cmd.o		\
 		core/rtw_efuse.o	\
 		core/rtw_ioctl_set.o	\
@@ -50,6 +49,7 @@ r8723au-y :=				\
 		os_dep/xmit_linux.o
 
 r8723au-$(CONFIG_8723AU_BT_COEXIST) += hal/rtl8723a_bt-coexist.o
+r8723au-$(CONFIG_8723AU_AP_MODE) += core/rtw_ap.o
 
 obj-$(CONFIG_R8723AU)	:= r8723au.o
 
diff --git a/drivers/staging/rtl8723au/core/rtw_ap.c b/drivers/staging/rtl8723au/core/rtw_ap.c
index 850e2e51f198..c8700b38386d 100644
--- a/drivers/staging/rtl8723au/core/rtw_ap.c
+++ b/drivers/staging/rtl8723au/core/rtw_ap.c
@@ -21,8 +21,6 @@
 #include <rtl8723a_cmd.h>
 #include <rtl8723a_hal.h>
 
-#ifdef CONFIG_8723AU_AP_MODE
-
 extern unsigned char WMM_OUI23A[];
 extern unsigned char WPS_OUI23A[];
 extern unsigned char P2P_OUI23A[];
@@ -2028,5 +2026,3 @@ void stop_ap_mode23a(struct rtw_adapter *padapter)
 
 	rtw23a_free_mlme_priv_ie_data(pmlmepriv);
 }
-
-#endif /* CONFIG_8723AU_AP_MODE */
-- 
2.20.1