Commit 9001c502 authored by Martin Kaiser's avatar Martin Kaiser Committed by Greg Kroah-Hartman
Browse files

staging: r8188eu: rtw_action_public_decache's token is a u8



Both callers of rtw_action_public_decache pass a u8 value for the token
parameter. We can change token from s32 to u8 and remove the code for
token < 0.

Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> # Edimax N150
Signed-off-by: default avatarMartin Kaiser <martin@kaiser.cx>
Link: https://lore.kernel.org/r/20221030173326.1588647-13-martin@kaiser.cx


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8161a833
Loading
Loading
Loading
Loading
+5 −13
Original line number Diff line number Diff line
@@ -3490,7 +3490,7 @@ inline void issue_probereq_p2p(struct adapter *adapter, u8 *da)
	_issue_probereq_p2p(adapter, da);
}

static s32 rtw_action_public_decache(struct recv_frame *recv_frame, s32 token)
static s32 rtw_action_public_decache(struct recv_frame *recv_frame, u8 token)
{
	struct adapter *adapter = recv_frame->adapter;
	struct mlme_ext_priv *mlmeext = &adapter->mlmeextpriv;
@@ -3499,21 +3499,13 @@ static s32 rtw_action_public_decache(struct recv_frame *recv_frame, s32 token)
		(recv_frame->attrib.frag_num & 0xf);

	if (GetRetry(frame)) {
		if (token >= 0) {
		if ((seq_ctrl == mlmeext->action_public_rxseq) &&
		    (token == mlmeext->action_public_dialog_token))
			return _FAIL;
		} else {
			if (seq_ctrl == mlmeext->action_public_rxseq)
				return _FAIL;
		}
	}

	mlmeext->action_public_rxseq = seq_ctrl;

	if (token >= 0)
	mlmeext->action_public_dialog_token = token;

	return _SUCCESS;
}