All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rakesh Pillai" <pillair@codeaurora.org>
To: 'Doug Anderson' <dianders@chromium.org>
Cc: 'Abhishek Kumar' <kuabhs@chromium.org>,
	'Brian Norris' <briannorris@chromium.org>,
	'linux-wireless' <linux-wireless@vger.kernel.org>,
	'LKML' <linux-kernel@vger.kernel.org>,
	'ath10k' <ath10k@lists.infradead.org>,
	'Kalle Valo' <kvalo@codeaurora.org>
Subject: RE: [PATCH] ath10k: add option for chip-id based BDF selection
Date: Tue, 27 Oct 2020 10:47:54 +0530	[thread overview]
Message-ID: <002801d6ac20$89ac4df0$9d04e9d0$@codeaurora.org> (raw)
In-Reply-To: <CAD=FV=X5cVdMq9H+cABHmscZvJpswqGZONjqv7FL8kqRNvuHnQ@mail.gmail.com>



> -----Original Message-----
> From: Doug Anderson <dianders@chromium.org>
> Sent: Tuesday, October 27, 2020 4:21 AM
> To: Rakesh Pillai <pillair@codeaurora.org>
> Cc: Abhishek Kumar <kuabhs@chromium.org>; Kalle Valo
> <kvalo@codeaurora.org>; ath10k <ath10k@lists.infradead.org>; LKML
> <linux-kernel@vger.kernel.org>; linux-wireless <linux-
> wireless@vger.kernel.org>; Brian Norris <briannorris@chromium.org>
> Subject: Re: [PATCH] ath10k: add option for chip-id based BDF selection
> 
> Hi,
> 
> On Sat, Oct 24, 2020 at 9:40 AM Rakesh Pillai <pillair@codeaurora.org> wrote:
> >
> > >         if (bd_ie_type == ATH10K_BD_IE_BOARD) {
> > > +               /* With variant and chip id */
> > >                 ret = ath10k_core_create_board_name(ar, boardname,
> > > -                                                   sizeof(boardname), true);
> > > +                                               sizeof(boardname), true, true);
> >
> > Instead of adding a lot of code to generate a second fallback name, its
> better to just modify the condition inside the function
> “ath10k_core_create_board_name” to allow the generation of BDF tag using
> chip id, even “if ar->id.bdf_ext[0] == '\0 “.
> >
> > This will make sure that the variant string is NULL, and just board-id and
> chip-id is used. This will help avoid most of the code changes.
> > The code would look as shown below
> >
> > @@ -1493,7 +1493,7 @@ static int ath10k_core_create_board_name(struct
> ath10k *ar, char *name,
> >         }
> >
> >         if (ar->id.qmi_ids_valid) {
> > -               if (with_variant && ar->id.bdf_ext[0] != '\0')
> > +               if (with_variant)
> 
> Wouldn't the above just be "if (with_chip_id)" instead?  ...but yeah,
> that would be a cleaner way to do this.  Abhishek: do you want to post
> a v2?


The parameter name passed to this function is "with_variant", since other non-qmi targets (eg QCA6174) use this as a flag to just add the variant field.
This can be renamed to something meaningful for both qmi and non-qmi targets.

> 
> -Doug


_______________________________________________
ath10k mailing list
ath10k@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/ath10k

WARNING: multiple messages have this Message-ID (diff)
From: "Rakesh Pillai" <pillair@codeaurora.org>
To: "'Doug Anderson'" <dianders@chromium.org>
Cc: "'Abhishek Kumar'" <kuabhs@chromium.org>,
	"'Kalle Valo'" <kvalo@codeaurora.org>,
	"'ath10k'" <ath10k@lists.infradead.org>,
	"'LKML'" <linux-kernel@vger.kernel.org>,
	"'linux-wireless'" <linux-wireless@vger.kernel.org>,
	"'Brian Norris'" <briannorris@chromium.org>
Subject: RE: [PATCH] ath10k: add option for chip-id based BDF selection
Date: Tue, 27 Oct 2020 10:47:54 +0530	[thread overview]
Message-ID: <002801d6ac20$89ac4df0$9d04e9d0$@codeaurora.org> (raw)
In-Reply-To: <CAD=FV=X5cVdMq9H+cABHmscZvJpswqGZONjqv7FL8kqRNvuHnQ@mail.gmail.com>



> -----Original Message-----
> From: Doug Anderson <dianders@chromium.org>
> Sent: Tuesday, October 27, 2020 4:21 AM
> To: Rakesh Pillai <pillair@codeaurora.org>
> Cc: Abhishek Kumar <kuabhs@chromium.org>; Kalle Valo
> <kvalo@codeaurora.org>; ath10k <ath10k@lists.infradead.org>; LKML
> <linux-kernel@vger.kernel.org>; linux-wireless <linux-
> wireless@vger.kernel.org>; Brian Norris <briannorris@chromium.org>
> Subject: Re: [PATCH] ath10k: add option for chip-id based BDF selection
> 
> Hi,
> 
> On Sat, Oct 24, 2020 at 9:40 AM Rakesh Pillai <pillair@codeaurora.org> wrote:
> >
> > >         if (bd_ie_type == ATH10K_BD_IE_BOARD) {
> > > +               /* With variant and chip id */
> > >                 ret = ath10k_core_create_board_name(ar, boardname,
> > > -                                                   sizeof(boardname), true);
> > > +                                               sizeof(boardname), true, true);
> >
> > Instead of adding a lot of code to generate a second fallback name, its
> better to just modify the condition inside the function
> “ath10k_core_create_board_name” to allow the generation of BDF tag using
> chip id, even “if ar->id.bdf_ext[0] == '\0 “.
> >
> > This will make sure that the variant string is NULL, and just board-id and
> chip-id is used. This will help avoid most of the code changes.
> > The code would look as shown below
> >
> > @@ -1493,7 +1493,7 @@ static int ath10k_core_create_board_name(struct
> ath10k *ar, char *name,
> >         }
> >
> >         if (ar->id.qmi_ids_valid) {
> > -               if (with_variant && ar->id.bdf_ext[0] != '\0')
> > +               if (with_variant)
> 
> Wouldn't the above just be "if (with_chip_id)" instead?  ...but yeah,
> that would be a cleaner way to do this.  Abhishek: do you want to post
> a v2?


The parameter name passed to this function is "with_variant", since other non-qmi targets (eg QCA6174) use this as a flag to just add the variant field.
This can be renamed to something meaningful for both qmi and non-qmi targets.

> 
> -Doug


  reply	other threads:[~2020-10-27  5:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-20  0:51 [PATCH] ath10k: add option for chip-id based BDF selection Abhishek Kumar
2020-10-20  0:51 ` Abhishek Kumar
2020-10-20 15:35 ` Doug Anderson
2020-10-20 15:35   ` Doug Anderson
2020-10-23 21:13   ` Abhishek Kumar
2020-10-23 21:13     ` Abhishek Kumar
     [not found]   ` <CACTWRwtqcMxZKhDR-Q+3CyOw0Ju=iR+ZMg2pVrHEuzbOUebjOg@mail.gmail.com>
     [not found]     ` <001a01d6aa24$6ceaf390$46c0dab0$@codeaurora.org>
2020-10-26 22:51       ` Doug Anderson
2020-10-26 22:51         ` Doug Anderson
2020-10-27  5:17         ` Rakesh Pillai [this message]
2020-10-27  5:17           ` Rakesh Pillai
2020-10-27 14:56           ` Doug Anderson
2020-10-27 14:56             ` Doug Anderson
2020-10-27 15:11             ` Rakesh Pillai
2020-10-27 15:11               ` Rakesh Pillai
2020-11-06  7:11 ` Kalle Valo
2020-11-06  7:11 ` Kalle Valo
2020-11-10 17:19   ` Abhishek Kumar
2020-11-10 17:19     ` Abhishek Kumar
2020-11-10 17:33     ` Kalle Valo
2020-11-10 17:33       ` Kalle Valo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='002801d6ac20$89ac4df0$9d04e9d0$@codeaurora.org' \
    --to=pillair@codeaurora.org \
    --cc=ath10k@lists.infradead.org \
    --cc=briannorris@chromium.org \
    --cc=dianders@chromium.org \
    --cc=kuabhs@chromium.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.