[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202112300121.0IhhiGM4-lkp@intel.com>
Date: Thu, 30 Dec 2021 01:38:21 +0800
From: kernel test robot <lkp@...el.com>
To: Felix Fietkau <nbd@....name>
Cc: kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [nbd168-wireless:mt76 62/62]
drivers/net/wireless/mediatek/mt76/mt7915/main.c:411:35: warning: implicit
conversion from 'enum mcu_cipher_type' to 'enum mt76_cipher_type'
tree: https://github.com/nbd168/wireless mt76
head: b18073c341fd3b4143cd034decb0ad8544b51bdf
commit: b18073c341fd3b4143cd034decb0ad8544b51bdf [62/62] mt76: mt7915: update bss_info with cipher after setting the group key
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20211230/202112300121.0IhhiGM4-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/nbd168/wireless/commit/b18073c341fd3b4143cd034decb0ad8544b51bdf
git remote add nbd168-wireless https://github.com/nbd168/wireless
git fetch --no-tags nbd168-wireless mt76
git checkout b18073c341fd3b4143cd034decb0ad8544b51bdf
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=alpha SHELL=/bin/bash drivers/net/wireless/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All warnings (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7915/main.c: In function 'mt7915_set_key':
>> drivers/net/wireless/mediatek/mt76/mt7915/main.c:411:35: warning: implicit conversion from 'enum mcu_cipher_type' to 'enum mt76_cipher_type' [-Wenum-conversion]
411 | mvif->mt76.cipher = mt76_connac_mcu_get_cipher(key->cipher);
| ^
vim +411 drivers/net/wireless/mediatek/mt76/mt7915/main.c
364
365 static int mt7915_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
366 struct ieee80211_vif *vif, struct ieee80211_sta *sta,
367 struct ieee80211_key_conf *key)
368 {
369 struct mt7915_dev *dev = mt7915_hw_dev(hw);
370 struct mt7915_phy *phy = mt7915_hw_phy(hw);
371 struct mt7915_vif *mvif = (struct mt7915_vif *)vif->drv_priv;
372 struct mt7915_sta *msta = sta ? (struct mt7915_sta *)sta->drv_priv :
373 &mvif->sta;
374 struct mt76_wcid *wcid = &msta->wcid;
375 u8 *wcid_keyidx = &wcid->hw_key_idx;
376 int idx = key->keyidx;
377 int err = 0;
378
379 /* The hardware does not support per-STA RX GTK, fallback
380 * to software mode for these.
381 */
382 if ((vif->type == NL80211_IFTYPE_ADHOC ||
383 vif->type == NL80211_IFTYPE_MESH_POINT) &&
384 (key->cipher == WLAN_CIPHER_SUITE_TKIP ||
385 key->cipher == WLAN_CIPHER_SUITE_CCMP) &&
386 !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
387 return -EOPNOTSUPP;
388
389 /* fall back to sw encryption for unsupported ciphers */
390 switch (key->cipher) {
391 case WLAN_CIPHER_SUITE_AES_CMAC:
392 wcid_keyidx = &wcid->hw_key_idx2;
393 key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIE;
394 break;
395 case WLAN_CIPHER_SUITE_TKIP:
396 case WLAN_CIPHER_SUITE_CCMP:
397 case WLAN_CIPHER_SUITE_CCMP_256:
398 case WLAN_CIPHER_SUITE_GCMP:
399 case WLAN_CIPHER_SUITE_GCMP_256:
400 case WLAN_CIPHER_SUITE_SMS4:
401 break;
402 case WLAN_CIPHER_SUITE_WEP40:
403 case WLAN_CIPHER_SUITE_WEP104:
404 default:
405 return -EOPNOTSUPP;
406 }
407
408 mutex_lock(&dev->mt76.mutex);
409
410 if (cmd == SET_KEY && !sta && !mvif->mt76.cipher) {
> 411 mvif->mt76.cipher = mt76_connac_mcu_get_cipher(key->cipher);
412 mt7915_mcu_add_bss_info(phy, vif, true);
413 }
414
415 if (cmd == SET_KEY)
416 *wcid_keyidx = idx;
417 else if (idx == *wcid_keyidx)
418 *wcid_keyidx = -1;
419 else
420 goto out;
421
422 mt76_wcid_key_setup(&dev->mt76, wcid,
423 cmd == SET_KEY ? key : NULL);
424
425 err = mt76_connac_mcu_add_key(&dev->mt76, vif, &msta->bip,
426 key, MCU_EXT_CMD(STA_REC_UPDATE),
427 &msta->wcid, cmd);
428 out:
429 mutex_unlock(&dev->mt76.mutex);
430
431 return err;
432 }
433
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Powered by blists - more mailing lists