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 v2 03/12] staging: r8188eu: use ieee80211_mgmt in issue_action_BA
Date: Tue, 24 May 2022 11:00:20 +0200 [thread overview]
Message-ID: <20220524090029.242584-4-martin@kaiser.cx> (raw)
In-Reply-To: <20220524090029.242584-1-martin@kaiser.cx>
Define a struct ieee80211_mgmt variable in issue_action_BA, this will make
it much simpler to populate the fields of the outoing frame.
Use the new mgmt variable to set the type and subtype of the frame.
Signed-off-by: Martin Kaiser <martin@kaiser.cx>
---
drivers/staging/r8188eu/core/rtw_mlme_ext.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/r8188eu/core/rtw_mlme_ext.c b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
index 0265784368e2..eec716fea41c 100644
--- a/drivers/staging/r8188eu/core/rtw_mlme_ext.c
+++ b/drivers/staging/r8188eu/core/rtw_mlme_ext.c
@@ -5376,13 +5376,13 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
struct pkt_attrib *pattrib;
u8 *pframe;
struct ieee80211_hdr *pwlanhdr;
- __le16 *fctrl;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
struct sta_info *psta;
struct sta_priv *pstapriv = &padapter->stapriv;
struct registry_priv *pregpriv = &padapter->registrypriv;
+ struct ieee80211_mgmt *mgmt;
pmgntframe = alloc_mgtxmitframe(pxmitpriv);
if (!pmgntframe)
@@ -5396,9 +5396,9 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
pwlanhdr = (struct ieee80211_hdr *)pframe;
+ mgmt = (struct ieee80211_mgmt *)pframe;
- fctrl = &pwlanhdr->frame_control;
- *(fctrl) = 0;
+ mgmt->frame_control = cpu_to_le16(IEEE80211_STYPE_ACTION | IEEE80211_FTYPE_MGMT);
/* memcpy(pwlanhdr->addr1, get_my_bssid(&(pmlmeinfo->network)), ETH_ALEN); */
memcpy(pwlanhdr->addr1, raddr, ETH_ALEN);
@@ -5407,7 +5407,6 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
SetSeqNum(pwlanhdr, pmlmeext->mgnt_seq);
pmlmeext->mgnt_seq++;
- SetFrameSubType(pframe, WIFI_ACTION);
pframe += sizeof(struct ieee80211_hdr_3addr);
pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
--
2.30.2
next prev parent reply other threads:[~2022-05-24 9:01 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-21 15:38 [PATCH 00/12] staging: r8188eu: start cleaning up issue_action_BA Martin Kaiser
2022-05-21 15:38 ` [PATCH 01/12] staging: r8188eu: remove unnecessary category check Martin Kaiser
2022-05-21 15:38 ` [PATCH 02/12] staging: r8188eu: use defines for the block action codes Martin Kaiser
2022-05-21 15:38 ` [PATCH 03/12] staging: r8188eu: use ieee80211_mgmt in issue_action_BA Martin Kaiser
2022-05-21 15:38 ` [PATCH 04/12] staging: r8188eu: use mgmt to set the addresses Martin Kaiser
2022-05-21 15:38 ` [PATCH 05/12] staging: r8188eu: use mgmt to set the sequence number Martin Kaiser
2022-05-21 20:44 ` kernel test robot
2022-05-21 15:38 ` [PATCH 06/12] staging: r8188eu: use mgmt to set the category Martin Kaiser
2022-05-21 15:38 ` [PATCH 07/12] staging: r8188eu: use mgmt to set the action codes Martin Kaiser
2022-05-21 15:38 ` [PATCH 08/12] staging: r8188eu: use mgmt to set the dialog token Martin Kaiser
2022-05-21 15:38 ` [PATCH 09/12] staging: r8188eu: use mgmt to set the timeout Martin Kaiser
2022-05-21 15:38 ` [PATCH 10/12] staging: r8188eu: use ieee80211 to set addba capabilities Martin Kaiser
2022-05-21 15:38 ` [PATCH 11/12] staging: r8188eu: use mgmt to set start sequence number Martin Kaiser
2022-05-21 15:38 ` [PATCH 12/12] staging: r8188eu: calculate the addba request length Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 00/12] staging: r8188eu: start cleaning up issue_action_BA Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 01/12] staging: r8188eu: remove unnecessary category check Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 02/12] staging: r8188eu: use defines for the block action codes Martin Kaiser
2022-05-24 9:00 ` Martin Kaiser [this message]
2022-05-24 9:00 ` [PATCH v2 04/12] staging: r8188eu: use mgmt to set the addresses Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 05/12] staging: r8188eu: use mgmt to set the sequence number Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 06/12] staging: r8188eu: use mgmt to set the category Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 07/12] staging: r8188eu: use mgmt to set the action codes Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 08/12] staging: r8188eu: use mgmt to set the dialog token Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 09/12] staging: r8188eu: use mgmt to set the timeout Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 10/12] staging: r8188eu: use ieee80211 to set addba capabilities Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 11/12] staging: r8188eu: use mgmt to set start sequence number Martin Kaiser
2022-05-24 9:00 ` [PATCH v2 12/12] staging: r8188eu: calculate the addba request length Martin Kaiser
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=20220524090029.242584-4-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®