mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ping-Ke Shih <pkshih@realtek.com>
To: "Georg Müller" <georgmueller@gmx.net>,
	"mehmet.fide@gmail.com" <mehmet.fide@gmail.com>,
	"Jes.Sorensen@gmail.com" <Jes.Sorensen@gmail.com>
Cc: "rtl8821cerfe2@gmail.com" <rtl8821cerfe2@gmail.com>,
	"hi@shreyan.sh" <hi@shreyan.sh>,
	"mehmet.fide@screeningeagle.com" <mehmet.fide@screeningeagle.com>,
	"linux-wireless@vger.kernel.org" <linux-wireless@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [RFC PATCH v4 5/5] wifi: rtl8xxxu: set macid in TX descriptor for 8188e
Date: Tue, 1 Dec 2026 09:26:43 +0000	[thread overview]
Message-ID: <c4de3be293ce44df8ef51a3af2291597@realtek.com> (raw)
In-Reply-To: <20261126105742.1086282-6-georgmueller@gmx.net>


Georg Müller <georgmueller@gmx.net> wrote:
> rtl8xxxu_fill_txdesc_v3() does not set the mac id in the TX descriptor,
> so the hardware treats all frames as sent to mac id 0. The vendor driver
> sets it in txdw1.
> 
> Set it, so that the TX report attributes the frames to the right
> station and the per mac id rate control works in AP mode.
> 
> Signed-off-by: Georg Müller <georgmueller@gmx.net>
> ---
>  drivers/net/wireless/realtek/rtl8xxxu/core.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/core.c
> b/drivers/net/wireless/realtek/rtl8xxxu/core.c
> index 4207e68ccde0..87526c051a31 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/core.c
> @@ -5397,7 +5397,7 @@ rtl8xxxu_fill_txdesc_v3(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
>  {
>         struct rtl8xxxu_priv *priv = hw->priv;
>         struct device *dev = &priv->udev->dev;
> -       struct rtl8xxxu_ra_info *ra = &priv->ra_info[macid];
> +       struct rtl8xxxu_ra_info *ra;
>         u8 *qc = ieee80211_get_qos_ctl(hdr);
>         u8 tid = qc[0] & IEEE80211_QOS_CTL_TID_MASK;
>         u32 rate = 0;
> @@ -5405,6 +5405,14 @@ rtl8xxxu_fill_txdesc_v3(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr,
> 
>         seq_number = IEEE80211_SEQ_TO_SN(le16_to_cpu(hdr->seq_ctrl));
> 
> +       /*
> +        * For group addressed frames with a key, macid is the security CAM
> +        * index, which can be beyond the end of ra_info.
> +        */
> +       ra = &priv->ra_info[macid < RTL8188E_MAX_MAC_ID_NUM ? macid : 0];

If ra_info in struct rtl8xxxu_sta_info, the logic can be simpler. 

> +
> +       tx_desc->txdw1 |= cpu_to_le32(macid << TXDESC40_MACID_SHIFT);
> +
>         if (ieee80211_is_data(hdr->frame_control)) {
>                 rate = ra->decision_rate;
>                 tx_desc->txdw5 = cpu_to_le32(rate);
> --
> 2.56.1


      reply	other threads:[~2026-12-01  9:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 13:53 [RFC PATCH v3 0/4] wifi: rtl8xxxu: implement AP mode for 8188EU Georg Müller
2026-03-13 13:53 ` [RFC PATCH v3 1/4] wifi: rtl8xxxu: move dynamic_tx_rpt_timing_counter from ra_info to priv Georg Müller
2026-03-16  6:17   ` Ping-Ke Shih
2026-03-16  9:30     ` Georg Müller
2026-03-17  2:52       ` Ping-Ke Shih
2026-03-13 13:53 ` [RFC PATCH v3 2/4] wifi: rtl8xxxu: handle rate control for 8188e a per mac_id Georg Müller
2026-03-16  6:35   ` Ping-Ke Shih
2026-03-16  9:41     ` Georg Müller
2026-03-13 13:53 ` [RFC PATCH v3 3/4] wifi: rtl8xxxu: update max report mac id on station add / remove for 8188e chips Georg Müller
2026-03-16  7:07   ` Ping-Ke Shih
2026-03-13 13:53 ` [RFC PATCH v3 4/4] wifi: rtl8xxxu: Enable AP mode for RTL8188EU Georg Müller
2026-03-13 23:14 ` [RFC PATCH v3 0/4] wifi: rtl8xxxu: implement AP mode for 8188EU Bitterblue Smith
2026-03-27 13:58   ` Georg Müller
2026-11-25 16:06     ` Mehmet Fide
2026-11-25 20:37       ` Bitterblue Smith
2026-11-26  1:09         ` Georg Müller
2026-11-26  5:43           ` Mehmet Fide
2026-11-26 10:57             ` [RFC PATCH v4 0/5] " Georg Müller
2026-11-26 10:57             ` [RFC PATCH v4 1/5] wifi: rtl8xxxu: move dynamic_tx_rpt_timing_counter from ra_info to priv Georg Müller
2026-11-26 10:57             ` [RFC PATCH v4 2/5] wifi: rtl8xxxu: handle rate control per mac_id for 8188e Georg Müller
2026-12-01  9:15               ` Ping-Ke Shih
2026-11-26 10:57             ` [RFC PATCH v4 3/5] wifi: rtl8xxxu: update max report mac id on station add / remove for 8188e chips Georg Müller
2026-12-01  9:23               ` Ping-Ke Shih
2026-11-26 10:57             ` [RFC PATCH v4 4/5] wifi: rtl8xxxu: Enable AP mode for RTL8188EU Georg Müller
2026-11-26 10:57             ` [RFC PATCH v4 5/5] wifi: rtl8xxxu: set macid in TX descriptor for 8188e Georg Müller
2026-12-01  9:26               ` Ping-Ke Shih [this message]

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=c4de3be293ce44df8ef51a3af2291597@realtek.com \
    --to=pkshih@realtek.com \
    --cc=Jes.Sorensen@gmail.com \
    --cc=georgmueller@gmx.net \
    --cc=hi@shreyan.sh \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=mehmet.fide@gmail.com \
    --cc=mehmet.fide@screeningeagle.com \
    --cc=rtl8821cerfe2@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®