History log of /linux-master/drivers/net/wireless/intel/iwlwifi/fw/pnvm.c
Revision Date Author Comments
# 38a3241f 06-Feb-2024 Johannes Berg <johannes.berg@intel.com>

wifi: iwlwifi: fw: allow vmalloc for PNVM image

This image can be pretty big (I've seen order-7 allocations!),
and we later have to copy it to DMA memory (in newer FW even
there it won't need to be contiguous), so we can easily deal
with it being in vmalloc. Use kvmemdup()/kvfree() for it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240206175739.9b4c06b5d533.Idf699b36ec95ee36f530355cd2cb1da297a098f1@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# c868a189 31-Jan-2024 Miri Korenblit <miriam.rachel.korenblit@intel.com>

wifi: iwlwifi: read BIOS PNVM only for non-Intel SKU

The driver is supposed to read the PNVM from BIOS only for non-Intel
SKUs. For Intel SKUs the OEM ID will be 0.
Read BIOS PNVM only when a non-Intel SKU is indicated.

Fixes: b99e32cbfdf6 ("wifi: iwlwifi: Take loading and setting of pnvm image out of parsing part")
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://msgid.link/20240131091413.3625cf1223d3.Ieffda5f506713b1c979388dd7a0e1c1a0145cfca@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 099a47db 23-Jan-2024 Mukesh Sisodiya <mukesh.sisodiya@intel.com>

wifi: iwlwifi: Add support for new 802.11be device

Add support for the new 802.11be device with limites capabilities:
- 320 MHz isn't supported
- MCSs 12 and 13 are not supported

Signed-off-by: Mukesh Sisodiya <mukesh.sisodiya@intel.com>
Reviewed-by: Gregory Greenman <gregory.greenman@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://msgid.link/20240123200528.8529bd2acedf.I25dccb7bbeb21b8df2123fad51dde7fcf137a508@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 372a7148 06-Jun-2023 Gregory Greenman <gregory.greenman@intel.com>

wifi: iwlwifi: pnvm: handle memory descriptor tlv

When PNVM is obtained from UEFI, there's an additional memory
descriptor TLV that has to be handled. It is the same TLV that
holds data in the reduced power tables. Also, in this TLV, the
actual data is located after address and size, so add the
corresponding offset.

Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230606103519.8c5f5ee8e30b.Id1893c9dec140b5ba4abe8a121c2e1a1d121d2d7@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 875d035f 06-Jun-2023 Johannes Berg <johannes.berg@intel.com>

wifi: iwlwifi: fw: clean up PNVM loading code

This code is a bit of a maze of gotos etc. Clean up the
code a bit to make the intent clearer.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230606103519.51fb5ee63f21.I20f270b2d47612e84643dc235c2940b8d9ed9930@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 380bf72d 06-Jun-2023 Alon Giladi <alon.giladi@intel.com>

wifi: iwlwifi: Separate reading and parsing of reduce power table

It enables to better handle error cases. Also save the image till the
end of the loading and only then free it.

Signed-off-by: Alon Giladi <alon.giladi@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230606103519.71e3b3e0e794.Ifbe69ad99a7e805eb70e09280365821eb146b1c9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 7c9c8477 06-Jun-2023 Alon Giladi <alon.giladi@intel.com>

wifi: iwlwifi: Enable loading of reduce-power tables into several segments

Replace the field reduce_power_dram with a struct that holds data about
the reduced-power tables drams regions. Generalize load_payloads_segments()
to work for both pnvm tables and reduction power tables.
Make required adjustments in the data structures.

Signed-off-by: Alon Giladi <alon.giladi@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230606103519.6fe66958f049.I85d80682229fc02fe354462cc9da40937558f30c@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# ea3571f4 06-Jun-2023 Alon Giladi <alon.giladi@intel.com>

wifi: iwlwifi: Use iwl_pnvm_image in reduce power tables flow

Generalize the parsing, loading, and setting of the power-reduce
tables, in order to support allocation of several DRAM payloads
in the future.

Signed-off-by: Alon Giladi <alon.giladi@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230606103519.564f1eead99b.Iaba653b21dc09aafc72b9bbb3928abddce0db50a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# c738fb61 06-Jun-2023 Alon Giladi <alon.giladi@intel.com>

wifi: iwlwifi: Separate loading and setting of power reduce tables

Take the part that copies the tables into DRAM, out of the method
that sets the prph_scratch to make the code cleaner. Each of the
operations will get more complex in the future when it will also
support larger power-reduce tables images.

Signed-off-by: Alon Giladi <alon.giladi@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230606103519.7695684dc848.I13626cd318e5d68efec9618b2045f52788bff114@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 33182810 06-Jun-2023 Alon Giladi <alon.giladi@intel.com>

wifi: iwlwifi: Add support for fragmented pnvm images

Add support for fragmented pnvm images, depending on the FW capability.

Signed-off-by: Alon Giladi <alon.giladi@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230606103519.c49bfaf435a9.I0278312e7c3355b224cd870d4f8cf6578d12f03e@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# b99e32cb 06-Jun-2023 Alon Giladi <alon.giladi@intel.com>

wifi: iwlwifi: Take loading and setting of pnvm image out of parsing part

Change iwl_pnvm_parse so it will only save the information into the
iwl_pnvm_image struct. This enables to use the parsing code for the
power reduce tables in the future.

Signed-off-by: Alon Giladi <alon.giladi@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230606103519.504b42fc1611.I4ddf6ad76d922d118fcbcc4f0e9ec003753d0b75@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 194d1f84 06-Jun-2023 Alon Giladi <alon.giladi@intel.com>

wifi: iwlwifi: Separate loading and setting of pnvm image into two functions

Take the part that is copying the pnvm image into DRAM, out of the
the method that sets the prph_scratch. Makes the code cleaner since
those 2 operations don't always happen together (loading should happen
only once while setting can happen more than once).
In addition, each operation will get more complex in the future when
it will support also larger pnvm images.

Signed-off-by: Alon Giladi <alon.giladi@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230606103519.4c0728239fd6.Ibc30a9fbdb6123dadbe2dbb89318dbd5ec01080a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 5f408503 06-Jun-2023 Alon Giladi <alon.giladi@intel.com>

wifi: iwlwifi: Generalize the parsing of the pnvm image

Generalize iwl_pnvm_parse(). This saves us from copying each payload
twice (first in the parsing and later when copying it to the dram).
Moreover, its more compatible for handling larger pnvm tables in
the future (in which payloads won't be concatenated).

The main changes are:

1. Take out the concatenating of the payloads from the parsing level
2. Start using iwl_pnvm_image structure that will hold pointers to
payloads that should be delivered to fw, their sizes and number.

Signed-off-by: Alon Giladi <alon.giladi@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230606103519.06c02f380b6f.I03a3030fca194aa0c4bc2ecd18531f8914e98cfd@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 8f55564c 14-Mar-2023 Johannes Berg <johannes.berg@intel.com>

wifi: iwlwifi: fw: pnvm: fix uefi reduced TX power loading

There are a number of issues here:
* if trans->reduce_power_loaded is already true, we call
iwl_trans_set_reduce_power() with an uninitialized len
value
* in this case we also clobber a previous load/setting
* if iwl_uefi_get_reduced_power() returns an ERR_PTR() we
try to kfree() it

Move the iwl_trans_set_reduce_power() call into the success
case only to fix these issues.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Gregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230314194113.aa2cf2281f5d.I33b4ab3427f1921c184c52fecd0f46781a89dc8a@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>


# 86e8e657 28-Jan-2022 Johannes Berg <johannes.berg@intel.com>

iwlwifi: fix various more -Wcast-qual warnings

When enabling W=3 that gets us -Wcast-qual, fix those warnings
in the code and propagate constness properly, or cast it away
via (uintptr_t) where really needed.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220128153014.4ac2f19c121e.Ied9469d93f8199206242bfba96e4e8d1949e3a08@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# 73c289ba 28-Jan-2022 Bjoern A. Zeeb <bz@FreeBSD.ORG>

iwlwifi: propagate (const) type qualifier

Most of this change is a continuation of commit 403ea939ea6a
("iwlwifi: dbg: Mark ucode tlv data as const") propagating the
(const) type qualifier for ucode based tlv data to avoid having
the impression that it is writeable.
The other part of the change preserves the (const) type qualifier
over casts and function calls where it was previously lost.
Both changes are needed to avoid compile time errors on system with
more strict error settings, in this case found with clang on FreeBSD.

Sponsored by: The FreeBSD Foundation
Signed-off-by: Bjoern A. Zeeb <bz@FreeBSD.ORG>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
[fix double word in commit message]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220128153014.3230c41312fc.I0032c597984834258d5a79b97052ed83dbe53b80@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# 2c5769e3 17-Oct-2021 Johannes Berg <johannes.berg@intel.com>

iwlwifi: pnvm: print out the version properly

The version really is a git sha1, not a hex number, so we
need to print it out with leading zeroes (8 digits) and
without 0x prefix.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20211017165728.83422182774a.I40703fd517534133eb67d644ee16532ba8a67e35@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# e864a77f 16-Oct-2021 Johannes Berg <johannes.berg@intel.com>

iwlwifi: pnvm: read EFI data only if long enough

If the data we get from EFI is not even long enough for
the package struct we expect then ignore it entirely.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: a1a6a4cf49ec ("iwlwifi: pnvm: implement reading PNVM from UEFI")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20211016114029.33feba783518.I54a5cf33975d0330792b3d208b225d479e168f32@changeid


# 0f892441 16-Oct-2021 Johannes Berg <johannes.berg@intel.com>

iwlwifi: pnvm: don't kmemdup() more than we have

We shouldn't kmemdup() more data than we have, that might
cause the code to crash. Fix that by updating the length
before the kmemdup.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20211016114029.ab0e64c3fba9.Ic6a3295fc384750b51b4270bf0b7d94984a139f2@changeid


# 45010c08 02-Sep-2021 Christophe JAILLET <christophe.jaillet@wanadoo.fr>

iwlwifi: pnvm: Fix a memory leak in 'iwl_pnvm_get_from_fs()'

A firmware is requested but never released in this function. This leads to
a memory leak in the normal execution path.

Add the missing 'release_firmware()' call.
Also introduce a temp variable (new_len) in order to keep the value of
'pnvm->size' after the firmware has been released.

Fixes: cdda18fbbefa ("iwlwifi: pnvm: move file loading code to a separate function")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Luca Coelho <luca@coelho.fi>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/1b5d80f54c1dbf85710fd285243932943b498fe7.1630614969.git.christophe.jaillet@wanadoo.fr


# b05c1d14 26-Aug-2021 Dror Moshe <drorx.moshe@intel.com>

iwlwifi: move get pnvm file name to a separate function

Move code that generates the pnvm file name to a separate function,
so that it can be reused.

Signed-off-by: Dror Moshe <drorx.moshe@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210826224715.7d2dd18c75a2.I3652584755b9ab44909ddcd09ff4d80c6690a1ad@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# 2a1d2fcf 02-Aug-2021 Luca Coelho <luciano.coelho@intel.com>

iwlwifi: print PNVM complete notification status in hexadecimal

This value is not a simple incrementing integer, it contains some
flags as well, so reading it in hexadecimal is easier. Change the
print to do it in hex instead of decimal.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210802170640.5e35f930d0ed.I5f94575a835f060bdc8ed3477871256f8a2cbaaa@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# 0f673c16 19-Jul-2021 Johannes Berg <johannes.berg@intel.com>

iwlwifi: pnvm: accept multiple HW-type TLVs

Some products (So) may have two different types of products
with different mac-type that are otherwise equivalent, and
have the same PNVM data, so the PNVM file will contain two
(or perhaps later more) HW-type TLVs. Accept the file and
use the data section that contains any matching entry.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210719140154.a6a86e903035.Ic0b1b75c45d386698859f251518e8a5144431938@changeid


# 9dad325f 21-Jun-2021 Luca Coelho <luciano.coelho@intel.com>

iwlwifi: support loading the reduced power table from UEFI

This new feature allows OEMs to set a special reduced power table in a
UEFI variable, which we use to tell the firmware to change the TX
power tables.

Read the variable and store it in a dram block to pass it to the
firmware. We do this as part of the PNVM loading flow.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210621103449.259a33ba5074.I2e0bb142d2a9c412547cba89b62dd077b328fdc4@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# 84c3c995 21-Jun-2021 Luca Coelho <luciano.coelho@intel.com>

iwlwifi: move UEFI code to a separate file

We are going to read more variables from UEFI, so it's cleaner to have
all the code that handles UEFI variables in a separate file.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210621103449.c705ac86f2e9.Ia7421c17fe52929e4098b4f0cf070809ed3ef906@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# 436b2656 01-Mar-2021 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

iwlwifi: fix ARCH=i386 compilation warnings

An unsigned long variable should rely on '%lu' format strings, not '%zd'

Fixes: a1a6a4cf49ece ("iwlwifi: pnvm: implement reading PNVM from UEFI")
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210302011640.1276636-1-pierre-louis.bossart@linux.intel.com


# 3304b6f9 11-Feb-2021 Luca Coelho <luciano.coelho@intel.com>

iwlwifi: remove incorrect comment in pnvm

We use this driver as a backport that also runs on older kernels (as
part of the backports project). So we use some checks to backport or
prevent code from compiling in incompatible kernel version.

When I took one of the PNVM patches from the backport, I accidentally
left the comment that a certain part of the code doesn't work in older
kernels. This obviously should never be valid for the mainline.
Remove this comment.

Reported-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210211223049.40d545a0fa89.I04793aaa5312b926335c8db32131f000432df511@changeid


# a1a6a4cf 10-Feb-2021 Luca Coelho <luciano.coelho@intel.com>

iwlwifi: pnvm: implement reading PNVM from UEFI

We now support fetching the PNVM data from a UEFI variable. Add the
code to read this variable first and use it. If it's not available,
we fall back to reading the data from the filesystem, as before.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210211015026.289084803334.Ie234805047df3be84f4235f9dafaf4cdecf0db9a@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# cdda18fb 10-Feb-2021 Luca Coelho <luciano.coelho@intel.com>

iwlwifi: pnvm: move file loading code to a separate function

In preparation to support loading the PNVM from UEFI, move the
function that loads the PNVM from the filesystem to a separate
function. This will make it easier to try to load from both places
later on.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210210172142.072aa2e8bbc5.Ib351ee5da47a4cee60d44e66d32d2f6bba6f3150@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# ff11a8ee 10-Feb-2021 Luca Coelho <luciano.coelho@intel.com>

iwlwifi: pnvm: increment the pointer before checking the TLV

If the SKU_ID doesn't match, we don't increment the pointer and keep
checking the same TLV over and over again.

We need to increment the pointer in all situtations, namely if the TLV
is not a SKU_ID, if the SKU_ID matched or if the SKU_ID didn't match.
So we can increment the pointer already before checking for these
conditions to solve the problem.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210210172142.de94d366f3ff.I9a5a54906cf0f4ec8af981d6066bfd771152ffb9@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# 4a81598f 10-Feb-2021 Luca Coelho <luciano.coelho@intel.com>

iwlwifi: pnvm: set the PNVM again if it was already loaded

When the interface goes up, we have already loaded the PNVM during
init, so we don't load it anymore. But we still need to set the PNVM
values in the context so that the FW can load it again.

Call set_pnvm when the PNVM is already loaded and change the
trans_pcie implementation to accept a second call to set_pnvm when we
have already allocated and, in this case, only set the values without
allocating again.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210210172142.622546a3566f.I659a8b9aa944d213c4ba446e142d74f3f6db9c64@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>


# 82a08d0c 15-Jan-2021 Johannes Berg <johannes.berg@intel.com>

iwlwifi: pnvm: don't try to load after failures

If loading the PNVM file failed on the first try during the
interface up, the file is unlikely to show up later, and we
already don't try to reload it if it changes, so just don't
try loading it again and again.

This also fixes some issues where we may try to load it at
resume time, which may not be possible yet.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210115130252.5ac6828a0bbe.I7d308358b21d3c0c84b1086999dbc7267f86e219@changeid


# 1c58bed4 15-Jan-2021 Johannes Berg <johannes.berg@intel.com>

iwlwifi: pnvm: don't skip everything when not reloading

Even if we don't reload the file from disk, we still need to
trigger the PNVM load flow with the device; fix that.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Fixes: 6972592850c0 ("iwlwifi: read and parse PNVM file")
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20210115130252.85ef56c4ef8c.I3b853ce041a0755d45e448035bef1837995d191b@changeid


# 69725928 08-Oct-2020 Luca Coelho <luciano.coelho@intel.com>

iwlwifi: read and parse PNVM file

The driver looks for a PNVM file that contains FW configuration data
for each different HW combination. The FW requests the data for a
certain SKU_ID and the driver tries to find it in the PNVM file.

Read the file, parse its contents and send it to the trans.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20201008181047.826bc607e57a.I1d93dd6e6651586878db57fac3e7c3f09d742c42@changeid


# b3e4c0f3 08-Oct-2020 Luca Coelho <luciano.coelho@intel.com>

iwlwifi: move PNVM implementation to common code

The PNVM code is generic and can be used by other opmodes. Move it to
a common file and include it in the relevant opmodes.

Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/iwlwifi.20201008181047.232aa310693b.I03a18ffa4162753af38e759d88e27509007c7bca@changeid