linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kalle Valo <kvalo@codeaurora.org>
To: Luca Coelho <luca@coelho.fi>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [PATCH 10/12] iwlwifi: Add support for getting rf id with blank otp
Date: Sat, 21 Aug 2021 17:07:53 +0300	[thread overview]
Message-ID: <87tujisxfq.fsf@codeaurora.org> (raw)
In-Reply-To: <iwlwifi.20210820140104.8f8ce6f25ecd.Iec9b2e2615ce65e6aff5ce896589227a7030f4cf@changeid> (Luca Coelho's message of "Fri, 20 Aug 2021 14:03:16 +0300")

Luca Coelho <luca@coelho.fi> writes:

> From: Matti Gottlieb <matti.gottlieb@intel.com>
>
> 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@intel.com>
> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>

[...]

> +/*
> + * 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

  reply	other threads:[~2021-08-21 14:08 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-20 11:03 [PATCH 00/13] iwlwifi: updates intended for v5.15 2021-08-20 Luca Coelho
2021-08-20 11:03 ` [PATCH 01/12] iwlwifi: mvm: add support for range request command version 13 Luca Coelho
2021-08-20 11:03 ` [PATCH 02/12] iwlwifi: mvm: add support for resonder config command version 9 Luca Coelho
2021-08-21 14:01   ` Kalle Valo
2021-08-23  8:51     ` Luca Coelho
2021-08-20 11:03 ` [PATCH 03/12] iwlwifi: move get pnvm file name to a separate function Luca Coelho
2021-08-20 11:03 ` [PATCH 04/12] iwlwifi: mvm: introduce iwl_stored_beacon_notif_v3 Luca Coelho
2021-08-20 11:03 ` [PATCH 05/12] iwlwifi: mvm: support broadcast TWT alone Luca Coelho
2021-08-20 11:03 ` [PATCH 06/12] iwlwifi: mvm: Fix scan channel flags settings Luca Coelho
2021-08-20 11:03 ` [PATCH 07/12] iwlwifi: mvm: don't use FW key ID in beacon protection Luca Coelho
2021-08-20 11:03 ` [PATCH 08/12] iwlwifi: export DHC framework and add first public entry, twt_setup Luca Coelho
2021-08-21 14:04   ` Kalle Valo
2021-08-23  8:57     ` Luca Coelho
2021-08-26 11:26       ` Luca Coelho
2021-10-18  7:51       ` Kalle Valo
2021-10-22  6:28         ` Luca Coelho
2021-08-20 11:03 ` [PATCH 09/12] iwlwifi: mvm: add fixed_rate debugfs entry to public DHC Luca Coelho
2021-08-20 11:03 ` [PATCH 10/12] iwlwifi: Add support for getting rf id with blank otp Luca Coelho
2021-08-21 14:07   ` Kalle Valo [this message]
2021-08-26 11:30     ` Luca Coelho
2021-08-26 11:45       ` Luca Coelho
2021-08-29 11:27         ` Kalle Valo
2021-08-20 11:03 ` [PATCH 11/12] iwlwifi: Add support for more BZ HWs Luca Coelho
2021-08-20 11:03 ` [PATCH 12/12] iwlwifi: Start scratch debug register for Bz family Luca Coelho

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=87tujisxfq.fsf@codeaurora.org \
    --to=kvalo@codeaurora.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=luca@coelho.fi \
    /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;
as well as URLs for NNTP newsgroup(s).