.. | .. |
---|
561 | 561 | struct mt76_channel_state *chan_state; |
---|
562 | 562 | ktime_t survey_time; |
---|
563 | 563 | |
---|
| 564 | + struct mt76_hw_cap cap; |
---|
564 | 565 | struct mt76_sband sband_2g; |
---|
565 | 566 | struct mt76_sband sband_5g; |
---|
566 | 567 | |
---|
.. | .. |
---|
630 | 631 | |
---|
631 | 632 | struct debugfs_blob_wrapper eeprom; |
---|
632 | 633 | struct debugfs_blob_wrapper otp; |
---|
633 | | - struct mt76_hw_cap cap; |
---|
634 | 634 | |
---|
635 | 635 | struct mt76_rate_power rate_power; |
---|
636 | 636 | |
---|
.. | .. |
---|
884 | 884 | static inline u8 mt76_tx_power_nss_delta(u8 nss) |
---|
885 | 885 | { |
---|
886 | 886 | static const u8 nss_delta[4] = { 0, 6, 9, 12 }; |
---|
| 887 | + u8 idx = nss - 1; |
---|
887 | 888 | |
---|
888 | | - return nss_delta[nss - 1]; |
---|
| 889 | + return (idx < ARRAY_SIZE(nss_delta)) ? nss_delta[idx] : 0; |
---|
889 | 890 | } |
---|
890 | 891 | |
---|
891 | 892 | static inline bool mt76_testmode_enabled(struct mt76_dev *dev) |
---|