From patchwork Wed Apr 19 10:01:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaistra X-Patchwork-Id: 676135 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A139C6FD18 for ; Wed, 19 Apr 2023 10:02:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232926AbjDSKCl (ORCPT ); Wed, 19 Apr 2023 06:02:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232930AbjDSKCT (ORCPT ); Wed, 19 Apr 2023 06:02:19 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4794CB746 for ; Wed, 19 Apr 2023 03:02:17 -0700 (PDT) From: Martin Kaistra DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1681898533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OenvJIVjMKz7J9UXyVI0Wdvm1s2jXrWTibJxP/BRpC0=; b=EFwvI0ZPUKE7bo6jArlwMMYGQfO8Vw8MR/7alOJZnNu0HmxG4C3nkao6qAT3Ihg+RtJfPS ySspUHK4IWRi+1xlxLipbSiRLH+ntBRrzpYIuN/bkzkt6gL+577/GrrCI7KflEyMgAEu09 TQQM2OHtoRn64w7qvbxHQ02AP8YdkBdpGfGgNOW2YUcfu8HO/ww56ZB7CM17kDv//h34eF lMwU4hhf59i3HSbmGrqqIeZs+1VdL0dzH/bFYhpEf7doN+4GFaww8iTT+y2nHIq0rCDkj4 oif8GeFEGPG5e5oEYpytvDX0aGSD1m8bodLPwP5FOkjHcT/Yq1a5V9dQZ7UYZA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1681898533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OenvJIVjMKz7J9UXyVI0Wdvm1s2jXrWTibJxP/BRpC0=; b=/l2PB2gm9laK0PGExerAX96CiioeFSyFq+CmJVVbk2g0IyCaQwKr9J4wSEmaU/EdGeliSc owtRLjSgpjn3rMDA== To: linux-wireless@vger.kernel.org Cc: Jes Sorensen , Kalle Valo , Ping-Ke Shih , Bitterblue Smith , Sebastian Andrzej Siewior Subject: [PATCH v2 13/18] wifi: rtl8xxxu: Enable hw seq for mgmt/non-QoS data frames Date: Wed, 19 Apr 2023 12:01:40 +0200 Message-Id: <20230419100145.159191-14-martin.kaistra@linutronix.de> In-Reply-To: <20230419100145.159191-1-martin.kaistra@linutronix.de> References: <20230419100145.159191-1-martin.kaistra@linutronix.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org 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. mac80211 will tell us via IEEE80211_TX_CTL_ASSIGN_SEQ when that is necessary. Signed-off-by: Martin Kaistra Reviewed-by: Ping-Ke Shih --- 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 2e02812a4a85a..cff465c7cda30 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -5300,6 +5300,9 @@ rtl8xxxu_fill_txdesc_v2(struct ieee80211_hw *hw, struct ieee80211_hdr *hdr, tx_desc40->txdw4 |= cpu_to_le32(TXDESC40_RETRY_LIMIT_ENABLE); } + if (tx_info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) + tx_desc40->txdw8 |= cpu_to_le32(TXDESC40_HW_SEQ_ENABLE); + if (short_preamble) tx_desc40->txdw5 |= cpu_to_le32(TXDESC40_SHORT_PREAMBLE);