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

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.cxSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8161a833
......@@ -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;
}
if ((seq_ctrl == mlmeext->action_public_rxseq) &&
(token == mlmeext->action_public_dialog_token))
return _FAIL;
}
mlmeext->action_public_rxseq = seq_ctrl;
if (token >= 0)
mlmeext->action_public_dialog_token = token;
mlmeext->action_public_dialog_token = token;
return _SUCCESS;
}
......
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