Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −13
Original line number Diff line number Diff line
@@ -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 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame)
	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 */

+0 −2
Original line number Diff line number Diff line
@@ -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;

+0 −2
Original line number Diff line number Diff line
@@ -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