All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 04/16] cfg80211: Use the HE operation IE to determine a 6GHz BSS channel
Date: Tue, 30 Nov 2021 16:14:52 +0800	[thread overview]
Message-ID: <202111301626.sAKhr9zO-lkp@intel.com> (raw)
In-Reply-To: <iwlwifi.20211129152938.8efcf1856975.I130f678e4aa390973ab39d838bbfe7b2d54bff8e@changeid>

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

Hi Luca,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on jberg-mac80211-next/master]
[also build test ERROR on next-20211129]
[cannot apply to jberg-mac80211/master linus/master v5.16-rc3]
[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/Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-11-29/20211129-213704
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20211130/202111301626.sAKhr9zO-lkp(a)intel.com/config)
compiler: sh4-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/0day-ci/linux/commit/da233d0b8179f2db6b1f5e783da1c0b986cc8e96
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Luca-Coelho/cfg80211-mac80211-patches-from-our-internal-tree-2021-11-29/20211129-213704
        git checkout da233d0b8179f2db6b1f5e783da1c0b986cc8e96
        # 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=sh SHELL=/bin/bash drivers/clocksource/ net/wireless/

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

All errors (new ones prefixed by >>):

   net/wireless/scan.c: In function 'cfg80211_get_ies_channel_number':
>> net/wireless/scan.c:1801:13: error: 'channel' undeclared (first use in this function)
    1801 |         if (channel->band == NL80211_BAND_6GHZ) {
         |             ^~~~~~~
   net/wireless/scan.c:1801:13: note: each undeclared identifier is reported only once for each function it appears in
>> net/wireless/scan.c:1815:25: error: 'freq' undeclared (first use in this function); did you mean 'ifreq'?
    1815 |                         freq = ieee80211_channel_to_frequency(he_6ghz_oper->primary,
         |                         ^~~~
         |                         ifreq
   In file included from include/linux/kernel.h:16,
                    from net/wireless/scan.c:10:
   include/linux/math.h:136:17: error: first argument to '__builtin_choose_expr' not a constant
     136 |                 __builtin_choose_expr(                                  \
         |                 ^~~~~~~~~~~~~~~~~~~~~
   include/linux/math.h:144:61: note: in definition of macro '__abs_choose_expr'
     144 |         ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                             ^~~~~
   include/linux/math.h:132:17: note: in expansion of macro '__abs_choose_expr'
     132 |                 __abs_choose_expr(x, long,                              \
         |                 ^~~~~~~~~~~~~~~~~
   include/linux/math.h:133:17: note: in expansion of macro '__abs_choose_expr'
     133 |                 __abs_choose_expr(x, int,                               \
         |                 ^~~~~~~~~~~~~~~~~
   include/linux/math.h:134:17: note: in expansion of macro '__abs_choose_expr'
     134 |                 __abs_choose_expr(x, short,                             \
         |                 ^~~~~~~~~~~~~~~~~
   include/linux/math.h:135:17: note: in expansion of macro '__abs_choose_expr'
     135 |                 __abs_choose_expr(x, char,                              \
         |                 ^~~~~~~~~~~~~~~~~
   net/wireless/scan.c:1822:29: note: in expansion of macro 'abs'
    1822 |                             abs(freq - channel->center_freq) <= 80 &&
         |                             ^~~
   include/linux/math.h:141:43: error: first argument to '__builtin_choose_expr' not a constant
     141 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr(        \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/math.h:144:61: note: in definition of macro '__abs_choose_expr'
     144 |         ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                             ^~~~~
   include/linux/math.h:132:17: note: in expansion of macro '__abs_choose_expr'
     132 |                 __abs_choose_expr(x, long,                              \
         |                 ^~~~~~~~~~~~~~~~~
   include/linux/math.h:133:17: note: in expansion of macro '__abs_choose_expr'
     133 |                 __abs_choose_expr(x, int,                               \
         |                 ^~~~~~~~~~~~~~~~~
   include/linux/math.h:134:17: note: in expansion of macro '__abs_choose_expr'
     134 |                 __abs_choose_expr(x, short,                             \
         |                 ^~~~~~~~~~~~~~~~~
   include/linux/math.h:135:17: note: in expansion of macro '__abs_choose_expr'
     135 |                 __abs_choose_expr(x, char,                              \
         |                 ^~~~~~~~~~~~~~~~~
   net/wireless/scan.c:1822:29: note: in expansion of macro 'abs'
    1822 |                             abs(freq - channel->center_freq) <= 80 &&
         |                             ^~~
   include/linux/math.h:141:43: error: first argument to '__builtin_choose_expr' not a constant
     141 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr(        \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/math.h:144:61: note: in definition of macro '__abs_choose_expr'
     144 |         ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                             ^~~~~
   include/linux/math.h:132:17: note: in expansion of macro '__abs_choose_expr'
     132 |                 __abs_choose_expr(x, long,                              \
         |                 ^~~~~~~~~~~~~~~~~
   include/linux/math.h:133:17: note: in expansion of macro '__abs_choose_expr'
     133 |                 __abs_choose_expr(x, int,                               \
         |                 ^~~~~~~~~~~~~~~~~
   include/linux/math.h:134:17: note: in expansion of macro '__abs_choose_expr'
     134 |                 __abs_choose_expr(x, short,                             \
         |                 ^~~~~~~~~~~~~~~~~
   net/wireless/scan.c:1822:29: note: in expansion of macro 'abs'
    1822 |                             abs(freq - channel->center_freq) <= 80 &&
         |                             ^~~
   include/linux/math.h:141:43: error: first argument to '__builtin_choose_expr' not a constant
     141 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr(        \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/math.h:144:61: note: in definition of macro '__abs_choose_expr'
     144 |         ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                             ^~~~~
   include/linux/math.h:132:17: note: in expansion of macro '__abs_choose_expr'
     132 |                 __abs_choose_expr(x, long,                              \
         |                 ^~~~~~~~~~~~~~~~~
   include/linux/math.h:133:17: note: in expansion of macro '__abs_choose_expr'
     133 |                 __abs_choose_expr(x, int,                               \
         |                 ^~~~~~~~~~~~~~~~~
   net/wireless/scan.c:1822:29: note: in expansion of macro 'abs'
    1822 |                             abs(freq - channel->center_freq) <= 80 &&
         |                             ^~~
   include/linux/math.h:141:43: error: first argument to '__builtin_choose_expr' not a constant
     141 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr(        \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/math.h:144:61: note: in definition of macro '__abs_choose_expr'
     144 |         ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
         |                                                             ^~~~~
   include/linux/math.h:132:17: note: in expansion of macro '__abs_choose_expr'
     132 |                 __abs_choose_expr(x, long,                              \
         |                 ^~~~~~~~~~~~~~~~~
   net/wireless/scan.c:1822:29: note: in expansion of macro 'abs'
    1822 |                             abs(freq - channel->center_freq) <= 80 &&
         |                             ^~~
   include/linux/math.h:141:43: error: first argument to '__builtin_choose_expr' not a constant
     141 | #define __abs_choose_expr(x, type, other) __builtin_choose_expr(        \
         |                                           ^~~~~~~~~~~~~~~~~~~~~
   include/linux/math.h:131:17: note: in expansion of macro '__abs_choose_expr'
     131 | #define abs(x)  __abs_choose_expr(x, long long,                         \
         |                 ^~~~~~~~~~~~~~~~~
   net/wireless/scan.c:1822:29: note: in expansion of macro 'abs'
    1822 |                             abs(freq - channel->center_freq) <= 80 &&


vim +/channel +1801 net/wireless/scan.c

  1794	
  1795	int cfg80211_get_ies_channel_number(const u8 *ie, size_t ielen,
  1796					    enum nl80211_band band)
  1797	{
  1798		const u8 *tmp;
  1799		int channel_number = -1;
  1800	
> 1801		if (channel->band == NL80211_BAND_6GHZ) {
  1802			const struct element *elem;
  1803	
  1804			elem = cfg80211_find_ext_elem(WLAN_EID_EXT_HE_OPERATION, ie,
  1805						      ielen);
  1806			if (elem && elem->datalen >= ieee80211_he_oper_size(&elem->data[1])) {
  1807				struct ieee80211_he_operation *he_oper =
  1808					(void *)(&elem->data[1]);
  1809				const struct ieee80211_he_6ghz_oper *he_6ghz_oper;
  1810	
  1811				he_6ghz_oper = ieee80211_he_6ghz_oper(he_oper);
  1812				if (!he_6ghz_oper)
  1813					return channel;
  1814	
> 1815				freq = ieee80211_channel_to_frequency(he_6ghz_oper->primary,
  1816								      NL80211_BAND_6GHZ);
  1817	
  1818				/* duplicated beacon indication is relevant for beacons
  1819				 * only
  1820				 */
  1821				if (freq != channel->center_freq &&
  1822				    abs(freq - channel->center_freq) <= 80 &&
  1823				    (ftype != CFG80211_BSS_FTYPE_BEACON ||
  1824				     he_6ghz_oper->control & IEEE80211_HE_6GHZ_OPER_CTRL_DUP_BEACON))
  1825					channel_number = he_6ghz_oper->primary;
  1826			}
  1827		} else if (band == NL80211_BAND_S1GHZ) {
  1828			tmp = cfg80211_find_ie(WLAN_EID_S1G_OPERATION, ie, ielen);
  1829			if (tmp && tmp[1] >= sizeof(struct ieee80211_s1g_oper_ie)) {
  1830				struct ieee80211_s1g_oper_ie *s1gop = (void *)(tmp + 2);
  1831	
  1832				channel_number = s1gop->primary_ch;
  1833			}
  1834		} else {
  1835			tmp = cfg80211_find_ie(WLAN_EID_DS_PARAMS, ie, ielen);
  1836			if (tmp && tmp[1] == 1) {
  1837				channel_number = tmp[2];
  1838			} else {
  1839				tmp = cfg80211_find_ie(WLAN_EID_HT_OPERATION, ie, ielen);
  1840				if (tmp && tmp[1] >= sizeof(struct ieee80211_ht_operation)) {
  1841					struct ieee80211_ht_operation *htop = (void *)(tmp + 2);
  1842	
  1843					channel_number = htop->primary_chan;
  1844				}
  1845			}
  1846		}
  1847	
  1848		return channel_number;
  1849	}
  1850	EXPORT_SYMBOL(cfg80211_get_ies_channel_number);
  1851	

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

  reply	other threads:[~2021-11-30  8:14 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 13:32 [PATCH 00/16] cfg80211/mac80211 patches from our internal tree 2021-11-29 Luca Coelho
2021-11-29 13:32 ` [PATCH 01/16] mac80211: add more HT/VHT/HE state logging Luca Coelho
2021-11-30  9:05   ` kernel test robot
2021-11-30  9:26   ` kernel test robot
2021-11-30  9:26     ` kernel test robot
2021-11-30 11:15   ` Luca Coelho
2021-11-30 11:16   ` [PATCH v2] " Luca Coelho
2021-11-30 15:50     ` Ben Greear
2021-11-29 13:32 ` [PATCH 02/16] cfg80211: Add support for notifying association comeback Luca Coelho
2021-11-29 13:32 ` [PATCH 03/16] mac80211: Notify cfg80211 about " Luca Coelho
2021-11-29 13:32 ` [PATCH 04/16] cfg80211: Use the HE operation IE to determine a 6GHz BSS channel Luca Coelho
2021-11-30  8:14   ` kernel test robot [this message]
2021-11-30 11:18   ` kernel test robot
2021-11-30 11:18     ` kernel test robot
2021-11-30 11:49   ` kernel test robot
2021-12-02 12:28   ` Luca Coelho
2021-12-02 12:36   ` [PATCH v2] " Luca Coelho
2021-11-29 13:32 ` [PATCH 05/16] [BUGFIX] cfg80211: check fixed size before ieee80211_he_oper_size() Luca Coelho
2021-11-29 13:32 ` [PATCH 06/16] mac80211: introduce channel switch disconnect function Luca Coelho
2021-11-29 13:32 ` [PATCH 07/16] mac80211: mark TX-during-stop for TX in in_reconfig Luca Coelho
2021-11-29 13:32 ` [PATCH 08/16] mac80211: do drv_reconfig_complete() before restarting all Luca Coelho
2021-11-29 13:32 ` [PATCH 09/16] cfg80211: Fix order of enum nl80211_band_iftype_attr documentation Luca Coelho
2021-11-29 13:32 ` [PATCH 10/16] mac80211: update channel context before station state Luca Coelho
2021-11-29 13:32 ` [PATCH 11/16] cfg80211: simplify cfg80211_chandef_valid() Luca Coelho
2021-11-29 13:32 ` [PATCH 12/16] mac80211: Remove a couple of obsolete TODO Luca Coelho
2021-11-29 13:32 ` [PATCH 13/16] mac80211: Fix the size used for building probe request Luca Coelho
2021-11-29 13:32 ` [PATCH 14/16] mac80211: fix lookup when adding AddBA extension element Luca Coelho
2021-11-29 13:32 ` [PATCH 15/16] mac80211: agg-tx: don't schedule_and_wake_txq() under sta->lock Luca Coelho
2021-11-29 13:54   ` Toke Høiland-Jørgensen
2021-11-30 11:12     ` Luca Coelho
2021-11-30 11:32       ` Toke Høiland-Jørgensen
2021-11-30 11:52         ` Johannes Berg
2021-11-30 11:56           ` Toke Høiland-Jørgensen
2021-11-30 11:57           ` Luca Coelho
2021-11-30 12:08             ` Johannes Berg
2021-12-02 13:26   ` [PATCH v2] " Luca Coelho
2021-11-29 13:32 ` [PATCH 16/16] cfg80211: Acquire wiphy mutex on regulatory work Luca Coelho
2021-12-01 13:47   ` Kalle Valo
2021-12-02 13:27     ` Luca Coelho
2021-12-02 13:28   ` [PATCH v2] " Luca Coelho

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=202111301626.sAKhr9zO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    /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.