tree:
https://github.com/nbd168/wireless mt76
head: bc6add98a89a784ff03d10a217ca8b7f26cde8b3
commit: ff79be4cf22f569334829c687d3cf38464471390 [17/21] mt76: mt7915: add support for DT
rate power limits
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout ff79be4cf22f569334829c687d3cf38464471390
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c: In function
'mt7915_mcu_set_sku':
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3136:27: error:
storage size of 'limits_array' isn't known
3136 | struct
mt76_power_limits limits_array;
| ^~~~~~~~~~~~
> drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3145:13: error:
implicit declaration of function 'mt76_get_rate_power_limits'
[-Werror=implicit-function-declaration]
3145 | tx_power =
mt76_get_rate_power_limits(mphy, mphy->chandef.chan,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/wireless/mediatek/mt76/mt7915/mcu.c:3136:27: warning: unused variable
'limits_array' [-Wunused-variable]
3136 | struct mt76_power_limits limits_array;
| ^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +3136 drivers/net/wireless/mediatek/mt76/mt7915/mcu.c
3121
3122 int mt7915_mcu_set_sku(struct mt7915_phy *phy)
3123 {
3124 struct mt7915_dev *dev = phy->dev;
3125 struct mt76_phy *mphy = phy->mt76;
3126 struct ieee80211_hw *hw = mphy->hw;
3127 struct mt7915_sku_val {
3128 u8 format_id;
3129 u8 limit_type;
3130 u8 dbdc_idx;
3131 s8 val[MT7915_SKU_RATE_NUM];
3132 } __packed req = {
3133 .format_id = 4,
3134 .dbdc_idx = phy != &dev->phy,
3135 };
3136 struct mt76_power_limits limits_array;
3137 s8 *delta,
*la = (s8 *)&limits_array;
3138 int i, idx, n_chains = hweight8(mphy->antenna_mask);
3139 int tx_power;
3140
3141 delta = dev->rate_power[mphy->chandef.chan->band];
3142 tx_power = hw->conf.power_level * 2 -
3143 mt76_tx_power_nss_delta(n_chains);
3144
3145 tx_power = mt76_get_rate_power_limits(mphy,
mphy->chandef.chan,
3146 &limits_array, tx_power);
3147 mphy->txpower_cur = tx_power;
3148
3149 for (i = 0, idx = 0; i < MAX_SKU_RATE_GROUP_NUM; i++) {
3150 const struct sku_group *sku = &mt7915_sku_groups[i];
3151 u32 offset = sku->offset[mphy->chandef.chan->band];
3152 u8 mcs_num = sku->len;
3153 int j;
3154
3155 if (i >= SKU_HT_BW20 && i <= SKU_VHT_BW160) {
3156 mcs_num = 10;
3157
3158 if (i == SKU_HT_BW20 || i == SKU_VHT_BW20)
3159 la = (s8 *)&limits_array + 12;
3160 }
3161
3162 if (!offset) {
3163 idx += sku->len;
3164 la += mcs_num;
3165 continue;
3166 }
3167
3168 for (j = 0; j < min_t(u8, mcs_num, sku->len); j++) {
3169 s8 rate_power;
3170
3171 rate_power = hw->conf.power_level * 2 + delta[idx + j];
3172 req.val[idx + j] = min_t(s8, la[j], rate_power);
3173 }
3174 la += mcs_num;
3175 idx += sku->len;
3176 }
3177
3178 return __mt76_mcu_send_msg(&dev->mt76,
3179 MCU_EXT_CMD_TX_POWER_FEATURE_CTRL,
3180 &req, sizeof(req), true);
3181 }
3182
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org