get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2229902,
    "url": "http://patchwork.ozlabs.org/api/1.1/patches/2229902/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/hostap/patch/20260428200639.40243-96-andrei.otcheretianski@intel.com/",
    "project": {
        "id": 22,
        "url": "http://patchwork.ozlabs.org/api/1.1/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": "<20260428200639.40243-96-andrei.otcheretianski@intel.com>",
    "date": "2026-04-28T20:06:36",
    "name": "[RFC,95/97] tests: Add nan_override_potential_availability test",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "2ad54c80b42dd8ecb2cd92ba27253d54c7a8f823",
    "submitter": {
        "id": 62065,
        "url": "http://patchwork.ozlabs.org/api/1.1/people/62065/?format=api",
        "name": "Andrei Otcheretianski",
        "email": "andrei.otcheretianski@intel.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/hostap/patch/20260428200639.40243-96-andrei.otcheretianski@intel.com/mbox/",
    "series": [
        {
            "id": 501927,
            "url": "http://patchwork.ozlabs.org/api/1.1/series/501927/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/hostap/list/?series=501927",
            "date": "2026-04-28T20:05:05",
            "name": "NAN: Group keys support, schedule update and more",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/501927/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2229902/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2229902/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=2HpQcWcg;\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=ZfrYX4qs;\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 4g4sC86sS5z1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 29 Apr 2026 06:16:20 +1000 (AEST)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHoqW-00000002NZy-3Q3G;\n\tTue, 28 Apr 2026 20:15:52 +0000",
            "from mgamail.intel.com ([198.175.65.16])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wHol7-00000002CcZ-2BSm\n\tfor hostap@lists.infradead.org;\n\tTue, 28 Apr 2026 20:10:20 +0000",
            "from fmviesa001.fm.intel.com ([10.60.135.141])\n  by orvoesa108.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2026 13:09:42 -0700",
            "from iapp347.iil.intel.com (HELO 87c02287900a.iil.intel.com)\n ([10.167.28.6])\n  by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Apr 2026 13:09:41 -0700"
        ],
        "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=tKnGaI+peOTCL1sDXTP/7xsQqN4Z+PbgOXV/6AOWjrM=; b=2HpQcWcgnIGzui\n\t0q92pn+8DZB3D+kRmrsrksNnajxV+YTYVbGoMOLs7dy/seip0fEOaFedkc6vOSHcIW0cTE6IIIqCO\n\tkIEnEliSTgk2uHcz89E3dUMy4j6ytbzfnkeQOYHB97xWUOdu3wMziRYqvZT3I2xC2rqsNR5VQ9Mx2\n\tO891jheGclcLKzfBqEpXspmF4mu4i+BCHLYkLBiw2FeML3DiAdRsvZEzXiD2k4mnm3mQdaizRGnDc\n\tZrEzxq2hL70ZkREe+odPKxTPFK0hX2RdUAR0Cp6foTqWk6GB7jWGr30H9QyTd0iwBZXV5mr0l6Xig\n\tygg+JpjttvAe+GT8IV5A==;",
            "v=1; a=rsa-sha256; c=relaxed/simple;\n  d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n  t=1777407017; x=1808943017;\n  h=from:to:cc:subject:date:message-id:in-reply-to:\n   references:mime-version:content-transfer-encoding;\n  bh=BBndSVT3MBvtum1ar6iW++4Lz9PL4OfR1DJTua+/4nY=;\n  b=ZfrYX4qsowt5Fk28ybgAyZ0JlTSVXqTsCw+DEtL6zoUdQRVh/fdlhltJ\n   Vh+RFGRqmyRlcxhVVM3j/QQL1t77cD7mv59tvo8QkySMw9/9h/MMZ1CAY\n   jM/gYiHuKiio6cikWzxugsw1TWUS44adC4PkvKPhjIwGR4Cqzi04NZYEX\n   eNQN7MSb2nhncEz3pGUGxyT8ib+DqQeYEmEDn8RYgHJT/6IQnQAbRNULV\n   MzBQS4APyoH5Ty1ljqUWvmGv2pnyPVaeBQUmflVAL62TPmwZs/zsq/YDs\n   T81PrWWpsiMEZ4SM7ucATD5tpeeRgx2AxKoZIlasNGR7Ex3XFDEs6UN0p\n   A==;"
        ],
        "X-CSE-ConnectionGUID": [
            "NnL/pgVWQsSPYuo3MQ/wQw==",
            "6M5rH4Q1Sw+OGFmeiwUdNg=="
        ],
        "X-CSE-MsgGUID": [
            "fTmFegrWTnugeIB1wHhleA==",
            "HLM+JaPERD+xbQB2tHMLwQ=="
        ],
        "X-IronPort-AV": [
            "E=McAfee;i=\"6800,10657,11770\"; a=\"78519773\"",
            "E=Sophos;i=\"6.23,204,1770624000\";\n   d=\"scan'208\";a=\"78519773\"",
            "E=Sophos;i=\"6.23,204,1770624000\";\n   d=\"scan'208\";a=\"257611014\""
        ],
        "X-ExtLoop1": "1",
        "From": "Andrei Otcheretianski <andrei.otcheretianski@intel.com>",
        "To": "hostap@lists.infradead.org",
        "Cc": "vamsin@qti.qualcomm.com,\n\tmaheshkkv@google.com,\n\tAndrei Otcheretianski <andrei.otcheretianski@intel.com>",
        "Subject": "[RFC 95/97] tests: Add nan_override_potential_availability test",
        "Date": "Tue, 28 Apr 2026 23:06:36 +0300",
        "Message-ID": "<20260428200639.40243-96-andrei.otcheretianski@intel.com>",
        "X-Mailer": "git-send-email 2.53.0",
        "In-Reply-To": "<20260428200639.40243-1-andrei.otcheretianski@intel.com>",
        "References": "<20260428200639.40243-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-20260428_131018_019557_E98216F9 ",
        "X-CRM114-Status": "GOOD (  10.15  )",
        "X-Spam-Score": "-4.5 (----)",
        "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:  Test NAN potential availability overriding. Signed-off-by:\n    Andrei Otcheretianski <andrei.otcheretianski@intel.com> ---\n tests/hwsim/test_nan.py\n    | 90 +++++++++++++++++++++++++++++++++++++++++ 1 file changed,\n 90 insertions(+)    \n Content analysis details:   (-4.5 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.16 listed in list.dnswl.org]\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -0.1 DKIM_VALID_EF          Message has a valid DKIM or DK signature from\n                             envelope-from domain\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n -0.1 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": "Test NAN potential availability overriding.\n\nSigned-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>\n---\n tests/hwsim/test_nan.py | 90 +++++++++++++++++++++++++++++++++++++++++\n 1 file changed, 90 insertions(+)",
    "diff": "diff --git a/tests/hwsim/test_nan.py b/tests/hwsim/test_nan.py\nindex 6bd4b23544..8735d140fc 100644\n--- a/tests/hwsim/test_nan.py\n+++ b/tests/hwsim/test_nan.py\n@@ -1968,3 +1968,93 @@ def test_nan_prot_mcast_followup_bip_gmac256(dev, apdev, params):\n     finally:\n         set_country(\"00\")\n \n+def verify_potential_availability(potential, expected_entries):\n+        lines = potential.strip().split('\\n')\n+        entries = []\n+        current_entry = None\n+\n+        for line in lines:\n+            line = line.strip()\n+            if line.startswith('entry['):\n+                # Parse entry line: \"entry[0]: rx_nss=2 pref=3 util=7\"\n+                pref = None\n+                for part in line.split():\n+                    if part.startswith('pref='):\n+                        pref = int(part.split('=')[1])\n+                        break\n+                current_entry = {'pref': pref, 'chans': []}\n+                entries.append(current_entry)\n+            elif line.startswith('chan[') and current_entry is not None:\n+                # Parse chan line: \"chan[0]: op_class=81 chan_bitmap=0x0020\"\n+                op_class = None\n+                chan_bitmap = None\n+                for part in line.split():\n+                    if part.startswith('op_class='):\n+                        op_class = int(part.split('=')[1])\n+                    elif part.startswith('chan_bitmap='):\n+                        chan_bitmap = part.split('=')[1]\n+                current_entry['chans'].append((op_class, chan_bitmap))\n+\n+        # Verify number of entries\n+        if len(entries) != len(expected_entries):\n+            raise Exception(f\"Expected {len(expected_entries)} entries, got {len(entries)}\")\n+\n+        # Verify each entry\n+        for i, (exp_pref, exp_op_class, exp_bitmap) in enumerate(expected_entries):\n+            entry = entries[i]\n+            if entry['pref'] != exp_pref:\n+                raise Exception(f\"Entry {i}: expected pref={exp_pref}, got pref={entry['pref']}\")\n+            if len(entry['chans']) != 1:\n+                raise Exception(f\"Entry {i}: expected 1 channel, got {len(entry['chans'])}\")\n+            op_class, bitmap = entry['chans'][0]\n+            if op_class != exp_op_class:\n+                raise Exception(f\"Entry {i}: expected op_class={exp_op_class}, got op_class={op_class}\")\n+            if bitmap != exp_bitmap:\n+                raise Exception(f\"Entry {i}: expected chan_bitmap={exp_bitmap}, got chan_bitmap={bitmap}\")\n+\n+def test_nan_override_potential_availability(dev, apdev, params):\n+    \"\"\"NAN override potential availability configuration\"\"\"\n+    with hwsim_nan_radios() as (wpas1, wpas2), \\\n+        NanDevice(wpas1, \"nan0\", \"ndi0\") as pub, \\\n+        NanDevice(wpas2, \"nan1\", \"ndi1\") as sub:\n+        pssi = \"aabbccdd\"\n+        sssi = \"ddbbccaa\"\n+\n+        # Test invalid formats\n+        pub.set(\"override_potential_availability\", \"81:0x20\", ok=False)\n+        pub.set(\"override_potential_availability\", \"81-0x20-3\", ok=False)\n+        pub.set(\"override_potential_availability\", \"81:0x20:5\", ok=False)\n+        pub.set(\"override_potential_availability\", \"256:0x20:3\", ok=False)\n+        pub.set(\"override_potential_availability\", \"81:6:3\", ok=False)\n+\n+        # Discover service - this should trigger potential availability exchange\n+        pid, sid, paddr, _ = nan_sync_discovery(pub, sub, \"test_service\",\n+                                                pssi=pssi, sssi=sssi,\n+                                                unsolicited=0)\n+        old_potential = sub.wpas.request(\"NAN_PEER_INFO \" + paddr + \" potential\")\n+        logger.info(\"Publisher potential availability before override:\\n\" + old_potential)\n+\n+        pub.set(\"override_potential_availability\", \"81:0x20:3,115:0x04:0\")\n+        # Wait a bit to ensure new availability is populated and processed\n+        time.sleep(2)\n+        expected = [\n+            (3, 81, \"0x0020\"),\n+            (0, 115, \"0x0004\"),\n+        ]\n+\n+        potential = sub.wpas.request(\"NAN_PEER_INFO \" + paddr + \" potential\")\n+        logger.info(\"Publisher potential availability:\\n\" + potential)\n+        verify_potential_availability(potential, expected)\n+\n+        # Clear override and verify it accepts empty string\n+        pub.set(\"override_potential_availability\", \"\")\n+        # Wait a bit to ensure new availability is populated and processed\n+        time.sleep(2)\n+        potential = sub.wpas.request(\"NAN_PEER_INFO \" + paddr + \" potential\")\n+        logger.info(\"Publisher potential availability after clearing override:\\n\" + potential)\n+\n+        # This check is not 100% safe (e.g., regulatory updates could change\n+        # the channel set), but it is good enough for the test as we don't expect any changes during the\n+        # test execution.\n+        if potential != old_potential:\n+            raise Exception(\"Potential availability did not revert to original after clearing override\")\n",
    "prefixes": [
        "RFC",
        "95/97"
    ]
}