Hi Johannes, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on mac80211-next/master] [also build test WARNING on next-20200529] [cannot apply to mac80211/master v5.7-rc7] [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/Johannes-Berg/nl80211-really-allow-client-only-BIGTK-support/20200528-230010 base: https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master config: i386-randconfig-s002-20200529 (attached as .config) compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.1-243-gc100a7ab-dirty # save the attached .config to linux build tree make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot sparse warnings: (new ones prefixed by >>) >> net/wireless/scan.c:744:65: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct cfg80211_bss_ies const *ies @@ got struct cfg80211_bss_ies const [noderef] *ies @@ >> net/wireless/scan.c:744:65: sparse: expected struct cfg80211_bss_ies const *ies >> net/wireless/scan.c:744:65: sparse: got struct cfg80211_bss_ies const [noderef] *ies -- >> net/wireless/nl80211.c:7996:28: sparse: sparse: too many arguments for function cfg80211_scan vim +744 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 730 rdev_req->scan_6ghz = true; 731 732 if (!rdev->wiphy.bands[NL80211_BAND_6GHZ]) 733 return -EOPNOTSUPP; 734 735 n_channels = rdev->wiphy.bands[NL80211_BAND_6GHZ]->n_channels; 736 737 if (rdev_req->flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ) { 738 struct cfg80211_internal_bss *intbss; 739 740 spin_lock_bh(&rdev->bss_lock); 741 list_for_each_entry(intbss, &rdev->bss_list, list) { 742 struct cfg80211_bss *res = &intbss->pub; 743 > 744 count += cfg80211_parse_colocated_ap(res->ies, 745 &coloc_ap_list); 746 } 747 spin_unlock_bh(&rdev->bss_lock); 748 } 749 750 request = kzalloc(struct_size(request, channels, n_channels) + 751 sizeof(*request->scan_6ghz_params) * count, 752 GFP_KERNEL); 753 if (!request) { 754 cfg80211_free_coloc_ap_list(&coloc_ap_list); 755 return -ENOMEM; 756 } 757 758 *request = *rdev_req; 759 request->n_channels = 0; 760 request->scan_6ghz_params = 761 (void *)&request->channels[n_channels]; 762 763 /* 764 * PSC channels should not be scanned if all the reported co-located APs 765 * are indicating that all APs in the same ESS are co-located 766 */ 767 if (count) { 768 need_scan_psc = false; 769 770 list_for_each_entry(ap, &coloc_ap_list, list) { 771 if (!ap->colocated_ess) { 772 need_scan_psc = true; 773 break; 774 } 775 } 776 } else { 777 need_scan_psc = true; 778 } 779 780 /* 781 * add to the scan request the channels that need to be scanned 782 * regardless of the collocated APs (PSC channels or all channels 783 * in case that NL80211_SCAN_FLAG_COLOCATED_6GHZ is not set) 784 */ 785 for (i = 0; i < rdev_req->n_channels; i++) { 786 if (rdev_req->channels[i]->band == NL80211_BAND_6GHZ && 787 ((need_scan_psc && 788 cfg80211_channel_is_psc(rdev_req->channels[i])) || 789 !(rdev_req->flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ))) { 790 cfg80211_scan_req_add_chan(request, 791 rdev_req->channels[i], 792 false); 793 } 794 } 795 796 if (!(rdev_req->flags & NL80211_SCAN_FLAG_COLOCATED_6GHZ)) 797 goto skip; 798 799 list_for_each_entry(ap, &coloc_ap_list, list) { 800 bool found = false; 801 struct cfg80211_scan_6ghz_params *scan_6ghz_params = 802 &request->scan_6ghz_params[request->n_6ghz_params]; 803 struct ieee80211_channel *chan = 804 ieee80211_get_channel(&rdev->wiphy, ap->center_freq); 805 806 if (!chan || chan->flags & IEEE80211_CHAN_DISABLED) 807 continue; 808 809 for (i = 0; i < rdev_req->n_channels; i++) { 810 if (rdev_req->channels[i] == chan) 811 found = true; 812 } 813 814 if (!found) 815 continue; 816 817 if (request->n_ssids > 0 && 818 !cfg80211_find_ssid_match(ap, request)) 819 continue; 820 821 cfg80211_scan_req_add_chan(request, chan, true); 822 memcpy(scan_6ghz_params->bssid, ap->bssid, ETH_ALEN); 823 scan_6ghz_params->short_ssid = ap->short_ssid; 824 scan_6ghz_params->short_ssid_valid = ap->short_ssid_valid; 825 scan_6ghz_params->unsolicited_probe = ap->unsolicited_probe; 826 request->n_6ghz_params++; 827 } 828 829 skip: 830 cfg80211_free_coloc_ap_list(&coloc_ap_list); 831 832 if (request->n_channels) { 833 struct cfg80211_scan_request *old = rdev->int_scan_req; 834 835 rdev->int_scan_req = request; 836 837 /* 838 * If this scan follows a previous scan, save the scan start 839 * info from the first part of the scan 840 */ 841 if (old) 842 rdev->int_scan_req->info = old->info; 843 844 err = rdev_scan(rdev, request); 845 if (err) { 846 rdev->int_scan_req = old; 847 kfree(request); 848 } else { 849 kfree(old); 850 } 851 852 return err; 853 } 854 855 kfree(request); 856 return -EINVAL; 857 } 858 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org