Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3086952rdb; Tue, 6 Feb 2024 06:57:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IGy7ZDcR0hjB0o9WoB46QGpWXfBMnW2A4E9TCU1/9lCD+29C+TK6Ae9TUs90QmdweJ6IwUy X-Received: by 2002:a17:90a:f315:b0:296:7f8a:8e7b with SMTP id ca21-20020a17090af31500b002967f8a8e7bmr2510647pjb.20.1707231420906; Tue, 06 Feb 2024 06:57:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707231420; cv=pass; d=google.com; s=arc-20160816; b=wqIBRGDpOOpKqMAG5sBUIYAdy3bhXrx1Dse7PQMFwjotHBd7C+9nNTcyFhq/m+Cy31 RsnVD4RTOl0Co6PwqciEbyHfR49bV6RTgQ2kwbjn6O5H1W44PK0NsthdZ7V/tD8tXILT IEWyoHsytdMilrZwj3UHLMNNoDy2FP8DswEsJ+VqoEvZp1wUiEh87qxvU33VupmtRGlL DCtzuAr93SrkM9s0M0ZYcJwY/M6Le9JIxpqPE/6kc6enP9nO3rmXzMZjULbuBhcjZL2b eM8DVMer25I1hNYPGw6kwuc+EqoeyFct/s0L10kY59VKStEfrBt72CWuSs/GqhgEMp0v ARxQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:organization:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=B0T0XfY/J4GlcJWm/dtzHiW6eRk4U1AVkU3saTlFWAI=; fh=0aRVhuUzsezeZm8+pJMKdoVa78vTwE2IgzPI24/zAQs=; b=K2nJ3k2FtjUIChnCFG9S9qya9hAa14CmxUdChxJJ0wghtHB4o28kYAs442ghNmquIN 7MZUjRsfdJaJpMQhQv8XdOZhtIDFUfYjbZP/1NO9frS7B9bSY6NuvOKjRIYjTylZJ5zc XaREhfuIlcwSIc+9WOv1WWQchAAmLV5uebYQo5y+n3/KIg1o6P82v9RHorh0CCz6fWJN 0KoKx5qNX/tR6rD6F+7mRP72N5q00L5ZV54ylBx/iNW7giPZEPS53B+JTVXCTbq7O66B NrhyLZrfWolLGh+Z7nPZBmVloho3r5DdkIl/Ls9GdgHFTk9Du0Q/FOiMt58s2GOG0oHc pe4w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RQf5SZOH; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-3230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3230-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Forwarded-Encrypted: i=1; AJvYcCXkleJBfah9XoZ15h+CR0id3jIvzMb0ocC4CCqsuZNsjBlCeVAdLdtXEJWfQOXk98r4XGtBAEg/9TJ1a8b387qH3QNEJRQO33341y0DSw== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id q11-20020a17090a2dcb00b0029678de3696si1245060pjm.132.2024.02.06.06.57.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 06:57:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-3230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=RQf5SZOH; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-wireless+bounces-3230-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-wireless+bounces-3230-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7DA5728789E for ; Tue, 6 Feb 2024 14:56:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E5961339B1; Tue, 6 Feb 2024 14:54:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="RQf5SZOH" X-Original-To: linux-wireless@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) (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 8431013474B for ; Tue, 6 Feb 2024 14:54:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.14 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707231285; cv=none; b=T6ZO8scrdITtDZHwutnveNNMSHvNW3S/AUEJ17QSn44yckbc4DAsNQ6p9dxbCcMcHnD50YY8mdNMnEjENDCuRs/W2foj8C9h40v+MBfuuM/tWJZym3tDE61SAkajRkgTB+RwlxqHNNjBCWND0pSJMjcpIOVEwiKp5yaka0PJ/wM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707231285; c=relaxed/simple; bh=6O1y6Qmi/IMLrZ21sKCvCQMcOzC2jHDEHub++mAi2xc=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=llNyTEjouhgmJbqyzaeEMhUujydJPk3p4gWjP/l6sTwyf5RbM5zqQ9+sReNoKmKoKgqLZBmM452Ru+Mli+Js6oG1gmZyx89URA4XqDaZHbLTGRl+qFb2sdes2bAFx2T97Wdq/NsB1Z7Pw9Y5BjZK9BqSEDHLYp7qZQ2HaNvKTKE= 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=RQf5SZOH; arc=none smtp.client-ip=192.198.163.14 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1707231284; x=1738767284; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6O1y6Qmi/IMLrZ21sKCvCQMcOzC2jHDEHub++mAi2xc=; b=RQf5SZOHkj3AGoWn2YDl0YRcnpi3y17zKzgpigBPBeUXheEbpzt6GTpp CYgU05xhPWq3r2a609GfuIbD8Rcy8DZZjBCNM4rjrTNFOBM2ldZnhrwBp j5CBWJTGFA3l6fZApfu+zABHEWb5bgTGJNAzXp4uwhcmZI6j1fteM7yJN CjdcSr4bpJXw0HWxieB1ZxEU5AFI2RGPiDUnK2v66UEGCbIrwGo0BPJC2 68auhmykRkpXJO8LaSuMg/K0oQN9eM/p2iKzbv0Y2WtYF1AWVEEsAM/Ii N3r1dJ/+hsuc415Uh7XvphGW2dUu+igRvLMM2/eLSDWxaKYVN3XyIrILF Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10975"; a="917836" X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="917836" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 06:54:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10975"; a="824197967" X-IronPort-AV: E=Sophos;i="6.05,247,1701158400"; d="scan'208";a="824197967" Received: from unknown (HELO WEIS0040.iil.intel.com) ([10.12.217.108]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Feb 2024 06:54:41 -0800 From: Miri Korenblit To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Shaul Triebitz Subject: [PATCH 8/8] wifi: cfg80211: report unprotected deauth/disassoc in wowlan Date: Tue, 6 Feb 2024 16:54:11 +0200 Message-Id: <20240206164849.a3d739850d03.I8f52a21c4f36d1af1f8068bed79e2f9cbf8289ef@changeid> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240206145411.3217588-1-miriam.rachel.korenblit@intel.com> References: <20240206145411.3217588-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 Content-Transfer-Encoding: 8bit From: Shaul Triebitz Add to cfg80211_wowlan_wakeup another wakeup reason - unprot_deauth_disassoc. To be set to true if the woke up was due to an unprotected deauth or disassoc frame in MFP. In that case, propegate WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC. Signed-off-by: Shaul Triebitz Signed-off-by: Miri Korenblit --- include/net/cfg80211.h | 5 ++++- net/wireless/nl80211.c | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h index 69e50bc2aa43..e154218ebc39 100644 --- a/include/net/cfg80211.h +++ b/include/net/cfg80211.h @@ -3590,12 +3590,15 @@ struct cfg80211_wowlan_nd_info { * @tcp_connlost: TCP connection lost or failed to establish * @tcp_nomoretokens: TCP data ran out of tokens * @net_detect: if not %NULL, woke up because of net detect + * @unprot_deauth_disassoc: woke up due to unprotected deauth or + * disassoc frame (in MFP). */ struct cfg80211_wowlan_wakeup { bool disconnect, magic_pkt, gtk_rekey_failure, eap_identity_req, four_way_handshake, rfkill_release, packet_80211, - tcp_match, tcp_connlost, tcp_nomoretokens; + tcp_match, tcp_connlost, tcp_nomoretokens, + unprot_deauth_disassoc; s32 pattern_idx; u32 packet_present_len, packet_len; const void *packet; diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 40b4405d15bd..358dae67924d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -19852,6 +19852,11 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev, NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS)) goto free_msg; + if (wakeup->unprot_deauth_disassoc && + nla_put_flag(msg, + NL80211_WOWLAN_TRIG_UNPROTECTED_DEAUTH_DISASSOC)) + goto free_msg; + if (wakeup->packet) { u32 pkt_attr = NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211; u32 len_attr = NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211_LEN; -- 2.34.1