From patchwork Sun Jul 23 20:10:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peer, Ilan" X-Patchwork-Id: 705729 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 4C3F5C001DC for ; Sun, 23 Jul 2023 12:07:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229931AbjGWMHg (ORCPT ); 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 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) {