Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5118112ybi; Tue, 4 Jun 2019 01:21:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxcGKt7YV+pZkql3hxHlD0+dBgPZS56mCKJ8cWDFDhCS6VKvmK/+7dscJXbAJVd1ax6pwvV X-Received: by 2002:aa7:81ca:: with SMTP id c10mr37673042pfn.163.1559636478919; Tue, 04 Jun 2019 01:21:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559636478; cv=none; d=google.com; s=arc-20160816; b=VQRTZCq/KpX8pFepHfF6S3x9C7Jbvv4mcmUftRAXpCdDvfR0yrmlujNCa3P2pYCQtL yhagRwgjqgGCMd0IdfzF6o9xSYk197WenVr+CI330KIR0+XSQbKmpUzlD+vHJJaZ9VF0 0ZG6Wsedexvg7tSlAKLE5LjHZDO9XK8GIsj2Mcil5vyAkXWsL18vHvY+KlY1QbUKf7ft iCfimvj3mOmmjvXaWEqsz25oGUasBkaU/pUdSEo0tLHoKn9CwmIFCezwhlOfW6iIuMPv y2vvFWAj/zuBjYg7MwId04LF3F2iLdL2cYJnrs5qcur79I95l03IGSa3p6qnlbBxQL/A tJgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:authenticated-by; bh=1WGjiMId8D4hNcEvlFUdJldN/3vy+tEXrolnSXbs/S8=; b=ZIcAdoAxXy5ZtZoegqknHO1VJybwaOpZRHs+t/iJ/04lEY/wO7rSPBn8vs7lkkcTLT EDojeknANjv1JBH2HmSCWIlGBRh9Dr5fUSEBktda8qp9gbiayZIpwJw7xUuB72vAJxky x654ess7IJZgNI9fcpTiah/9LLWLlmH0EIWjh2VL5H68NZ/Nuet0GeTgAhAFmcyCZcj2 P+/cDoc9ARQJ6WQiEoRX3rIftlzqbs1L+Agkl8Ws0m7J3VLcSbs5rv2n59rCyUSSOLvx ESgwqPTdKeZwiuNnE2OdRYpaag2JbvF5oOu/ypNUumTY96T3ccpr0fjKS89YwNGV/A+l NS6A== 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 c14si21585417pgd.314.2019.06.04.01.20.53; Tue, 04 Jun 2019 01:21:18 -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 S1726934AbfFDISv convert rfc822-to-8bit (ORCPT + 99 others); Tue, 4 Jun 2019 04:18:51 -0400 Received: from rtits2.realtek.com ([211.75.126.72]:50275 "EHLO rtits2.realtek.com.tw" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726732AbfFDISv (ORCPT ); Tue, 4 Jun 2019 04:18:51 -0400 Authenticated-By: X-SpamFilter-By: BOX Solutions SpamTrap 5.62 with qID x548IaOX019946, 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 x548IaOX019946 (version=TLSv1 cipher=AES256-SHA bits=256 verify=NOT); Tue, 4 Jun 2019 16:18:36 +0800 Received: from RTITMBSVM04.realtek.com.tw ([fe80::e404:880:2ef1:1aa1]) by RTITCASV01.realtek.com.tw ([::1]) with mapi id 14.03.0439.000; Tue, 4 Jun 2019 16:18:35 +0800 From: Tony Chuang To: Joe Perches , "kvalo@codeaurora.org" CC: "linux-wireless@vger.kernel.org" Subject: RE: [PATCH 11/11] rtw88: debug: dump tx power indexes in use Thread-Topic: [PATCH 11/11] rtw88: debug: dump tx power indexes in use Thread-Index: AQHVFfPUdYk/ZiyYCUumG1g5tKAANqaG5yaAgARIvzA= Date: Tue, 4 Jun 2019 08:18:35 +0000 Message-ID: References: <1559116487-5244-1-git-send-email-yhchuang@realtek.com> <1559116487-5244-12-git-send-email-yhchuang@realtek.com> <39d56df83cc8de95969c6ba3003d8101caedc045.camel@perches.com> In-Reply-To: <39d56df83cc8de95969c6ba3003d8101caedc045.camel@perches.com> Accept-Language: zh-TW, en-US Content-Language: zh-TW X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.21.68.183] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org > Subject: Re: [PATCH 11/11] rtw88: debug: dump tx power indexes in use > > On Wed, 2019-05-29 at 15:54 +0800, yhchuang@realtek.com wrote: > > From: Zong-Zhe Yang > > > > Add a read entry in debugfs to dump current tx power > > indexes in use for each path and each rate section. > > The corresponding power bases, power by rate, and > > power limit are also included. > > > > Signed-off-by: Zong-Zhe Yang > > Signed-off-by: Yan-Hsuan Chuang > > --- > > drivers/net/wireless/realtek/rtw88/debug.c | 112 > +++++++++++++++++++++++++++++ > > 1 file changed, 112 insertions(+) > > > > diff --git a/drivers/net/wireless/realtek/rtw88/debug.c > b/drivers/net/wireless/realtek/rtw88/debug.c > > index f0ae260..ee2937c2 100644 > > --- a/drivers/net/wireless/realtek/rtw88/debug.c > > +++ b/drivers/net/wireless/realtek/rtw88/debug.c > > @@ -8,6 +8,7 @@ > > #include "sec.h" > > #include "fw.h" > > #include "debug.h" > > +#include "phy.h" > > > > #ifdef CONFIG_RTW88_DEBUGFS > > > > @@ -460,6 +461,112 @@ static int rtw_debug_get_rf_dump(struct seq_file > *m, void *v) > > return 0; > > } > > > > +static void rtw_print_cck_rate_txt(struct seq_file *m, u8 rate) > > +{ > > + static const char * const > > + cck_rate[] = {"1M", "2M", "5.5M", "11M"}; > > + u8 idx = rate - DESC_RATE1M; > > + > > + seq_printf(m, "%5s%-5s", "CCK_", cck_rate[idx]); > > Why use %5s instead of just embedding the prefix directly? > Also why use %5s at all when the length is 4? > > I think it'd be more sensible as: > > seq_printf(m, " CCK_%-5s", cck_rate[idx]); > Ok, it is better. Will send a v2 later :) Thanks Yan-Hsuan