Skip to content

Commit

Permalink
mt76: mt7615: disable merge of OTP ROM data by default
Browse files Browse the repository at this point in the history
The reference driver does not seem to enable it by default, only under certain
conditions, e.g. when a .bin file is loaded.
Make it opt-in via a device tree property for now, in case it is needed on some
boards.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
  • Loading branch information
Felix Fietkau committed May 12, 2020
1 parent c3129ea commit b90728f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Felix Fietkau <nbd@nbd.name>
*/

#include <linux/of.h>
#include "mt7615.h"
#include "eeprom.h"

Expand Down Expand Up @@ -255,6 +256,11 @@ static void mt7622_apply_cal_free_data(struct mt7615_dev *dev)

static void mt7615_cal_free_data(struct mt7615_dev *dev)
{
struct device_node *np = dev->mt76.dev->of_node;

if (!np || !of_property_read_bool(np, "mediatek,eeprom-merge-otp"))
return;

switch (mt76_chip(&dev->mt76)) {
case 0x7622:
mt7622_apply_cal_free_data(dev);
Expand Down

0 comments on commit b90728f

Please sign in to comment.