Commit 3a0f2edf authored by Michael Straube's avatar Michael Straube Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: convert switch to if statement in mgt_dispatcher()



The 'switch (GetFrameSubType(pframe))' in mgt_dispatcher() has only
one case that does something different than the default case. Convert
the switch to an if statement to improve readability.

Signed-off-by: default avatarMichael Straube <straube.linux@gmail.com>
Link: https://lore.kernel.org/r/20220108082736.16788-3-straube.linux@gmail.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a5ea39ea
Loading
Loading
Loading
Loading
+2 −13
Original line number Diff line number Diff line
@@ -443,24 +443,13 @@ void mgt_dispatcher(struct adapter *padapter, struct recv_frame *precv_frame)
		psta->RxMgmtFrameSeqNum = precv_frame->attrib.seq_num;
	}

	switch (GetFrameSubType(pframe)) {
	case WIFI_AUTH:
	if (GetFrameSubType(pframe) == WIFI_AUTH) {
		if (check_fwstate(pmlmepriv, WIFI_AP_STATE))
			ptable->func = &OnAuth;
		else
			ptable->func = &OnAuthClient;
		fallthrough;
	case WIFI_ASSOCREQ:
	case WIFI_REASSOCREQ:
	case WIFI_PROBEREQ:
	case WIFI_BEACON:
	case WIFI_ACTION:
		_mgt_dispatcher(padapter, ptable, precv_frame);
		break;
	default:
		_mgt_dispatcher(padapter, ptable, precv_frame);
		break;
	}
	_mgt_dispatcher(padapter, ptable, precv_frame);
}

static u32 p2p_listen_state_process(struct adapter *padapter, unsigned char *da)