From patchwork Mon Mar 3 22:18:40 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 871179 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DE24C21507B for ; Mon, 3 Mar 2025 22:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741040353; cv=none; b=N7E7UuljeOb2tb1FS2MhsJBp7Dg/XW6H2MTaNgJOEBAGegJb0sA5vJ5WBoxb46MVYQ1I+CbFnvhf/vnZ+FJBdJ/OFGJh2VfcLcNLAAdQlvSPt+2KD96WA9CIh2cYRU7vYmANYDFMnsmEETh2pYvOBIr2wb9iFgsvLz9ZBNMludg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741040353; c=relaxed/simple; bh=YubHEj4Eoa6k/kbTSUADepJPzbmReJpYKMiUyBvgn0I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=sbqd82aGf2hUk4dk1nerLmkBYJrjhyj1QUu3PVd+3qdo8Tgork7HlAQjFUNYpDGG5EK79ThWf/SJ6T7OtbzRE40B99+L87vqKsE3QgN4heCZw9+dERyXEnocXqrSDpTry6/phuDhorTgtbxco3Q6zIgYhBPS8qHFWgOOlSqhr+o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=byFe+87q; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="byFe+87q" Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 523A51ou003375; Mon, 3 Mar 2025 22:19:04 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= KmX2LW2OQivBLLvcJl/UG391q2DvDLFmRAgTtR+qMJ0=; b=byFe+87q040BIMlV zGpCsQC597GVeHFGJ5AD4JkgWV0/THKI8uJgCiwpmCkMrmXnh1D150sJgoxUMsp8 AoLw7jpaq0cG9zrxp8lmz0z7CiyoVxbw4/Zl+Ui4LQQac1HRMvuPM7b7o3uPRk6Y qD6mSBdgtBbi3sA0tIHqPycKooTemGuiBjuPpKuSPd4tmnnFjY5zr+kqPcffVZef ZQHvCc5OIQ0tLJzFSonFm/MszMhEYuFwi9/uEwn3gQhBs/8KhGoI0pnk8MpKyp0U vMLOYFibfK8Ul6YY7d+oWWJuGwmWLYXGjl4QPg7ZRvTG6kuXZ+nPmPakw4DsFkfg VyuOnw== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 453t88x96r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Mar 2025 22:19:03 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 523MJ2gZ012298 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 3 Mar 2025 22:19:02 GMT Received: from hu-ramess-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 3 Mar 2025 14:19:00 -0800 From: Rameshkumar Sundaram To: CC: , , "Ramasamy Kaliappan" , Rameshkumar Sundaram Subject: [PATCH wireless-next v3 1/4] wifi: cfg80211: Add support to get EMLSR capabilities of non-AP MLD Date: Tue, 4 Mar 2025 03:48:40 +0530 Message-ID: <20250303221843.1809753-2-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250303221843.1809753-1-quic_ramess@quicinc.com> References: <20250303221843.1809753-1-quic_ramess@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: y8mN1Bpjf1DK-RpjdWGGHm1zNQoyghWk X-Proofpoint-GUID: y8mN1Bpjf1DK-RpjdWGGHm1zNQoyghWk X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1093,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-03_11,2025-03-03_04,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 impostorscore=0 spamscore=0 phishscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 mlxlogscore=999 mlxscore=0 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2502100000 definitions=main-2503030173 From: Ramasamy Kaliappan The Enhanced multi-link single-radio (EMLSR) operation allows a non-AP MLD with multiple receive chains to listen on one or more EMLSR links when the corresponding non-AP STA(s) affiliated with the non-AP MLD is (are) in the awake state. [IEEE 802.11be-2024, (35.3.17 Enhanced multi-link single-radio (EMLSR) operation)] An MLD which intends to enable EMLSR operations will set the EML Capabilities Present subfield to 1 and shall set the EMLSR Support subfield in the Common Info field of the Basic Multi-Link element to 1 in all Management frames that include the Basic Multi-Link element except Authentication frames. EML capabilities contains information such as EML Transition timeout, Padding delay and Transition delay. These fields needs to updated to drivers to trigger EMLSR operation and to transmit and receive initial control frame and data frames. Add support to receive EML Capabilities subfield that non-AP MLD advertises during (re)association request and send it to underlying drivers during ADD/SET station. Signed-off-by: Ramasamy Kaliappan Signed-off-by: Rameshkumar Sundaram --- include/net/cfg80211.h | 5 +++++ net/wireless/nl80211.c | 15 ++++++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 6b170a8d086c..43343392878a 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -1756,6 +1756,9 @@ struct cfg80211_ttlm_params { * @supported_oper_classes_len: number of supported operating classes * @support_p2p_ps: information if station supports P2P PS mechanism * @airtime_weight: airtime scheduler weight for this station + * @eml_cap_present: Specifies if EML capabilities field (@eml_cap) is + * present/updated + * @eml_cap: EML capabilities of this station * @link_sta_params: link related params. */ struct station_parameters { @@ -1780,6 +1783,8 @@ struct station_parameters { u8 supported_oper_classes_len; int support_p2p_ps; u16 airtime_weight; + bool eml_cap_present; + u16 eml_cap; struct link_station_parameters link_sta_params; }; diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 2c4e06610a79..a9a067d4a25a 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -833,6 +833,7 @@ static const struct nla_policy nl80211_policy[NUM_NL80211_ATTR] = { [NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN), [NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG }, [NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT }, + [NL80211_ATTR_EML_CAPABILITY] = { .type = NLA_U16 }, [NL80211_ATTR_PUNCT_BITMAP] = NLA_POLICY_FULL_RANGE(NLA_U32, &nl80211_punct_bitmap_range), @@ -7095,7 +7096,8 @@ int cfg80211_check_station_change(struct wiphy *wiphy, if (params->ext_capab || params->link_sta_params.ht_capa || params->link_sta_params.vht_capa || params->link_sta_params.he_capa || - params->link_sta_params.eht_capa) + params->link_sta_params.eht_capa || + params->eml_cap_present) return -EINVAL; if (params->sta_flags_mask & BIT(NL80211_STA_FLAG_SPP_AMSDU)) return -EINVAL; @@ -7462,6 +7464,12 @@ static int nl80211_set_station(struct sk_buff *skb, struct genl_info *info) params.link_sta_params.he_6ghz_capa = nla_data(info->attrs[NL80211_ATTR_HE_6GHZ_CAPABILITY]); + if (info->attrs[NL80211_ATTR_EML_CAPABILITY]) { + params.eml_cap_present = true; + params.eml_cap = + nla_get_u16(info->attrs[NL80211_ATTR_EML_CAPABILITY]); + } + if (info->attrs[NL80211_ATTR_AIRTIME_WEIGHT]) params.airtime_weight = nla_get_u16(info->attrs[NL80211_ATTR_AIRTIME_WEIGHT]); @@ -7620,6 +7628,11 @@ static int nl80211_new_station(struct sk_buff *skb, struct genl_info *info) } } + if (info->attrs[NL80211_ATTR_EML_CAPABILITY]) { + params.eml_cap_present = true; + params.eml_cap = nla_get_u16(info->attrs[NL80211_ATTR_EML_CAPABILITY]); + } + if (info->attrs[NL80211_ATTR_HE_6GHZ_CAPABILITY]) params.link_sta_params.he_6ghz_capa = nla_data(info->attrs[NL80211_ATTR_HE_6GHZ_CAPABILITY]); From patchwork Mon Mar 3 22:18:41 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 870095 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 30D44235C1D for ; Mon, 3 Mar 2025 22:19:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741040353; cv=none; b=XMJwaiea4hfptT2TcJqngqO10FQ3FWrR0c9KeA1FJj9iBS5sYIkVIpy+vdttZs2EUyQGAOXNl9OR6UMQ5EBvSLNyALwSoRZUx0S5nB5zgjuyZ9KmjnoqQnZTP6/uF5XtXpzwD4gEhWuch1kdgP6mQV4fNC0SFR2L7XIRi9LyLHg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741040353; c=relaxed/simple; bh=c5SmEMan/FfnpMDTLt3JLqmmC/N8P69os032UEgThqI=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=aZr3KwMTbQ1PEYuGY9b4qnYo0eUxQimo02mbzcXR8dSxC2UAze/geEkbMkkkLmtKpA+xprm5Ct8lkj6FslSLciXaKhMEHHqkNmhngrguaiODi/jxBl5U7vIc/k+/O9gVjtLEhdJEl7L7Go8tCUG3Fg9iqM1pR6JxrILvsVi8c7Y= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=knP5MsAU; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="knP5MsAU" Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 523AwCIQ022737; Mon, 3 Mar 2025 22:19:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= jsQYahd56p8iD7rT66MO+DkRt9uZksoQbbXlVQ/seuM=; b=knP5MsAUdl+P+K2W b6aME/9Nn8bTh0e9MrNHuTavYZfxcRn5Bo/JsKKkfzGH1GbSwS4QCuRGZb4zMee9 v+ISgKgrnaO4Za4ATFxvl4b96+os8o9btXtOfbYm1ktT28B26Yg+ECsJHiBcMk1+ lqATaPd48/cbsDQG3eXq5fkMPh4jLXo7IV1yc2WFVZnzZgDb7Rcun+Su0ITa+7F3 aKj6+n2Qae7s7Kso2NB0uLGNk0GXSjAePEyJDSLi+ke8Gg2UoUN1z8nOFyrbaPVO qC2DrFWpGH16Qg1/FG/22qZwzxyaru3857QXYWmnz5lH4xaIQmVjZE491dxlKkiL HZgNMQ== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 453t7hx7f9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Mar 2025 22:19:06 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 523MJ5cr022844 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 3 Mar 2025 22:19:05 GMT Received: from hu-ramess-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 3 Mar 2025 14:19:03 -0800 From: Rameshkumar Sundaram To: CC: , , "Ramasamy Kaliappan" , Rameshkumar Sundaram Subject: [PATCH wireless-next v3 2/4] wifi: mac80211: update ML STA with EML capabilities Date: Tue, 4 Mar 2025 03:48:41 +0530 Message-ID: <20250303221843.1809753-3-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250303221843.1809753-1-quic_ramess@quicinc.com> References: <20250303221843.1809753-1-quic_ramess@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: m3mHOqIu8_Bizcv1SH6DzL_RMwB3ojm1 X-Proofpoint-ORIG-GUID: m3mHOqIu8_Bizcv1SH6DzL_RMwB3ojm1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1093,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-03_11,2025-03-03_04,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 impostorscore=0 phishscore=0 spamscore=0 malwarescore=0 adultscore=0 suspectscore=0 mlxlogscore=999 clxscore=1015 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2502100000 definitions=main-2503030173 From: Ramasamy Kaliappan When an AP and Non-AP MLD operates in EMLSR mode, EML capabilities advertised during Association contains information such as EMLSR transition delay, padding delay and transition timeout values. Save the EML capabilities information that is received during station addition and capabilities update in ieee80211_sta so that drivers can use it for triggering EMLSR operation. Signed-off-by: Ramasamy Kaliappan Signed-off-by: Rameshkumar Sundaram --- include/net/mac80211.h | 2 ++ net/mac80211/cfg.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/include/net/mac80211.h b/include/net/mac80211.h index c498f685d01f..99c3224a081a 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2488,6 +2488,7 @@ struct ieee80211_link_sta { * @max_amsdu_subframes: indicates the maximal number of MSDUs in a single * A-MSDU. Taken from the Extended Capabilities element. 0 means * unlimited. + * @eml_cap: EML capabilities of this MLO station * @cur: currently valid data as aggregated from the active links * For non MLO STA it will point to the deflink data. For MLO STA * ieee80211_sta_recalc_aggregates() must be called to update it. @@ -2522,6 +2523,7 @@ struct ieee80211_sta { bool mlo; bool spp_amsdu; u8 max_amsdu_subframes; + u16 eml_cap; struct ieee80211_sta_aggregates *cur; diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 09708a060bb7..e73f54a36aed 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2066,6 +2066,9 @@ static int sta_apply_parameters(struct ieee80211_local *local, if (params->listen_interval >= 0) sta->listen_interval = params->listen_interval; + if (params->eml_cap_present) + sta->sta.eml_cap = params->eml_cap; + ret = sta_link_apply_parameters(local, sta, STA_LINK_MODE_STA_MODIFY, ¶ms->link_sta_params); if (ret) From patchwork Mon Mar 3 22:18:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 871178 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10AC21F03C0 for ; Mon, 3 Mar 2025 22:19:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741040356; cv=none; b=Cjm6qrpCrFD8yGIDfnnZhG3RubqH8NC90Ank2VaSRMfQab7lhi8l9+XZeRdpcnZxbHj3GpnFKz7x9DExEy/V2woyby9nUgYcpDDXRWKMzkpvW8RdQSe/6dBpystYkSPAbB8gE6FBQ9NO5+B3dJCFEG3iT7aFUQqOlG50eYMqSMI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741040356; c=relaxed/simple; bh=I8+UTNtDvCyJd6UNjMyPjabdK00jSce3oBVI+c+O2TM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bSpN8IPYRxAjf2o4+7l+LQxb0DsKQenBQcE9BG6+JKr61zJ4lQqPuS3AGdME8I83koJGvQbMBuUDKisYZmHbuFK6KFLTCSbaKrqgGIo56KZZVTpf4qndcG40bg9RxtkXnRYjOEXJfhVP3Dqn/Hi5AvXxYXSpJZmH37z33m2gOSs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=biCWcaCN; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="biCWcaCN" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 523ATpf5022253; Mon, 3 Mar 2025 22:19:08 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= EMEKPPsc1mTDR0IkqpRNPt1PS1AHnxmniKqIhhUrOtE=; b=biCWcaCNsIMuEoru CU/NeDP7KWhFurbJeF7qhoj0vOiP7j1B8apQ98ubGBX58+ot9I8YppUyM6SUF2qX i+r8X0dBoxFcW1iwrDLXe9qJQ+9ibnqCYB7LPYqkJMl4PjMYsbsmHLRWUgBkIhCE BT+ENhcTS1lIz7Qy6QlvQLBNbmc1GWRWtiLxtWU3cRruKH0rOkTaHaMpA5xbM5sJ jVzOZjAFrkQc1/p1dR8nNLNwH2M3abpG88Y/054f9FqGn5F8HlcWgEyljxZeIrmh K4txIRxhrfpjAM2rehku+pDabFoxOqs0jjmGbFLbX6hOVA3jha8g9RMKiNdDdbee X5nWjQ== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 453t9965mc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Mar 2025 22:19:07 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 523MJ7dw024128 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 3 Mar 2025 22:19:07 GMT Received: from hu-ramess-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 3 Mar 2025 14:19:05 -0800 From: Rameshkumar Sundaram To: CC: , , Rameshkumar Sundaram Subject: [PATCH wireless-next v3 3/4] wifi: mac80211: Add helpers to fetch EMLSR delay and timeout values Date: Tue, 4 Mar 2025 03:48:42 +0530 Message-ID: <20250303221843.1809753-4-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250303221843.1809753-1-quic_ramess@quicinc.com> References: <20250303221843.1809753-1-quic_ramess@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: BY17J26gmmOX96UPKAlv4iy7Fsi2qUHA X-Proofpoint-GUID: BY17J26gmmOX96UPKAlv4iy7Fsi2qUHA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1093,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-03_11,2025-03-03_04,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 mlxlogscore=999 mlxscore=0 lowpriorityscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 spamscore=0 adultscore=0 impostorscore=0 malwarescore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2502100000 definitions=main-2503030173 Add helpers to get EMLSR transition delay, padding delay and transition timeout values from EML capabilities field of Multi-link Element. Signed-off-by: Rameshkumar Sundaram --- include/linux/ieee80211.h | 71 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h index 508d466de1cc..baebc2c483f1 100644 --- a/include/linux/ieee80211.h +++ b/include/linux/ieee80211.h @@ -5615,6 +5615,77 @@ static inline bool ieee80211_tid_to_link_map_size_ok(const u8 *data, size_t len) return len >= fixed + elem_len; } +/** + * ieee80211_emlsr_pad_delay_in_us - Fetch the EMLSR Padding delay + * in microseconds + * @eml_cap: EML capabilities field value from common info field of + * the Multi-link element + * Return: the EMLSR Padding delay (in microseconds) encoded in the + * EML Capabilities field + */ + +static inline u32 ieee80211_emlsr_pad_delay_in_us(u16 eml_cap) +{ + /* IEEE Std 802.11be-2024 Table 9-417i—Encoding of the EMLSR + * Padding Delay subfield. + */ + u32 pad_delay = u16_get_bits(eml_cap, IEEE80211_EML_CAP_EMLSR_PADDING_DELAY); + + if (!pad_delay || pad_delay > IEEE80211_EML_CAP_EMLSR_PADDING_DELAY_256US) + return 0; + + return 32 * (1 << (pad_delay - 1)); +} + +/** + * ieee80211_emlsr_trans_delay_in_us - Fetch the EMLSR Transition + * delay in microseconds + * @eml_cap: EML capabilities field value from common info field of + * the Multi-link element + * Return: the EMLSR Transition delay (in microseconds) encoded in the + * EML Capabilities field + */ + +static inline u32 ieee80211_emlsr_trans_delay_in_us(u16 eml_cap) +{ + /* IEEE Std 802.11be-2024 Table 9-417j—Encoding of the EMLSR + * Transition Delay subfield. + */ + u32 trans_delay = u16_get_bits(eml_cap, + IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY); + + /* invalid values also just use 0 */ + if (!trans_delay || + trans_delay > IEEE80211_EML_CAP_EMLSR_TRANSITION_DELAY_256US) + return 0; + + return 16 * (1 << (trans_delay - 1)); +} + +/** + * ieee80211_eml_trans_timeout_in_us - Fetch the EMLSR Transition + * timeout value in microseconds + * @eml_cap: EML capabilities field value from common info field of + * the Multi-link element + * Return: the EMLSR Transition timeout (in microseconds) encoded in + * the EML Capabilities field + */ + +static inline u32 ieee80211_eml_trans_timeout_in_us(u16 eml_cap) +{ + /* IEEE Std 802.11be-2024 Table 9-417m—Encoding of the + * Transition Timeout subfield. + */ + u8 timeout = u16_get_bits(eml_cap, IEEE80211_EML_CAP_TRANSITION_TIMEOUT); + + /* invalid values also just use 0 */ + if (!timeout || timeout > IEEE80211_EML_CAP_TRANSITION_TIMEOUT_128TU) + return 0; + + return 128 * (1 << (timeout - 1)); + +} + #define for_each_mle_subelement(_elem, _data, _len) \ if (ieee80211_mle_size_ok(_data, _len)) \ for_each_element(_elem, \ From patchwork Mon Mar 3 22:18:43 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 870094 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D4528238D45 for ; Mon, 3 Mar 2025 22:19:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741040358; cv=none; b=ArdA0WfE5tECGLJLeYNih9KqFJ5HvHd5Ldu4hsnCjT9Ds3gs8g9Eg0s7muRu5X/Z4CZdw3Sbke1HGorew/uIkmVkzf9r1M6tUTPrA49qboqd4B57/D5QfABZhbXrBWvVXvm18e/tScAO7Bpkbv/nkBaKsYAQgxjCjyL0ynn+Xgs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741040358; c=relaxed/simple; bh=TCuZ1D7DP7gUBvqO0EXnpiIGysee9WjbA5wZXhCstl8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ElhywYP4arDBjsp21jwJXj5rBiSBVmuzZaUF9dHfSU4Ji8SZh9i2OFTebdck0aCwSNKvuFXcoERGs77kWv8XRqJD2nw2z60bbsL/bcvb/1vclycd5FY0zji4ZCnvCX9e9ym1ctyYfrN3hE6V0nyyMptffZyi/1vM8au8s3QcMUc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=oH1iT5Vu; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="oH1iT5Vu" Received: from pps.filterd (m0279872.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 523K1tKs028371; Mon, 3 Mar 2025 22:19:11 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= BYVAsJHEWpGl0mKEZdYbpJvkvhFY5YzccQe4/deTjJY=; b=oH1iT5VutcjAlogH ZRKcl/iyrp6WJ5nsG5s/5M9R83mI/lEaxGWbBMCDrsI+RqIJFOFUL/YtLP1GLq/j Y75KcePuD3zvLrpgoaCDT+k/rMj2PCdKssn7uabYKzSu1xpouod4WTHr8FRqCmxA P5zpoSRqhi3JB2QEyNpJV37miHAap4/Aoyahq+KZguHJFZ8hpDskypWNMTapQo6g SM47cGk+1nu+Qt8CgSNSHt121N18nx9zX5KZEMt2OJ7QAUzbwzPe7Xbxxp53D522 P+v5vxqK079tx90RrO8iBjH+6/+U7pKNHTDJKKSEmVCOBBQ4wMCx7/beyjZUF1kb PAj36A== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 453tm5p9cs-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Mar 2025 22:19:10 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 523MJ9ln015942 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 3 Mar 2025 22:19:09 GMT Received: from hu-ramess-blr.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 3 Mar 2025 14:19:07 -0800 From: Rameshkumar Sundaram To: CC: , , "Ramasamy Kaliappan" , Rameshkumar Sundaram Subject: [PATCH wireless-next v3 4/4] wifi: ath12k: update EMLSR capabilities of ML Station Date: Tue, 4 Mar 2025 03:48:43 +0530 Message-ID: <20250303221843.1809753-5-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250303221843.1809753-1-quic_ramess@quicinc.com> References: <20250303221843.1809753-1-quic_ramess@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: 0r8wXD-0FJjMF5Ili3rOmjF_C5EEOoOD X-Proofpoint-GUID: 0r8wXD-0FJjMF5Ili3rOmjF_C5EEOoOD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1093,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-03-03_11,2025-03-03_04,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 priorityscore=1501 adultscore=0 clxscore=1015 bulkscore=0 mlxscore=0 phishscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2502100000 definitions=main-2503030171 From: Ramasamy Kaliappan When EMLSR operation is enabled for an ML Station, EMLSR transition timeout, padding delay and transition delay should be updated to Firmware. Above parameters will be used by Firmware to do EMLSR operation such as sending EML operation mode notification frame, initial control frame etc. Obtain above parameters from EML capabilities information present in ieee80211_sta object and update the same to Firmware in peer assoc WMI command sent for ML station. MLO is not enabled in WCN7850 and hence this change is not applicable to it as of now. This can be a leverage once it is enabled in future. Tested-on: QCN9274 hw2.0 PCI WLAN.WBE.1.3.1-00173-QCAHKSWPL_SILICONZ-1 Signed-off-by: Ramasamy Kaliappan Signed-off-by: Rameshkumar Sundaram --- drivers/net/wireless/ath/ath12k/mac.c | 1 + drivers/net/wireless/ath/ath12k/wmi.c | 21 ++++++++++++++++++++- drivers/net/wireless/ath/ath12k/wmi.h | 1 + 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 2d062b5904a8..91aca62e3589 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -3057,6 +3057,7 @@ static void ath12k_peer_assoc_h_mlo(struct ath12k_link_sta *arsta, ml->ml_peer_id = ahsta->ml_peer_id; ml->ieee_link_id = arsta->link_id; ml->num_partner_links = 0; + ml->eml_cap = sta->eml_cap; links = ahsta->links_map; rcu_read_lock(); diff --git a/drivers/net/wireless/ath/ath12k/wmi.c b/drivers/net/wireless/ath/ath12k/wmi.c index 4dd6cdf84571..625d5a0c9453 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -2107,8 +2107,9 @@ int ath12k_wmi_send_peer_assoc_cmd(struct ath12k *ar, struct wmi_tlv *tlv; void *ptr; u32 peer_legacy_rates_align; - u32 peer_ht_rates_align; + u32 peer_ht_rates_align, eml_delay, eml_trans_timeout; int i, ret, len; + u16 eml_cap; __le32 v; peer_legacy_rates_align = roundup(arg->peer_legacy_rates.num_rates, @@ -2280,6 +2281,24 @@ int ath12k_wmi_send_peer_assoc_cmd(struct ath12k *ar, ml_params->logical_link_idx = cpu_to_le32(arg->ml.logical_link_idx); ml_params->ml_peer_id = cpu_to_le32(arg->ml.ml_peer_id); ml_params->ieee_link_id = cpu_to_le32(arg->ml.ieee_link_id); + + eml_cap = arg->ml.eml_cap; + if (u16_get_bits(eml_cap, IEEE80211_EML_CAP_EMLSR_SUPP)) { + /* Padding delay */ + eml_delay = ieee80211_emlsr_pad_delay_in_us(eml_cap); + ml_params->emlsr_padding_delay_us = cpu_to_le32(eml_delay); + /* Transition delay */ + eml_delay = ieee80211_emlsr_trans_delay_in_us(eml_cap); + ml_params->emlsr_trans_delay_us = cpu_to_le32(eml_delay); + /* Transition timeout */ + eml_trans_timeout = ieee80211_eml_trans_timeout_in_us(eml_cap); + ml_params->emlsr_trans_timeout_us = cpu_to_le32(eml_trans_timeout); + ath12k_dbg(ar->ab, ATH12K_DBG_WMI, "wmi peer (%pM) emlsr padding delay %u, trans delay %u trans timeout %u", + arg->peer_mac, ml_params->emlsr_padding_delay_us, + ml_params->emlsr_trans_delay_us, + ml_params->emlsr_trans_timeout_us); + } + ptr += sizeof(*ml_params); skip_ml_params: diff --git a/drivers/net/wireless/ath/ath12k/wmi.h b/drivers/net/wireless/ath/ath12k/wmi.h index b6a197389277..060bf097d4f5 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.h +++ b/drivers/net/wireless/ath/ath12k/wmi.h @@ -3718,6 +3718,7 @@ struct peer_assoc_mlo_params { u32 ieee_link_id; u8 num_partner_links; struct wmi_ml_partner_info partner_info[ATH12K_WMI_MLO_MAX_LINKS]; + u16 eml_cap; }; struct wmi_rate_set_arg {