ATH10K Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@qca.qualcomm.com>
To: Bartosz Markowski <bartosz.markowski@tieto.com>
Cc: linux-wireless@vger.kernel.org, ath10k@lists.infradead.org
Subject: Re: [PATCH 09/13] ath10k: split wmi_cmd_init path
Date: Thu, 26 Sep 2013 11:15:16 +0300	[thread overview]
Message-ID: <87siwsrobv.fsf@kamboji.qca.qualcomm.com> (raw)
In-Reply-To: <1380101891-18312-10-git-send-email-bartosz.markowski@tieto.com> (Bartosz Markowski's message of "Wed, 25 Sep 2013 11:38:07 +0200")

Bartosz Markowski <bartosz.markowski@tieto.com> writes:

> Due to API differences in initialization structures for
> main and 10.x firmwares we need to split the wmi_init_cmd
> and wmi_resource_config  structures.
>
> This will be usefull also when setting the correct TARGET values,
> like: number of peers, vdevs, pdevs etc.
>
> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
> ---
>  drivers/net/wireless/ath/ath10k/core.c |    6 +-
>  drivers/net/wireless/ath/ath10k/wmi.c  |   91 +++++++++++++++
>  drivers/net/wireless/ath/ath10k/wmi.h  |  196 ++++++++++++++++++++++++++++++++
>  3 files changed, 292 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
> index 31860a6..3a56715 100644
> --- a/drivers/net/wireless/ath/ath10k/core.c
> +++ b/drivers/net/wireless/ath/ath10k/core.c
> @@ -595,7 +595,11 @@ int ath10k_core_start(struct ath10k *ar)
>  
>  	ath10k_info("firmware %s booted\n", ar->hw->wiphy->fw_version);
>  
> -	status = ath10k_wmi_cmd_init(ar);
> +	if (test_bit(ATH10K_FW_FEATURE_10X, ar->fw_features))
> +		status = ath10k_wmi_10x_cmd_init(ar);
> +	else
> +		status = ath10k_wmi_cmd_init(ar);

It's better to hide the feature check inside ath10k_wmi_cmd_init() and
then that function can just call ath10k_wmi_10x_cmd_init() or
ath10k_wmi_main_cmd_init() (or whatever naming would be approriate
here). So we only expose ath10k_wmi_cmd_init() outside of wmi.c.

-- 
Kalle Valo

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

  reply	other threads:[~2013-09-26  8:15 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25  9:37 [PATCH 00/13] ath10k: dual-firmware support (MAIN and 10.X) Bartosz Markowski
2013-09-25  9:37 ` [PATCH 01/13] ath10k: introduce dynamic WMI structures Bartosz Markowski
2013-09-25 10:38   ` Michal Kazior
2013-09-26  8:12   ` Kalle Valo
2013-09-26  8:54   ` Kalle Valo
2013-09-26  9:03     ` Michal Kazior
2013-09-26  9:07       ` Kalle Valo
2013-09-25  9:38 ` [PATCH 02/13] ath10k: add wmi_10x_<cmd/event> definitions Bartosz Markowski
2013-09-25  9:38 ` [PATCH 03/13] ath10k: warn if give WMI command is not supported Bartosz Markowski
2013-09-25  9:38 ` [PATCH 04/13] ath10k: implement WMI events handling frame for both firmwares Bartosz Markowski
2013-09-25  9:38 ` [PATCH 05/13] ath10k: split ath10k_wmi_service_ready_event_rx Bartosz Markowski
2013-09-25  9:38 ` [PATCH 06/13] ath10k: drop the fw versioning sanity check Bartosz Markowski
2013-09-25  9:38 ` [PATCH 07/13] ath10k: implement host memory chunks Bartosz Markowski
2013-09-26  9:04   ` Kalle Valo
2013-09-25  9:38 ` [PATCH 08/13] ath10k: bring back the WMI path for mgmt frames Bartosz Markowski
2013-09-25 10:46   ` Michal Kazior
2013-09-25  9:38 ` [PATCH 09/13] ath10k: split wmi_cmd_init path Bartosz Markowski
2013-09-26  8:15   ` Kalle Valo [this message]
2013-09-25  9:38 ` [PATCH 10/13] ath10k: add TARGET values for 10.x firmware Bartosz Markowski
2013-09-25  9:38 ` [PATCH 11/13] ath10k: introduce dynamic vdev parameters Bartosz Markowski
2013-09-25 10:38   ` Michal Kazior
2013-09-25  9:38 ` [PATCH 12/13] ath10k: introduce dynamic pdev parameters Bartosz Markowski
2013-09-25 10:39   ` Michal Kazior
2013-09-25  9:38 ` [PATCH 13/13] ath10k: handle FW API differences for scan structures Bartosz Markowski

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=87siwsrobv.fsf@kamboji.qca.qualcomm.com \
    --to=kvalo@qca.qualcomm.com \
    --cc=ath10k@lists.infradead.org \
    --cc=bartosz.markowski@tieto.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox