Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp5457042rwd; Sun, 18 Jun 2023 11:53:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5byX+kL3ZSk7HBrZF87ul4eP3Gc+z2Jnyu+UM8UbRpBjpXDs7J1HwQguJwG8vaKFQQcNBi X-Received: by 2002:a05:6a20:8403:b0:11d:9249:170e with SMTP id c3-20020a056a20840300b0011d9249170emr11225968pzd.12.1687114416674; Sun, 18 Jun 2023 11:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687114416; cv=none; d=google.com; s=arc-20160816; b=CPFbS3jUFyuz9E7PDRRjIyjF6bLkJMg4lE9ZAUsj0OgcsnkcUFIeYBD2MxCxZZ3j3i K3Eqr28iZ6+7oBaa8QF4sSbxZwDGtaQcf4Nc92+kDEXvwQtKqOonkSGlAFGYf2fyevUV 0TKH14aGbtOjx7ZwMExRrI7PGwocLp8uTuDb0uAo5Nr52i01HNMHd5v/W01VjE2jxgtI mVcVJ+jReTt6ppdpBES55XP2A5WqoqF0cdOEIu2Qw1/j4j8Z3d8ZRoRdW3/O5lAO9KPx NJ0ngechcGXRi9eesFHLe5reDWBFOMkPixbOlKt3/zgb7Y+qTdkFeBghFIQX1fzq0j2J DycA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=ZUH6Keh6nTAQBy3UfqnYjKOaAjzToV8tC8ceV5YEdNY=; b=DmlZnmy1aeunVDNurQc5pyfrDd5Wd2XC6FRR6CBmEhd2jGcQP4Rjx796AL4ZceesNJ bNGfmVVls2Yhauao6Rnwll1k0L72EroDosRiMcD60RNaKTl5B3sPp9mByAP/8SWjnXaV 44v89JhLSTomN2P+oVDqQKmnXwxj1DWdRSwnaSoKYIo7IugWmkr8ajas1M9bvzA21K6P jELAteCRA3Gq5n6y2AdNRoTwTH7q3H2IWNpy588AURN/g0wb25rIMt4C7+pH5JvatVvz PVE+7bsRm4QV+RiQbWKxyWDNMnEmMrpTjMWvzjqRsvB/GZ6yHUqy/eF8UMFimitAsIM9 RuJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aJUr0Gly; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m7-20020a638c07000000b00553b006cd9fsi1911307pgd.728.2023.06.18.11.53.29; Sun, 18 Jun 2023 11:53:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aJUr0Gly; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229632AbjFRSux (ORCPT + 61 others); Sun, 18 Jun 2023 14:50:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229664AbjFRSuv (ORCPT ); Sun, 18 Jun 2023 14:50:51 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8853C1B4 for ; Sun, 18 Jun 2023 11:50:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687114245; x=1718650245; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cyzQNaQVOvPw8BlNvCP05w9HpuLfECh6xXiYqQlqhAQ=; b=aJUr0Glyu97ap/PcRKZxEu9kNFhqM+kkNRIoGvVfX1oVnpp4yzhjlBXe Nvy2jWY0zqmtUIlGHY1K8vRnqjNlkvYcr6+50CjfH2LLnhhKNxHzauaXf 8MkLqgjLhh5fuD/gbTMonDKOTU8yChvj5HBjJ3rOpByCZkwR5d8YwCsnn 26X+mMFVvc70ASa+tlXrettZnXyRu99r2CrrKigF35ZPODDyXsY7r78YJ YZ5k+3bmWYso2kX8C04APpngZ8DlQ51XHb+xj8UNdBLfbM6A5jtut8fhP iRtScB6GZMDsEFOmQMJgoP0G6fCivWaXldoTtpusPudTn06QiD8IKqbDQ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10745"; a="339116658" X-IronPort-AV: E=Sophos;i="6.00,253,1681196400"; d="scan'208";a="339116658" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2023 11:50:45 -0700 X-IronPort-AV: E=McAfee;i="6600,9927,10745"; a="747234037" X-IronPort-AV: E=Sophos;i="6.00,253,1681196400"; d="scan'208";a="747234037" Received: from aflumen-mobl2.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.251.178.161]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2023 11:50:43 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Gregory Greenman Subject: [PATCH 12/20] wifi: cfg80211: do not scan disabled links on 6GHz Date: Sun, 18 Jun 2023 21:49:54 +0300 Message-Id: <20230618214436.4f7384006471.Iff8f1081e76a298bd25f9468abb3a586372cddaa@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230618185002.817236-1-gregory.greenman@intel.com> References: <20230618185002.817236-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Benjamin Berg If a link is disabled on 6GHz, we should not send a probe request on the channel to resolve it. Simply skip such RNR entries so that the link is ignored. Userspace can still see the link in the RNR and may generate an ML probe request in order to associate to the (currently) disabled link. Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman --- net/wireless/scan.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 46488650ecbc..cf0ad544cb99 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -587,6 +587,13 @@ static int cfg80211_parse_ap_info(struct cfg80211_colocated_ap *entry, entry->short_ssid_valid = true; bss_params = tbtt_info->bss_params; + + /* Ignore disabled links */ + if (length >= offsetofend(typeof(*tbtt_info), mld_params)) { + if (le16_get_bits(tbtt_info->mld_params.params, + IEEE80211_RNR_MLD_PARAMS_DISABLED_LINK)) + return -EINVAL; + } } else { struct ieee80211_tbtt_info_7_8_9 *tbtt_info = (void *)pos; -- 2.38.1