Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1703909rbb; Mon, 26 Feb 2024 20:23:27 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXZmHOOZdqv7swWF+e+k3rCbZT84+Du/PPhlDi6Wce9GpmbCOF2WIeAd8XWR5G2fzbk+gCs+OiGD3GjK1Dt9zaPOslcYj+/l7HHj1piXw== X-Google-Smtp-Source: AGHT+IHMQPosqsX2WwvRl4oLap3SQRwr2GphnUwQ3qhWFhgQ28WY3krkhGIXQTH5Qpx1T89S30tO X-Received: by 2002:ad4:5cc3:0:b0:68f:4579:6584 with SMTP id iu3-20020ad45cc3000000b0068f45796584mr1249137qvb.43.1709007807618; Mon, 26 Feb 2024 20:23:27 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709007807; cv=pass; d=google.com; s=arc-20160816; b=nL57D4ZdYD5TmlyyUDAlVtivwWUURo5uxhMLmE+wjrJu5HeG2nNTau35Kgdn2xEcTB PfBLg474XIyOyDxOJ+ZFVOVEdIgYbStr1k+5un2nxT8Ow5FNX3j2rSWtpD4XkaiIAjEI +NSPo0HT4KEzMitfHj74R/TI9z+8r690eq7hzLymgMVl44N/iST2nfzOsohYuE3MO83H 3pKZ/fUiqLfVvtjHhCESXVgfsIRJH2d2KI2XMO3JXHtl8ALnJZ4zSoo7gI3yTnHWHpkd 8gTGNSYmkz2W9t4STVuYcfC3nV1buY7U4heQJvzWTiXRn5jiCOnI21wDWX9onGZ5JGnL +Tiw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=RoQJcaxshTkaSe8rlUNCZet6XqNIosatJpiv1LYeJFc=; fh=p+6L1xrTW9P789s+g4PGpV12z6FBii7tlvUllIsJxzk=; b=FDLAWF6ZJy0xdCQ/4i3dznmBrY9tS5oaShl2cH4dUK6yGrz8lD6qOKQ+VhOqLz84La NfpeZ2fhVqPr5YqqqjuGUecj6ygmlWCvEARSchAi883wNln/BU9JQ9lvgp+O/2uTW8+K 2OSTOUHCDz4+43VLbIyzyLYJwU5PMwNLdfI1aqqMb94qXw28aYqFVqFwR2NpqH81ihfP KNzRCOvo7kVUi4ZhtaZpX3DYD5kWheVbuqYP+MU9JT4IXwuVBYBBJq65dXKEEVS4O5+S sdhTGv3nVwR2COgY4ubZjS8nmNIQ/C0OZAR2KdYSvuOXDNwafXRb7Ouk7i6HH92sTLSh s07A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CYtTX+ZO; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-4047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4047-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id iw8-20020a0562140f2800b0068c6fa95b48si6611691qvb.466.2024.02.26.20.23.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 20:23:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=CYtTX+ZO; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-wireless+bounces-4047-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4047-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 5FA411C21DBE for ; Tue, 27 Feb 2024 04:23:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 483C34D9E3; Tue, 27 Feb 2024 04:23:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="CYtTX+ZO" X-Original-To: linux-wireless@vger.kernel.org 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 9D114134BC for ; Tue, 27 Feb 2024 04:23:19 +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=1709007801; cv=none; b=foXV9v7bqvk0rMG5iItAxfYHfG8buKSZKFqEikqip+tzGpyL7BRdA8EurZjpUMrVKXKCZBA2EcZ+NI22PxMku0v8OWx6ES7sZ3Z8ssX7/Vn8kcijJ2WETaosBNSF6mGLcZLEoiMoLedmMDrrIfVgdc9sxlarjiTbo+61aDIxiz8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709007801; c=relaxed/simple; bh=xj+ZAvrSQUrEUtsoWTPtNEvVYS24U/CC/aOVLT50NY8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=s8pdJlnzFNpXyH3fUgF+BFF1BMVv/slrSXx/m/sfIz0mLQkRa0uT+xHVI3HhUM/M5xo73H6uK3nJ8/uMIi9fPaSbxoUtpAA1ZfgvnGTWpYJrPgdiwV9M2DarXnJwPrBmsxb+KWUVGNJG1Vxzq+4GQOwIW8MzlADGoNb3rOCYsYo= 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=CYtTX+ZO; 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 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 41R3vgYI022382; Tue, 27 Feb 2024 04:23:15 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= qcppdkim1; bh=RoQJcaxshTkaSe8rlUNCZet6XqNIosatJpiv1LYeJFc=; b=CY tTX+ZOlc3eap3WS3uqY8pQOJwUXPHh47x/6S+Vojk0tczmCQUtfcd1qIkzjImUAl 6dRKBBg5LPmgsn3Cih5F0Lb0RA0+Ag0eLDbR4MnkKZv5ZViuN3TLQzCveqrI61Wh g4C+JPM8794ccE3+UZq7gjlRfGRNVVkzT94Mti3iHgT8+wT6vkuLxBomztTFIza5 wWR3aZYGP85nkFg/w0Hv8UHbL9/WRK/TRlt4LnX41nnuSqi3h5PPMLtVUAb+bup0 hcPKaQ+E5wmPM7aQK5+tIJyhGRuUR3H95yefOgmmpDYnSlNxeJMDDXF/7T62xsFY pjqRo5FhLdS55QgeJO2w== Received: from nalasppmta02.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3wh89t01th-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Feb 2024 04:23:14 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 41R4ND1L026014 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 27 Feb 2024 04:23:13 GMT Received: from cdcwlex322514-lin.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.1118.40; Mon, 26 Feb 2024 20:23:11 -0800 From: Aditya Kumar Singh To: CC: , Rameshkumar Sundaram , Aditya Kumar Singh Subject: [PATCH 1/2] wifi: mac80211: remove only link keys during stopping link AP Date: Tue, 27 Feb 2024 09:52:50 +0530 Message-ID: <20240227042251.1511122-2-quic_adisi@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240227042251.1511122-1-quic_adisi@quicinc.com> References: <20240227042251.1511122-1-quic_adisi@quicinc.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: w_-CpQsFB-4luMnAkYoCr-a3tnKbzjQn X-Proofpoint-GUID: w_-CpQsFB-4luMnAkYoCr-a3tnKbzjQn X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-02-26_11,2024-02-26_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 priorityscore=1501 suspectscore=0 malwarescore=0 mlxscore=0 phishscore=0 adultscore=0 spamscore=0 impostorscore=0 bulkscore=0 mlxlogscore=999 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2402120000 definitions=main-2402270033 From: Rameshkumar Sundaram Currently while stopping a link AP, all keys from the interface were removed. However with MLO there is a requirement to free only the link keys. Add changes to remove keys which are associated with the link AP which is going to be stopped. Signed-off-by: Rameshkumar Sundaram Signed-off-by: Aditya Kumar Singh --- net/mac80211/cfg.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 0744113f3535..9989f4a6c0ff 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c @@ -1563,6 +1563,7 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev, struct ieee80211_link_data *link = sdata_dereference(sdata->link[link_id], sdata); struct ieee80211_bss_conf *link_conf = link->conf; + LIST_HEAD(keys); lockdep_assert_wiphy(local->hw.wiphy); @@ -1617,7 +1618,12 @@ static int ieee80211_stop_ap(struct wiphy *wiphy, struct net_device *dev, link_conf->bssid_indicator = 0; __sta_info_flush(sdata, true, link_id); - ieee80211_free_keys(sdata, true); + + ieee80211_remove_link_keys(link, &keys); + if (!list_empty(&keys)) { + synchronize_net(); + ieee80211_free_key_list(local, &keys); + } link_conf->enable_beacon = false; sdata->beacon_rate_set = false; -- 2.25.1