Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1550232ybn; Wed, 2 Oct 2019 18:34:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKnOmZYxuPG7kpdV8iwIdXE7NTjM8q+pqnWxoNcoyfD6XHoacQuHBZW7ZBqCCxsYkxGt0i X-Received: by 2002:a17:906:5fc4:: with SMTP id k4mr5769396ejv.300.1570066452851; Wed, 02 Oct 2019 18:34:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570066452; cv=none; d=google.com; s=arc-20160816; b=FFMlg8eDHpp41H2BEARq9hCcLsuWs+uY3lkzeC/Dsx5fa3q0VQFC3piib1FgC1Vs67 5SZHEhacUKC9mfwe1GgGsjW5dYy0otUm5Qekv1tiIV4ddeqOXxUMBQgr1Yma+WnCl9vV Lk794Vzzyetgl3ofB8v+bYBWGxxRwWv442L24Z1POQohum/8uFiZzGLZsw6Z5Kk7HlkL x0iCbNepq6pGDXZ5bqprPHREnIh1r6Hro2vSgOIs4PF4/2sNNQ9+8cA06CQsWmSOM2oL DTcV2Oi0n99VlwxSeBWvgmRFvIAlbtw4Sp7wG8BNbQ6G5sP+6zTOqIXD8T33VYpshSXY UjrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=ZWwUSoBB6gPOq9lnD1cBoM5LQLFJ2M8ddN6o2uZdkWw=; b=qETGEoJlzu+3r71ykX2sfk3/xp3QGIR59IxhzuCjNnXK3uXcPIaXfldfOiFdqYeauP b8nGPSqx8JOQEAby+5ET9yrMsS58wmlmay1QUTMjuWBnlpvZBFjtiV+o7+URZsmybNIZ m4aazu9banpNwyOrHDGd6u1N5pugCqEHGox3FQZGl6ycDLvWjaZ3ve4c0I8EruXyd9hM z/JkxjH2wl3X+xWygGRWBexjdtf2hxwIu6o0V1N3f7GvljU5i/Np0x+DZkbgGHZGn5DR 4vBBmy8NCAEgnpvyGOEv81HGNGNNdsl6mjMo0ekYuN6xEQ/W8kMMRRfjgxgTNIdwpXZS wvRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=TtbR+j7b; 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 f33si535718edb.281.2019.10.02.18.33.31; Wed, 02 Oct 2019 18:34:12 -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; dkim=pass header.i=@endlessm-com.20150623.gappssmtp.com header.s=20150623 header.b=TtbR+j7b; 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 S1726902AbfJCBT2 (ORCPT + 99 others); Wed, 2 Oct 2019 21:19:28 -0400 Received: from mail-qk1-f196.google.com ([209.85.222.196]:40280 "EHLO mail-qk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726864AbfJCBT2 (ORCPT ); Wed, 2 Oct 2019 21:19:28 -0400 Received: by mail-qk1-f196.google.com with SMTP id y144so693536qkb.7 for ; Wed, 02 Oct 2019 18:19:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=endlessm-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZWwUSoBB6gPOq9lnD1cBoM5LQLFJ2M8ddN6o2uZdkWw=; b=TtbR+j7bCceltYjMDybfhgl9NBDRpqKI3x9SzVu/Ck1CYDrWFvuQccT0+GXkXC/d3d s3pS8/a52lZ8olBRj5vpC7LeStougDvvJUaSvC5JtY2ceNHlQPCSEWme0wVvVSFbTLhb 1oNkIhnkAb/w46tA+MCBLJXnsRQ5uqRBUzqEe9gmIHcq0yWjZKJTwJgnvpXK5CBUICiC 84Ayn8J42A8zg63ElSrwspKODJTWwu4/4I4xAuyI+aPJcanmFvcUqKdHkj3zYw2t4EyC NNIp2CCXK4jszQ4YYKsAIcNdV43r6aMefhLFxIySOsGm8U1YaVPUmt/cGBGMee0/iwTP 0kdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ZWwUSoBB6gPOq9lnD1cBoM5LQLFJ2M8ddN6o2uZdkWw=; b=lwiv1+vpZ57CMmc85J+WPjyUX30YJ6uTgrzOmASYEGsv1r/NgzIjSgif+j24sAg9JL /vDvHSHXpVUUY2JWnoykoa+ioTEf/sa1u2PUnDbcypmJD0ut0UtXIZ4UqSGRY4H9DthN p16uCcNMx+Yf6v8A0vp5GjRh+r4TheOG/mXGOdMFYrq/2rQudEKnG2ONk7pV7QQAo74I yTLacIR73TupmXcAhjNBoM5YYhH2X3iHsXKDMqq0vQh07b27tnorpuEMbgn8g1PAGL/S 2A5/bYXTnWwUvVGvd7lSYVUBDoKmagc1NPpYB1cCw6xMsb6iCNF50SY5qeskkEQCo09K BR3Q== X-Gm-Message-State: APjAAAWNy1B3V+IL33QzA4VCX6mtYvZxfXTdlrT9/oBjLJBM3zNESM4h rFLObacVcm2vWRRyf0wsM46oManNetT9QQyc4MSOwb/V2Zs= X-Received: by 2002:a05:620a:5ad:: with SMTP id q13mr1877015qkq.297.1570065566949; Wed, 02 Oct 2019 18:19:26 -0700 (PDT) MIME-Version: 1.0 References: <20190911025045.20918-1-chiu@endlessm.com> <0c049f46-fb15-693e-affe-a84ea759b5d7@gmail.com> In-Reply-To: <0c049f46-fb15-693e-affe-a84ea759b5d7@gmail.com> From: Chris Chiu Date: Thu, 3 Oct 2019 09:19:15 +0800 Message-ID: Subject: Re: [PATCH v2] rtl8xxxu: add bluetooth co-existence support for single antenna To: Jes Sorensen Cc: Kalle Valo , David Miller , linux-wireless , netdev , Linux Kernel , Linux Upstreaming Team Content-Type: text/plain; charset="UTF-8" Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Wed, Oct 2, 2019 at 11:04 PM Jes Sorensen wrote: > > > In general I think it looks good! One nit below: > > Sorry I have been traveling for the last three weeks, so just catching up. > > > > +void rtl8723bu_set_coex_with_type(struct rtl8xxxu_priv *priv, u8 type) > > +{ > > + switch (type) { > > + case 0: > > + rtl8xxxu_write32(priv, REG_BT_COEX_TABLE1, 0x55555555); > > + rtl8xxxu_write32(priv, REG_BT_COEX_TABLE2, 0x55555555); > > + rtl8xxxu_write32(priv, REG_BT_COEX_TABLE3, 0x00ffffff); > > + rtl8xxxu_write8(priv, REG_BT_COEX_TABLE4, 0x03); > > + break; > > + case 1: > > + case 3: > > The one item here, I would prefer introducing some defined types to > avoid the hard coded type numbers. It's much easier to read and debug > when named. > Honestly, I also thought of that but there's no meaningful description for these numbers in the vendor driver. Even based on where they're invoked, I can merely give a rough definition on 0. So I left it as it is for the covenience if I have to do cross-comparison with vendor driver in the future for some possible unknown bugs. > If you shortened the name of the function to rtl8723bu_set_coex() you > won't have problems with line lengths at the calling point. > I think the rtl8723bu_set_ps_tdma() function would cause the line length problem more than rtl8723bu_set_coex_with_type() at the calling point. But as the same debug reason as mentioned, I may like to keep it because I don't know how to categorize the 5 magic parameters. I also reference the latest rtw88 driver code, it seems no better solution so far. I'll keep watching if there's any better idea. Chris