From: Jakub Sitnicki Date: Fri, 22 May 2015 05:06:12 +0000 (+0200) Subject: staging: rtl8188eu: Remove redundant CONFIG_88EU_AP_MODE tests X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=44af49b63ee6fa2a2beb911b6333e4fdaa1db234;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: rtl8188eu: Remove redundant CONFIG_88EU_AP_MODE tests Remove #ifdef's enclosed by an #ifdef test for the same macro to improve readability. No code changes: md5, CONFIG_88EU_AP_MODE=y: b819a33f65133607ebc33b8999ee3a79 r8188eu.o.before b819a33f65133607ebc33b8999ee3a79 r8188eu.o.after md5, CONFIG_88EU_AP_MODE=n: 94c84035d59285408b866a57b442276d r8188eu.o.before 94c84035d59285408b866a57b442276d r8188eu.o.after Signed-off-by: Jakub Sitnicki Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c index 2da2e97647d6..0169a7d3e4c2 100644 --- a/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c +++ b/drivers/staging/rtl8188eu/core/rtw_mlme_ext.c @@ -794,9 +794,7 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame) /* Now, we are going to issue_auth... */ pstat->auth_seq = seq + 1; -#ifdef CONFIG_88EU_AP_MODE issue_auth(padapter, pstat, (unsigned short)(_STATS_SUCCESSFUL_)); -#endif if (pstat->state & WIFI_FW_AUTH_SUCCESS) pstat->auth_seq = 0; @@ -813,11 +811,9 @@ auth_fail: pstat->auth_seq = 2; memcpy(pstat->hwaddr, sa, 6); -#ifdef CONFIG_88EU_AP_MODE issue_auth(padapter, pstat, (unsigned short)status); -#endif -#endif +#endif /* CONFIG_88EU_AP_MODE */ return _FAIL; } @@ -1295,7 +1291,6 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame /* now the station is qualified to join our BSS... */ if (pstat && (pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_ == status)) { -#ifdef CONFIG_88EU_AP_MODE /* 1 bss_cap_update & sta_info_update */ bss_cap_update_on_sta_join(padapter, pstat); sta_info_update(padapter, pstat); @@ -1312,30 +1307,23 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame /* 3-(1) report sta add event */ report_add_sta_event(padapter, pstat->hwaddr, pstat->aid); -#endif } return _SUCCESS; asoc_class2_error: -#ifdef CONFIG_88EU_AP_MODE issue_deauth(padapter, (void *)GetAddr2Ptr(pframe), status); -#endif return _FAIL; OnAssocReqFail: - -#ifdef CONFIG_88EU_AP_MODE pstat->aid = 0; if (frame_type == WIFI_ASSOCREQ) issue_asocrsp(padapter, status, pstat, WIFI_ASSOCRSP); else issue_asocrsp(padapter, status, pstat, WIFI_REASSOCRSP); -#endif - #endif /* CONFIG_88EU_AP_MODE */ diff --git a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c index dc9d0ddf6b3a..0b1cb03ab7b2 100644 --- a/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c +++ b/drivers/staging/rtl8188eu/core/rtw_sta_mgt.c @@ -54,14 +54,12 @@ static void _rtw_init_stainfo(struct sta_info *psta) psta->bpairwise_key_installed = false; -#ifdef CONFIG_88EU_AP_MODE psta->nonerp_set = 0; psta->no_short_slot_time_set = 0; psta->no_short_preamble_set = 0; psta->no_ht_gf_set = 0; psta->no_ht_set = 0; psta->ht_20mhz_set = 0; -#endif psta->under_exist_checking = 0; diff --git a/drivers/staging/rtl8188eu/include/rtw_ap.h b/drivers/staging/rtl8188eu/include/rtw_ap.h index 923340159798..6128ccce91ba 100644 --- a/drivers/staging/rtl8188eu/include/rtw_ap.h +++ b/drivers/staging/rtl8188eu/include/rtw_ap.h @@ -47,7 +47,6 @@ void rtw_set_macaddr_acl(struct adapter *padapter, int mode); int rtw_acl_add_sta(struct adapter *padapter, u8 *addr); int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr); -#ifdef CONFIG_88EU_AP_MODE void associated_clients_update(struct adapter *padapter, u8 updated); void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta); u8 bss_cap_update_on_sta_leave(struct adapter *padapter, struct sta_info *psta); @@ -59,7 +58,6 @@ int rtw_sta_flush(struct adapter *padapter); int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset); void start_ap_mode(struct adapter *padapter); void stop_ap_mode(struct adapter *padapter); -#endif #endif /* end of CONFIG_88EU_AP_MODE */ #endif