[PATCH 09/13] ath10k: split wmi_cmd_init path
Kalle Valo
kvalo at qca.qualcomm.com
Thu Sep 26 04:15:16 EDT 2013
Bartosz Markowski <bartosz.markowski at 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 at 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
More information about the ath10k
mailing list