diff options
author | Jakub Kicinski <kubakici@wp.pl> | 2015-06-10 20:10:09 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-06-15 12:49:35 +0300 |
commit | 8d0123748af0248750b123f9bfb8040d74691a77 (patch) | |
tree | a64d713b67481abfc04de23566c2ab00c45d1744 /drivers/net/wireless/mediatek | |
parent | 3bdb4a4e61b61e8a83c981675350eef4c44171fb (diff) |
mt7601u: don't warn about devices without per-rate power table
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>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/mediatek')
-rw-r--r-- | drivers/net/wireless/mediatek/mt7601u/eeprom.c | 4 |
1 files changed, 4 insertions, 0 deletions
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 */ |