lkml.org 
[lkml]   [2023]   [Oct]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [net-next RFC PATCH 1/6] wifi: mt76: fix broken precal loading from MTD for mt7915
Date
Christian Marangi <ansuelsmth@gmail.com> writes:

> Commit 495184ac91bb ("mt76: mt7915: add support for applying
> pre-calibration data") was fundamentally broken and never worked.
>
> The idea (before NVMEM support) was to expand the MTD function and pass
> an additional offset. For normal EEPROM load the offset would always be
> 0. For the purpose of precal loading, an offset was passed that was
> internally the size of EEPROM, since precal data is right after the
> EEPROM.
>
> Problem is that the offset value passed is never handled and is actually
> overwrite by
>
> offset = be32_to_cpup(list);
> ret = mtd_read(mtd, offset, len, &retlen, eep);
>
> resulting in the passed offset value always ingnored. (and even passing
> garbage data as precal as the start of the EEPROM is getting read)
>
> Fix this by adding to the current offset value, the offset from DT to
> correctly read the piece of data at the requested location.
>
> Cc: stable@vger.kernel.org
> Fixes: 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data")
> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>

mt76 patches go to Felix's tree, not net-next.

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

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

\
 
 \ /
  Last update: 2023-10-18 08:08    [W:0.039 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site