Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp888820lqp; Thu, 23 May 2024 03:10:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV2PQz4Y4Dl0Z34F+LY1o2CnY2NylccJQ1ERhvRJZ16660S2SvvIip+to6wQfOkEc2755d3CinqTJ5S9JTudAu7RiWOcVFQm6G51nZwhw== X-Google-Smtp-Source: AGHT+IG0LOm8dp+BR6PDj5PL/iffM7oWoF04U5oflUjYhLBYSc5A/eYdm50ewwf7ngoiNjFN90h3 X-Received: by 2002:a05:6e02:152c:b0:371:34f3:8d9 with SMTP id e9e14a558f8ab-371fa6907fcmr49440895ab.16.1716459023049; Thu, 23 May 2024 03:10:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716459023; cv=pass; d=google.com; s=arc-20160816; b=guz9bgJ6l1gGDBdp3bl77a4vp3tyO99kp+wdxni/I0TfDKOcj41uFpIlmMZWtoODHB +WAF2a3thsT5AAhjf/WfAmjrBX6F4yCxzkSiDV+wcK75u3eYLIXq+GwWkcQRJ+iZEg0f zrN87TVBRZd6zaG2RhXq6v8sMF7qUmxB9GOpfn9XtM9woerDoz4vaSzf8WxrO+xIr/uu bVTQH+SOXZSOAQ35mcCgCxfPLfSKbmioghUKTvE1NFR82bJ2yPRY6VSQxUYRcB/QDMly nolJ+QpIJEsLLnu9fbegNmvUJ4lnwyZI2VcmDmjXjHlDXpXEBc7EMn6f8IdwQOgUBmXT RmbA== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=X5EodKGvHS/S2pgpLvPTMQ0EdVLRbrsNWK63Rrh3v/w=; fh=GmPc+/BkxnmHG6USZSTnAVlkB4ZJ/ueyiB1NCia4LOI=; b=zPGKZPFrUaIazGZ2aCegLCq0xxnYV0PYiGVPb+V0CIN0rE/H/e/re9rUWQSthLX17S zWeOpMuIcPTl/zv/Xtp+OoOA6f5gsHhBTYgPtbgbFKhMQNdifVLx6OoV0rf68XvU8IzO V+58WQ7QgoqfL6VOqybgaWJcUlcnyn+ic83mg9GnaIbyDnrCNrGp6896S9OJeyt85S32 eybJTVf0Low2MypPU3T3YVHX7vrvGuKGAGCBPeJvvN161gdUe2HMM1eE5QGnLrulQn+b vqvqv/DvLdG/XQvfotFmofXLR0WI0+stWneB3TddADHku81Zdt23575RkT1zYL5nuUvd tbJg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=pLm+TB8b; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-7996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d2e1a72fcca58-6f67b5ca493si4044171b3a.307.2024.05.23.03.10.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 May 2024 03:10:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b=pLm+TB8b; arc=pass (i=1 spf=pass spfdomain=sipsolutions.net dkim=pass dkdomain=sipsolutions.net dmarc=pass fromdomain=sipsolutions.net); spf=pass (google.com: domain of linux-wireless+bounces-7996-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7996-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DA24DB20ADC for ; Thu, 23 May 2024 10:10:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9954813DBA0; Thu, 23 May 2024 10:09:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="pLm+TB8b" X-Original-To: linux-wireless@vger.kernel.org Received: from sipsolutions.net (s3.sipsolutions.net [168.119.38.16]) (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 0042F13D619 for ; Thu, 23 May 2024 10:09:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=168.119.38.16 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716458992; cv=none; b=WPXhwlZi6R1GmCr6PTmtIGuG7Zt/pd/vvIGxLAWCyf7PstkZWlW+r4l+U2AMBSMP5BjlabhVicsb5DTJLcGIZukiLSCxdrKntEmeJExaO7tJQBEBFJeg1V/j4iSzwDVAuRsE7LVGuWsAx4SXtAcHlR5kCmkP34LX3iM00pIogA4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716458992; c=relaxed/simple; bh=3yGalTvJ0x39Eb5Pi/x5jkW4UiEtOV/QYJVOWcVcSOQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ssWeKPXD04gqgHWLiZOxJz9KDdv1JW5sV62l7zI63PbrGGvMgOHqTeKigsQwTsiEIbN+9X9tNy1p12vuz8GZ8tZf49hVuo2EKEmVJYjeVxv7vrfrGDmijTIypH7Xy22hPCOVcZ95MgpGH35GzJUKPhxXKjGuIcgI7N9HbIBc71c= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net; spf=pass smtp.mailfrom=sipsolutions.net; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b=pLm+TB8b; arc=none smtp.client-ip=168.119.38.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=sipsolutions.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sipsolutions.net DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-ID:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=X5EodKGvHS/S2pgpLvPTMQ0EdVLRbrsNWK63Rrh3v/w=; t=1716458991; x=1717668591; b=pLm+TB8blysq51SCPJrkjzaz8ZJl5yxL5Q09KAy6fBlID+daJRfR/ztH+vN2mcses58OI16GlYk 6WE5UfTejc56nvZTVfh0scVKf4tW5ruTyQSicEzm0jE6RK1192TjT4kVkfz2gF7cBZ2QyM6zCFKhs NNxQV0vNXCDJruMizt1hwjpOyWHYmhvN3Igljry1eXi3VH7mtYFIR2phRZCURNABnKIagdw9QRoMx UbfzpCSrW5K5OcShe8tbXqS44HsTpJ+crbWYYlZ2Zsj2G0KZiuRzyYn20Fr8FTUuSYr7r0/sNYsZk BglHb/RWS/5L4tsco3rcH1K+eTVfvjbiPKSQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1sA5OO-00000005wvn-1U9k; Thu, 23 May 2024 12:09:48 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg , Miriam Rachel Korenblit , Ilan Peer Subject: [PATCH 1/8] wifi: nl80211: expose can-monitor channel property Date: Thu, 23 May 2024 12:09:42 +0200 Message-ID: <20240523120945.9a2c19a51e53.I50fa1b1a18b70f63a5095131ac23dc2e71f3d426@changeid> X-Mailer: git-send-email 2.45.1 Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Johannes Berg It may be possible to monitor on disabled channels per the can-monitor flag, but evidently I forgot to expose that out to userspace. Fix that. Fixes: a110a3b79177 ("wifi: cfg80211: optionally support monitor on disabled channels") Reviewed-by: Miriam Rachel Korenblit Reviewed-by: Ilan Peer Signed-off-by: Johannes Berg --- net/wireless/nl80211.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index 6ba988a6f5a2..b10799710fe0 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c @@ -1204,6 +1204,9 @@ static int nl80211_msg_put_channel(struct sk_buff *msg, struct wiphy *wiphy, if ((chan->flags & IEEE80211_CHAN_NO_6GHZ_AFC_CLIENT) && nla_put_flag(msg, NL80211_FREQUENCY_ATTR_NO_6GHZ_AFC_CLIENT)) goto nla_put_failure; + if ((chan->flags & IEEE80211_CHAN_CAN_MONITOR) && + nla_put_flag(msg, NL80211_FREQUENCY_ATTR_CAN_MONITOR)) + goto nla_put_failure; } if (nla_put_u32(msg, NL80211_FREQUENCY_ATTR_MAX_TX_POWER, -- 2.45.1