Search Linux Wireless

Re: [PATCH] mt76: mt7921: fix key set/delete issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Lorenzo,

I love your patch! Yet something to improve:

[auto build test ERROR on wireless-drivers-next/master]
[also build test ERROR on wireless-drivers/master v5.12-rc4 next-20210326]
[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/Lorenzo-Bianconi/mt76-mt7921-fix-key-set-delete-issue/20210327-171231
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: riscv-allmodconfig (attached as .config)
compiler: riscv64-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/9c49e0759aa10119efd7808db8dc9ed4d870921c
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Lorenzo-Bianconi/mt76-mt7921-fix-key-set-delete-issue/20210327-171231
        git checkout 9c49e0759aa10119efd7808db8dc9ed4d870921c
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   drivers/net/wireless/mediatek/mt76/mt7921/main.c: In function 'mt7921_set_key':
>> drivers/net/wireless/mediatek/mt76/mt7921/main.c:433:24: error: 'struct mt76_wcid' has no member named 'hw_key_idx2'; did you mean 'hw_key_idx'?
     433 |   wcid_keyidx = &wcid->hw_key_idx2;
         |                        ^~~~~~~~~~~
         |                        hw_key_idx


vim +433 drivers/net/wireless/mediatek/mt76/mt7921/main.c

   406	
   407	static int mt7921_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
   408				  struct ieee80211_vif *vif, struct ieee80211_sta *sta,
   409				  struct ieee80211_key_conf *key)
   410	{
   411		struct mt7921_dev *dev = mt7921_hw_dev(hw);
   412		struct mt7921_vif *mvif = (struct mt7921_vif *)vif->drv_priv;
   413		struct mt7921_sta *msta = sta ? (struct mt7921_sta *)sta->drv_priv :
   414					  &mvif->sta;
   415		struct mt76_wcid *wcid = &msta->wcid;
   416		u8 *wcid_keyidx = &wcid->hw_key_idx;
   417		int idx = key->keyidx, err = 0;
   418	
   419		/* The hardware does not support per-STA RX GTK, fallback
   420		 * to software mode for these.
   421		 */
   422		if ((vif->type == NL80211_IFTYPE_ADHOC ||
   423		     vif->type == NL80211_IFTYPE_MESH_POINT) &&
   424		    (key->cipher == WLAN_CIPHER_SUITE_TKIP ||
   425		     key->cipher == WLAN_CIPHER_SUITE_CCMP) &&
   426		    !(key->flags & IEEE80211_KEY_FLAG_PAIRWISE))
   427			return -EOPNOTSUPP;
   428	
   429		/* fall back to sw encryption for unsupported ciphers */
   430		switch (key->cipher) {
   431		case WLAN_CIPHER_SUITE_AES_CMAC:
   432			key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIE;
 > 433			wcid_keyidx = &wcid->hw_key_idx2;
   434			break;
   435		case WLAN_CIPHER_SUITE_TKIP:
   436		case WLAN_CIPHER_SUITE_CCMP:
   437		case WLAN_CIPHER_SUITE_CCMP_256:
   438		case WLAN_CIPHER_SUITE_GCMP:
   439		case WLAN_CIPHER_SUITE_GCMP_256:
   440		case WLAN_CIPHER_SUITE_SMS4:
   441			break;
   442		case WLAN_CIPHER_SUITE_WEP40:
   443		case WLAN_CIPHER_SUITE_WEP104:
   444		default:
   445			return -EOPNOTSUPP;
   446		}
   447	
   448		mt7921_mutex_acquire(dev);
   449	
   450		if (cmd == SET_KEY)
   451			*wcid_keyidx = idx;
   452		else if (idx == *wcid_keyidx)
   453			*wcid_keyidx = -1;
   454		else
   455			goto out;
   456	
   457		mt76_wcid_key_setup(&dev->mt76, wcid,
   458				    cmd == SET_KEY ? key : NULL);
   459	
   460		err = mt7921_mcu_add_key(dev, vif, msta, key, cmd);
   461	out:
   462		mt7921_mutex_release(dev);
   463	
   464		return err;
   465	}
   466	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux