From: Philipp Hortmann <philipp.g.hortmann@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: [PATCH 5/8] staging: rtl8192e: Use standard function in softmac_mgmt_xmit()
Date: Sat, 9 Sep 2023 20:20:02 +0200 [thread overview]
Message-ID: <caae14d46f7f5a3072ee3e53f80a27909c86fcbf.1694282907.git.philipp.g.hortmann@gmail.com> (raw)
In-Reply-To: <cover.1694282907.git.philipp.g.hortmann@gmail.com>
Use standard function ieee80211_is_beacon() to avoid proprietary code to
identify beacon and to increase readability in softmac_mgmt_xmit() and
_rtl92e_translate_rx_signal_stats()
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
---
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +-
drivers/staging/rtl8192e/rtllib.h | 1 -
drivers/staging/rtl8192e/rtllib_softmac.c | 2 +-
3 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 58e90b7772ef..8adf53174239 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -1584,7 +1584,7 @@ static void _rtl92e_translate_rx_signal_stats(struct net_device *dev,
(!pstats->bHwError) && (!pstats->bCRC) && (!pstats->bICV));
bpacket_toself = bpacket_match_bssid && /* check this */
ether_addr_equal(praddr, priv->rtllib->dev->dev_addr);
- if (WLAN_FC_GET_FRAMETYPE(fc) == RTLLIB_STYPE_BEACON)
+ if (ieee80211_is_beacon(hdr->frame_ctl))
bPacketBeacon = true;
_rtl92e_process_phyinfo(priv, tmp_buf, &previous_stats, pstats);
_rtl92e_query_rxphystatus(priv, pstats, pdesc, pdrvinfo,
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index 95c9f6679d71..7dfb93f0590c 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -459,7 +459,6 @@ enum _REG_PREAMBLE_MODE {
#define WLAN_FC_GET_STYPE(fc) ((fc) & RTLLIB_FCTL_STYPE)
#define WLAN_FC_MORE_DATA(fc) ((fc) & RTLLIB_FCTL_MOREDATA)
-#define WLAN_FC_GET_FRAMETYPE(fc) ((fc) & RTLLIB_FCTL_FRAMETYPE)
#define WLAN_GET_SEQ_FRAG(seq) ((seq) & RTLLIB_SCTL_FRAG)
#define WLAN_GET_SEQ_SEQ(seq) (((seq) & RTLLIB_SCTL_SEQ) >> 4)
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index de1702491191..5de57331c1cf 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -197,7 +197,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee)
/* called with 2nd param 0, no mgmt lock required */
rtllib_sta_wakeup(ieee, 0);
- if (le16_to_cpu(header->frame_ctl) == RTLLIB_STYPE_BEACON)
+ if (ieee80211_is_beacon(header->frame_ctl))
tcb_desc->queue_index = BEACON_QUEUE;
else
tcb_desc->queue_index = MGNT_QUEUE;
--
2.41.0
next prev parent reply other threads:[~2023-09-09 18:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-09 18:19 [PATCH 0/8] staging: rtl8192e: Use standard functions like ieee80211_is_beacon() Philipp Hortmann
2023-09-09 18:19 ` [PATCH 1/8] staging: rtl8192e: Remove useless equation in debug output Philipp Hortmann
2023-09-09 18:19 ` [PATCH 2/8] staging: rtl8192e: Use standard ieee80211 function in rtllib_rx_mgt() Philipp Hortmann
2023-09-09 18:19 ` [PATCH 3/8] staging: rtl8192e: Use standard function in rtllib_process_probe_response() Philipp Hortmann
2023-09-09 18:19 ` [PATCH 4/8] staging: rtl8192e: Use standard function in rtllib_rx_check_duplicate() Philipp Hortmann
2023-09-12 1:09 ` kernel test robot
2023-09-09 18:20 ` Philipp Hortmann [this message]
2023-09-09 18:20 ` [PATCH 6/8] staging: rtl8192e: Replace rtl92e_disable_irq with rtl92e_irq_disable Philipp Hortmann
2023-09-09 18:20 ` [PATCH 7/8] staging: rtl8192e: Replace rtl92e_enable_irq with rtl92e_irq_enable Philipp Hortmann
2023-09-09 18:20 ` [PATCH 8/8] staging: rtl8192e: Remove rtllib_get_payload() Philipp Hortmann
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=caae14d46f7f5a3072ee3e53f80a27909c86fcbf.1694282907.git.philipp.g.hortmann@gmail.com \
--to=philipp.g.hortmann@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
/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®