All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Mordechay Goodstein <mordechay.goodstein@intel.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
	Luca Coelho <luciano.coelho@intel.com>
Subject: [iwlwifi-next:pending 41/42] net/mac80211/vht.c:493:22: error: 'struct ieee80211_sta' has no member named 'eht_cap'; did you mean 'ht_cap'?
Date: Wed, 2 Feb 2022 06:24:18 +0800	[thread overview]
Message-ID: <202202020632.f5qedDLM-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git pending
head:   b15caa03d4e21e9e8dbc81f6ac09171a2871af1d
commit: 741d1c0dbb94288b29ba79d187a2898f02d085af [41/42] mac80211: calculate max rx nss for EHT mode
config: nds32-buildonly-randconfig-r002-20220201 (https://download.01.org/0day-ci/archive/20220202/202202020632.f5qedDLM-lkp@intel.com/config)
compiler: nds32le-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://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git/commit/?id=741d1c0dbb94288b29ba79d187a2898f02d085af
        git remote add iwlwifi-next https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git
        git fetch --no-tags iwlwifi-next pending
        git checkout 741d1c0dbb94288b29ba79d187a2898f02d085af
        # 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=nds32 SHELL=/bin/bash net/mac80211/

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/mac80211/vht.c: In function 'ieee80211_sta_set_rx_nss':
>> net/mac80211/vht.c:493:22: error: 'struct ieee80211_sta' has no member named 'eht_cap'; did you mean 'ht_cap'?
     493 |         if (sta->sta.eht_cap.has_eht) {
         |                      ^~~~~~~
         |                      ht_cap
   net/mac80211/vht.c:495:58: error: 'struct ieee80211_sta' has no member named 'eht_cap'; did you mean 'ht_cap'?
     495 |                 const u8 *rx_nss_mcs = (void *)&sta->sta.eht_cap.eht_mcs_nss_supp;
         |                                                          ^~~~~~~
         |                                                          ht_cap
>> net/mac80211/vht.c:498:40: error: invalid application of 'sizeof' to incomplete type 'struct ieee80211_eht_mcs_nss_supp'
     498 |                 for (i = 0; i < sizeof(struct ieee80211_eht_mcs_nss_supp); i++)
         |                                        ^~~~~~
   In file included from include/linux/kernel.h:26,
                    from include/linux/skbuff.h:13,
                    from include/linux/if_ether.h:19,
                    from include/linux/ieee80211.h:19,
                    from net/mac80211/vht.c:10:
>> net/mac80211/vht.c:501:56: error: 'IEEE80211_EHT_MCS_NSS_RX' undeclared (first use in this function); did you mean 'IEEE80211_HT_MCS_MASK_LEN'?
     501 |                                                        IEEE80211_EHT_MCS_NSS_RX));
         |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:46: note: in definition of macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                              ^
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:112:33: note: in expansion of macro '__careful_cmp'
     112 | #define max_t(type, x, y)       __careful_cmp((type)(x), (type)(y), >)
         |                                 ^~~~~~~~~~~~~
   net/mac80211/vht.c:499:38: note: in expansion of macro 'max_t'
     499 |                         eht_rx_nss = max_t(u8, eht_rx_nss,
         |                                      ^~~~~
   net/mac80211/vht.c:501:56: note: each undeclared identifier is reported only once for each function it appears in
     501 |                                                        IEEE80211_EHT_MCS_NSS_RX));
         |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:46: note: in definition of macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                              ^
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:112:33: note: in expansion of macro '__careful_cmp'
     112 | #define max_t(type, x, y)       __careful_cmp((type)(x), (type)(y), >)
         |                                 ^~~~~~~~~~~~~
   net/mac80211/vht.c:499:38: note: in expansion of macro 'max_t'
     499 |                         eht_rx_nss = max_t(u8, eht_rx_nss,
         |                                      ^~~~~
>> include/linux/minmax.h:36:9: error: first argument to '__builtin_choose_expr' not a constant
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |         ^~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:112:33: note: in expansion of macro '__careful_cmp'
     112 | #define max_t(type, x, y)       __careful_cmp((type)(x), (type)(y), >)
         |                                 ^~~~~~~~~~~~~
   net/mac80211/vht.c:499:38: note: in expansion of macro 'max_t'
     499 |                         eht_rx_nss = max_t(u8, eht_rx_nss,
         |                                      ^~~~~


vim +493 net/mac80211/vht.c

   483	
   484	void ieee80211_sta_set_rx_nss(struct sta_info *sta)
   485	{
   486		u8 ht_rx_nss = 0, vht_rx_nss = 0, he_rx_nss = 0, eht_rx_nss = 0, rx_nss;
   487		bool support_160;
   488	
   489		/* if we received a notification already don't overwrite it */
   490		if (sta->sta.rx_nss)
   491			return;
   492	
 > 493		if (sta->sta.eht_cap.has_eht) {
   494			int i;
   495			const u8 *rx_nss_mcs = (void *)&sta->sta.eht_cap.eht_mcs_nss_supp;
   496	
   497			/* get the max nss for EHT over all possible bandwidths and mcs */
 > 498			for (i = 0; i < sizeof(struct ieee80211_eht_mcs_nss_supp); i++)
   499				eht_rx_nss = max_t(u8, eht_rx_nss,
   500						   u8_get_bits(rx_nss_mcs[i],
 > 501							       IEEE80211_EHT_MCS_NSS_RX));
   502		}
   503	
   504		if (sta->sta.he_cap.has_he) {
   505			int i;
   506			u8 rx_mcs_80 = 0, rx_mcs_160 = 0;
   507			const struct ieee80211_sta_he_cap *he_cap = &sta->sta.he_cap;
   508			u16 mcs_160_map =
   509				le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
   510			u16 mcs_80_map = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80);
   511	
   512			for (i = 7; i >= 0; i--) {
   513				u8 mcs_160 = (mcs_160_map >> (2 * i)) & 3;
   514	
   515				if (mcs_160 != IEEE80211_VHT_MCS_NOT_SUPPORTED) {
   516					rx_mcs_160 = i + 1;
   517					break;
   518				}
   519			}
   520			for (i = 7; i >= 0; i--) {
   521				u8 mcs_80 = (mcs_80_map >> (2 * i)) & 3;
   522	
   523				if (mcs_80 != IEEE80211_VHT_MCS_NOT_SUPPORTED) {
   524					rx_mcs_80 = i + 1;
   525					break;
   526				}
   527			}
   528	
   529			support_160 = he_cap->he_cap_elem.phy_cap_info[0] &
   530				      IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
   531	
   532			if (support_160)
   533				he_rx_nss = min(rx_mcs_80, rx_mcs_160);
   534			else
   535				he_rx_nss = rx_mcs_80;
   536		}
   537	
   538		if (sta->sta.ht_cap.ht_supported) {
   539			if (sta->sta.ht_cap.mcs.rx_mask[0])
   540				ht_rx_nss++;
   541			if (sta->sta.ht_cap.mcs.rx_mask[1])
   542				ht_rx_nss++;
   543			if (sta->sta.ht_cap.mcs.rx_mask[2])
   544				ht_rx_nss++;
   545			if (sta->sta.ht_cap.mcs.rx_mask[3])
   546				ht_rx_nss++;
   547			/* FIXME: consider rx_highest? */
   548		}
   549	
   550		if (sta->sta.vht_cap.vht_supported) {
   551			int i;
   552			u16 rx_mcs_map;
   553	
   554			rx_mcs_map = le16_to_cpu(sta->sta.vht_cap.vht_mcs.rx_mcs_map);
   555	
   556			for (i = 7; i >= 0; i--) {
   557				u8 mcs = (rx_mcs_map >> (2 * i)) & 3;
   558	
   559				if (mcs != IEEE80211_VHT_MCS_NOT_SUPPORTED) {
   560					vht_rx_nss = i + 1;
   561					break;
   562				}
   563			}
   564			/* FIXME: consider rx_highest? */
   565		}
   566	
   567		rx_nss = max(vht_rx_nss, ht_rx_nss);
   568		rx_nss = max(he_rx_nss, rx_nss);
   569		rx_nss = max(eht_rx_nss, rx_nss);
   570		sta->sta.rx_nss = max_t(u8, 1, rx_nss);
   571	}
   572	

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

WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [iwlwifi-next:pending 41/42] net/mac80211/vht.c:493:22: error: 'struct ieee80211_sta' has no member named 'eht_cap'; did you mean 'ht_cap'?
Date: Wed, 02 Feb 2022 06:24:18 +0800	[thread overview]
Message-ID: <202202020632.f5qedDLM-lkp@intel.com> (raw)

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

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git pending
head:   b15caa03d4e21e9e8dbc81f6ac09171a2871af1d
commit: 741d1c0dbb94288b29ba79d187a2898f02d085af [41/42] mac80211: calculate max rx nss for EHT mode
config: nds32-buildonly-randconfig-r002-20220201 (https://download.01.org/0day-ci/archive/20220202/202202020632.f5qedDLM-lkp(a)intel.com/config)
compiler: nds32le-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://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git/commit/?id=741d1c0dbb94288b29ba79d187a2898f02d085af
        git remote add iwlwifi-next https://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git
        git fetch --no-tags iwlwifi-next pending
        git checkout 741d1c0dbb94288b29ba79d187a2898f02d085af
        # 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=nds32 SHELL=/bin/bash net/mac80211/

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/mac80211/vht.c: In function 'ieee80211_sta_set_rx_nss':
>> net/mac80211/vht.c:493:22: error: 'struct ieee80211_sta' has no member named 'eht_cap'; did you mean 'ht_cap'?
     493 |         if (sta->sta.eht_cap.has_eht) {
         |                      ^~~~~~~
         |                      ht_cap
   net/mac80211/vht.c:495:58: error: 'struct ieee80211_sta' has no member named 'eht_cap'; did you mean 'ht_cap'?
     495 |                 const u8 *rx_nss_mcs = (void *)&sta->sta.eht_cap.eht_mcs_nss_supp;
         |                                                          ^~~~~~~
         |                                                          ht_cap
>> net/mac80211/vht.c:498:40: error: invalid application of 'sizeof' to incomplete type 'struct ieee80211_eht_mcs_nss_supp'
     498 |                 for (i = 0; i < sizeof(struct ieee80211_eht_mcs_nss_supp); i++)
         |                                        ^~~~~~
   In file included from include/linux/kernel.h:26,
                    from include/linux/skbuff.h:13,
                    from include/linux/if_ether.h:19,
                    from include/linux/ieee80211.h:19,
                    from net/mac80211/vht.c:10:
>> net/mac80211/vht.c:501:56: error: 'IEEE80211_EHT_MCS_NSS_RX' undeclared (first use in this function); did you mean 'IEEE80211_HT_MCS_MASK_LEN'?
     501 |                                                        IEEE80211_EHT_MCS_NSS_RX));
         |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:46: note: in definition of macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                              ^
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:112:33: note: in expansion of macro '__careful_cmp'
     112 | #define max_t(type, x, y)       __careful_cmp((type)(x), (type)(y), >)
         |                                 ^~~~~~~~~~~~~
   net/mac80211/vht.c:499:38: note: in expansion of macro 'max_t'
     499 |                         eht_rx_nss = max_t(u8, eht_rx_nss,
         |                                      ^~~~~
   net/mac80211/vht.c:501:56: note: each undeclared identifier is reported only once for each function it appears in
     501 |                                                        IEEE80211_EHT_MCS_NSS_RX));
         |                                                        ^~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:20:46: note: in definition of macro '__typecheck'
      20 |         (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
         |                                              ^
   include/linux/minmax.h:36:31: note: in expansion of macro '__safe_cmp'
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |                               ^~~~~~~~~~
   include/linux/minmax.h:112:33: note: in expansion of macro '__careful_cmp'
     112 | #define max_t(type, x, y)       __careful_cmp((type)(x), (type)(y), >)
         |                                 ^~~~~~~~~~~~~
   net/mac80211/vht.c:499:38: note: in expansion of macro 'max_t'
     499 |                         eht_rx_nss = max_t(u8, eht_rx_nss,
         |                                      ^~~~~
>> include/linux/minmax.h:36:9: error: first argument to '__builtin_choose_expr' not a constant
      36 |         __builtin_choose_expr(__safe_cmp(x, y), \
         |         ^~~~~~~~~~~~~~~~~~~~~
   include/linux/minmax.h:112:33: note: in expansion of macro '__careful_cmp'
     112 | #define max_t(type, x, y)       __careful_cmp((type)(x), (type)(y), >)
         |                                 ^~~~~~~~~~~~~
   net/mac80211/vht.c:499:38: note: in expansion of macro 'max_t'
     499 |                         eht_rx_nss = max_t(u8, eht_rx_nss,
         |                                      ^~~~~


vim +493 net/mac80211/vht.c

   483	
   484	void ieee80211_sta_set_rx_nss(struct sta_info *sta)
   485	{
   486		u8 ht_rx_nss = 0, vht_rx_nss = 0, he_rx_nss = 0, eht_rx_nss = 0, rx_nss;
   487		bool support_160;
   488	
   489		/* if we received a notification already don't overwrite it */
   490		if (sta->sta.rx_nss)
   491			return;
   492	
 > 493		if (sta->sta.eht_cap.has_eht) {
   494			int i;
   495			const u8 *rx_nss_mcs = (void *)&sta->sta.eht_cap.eht_mcs_nss_supp;
   496	
   497			/* get the max nss for EHT over all possible bandwidths and mcs */
 > 498			for (i = 0; i < sizeof(struct ieee80211_eht_mcs_nss_supp); i++)
   499				eht_rx_nss = max_t(u8, eht_rx_nss,
   500						   u8_get_bits(rx_nss_mcs[i],
 > 501							       IEEE80211_EHT_MCS_NSS_RX));
   502		}
   503	
   504		if (sta->sta.he_cap.has_he) {
   505			int i;
   506			u8 rx_mcs_80 = 0, rx_mcs_160 = 0;
   507			const struct ieee80211_sta_he_cap *he_cap = &sta->sta.he_cap;
   508			u16 mcs_160_map =
   509				le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_160);
   510			u16 mcs_80_map = le16_to_cpu(he_cap->he_mcs_nss_supp.rx_mcs_80);
   511	
   512			for (i = 7; i >= 0; i--) {
   513				u8 mcs_160 = (mcs_160_map >> (2 * i)) & 3;
   514	
   515				if (mcs_160 != IEEE80211_VHT_MCS_NOT_SUPPORTED) {
   516					rx_mcs_160 = i + 1;
   517					break;
   518				}
   519			}
   520			for (i = 7; i >= 0; i--) {
   521				u8 mcs_80 = (mcs_80_map >> (2 * i)) & 3;
   522	
   523				if (mcs_80 != IEEE80211_VHT_MCS_NOT_SUPPORTED) {
   524					rx_mcs_80 = i + 1;
   525					break;
   526				}
   527			}
   528	
   529			support_160 = he_cap->he_cap_elem.phy_cap_info[0] &
   530				      IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G;
   531	
   532			if (support_160)
   533				he_rx_nss = min(rx_mcs_80, rx_mcs_160);
   534			else
   535				he_rx_nss = rx_mcs_80;
   536		}
   537	
   538		if (sta->sta.ht_cap.ht_supported) {
   539			if (sta->sta.ht_cap.mcs.rx_mask[0])
   540				ht_rx_nss++;
   541			if (sta->sta.ht_cap.mcs.rx_mask[1])
   542				ht_rx_nss++;
   543			if (sta->sta.ht_cap.mcs.rx_mask[2])
   544				ht_rx_nss++;
   545			if (sta->sta.ht_cap.mcs.rx_mask[3])
   546				ht_rx_nss++;
   547			/* FIXME: consider rx_highest? */
   548		}
   549	
   550		if (sta->sta.vht_cap.vht_supported) {
   551			int i;
   552			u16 rx_mcs_map;
   553	
   554			rx_mcs_map = le16_to_cpu(sta->sta.vht_cap.vht_mcs.rx_mcs_map);
   555	
   556			for (i = 7; i >= 0; i--) {
   557				u8 mcs = (rx_mcs_map >> (2 * i)) & 3;
   558	
   559				if (mcs != IEEE80211_VHT_MCS_NOT_SUPPORTED) {
   560					vht_rx_nss = i + 1;
   561					break;
   562				}
   563			}
   564			/* FIXME: consider rx_highest? */
   565		}
   566	
   567		rx_nss = max(vht_rx_nss, ht_rx_nss);
   568		rx_nss = max(he_rx_nss, rx_nss);
   569		rx_nss = max(eht_rx_nss, rx_nss);
   570		sta->sta.rx_nss = max_t(u8, 1, rx_nss);
   571	}
   572	

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

             reply	other threads:[~2022-02-01 22:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-01 22:24 kernel test robot [this message]
2022-02-01 22:24 ` [iwlwifi-next:pending 41/42] net/mac80211/vht.c:493:22: error: 'struct ieee80211_sta' has no member named 'eht_cap'; did you mean 'ht_cap'? kernel test robot

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=202202020632.f5qedDLM-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luciano.coelho@intel.com \
    --cc=mordechay.goodstein@intel.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.