From: Pkshih <pkshih@realtek.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>
Cc: "tony0620emma@gmail.com" <tony0620emma@gmail.com>,
"kvalo@codeaurora.org" <kvalo@codeaurora.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Neo Jou <neojou@gmail.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>
Subject: RE: [PATCH 3/4] rtw88: Move enum rtw_tx_queue_type mapping code to tx.{c,h}
Date: Wed, 19 Jan 2022 06:04:45 +0000 [thread overview]
Message-ID: <b2bf2bc5f04b488487797aa21c50a130@realtek.com> (raw)
In-Reply-To: <20220114234825.110502-4-martin.blumenstingl@googlemail.com>
> -----Original Message-----
> From: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> Sent: Saturday, January 15, 2022 7:48 AM
> 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 3/4] rtw88: Move enum rtw_tx_queue_type mapping code to tx.{c,h}
>
> This code is not specific to the PCIe bus type but can be re-used by USB
> and SDIO bus types. Move it to tx.{c,h} to avoid code-duplication in the
> future.
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
[...]
> diff --git a/drivers/net/wireless/realtek/rtw88/tx.c b/drivers/net/wireless/realtek/rtw88/tx.c
> index efcc1b0371a8..ec6a3683c3f8 100644
> --- a/drivers/net/wireless/realtek/rtw88/tx.c
> +++ b/drivers/net/wireless/realtek/rtw88/tx.c
> @@ -665,3 +665,38 @@ void rtw_txq_cleanup(struct rtw_dev *rtwdev, struct ieee80211_txq *txq)
> list_del_init(&rtwtxq->list);
> spin_unlock_bh(&rtwdev->txq_lock);
> }
> +
> +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,
> + [IEEE80211_AC_BK] = RTW_TX_QUEUE_BK,
> +};
> +
> +static_assert(ARRAY_SIZE(ac_to_hwq) == IEEE80211_NUM_ACS);
> +
> +enum rtw_tx_queue_type rtw_tx_ac_to_hwq(enum ieee80211_ac_numbers ac)
> +{
> + return ac_to_hwq[ac];
> +}
> +EXPORT_SYMBOL(rtw_tx_ac_to_hwq);
> +
Could I know why we can't just export the array ac_to_hwq[]?
Is there a strict rule?
--
Ping-Ke
next prev parent reply other threads:[~2022-01-19 6:04 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 ` [PATCH 1/4] rtw88: pci: Change type of rtw_hw_queue_mapping() and ac_to_hwq to enum Martin Blumenstingl
2022-01-17 12:11 ` 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 [this message]
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=b2bf2bc5f04b488487797aa21c50a130@realtek.com \
--to=pkshih@realtek.com \
--cc=jernej.skrabec@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neojou@gmail.com \
--cc=netdev@vger.kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).