From patchwork Sun Jun 18 18:49:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Greenman, Gregory" X-Patchwork-Id: 13283875 X-Patchwork-Delegate: johannes@sipsolutions.net Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D222BEB64D8 for ; Sun, 18 Jun 2023 18:50:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229632AbjFRSux (ORCPT ); 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 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;