[PATCH v2] mt76: fix iv and CCMP header insertion

kernel test robot lkp at intel.com
Wed Jun 16 23:26:59 PDT 2021


Hi Ryder,

I love your patch! Perhaps something to improve:

[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on wireless-drivers/master v5.13-rc6 next-20210616]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Ryder-Lee/mt76-fix-iv-and-CCMP-header-insertion/20210617-103402
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 9.3.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/0day-ci/linux/commit/efe80b96022a46a670de9c1a21138f6ea7871b0a
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Ryder-Lee/mt76-fix-iv-and-CCMP-header-insertion/20210617-103402
        git checkout efe80b96022a46a670de9c1a21138f6ea7871b0a
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All warnings (new ones prefixed by >>):

   drivers/net/wireless/mediatek/mt76/mt76x02_mac.c: In function 'mt76x02_mac_shared_key_setup':
>> drivers/net/wireless/mediatek/mt76/mt76x02_mac.c:66:13: warning: comparison between 'enum mt76x02_cipher_type' and 'enum mt76_cipher_type' [-Wenum-compare]
      66 |  if (cipher == MT_CIPHER_NONE && key)
         |             ^~
   drivers/net/wireless/mediatek/mt76/mt76x02_mac.c: In function 'mt76x02_mac_wcid_set_key':
   drivers/net/wireless/mediatek/mt76/mt76x02_mac.c:115:13: warning: comparison between 'enum mt76x02_cipher_type' and 'enum mt76_cipher_type' [-Wenum-compare]
     115 |  if (cipher == MT_CIPHER_NONE && key)
         |             ^~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
   Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
   Selected by
   - SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
   - SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC


vim +66 drivers/net/wireless/mediatek/mt76/mt76x02_mac.c

047aed1c38cf4b Stanislaw Gruszka 2018-08-29  57  
8d66af49a3db9a Lorenzo Bianconi  2018-10-07  58  int mt76x02_mac_shared_key_setup(struct mt76x02_dev *dev, u8 vif_idx,
8d66af49a3db9a Lorenzo Bianconi  2018-10-07  59  				 u8 key_idx, struct ieee80211_key_conf *key)
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  60  {
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  61  	enum mt76x02_cipher_type cipher;
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  62  	u8 key_data[32];
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  63  	u32 val;
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  64  
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  65  	cipher = mt76x02_mac_get_key_info(key, key_data);
047aed1c38cf4b Stanislaw Gruszka 2018-08-29 @66  	if (cipher == MT_CIPHER_NONE && key)
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  67  		return -EOPNOTSUPP;
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  68  
8d66af49a3db9a Lorenzo Bianconi  2018-10-07  69  	val = mt76_rr(dev, MT_SKEY_MODE(vif_idx));
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  70  	val &= ~(MT_SKEY_MODE_MASK << MT_SKEY_MODE_SHIFT(vif_idx, key_idx));
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  71  	val |= cipher << MT_SKEY_MODE_SHIFT(vif_idx, key_idx);
8d66af49a3db9a Lorenzo Bianconi  2018-10-07  72  	mt76_wr(dev, MT_SKEY_MODE(vif_idx), val);
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  73  
8d66af49a3db9a Lorenzo Bianconi  2018-10-07  74  	mt76_wr_copy(dev, MT_SKEY(vif_idx, key_idx), key_data,
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  75  		     sizeof(key_data));
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  76  
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  77  	return 0;
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  78  }
047aed1c38cf4b Stanislaw Gruszka 2018-08-29  79  EXPORT_SYMBOL_GPL(mt76x02_mac_shared_key_setup);
46436b5ef9dd2b Stanislaw Gruszka 2018-08-29  80  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 54816 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-mediatek/attachments/20210617/7190f3b1/attachment-0001.gz>


More information about the Linux-mediatek mailing list