staging: rtl8188eu: don't define OnAuth() in non-AP mode
authorLuca Ceresoli <luca@lucaceresoli.net>
Sun, 14 Jun 2015 12:40:24 +0000 (14:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 14 Jun 2015 16:45:55 +0000 (09:45 -0700)
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@lucaceresoli.net>
Fixes: 68345dd7bc26 ("staging: rtl8188eu: rtw_mlme_ext.c: unexport message callbacks")
Cc: Greg Kroah-Hartman <gregkh@linux.com>
Cc: Larry Finger <Larry.Finger@lwfinger.net>
Cc: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c

index 11cb0fa..a0b8f66 100644 (file)
@@ -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)