get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.0/patches/2198422/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2198422,
    "url": "http://patchwork.ozlabs.org/api/1.0/patches/2198422/?format=api",
    "project": {
        "id": 22,
        "url": "http://patchwork.ozlabs.org/api/1.0/projects/22/?format=api",
        "name": "HostAP Development",
        "link_name": "hostap",
        "list_id": "hostap.lists.infradead.org",
        "list_email": "hostap@lists.infradead.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20260219202514.5781-26-andrei.otcheretianski@intel.com>",
    "date": "2026-02-19T20:24:41",
    "name": "[25/58] NAN: Add validation of peer availability",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "133f09d59a5005c2d4ffdb88e750bc7ac3df7873",
    "submitter": {
        "id": 62065,
        "url": "http://patchwork.ozlabs.org/api/1.0/people/62065/?format=api",
        "name": "Andrei Otcheretianski",
        "email": "andrei.otcheretianski@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/hostap/patch/20260219202514.5781-26-andrei.otcheretianski@intel.com/mbox/",
    "series": [
        {
            "id": 492721,
            "url": "http://patchwork.ozlabs.org/api/1.0/series/492721/?format=api",
            "date": "2026-02-19T20:24:21",
            "name": "NAN: Add NAN Data Path (NDP) support",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/492721/mbox/"
        }
    ],
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2198422/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "\n <hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": "patchwork-incoming@legolas.ozlabs.org",
        "Authentication-Results": [
            "legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mSvRc9Dk;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=E2kekHTc;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fH4gj353xz1xpY\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 20 Feb 2026 07:27:45 +1100 (AEDT)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vtAcG-0000000BxlT-0mk0;\n\tThu, 19 Feb 2026 20:27:16 +0000",
            "from mgamail.intel.com ([198.175.65.10])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1vtAbr-0000000Bwog-0Jn8\n\tfor hostap@lists.infradead.org;\n\tThu, 19 Feb 2026 20:27:06 +0000",
            "from orviesa004.jf.intel.com ([10.64.159.144])\n  by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2026 12:26:43 -0800",
            "from aotchere-mobl1.ger.corp.intel.com (HELO\n aotchere-mobl1.intel.com) ([10.245.246.171])\n  by orviesa004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 19 Feb 2026 12:26:40 -0800"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=xCui9TENZEQ7T/x6kw+R+rrxS36o88TgwLG9+JxDLMk=; b=mSvRc9Dklu9Hvt\n\t9+Ffpz4aClbh4fLuA4Ud9Fg16XbQzeKB4QT0hILMAkzm/Txh+3ZptxeYzVFn4GCxnLrIq4Xly9fqF\n\t7xG3fi/3KduR8lQS2CvpMEQsakIJ0NhW3MSKBLtS7xbOtzjdwVwP+k4Xvs213bDIEjIrl6zFa62uM\n\t7i6etwGV6+xMFmG22zUp0GqtLK9MpLX4D1SR3+wC4u8Vjf3MLhd0q9FrGXP2aVbmGHOZfHmpJj9/E\n\tX6LAkvqqQhh2/glvUXbS+eT/QU//2qCyh2C8cbpnnzqMEFHyE8A/GdyS7YuwZWu6CZmWj75VzfGA4\n\tS40LcxwVMVIJ/GYvMwFQ==;",
            "v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1771532811; x=1803068811;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=LxrrchiMSLYnwMTjiR3v3HA1FUr6ufKVZTEGwA4Tk9s=;\n  b=E2kekHTcPV2yv+Tsw9XtBCOweHRsVys7CS69FT5mDjPA3UpXTdIarcCb\n   +lLJkP6/oWOatPj3VN5PFsDh+RrPbgyw6vQWxq2L1BWiFGs3lExoWEde6\n   o5X6rzWhMZiUGhnQkH/GDpBQ2iYKiQPq713RlSMsjDDqBSPXeCp5dRclL\n   qilx/QXwxrUoBxBtkHzbxv9D+giML2DN9QZRE58EQbLk8h6e6hBbHHF8D\n   H4EnfwkE1cTNMR4DtjtA1Q0aXB+Qr6msBFPBRCYORCgZu4K8crseu5KHe\n   zSK7MrjRW7i85BwmzFzHjRltsio+MsVn90/jJlaxrubnopLc6v8EwiLFf\n   Q==;"
        ],
        "X-CSE-ConnectionGUID": [
            "DaSAPuH4Rt6n/9ubMwBHwg==",
            "miUYVXKZRn6qJ+Q6LquXfg=="
        ],
        "X-CSE-MsgGUID": [
            "MCinY/amTK+kkaThjNq9/g==",
            "enkSYFGwR+WvjzcHOgtqCA=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11706\"; a=\"90040041\"",
            "E=Sophos;i=\"6.21,300,1763452800\";\n   d=\"scan'208\";a=\"90040041\"",
            "E=Sophos;i=\"6.21,300,1763452800\";\n   d=\"scan'208\";a=\"219153860\""
        ],
        "X-ExtLoop1": "1",
        "From": "Andrei Otcheretianski <andrei.otcheretianski@intel.com>",
        "To": "hostap@lists.infradead.org,\n\tvamsin@qti.qualcomm.com,\n\tvganneva@qti.qualcomm.com,\n\tmaheshkkv@google.com",
        "Cc": "Ilan Peer <ilan.peer@intel.com>",
        "Subject": "[PATCH 25/58] NAN: Add validation of peer availability",
        "Date": "Thu, 19 Feb 2026 22:24:41 +0200",
        "Message-ID": "<20260219202514.5781-26-andrei.otcheretianski@intel.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "In-Reply-To": "<20260219202514.5781-1-andrei.otcheretianski@intel.com>",
        "References": "<20260219202514.5781-1-andrei.otcheretianski@intel.com>",
        "MIME-Version": "1.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260219_122651_275703_50FAF68D ",
        "X-CRM114-Status": "GOOD (  19.94  )",
        "X-Spam-Score": "-4.4 (----)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  From: Ilan Peer <ilan.peer@intel.com> After processing the\n    NDL related attributes, and before the flow continues to handle the data,\n    validate that the availability information is valid: 1. Parse the\n availability\n    attributes. 2. Validate that the immutable schedule is covered by the\n availability\n    attributes. 3. Validate that the NDC schedule is covered by the\n availability\n    attributes.\n Content analysis details:   (-4.4 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -2.3 RCVD_IN_DNSWL_MED      RBL: Sender listed at https://www.dnswl.org/,\n                             medium trust\n                             [198.175.65.10 listed in list.dnswl.org]\n  0.0 RCVD_IN_VALIDITY_SAFE_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [198.175.65.10 listed in sa-accredit.habeas.com]\n  0.0 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED RBL: ADMINISTRATOR NOTICE: The\n                             query to Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                          [198.175.65.10 listed in\n sa-trusted.bondedsender.org]\n -0.0 SPF_PASS               SPF: sender matches SPF record\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n  0.0 RCVD_IN_VALIDITY_RPBL_BLOCKED RBL: ADMINISTRATOR NOTICE: The query to\n                              Validity was blocked.  See\n                             https://knowledge.validity.com/hc/en-us/articles/20961730681243\n                              for more information.\n                             [198.175.65.10 listed in\n bl.score.senderscore.com]\n -0.0 DKIMWL_WL_HIGH         DKIMwl.org - High trust sender",
        "X-BeenThere": "hostap@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "<hostap.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/hostap>,\n <mailto:hostap-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/hostap/>",
        "List-Post": "<mailto:hostap@lists.infradead.org>",
        "List-Help": "<mailto:hostap-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/hostap>,\n <mailto:hostap-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "\"Hostap\" <hostap-bounces@lists.infradead.org>",
        "Errors-To": "hostap-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "From: Ilan Peer <ilan.peer@intel.com>\n\nAfter processing the NDL related attributes, and before\nthe flow continues to handle the data, validate that the\navailability information is valid:\n\n1. Parse the availability attributes.\n2. Validate that the immutable schedule is covered by the\n   availability attributes.\n3. Validate that the NDC schedule is covered by the\n   availability attributes.\n\nSigned-off-by: Ilan Peer <ilan.peer@intel.com>\n---\n src/nan/nan_i.h    |  4 ++\n src/nan/nan_ndl.c  | 55 +++++++++++++++++++++++++-\n src/nan/nan_util.c | 98 ++++++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 155 insertions(+), 2 deletions(-)",
    "diff": "diff --git a/src/nan/nan_i.h b/src/nan/nan_i.h\nindex 26fbaa481b..9314575d30 100644\n--- a/src/nan/nan_i.h\n+++ b/src/nan/nan_i.h\n@@ -460,4 +460,8 @@ bool nan_sched_covered_by_avail_entry(struct nan_data *nan,\n \t\t\t\t      struct nan_avail_entry *avail,\n \t\t\t\t      struct bitfield *sched_bf,\n \t\t\t\t      u8 map_id);\n+int nan_sched_covered_by_avail_entries(struct nan_data *nan,\n+\t\t\t\t       struct dl_list *avail_entries,\n+\t\t\t\t       u8 *sched,\n+\t\t\t\t       u8 sched_len);\n #endif /* NAN_I_H */\ndiff --git a/src/nan/nan_ndl.c b/src/nan/nan_ndl.c\nindex 90ffd77b90..6f247df5f5 100644\n--- a/src/nan/nan_ndl.c\n+++ b/src/nan/nan_ndl.c\n@@ -190,6 +190,38 @@ struct nan_ndl *nan_ndl_alloc(struct nan_data *nan)\n }\n \n \n+static int nan_ndl_validate_peer_avail(struct nan_data *nan,\n+\t\t\t\t       struct nan_peer *peer)\n+{\n+\tstruct nan_ndl *ndl = peer->ndl;\n+\tint ret;\n+\n+\t/* first validate if immutable is covered by the availability map */\n+\tret = nan_sched_covered_by_avail_entries(nan, &peer->info.avail_entries,\n+\t\t\t\t\t\t ndl->immut_sched,\n+\t\t\t\t\t\t ndl->immut_sched_len);\n+\tif (ret <= 0) {\n+\t\twpa_printf(MSG_DEBUG,\n+\t\t\t   \"NAN: Peer avail: Immutable is not covered by avail\");\n+\t\treturn -1;\n+\t}\n+\n+\t/* now validate NDC schedule is covered by the availability map */\n+\tret = nan_sched_covered_by_avail_entries(nan, &peer->info.avail_entries,\n+\t\t\t\t\t\t ndl->ndc_sched,\n+\t\t\t\t\t\t ndl->ndc_sched_len);\n+\tif (ret <= 0) {\n+\t\twpa_printf(MSG_DEBUG,\n+\t\t\t   \"NAN: Peer avail: NDC is not covered by avail\");\n+\t\treturn -1;\n+\t}\n+\n+\twpa_printf(MSG_DEBUG,\n+\t\t   \"NAN: NDL: peer NDC and immutable are covered by avail\");\n+\treturn 0;\n+}\n+\n+\n static enum nan_ndl_status nan_ndl_res_status(struct nan_data *nan,\n \t\t\t\t\t      struct nan_peer *peer)\n {\n@@ -399,6 +431,7 @@ static int nan_ndl_attr_handle_req(struct nan_data *nan, struct nan_peer *peer,\n \t\t\t\t   const struct ndl_attr_params *params)\n {\n \tstruct nan_ndl *ndl;\n+\tint ret;\n \n \twpa_printf(MSG_DEBUG, \"NAN: NDL: Handle request\");\n \n@@ -460,6 +493,10 @@ static int nan_ndl_attr_handle_req(struct nan_data *nan, struct nan_peer *peer,\n \t\tndl->immut_sched_len = params->immut_sched_len;\n \t}\n \n+\tret = nan_ndl_validate_peer_avail(nan, peer);\n+\tif (!ret)\n+\t\tgoto fail;\n+\n \tnan_ndl_set_state(nan, ndl, NAN_NDL_STATE_REQ_RECV);\n \n \twpa_printf(MSG_DEBUG, \"NAN: NDL: Handle request done\");\n@@ -474,6 +511,7 @@ static int nan_ndl_attr_handle_resp(struct nan_data *nan, struct nan_peer *peer,\n \t\t\t\t    const struct ndl_attr_params *params)\n {\n \tstruct nan_ndl *ndl = peer->ndl;\n+\tint ret;\n \n \twpa_printf(MSG_DEBUG, \"NAN: NDL: Handle response\");\n \n@@ -548,6 +586,7 @@ static int nan_ndl_attr_handle_resp(struct nan_data *nan, struct nan_peer *peer,\n \t\tif (!ndl->ndc_sched) {\n \t\t\twpa_printf(MSG_DEBUG,\n \t\t\t\t   \"NAN: NDL: Resp: Failed to allocate NDC schedule\");\n+\t\t\tret = -1;\n \t\t\tgoto fail;\n \t\t}\n \n@@ -568,11 +607,16 @@ static int nan_ndl_attr_handle_resp(struct nan_data *nan, struct nan_peer *peer,\n \t\tif (!ndl->immut_sched) {\n \t\t\twpa_printf(MSG_DEBUG,\n \t\t\t\t   \"NAN: NDL: Resp: fail allocate immutable schedule\");\n+\t\t\tret = -1;\n \t\t\tgoto fail;\n \t\t}\n \t\tndl->immut_sched_len = params->immut_sched_len;\n \t}\n \n+\tret = nan_ndl_validate_peer_avail(nan, peer);\n+\tif (!ret)\n+\t\tgoto fail;\n+\n \twpa_printf(MSG_DEBUG, \"NAN: NDL: Resp: status=%u\", params->status);\n \n \tndl->status = params->status;\n@@ -585,7 +629,7 @@ fail:\n \tndl->status = NAN_NDL_STATUS_REJECTED;\n \tndl->reason = NAN_REASON_RESOURCE_LIMITATION;\n \tndl->send_naf_on_error = 1;\n-\treturn 0;\n+\treturn ret;\n }\n \n \n@@ -593,6 +637,7 @@ static int nan_ndl_attr_handle_conf(struct nan_data *nan, struct nan_peer *peer,\n \t\t\t\t    const struct ndl_attr_params *params)\n {\n \tstruct nan_ndl *ndl = peer->ndl;\n+\tint ret;\n \n \tif (!ndl) {\n \t\twpa_printf(MSG_DEBUG,\n@@ -660,6 +705,7 @@ static int nan_ndl_attr_handle_conf(struct nan_data *nan, struct nan_peer *peer,\n \t\tif (!ndl->ndc_sched) {\n \t\t\twpa_printf(MSG_DEBUG,\n \t\t\t\t   \"NAN: NDL: Failed to allocate NDC schedule\");\n+\t\t\tret = -1;\n \t\t\tgoto fail;\n \t\t}\n \t\tndl->ndc_sched_len = params->ndc_sched_len;\n@@ -677,18 +723,23 @@ static int nan_ndl_attr_handle_conf(struct nan_data *nan, struct nan_peer *peer,\n \t\tif (!ndl->immut_sched) {\n \t\t\twpa_printf(MSG_DEBUG,\n \t\t\t\t   \"NAN: NDL: Failed to allocate immutable schedule\");\n+\t\t\tret = -1;\n \t\t\tgoto fail;\n \t\t}\n \t\tndl->immut_sched_len = params->immut_sched_len;\n \t}\n \n+\tret = nan_ndl_validate_peer_avail(nan, peer);\n+\tif (!ret)\n+\t\tgoto fail;\n+\n \tnan_ndl_set_state(nan, ndl, NAN_NDL_STATE_DONE);\n \treturn 0;\n \n fail:\n \tndl->reason = NAN_REASON_RESOURCE_LIMITATION;\n \tndl->send_naf_on_error = 1;\n-\treturn -1;\n+\treturn ret;\n }\n \n \ndiff --git a/src/nan/nan_util.c b/src/nan/nan_util.c\nindex 1b13ab4565..a3edb4ed23 100644\n--- a/src/nan/nan_util.c\n+++ b/src/nan/nan_util.c\n@@ -1151,3 +1151,101 @@ bool nan_sched_covered_by_avail_entry(struct nan_data *nan,\n \n \treturn ret == 1;\n }\n+\n+\n+static int nan_sched_bf_covered_by_avail_entries(struct nan_data *nan,\n+\t\t\t\t\t\t struct dl_list *avail_entries,\n+\t\t\t\t\t\t struct bitfield *sched_bf,\n+\t\t\t\t\t\t u8 map_id)\n+{\n+\tstruct nan_avail_entry *avail;\n+\tstruct bitfield *res_bf = NULL;\n+\tint ret = 0;\n+\n+\tdl_list_for_each(avail, avail_entries, struct nan_avail_entry,\n+\t\t\t list) {\n+\t\tstruct bitfield *avail_bf;\n+\n+\t\tif (avail->map_id != map_id)\n+\t\t\tcontinue;\n+\n+\t\t/* schedule can only be covered by committed/conditional */\n+\t\tif (avail->type != NAN_AVAIL_ENTRY_CTRL_TYPE_COMMITTED &&\n+\t\t    avail->type != NAN_AVAIL_ENTRY_CTRL_TYPE_COND)\n+\t\t\tcontinue;\n+\n+\t\t/* convert the availability entry to bf */\n+\t\tavail_bf = nan_tbm_to_bf(nan, &avail->tbm);\n+\t\tif (!avail_bf) {\n+\t\t\tret = -1;\n+\t\t\tgoto fail;\n+\t\t}\n+\n+\t\tbitfield_dump(avail_bf, \"NAN: Availability entry bitmap\");\n+\t\tif (!res_bf) {\n+\t\t\tres_bf = avail_bf;\n+\t\t} else {\n+\t\t\tstruct bitfield *tmp_bf;\n+\n+\t\t\ttmp_bf = bitfield_union(res_bf, avail_bf);\n+\t\t\tbitfield_free(avail_bf);\n+\n+\t\t\tif (!tmp_bf) {\n+\t\t\t\tret = -1;\n+\t\t\t\tgoto fail;\n+\t\t\t}\n+\n+\t\t\tbitfield_free(res_bf);\n+\t\t\tres_bf = tmp_bf;\n+\t\t}\n+\t}\n+\n+\tret = bitfield_is_subset(res_bf, sched_bf);\n+fail:\n+\twpa_printf(MSG_DEBUG,\n+\t\t   \"NAN: Is bitfield schedule subset of entries=%d\", ret);\n+\tbitfield_free(res_bf);\n+\treturn ret;\n+}\n+\n+\n+/**\n+ * nan_sched_covered_by_avail_entries - Check if schedule is covered by the\n+ * list of availability attributes\n+ *\n+ * @nan: NAN module context from nan_init()\n+ * @avail_entries: A list of availability entries (see &struct nan_avail_entry)\n+ * @sched: An array with 0 or more &struct nan_sched_entry entries\n+ * @sched_len: Length of the &sched array\n+ * Returns 1 of schedule is covered by the entries; 0 if not and -1 on error\n+ */\n+int nan_sched_covered_by_avail_entries(struct nan_data *nan,\n+\t\t\t\t       struct dl_list *avail_entries,\n+\t\t\t\t       u8 *sched,\n+\t\t\t\t       u8 sched_len)\n+{\n+\tstruct dl_list sched_entries;\n+\tstruct bitfield *sched_bf;\n+\tu8 map_id;\n+\tint ret;\n+\n+\tif (!sched || !sched_len)\n+\t\treturn 1;\n+\n+\tdl_list_init(&sched_entries);\n+\tret = nan_sched_entries_to_avail_entries(nan,\n+\t\t\t\t\t\t &sched_entries,\n+\t\t\t\t\t\t sched, sched_len);\n+\n+\tsched_bf = nan_sched_to_bf(nan, &sched_entries, &map_id);\n+\tnan_flush_avail_entries(&sched_entries);\n+\n+\tret = nan_sched_bf_covered_by_avail_entries(nan, avail_entries,\n+\t\t\t\t\t\t    sched_bf, map_id);\n+\n+\twpa_printf(MSG_DEBUG,\n+\t\t   \"NAN: NDC schedule is %s a subset of entries\",\n+\t\t   ret == 1 ? \"\" : \"NOT\");\n+\tbitfield_free(sched_bf);\n+\treturn ret;\n+}\n",
    "prefixes": [
        "25/58"
    ]
}