From: Martin Kaiser <martin@kaiser.cx>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Larry Finger <Larry.Finger@lwfinger.net>,
Phillip Potter <phil@philpotter.co.uk>,
Michael Straube <straube.linux@gmail.com>,
Pavel Skripkin <paskripkin@gmail.com>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
Martin Kaiser <martin@kaiser.cx>
Subject: [PATCH 08/11] staging: r8188eu: clarify the contents of the delba params
Date: Thu, 2 Jun 2022 21:37:23 +0200 [thread overview]
Message-ID: <20220602193726.280922-9-martin@kaiser.cx> (raw)
In-Reply-To: <20220602193726.280922-1-martin@kaiser.cx>
The delba parameters field contains an initiator/receiver flag and the
tid. The caller of issue_action_BA passes these components in the status
parameter.
Extract the two components from status and use u16_encode_bits to copy
them into the parameters field. This should clarify what's going on and
should make it easier to replace the status parameter in the future.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index b4d22dae212a..7968674a0705 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5377,7 +5377,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
struct sta_priv *pstapriv = &padapter->stapriv;
struct registry_priv *pregpriv = &padapter->registrypriv;
struct ieee80211_mgmt *mgmt;
- u16 capab;
+ u16 capab, params;
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (!pmgntframe)
@@ -5450,6 +5450,9 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
mgmt->u.action.u.delba.action_code = WLAN_ACTION_DELBA;
pattrib->pktlen++;
mgmt->u.action.u.delba.params = cpu_to_le16((status & 0x1F) << 3);
+ params = u16_encode_bits((status & 0x1), IEEE80211_DELBA_PARAM_INITIATOR_MASK);
+ params |= u16_encode_bits((status >> 1) & 0xF, IEEE80211_DELBA_PARAM_TID_MASK);
+ mgmt->u.action.u.delba.params = cpu_to_le16(params);
pattrib->pktlen += 2;
mgmt->u.action.u.delba.reason_code = cpu_to_le16(WLAN_STATUS_REQUEST_DECLINED);
pattrib->pktlen += 2;
--
2.30.2
next prev parent reply other threads:[~2022-06-02 19:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-02 19:37 [PATCH 00/11] staging: r8188eu: continue the cleanup of issue_action_BA Martin Kaiser
2022-06-02 19:37 ` [PATCH 01/11] staging: r8188eu: use mgmt to set resp dialog token Martin Kaiser
2022-06-02 19:37 ` [PATCH 02/11] staging: r8188eu: use mgmt to set the addba resp status Martin Kaiser
2022-06-02 19:37 ` [PATCH 03/11] staging: r8188eu: use mgmt to set the addba resp timeout Martin Kaiser
2022-06-02 19:37 ` [PATCH 04/11] staging: r8188eu: use ieee80211 to set addba resp capabilities Martin Kaiser
2022-06-02 19:37 ` [PATCH 05/11] staging: r8188eu: calculate the addba response length Martin Kaiser
2022-06-02 19:37 ` [PATCH 06/11] staging: r8188eu: use mgmt to set the delba reason code Martin Kaiser
2022-06-02 19:37 ` [PATCH 07/11] staging: r8188eu: use mgmt to set delba params Martin Kaiser
2022-06-02 19:37 ` Martin Kaiser [this message]
2022-06-02 19:37 ` [PATCH 09/11] staging: r8188eu: calculate the delba length Martin Kaiser
2022-06-02 19:37 ` [PATCH 10/11] staging: r8188eu: remove the pframe variable Martin Kaiser
2022-06-02 19:37 ` [PATCH 11/11] staging: r8188eu: use u8, u16 in issue_action_BA prototype Martin Kaiser
2022-06-05 16:03 ` [PATCH 00/11] staging: r8188eu: continue the cleanup of issue_action_BA Pavel Skripkin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220602193726.280922-9-martin@kaiser.cx \
--to=martin@kaiser.cx \
--cc=Larry.Finger@lwfinger.net \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=paskripkin@gmail.com \
--cc=phil@philpotter.co.uk \
--cc=straube.linux@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®