All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Markus Theil <markus.theil@tu-ilmenau.de>
Cc: kbuild-all@lists.01.org, nbd@nbd.name,
	linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com,
	Stanislaw Gruszka <sgruszka@redhat.com>,
	Markus Theil <markus.theil@tu-ilmenau.de>
Subject: Re: [PATCH v8 3/6] mt76: mt76x02: add check for invalid vif idx
Date: Sun, 24 Nov 2019 11:30:25 +0800	[thread overview]
Message-ID: <201911241109.rIBc99lR%lkp@intel.com> (raw)
In-Reply-To: <20191121180001.22451-4-markus.theil@tu-ilmenau.de>

[-- Attachment #1: Type: text/plain, Size: 3492 bytes --]

Hi Markus,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on next-20191122]
[cannot apply to v5.4-rc8]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Markus-Theil/mt76-channel-switch-support-for-USB-devices/20191124-083548
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/net//wireless/mediatek/mt76/mt76x02_util.c: In function 'mt76x02_add_interface':
>> drivers/net//wireless/mediatek/mt76/mt76x02_util.c:330:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
         vif->type != NL80211_IFTYPE_STATION && idx > 7)
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

vim +330 drivers/net//wireless/mediatek/mt76/mt76x02_util.c

   296	
   297	int
   298	mt76x02_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
   299	{
   300		struct mt76x02_dev *dev = hw->priv;
   301		unsigned int idx = 0;
   302	
   303		/* Allow to change address in HW if we create first interface. */
   304		if (!dev->vif_mask &&
   305		    (((vif->addr[0] ^ dev->mt76.macaddr[0]) & ~GENMASK(4, 1)) ||
   306		     memcmp(vif->addr + 1, dev->mt76.macaddr + 1, ETH_ALEN - 1)))
   307			mt76x02_mac_setaddr(dev, vif->addr);
   308	
   309		if (vif->addr[0] & BIT(1))
   310			idx = 1 + (((dev->mt76.macaddr[0] ^ vif->addr[0]) >> 2) & 7);
   311	
   312		/*
   313		 * Client mode typically only has one configurable BSSID register,
   314		 * which is used for bssidx=0. This is linked to the MAC address.
   315		 * Since mac80211 allows changing interface types, and we cannot
   316		 * force the use of the primary MAC address for a station mode
   317		 * interface, we need some other way of configuring a per-interface
   318		 * remote BSSID.
   319		 * The hardware provides an AP-Client feature, where bssidx 0-7 are
   320		 * used for AP mode and bssidx 8-15 for client mode.
   321		 * We shift the station interface bss index by 8 to force the
   322		 * hardware to recognize the BSSID.
   323		 * The resulting bssidx mismatch for unicast frames is ignored by hw.
   324		 */
   325		if (vif->type == NL80211_IFTYPE_STATION)
   326			idx += 8;
   327	
   328		/* vif is already set or idx is 8 for AP/Mesh/... */
   329		if (dev->vif_mask & BIT(idx) ||
 > 330		    vif->type != NL80211_IFTYPE_STATION && idx > 7)
   331			return -EBUSY;
   332	
   333		dev->vif_mask |= BIT(idx);
   334	
   335		mt76x02_vif_init(dev, vif, idx);
   336		return 0;
   337	}
   338	EXPORT_SYMBOL_GPL(mt76x02_add_interface);
   339	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 59165 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v8 3/6] mt76: mt76x02: add check for invalid vif idx
Date: Sun, 24 Nov 2019 11:30:25 +0800	[thread overview]
Message-ID: <201911241109.rIBc99lR%lkp@intel.com> (raw)
In-Reply-To: <20191121180001.22451-4-markus.theil@tu-ilmenau.de>

[-- Attachment #1: Type: text/plain, Size: 3575 bytes --]

Hi Markus,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on wireless-drivers-next/master]
[also build test WARNING on next-20191122]
[cannot apply to v5.4-rc8]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Markus-Theil/mt76-channel-switch-support-for-USB-devices/20191124-083548
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers-next.git master
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=sparc64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

   drivers/net//wireless/mediatek/mt76/mt76x02_util.c: In function 'mt76x02_add_interface':
>> drivers/net//wireless/mediatek/mt76/mt76x02_util.c:330:42: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
         vif->type != NL80211_IFTYPE_STATION && idx > 7)
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~

