Search Linux Wireless

Re: [PATCH v2 3/9] cfg80211: add add_nan_func / rm_nan_func

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Ayala,

[auto build test ERROR on mac80211-next/master]
[also build test ERROR on next-20160916]
[cannot apply to v4.8-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
[Suggest to use git(>=2.9.0) format-patch --base=<commit> (or --base=auto for convenience) to record what (public, well-known) commit your patch series was built on]
[Check https://git-scm.com/docs/git-format-patch for more information]

url:    https://github.com/0day-ci/linux/commits/Luca-Coelho/Add-support-for-Neighbor-Awareness-Networking/20160916-164553
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git master
config: x86_64-lkp (attached as .config)
compiler: gcc-6 (Debian 6.1.1-9) 6.1.1 20160705
reproduce:
        # save the attached .config to linux build tree
        make ARCH=x86_64 

All errors (new ones prefixed by >>):

   net/wireless/nl80211.c: In function 'nl80211_nan_add_func':
>> net/wireless/nl80211.c:10588:30: error: implicit declaration of function 'genl_info_snd_portid' [-Werror=implicit-function-declaration]
         wdev->owner_nlportid != genl_info_snd_portid(info))
                                 ^~~~~~~~~~~~~~~~~~~~
>> net/wireless/nl80211.c:10785:6: error: implicit declaration of function 'nla_put_u64' [-Werror=implicit-function-declaration]
     if (nla_put_u64(msg, NL80211_ATTR_COOKIE, func->cookie))
         ^~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/genl_info_snd_portid +10588 net/wireless/nl80211.c

 10582			return -ENOTCONN;
 10583	
 10584		if (!info->attrs[NL80211_ATTR_NAN_FUNC])
 10585			return -EINVAL;
 10586	
 10587		if (wdev->owner_nlportid &&
 10588		    wdev->owner_nlportid != genl_info_snd_portid(info))
 10589			return -ENOTCONN;
 10590	
 10591		err = nla_parse(tb, NL80211_NAN_FUNC_ATTR_MAX,
 10592				nla_data(info->attrs[NL80211_ATTR_NAN_FUNC]),
 10593				nla_len(info->attrs[NL80211_ATTR_NAN_FUNC]),
 10594				nl80211_nan_func_policy);
 10595		if (err)
 10596			return err;
 10597	
 10598		func = kzalloc(sizeof(*func), GFP_KERNEL);
 10599		if (!func)
 10600			return -ENOMEM;
 10601	
 10602		func->cookie = wdev->wiphy->cookie_counter++;
 10603	
 10604		if (!tb[NL80211_NAN_FUNC_TYPE] ||
 10605		    nla_get_u8(tb[NL80211_NAN_FUNC_TYPE]) > NL80211_NAN_FUNC_MAX_TYPE) {
 10606			err = -EINVAL;
 10607			goto out;
 10608		}
 10609	
 10610	
 10611		func->type = nla_get_u8(tb[NL80211_NAN_FUNC_TYPE]);
 10612	
 10613		if (!tb[NL80211_NAN_FUNC_SERVICE_ID]) {
 10614			err = -EINVAL;
 10615			goto out;
 10616		}
 10617	
 10618		memcpy(func->service_id, nla_data(tb[NL80211_NAN_FUNC_SERVICE_ID]),
 10619		       sizeof(func->service_id));
 10620	
 10621		func->close_range =
 10622			nla_get_flag(tb[NL80211_NAN_FUNC_CLOSE_RANGE]);
 10623	
 10624		if (tb[NL80211_NAN_FUNC_SERVICE_INFO]) {
 10625			func->serv_spec_info_len =
 10626				nla_len(tb[NL80211_NAN_FUNC_SERVICE_INFO]);
 10627			func->serv_spec_info =
 10628				kmemdup(nla_data(tb[NL80211_NAN_FUNC_SERVICE_INFO]),
 10629					func->serv_spec_info_len,
 10630					GFP_KERNEL);
 10631			if (!func->serv_spec_info) {
 10632				err = -ENOMEM;
 10633				goto out;
 10634			}
 10635		}
 10636	
 10637		if (tb[NL80211_NAN_FUNC_TTL])
 10638			func->ttl = nla_get_u32(tb[NL80211_NAN_FUNC_TTL]);
 10639	
 10640		switch (func->type) {
 10641		case NL80211_NAN_FUNC_PUBLISH:
 10642			if (!tb[NL80211_NAN_FUNC_PUBLISH_TYPE]) {
 10643				err = -EINVAL;
 10644				goto out;
 10645			}
 10646	
 10647			func->publish_type =
 10648				nla_get_u8(tb[NL80211_NAN_FUNC_PUBLISH_TYPE]);
 10649			func->publish_bcast =
 10650				nla_get_flag(tb[NL80211_NAN_FUNC_PUBLISH_BCAST]);
 10651	
 10652			if ((!(func->publish_type & NL80211_NAN_SOLICITED_PUBLISH)) &&
 10653				func->publish_bcast) {
 10654				err = -EINVAL;
 10655				goto out;
 10656			}
 10657			break;
 10658		case NL80211_NAN_FUNC_SUBSCRIBE:
 10659			func->subscribe_active =
 10660				nla_get_flag(tb[NL80211_NAN_FUNC_SUBSCRIBE_ACTIVE]);
 10661			break;
 10662		case NL80211_NAN_FUNC_FOLLOW_UP:
 10663			if (!tb[NL80211_NAN_FUNC_FOLLOW_UP_ID] ||
 10664			    !tb[NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID]) {
 10665				err = -EINVAL;
 10666				goto out;
 10667			}
 10668	
 10669			func->followup_id =
 10670				nla_get_u8(tb[NL80211_NAN_FUNC_FOLLOW_UP_ID]);
 10671			func->followup_reqid =
 10672				nla_get_u8(tb[NL80211_NAN_FUNC_FOLLOW_UP_REQ_ID]);
 10673			memcpy(func->followup_dest.addr,
 10674			       nla_data(tb[NL80211_NAN_FUNC_FOLLOW_UP_DEST]),
 10675			       sizeof(func->followup_dest.addr));
 10676			if (func->ttl) {
 10677				err = -EINVAL;
 10678				goto out;
 10679			}
 10680			break;
 10681		default:
 10682			err = -EINVAL;
 10683			goto out;
 10684		}
 10685	
 10686		if (tb[NL80211_NAN_FUNC_SRF]) {
 10687			struct nlattr *srf_tb[NUM_NL80211_NAN_SRF_ATTR];
 10688	
 10689			err = nla_parse(srf_tb, NL80211_NAN_SRF_ATTR_MAX,
 10690					nla_data(tb[NL80211_NAN_FUNC_SRF]),
 10691					nla_len(tb[NL80211_NAN_FUNC_SRF]), NULL);
 10692			if (err)
 10693				goto out;
 10694	
 10695			func->srf_include =
 10696				nla_get_flag(srf_tb[NL80211_NAN_SRF_INCLUDE]);
 10697	
 10698			if (srf_tb[NL80211_NAN_SRF_BF]) {
 10699				if (srf_tb[NL80211_NAN_SRF_MAC_ADDRS] ||
 10700				    !srf_tb[NL80211_NAN_SRF_BF_IDX]) {
 10701					err = -EINVAL;
 10702					goto out;
 10703				}
 10704	
 10705				func->srf_bf_len =
 10706					nla_len(srf_tb[NL80211_NAN_SRF_BF]);
 10707				func->srf_bf =
 10708					kmemdup(nla_data(srf_tb[NL80211_NAN_SRF_BF]),
 10709						func->srf_bf_len, GFP_KERNEL);
 10710				if (!func->srf_bf) {
 10711					err = -ENOMEM;
 10712					goto out;
 10713				}
 10714	
 10715				func->srf_bf_idx =
 10716					nla_get_u8(srf_tb[NL80211_NAN_SRF_BF_IDX]);
 10717			} else {
 10718				struct nlattr *attr, *mac_attr =
 10719					srf_tb[NL80211_NAN_SRF_MAC_ADDRS];
 10720				int n_entries, rem, i = 0;
 10721	
 10722				if (!mac_attr) {
 10723					err = -EINVAL;
 10724					goto out;
 10725				}
 10726	
 10727				n_entries = validate_acl_mac_addrs(mac_attr);
 10728				if (n_entries <= 0) {
 10729					err = -EINVAL;
 10730					goto out;
 10731				}
 10732	
 10733				func->srf_num_macs = n_entries;
 10734				func->srf_macs =
 10735					kzalloc(sizeof(*func->srf_macs) * n_entries,
 10736						GFP_KERNEL);
 10737				if (!func->srf_macs) {
 10738					err = -ENOMEM;
 10739					goto out;
 10740				}
 10741	
 10742				nla_for_each_nested(attr, mac_attr, rem)
 10743					memcpy(func->srf_macs[i++].addr, nla_data(attr),
 10744					       sizeof(*func->srf_macs));
 10745			}
 10746		}
 10747	
 10748		if (tb[NL80211_NAN_FUNC_TX_MATCH_FILTER]) {
 10749			err = handle_nan_filter(tb[NL80211_NAN_FUNC_TX_MATCH_FILTER],
 10750						func, true);
 10751			if (err)
 10752				goto out;
 10753		}
 10754	
 10755		if (tb[NL80211_NAN_FUNC_RX_MATCH_FILTER]) {
 10756			err = handle_nan_filter(tb[NL80211_NAN_FUNC_RX_MATCH_FILTER],
 10757						func, false);
 10758			if (err)
 10759				goto out;
 10760		}
 10761	
 10762		msg = nlmsg_new(NLMSG_DEFAULT_SIZE, GFP_KERNEL);
 10763		if (!msg) {
 10764			err = -ENOMEM;
 10765			goto out;
 10766		}
 10767	
 10768		hdr = nl80211hdr_put(msg, genl_info_snd_portid(info), info->snd_seq, 0,
 10769				     NL80211_CMD_ADD_NAN_FUNCTION);
 10770		/* This can't really happen - we just allocated 4KB */
 10771		if (WARN_ON(!hdr)) {
 10772			err = -ENOMEM;
 10773			goto out;
 10774		}
 10775	
 10776		err = rdev_add_nan_func(rdev, wdev, func);
 10777	out:
 10778		if (err < 0) {
 10779			cfg80211_free_nan_func(func);
 10780			nlmsg_free(msg);
 10781			return err;
 10782		}
 10783	
 10784		/* propagate the instance id and cookie to userspace  */
 10785		if (nla_put_u64(msg, NL80211_ATTR_COOKIE, func->cookie))
 10786			goto nla_put_failure;
 10787	
 10788		func_attr = nla_nest_start(msg, NL80211_ATTR_NAN_FUNC);

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

Attachment: .config.gz
Description: Binary data


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux