Message ID | 20230322171905.492855-13-martin.kaistra@linutronix.de (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Kalle Valo |
Headers | show |
Series | wifi: rtl8xxxu: Add AP mode support for 8188f | expand |
> -----Original Message----- > From: Martin Kaistra <martin.kaistra@linutronix.de> > Sent: Thursday, March 23, 2023 1:19 AM > To: linux-wireless@vger.kernel.org > Cc: Jes Sorensen <Jes.Sorensen@gmail.com>; Kalle Valo <kvalo@kernel.org>; Ping-Ke Shih > <pkshih@realtek.com>; Bitterblue Smith <rtl8821cerfe2@gmail.com>; Sebastian Andrzej Siewior > <bigeasy@linutronix.de> > Subject: [RFC PATCH 12/14] wifi: rtl8xxxu: Enable hw seq for all non-qos frames > > Beacon frames are generated by the HW and therefore contain a HW > generated seq number. Enable HW sequence number for other frames to > match that. > > Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> > --- > drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > index c232de1d47173..82fbe778fc5ec 100644 > --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c > @@ -5275,6 +5275,9 @@ rtl8xxxu_fill_txdesc_v2(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr, > tx_desc40->txdw4 |= cpu_to_le32(TXDESC40_RETRY_LIMIT_ENABLE); > } > > + if (!ieee80211_is_data_qos(hdr->frame_control)) Since beacon is management frame, should it be ieee80211_is_mgmt() ? > + tx_desc40->txdw8 |= cpu_to_le32(TXDESC40_HW_SEQ_ENABLE); > + > if (short_preamble) > tx_desc40->txdw5 |= cpu_to_le32(TXDESC40_SHORT_PREAMBLE); > > -- > 2.30.2
diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c index c232de1d47173..82fbe778fc5ec 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -5275,6 +5275,9 @@ rtl8xxxu_fill_txdesc_v2(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr, tx_desc40->txdw4 |= cpu_to_le32(TXDESC40_RETRY_LIMIT_ENABLE); } + if (!ieee80211_is_data_qos(hdr->frame_control)) + tx_desc40->txdw8 |= cpu_to_le32(TXDESC40_HW_SEQ_ENABLE); + if (short_preamble) tx_desc40->txdw5 |= cpu_to_le32(TXDESC40_SHORT_PREAMBLE);
Beacon frames are generated by the HW and therefore contain a HW generated seq number. Enable HW sequence number for other frames to match that. Signed-off-by: Martin Kaistra <martin.kaistra@linutronix.de> --- drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 3 +++ 1 file changed, 3 insertions(+)