Hi Johannes, Thank you for the patch! Yet something to improve: [auto build test ERROR on mac80211-next/master] [also build test ERROR on mac80211/master v5.9-rc5 next-20200917] [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/Johannes-Berg/nl80211-cfg80211-support-6-GHz-scanning/20200917-170112 base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master config: powerpc64-randconfig-r035-20200917 (attached as .config) compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1321160a26e7e489baf9b10d6de90a342f898960) 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 # install powerpc64 cross compiling tool for clang build # apt-get install binutils-powerpc64-linux-gnu # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All errors (new ones prefixed by >>): In file included from include/linux/skbuff.h:31: In file included from include/linux/dma-mapping.h:11: In file included from include/linux/scatterlist.h:9: In file included from arch/powerpc/include/asm/io.h:604: arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:213:1: note: expanded from here __do_insw ^ arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw' #define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from net/wireless/scan.c:13: In file included from include/linux/netdevice.h:37: In file included from include/linux/ethtool.h:18: In file included from include/uapi/linux/ethtool.h:19: In file included from include/linux/if_ether.h:19: In file included from include/linux/skbuff.h:31: In file included from include/linux/dma-mapping.h:11: In file included from include/linux/scatterlist.h:9: In file included from arch/powerpc/include/asm/io.h:604: arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:215:1: note: expanded from here __do_insl ^ arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl' #define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from net/wireless/scan.c:13: In file included from include/linux/netdevice.h:37: In file included from include/linux/ethtool.h:18: In file included from include/uapi/linux/ethtool.h:19: In file included from include/linux/if_ether.h:19: In file included from include/linux/skbuff.h:31: In file included from include/linux/dma-mapping.h:11: In file included from include/linux/scatterlist.h:9: In file included from arch/powerpc/include/asm/io.h:604: arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:217:1: note: expanded from here __do_outsb ^ arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb' #define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from net/wireless/scan.c:13: In file included from include/linux/netdevice.h:37: In file included from include/linux/ethtool.h:18: In file included from include/uapi/linux/ethtool.h:19: In file included from include/linux/if_ether.h:19: In file included from include/linux/skbuff.h:31: In file included from include/linux/dma-mapping.h:11: In file included from include/linux/scatterlist.h:9: In file included from arch/powerpc/include/asm/io.h:604: arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:219:1: note: expanded from here __do_outsw ^ arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw' #define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ In file included from net/wireless/scan.c:13: In file included from include/linux/netdevice.h:37: In file included from include/linux/ethtool.h:18: In file included from include/uapi/linux/ethtool.h:19: In file included from include/linux/if_ether.h:19: In file included from include/linux/skbuff.h:31: In file included from include/linux/dma-mapping.h:11: In file included from include/linux/scatterlist.h:9: In file included from arch/powerpc/include/asm/io.h:604: arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic] DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c), ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET' __do_##name al; \ ^~~~~~~~~~~~~~ <scratch space>:221:1: note: expanded from here __do_outsl ^ arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl' #define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n)) ~~~~~~~~~~~~~~~~~~~~~^ >> net/wireless/scan.c:839:7: error: implicit declaration of function 'cfg80211_is_psc' [-Werror,-Wimplicit-function-declaration] if (cfg80211_is_psc(chan) && !need_scan_psc) ^ 12 warnings and 1 error generated. # https://github.com/0day-ci/linux/commit/6c8ef71e4783e7524ee2a59e264dd67676a5f532 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Johannes-Berg/nl80211-cfg80211-support-6-GHz-scanning/20200917-170112 git checkout 6c8ef71e4783e7524ee2a59e264dd67676a5f532 vim +/cfg80211_is_psc +839 net/wireless/scan.c 720 721 static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev) 722 { 723 u8 i; 724 struct cfg80211_colocated_ap *ap; 725 int n_channels, count = 0, err; 726 struct cfg80211_scan_request *request, *rdev_req = rdev->scan_req; 727 LIST_HEAD(coloc_ap_list); 728 bool need_scan_psc; 729 const struct ieee80211_sband_iftype_data *iftd; 730 731 rdev_req->scan_6ghz = true; 732 733 if (!rdev->wiphy.bands[NL80211_BAND_6GHZ]) 734 return -EOPNOTSUPP; 735 736 iftd = ieee80211_get_sband_iftype_data(rdev->wiphy.bands[NL80211_BAND_6GHZ], 737 rdev_req->wdev->iftype); 738 if (!iftd || !iftd->he_cap.has_he) 739 return -EOPNOTSUPP; 740 741 n_channels = rdev->wiphy.bands[NL80211_BAND_6GHZ]->n_channels; 742 743 if (rdev_req->flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ) { 744 struct cfg80211_internal_bss *intbss; 745 746 spin_lock_bh(&rdev->bss_lock); 747 list_for_each_entry(intbss, &rdev->bss_list, list) { 748 struct cfg80211_bss *res = &intbss->pub; 749 750 count += cfg80211_parse_colocated_ap(res->ies, 751 &coloc_ap_list); 752 } 753 spin_unlock_bh(&rdev->bss_lock); 754 } 755 756 request = kzalloc(struct_size(request, channels, n_channels) + 757 sizeof(*request->scan_6ghz_params) * count, 758 GFP_KERNEL); 759 if (!request) { 760 cfg80211_free_coloc_ap_list(&coloc_ap_list); 761 return -ENOMEM; 762 } 763 764 *request = *rdev_req; 765 request->n_channels = 0; 766 request->scan_6ghz_params = 767 (void *)&request->channels[n_channels]; 768 769 /* 770 * PSC channels should not be scanned if all the reported co-located APs 771 * are indicating that all APs in the same ESS are co-located 772 */ 773 if (count) { 774 need_scan_psc = false; 775 776 list_for_each_entry(ap, &coloc_ap_list, list) { 777 if (!ap->colocated_ess) { 778 need_scan_psc = true; 779 break; 780 } 781 } 782 } else { 783 need_scan_psc = true; 784 } 785 786 /* 787 * add to the scan request the channels that need to be scanned 788 * regardless of the collocated APs (PSC channels or all channels 789 * in case that NL80211_SCAN_FLAG_COLOCATED_6GHZ is not set) 790 */ 791 for (i = 0; i < rdev_req->n_channels; i++) { 792 if (rdev_req->channels[i]->band == NL80211_BAND_6GHZ && 793 ((need_scan_psc && 794 cfg80211_channel_is_psc(rdev_req->channels[i])) || 795 !(rdev_req->flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ))) { 796 cfg80211_scan_req_add_chan(request, 797 rdev_req->channels[i], 798 false); 799 } 800 } 801 802 if (!(rdev_req->flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ)) 803 goto skip; 804 805 list_for_each_entry(ap, &coloc_ap_list, list) { 806 bool found = false; 807 struct cfg80211_scan_6ghz_params *scan_6ghz_params = 808 &request->scan_6ghz_params[request->n_6ghz_params]; 809 struct ieee80211_channel *chan = 810 ieee80211_get_channel(&rdev->wiphy, ap->center_freq); 811 812 if (!chan || chan->flags & IEEE80211_CHAN_DISABLED) 813 continue; 814 815 for (i = 0; i < rdev_req->n_channels; i++) { 816 if (rdev_req->channels[i] == chan) 817 found = true; 818 } 819 820 if (!found) 821 continue; 822 823 if (request->n_ssids > 0 && 824 !cfg80211_find_ssid_match(ap, request)) 825 continue; 826 827 cfg80211_scan_req_add_chan(request, chan, true); 828 memcpy(scan_6ghz_params->bssid, ap->bssid, ETH_ALEN); 829 scan_6ghz_params->short_ssid = ap->short_ssid; 830 scan_6ghz_params->short_ssid_valid = ap->short_ssid_valid; 831 scan_6ghz_params->unsolicited_probe = ap->unsolicited_probe; 832 833 /* 834 * If a PSC channel is added to the scan and 'need_scan_psc' is 835 * set to false, then all the APs that the scan logic is 836 * interested with on the channel are collocated and thus there 837 * is no need to perform the initial PSC channel listen. 838 */ > 839 if (cfg80211_is_psc(chan) && !need_scan_psc) 840 scan_6ghz_params->psc_no_listen = true; 841 842 request->n_6ghz_params++; 843 } 844 845 skip: 846 cfg80211_free_coloc_ap_list(&coloc_ap_list); 847 848 if (request->n_channels) { 849 struct cfg80211_scan_request *old = rdev->int_scan_req; 850 851 rdev->int_scan_req = request; 852 853 /* 854 * If this scan follows a previous scan, save the scan start 855 * info from the first part of the scan 856 */ 857 if (old) 858 rdev->int_scan_req->info = old->info; 859 860 err = rdev_scan(rdev, request); 861 if (err) { 862 rdev->int_scan_req = old; 863 kfree(request); 864 } else { 865 kfree(old); 866 } 867 868 return err; 869 } 870 871 kfree(request); 872 return -EINVAL; 873 } 874 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip