Received: by 2002:a05:7208:13ce:b0:7f:395a:35b6 with SMTP id r14csp1275343rbe; Fri, 1 Mar 2024 09:08:07 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXmoTkWKAMe/SfFBVm7FP6ZDvnMNUWijjmhBNqEh7VZttF0c0Ng1tPDKhoQ604CN3+VOqyh3TAselJwCKUGclLjwgY+XIIk951R0+vl1w== X-Google-Smtp-Source: AGHT+IG34DL+tWRx7W3HukQvrSzh9c92gPxD9eqBdm/Lj6azplq87lDb6dlmCIsgocN1C/aHneRL X-Received: by 2002:a05:6402:206a:b0:566:4459:17d4 with SMTP id bd10-20020a056402206a00b00566445917d4mr1660269edb.36.1709312887567; Fri, 01 Mar 2024 09:08:07 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709312887; cv=pass; d=google.com; s=arc-20160816; b=l7GNwPUC/O2sYrc9THLR3I9hZBeebPUbdvXiNl3rqzmkwz4Dfi7naX8FUmYazD7VmY Yre7ddCUtiC1f2EBj/nmogxn+1OYL5UNWtV6cWSOtKBDVMU19oKkEPKiBk5ll0di/erX 2EZ/1u+V4PQsipwVTmz9HXXvuAxqo0tDuJ0+/HuK+iqV6A7URHGH/0kopBbamX89ib0W JnYuNS0e7mzsjN6s17t5fNzNqzLoXvQFXIqeT8a6NYrQZ5TNTXZIO2usz8VRH/8M9Y6h ibhLrb+iwxIxnnS7H9WibbklWl5lHzNwC29BRfnkLyraWcN2UAOglC+1LxQerkSulzVZ GNog== 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=1ZMMD4x+i1HA45FRh3wRhuCHPNsQ5NH/GIHZXAfiq10=; fh=QCRMbNmxBrwEohLjUHQ8w4lzVnBUUFoRxUspyxOIxFc=; b=QCivoNU61m+0dXCN5ifF2kUDi8RvMRB/SOUiELHlLNqFrP/VD7mOUFBmfcN7CLUgV9 V50Sp1UsciMI4k4SPvln9AxxF/jBbMi4qBC87xcAZ1xVlgNYV431SphhCxfauq/b7CgT sS+u3k2LPesxCm+gTB2E6H6pHWnAfrFkPoyi8msW28SvYij+qIf4TUKv5g1jFZMHfy1R 1enLIVMa9ygzGr4gt47Umgt40Zdm2ySL9ug1FmfBWRQP/ntl5LQMp9CQeIKG14i29lkl jfq1DIqlmmxwFyFdhJC2nvgz/0fTKoL8bKgrQjb/ffiPR+lhqt+nhIin+pEm2dWqP9uB /zKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="hGJC/MXH"; 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-4304-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=sipsolutions.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id w22-20020a05640234d600b00566c2e8bd14si953531edc.127.2024.03.01.09.08.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 09:08:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-4304-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sipsolutions.net header.s=mail header.b="hGJC/MXH"; 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-4304-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-wireless+bounces-4304-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0CB281F2A416 for ; Fri, 1 Mar 2024 16:58:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7D03D4432; Fri, 1 Mar 2024 16:55:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sipsolutions.net header.i=@sipsolutions.net header.b="hGJC/MXH" 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 63B7D3A29E for ; Fri, 1 Mar 2024 16:55:02 +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=1709312107; cv=none; b=BbHhXM24lH1af/ydR02eyC2E5ounDG/QhLpRzZ/FbTtlzskW7EtpxR0hFKJk9fEVf6tt8/IaaADJYOC9k+mbOgq1jk2AAZJG8HQRX+agpCuvakKg3J572Sps1PPia3c13A3AroNj5NhvkOALIYCUsQ+1cchB21M0C7/CxZr9+Dg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709312107; c=relaxed/simple; bh=KiUY1a/fn282xsMeQLAASiYMBFSc+C52ruIjEYrSeac=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=afF6EHYBGx4Uy7cSBiJLTCteBij9JNFHb1iz9U81zsXRjLxqPs8NNXpGQv69oM0QndnHA8OWddsc6UG4ef5orNn/7N4PmmJIlDU4ROAlzDXjgCHQ/cVX18USELbQu96J3rvdYVGZkExhiN7j320eVK5ALyYVkokg2G/nDb+8gBI= 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=hGJC/MXH; 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=1ZMMD4x+i1HA45FRh3wRhuCHPNsQ5NH/GIHZXAfiq10=; t=1709312102; x=1710521702; b=hGJC/MXHkpLyOUtXkk3DNZLGIG6GQKh5/iSJNH18vRbCIMFpE9tXJrzUqvAp4lcUidMOugjECny rzNIGIOa2ftoIqFFH0Lb7SwDsrQgKNVr+JU+RqoBmP/HB3id/kLc9RcgZb1cIlWLTppRPp0ny9QDe RtFP7q37Lvoe00dhfpRhFGG23vlSOT4tH6KtW9YHmtuhVAixoaLWeyxiOLGFKeLL/rKNc/jXmxKCt mMhIb6ItP6pFjH/j7bmad1F0KG9VoxzCXjaJlfYSeTd7k5zyjSiiZFlI5RuKCOuh8g7V0H0rFjyhl vPc0V4hedX9+C0Gc0ja9o5teK/3lEuOPEjRQ==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.97) (envelope-from ) id 1rg69t-0000000F844-0rmo; Fri, 01 Mar 2024 17:54:53 +0100 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Johannes Berg Subject: [PATCH] wifi: mac80211: fix supported rate masking in scan Date: Fri, 1 Mar 2024 17:54:51 +0100 Message-ID: <20240301175451.7ad8ab0bd90c.I46b49e4fc27fe60b75d4559c01104e55ed381c37@changeid> X-Mailer: git-send-email 2.44.0 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 We have an nl80211 attribute to mask supported rates from probe responses in scanning, e.g. for use in P2P, but in the refactoring I stopped applying this mask. Restore it. Fixes: 07095d167749 ("wifi: mac80211: start building elements in SKBs") Signed-off-by: Johannes Berg --- net/mac80211/util.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 627bd5a8bda5..f810b83a390a 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1216,8 +1216,8 @@ static int ieee80211_put_preq_ies_band(struct sk_buff *skb, if (band == NL80211_BAND_S1GHZ) return ieee80211_put_s1g_cap(skb, &sband->s1g_cap); - err = ieee80211_put_srates_elem(skb, sband, 0, rate_flags, 0, - WLAN_EID_SUPP_RATES); + err = ieee80211_put_srates_elem(skb, sband, 0, rate_flags, + ~rate_mask, WLAN_EID_SUPP_RATES); if (err) return err; @@ -1238,8 +1238,8 @@ static int ieee80211_put_preq_ies_band(struct sk_buff *skb, *offset = noffset; } - err = ieee80211_put_srates_elem(skb, sband, 0, rate_flags, 0, - WLAN_EID_EXT_SUPP_RATES); + err = ieee80211_put_srates_elem(skb, sband, 0, rate_flags, + ~rate_mask, WLAN_EID_EXT_SUPP_RATES); if (err) return err; -- 2.44.0