[PATCH 1/6] Move fw version check into a function

Kalle Valo kvalo at qca.qualcomm.com
Tue Aug 6 04:00:50 EDT 2013


Eugene Krasnikov <k.eugene.e at gmail.com> writes:

> This will make code more readable.
>
> Signed-off-by: Eugene Krasnikov <k.eugene.e at gmail.com>

[...]

> +static inline bool is_old_fw_version(struct wcn36xx *wcn)
> +{
> +	/*
> +	 * FW version 1.2.2.24 is old and does not support all functionality.
> +	 * HAL interface also differs e.g. wcn36xx_hal_config_sta_params and
> +	 * wcn36xx_hal_config_sta_params_v1 where v1 is for newer version.
> +	 */
> +	return (wcn->fw_major <= 1 &&
> +		wcn->fw_minor <= 2 &&
> +		wcn->fw_version <= 2 &&
> +		wcn->fw_revision <= 24);
> +}

I was thinking more like this:

static inline bool wcn36xx_is_fw_older(struct wcn36xx *wcn, int major,
                        int minor, int version, revision)

So that we can reuse the function everywhere we check the version.

-- 
Kalle Valo



More information about the wcn36xx mailing list