From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
To: linux-wireless@vger.kernel.org
Cc: tony0620emma@gmail.com, kvalo@codeaurora.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Neo Jou <neojou@gmail.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Pkshih <pkshih@realtek.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Subject: [PATCH 1/4] rtw88: pci: Change type of rtw_hw_queue_mapping() and ac_to_hwq to enum
Date: Sat, 15 Jan 2022 00:48:22 +0100 [thread overview]
Message-ID: <20220114234825.110502-2-martin.blumenstingl@googlemail.com> (raw)
In-Reply-To: <20220114234825.110502-1-martin.blumenstingl@googlemail.com>
rtw_hw_queue_mapping() and ac_to_hwq[] hold values of type enum
rtw_tx_queue_type. Change their types to reflect this to make it easier
to understand this part of the code.
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
drivers/net/wireless/realtek/rtw88/pci.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/realtek/rtw88/pci.c b/drivers/net/wireless/realtek/rtw88/pci.c
index a0991d3f15c0..13f1f50b2867 100644
--- a/drivers/net/wireless/realtek/rtw88/pci.c
+++ b/drivers/net/wireless/realtek/rtw88/pci.c
@@ -669,7 +669,7 @@ static void rtw_pci_deep_ps(struct rtw_dev *rtwdev, bool enter)
spin_unlock_bh(&rtwpci->irq_lock);
}
-static u8 ac_to_hwq[] = {
+static enum rtw_tx_queue_type ac_to_hwq[] = {
[IEEE80211_AC_VO] = RTW_TX_QUEUE_VO,
[IEEE80211_AC_VI] = RTW_TX_QUEUE_VI,
[IEEE80211_AC_BE] = RTW_TX_QUEUE_BE,
@@ -678,12 +678,12 @@ static u8 ac_to_hwq[] = {
static_assert(ARRAY_SIZE(ac_to_hwq) == IEEE80211_NUM_ACS);
-static u8 rtw_hw_queue_mapping(struct sk_buff *skb)
+static enum rtw_tx_queue_type rtw_hw_queue_mapping(struct sk_buff *skb)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
__le16 fc = hdr->frame_control;
u8 q_mapping = skb_get_queue_mapping(skb);
- u8 queue;
+ enum rtw_tx_queue_type queue;
if (unlikely(ieee80211_is_beacon(fc)))
queue = RTW_TX_QUEUE_BCN;
--
2.34.1
next prev parent reply other threads:[~2022-01-14 23:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-14 23:48 [PATCH 0/4] rtw88: four small code-cleanups and refactorings Martin Blumenstingl
2022-01-14 23:48 ` Martin Blumenstingl [this message]
2022-01-17 12:11 ` [PATCH 1/4] rtw88: pci: Change type of rtw_hw_queue_mapping() and ac_to_hwq to enum Kalle Valo
2022-01-17 17:48 ` Martin Blumenstingl
2022-01-14 23:48 ` [PATCH 2/4] rtw88: pci: Change queue datatype from u8 to enum rtw_tx_queue_type Martin Blumenstingl
2022-01-19 6:04 ` Pkshih
2022-01-14 23:48 ` [PATCH 3/4] rtw88: Move enum rtw_tx_queue_type mapping code to tx.{c,h} Martin Blumenstingl
2022-01-19 6:04 ` Pkshih
2022-01-19 6:19 ` Kalle Valo
2022-01-23 18:34 ` Martin Blumenstingl
2022-01-27 12:11 ` Kalle Valo
2022-01-14 23:48 ` [PATCH 4/4] rtw88: mac: Use existing interface mask macros in rtw_pwr_seq_parser() Martin Blumenstingl
2022-01-19 6:04 ` Pkshih
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=20220114234825.110502-2-martin.blumenstingl@googlemail.com \
--to=martin.blumenstingl@googlemail.com \
--cc=jernej.skrabec@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=neojou@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pkshih@realtek.com \
--cc=tony0620emma@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®