From patchwork Thu May 19 08:16:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1633120 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=eH9aHLPZ; 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 4L3jPh2mdRz9t6g for ; Thu, 19 May 2022 18:16:56 +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 1nrbKx-0002cE-FT; Thu, 19 May 2022 08:16:47 +0000 Received: from mail-pf1-f174.google.com ([209.85.210.174]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nrbKs-0002Xs-W8 for kernel-team@lists.ubuntu.com; Thu, 19 May 2022 08:16:43 +0000 Received: by mail-pf1-f174.google.com with SMTP id x143so4479013pfc.11 for ; Thu, 19 May 2022 01:16:42 -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=IYjdUDDusufVR21P4qy6xWX+3c7mS7w1ws+7GNo6X7A=; b=eH9aHLPZi7nW+roX1pbEVcX5BJySKKsQG/3iDJdim5C1d+KF2tBlcMntitC9XkdJQ9 JkSd/RDGuJsvOR4donuEVjQJtKYm4KWYltxwcd0iIstjPC1JoxcdXpwDbXEmbxUjP7Er V6Xeo2xeMP31min/KLBaU1udlmY22RI3EV5/N2ac7BH1LTHdCDxndcfzGeCJv4IDBuAb klQsVhq9jl64/Vcbd1vJfTPOiYnKiS2MAwXkFP0UpvjBG/0obCYqWQXPQ8b+brc9eQsn XKV3mByIIZ2MAI5WEN6eQz/i02m4WU6bFr6o+o2cIHme9PYiCF5TgGtDGEg15nB4GupY I6sA== 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=IYjdUDDusufVR21P4qy6xWX+3c7mS7w1ws+7GNo6X7A=; b=cx5QJZxGbZQlgflEIjwC9nXybEz0YN2MuoxNgOXJcS+TI2VBzLvsywGft1kVLFg6J9 L6sikXTrDDDHkgiU+nem68EI5MHILubGmezo44wzV7Wb7muMlPPFw3XTHx/psJRf5Hxl gAOQN6Y3Bq4OKuIOll5uPhjeUoRjUQtKKk5e7Ec3tAJh6HkHMrW3kfxrBZK3ebhWG/BK UkRCWIr22tDJRyOcFanOcyEKw2xhLz7q+b5k9MiwW3vuzbOtTFt6zT27wEKTfxVk1z4Z r5DDi8UkDfPLKxTZl5FmY/PfzQqiml1n1wtBdRUSiJFyRF8A8vdECJrsonn/81MTsHTf AdXA== X-Gm-Message-State: AOAM532kLyEKaC/Z0qODd4gAtXX5olZgIodjXmst1wJo6xY8XcTaAFt7 fK9tw0Oc3x6TJ9oewoGBpWui67kfA1w= X-Google-Smtp-Source: ABdhPJx6ONssiv5m9VEjKXrP1/j2yAALXqNVhdLmNxnr2od0i6rxgclrOr0clc3TDxcThhzI7+Ev+g== X-Received: by 2002:a63:4e62:0:b0:398:cb40:19b0 with SMTP id o34-20020a634e62000000b00398cb4019b0mr2970670pgl.445.1652948200362; Thu, 19 May 2022 01:16:40 -0700 (PDT) Received: from localhost (220-135-95-34.hinet-ip.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id e15-20020a170902784f00b001615de533a9sm3227260pln.30.2022.05.19.01.16.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 01:16:39 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 3/5][SRU][J] rtw88: do PHY calibration while starting AP Date: Thu, 19 May 2022 16:16:30 +0800 Message-Id: <20220519081632.1555666-4-acelan.kao@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220519081632.1555666-1-acelan.kao@canonical.com> References: <20220519081632.1555666-1-acelan.kao@canonical.com> MIME-Version: 1.0 Received-SPF: pass client-ip=209.85.210.174; envelope-from=acelan@gmail.com; helo=mail-pf1-f174.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: Ping-Ke Shih BugLink: https://bugs.launchpad.net/bugs/1969326 Calling calibration to yield expected PHY performance. We do this in STA mode, so do this in AP mode as well. Signed-off-by: Ping-Ke Shih Signed-off-by: Kalle Valo Link: https://lore.kernel.org/r/20220407095858.46807-6-pkshih@realtek.com (cherry picked from commit f5207c122102cac22c78f438610d937a924aee3a linux-next) Signed-off-by: Chia-Lin Kao (AceLan) --- drivers/net/wireless/realtek/rtw88/mac80211.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw88/mac80211.c b/drivers/net/wireless/realtek/rtw88/mac80211.c index 9a8f6a84baa9..256af5373401 100644 --- a/drivers/net/wireless/realtek/rtw88/mac80211.c +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c @@ -418,6 +418,18 @@ static void rtw_ops_bss_info_changed(struct ieee80211_hw *hw, mutex_unlock(&rtwdev->mutex); } +static int rtw_ops_start_ap(struct ieee80211_hw *hw, struct ieee80211_vif *vif) +{ + struct rtw_dev *rtwdev = hw->priv; + struct rtw_chip_info *chip = rtwdev->chip; + + mutex_lock(&rtwdev->mutex); + chip->ops->phy_calibration(rtwdev); + mutex_unlock(&rtwdev->mutex); + + return 0; +} + static int rtw_ops_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 ac, const struct ieee80211_tx_queue_params *params) @@ -840,6 +852,7 @@ const struct ieee80211_ops rtw_ops = { .change_interface = rtw_ops_change_interface, .configure_filter = rtw_ops_configure_filter, .bss_info_changed = rtw_ops_bss_info_changed, + .start_ap = rtw_ops_start_ap, .conf_tx = rtw_ops_conf_tx, .sta_add = rtw_ops_sta_add, .sta_remove = rtw_ops_sta_remove,