From eafbade349fdc21feba0997918cb070b629ad9b4 Mon Sep 17 00:00:00 2001 From: Martin Kaiser Date: Sun, 3 Apr 2022 18:54:32 +0200 Subject: [PATCH] staging: r8188eu: to_fr_ds cannot be 3 here Remove two unnecessary ternary operators in validate_recv_data_frame. pattrib->to_fr_ds cannot be 3 in these places. If it was 3, we'd already have returned an error to the caller. Signed-off-by: Martin Kaiser Link: https://lore.kernel.org/r/20220403165438.357728-6-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman --- drivers/staging/r8188eu/core/rtw_recv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/r8188eu/core/rtw_recv.c b/drivers/staging/r8188eu/core/rtw_recv.c index 200d8c6..47d4fd0 100644 --- a/drivers/staging/r8188eu/core/rtw_recv.c +++ b/drivers/staging/r8188eu/core/rtw_recv.c @@ -1001,13 +1001,13 @@ static int validate_recv_data_frame(struct adapter *adapter, pattrib->priority = GetPriority((ptr + 24)); pattrib->ack_policy = GetAckpolicy((ptr + 24)); pattrib->amsdu = GetAMsdu((ptr + 24)); - pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 32 : 26; + pattrib->hdrlen = 26; if (pattrib->priority != 0 && pattrib->priority != 3) adapter->recvpriv.bIsAnyNonBEPkts = true; } else { pattrib->priority = 0; - pattrib->hdrlen = pattrib->to_fr_ds == 3 ? 30 : 24; + pattrib->hdrlen = 24; } if (pattrib->order)/* HT-CTRL 11n */ -- 2.7.4