From patchwork Wed Mar 20 07:13:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781541 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 CFD8E2208F for ; Wed, 20 Mar 2024 07:14:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918859; cv=none; b=jXHhE6YxVjRlUqh7/TdTnoGfqAcvHrNIbdoPwMqnG9IxVIKjz6O4kk0Ulzb6o4gIHBcxEEpwAHWzLqY6NV5pqQEAig0Hhfu7IUOZVz7IJvX7KWk9+dXlpICc0KkBo3ig4kcd6CixLu/wSiUI8ijCIOeuZ89kNtyAJt6PqLby3T8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918859; c=relaxed/simple; bh=jYA5rmFK6ns6xtK1SrCtNjRmMM6pIneu5GEu2vkYJ44=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WkMyiMcRS3Etxy7n5GGjlMoN3m5sXWailhrt9OqdJ2qVv2H91mxdBmUEjvi7Me8/3RZ2VwMo2XvbQ69RqHpthwUoCy1phLUPG/F3xDLHcVq2SAfXT3a7Qc4h2LQxEVCJ2qq68h9VMEuLfZv5b2tPDwftA8h+al9rV6yrZtbB9Co= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Os9KdABe; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Os9KdABe" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710918857; x=1742454857; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jYA5rmFK6ns6xtK1SrCtNjRmMM6pIneu5GEu2vkYJ44=; b=Os9KdABe7foWj1qJnv51u7BDilcPOLkeQ8uf70ObDEFokfae6XQiJXGF nx2SQMwdzvoNH7x8Dzt0L4elLVGjL7iRx/VhNtezPBjlN7fICi/LAG56e b0PcixVRMQjEY/BzOxoO4WeFyh1BkOlwzjr2dsB4xClZPFEJ9Sqp/VC33 9Bhmqrr4PJAbNIHXAVCqd6fPRp480EEH5ESDSocDFpyoaTbCT/MDpNoap u0jWZT51Gm5THKKIYC3ZztF2FUwHpq4i0SCQSHI/Xi1PqHLUWAxdWu3c0 Tg47RNbmfMqljT9o9DaUhQ4rPTVHVlzETKV98Rt03ATzxnRFPRhx0VG5n w==; X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="5763828" X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="5763828" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:17 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="14477397" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:15 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Johannes Berg Subject: [PATCH 1/8] wifi: mac80211: do not call ieee80211_key_switch_links during reconfig Date: Wed, 20 Mar 2024 09:13:58 +0200 Message-Id: <20240320091155.6ab8520bd4a1.Iea3e7e5d8b2bb5db1dd93f6ca589e8ea1bacaf60@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> References: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Benjamin Berg The keys will be configured later by a call to ieee80211_reenable_keys. Signed-off-by: Benjamin Berg Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- net/mac80211/link.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/net/mac80211/link.c b/net/mac80211/link.c index 685ec66b4264..7f01462f84e9 100644 --- a/net/mac80211/link.c +++ b/net/mac80211/link.c @@ -375,8 +375,10 @@ static int _ieee80211_set_active_links(struct ieee80211_sub_if_data *sdata, WARN_ON_ONCE(ret); } - ret = ieee80211_key_switch_links(sdata, rem, add); - WARN_ON_ONCE(ret); + if (!local->in_reconfig) { + ret = ieee80211_key_switch_links(sdata, rem, add); + WARN_ON_ONCE(ret); + } list_for_each_entry(sta, &local->sta_list, list) { if (sdata != sta->sdata) From patchwork Wed Mar 20 07:14:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781540 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 ED17C2BAF2 for ; Wed, 20 Mar 2024 07:14:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918863; cv=none; b=MT7vUNUv3269hkHFfYAfJl/TF95ns+LD4hGH19EqTcZnHtTnkRF6OOfY+q8ecdXJ0k2Lv6CVkD7C/ltZshz5ri5QqFCz1i3VAm+9YvE0x++sMafbwdkLT8YrbXKL3L6fuHeZwrT7S8xc5DfkNe7RQ4KrS7H1nE4UmwI0pyw6PQY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918863; c=relaxed/simple; bh=XfD/MD9aJLdMuYQ9JNy1aV5uqn0V5yb4tqrj6uooTpg=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Torb0mFvqcOQu3uvfWJQFqewjA16u51srQGS+GsLV938JZREzlEbkeUi56IciGTl5itdb/zoSsDS/bJVXAQbHE1FskLpPYXbXadVPhN+cKKQEugRZnuN2VNAvE6kQQEGCpGA99stwqAgP9F7zdIWbm8O0P8tAUqQmSxUz6cK5Hg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=NeBzXDVH; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="NeBzXDVH" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710918861; x=1742454861; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XfD/MD9aJLdMuYQ9JNy1aV5uqn0V5yb4tqrj6uooTpg=; b=NeBzXDVHe1seBTLhAoU3c1Eo3ZtQ+78+nKutKPNRDqfDcxu83iw/UHc9 lPGqdZ6XeTaukz30LGCMwMcUAiBbltf4eZ2Wp2UFslnT4k5wPGUVn++Fv vWa1+LhX94vS3LRzdvye0EDZtKjclUsr1gow2ThIxL4OT6Koexg+t76ei mQrUH6S/mWo8HrfXYyTOjwYf0K8gnhEICyqhxs3LGyKSaJvvCm//B4E7L WXvkac8uCLyvc4LiyC5zCvd2Y3xTwShtf5VRALc/mZ5lE/fL6kTBPSikA pE9yLtVfQXRrnRWq4lQsg5VOB/r6cDsJL4rckZM6+snjIVWTsdSnxPph3 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="5763832" X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="5763832" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="14477403" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:19 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Ayala Beker Subject: [PATCH 3/8] wifi: mac80211: clarify IEEE80211_STATUS_SUBDATA_MASK Date: Wed, 20 Mar 2024 09:14:00 +0200 Message-Id: <20240320091155.28ac7b665039.I1abbb13e90f016cab552492e05f5cb5b52de6463@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> References: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Johannes Berg We have 13 bits for the status_data, so restricting type to 4 and subdata to 8 bits is confusing, even if we don't need more bits now. Change subdata mask to be 9 bits instead, just to make things match up. If we actually need more types or more subdata bits we can later also reshuffle the bits between these, but we should probably keep them at 13 bits together. Signed-off-by: Johannes Berg Reviewed-by: Ayala Beker Signed-off-by: Miri Korenblit --- net/mac80211/ht.c | 2 +- net/mac80211/ieee80211_i.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/net/mac80211/ht.c b/net/mac80211/ht.c index c3330aea4da3..d7e8cf8e48b7 100644 --- a/net/mac80211/ht.c +++ b/net/mac80211/ht.c @@ -580,7 +580,7 @@ int ieee80211_send_smps_action(struct ieee80211_sub_if_data *sdata, /* we'll do more on status of this frame */ info = IEEE80211_SKB_CB(skb); info->flags |= IEEE80211_TX_CTL_REQ_TX_STATUS; - /* we have 12 bits, and need 6: link_id 4, smps 2 */ + /* we have 13 bits, and need 6: link_id 4, smps 2 */ info->status_data = IEEE80211_STATUS_TYPE_SMPS | u16_encode_bits(status_link_id << 2 | smps, IEEE80211_STATUS_SUBDATA_MASK); diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index c2212363dad3..fe81ab641620 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h @@ -90,7 +90,7 @@ enum ieee80211_status_data { IEEE80211_STATUS_TYPE_INVALID = 0, IEEE80211_STATUS_TYPE_SMPS = 1, IEEE80211_STATUS_TYPE_NEG_TTLM = 2, - IEEE80211_STATUS_SUBDATA_MASK = 0xff0, + IEEE80211_STATUS_SUBDATA_MASK = 0x1ff0, }; static inline bool From patchwork Wed Mar 20 07:14:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781539 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 935322CCD5 for ; Wed, 20 Mar 2024 07:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918867; cv=none; b=b8EQ+2zclWwL5jCYsg45cYZ3J9ZqWg11HnXyHzwaLs/f/6IZ4AwZd2O+n0QVb3qtqtvQTaeBpNLa0Tm9Xi8CLLVbtkG0eUSIAiozZ8/Q+f+jJCRVq7EOCJqO7sV3HbnzrGx2S3I1F24pjMM0dUjxMfHpxVcLkXwa1UaEQcODEZM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918867; c=relaxed/simple; bh=Oh/FWv3K/mVgkzq25lWsBxzlu55oL0B6MzEZgLlekqc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=uP3iLGByLoCuL/DgZr3myMrUw4o950nANLYKDDMIalzzxOsP9L7Mp6aY0AdblFwyD+DG3ZfcAWtXUQs0wZkXF1NPrlXb0lXm6HBdvrefP1Ht2yC3l5RRjyyHAgNNAJCi5P/fDjt2DBjqI3/gJQFoXGnWi3LWMzbZMcxdgB3GrHA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=O5SWzW6D; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="O5SWzW6D" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710918866; x=1742454866; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Oh/FWv3K/mVgkzq25lWsBxzlu55oL0B6MzEZgLlekqc=; b=O5SWzW6DcQU6b/IHuPy2mM7r9cqTNzhqi+dQuxoTmjFQrfgR1w3XcZRB byVPLtSS9fN0ODD3z3wd0mv/t3yFd1evfV7TYgs9m/fp7sS2ff83qk+m2 VV1eX0m1EhRG7awQIR7FJn0WSSdxfZ4nZU0T9XC593O5w251hYG2weGWI 6BDKxQwwZnWgbaK4RrAM560nJRvMb/XHNSzDvUpjfe7f3MhQeCXhK5Rxt k2YiJFQTGwKCslJksq/CmrQoUm+OV1aEin8K5G0SJGgDCjv1hj6BDuPFO 9kyMwKFBREAQV34enK+sjHtGFyEBi8hxlZNc3nJUVufZfooVSnZMNbcdm g==; X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="5763841" X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="5763841" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="14477410" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:24 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Ayala Beker , Johannes Berg Subject: [PATCH 5/8] wifi: mac80211: don't select link ID if not provided in scan request Date: Wed, 20 Mar 2024 09:14:02 +0200 Message-Id: <20240320091155.a6b643a15755.Ic28ed9a611432387b7f85e9ca9a97a4ce34a6e0f@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> References: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Ayala Beker If scan request doesn't include a link ID to be used for TSF reporting, don't select it as it might become inactive before scan is actually started by the driver. Instead, let the driver select one of the active links. Fixes: cbde0b49f276 ("wifi: mac80211: Extend support for scanning while MLO connected") Signed-off-by: Ayala Beker Reviewed-by: Johannes Berg Signed-off-by: Miri Korenblit --- net/mac80211/scan.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index 0429e59ba387..977f8eb0a67b 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c @@ -707,19 +707,11 @@ static int __ieee80211_start_scan(struct ieee80211_sub_if_data *sdata, return -EBUSY; /* For an MLO connection, if a link ID was specified, validate that it - * is indeed active. If no link ID was specified, select one of the - * active links. + * is indeed active. */ - if (ieee80211_vif_is_mld(&sdata->vif)) { - if (req->tsf_report_link_id >= 0) { - if (!(sdata->vif.active_links & - BIT(req->tsf_report_link_id))) - return -EINVAL; - } else { - req->tsf_report_link_id = - __ffs(sdata->vif.active_links); - } - } + if (ieee80211_vif_is_mld(&sdata->vif) && req->tsf_report_link_id >= 0 && + !(sdata->vif.active_links & BIT(req->tsf_report_link_id))) + return -EINVAL; if (!__ieee80211_can_leave_ch(sdata)) return -EBUSY; From patchwork Wed Mar 20 07:14:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miri Korenblit X-Patchwork-Id: 781538 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.21]) (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 6695C1EB44 for ; Wed, 20 Mar 2024 07:14:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.21 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918872; cv=none; b=mM4jcVx8RKOKR8qvUIlq2/ZY6nauxZUbi1hT9JALI86j0HLzkSRwJ+OUg092kkJOShu+9YiBM7DTrF4UDOab/U8yey5NOvZkOiVDXVbcScIC0m/ZhaVxsInOI/4oFiUVsSN88rm3wmoU1uIkNsomepaKCfrMQXoxrIKTcaFkaW4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710918872; c=relaxed/simple; bh=ZtKFd3Bi4Cle40OK/sRPs46B+k4y2b9A0Jtju5McVHI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mgxJSs6LRpk+6sDdaiBkQKQgUdCPSJmPYP5x8IpawE7vGPULsIY50K91ViDnhSh2lPxWj5MItv0YqN9UIY8q3EfbpAJfOySnIOJLuS2mc7Ht9jzCParsliiXCURnUJpcCPsCxwAQjXJkiDanYs26tzAa7qGGYd19ySBp1+olR70= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=QlqKCtjk; arc=none smtp.client-ip=198.175.65.21 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="QlqKCtjk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1710918870; x=1742454870; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=ZtKFd3Bi4Cle40OK/sRPs46B+k4y2b9A0Jtju5McVHI=; b=QlqKCtjkUvLwv/2xil1FDO80K8aBBD9cmzHOshCk3cO3afBXIpnS/Njz NiFZQ91NT/Quow+9+8e03BT18r/LYuNmkqJQUAbEP1tfQlXQmJPyHqxmd CFtm0F8Bb8/39l+aNcepAIw8f3d3TegHtIQHZdl5kP59puY6GSFEKudDA 4g5ETRSvftRrgIa2I0NbbVjr01vxxrnaRA3bsldfF7P8ysS2w7835e9Ec CJTbBAFEs0EGUcomewxkM6ZEa7a0fYhDvTwOIUOCKz5hhQPROKG4Uh4JZ ODAMKB6e39gOcdUs4Ntadgi+JdbdN6bkNfsYCb9pTb7rzkjeCbZRmqgVY A==; X-IronPort-AV: E=McAfee;i="6600,9927,11018"; a="5763847" X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="5763847" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by orvoesa113.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,139,1708416000"; d="scan'208";a="14477421" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Mar 2024 00:14:29 -0700 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg Subject: [PATCH 7/8] wifi: mac80211: improve drop for action frame return Date: Wed, 20 Mar 2024 09:14:04 +0200 Message-Id: <20240320091155.34daf0a89eb4.I60e0639511f9de64e40e6105b640adf90f8f57f7@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> References: <20240320071405.815427-1-miriam.rachel.korenblit@intel.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Organization: Intel Israel (74) Limited From: Johannes Berg If we use a drop we not only save the extra call to dev_kfree_skb(), but also have a better reason in tracing, so do that. Signed-off-by: Johannes Berg Signed-off-by: Miri Korenblit --- net/mac80211/drop.h | 3 ++- net/mac80211/rx.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/net/mac80211/drop.h b/net/mac80211/drop.h index 12a6f0e9eca6..59e3ec4dc960 100644 --- a/net/mac80211/drop.h +++ b/net/mac80211/drop.h @@ -2,7 +2,7 @@ /* * mac80211 drop reason list * - * Copyright (C) 2023 Intel Corporation + * Copyright (C) 2023-2024 Intel Corporation */ #ifndef MAC80211_DROP_H @@ -66,6 +66,7 @@ typedef unsigned int __bitwise ieee80211_rx_result; R(RX_DROP_U_UNEXPECTED_STA_4ADDR) \ R(RX_DROP_U_UNEXPECTED_VLAN_MCAST) \ R(RX_DROP_U_NOT_PORT_CONTROL) \ + R(RX_DROP_U_UNKNOWN_ACTION_REJECTED) \ /* this line for the trailing \ - add before this */ /* having two enums allows for checking ieee80211_rx_result use with sparse */ diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index c1f850138405..4b4cbd8bf35d 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -3958,8 +3958,8 @@ ieee80211_rx_h_action_return(struct ieee80211_rx_data *rx) __ieee80211_tx_skb_tid_band(rx->sdata, nskb, 7, -1, status->band); } - dev_kfree_skb(rx->skb); - return RX_QUEUED; + + return RX_DROP_U_UNKNOWN_ACTION_REJECTED; } static ieee80211_rx_result debug_noinline