aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorMartin Kaiser <martin@kaiser.cx>2022-05-14 18:47:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-05-19 17:41:56 +0200
commit9465d2d91551854f7f65b24f07656eb5c096e2f4 (patch)
treedc2f6f6e61293ed8eac8a3e4ed0bdfef6d0586e6 /drivers/staging
parentstaging: r8188eu: merge process_addba_req into OnAction_back (diff)
downloadlinux-dev-9465d2d91551854f7f65b24f07656eb5c096e2f4.tar.xz
linux-dev-9465d2d91551854f7f65b24f07656eb5c096e2f4.zip
staging: r8188eu: replace if with ternary operator
Replace an if statement with a ternary operator, making the code a tiny bit shorter. Signed-off-by: Martin Kaiser <martin@kaiser.cx> Link: https://lore.kernel.org/r/20220514164740.282552-5-martin@kaiser.cx Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/r8188eu/core/rtw_mlme_ext.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 77f229121b4d..d5ea074c62f4 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -1503,10 +1503,8 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr
preorder_ctrl->indicate_seq = 0xffff;
preorder_ctrl->enable = pmlmeinfo->bAcceptAddbaReq;
- if (pmlmeinfo->bAcceptAddbaReq)
- issue_action_BA(padapter, mgmt->sa, WLAN_ACTION_ADDBA_RESP, 0);
- else
- issue_action_BA(padapter, mgmt->sa, WLAN_ACTION_ADDBA_RESP, 37);/* reject ADDBA Req */
+ issue_action_BA(padapter, mgmt->sa, WLAN_ACTION_ADDBA_RESP,
+ pmlmeinfo->bAcceptAddbaReq ? 0 : 37);
break;
case WLAN_ACTION_ADDBA_RESP:
tid = u16_get_bits(le16_to_cpu(mgmt->u.action.u.addba_resp.capab),