Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp1985602rwo; Sun, 23 Jul 2023 05:24:54 -0700 (PDT) X-Google-Smtp-Source: APBJJlGY18n4fjUEHVbCcPeXXWzQ/kDA03hGNdwiCODobvcsiHxCtyu5DN0gFJREbNsf2pQgMl/X X-Received: by 2002:a17:906:5189:b0:993:fe68:569c with SMTP id y9-20020a170906518900b00993fe68569cmr7006720ejk.6.1690115094399; Sun, 23 Jul 2023 05:24:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690115094; cv=none; d=google.com; s=arc-20160816; b=CXKKl+UUnehsUJee9ywTmwIgw1o6O1xHV+pB9jeAfmboP5NbGBSvFSpl1DAyDB8LAE qonqaZBSZj2d6c5vNU0kkTCYrHzU1V2aqeele2sfuLPG5Lv4+g+YTcBKQK9qWTXzlqyy AYvHJcdsnjnXlj/yExXM09n1l0+PYBnNVWCdEnpTmJtma1hyKzKb/qXEM8IYnArIHiZk DfPN0ifHDiUjGvEQvR0oy5IxvztNgM78hunOZ1El/YONYG3ZrJ4ypHv8tQbSkVsSZ23h lhv6sIZljqc8uLfyAwTz+megwN7BZOD6zoBmgy6NrjQulB9CjmbMv1/Dek3XZ1G9GEBR rJTw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=cPqoikO8p4Jg/Ki3es+r41N2ZvLFH2V0f0IwstcQH5U=; fh=Jma7CVfKSaKiyd8dwF2BmjybttRCbIhkzpKxcrHH3Ns=; b=pojRiTFjloQGRM5TolKguMFrh3UlTPz1zLvj/eOR9T6soRp10XTQK5v+v7nqzt6ZgV ayqn23fSG5WMOvcpTVoEQnKEd0j8jJRZsLpxX7yO0LusHZeH3ulEI7AESyrzIjZx37Wk mJmbYwCDsIBArOhtvzmblUsbTSJ4ZSyOBge7m2nwvy+nCP5ATU4PN4Y1olKqmErY3dNL W6OP4PHDkpXlRXk6ktrQ1JMIagAQYWWBEPxBIJEeQCpTO1jDWntxJ1IDw0RfKbagXpt7 WIpWBbNtFgQHurcGJniiY4nC2qBY0HH2Xq9+Tnp1XrZh1YiQb9vJyG3YUVpok4w7BXXy 0UwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=YidQaSq6; 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 m17-20020a170906849100b0099b7211b395si3018258ejx.36.2023.07.23.05.24.35; Sun, 23 Jul 2023 05:24:54 -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=YidQaSq6; 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 S229931AbjGWMHg (ORCPT + 59 others); Sun, 23 Jul 2023 08:07:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41090 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229379AbjGWMHf (ORCPT ); Sun, 23 Jul 2023 08:07:35 -0400 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0F502E5B for ; Sun, 23 Jul 2023 05:07:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690114055; x=1721650055; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=b6thoYWjp8mQVV1VYXnw2skiXLGMpwG4GHEhAzilOTA=; b=YidQaSq6R18aXcPb3tZF8a1lCGwIDrhHKGdr4BiU8ffm2R2P1Gjfgb8m XarqxfXqshnzZYp9iTB9CnBrNJ0CnVjMjEUmJ6fIqA/iWH4HN0o1U/Q0U DoT4GlvfqMO/ni/gMExSZm0Yhveqe3C3hMoSLEEkO31lJLvpxiSV6wnXR EnvS84QgQnVfzzKbhTb1d5p6PQJluVUffoGN/tjb+7GruF8RlUOBiHbQT HWeK7JTSFD1UZVTIPS3GBE3Qon3/O/f8+u6CCVyDeNy+xc1x0cQ26Jps+ Y1RG79US/zekQe9VKm4lNovt3J1RIv7AjGfMNMPC/8zeejbwPtQ71NUut A==; X-IronPort-AV: E=McAfee;i="6600,9927,10779"; a="433509105" X-IronPort-AV: E=Sophos;i="6.01,226,1684825200"; d="scan'208";a="433509105" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2023 05:07:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10779"; a="795489488" X-IronPort-AV: E=Sophos;i="6.01,226,1684825200"; d="scan'208";a="795489488" Received: from jed01829.iil.intel.com ([10.12.217.181]) by fmsmga004.fm.intel.com with ESMTP; 23 Jul 2023 05:07:33 -0700 From: Ilan Peer To: linux-wireless@vger.kernel.org Cc: Ilan Peer Subject: [PATCH v2] wifi: cfg80211: Fix return value in scan logic Date: Sun, 23 Jul 2023 23:10:43 +0300 Message-Id: <20230723201043.3007430-1-ilan.peer@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_06_12, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,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 As cfg80211_parse_colocated_ap() is not expected to return a negative value return 0 and not a negative value if cfg80211_calc_short_ssid() fails. Fixes: c8cb5b854b40f ("nl80211/cfg80211: support 6 GHz scanning") Link: https://bugzilla.kernel.org/show_bug.cgi?id=217675 Signed-off-by: Ilan Peer --- net/wireless/scan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/scan.c b/net/wireless/scan.c index 8bf00caf5d29..0cf1ce7b6934 100644 --- a/net/wireless/scan.c +++ b/net/wireless/scan.c @@ -657,7 +657,7 @@ static int cfg80211_parse_colocated_ap(const struct cfg80211_bss_ies *ies, ret = cfg80211_calc_short_ssid(ies, &ssid_elem, &s_ssid_tmp); if (ret) - return ret; + return 0; for_each_element_id(elem, WLAN_EID_REDUCED_NEIGHBOR_REPORT, ies->data, ies->len) { -- 2.25.1