{"id":2227730,"url":"http://patchwork.ozlabs.org/api/1.1/patches/2227730/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/patch/20260424091257.abb506db8fe2.I3d604152d53fdc56d10e750e8c113b2f971fcabd@changeid/","project":{"id":22,"url":"http://patchwork.ozlabs.org/api/1.1/projects/22/?format=json","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":"<20260424091257.abb506db8fe2.I3d604152d53fdc56d10e750e8c113b2f971fcabd@changeid>","date":"2026-04-24T07:11:57","name":"[v3,5/8] ap: advertise DBE capability if driver has it","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"659f9d2b018e2da18fe45ff47b1781419d6144bc","submitter":{"id":265,"url":"http://patchwork.ozlabs.org/api/1.1/people/265/?format=json","name":"Johannes Berg","email":"johannes@sipsolutions.net"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/hostap/patch/20260424091257.abb506db8fe2.I3d604152d53fdc56d10e750e8c113b2f971fcabd@changeid/mbox/","series":[{"id":501311,"url":"http://patchwork.ozlabs.org/api/1.1/series/501311/?format=json","web_url":"http://patchwork.ozlabs.org/project/hostap/list/?series=501311","date":"2026-04-24T07:11:54","name":null,"version":3,"mbox":"http://patchwork.ozlabs.org/series/501311/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2227730/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2227730/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=Nw0cqz3k;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n secure) header.d=sipsolutions.net header.i=@sipsolutions.net\n header.a=rsa-sha256 header.s=mail header.b=PBzAEsJW;\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 4g242D3vvqz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 17:13:56 +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 1wGAit-0000000CmPW-13JS;\n\tFri, 24 Apr 2026 07:13:11 +0000","from s3.sipsolutions.net ([2a01:4f8:242:246e::2]\n helo=sipsolutions.net)\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1wGAip-0000000CmNH-0Uz4\n\tfor hostap@lists.infradead.org;\n\tFri, 24 Apr 2026 07:13:10 +0000","by sipsolutions.net with esmtpsa\n (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256)\n\t(Exim 4.98.2)\n\t(envelope-from <johannes@sipsolutions.net>)\n\tid 1wGAil-00000008vqe-2FUW;\n\tFri, 24 Apr 2026 09:13:03 +0200"],"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=HeRFcUUp1aEJUDWO2c/nxW09pV0FZFoh6uy68ZDOJvk=; b=Nw0cqz3kBk0pXo\n\t9TFJAd4RFkgcFntXQ4VvdhI6zUvbhnMSz4u1vhr7+6jx/sf+YW3j0vgRvzICD47qQJn3piXOqFdab\n\tTSBJEXprWmr6GF3iLvtTN5GyQV5WKuu7c2qg+gCinUxiQXEs60GLyK7602PdYlnxZQUUvKEGLEUC6\n\td+mytsqcRbl22Fy8ogPSPlCajbPogY7+yPnz/iXmGHRr6dDzHg+I5NJONxMwsAKfioHCPIb56EYw1\n\tbgd+NqWFjsGVL45/EP65CBxXTU7PJ/5fiX8OHg6wrQIWGbkDkqQGdHPiJSMeDOrQZT9nd36WnNLIg\n\twgYIjcSw2HZKzN7ZR0vQ==;","v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version:\n\tReferences:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender\n\t:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-To:\n\tResent-Cc:Resent-Message-ID; bh=OwRLh4C0jkQXRf0hgnNAA1O2BO+NvHCSSeeOrA4AxDw=;\n\tt=1777014787; x=1778224387; b=PBzAEsJWiHHqa7rhiEPlwU6m4SXsx4FM0nyyufANK7B5i8N\n\tQJPmTl8Zb94xVZqfvYdI3DAynkQr0FvS0lXM+bUNhF+TvWIgto5+vLeuZa53CVTTO0g5mYcwhDINs\n\tMGtHavbmBovKMFuPWAC+bu3VhpoGlEyRz3RzlbyJBZeLCCFzpwZIyaUDHPjLEQQi7oRobES8pP9Qc\n\tfT6vCUxB2Q4GtTuQjOadDRJJfRAkoJ2PmeM2Urv8xwWIfZwhjY1ckC1mMYWSOhCTs5h0MFcvU9n1X\n\t3Sb/V5FOeMXOkwlJ3Y9E62IF2JxwzrkK19BshcqOjqO1fmS/GWrZ9xYm7CL+gNcw==;"],"From":"Johannes Berg <johannes@sipsolutions.net>","To":"hostap@lists.infradead.org","Cc":"Johannes Berg <johannes.berg@intel.com>","Subject":"[PATCH v3 5/8] ap: advertise DBE capability if driver has it","Date":"Fri, 24 Apr 2026 09:11:57 +0200","Message-ID":"\n <20260424091257.abb506db8fe2.I3d604152d53fdc56d10e750e8c113b2f971fcabd@changeid>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260424071256.71834-10-johannes@sipsolutions.net>","References":"<20260424071256.71834-10-johannes@sipsolutions.net>","MIME-Version":"1.0","X-CRM114-Version":"20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ","X-CRM114-CacheID":"sfid-20260424_001308_085790_22DEFA90 ","X-CRM114-Status":"GOOD (  17.83  )","X-Spam-Score":"-2.1 (--)","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: Johannes Berg <johannes.berg@intel.com> If the driver\n    has DBE capability,\n then the DBE capabilities field must be created. Do this\n    based on the EHT capability the driver is advertising. Signed-off-by:\n Johannes\n    Berg <johannes.berg@intel.com> --- src/ap/ieee802_11_uhr.c | 43\n ++++++++++++++++++++++++++++++++++--\n    src/common/ieee802_11_defs.h | 9 ++++++++ 2 files changed,\n 50 insertions(+)\n    [...]\n Content analysis details:   (-2.1 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_PASS          SPF: HELO matches 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             Message has at least one valid DKIM or DK\n signature\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 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]","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: Johannes Berg <johannes.berg@intel.com>\n\nIf the driver has DBE capability, then the DBE capabilities\nfield must be created. Do this based on the EHT capability\nthe driver is advertising.\n\nSigned-off-by: Johannes Berg <johannes.berg@intel.com>\n---\n src/ap/ieee802_11_uhr.c      | 43 ++++++++++++++++++++++++++++++++++--\n src/common/ieee802_11_defs.h |  9 ++++++++\n 2 files changed, 50 insertions(+), 2 deletions(-)","diff":"diff --git a/src/ap/ieee802_11_uhr.c b/src/ap/ieee802_11_uhr.c\nindex 6538e0e0b9ea..2476b3412b75 100644\n--- a/src/ap/ieee802_11_uhr.c\n+++ b/src/ap/ieee802_11_uhr.c\n@@ -24,6 +24,7 @@ size_t hostapd_eid_uhr_capab_len(struct hostapd_data *hapd,\n {\n \tstruct hostapd_hw_modes *mode;\n \tstruct uhr_capabilities *uhr_cap;\n+\tsize_t len = 3 /* ext elem header */ + 6 /* MAC + PHY */;\n \n \tmode = hapd->iface->current_mode;\n \tif (!mode)\n@@ -33,7 +34,10 @@ size_t hostapd_eid_uhr_capab_len(struct hostapd_data *hapd,\n \tif (!uhr_cap->uhr_supported)\n \t\treturn 0;\n \n-\treturn 3 /* ext elem header */ + 6 /* MAC + PHY */;\n+\tif (uhr_cap->mac[1] & IEEE80211_UHR_MAC_CAP1_DBE_SUPP)\n+\t\tlen++;\n+\n+\treturn len;\n }\n \n \n@@ -41,6 +45,8 @@ u8 * hostapd_eid_uhr_capab(struct hostapd_data *hapd, u8 *eid,\n \t\t\t   enum ieee80211_op_mode opmode)\n {\n \tstruct hostapd_hw_modes *mode;\n+\tstruct he_capabilities *he_cap;\n+\tstruct eht_capabilities *eht_cap;\n \tstruct uhr_capabilities *uhr_cap;\n \tstruct ieee80211_uhr_capabilities *cap;\n \tu8 *pos = eid, *length_pos;\n@@ -49,8 +55,12 @@ u8 * hostapd_eid_uhr_capab(struct hostapd_data *hapd, u8 *eid,\n \tif (!mode)\n \t\treturn eid;\n \n+\the_cap = &mode->he_capab[opmode];\n+\teht_cap = &mode->eht_capab[opmode];\n \tuhr_cap = &mode->uhr_capab[opmode];\n-\tif (!uhr_cap->uhr_supported)\n+\tif (!he_cap->he_supported ||\n+\t    !eht_cap->eht_supported ||\n+\t    !uhr_cap->uhr_supported)\n \t\treturn eid;\n \n \t*pos++ = WLAN_EID_EXTENSION;\n@@ -62,6 +72,35 @@ u8 * hostapd_eid_uhr_capab(struct hostapd_data *hapd, u8 *eid,\n \tos_memcpy(cap->phy, uhr_cap->phy, sizeof(cap->phy));\n \tpos += sizeof(*cap);\n \n+\tif (opmode == IEEE80211_MODE_AP &&\n+\t    cap->mac[1] & IEEE80211_UHR_MAC_CAP1_DBE_SUPP) {\n+\t\t/*\n+\t\t * Assume that HE implies VHT implies 80 MHz at least,\n+\t\t * DBE doesn't exist on 2.4 GHz and the capability\n+\t\t * shouldn't be set by the driver.\n+\t\t *\n+\t\t * It's also not very relevant if DBE isn't enabled.\n+\t\t */\n+\t\tu8 dbe_bw = IEEE80211_UHR_DBE_CAP_MAX_BW_80MHZ;\n+\n+\t\tif (he_cap->phy_cap[HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &\n+\t\t\t\tHE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G)\n+\t\t\tdbe_bw = IEEE80211_UHR_DBE_CAP_MAX_BW_160MHZ;\n+\n+\t\tif (is_6ghz_op_class(hapd->iconf->op_class) &&\n+\t\t    eht_cap->phy_cap[EHT_PHYCAP_320MHZ_IN_6GHZ_SUPPORT_IDX] &\n+\t\t\t\tEHT_PHYCAP_320MHZ_IN_6GHZ_SUPPORT_MASK)\n+\t\t\tdbe_bw = IEEE80211_UHR_DBE_CAP_MAX_BW_320MHZ;\n+\n+\t\t/*\n+\t\t * No MCS maps or other further DBE capabilities\n+\t\t * since we just use EHT capabilities and advertise\n+\t\t * full EHT capabilities even if operating in a\n+\t\t * lower bandwidth.\n+\t\t */\n+\t\t*pos++ = dbe_bw;\n+\t}\n+\n \t*length_pos = pos - (eid + 2);\n \treturn pos;\n }\ndiff --git a/src/common/ieee802_11_defs.h b/src/common/ieee802_11_defs.h\nindex 7ec295e5a248..8b32e95e227d 100644\n--- a/src/common/ieee802_11_defs.h\n+++ b/src/common/ieee802_11_defs.h\n@@ -3297,12 +3297,21 @@ struct ieee80211_s1g_beacon_compat {\n \tle32 tsf_completion;\n } STRUCT_PACKED;\n \n+#define IEEE80211_UHR_MAC_CAP1_DBE_SUPP\t\t0x04\n+\n+#define IEEE80211_UHR_DBE_CAP_MAX_BW_MASK\t0x07\n+#define IEEE80211_UHR_DBE_CAP_MAX_BW_40MHZ\t1\n+#define IEEE80211_UHR_DBE_CAP_MAX_BW_80MHZ\t2\n+#define IEEE80211_UHR_DBE_CAP_MAX_BW_160MHZ\t3\n+#define IEEE80211_UHR_DBE_CAP_MAX_BW_320MHZ\t4\n+\n /* UHR Capabilities element format */\n struct ieee80211_uhr_capabilities {\n \t/* UHR MAC Capabilities Information */\n \tu8 mac[5];\n \t/* UHR PHY Capabilities Information */\n \tu8 phy[1];\n+\t/* followed by DBE capabilities on AP */\n } STRUCT_PACKED;\n \n #define UHR_OPER_PARAMS_DPS_ENA               0x0001\n","prefixes":["v3","5/8"]}