From patchwork Tue Jun 13 09:51:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Xinming Hu X-Patchwork-Id: 775046 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3wn4tH3bN4z9s7h for ; Tue, 13 Jun 2017 19:56:55 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752853AbdFMJ4n (ORCPT ); Tue, 13 Jun 2017 05:56:43 -0400 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:52379 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751996AbdFMJ4l (ORCPT ); Tue, 13 Jun 2017 05:56:41 -0400 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v5D9o1we022322; Tue, 13 Jun 2017 02:51:11 -0700 Received: from sc-exch04.marvell.com ([199.233.58.184]) by mx0b-0016f401.pphosted.com with ESMTP id 2b2drrg0s8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Tue, 13 Jun 2017 02:51:11 -0700 Received: from SC-EXCH02.marvell.com (10.93.176.82) by SC-EXCH04.marvell.com (10.93.176.84) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 13 Jun 2017 02:51:09 -0700 Received: from SC-EXCH02.marvell.com ([fe80::980b:63cf:b3c0:7c95]) by SC-EXCH02.marvell.com ([fe80::980b:63cf:b3c0:7c95%20]) with mapi id 15.00.1210.000; Tue, 13 Jun 2017 02:51:09 -0700 From: Xinming Hu To: Kalle Valo , Caesar Wang , Zhiyuan Yang , Cathy Luo CC: "amitkarwar@gmail.com" , Nishant Sarmukadam , Ganapathi Bhat , "linux-wireless@vger.kernel.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "briannorris@chromium.org" , "jeffy.chen@rock-chips.com" Subject: Re: Re: [PATCH] mwifiex: fixes the trivial print Thread-Topic: Re: [PATCH] mwifiex: fixes the trivial print Thread-Index: AQHS5CqVUOd61fag4EiNjnPk9NYeZw== Date: Tue, 13 Jun 2017 09:51:09 +0000 Message-ID: <9e123f64d71c466b8a6dc908a51eeb71@SC-EXCH02.marvell.com> References: <1497008411-15223-1-git-send-email-wxt@rock-chips.com> <87poe8pfjs.fsf@purkki.adurom.net> <87mv9c74hn.fsf@kamboji.qca.qualcomm.com> <2eb9e680-64bc-a74d-f224-b6e13dd3b45b@rock-chips.com> <87ink0728l.fsf@kamboji.qca.qualcomm.com> In-Reply-To: <87ink0728l.fsf@kamboji.qca.qualcomm.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.93.176.43] MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-06-13_06:, , signatures=0 X-Proofpoint-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1703280000 definitions=main-1706130175 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Hi Caesar, The original log in google issue tracker show there exist AP in channel 13 after periodically scan. Per my understand, if reg domain is set to US, channel 12/13/14 will not get chance to scan. (test using iw/wpa_supplicant). I am curious about whether there are any diff from upper layer. As a test, you can print the scan channel list, as below: Regards, Simon > -----Original Message----- > From: Kalle Valo [mailto:kvalo@codeaurora.org] > Sent: 2017年6月13日 15:53 > To: Caesar Wang > Cc: amitkarwar@gmail.com; Xinming Hu; Nishant Sarmukadam; Ganapathi > Bhat; linux-wireless@vger.kernel.org; netdev@vger.kernel.org; > linux-kernel@vger.kernel.org; briannorris@chromium.org; > jeffy.chen@rock-chips.com > Subject: [EXT] Re: [PATCH] mwifiex: fixes the trivial print > > External Email > > ---------------------------------------------------------------------- > Caesar Wang writes: > > > 在 2017年06月13日 15:04, Kalle Valo 写道: > >> Caesar Wang writes: > >> > >>> Kalle, > >>> > >>> 在 2017年06月13日 14:28, Kalle Valo 写道: > >>>> Caesar Wang writes: > >>>> > >>>>> We have always met the unused log be printed as following. > >>>>> > >>>>> ... > >>>>> [23193.523182] mwifiex_pcie 0000:01:00.0: mwifiex_get_cfp: > >>>>> cannot find cfp by band 2 & channel=13 freq=0 > >>>>> [23378.633684] mwifiex_pcie 0000:01:00.0: mwifiex_get_cfp: > >>>>> cannot find cfp by band 2 & channel=13 freq=0 > >>>>> > >>>>> Maybe that's related to wifi regdom, since wifi default area was > >>>>> US and didn't support 12~14 channels. > >>>>> > >>>>> As Frequencies: > >>>>> * 2412 MHz [1] (30.0 dBm) > >>>>> * 2417 MHz [2] (30.0 dBm) > >>>>> * 2422 MHz [3] (30.0 dBm) > >>>>> * 2427 MHz [4] (30.0 dBm) > >>>>> * 2432 MHz [5] (30.0 dBm) > >>>>> * 2437 MHz [6] (30.0 dBm) > >>>>> * 2442 MHz [7] (30.0 dBm) > >>>>> * 2447 MHz [8] (30.0 dBm) > >>>>> * 2452 MHz [9] (30.0 dBm) > >>>>> * 2457 MHz [10] (30.0 dBm) > >>>>> * 2462 MHz [11] (30.0 dBm) > >>>>> * 2467 MHz [12] (disabled) > >>>>> * 2472 MHz [13] (disabled) > >>>>> * 2484 MHz [14] (disabled) > >>>>> > >>>>> Signed-off-by: Caesar Wang > >>>>> --- > >>>>> > >>>>> drivers/net/wireless/marvell/mwifiex/cfp.c | 2 +- > >>>>> 1 file changed, 1 insertion(+), 1 deletion(-) > >>>>> > >>>>> diff --git a/drivers/net/wireless/marvell/mwifiex/cfp.c > >>>>> b/drivers/net/wireless/marvell/mwifiex/cfp.c > >>>>> index 1ff2205..6e29943 100644 > >>>>> --- a/drivers/net/wireless/marvell/mwifiex/cfp.c > >>>>> +++ b/drivers/net/wireless/marvell/mwifiex/cfp.c > >>>>> @@ -350,7 +350,7 @@ mwifiex_get_cfp(struct mwifiex_private *priv, u8 > band, u16 channel, u32 freq) > >>>>> } > >>>>> } > >>>>> if (i == sband->n_channels) { > >>>>> - mwifiex_dbg(priv->adapter, ERROR, > >>>>> + mwifiex_dbg(priv->adapter, WARN, > >>>>> "%s: cannot find cfp by band %d\t" > >>>>> "& channel=%d freq=%d\n", > >>>>> __func__, band, channel, freq); > >>>> I don't see how this fixes anything, care to explain? And the title > >>>> is quite vague. > >>> Sorry for the description maybe unclear. > >>> I'm assuming the print log is expected for marvel wifi driver. Do we > >>> should use 'WARN' to instead of the 'ERROR' here. > >> But does that make any functional difference, isn't the warning still > >> printed? > >> > > > > At least, that shouldn't be printed log by default. :) > > > > if I read the code is correct. That only the MSG/FATAL/ERROR will > > output by default. > > > > /** > > *enum mwifiex_debug_level - marvell wifi debug level */ enum > > MWIFIEX_DEBUG_LEVEL { > > MWIFIEX_DBG_MSG = 0x00000001, > > MWIFIEX_DBG_FATAL = 0x00000002, > > MWIFIEX_DBG_ERROR = 0x00000004, > > MWIFIEX_DBG_DATA = 0x00000008, > > MWIFIEX_DBG_CMD = 0x00000010, > > MWIFIEX_DBG_EVENT = 0x00000020, > > MWIFIEX_DBG_INTR = 0x00000040, > > MWIFIEX_DBG_IOCTL = 0x00000080, > > > > MWIFIEX_DBG_MPA_D = 0x00008000, > > MWIFIEX_DBG_DAT_D = 0x00010000, > > MWIFIEX_DBG_CMD_D = 0x00020000, > > MWIFIEX_DBG_EVT_D = 0x00040000, > > MWIFIEX_DBG_FW_D = 0x00080000, > > MWIFIEX_DBG_IF_D = 0x00100000, > > > > MWIFIEX_DBG_ENTRY = 0x10000000, > > MWIFIEX_DBG_WARN = 0x20000000, > > MWIFIEX_DBG_INFO = 0x40000000, > > MWIFIEX_DBG_DUMP = 0x80000000, > > > > MWIFIEX_DBG_ANY = 0xffffffff > > }; > > > > #define MWIFIEX_DEFAULT_DEBUG_MASK (MWIFIEX_DBG_MSG | \ > > MWIFIEX_DBG_FATAL | \ > > MWIFIEX_DBG_ERROR) > > Heh, makes more sense now :) But you still should improve the title and > explain in the commit log that WARN level is not printed by default. > > But before you submit v2 let's wait what Marvell says about this. > > -- > Kalle Valo diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c b/drivers/net/wireless/marvell/mwifiex/cfg80211.c index a7593aa..a289818 100644 --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c @@ -2572,6 +2572,7 @@ static int mwifiex_set_ibss_params(struct mwifiex_private *priv, MWIFIEX_USER_SCAN_CHAN_MAX); i++) { chan = request->channels[i]; user_scan_cfg->chan_list[i].chan_number = chan->hw_value; + pr_err("chan->hw_value = %d", chan->hw_value); user_scan_cfg->chan_list[i].radio_type = chan->band; if ((chan->flags & IEEE80211_CHAN_NO_IR) || !request->n_ssids)