From: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
To: Lorenzo Bianconi <lorenzo@kernel.org>
Cc: nbd@nbd.name, linux-wireless@vger.kernel.org,
ryder.lee@mediatek.com, royluo@google.com
Subject: Re: [PATCH] mt76: mt7615: add preliminary support for mtd eeprom parsing
Date: Thu, 16 May 2019 19:03:33 +0200 [thread overview]
Message-ID: <20190516170332.GA21478@localhost.localdomain> (raw)
In-Reply-To: <80210f745a12498fc6fc0f2616c2afb43658f0f6.1557853278.git.lorenzo@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 1422 bytes --]
> Calibration data are often available on a specific mtd partition on
> embedded devices. Take into account eeprom calibration data if
> available. Calibration free data parsing is currently missing
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
> ---
> .../wireless/mediatek/mt76/mt7615/eeprom.c | 32 +++++++++++++++----
> 1 file changed, 26 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c
> index dd5ab46a4f66..0313c604ea61 100644
> --- a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c
> +++ b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c
[...]
> int mt7615_eeprom_init(struct mt7615_dev *dev)
> {
> int ret;
> @@ -84,7 +98,13 @@ int mt7615_eeprom_init(struct mt7615_dev *dev)
> if (ret < 0)
> return ret;
>
> - memcpy(dev->mt76.eeprom.data, dev->mt76.otp.data, MT7615_EEPROM_SIZE);
> + if (dev->mt76.otp.data) {
> + ret = mt7615_check_eeprom(&dev->mt76);
> + if (ret < 0)
> + memcpy(dev->mt76.eeprom.data, dev->mt76.otp.data,
> + MT7615_EEPROM_SIZE);
> + /* TODO: take into account cal free data */
reviewing sdk code it seems we do not have cal free data here, I will post a v2
removing the comment
Regards,
Lorenzo
> + }
>
> dev->mt76.cap.has_2ghz = true;
> dev->mt76.cap.has_5ghz = true;
> --
> 2.20.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
prev parent reply other threads:[~2019-05-16 17:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1557853278.git.lorenzo@kernel.org>
2019-05-14 17:11 ` [PATCH] mt76: mt7615: add preliminary support for mtd eeprom parsing Lorenzo Bianconi
2019-05-16 17:03 ` Lorenzo Bianconi [this message]
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=20190516170332.GA21478@localhost.localdomain \
--to=lorenzo.bianconi@redhat.com \
--cc=linux-wireless@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=nbd@nbd.name \
--cc=royluo@google.com \
--cc=ryder.lee@mediatek.com \
/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