Message ID | 1433959809-919-1-git-send-email-moorray3@wp.pl (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Kalle Valo |
Headers | show |
> From: Jakub Kicinski <kubakici@wp.pl> > > We expect EEPROM per-rate power table to be filled with > s6 values and warn user if values are invalid. However, > there appear to be devices which don't have this section > of EEPROM initialized. In such case we should ignore > the values and leave the driver power tables set to zero. > > Note that vendor driver doesn't care about this case but > mt76x2 skips 0xff per value. We take mt76x2's approach. > > Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Thanks, applied to wireless-drivers-next.git. And your name looked correct in git log even though I used patchwork to apply your patch. Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/mediatek/mt7601u/eeprom.c b/drivers/net/wireless/mediatek/mt7601u/eeprom.c index ce3837f270f0..8d8ee0344f7b 100644 --- a/drivers/net/wireless/mediatek/mt7601u/eeprom.c +++ b/drivers/net/wireless/mediatek/mt7601u/eeprom.c @@ -277,6 +277,10 @@ mt7601u_extra_power_over_mac(struct mt7601u_dev *dev) static void mt7601u_set_power_rate(struct power_per_rate *rate, s8 delta, u8 value) { + /* Invalid? Note: vendor driver does not handle this */ + if (value == 0xff) + return; + rate->raw = s6_validate(value); rate->bw20 = s6_to_int(value); /* Note: vendor driver does cap the value to s6 right away */