From patchwork Thu Apr 21 07:02:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1619989 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=KUd9F+JT; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KkT662b8yz9sCq for ; Thu, 21 Apr 2022 17:03:42 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nhQqk-0000fz-1y; Thu, 21 Apr 2022 07:03:34 +0000 Received: from mail-pj1-f49.google.com ([209.85.216.49]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nhQqZ-0000K5-BS for kernel-team@lists.ubuntu.com; Thu, 21 Apr 2022 07:03:23 +0000 Received: by mail-pj1-f49.google.com with SMTP id mm4-20020a17090b358400b001cb93d8b137so6965481pjb.2 for ; Thu, 21 Apr 2022 00:03:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zM28kn7esWSOsdwHwpOm9DiDa4kZXd+neP1ATSiwdyE=; b=KUd9F+JTro0uGsHMwX2Z8gdS1JmIevsyzq1+nbZbnLsttbym2OjO/eCk0Cnn8Xjx/G yiJKLoP+kQhb9kwQhoXCEnVFSTLjuYr4rPuQnQKQ29ljpUBJA4vJubgPIjAHBcOtmvsw Ju7Ax4RZ2AmxkMNREfN7rdCE8ZEmImTClYahSaxeFS+IWeNjC/9CxTdu1sq6eUzE894p 8XOUbCgoSNeQFAIdvqT5Nweqsw1H3uEmE0V28MM9Nu74tdgH9duQeH8pwKfQtcnFxpUj Wgyricy8bgqMSwvt4YFG6jtIFvzh7pedM/40ZEDKsegS37cyu0c/kPe2z+50vEvSssE5 XzaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=zM28kn7esWSOsdwHwpOm9DiDa4kZXd+neP1ATSiwdyE=; b=PNnr1qiGXuPZ2YuhMdmyOik2IQp7uPM7F8v0CHSH6LIPN/64zQ/5LuUvTGH/pvAIiJ vXT2ELpEZh5cau75M8cgI3kFajXfgs8jjZK5Sa1XDFDs0nBaAInKmA13fLx+Nphj/3dq t/olyGYEONY+uDj+6WIl1pbxvvdJnpUuB6ziaH0WjFpB79WNR0ScJyoC72G4w3eBTXlt vi3yYUW94glgn3Oe4VsMJR0lNApT6Do/+5JyPBUOyAh5JquWieiB9Mn/masVyRJqC14T 4QTiM7J++g4wU8IEpiHKqz9bR7r/GZ1TVu6Ielq+XVOd6mp13pyNtAwBnEpp1uaO0V3w 6k6w== X-Gm-Message-State: AOAM53065Rkr3WSweLpnVfcPlDj0bcBKrFYHjhBs5np9Q2r6YjVR4gle t2VJ7EOO1xjjqr8UHWpUVSN+r5ZE9+o= X-Google-Smtp-Source: ABdhPJx40CZyRn+eqRT415lRBLcfka6iQoUn48ee7t2gq8zvPzBIL4oQWqx6eK4mNf02Jg4HxC1B2g== X-Received: by 2002:a17:902:9a0a:b0:158:a22a:5448 with SMTP id v10-20020a1709029a0a00b00158a22a5448mr24929768plp.20.1650524598636; Thu, 21 Apr 2022 00:03:18 -0700 (PDT) Received: from localhost (220-135-95-34.hinet-ip.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id w187-20020a6230c4000000b00505cde77826sm21974028pfw.159.2022.04.21.00.03.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 00:03:18 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/6][SRU][OEM-5.17] rtw88: fix incorrect frequency reported Date: Thu, 21 Apr 2022 15:02:58 +0800 Message-Id: <20220421070302.11579-8-acelan.kao@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220421070302.11579-1-acelan.kao@canonical.com> References: <20220421070302.11579-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.216.49; envelope-from=acelan@gmail.com; helo=mail-pj1-f49.google.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Po-Hao Huang BugLink: https://bugs.launchpad.net/bugs/1969326 We should only fill in frequency reported by firmware during scan. Add this so frames won't be dropped by mac80211 due to frequency mismatch. Signed-off-by: Po-Hao Huang Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220407095858.46807-3-pkshih@realtek.com (cherry picked from commit 6723c0cde84fde582a261c186ce84100dcfa0019) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/net/wireless/realtek/rtw88/rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw88/rx.c b/drivers/net/wireless/realtek/rtw88/rx.c index d2d607e22198..84aedabdf285 100644 --- a/drivers/net/wireless/realtek/rtw88/rx.c +++ b/drivers/net/wireless/realtek/rtw88/rx.c @@ -158,7 +158,8 @@ void rtw_rx_fill_rx_status(struct rtw_dev *rtwdev, memset(rx_status, 0, sizeof(*rx_status)); rx_status->freq = hw->conf.chandef.chan->center_freq; rx_status->band = hw->conf.chandef.chan->band; - if (rtw_fw_feature_check(&rtwdev->fw, FW_FEATURE_SCAN_OFFLOAD)) + if (rtw_fw_feature_check(&rtwdev->fw, FW_FEATURE_SCAN_OFFLOAD) && + test_bit(RTW_FLAG_SCANNING, rtwdev->flags)) rtw_set_rx_freq_by_pktstat(pkt_stat, rx_status); if (pkt_stat->crc_err) rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;