[PATCH 2/2] staging: rtl8188eu: don't define OnAuth() in non-AP mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If CONFIG_88EU_AP_MODE is undefined, OnAuth() is never referenced.

Fixes warning:
  drivers/staging/rtl8188eu/core/rtw_mlme_ext.c:2725:21: warning: ‘OnAuth’ defined but not used [-Wunused-function]

Signed-off-by: Luca Ceresoli <luca@xxxxxxxxxxxxxxxx>
Fixes: 68345dd7bc26 ("staging: rtl8188eu: rtw_mlme_ext.c: unexport message callbacks")
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxx>
Cc: Larry Finger <Larry.Finger@xxxxxxxxxxxx>
Cc: kbuild test robot <fengguang.wu@xxxxxxxxx>
---
 drivers/staging/rtl8188eu/core/rtw_mlme_ext.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
index 11cb0fac5da0..a0b8f665fa2f 100644
--- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
@@ -2722,10 +2722,10 @@ _END_ONBEACON_:
 	return _SUCCESS;
 }
 
+#ifdef CONFIG_88EU_AP_MODE
 static unsigned int OnAuth(struct adapter *padapter,
 			   struct recv_frame *precv_frame)
 {
-#ifdef CONFIG_88EU_AP_MODE
 	unsigned int	auth_mode, ie_len;
 	u16 seq;
 	unsigned char	*sa, *p;
@@ -2888,9 +2888,9 @@ auth_fail:
 
 	issue_auth(padapter, pstat, (unsigned short)status);
 
-#endif /* CONFIG_88EU_AP_MODE */
 	return _FAIL;
 }
+#endif /* CONFIG_88EU_AP_MODE */
 
 static unsigned int OnAuthClient(struct adapter *padapter,
 				 struct recv_frame *precv_frame)
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux