Search Linux Wireless

Re: [PATCH 10/12] iwlwifi: Add support for getting rf id with blank otp

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Luca Coelho <luca@xxxxxxxxx> writes:

> From: Matti Gottlieb <matti.gottlieb@xxxxxxxxx>
>
> When having a blank OTP the only way to get the rf id
> and the cdb info is from prph registers.
>
> Currently there is some implementation for this, but it
> is located in the wrong place in the code (should be before
> trying to understand what HW is connected and not after),
> and it has a partial implementation.
>
> Signed-off-by: Matti Gottlieb <matti.gottlieb@xxxxxxxxx>
> Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>

[...]

> +/*
> + * struct iwl_crf_chip_id_reg
> + *
> + * type: bits 0-11
> + * reserved: bits 12-18
> + * slave_exist: bit 19
> + * dash: bits 20-23
> + * step: bits 24-26
> + * flavor: bits 27-31
> + */
> +struct iwl_crf_chip_id_reg {
> +	u32 type : 12;
> +	u32 reserved : 7;
> +	u32 slave_exist : 1;
> +	u32 dash : 4;
> +	u32 step : 4;
> +	u32 flavor : 4;
> +};

This doesn't look endian safe.

> +	/* Set CDB capabilities */
> +	if (cdb & BIT(4)) {
> +		iwl_trans->hw_rf_id += BIT(28);
> +		IWL_INFO(iwl_trans, "Adding cdb to rf id\n");
> +	}

Magic numbers.

-- 
https://patchwork.kernel.org/project/linux-wireless/list/

https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux