Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp3029268rdg; Tue, 17 Oct 2023 02:17:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFEMdlrJjwgFLcpOVW3cchfdPTgOuTf4hCpqSssYqlloPmhAbwmuT3s26TzlYLhj8Vz3Cyf X-Received: by 2002:a05:6a20:54a8:b0:15e:707c:904 with SMTP id i40-20020a056a2054a800b0015e707c0904mr1697916pzk.24.1697534255709; Tue, 17 Oct 2023 02:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697534255; cv=none; d=google.com; s=arc-20160816; b=SE+ZgPIlAYyAaw0//Oq5z5qgdC8j7akDFNbOP4EKMbvRMC5OPuxZc2i0g5vqmXrByC mCkbADt8nLaFqc1TrmsLlP4Gxqb5AfrJuHMM+Eo154KdKjm41nh7XU//xLlFO3fITTm2 DazAipQ6lkHXOxUW6GaJNpmYOepYox6GX1mIBUGdXVccRtQpRuS+fJSn5bn49GHYvqID t2tpPWMFw4HqhDc+zsUIfCoQ5tTktNP0wlvse5KkCZf7DLkt5p9R+sZWf+pmcG4zFyN4 E041Efx1Rl7X0gQW6cskEx8+sk3MYe922y9Kee2zaTgOcA+55aMqD2h8hPMK8j41nDqP 6LaA== 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=AY/CMgOeklyiH0bryZskfSleYXzVVIhWdWaApH66Cb8=; fh=Jp47DAEBZGYKvP+QhbZP30z/2qU5MmgU1PLrOH49x2Y=; b=UUfZxlYKofbPUQiFDVwbnDBsU4Pj23NRTvawB8os2fZjulCD1M4I1YagxEhQlONTiy t68R3ww6Bghy/6U4gkOprqCdYwoK/hHPlIXe7DJaa7cSFR62rXQKaIY+4MyB9W1Qo5d3 IltI9HWYB9ZqRXWNKtm6JZO+tmhqzE4glQQv81sejuYmZo+fkb7e5xAddgqj8yP5ENIx 4B+kHWKHyIPVlHxxV748ID+EBFHsZsMyozBW8Vtlnx73EJonvBJIowSFz5UrFalx3G8M EI85v7ohl/JB8Vl3ORxLHcZF7AIDvEDEvBfr31wrhrMkVxOkBAkddDzEOI44bxfG3PzC JTtw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ae+qmfvt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 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 groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id s3-20020a17090a440300b00274cf8042b6si7799340pjg.102.2023.10.17.02.17.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Oct 2023 02:17:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Ae+qmfvt; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 299E780A90F8; Tue, 17 Oct 2023 02:17:32 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343501AbjJQJRa (ORCPT + 52 others); Tue, 17 Oct 2023 05:17:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36748 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343508AbjJQJR1 (ORCPT ); Tue, 17 Oct 2023 05:17:27 -0400 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7246EB0 for ; Tue, 17 Oct 2023 02:17:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697534245; x=1729070245; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YjDBcJ9lxtjmWAl5dbvTFGrgMYaSpW5zBbg7zkYOezo=; b=Ae+qmfvt0KBKLqoWhjlpag9LbP/iCsjIv099Ef+mOUc1sIElHzxXQQ3l ZfqonVlMeN6uP38lvgJPn3y4l4TCmehEA9qocV2oRcNhpRC9i8wg2xzg/ 6BiCHbginpMQZ++ufTw7GYnk2F7Di9Alce5PPnp45BjEHstkbARN2cbgV r6Df5FPy7yGhLUb7J7rti7xYmreeEkmLTxMT7BQ7wkaojyhsheTUTYk4B QyCIxTVpSLY3RezRQxrZg4MQ9EuPeNk0UAX8u7ZU9gEzl5k4MxpfExBw8 /wbLEK06GXRrxtHuF7gjHOe03Ovtj4XOso2Kgasr07jFPaJsUdpGfhEAW g==; X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="370808557" X-IronPort-AV: E=Sophos;i="6.03,231,1694761200"; d="scan'208";a="370808557" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 02:17:24 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10865"; a="759731945" X-IronPort-AV: E=Sophos;i="6.03,231,1694761200"; d="scan'208";a="759731945" Received: from obarinsh-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.213.101]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Oct 2023 02:17:22 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Benjamin Berg , Gregory Greenman Subject: [PATCH 10/14] wifi: iwlwifi: mvm: Return success if link could not be removed Date: Tue, 17 Oct 2023 12:16:45 +0300 Message-Id: <20231017115047.f89bc05aadf6.Idc8fbd671362d962c02b1df87fa6258733631580@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20231017091649.65090-1-gregory.greenman@intel.com> References: <20231017091649.65090-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 17 Oct 2023 02:17:32 -0700 (PDT) From: Benjamin Berg iwl_mvm_remove_link would return an error if the link could not be removed. However, doing so prevents recovery if a link was not uploaded to the FW in the first place and the link_info was not allocated or fw_link_id is not set. Returning success means that we can still try to continue with adding new links in change_vif_links. Signed-off-by: Benjamin Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/link.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/link.c b/drivers/net/wireless/intel/iwlwifi/mvm/link.c index c3831440a019..be48b0fc9cb6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/link.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/link.c @@ -242,9 +242,10 @@ int iwl_mvm_remove_link(struct iwl_mvm *mvm, struct ieee80211_vif *vif, struct iwl_link_config_cmd cmd = {}; int ret; + /* mac80211 thought we have the link, but it was never configured */ if (WARN_ON(!link_info || link_info->fw_link_id >= ARRAY_SIZE(mvm->link_id_to_link_conf))) - return -EINVAL; + return 0; RCU_INIT_POINTER(mvm->link_id_to_link_conf[link_info->fw_link_id], NULL); -- 2.38.1