From patchwork Thu Apr 21 07:03:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AceLan Kao X-Patchwork-Id: 1619992 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=RJv9Yw0X; 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 4KkT6D2vbnz9sDX for ; Thu, 21 Apr 2022 17:03:48 +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 1nhQqq-0000os-BX; Thu, 21 Apr 2022 07:03:40 +0000 Received: from mail-pj1-f50.google.com ([209.85.216.50]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nhQqf-0000Tv-1U for kernel-team@lists.ubuntu.com; Thu, 21 Apr 2022 07:03:29 +0000 Received: by mail-pj1-f50.google.com with SMTP id j8-20020a17090a060800b001cd4fb60dccso4333775pjj.2 for ; Thu, 21 Apr 2022 00:03:26 -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=SfNRS5W1k8dnUPbHJX7dWgSPd8gSHpSLtbNnd9xU9m8=; b=RJv9Yw0XwywK0YzAzNI2hWhOVl8AGcHpGeWQ3tG3ZuXqfH8DIxYICvORVtrEXhkLCr FCguypN+lbgQ3beps4tJZLxILoj+CJmuJa2moj5rpwuUsFrPCpkFhsxSKe2KGr23Edrs AcSEijoDurQtYVkLBUGOErBTa+XheWoRJXkFSGqZuhu5dbmuVUVLfL1S/hMb1jOQQVC6 OwHMG5aAQu5CnauMTanVRQ4ywKIgmEo65ij/fmHpabKQrkn90mcL434C1/uzcQKCXRD7 ftB8ng/rfSydlc/6yQqymH1cEl35td+24fm3C9t75ukeqggNtwrTQeE2/Ri7dMpKNLOy 9cyg== 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=SfNRS5W1k8dnUPbHJX7dWgSPd8gSHpSLtbNnd9xU9m8=; b=UG722GJERcudtwTN/PIKKl62YqChx4YIGefWujsqNNn3KEoz+CLGOLZRzsRthkS5Xc zEiLll4Bobmvi4Sr1kYDETsK2lY+z03cGpoqgvM77VKJjH8Xlorhz2zBO4FdUd7c63YN NdvaP7HujqxN5R/dNPB7kiSgMFMyjfdLEV0UwRHrlErKM3WYFXLBULzcrNZ+vb8jSNW3 8oHNJNrI+fleuDb0P+cKRVG1LtN7M+XNkIZu8VRRvR4ZwAUADmZgNDeS+zKU9nC2rasI TIt6sJrp9pB+gFKyTY++wQOojTraf3fMu3UTaahxlUcL1wGbcaYEO0avo8yIXSfRxZN8 NftQ== X-Gm-Message-State: AOAM531MjCOpI7/ZHemVxuhu0mqnT9jjP0BREtcPlf++K3ANOiHG7sO9 wlzMgh04U8HzoxTlOAKc+iB1Lkrxnek= X-Google-Smtp-Source: ABdhPJzYRLZP+05uQYooeUEoWPCYX2cqnO7wXaPbFiXP18SHEzFvO+TQemIW/i1asPMZoaMHfElMDA== X-Received: by 2002:a17:90b:390b:b0:1d6:b448:b26f with SMTP id ob11-20020a17090b390b00b001d6b448b26fmr740511pjb.61.1650524604590; Thu, 21 Apr 2022 00:03:24 -0700 (PDT) Received: from localhost (220-135-95-34.hinet-ip.hinet.net. [220.135.95.34]) by smtp.gmail.com with ESMTPSA id w123-20020a623081000000b005056a4d71e3sm22163569pfw.77.2022.04.21.00.03.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Apr 2022 00:03:24 -0700 (PDT) From: AceLan Kao To: kernel-team@lists.ubuntu.com Subject: [PATCH 5/6][SRU][OEM-5.17] rtw88: do PHY calibration while starting AP Date: Thu, 21 Apr 2022 15:03:01 +0800 Message-Id: <20220421070302.11579-11-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.50; envelope-from=acelan@gmail.com; helo=mail-pj1-f50.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) 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 c4b79cded7b5..b6ff0d3e8eba 100644 --- a/drivers/net/wireless/realtek/rtw88/mac80211.c +++ b/drivers/net/wireless/realtek/rtw88/mac80211.c @@ -426,6 +426,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) @@ -883,6 +895,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,