Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5281566ybh; Wed, 7 Aug 2019 03:41:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwDPPwgH6aUSvroJZmqFGeGb1XBZD0JjVBflDwLJshzz0aZ6Top1atexmioTStu5VzkAACB X-Received: by 2002:a63:2bd2:: with SMTP id r201mr7006398pgr.193.1565174461623; Wed, 07 Aug 2019 03:41:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565174461; cv=none; d=google.com; s=arc-20160816; b=ZjSeCUIQxYbTbHrz7Etb34pDrtMn7oFrFJXnw/MTkr7+daSt/OVR+zXMFuupKaJfZ5 s6CPMweO2tQbOOxn8NBh/4HTqj90uiroCx6kKAtosfDQSydI9ibqaqB52SbFefsp/COp /QnjkmsmuvJY+f2etV5/SUeRkcTQmCzyXdpv66Pe5qyyuAyobOFMQfEaB8GKHESQoB1p wHX5InoovrVA1nxk45JHHbdvXtALs4UN7FuxjamE+9d7xe2Rwq5AZm49qHThNSCx9q3a Q2hMosBOTuwVlfkE2abfWOAcEUljwPBCN+dPuLAL+DwCYbmvDzliqa8woO5sYhb3enh/ ngRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:authenticated-by; bh=eMY+yoHtID08KBEIKrarwVSmpL8rGeLMTWjLYPw0930=; b=rvpO5eU8ot8E7tMaB17K0x6dv2RZvVJk0IeRf0yvfOfSTXrVD4unp4UNx1jCZaahKk k/NXSoln+a127V6ntpC4ZX9FP4YCK2FVEA5KgzVP0WUyHbNhIU8mG7p59MY2FCslsKE6 oLMbiHlLxvvHR5xeapguTH87eJ1a+viGYLZImeQvptZwowC6WXce8jnk71FaIrg2pfoo 3VR4AdRhERBZ3RQ9k8Lzj5sf7qc/+FTD/bkOiFri3mqQuTjq/Ny/gkGlDDluInOrCOsU veGSEQn9wbQloQ+XQsF1msyFCwX/jKqjZZ4mf+lmAft9zpnGfdzxjLYrKTl1TVbXOitN BSYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 15si28316548pgu.98.2019.08.07.03.40.39; Wed, 07 Aug 2019 03:41:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728526AbfHGKk0 (ORCPT + 99 others); Wed, 7 Aug 2019 06:40:26 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:56215 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727498AbfHGKk0 (ORCPT ); Wed, 7 Aug 2019 06:40:26 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x77AeEF1010041, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (RTITCASV01.realtek.com.tw[172.21.6.18]) by rtits2.realtek.com.tw (8.15.2/2.57/5.78) with ESMTPS id x77AeEF1010041 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 7 Aug 2019 18:40:15 +0800 Received: from localhost.localdomain (172.21.68.126) by RTITCASV01.realtek.com.tw (172.21.6.18) with Microsoft SMTP Server id 14.3.439.0; Wed, 7 Aug 2019 18:40:14 +0800 From: To: CC: , , Subject: [PATCH 3/8] rtw88: 8822c: Enable interrupt migration Date: Wed, 7 Aug 2019 18:40:00 +0800 Message-ID: <1565174405-2689-4-git-send-email-yhchuang@realtek.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1565174405-2689-1-git-send-email-yhchuang@realtek.com> References: <1565174405-2689-1-git-send-email-yhchuang@realtek.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [172.21.68.126] Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Tsang-Shian Lin Enable 8822C Tx/Rx interrupt migration. In some platforms, performance test may cause heavy cpu loading and get bad results. Interrupt migration can decrease the amount of interrupts, and lower cpu loading. Signed-off-by: Tsang-Shian Lin Signed-off-by: Yan-Hsuan Chuang --- drivers/net/wireless/realtek/rtw88/reg.h | 2 ++ drivers/net/wireless/realtek/rtw88/rtw8822c.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/drivers/net/wireless/realtek/rtw88/reg.h b/drivers/net/wireless/realtek/rtw88/reg.h index 0bd0717..78ad053 100644 --- a/drivers/net/wireless/realtek/rtw88/reg.h +++ b/drivers/net/wireless/realtek/rtw88/reg.h @@ -193,6 +193,8 @@ #define REG_H2C_READ_ADDR 0x024C #define REG_H2C_INFO 0x0254 +#define REG_INT_MIG 0x0304 + #define REG_FWHW_TXQ_CTRL 0x0420 #define BIT_EN_BCNQ_DL BIT(22) #define BIT_EN_WR_FREE_TAIL BIT(20) diff --git a/drivers/net/wireless/realtek/rtw88/rtw8822c.c b/drivers/net/wireless/realtek/rtw88/rtw8822c.c index b072d43..e11bbc3 100644 --- a/drivers/net/wireless/realtek/rtw88/rtw8822c.c +++ b/drivers/net/wireless/realtek/rtw88/rtw8822c.c @@ -1114,6 +1114,7 @@ static void rtw8822c_phy_set_param(struct rtw_dev *rtwdev) #define WLAN_MAC_OPT_NORM_FUNC1 0x98 #define WLAN_MAC_OPT_LB_FUNC1 0x80 #define WLAN_MAC_OPT_FUNC2 0x30810041 +#define WLAN_MAC_INT_MIG_CFG 0x33330000 #define WLAN_SIFS_CFG (WLAN_SIFS_CCK_CONT_TX | \ (WLAN_SIFS_OFDM_CONT_TX << BIT_SHIFT_SIFS_OFDM_CTX) | \ @@ -1251,6 +1252,9 @@ static int rtw8822c_mac_init(struct rtw_dev *rtwdev) value16 = BIT_SET_RXPSF_ERRTHR(value16, 0x07); rtw_write16(rtwdev, REG_RXPSF_CTRL, value16); + /* Interrupt migration configuration */ + rtw_write32(rtwdev, REG_INT_MIG, WLAN_MAC_INT_MIG_CFG); + return 0; } -- 2.7.4