vim +330 drivers/net//wireless/mediatek/mt76/mt76x02_util.c

   296	
   297	int
   298	mt76x02_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
   299	{
   300		struct mt76x02_dev *dev = hw->priv;
   301		unsigned int idx = 0;
   302	
   303		/* Allow to change address in HW if we create first interface. */
   304		if (!dev->vif_mask &&
   305		    (((vif->addr[0] ^ dev->mt76.macaddr[0]) & ~GENMASK(4, 1)) ||
   306		     memcmp(vif->addr + 1, dev->mt76.macaddr + 1, ETH_ALEN - 1)))
   307			mt76x02_mac_setaddr(dev, vif->addr);
   308	
   309		if (vif->addr[0] & BIT(1))
   310			idx = 1 + (((dev->mt76.macaddr[0] ^ vif->addr[0]) >> 2) & 7);
   311	
   312		/*
   313		 * Client mode typically only has one configurable BSSID register,
   314		 * which is used for bssidx=0. This is linked to the MAC address.
   315		 * Since mac80211 allows changing interface types, and we cannot
   316		 * force the use of the primary MAC address for a station mode
   317		 * interface, we need some other way of configuring a per-interface
   318		 * remote BSSID.
   319		 * The hardware provides an AP-Client feature, where bssidx 0-7 are
   320		 * used for AP mode and bssidx 8-15 for client mode.
   321		 * We shift the station interface bss index by 8 to force the
   322		 * hardware to recognize the BSSID.
   323		 * The resulting bssidx mismatch for unicast frames is ignored by hw.
   324		 */
   325		if (vif->type == NL80211_IFTYPE_STATION)
   326			idx += 8;
   327	
   328		/* vif is already set or idx is 8 for AP/Mesh/... */
   329		if (dev->vif_mask & BIT(idx) ||
 > 330		    vif->type != NL80211_IFTYPE_STATION && idx > 7)
   331			return -EBUSY;
   332	
   333		dev->vif_mask |= BIT(idx);
   334	
   335		mt76x02_vif_init(dev, vif, idx);
   336		return 0;
   337	}
   338	EXPORT_SYMBOL_GPL(mt76x02_add_interface);
   339	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 59165 bytes --]

  reply	other threads:[~2019-11-24  3:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 17:59 [PATCH v8 0/6] mt76: channel switch support for USB devices Markus Theil
2019-11-21 17:59 ` [PATCH v8 1/6] mt76: mt76x02: ommit beacon slot clearing Markus Theil
2019-11-21 17:59 ` [PATCH v8 2/6] mt76: mt76x02: split beaconing Markus Theil
2019-11-25 13:00   ` Stanislaw Gruszka
2019-11-25 14:07     ` Markus Theil
2019-11-25 16:59       ` Stanislaw Gruszka
2019-11-25 17:12         ` Felix Fietkau
2019-11-25 17:32           ` Stanislaw Gruszka
2019-11-26 10:44           ` Stanislaw Gruszka
2019-11-21 17:59 ` [PATCH v8 3/6] mt76: mt76x02: add check for invalid vif idx Markus Theil
2019-11-24  3:30   ` kbuild test robot [this message]
2019-11-24  3:30     ` kbuild test robot
2019-11-21 17:59 ` [PATCH v8 4/6] mt76: mt76x02: remove a copy call for usb speedup Markus Theil
2019-11-25 12:49   ` Stanislaw Gruszka
2019-11-21 18:00 ` [PATCH v8 5/6] mt76: speed up usb bulk copy Markus Theil
2019-11-21 18:00 ` [PATCH v8 6/6] mt76: mt76x02: add channel switch support for usb interfaces Markus Theil
2019-11-25 13:04   ` Stanislaw Gruszka
2019-11-25 14:51     ` Markus Theil
2019-11-25 15:32       ` Markus Theil
2019-11-25 17:02         ` Stanislaw Gruszka
2019-11-25 18:30           ` Markus Theil
2019-11-25 18:40             ` Markus Theil

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201911241109.rIBc99lR%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi@redhat.com \
    --cc=markus.theil@tu-ilmenau.de \
    --cc=nbd@nbd.name \
    --cc=sgruszka@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.