From patchwork Thu Apr 27 09:09:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Kaistra X-Patchwork-Id: 13225305 X-Patchwork-Delegate: kvalo@adurom.com 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 58B59C7EE25 for ; Thu, 27 Apr 2023 09:10:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243315AbjD0JKN (ORCPT ); Thu, 27 Apr 2023 05:10:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243384AbjD0JJz (ORCPT ); Thu, 27 Apr 2023 05:09:55 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42DBD19A3 for ; Thu, 27 Apr 2023 02:09:53 -0700 (PDT) From: Martin Kaistra DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1682586587; 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=GXP77/jB6VmJNDlbfxw9JSQSR26GQzTLQjn/6Gj4vFc=; b=v9Fw3SZhhHmZGTL2gDrupsazjh3knOmRbfA6+HnPlwyILNwXMI0Tw+4KEo8rigl0dc7AU6 fII5JJkgeBBsUnSCsav+SpO78K0jocsmKfn3nqltMYdsG8tL1L/BzNVRLJdrSCmFSk+TzW rcDl3QaKGmGPttE7lGfotbAH4573RydfjgIJjLuqKOgT3y0eGNgOov4Ljof2XnegLfOOEL SIzmF/eg0onOpgWufDWUZ1YqI2VVYoKHA8to3ridCl2kiEfMq/ebBATIdn5bRvkAg+mxe1 c1VOYrGlZ7c+teRK5PtMYtVhhaPFu8ZsyfjL3H6/sLA2vwGOIOsMQzUL2TTC5Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1682586587; 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=GXP77/jB6VmJNDlbfxw9JSQSR26GQzTLQjn/6Gj4vFc=; b=0/nh9vHtKh3BR3TA+iISOsxx4Jxout2E3JtJFQDrIYziu0cMGve0eFyQ6NLTGKz9tWRM4X 1r+cla1Kx26FCfBA== To: linux-wireless@vger.kernel.org Cc: Jes Sorensen , Kalle Valo , Ping-Ke Shih , Bitterblue Smith , Sebastian Andrzej Siewior Subject: [PATCH v3 13/18] wifi: rtl8xxxu: Enable hw seq for mgmt/non-QoS data frames Date: Thu, 27 Apr 2023 11:09:17 +0200 Message-Id: <20230427090922.165088-14-martin.kaistra@linutronix.de> In-Reply-To: <20230427090922.165088-1-martin.kaistra@linutronix.de> References: <20230427090922.165088-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 bd01a61a83036..5aecd2b9184b9 100644 --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c @@ -5369,6 +5369,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);