Hi Luca,

I love your patch! Yet something to improve:

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on next-20180608]
[cannot apply to v4.17]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:    
https://github.com/0day-ci/linux/commits/Luca-Coelho/cfg80211-mac80211-add-support-for-IEEE802-11ax/20180609-065018
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git 
master
config: x86_64-randconfig-x018-201822 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

Note: the 
linux-review/Luca-Coelho/cfg80211-mac80211-add-support-for-IEEE802-11ax/20180609-065018
 HEAD a5988005673125579d32941fcb33b0d7c9d79ee5 builds fine.
      It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from arch/x86/include/asm/bug.h:83:0,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from include/linux/uio.h:13,
                    from include/linux/socket.h:8,
                    from include/uapi/linux/if.h:25,
                    from net/wireless/core.c:11:
   net/wireless/core.c: In function 'wiphy_register':
>> net/wireless/core.c:798:23: error: 'const struct 
>> ieee80211_sband_iftype_data' has no member named 'types'; did you mean 
>> 'types_mask'?
       if (WARN_ON(!iftd->types))
                          ^
   include/asm-generic/bug.h:112:25: note: in definition of macro 'WARN_ON'
     int __ret_warn_on = !!(condition);    \
                            ^~~~~~~~~
   net/wireless/core.c:800:30: error: 'const struct 
ieee80211_sband_iftype_data' has no member named 'types'; did you mean 
'types_mask'?
       if (WARN_ON(types & iftd->types))
                                 ^
   include/asm-generic/bug.h:112:25: note: in definition of macro 'WARN_ON'
     int __ret_warn_on = !!(condition);    \
                            ^~~~~~~~~
   net/wireless/core.c:807:19: error: 'const struct 
ieee80211_sband_iftype_data' has no member named 'types'; did you mean 
'types_mask'?
       types |= iftd->types;
                      ^~~~~
                      types_mask

vim +798 net/wireless/core.c

   666  
   667          /*
   668           * if a wiphy has unsupported modes for regulatory channel 
enforcement,
   669           * opt-out of enforcement checking
   670           */
   671          if (wiphy->interface_modes & ~(BIT(NL80211_IFTYPE_STATION) |
   672                                         BIT(NL80211_IFTYPE_P2P_CLIENT) |
   673                                         BIT(NL80211_IFTYPE_AP) |
   674                                         BIT(NL80211_IFTYPE_P2P_GO) |
   675                                         BIT(NL80211_IFTYPE_ADHOC) |
   676                                         BIT(NL80211_IFTYPE_P2P_DEVICE) |
   677                                         BIT(NL80211_IFTYPE_NAN) |
   678                                         BIT(NL80211_IFTYPE_AP_VLAN) |
   679                                         BIT(NL80211_IFTYPE_MONITOR)))
   680                  wiphy->regulatory_flags |= 
