Commit 44af49b6 authored by Jakub Sitnicki's avatar Jakub Sitnicki Committed by Greg Kroah-Hartman

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: default avatarJakub Sitnicki <jsitnicki@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7fc0406f
...@@ -794,9 +794,7 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame) ...@@ -794,9 +794,7 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame)
/* Now, we are going to issue_auth... */ /* Now, we are going to issue_auth... */
pstat->auth_seq = seq + 1; pstat->auth_seq = seq + 1;
#ifdef CONFIG_88EU_AP_MODE
issue_auth(padapter, pstat, (unsigned short)(_STATS_SUCCESSFUL_)); issue_auth(padapter, pstat, (unsigned short)(_STATS_SUCCESSFUL_));
#endif
if (pstat->state & WIFI_FW_AUTH_SUCCESS) if (pstat->state & WIFI_FW_AUTH_SUCCESS)
pstat->auth_seq = 0; pstat->auth_seq = 0;
...@@ -813,11 +811,9 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame) ...@@ -813,11 +811,9 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame)
pstat->auth_seq = 2; pstat->auth_seq = 2;
memcpy(pstat->hwaddr, sa, 6); memcpy(pstat->hwaddr, sa, 6);
#ifdef CONFIG_88EU_AP_MODE
issue_auth(padapter, pstat, (unsigned short)status); issue_auth(padapter, pstat, (unsigned short)status);
#endif
#endif #endif /* CONFIG_88EU_AP_MODE */
return _FAIL; return _FAIL;
} }
...@@ -1295,7 +1291,6 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame ...@@ -1295,7 +1291,6 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
/* now the station is qualified to join our BSS... */ /* now the station is qualified to join our BSS... */
if (pstat && (pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_ == status)) { if (pstat && (pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_ == status)) {
#ifdef CONFIG_88EU_AP_MODE
/* 1 bss_cap_update & sta_info_update */ /* 1 bss_cap_update & sta_info_update */
bss_cap_update_on_sta_join(padapter, pstat); bss_cap_update_on_sta_join(padapter, pstat);
sta_info_update(padapter, pstat); sta_info_update(padapter, pstat);
...@@ -1312,30 +1307,23 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame ...@@ -1312,30 +1307,23 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
/* 3-(1) report sta add event */ /* 3-(1) report sta add event */
report_add_sta_event(padapter, pstat->hwaddr, pstat->aid); report_add_sta_event(padapter, pstat->hwaddr, pstat->aid);
#endif
} }
return _SUCCESS; return _SUCCESS;
asoc_class2_error: asoc_class2_error:
#ifdef CONFIG_88EU_AP_MODE
issue_deauth(padapter, (void *)GetAddr2Ptr(pframe), status); issue_deauth(padapter, (void *)GetAddr2Ptr(pframe), status);
#endif
return _FAIL; return _FAIL;
OnAssocReqFail: OnAssocReqFail:
#ifdef CONFIG_88EU_AP_MODE
pstat->aid = 0; pstat->aid = 0;
if (frame_type == WIFI_ASSOCREQ) if (frame_type == WIFI_ASSOCREQ)
issue_asocrsp(padapter, status, pstat, WIFI_ASSOCRSP); issue_asocrsp(padapter, status, pstat, WIFI_ASSOCRSP);
else else
issue_asocrsp(padapter, status, pstat, WIFI_REASSOCRSP); issue_asocrsp(padapter, status, pstat, WIFI_REASSOCRSP);
#endif
#endif /* CONFIG_88EU_AP_MODE */ #endif /* CONFIG_88EU_AP_MODE */
......
...@@ -54,14 +54,12 @@ static void _rtw_init_stainfo(struct sta_info *psta) ...@@ -54,14 +54,12 @@ static void _rtw_init_stainfo(struct sta_info *psta)
psta->bpairwise_key_installed = false; psta->bpairwise_key_installed = false;
#ifdef CONFIG_88EU_AP_MODE
psta->nonerp_set = 0; psta->nonerp_set = 0;
psta->no_short_slot_time_set = 0; psta->no_short_slot_time_set = 0;
psta->no_short_preamble_set = 0; psta->no_short_preamble_set = 0;
psta->no_ht_gf_set = 0; psta->no_ht_gf_set = 0;
psta->no_ht_set = 0; psta->no_ht_set = 0;
psta->ht_20mhz_set = 0; psta->ht_20mhz_set = 0;
#endif
psta->under_exist_checking = 0; psta->under_exist_checking = 0;
......
...@@ -47,7 +47,6 @@ void rtw_set_macaddr_acl(struct adapter *padapter, int mode); ...@@ -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_add_sta(struct adapter *padapter, u8 *addr);
int rtw_acl_remove_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 associated_clients_update(struct adapter *padapter, u8 updated);
void bss_cap_update_on_sta_join(struct adapter *padapter, struct sta_info *psta); 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); 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); ...@@ -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); int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset);
void start_ap_mode(struct adapter *padapter); void start_ap_mode(struct adapter *padapter);
void stop_ap_mode(struct adapter *padapter); void stop_ap_mode(struct adapter *padapter);
#endif
#endif /* end of CONFIG_88EU_AP_MODE */ #endif /* end of CONFIG_88EU_AP_MODE */
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment