get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2221356,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2221356/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/hostap/patch/8e3cd11c6c4d4a507cd3697c68de24afad5ef191.1775724565.git.lorenzo@kernel.org/",
    "project": {
        "id": 22,
        "url": "http://patchwork.ozlabs.org/api/1.2/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": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<8e3cd11c6c4d4a507cd3697c68de24afad5ef191.1775724565.git.lorenzo@kernel.org>",
    "list_archive_url": null,
    "date": "2026-04-09T08:52:05",
    "name": "[v2] AP: Introduce support for testing ML link enable",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "5eeae070382d361ce6ea30ea3ebbf5fde294da8e",
    "submitter": {
        "id": 76007,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/76007/?format=api",
        "name": "Lorenzo Bianconi",
        "email": "lorenzo@kernel.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/hostap/patch/8e3cd11c6c4d4a507cd3697c68de24afad5ef191.1775724565.git.lorenzo@kernel.org/mbox/",
    "series": [
        {
            "id": 499263,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/499263/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/hostap/list/?series=499263",
            "date": "2026-04-09T08:52:05",
            "name": "[v2] AP: Introduce support for testing ML link enable",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/499263/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2221356/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2221356/checks/",
    "tags": {},
    "related": [],
    "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=wjaPMFnK;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256\n header.s=k20201202 header.b=JIo/S9/9;\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 4frtwy3H1jz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 09 Apr 2026 18:52:34 +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 1wAl7V-00000009z0G-2zDl;\n\tThu, 09 Apr 2026 08:52:13 +0000",
            "from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wAl7T-00000009yzj-2bMQ\n\tfor hostap@lists.infradead.org;\n\tThu, 09 Apr 2026 08:52:12 +0000",
            "from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58])\n\tby sea.source.kernel.org (Postfix) with ESMTP id 43D2640B51;\n\tThu,  9 Apr 2026 08:52:11 +0000 (UTC)",
            "by smtp.kernel.org (Postfix) with ESMTPSA id C2E6EC4CEF7;\n\tThu,  9 Apr 2026 08:52:10 +0000 (UTC)"
        ],
        "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:Message-ID:Date:Subject:Cc\n\t:To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:\n\tResent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:\n\tList-Owner; bh=gxBgG+saJhFVxmssbCW1MOoCGUOE/bQ6OsMw34kKjys=; b=wjaPMFnKL6Kkzx\n\tDNJEoBkhStaMy+mqCsbfFFebL853lvOldSV24F1ijC+3KL41yFaZEVr8V2m+mWMzOsgdThZ8Gebt4\n\tYGhdx3tMF7To77wNfgtvYSdn0zHgjqET5MjHIqxRfIpIQ5vmnBl9JelMMEKHE7nz6dzjxY1QS9bgT\n\tEZ5bsVWOo5iZGOmErh2LzrjkmZVc5mjNmlAgsRXPuKplD00qJScFzG41WH4UOx2yjNnvWooF+HyLI\n\tIf7c97ueeJo3mq8gUWEHw32JkiVNo4BnvNYuD+oE80Edm2XlftIAyrZreWcuTx+5zDPjnmMOsEyoB\n\tXI9NJVvzdyAuvsDq6plw==;",
            "v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org;\n\ts=k20201202; t=1775724731;\n\tbh=0D6fNkAU4ybYvonlzVFbM8GrghxRyI5aPj/zJiW6w1E=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=JIo/S9/9CKzeb1CTURajkPuEcU/dDKtrraTZVMdSY/wSS4ccpre/pOnS+YCXx3Ja+\n\t LRtcY+3RgOBwzs1HiF/5r6IAQpPKDSgBeUyhSj19MgoR8tG+wOrmYxzv+HJZj6SSM5\n\t yNN8fYKoP6IUlhei3xDBJ51j8t59zUVypSveL7N7lQbHvVmojWKEFRQR2bFsxJuKNq\n\t HYKNLL+a60gomE+JjlRQwbQfGfOCIE5wNiguFLpYaJt/cKRM/xb/K7YuhG7zUl7mmY\n\t 8k6J3S15FkBaqbXiHaLr8LrkXYcRryBtjtq7p42VqPt23xjnr5/2JBbN+jRZsi5ibg\n\t ru34OE0oXDkFg=="
        ],
        "From": "Lorenzo Bianconi <lorenzo@kernel.org>",
        "To": "hostap@lists.infradead.org",
        "Cc": "j@w1.fi,\n\tStanleyYP.Wang@mediatek.com",
        "Subject": "[PATCH v2] AP: Introduce support for testing ML link enable",
        "Date": "Thu,  9 Apr 2026 10:52:05 +0200",
        "Message-ID": "\n <8e3cd11c6c4d4a507cd3697c68de24afad5ef191.1775724565.git.lorenzo@kernel.org>",
        "X-Mailer": "git-send-email 2.53.0",
        "MIME-Version": "1.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260409_015211_698309_55445CC3 ",
        "X-CRM114-Status": "GOOD (  17.74  )",
        "X-Spam-Score": "-2.6 (--)",
        "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: StanleyYP Wang <StanleyYP.Wang@mediatek.com>\n Introduce\n    LINK_ENABLE control interface command in order to enable a link previously\n    removed via hostapd_cli remove_link command. The LINK_ENABLE command\n relies\n    on the following syntax:\n Content analysis details:   (-2.6 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\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_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_AU          Message has a valid DKIM or DK signature from\n author's\n                             domain\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]\n -0.5 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: StanleyYP Wang <StanleyYP.Wang@mediatek.com>\n\nIntroduce LINK_ENABLE control interface command in order to enable a link\npreviously removed via hostapd_cli remove_link command.\nThe LINK_ENABLE command relies on the following syntax:\n\n$hostapd_cli -i <interface> link_enable bss_conf=<phy>:<config-file>\n\nSimilar to ML link removal support added in commit 'd95838b7932b\n(\"AP: Add support for testing ML link removal\")', compile LINK_ENABLE\ncontrol interface command just if CONFIG_TESTING_OPTIONS is enabled\nsince it depends on remove_link counterpart.\n\nSigned-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com>\nCo-developed-by: Lorenzo Bianconi <lorenzo@kernel.org>\nSigned-off-by: Lorenzo Bianconi <lorenzo@kernel.org>\n---\nChanges in v2:\n- Fix compilation errors\n- Rename the command in \"link_enable\" and limit it to enable link\n  previously removed via hostapd_cli remove_link command.\n---\n hostapd/ctrl_iface.c  | 87 +++++++++++++++++++++++++++++++++++++++++++\n hostapd/hostapd_cli.c | 10 +++++\n 2 files changed, 97 insertions(+)",
    "diff": "diff --git a/hostapd/ctrl_iface.c b/hostapd/ctrl_iface.c\nindex d14b2660f..deb91bc7f 100644\n--- a/hostapd/ctrl_iface.c\n+++ b/hostapd/ctrl_iface.c\n@@ -3576,6 +3576,89 @@ static int hostapd_ctrl_iface_link_remove(struct hostapd_data *hapd, char *cmd,\n \n \treturn ret;\n }\n+\n+\n+static int hostapd_ctrl_iface_link_enable(struct hostapd_data *hapd, char *cmd,\n+\t\t\t\t\t  char *buf, size_t buflen)\n+{\n+\tstruct hapd_interfaces *interfaces = hapd->iface->interfaces;\n+\tconst char *conf_file, *phy, *ifname;\n+\tstruct hostapd_iface *iface = NULL;\n+\tsize_t len = os_strlen(cmd) + 1;\n+\tstruct hostapd_config *conf;\n+\tchar *pos, *cmd_buf;\n+\tint ret = -1;\n+\tsize_t i;\n+\n+\tif (!hapd || !hapd->conf->mld_ap || !hapd->mld)\n+\t\treturn -1;\n+\n+\tif (os_strncmp(cmd, \"bss_config=\", 11))\n+\t\treturn -1;\n+\n+\tcmd_buf = os_malloc(len);\n+\tif (!cmd_buf)\n+\t\treturn -1;\n+\n+\tos_snprintf(cmd_buf, len, \"%s\", cmd);\n+\tphy = cmd_buf + 11;\n+\tpos = os_strchr(phy, ':');\n+\tif (!pos)\n+\t\tgoto free_cmd_buffer;\n+\n+\t*pos++ = '\\0';\n+\tconf_file = pos;\n+\tif (!os_strlen(conf_file))\n+\t\tgoto free_cmd_buffer;\n+\n+\tconf = interfaces->config_read_cb(conf_file);\n+\tif (!conf)\n+\t\tgoto free_cmd_buffer;\n+\n+\tif (!conf->bss[0]->mld_ap)\n+\t\tgoto free_config;\n+\n+\tifname = conf->bss[0]->iface;\n+\tif (!ifname || ifname[0] == '\\0')\n+\t\tgoto free_config;\n+\n+\tfor (i = 0; i < interfaces->count; i++) {\n+\t\tif (!os_strcmp(interfaces->iface[i]->phy, phy)) {\n+\t\t\tiface = interfaces->iface[i];\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tif (!iface || iface->state != HAPD_IFACE_DISABLED)\n+\t\tgoto free_config;\n+\n+\tfor (i = 0; i < iface->num_bss; i++) {\n+\t\tstruct hostapd_data *h = iface->bss[i];\n+\n+\t\tif (os_strncmp(ifname, h->conf->iface,\n+\t\t\t       sizeof(h->conf->iface)))\n+\t\t\tcontinue;\n+\n+\t\tret = hostapd_enable_iface(iface);\n+\t\tbreak;\n+\t}\n+\n+\tif (ret < 0)\n+\t\tgoto free_config;\n+\n+\tret = os_snprintf(buf, buflen, \"%s\\n\", \"OK\");\n+\tif (os_snprintf_error(buflen, ret))\n+\t\tret = -1;\n+\telse\n+\t\tret = 0;\n+\n+free_config:\n+\thostapd_config_free(conf);\n+free_cmd_buffer:\n+\tos_free(cmd_buf);\n+\n+\treturn ret;\n+}\n #endif /* CONFIG_TESTING_OPTIONS */\n #endif /* CONFIG_IEEE80211BE */\n \n@@ -4566,6 +4649,10 @@ static int hostapd_ctrl_iface_receive_process(struct hostapd_data *hapd,\n \t\tif (hostapd_ctrl_iface_link_remove(hapd, buf + 12,\n \t\t\t\t\t\t   reply, reply_size))\n \t\t\treply_len = -1;\n+\t} else if (os_strncmp(buf, \"LINK_ENABLE \", 12) == 0) {\n+\t\tif (hostapd_ctrl_iface_link_enable(hapd, buf + 12, reply,\n+\t\t\t\t\t\t   reply_size))\n+\t\t\treply_len = -1;\n #endif /* CONFIG_TESTING_OPTIONS */\n #endif /* CONFIG_IEEE80211BE */\n #ifdef CONFIG_SAE\ndiff --git a/hostapd/hostapd_cli.c b/hostapd/hostapd_cli.c\nindex cb42f3052..16f70fa23 100644\n--- a/hostapd/hostapd_cli.c\n+++ b/hostapd/hostapd_cli.c\n@@ -1293,6 +1293,13 @@ static int hostapd_cli_cmd_remove_link(struct wpa_ctrl *ctrl, int argc,\n \n \treturn wpa_ctrl_command(ctrl, buf);\n }\n+\n+\n+static int hostapd_cli_cmd_link_enable(struct wpa_ctrl *ctrl, int argc,\n+\t\t\t\t    char *argv[])\n+{\n+\treturn hostapd_cli_cmd(ctrl, \"LINK_ENABLE\", 1, argc, argv);\n+}\n #endif /* CONFIG_TESTING_OPTIONS */\n \n \n@@ -1821,6 +1828,9 @@ static const struct hostapd_cli_cmd hostapd_cli_commands[] = {\n #ifdef CONFIG_TESTING_OPTIONS\n \t{ \"remove_link\", hostapd_cli_cmd_remove_link, NULL,\n \t  \"<count> = remove MLO link and send Reconfiguration MLE\" },\n+\t{ \"link_enable\", hostapd_cli_cmd_link_enable, NULL,\n+\t  \" bss_config=<phy>:<config file>\\n\"\n+\t  \" = Enable a link previously removed from the MLD AP\" },\n #endif /* CONFIG_TESTING_OPTIONS */\n \t{ \"disable_mld\", hostapd_cli_cmd_disable_mld, NULL,\n \t  \"= disable AP MLD to which the interface is affiliated\" },\n",
    "prefixes": [
        "v2"
    ]
}