REGULATORY_IGNORE_STALE_KICKOFF;
   681  
   682          if (WARN_ON((wiphy->regulatory_flags & 
REGULATORY_WIPHY_SELF_MANAGED) &&
   683                      (wiphy->regulatory_flags &
   684                                          (REGULATORY_CUSTOM_REG |
   685                                           REGULATORY_STRICT_REG |
   686                                           
REGULATORY_COUNTRY_IE_FOLLOW_POWER |
   687                                           
REGULATORY_COUNTRY_IE_IGNORE))))
   688                  return -EINVAL;
   689  
   690          if (WARN_ON(wiphy->coalesce &&
   691                      (!wiphy->coalesce->n_rules ||
   692                       !wiphy->coalesce->n_patterns) &&
   693                      (!wiphy->coalesce->pattern_min_len ||
   694                       wiphy->coalesce->pattern_min_len >
   695                          wiphy->coalesce->pattern_max_len)))
   696                  return -EINVAL;
   697  
   698          if (WARN_ON(wiphy->ap_sme_capa &&
   699                      !(wiphy->flags & WIPHY_FLAG_HAVE_AP_SME)))
   700                  return -EINVAL;
   701  
   702          if (WARN_ON(wiphy->addresses && !wiphy->n_addresses))
   703                  return -EINVAL;
   704  
   705          if (WARN_ON(wiphy->addresses &&
   706                      !is_zero_ether_addr(wiphy->perm_addr) &&
   707                      memcmp(wiphy->perm_addr, wiphy->addresses[0].addr,
   708                             ETH_ALEN)))
   709                  return -EINVAL;
   710  
   711          if (WARN_ON(wiphy->max_acl_mac_addrs &&
   712                      (!(wiphy->flags & WIPHY_FLAG_HAVE_AP_SME) ||
   713                       !rdev->ops->set_mac_acl)))
   714                  return -EINVAL;
   715  
   716          /* assure only valid behaviours are flagged by driver
   717           * hence subtract 2 as bit 0 is invalid.
   718           */
   719          if (WARN_ON(wiphy->bss_select_support &&
   720                      (wiphy->bss_select_support & 
~(BIT(__NL80211_BSS_SELECT_ATTR_AFTER_LAST) - 2))))
   721                  return -EINVAL;
   722  
   723          if (WARN_ON(wiphy_ext_feature_isset(&rdev->wiphy,
   724                                              
NL80211_EXT_FEATURE_4WAY_HANDSHAKE_STA_1X) &&
   725                      (!rdev->ops->set_pmk || !rdev->ops->del_pmk)))
   726                  return -EINVAL;
   727  
   728          if (WARN_ON(!(rdev->wiphy.flags & WIPHY_FLAG_SUPPORTS_FW_ROAM) 
&&
   729                      rdev->ops->update_connect_params))
   730                  return -EINVAL;
   731  
   732          if (wiphy->addresses)
   733                  memcpy(wiphy->perm_addr, wiphy->addresses[0].addr, 
ETH_ALEN);
   734  
   735          /* sanity check ifmodes */
   736          WARN_ON(!ifmodes);
   737          ifmodes &= ((1 << NUM_NL80211_IFTYPES) - 1) & ~1;
   738          if (WARN_ON(ifmodes != wiphy->interface_modes))
   739                  wiphy->interface_modes = ifmodes;
   740  
   741          res = wiphy_verify_combinations(wiphy);
   742          if (res)
   743                  return res;
   744  
   745          /* sanity check supported bands/channels */
   746          for (band = 0; band < NUM_NL80211_BANDS; band++) {
   747                  u16 types = 0;
   748  
   749                  sband = wiphy->bands[band];
   750                  if (!sband)
   751                          continue;
   752  
   753                  sband->band = band;
   754                  if (WARN_ON(!sband->n_channels))
   755                          return -EINVAL;
   756                  /*
   757                   * on 60GHz band, there are no legacy rates, so
   758                   * n_bitrates is 0
   759                   */
   760                  if (WARN_ON(band != NL80211_BAND_60GHZ &&
   761                              !sband->n_bitrates))
   762                          return -EINVAL;
   763  
   764                  /*
   765                   * Since cfg80211_disable_40mhz_24ghz is global, we can
   766                   * modify the sband's ht data even if the driver uses a
   767                   * global structure for that.
   768                   */
   769                  if (cfg80211_disable_40mhz_24ghz &&
   770                      band == NL80211_BAND_2GHZ &&
   771                      sband->ht_cap.ht_supported) {
   772                          sband->ht_cap.cap &= 
~IEEE80211_HT_CAP_SUP_WIDTH_20_40;
   773                          sband->ht_cap.cap &= ~IEEE80211_HT_CAP_SGI_40;
   774                  }
   775  
   776                  /*
   777                   * Since we use a u32 for rate bitmaps in
   778                   * ieee80211_get_response_rate, we cannot
   779                   * have more than 32 legacy rates.
   780                   */
   781                  if (WARN_ON(sband->n_bitrates > 32))
   782                          return -EINVAL;
   783  
   784                  for (i = 0; i < sband->n_channels; i++) {
   785                          sband->channels[i].orig_flags =
   786                                  sband->channels[i].flags;
   787                          sband->channels[i].orig_mag = INT_MAX;
   788                          sband->channels[i].orig_mpwr =
   789                                  sband->channels[i].max_power;
   790                          sband->channels[i].band = band;
   791                  }
   792  
   793                  for (i = 0; i < sband->n_iftype_data; i++) {
   794                          const struct ieee80211_sband_iftype_data *iftd;
   795  
   796                          iftd = &sband->iftype_data[i];
   797  
 > 798                          if (WARN_ON(!iftd->types))
   799                                  return -EINVAL;
   800                          if (WARN_ON(types & iftd->types))
   801                                  return -EINVAL;
   802  
   803                          /* at least one piece of information must be 
present */
   804                          if (WARN_ON(!iftd->he_cap.has_he))
   805                                  return -EINVAL;
   806  
   807                          types |= iftd->types;
   808                  }
   809  
   810                  have_band = true;
   811          }
   812  
   813          if (!have_band) {
   814                  WARN_ON(1);
   815                  return -EINVAL;
   816          }
   817  

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

Attachment: .config.gz
Description: application/gzip

Reply via email to