From patchwork Fri Jan 17 17:04:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 858918 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 6B5B219F419 for ; Fri, 17 Jan 2025 17:04:48 +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=1737133490; cv=none; b=KSo5hucfhdmyZBMnDa//DoZpCw1LG5DWxL6HzeeBjWkyg0BPpNYna1e62/9XtoUjpvPMDT7REM4tn/A63HA2wES+7jLZxRUh43SKof3bvzVtsmt3jLKBMHCr2gKVx4F65rv06yPlgpCjWF8BdEFYFWbVCWDoX9Pz+bjs70g4qSc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737133490; c=relaxed/simple; bh=i+RzHJQN0ZCQZ6Bk9RTDZz0cUB6cdbxXMCWCHzkF3IE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TaPVoX8CH0ItLxX3htXarc/gioeaGxQDUUDPqt1qUY0xiCEnxx4blOAOgNj0TjI6uV+AvZ8X6lqrwHTaUIYHiD5C11eMLbUWZmNM7HJNFauYOWdbG3CKvkSvYhWsJ5BEpWv0ox6gbpMstOVQX5XxSfEtBSxBIfj6bIU4UHu0rEU= 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=mY/3tgfu; 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="mY/3tgfu" 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 50H9J2Bw030838; Fri, 17 Jan 2025 17:04:42 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= KjBeHy+JsYR11EmXaMnb367kiBQ7+Qc6TgIurHgpesE=; b=mY/3tgfuAADAzTjQ qQqomrKbzl1ISIXdG/qf4/U7NNGbb1Yq81nTD6r4UzXyiXBo0aCXl0FOVOS8avXk ZQRwJMgzppjJHwhEe9H3OLE/7PuP8A0dwuDJaog3XyRsSuGxIn68OoZf+QvPzBm5 Aq+GtvfbAIcuCcjrAa+xo8EqhgvGMs/8+mFB/fR6V4iVvFu8cITGcHJhyfG+z33b tA3ip9pbj2AK2tinwPsIIlVjRW0SNTlyqoI5zAC5gSPLTtpDFmXMdtjmhhmrVYeW YdP2vMzEwQKgh9xQdHHwHyLXqz8OblrqWImrFnEZP8QoJCh7bTrXM25Gzva8gyWb b8Am3Q== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 447mfcs61f-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jan 2025 17:04:42 +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 50HH4fE1020827 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jan 2025 17:04:41 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; Fri, 17 Jan 2025 09:04:38 -0800 From: Rameshkumar Sundaram To: CC: , , "Ramasamy Kaliappan" , Rameshkumar Sundaram Subject: [PATCH v2 1/3] wifi: cfg80211: Add support to get EMLSR capabilities of non-AP MLD Date: Fri, 17 Jan 2025 22:34:14 +0530 Message-ID: <20250117170416.2907530-2-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250117170416.2907530-1-quic_ramess@quicinc.com> References: <20250117170416.2907530-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: nasanex01a.na.qualcomm.com (10.52.223.231) 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: aqDtKxLtzHi2GTGLfWvX2EBQfwlZ5AV- X-Proofpoint-ORIG-GUID: aqDtKxLtzHi2GTGLfWvX2EBQfwlZ5AV- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-17_06,2025-01-16_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 lowpriorityscore=0 mlxlogscore=999 spamscore=0 mlxscore=0 impostorscore=0 phishscore=0 bulkscore=0 malwarescore=0 priorityscore=1501 clxscore=1015 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501170134 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 | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 363d7dd2255a..7a80dbf37881 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 d7d3da0f6833..8e5002aaedab 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), @@ -7457,6 +7458,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]); @@ -7615,6 +7622,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 Fri Jan 17 17:04:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 858473 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 EA0B31A070E for ; Fri, 17 Jan 2025 17:04:50 +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=1737133492; cv=none; b=IZc2px2Ibkma0hlIOefmRVwwfr4CmBLWPCxIKw5RfTo2tjTehpyLSRz0LYaVsnz1LXh6vZgnwQYHL3cEnneWdhqo9qtxeaBWawe2vkK69vLTxX25PRwRvFKbxqmStvJaYdfo1racNYcF8NbyrYtdz9b+yz36CbGvpCguJtLFA8Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737133492; c=relaxed/simple; bh=PYbHU42LjxAJ5UyUGgfxBx6+FalWAzW7K8XF0YdzO1k=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=K1hikb3nLrjEZXftqYykn/FLwdxyuVgWBy/PRBQ8uU0fLcAwMMSih3nnRJlep+1gx4lBYqd9gdbLFBmUwsGGS4zXkZMa8cPJBeBFOwvNzaK8eCmu7s8m9nmI49Tuqgyy5P/UFJRhDr5cjc+ODe8nficKQQzXbTNzAhPorC+8u7Y= 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=VZyMno8k; 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="VZyMno8k" Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 50HE5mrh010741; Fri, 17 Jan 2025 17:04:44 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= EUDjvYLYB1qw3EJhDCB5ckEKJ+Qhc+EiqKr7Qiiqb/o=; b=VZyMno8kfAtzM+ef Pyy/tp0OmCFVuZLzsmHJ+lsLTlAVJt/WF18d24tEwymPqVUoGPCQ9tDG1p6yOIyc VgFVxjhBL2lUTYws9QKkbke0cwREbcFI6MLWl2bP9t4KuM/OOYTw+XBQzUzvxen5 rPY4njGQCzxMosKUTm4Dyjo30TQhJ1zmz8rwPWZBJ9uG/h6C7DuIgBWMjOYnyNdE aFnuc1XKLaFQgkHoEbTfqo3MAS1RLcduBW6wesAQx05eswZ4UWs/TPEK68d2UK3W i5MHuS8MVhj/AuLNRFzCj8/ymeLlYKVAELc1mKbCSMs5oq260HnNYptWAHfAaWfV lD3C/g== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 447rnx0eqg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jan 2025 17:04:44 +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 50HH4h0c020869 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jan 2025 17:04:43 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; Fri, 17 Jan 2025 09:04:41 -0800 From: Rameshkumar Sundaram To: CC: , , "Ramasamy Kaliappan" , Rameshkumar Sundaram Subject: [PATCH v2 2/3] wifi: mac80211: update ML STA with EML capabilities Date: Fri, 17 Jan 2025 22:34:15 +0530 Message-ID: <20250117170416.2907530-3-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250117170416.2907530-1-quic_ramess@quicinc.com> References: <20250117170416.2907530-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: nasanex01a.na.qualcomm.com (10.52.223.231) 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: OxIKIkUnkZdUoMID8iYvFbTBGOT5RDJA X-Proofpoint-GUID: OxIKIkUnkZdUoMID8iYvFbTBGOT5RDJA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-17_06,2025-01-16_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 phishscore=0 impostorscore=0 mlxlogscore=990 mlxscore=0 priorityscore=1501 clxscore=1015 lowpriorityscore=0 bulkscore=0 malwarescore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501170134 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 c3ed2fcff8b7..3a396b0f5421 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h @@ -2487,6 +2487,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. @@ -2521,6 +2522,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 9351c64608a9..ed1bf9f3d564 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -2067,6 +2067,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 Fri Jan 17 17:04:16 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Rameshkumar Sundaram X-Patchwork-Id: 858917 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 109E519F464 for ; Fri, 17 Jan 2025 17:04:52 +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=1737133494; cv=none; b=A6n7sWraM2KmFAMjeBRuFEDpZtYkfvIFF4kr0UPIUP5AwZVrT4NAcJeMuhpUDA94ORBdArMeIiys6eSq+A3odU3zxl4wX+hEPcm07QZnoyEnEi45GQLjSSK/PNB5XGloQ59K70FSRiZDuW1Lfu0aNv0x73ijZCFgMjE3dp2hLvo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737133494; c=relaxed/simple; bh=0T4pyg6hpPZG1mCuHMIBRotxMBcU2Pbdda04ufCKUps=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=iv6kSfowRadNKtvaNa6kIXHio8tcVeZXRntubtqRI4M0Y2gV5woBWUYxWNI//bI3wLkvhsxwjqmkVBvziPoqvJvrSUC+Hk1NxQbITYuEtykT8qyfl2yKrDnZE9044IiMjvkNWB9or9WLHNkfFb1bW6Y8Sqe69sEZy27t+HxceFk= 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=Pl1ci1Ej; 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="Pl1ci1Ej" 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 50H9nQQE019669; Fri, 17 Jan 2025 17:04:47 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= zgJP9uDYJbht/9vHi8HT0HlVZgDm8hC8LkxkarvuuQ8=; b=Pl1ci1Ej9YwO2AZG ZuXCO6A7J4Gf8L8aJZ07xRneQIPu9o/MEeCU6s0L2mF3rswKG4jsg1foyNPz8Tf4 XHjeH8vWkyJDu0eU6xhUngSNM4W0JUEBEl3V9QEGHX20Tjb1tgbRjubBilijPCV+ fLKrJcn/zf0jdX6kPdcsFv1+xmRwb6bm8SAIDcrnEn9BKpsmhdRPWzaASnb6XLKc AebYypI0o86EpyC97o7MaWJZFKVk7ulFGsIlbsdxSVceeob59SgCWdSCwqU97P5M TA79+WPk3XdlhFOlyaTkwNFT9hDZ5DbLF0OjX3hpY5NKEFgIe7itjHaVIx7an1X5 q8HQUA== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 447mwq13x6-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jan 2025 17:04:47 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 50HH4kED025515 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jan 2025 17:04:46 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; Fri, 17 Jan 2025 09:04:43 -0800 From: Rameshkumar Sundaram To: CC: , , "Ramasamy Kaliappan" , Rameshkumar Sundaram Subject: [PATCH v2 3/3] wifi: ath12k: update EMLSR capabilities of ML Station Date: Fri, 17 Jan 2025 22:34:16 +0530 Message-ID: <20250117170416.2907530-4-quic_ramess@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20250117170416.2907530-1-quic_ramess@quicinc.com> References: <20250117170416.2907530-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: nasanex01a.na.qualcomm.com (10.52.223.231) 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: 46fBwWqfl1JlYRrqclfDO4vaXL0Qy8YT X-Proofpoint-GUID: 46fBwWqfl1JlYRrqclfDO4vaXL0Qy8YT X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1057,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-01-17_06,2025-01-16_01,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 spamscore=0 malwarescore=0 mlxscore=0 suspectscore=0 priorityscore=1501 lowpriorityscore=0 phishscore=0 impostorscore=0 mlxlogscore=999 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2501170134 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 | 81 ++++++++++++++++++++++++++- drivers/net/wireless/ath/ath12k/wmi.h | 3 +- 3 files changed, 82 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/ath/ath12k/mac.c b/drivers/net/wireless/ath/ath12k/mac.c index 62d64ed5ff31..d0775b56cc37 100644 --- a/drivers/net/wireless/ath/ath12k/mac.c +++ b/drivers/net/wireless/ath/ath12k/mac.c @@ -3133,6 +3133,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 dd3856be6ff1..292a738e5b19 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.c +++ b/drivers/net/wireless/ath/ath12k/wmi.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: BSD-3-Clause-Clear /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #include #include @@ -2131,6 +2131,65 @@ static void ath12k_wmi_copy_peer_flags(struct wmi_peer_assoc_complete_cmd *cmd, cmd->peer_flags &= cpu_to_le32(~WMI_PEER_HT); } +#define EMLSR_PAD_DELAY_MAX 5 +#define EMLSR_TRANS_DELAY_MAX 6 +#define EML_TRANS_TIMEOUT_MAX 11 +#define TU_TO_USEC(t) ((t) << 10) /* (t) x 1024 */ + +static u32 ath12k_wmi_get_emlsr_pad_delay_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); + static const u32 pad_delay_us[EMLSR_PAD_DELAY_MAX] = {0, 32, 64, 128, 256}; + + if (pad_delay >= EMLSR_PAD_DELAY_MAX) + return 0; + + return pad_delay_us[pad_delay]; +} + +static u32 ath12k_wmi_get_emlsr_trans_delay_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); + static const u32 trans_delay_us[EMLSR_TRANS_DELAY_MAX] = { + 0, 16, 32, 64, 128, 256 + }; + + if (trans_delay >= EMLSR_TRANS_DELAY_MAX) + return 0; + + return trans_delay_us[trans_delay]; +} + +static u32 ath12k_wmi_get_emlsr_trans_timeout_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); + static const u32 trans_timeout_us[EML_TRANS_TIMEOUT_MAX] = { + 0, 128, 256, 512, + TU_TO_USEC(1), + TU_TO_USEC((1U << 1)), + TU_TO_USEC((1U << 2)), + TU_TO_USEC((1U << 3)), + TU_TO_USEC((1U << 4)), + TU_TO_USEC((1U << 5)), + TU_TO_USEC((1U << 6)), + }; + + if (timeout >= EML_TRANS_TIMEOUT_MAX) + return 0; + + return trans_timeout_us[timeout]; +} + int ath12k_wmi_send_peer_assoc_cmd(struct ath12k *ar, struct ath12k_wmi_peer_assoc_arg *arg) { @@ -2144,9 +2203,10 @@ int ath12k_wmi_send_peer_assoc_cmd(struct ath12k *ar, struct sk_buff *skb; struct wmi_tlv *tlv; void *ptr; - u32 peer_legacy_rates_align; + u32 peer_legacy_rates_align, eml_delay, eml_trans_timeout; u32 peer_ht_rates_align; int i, ret, len; + u16 eml_cap; __le32 v; peer_legacy_rates_align = roundup(arg->peer_legacy_rates.num_rates, @@ -2318,6 +2378,23 @@ 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 = ath12k_wmi_get_emlsr_pad_delay_us(eml_cap); + ml_params->emlsr_padding_delay_us = cpu_to_le32(eml_delay); + /* Transition delay */ + eml_delay = ath12k_wmi_get_emlsr_trans_delay_us(eml_cap); + ml_params->emlsr_trans_delay_us = cpu_to_le32(eml_delay); + /* Transition timeout */ + eml_trans_timeout = ath12k_wmi_get_emlsr_trans_timeout_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 6f925bce17f7..8e91c0f473a5 100644 --- a/drivers/net/wireless/ath/ath12k/wmi.h +++ b/drivers/net/wireless/ath/ath12k/wmi.h @@ -1,7 +1,7 @@ /* SPDX-License-Identifier: BSD-3-Clause-Clear */ /* * Copyright (c) 2018-2021 The Linux Foundation. All rights reserved. - * Copyright (c) 2021-2024 Qualcomm Innovation Center, Inc. All rights reserved. + * Copyright (c) 2021-2025 Qualcomm Innovation Center, Inc. All rights reserved. */ #ifndef ATH12K_WMI_H @@ -3719,6 +3719,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 {