Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp210560rwl; Wed, 29 Mar 2023 00:08:41 -0700 (PDT) X-Google-Smtp-Source: AKy350ZnVzccYsg1uR3+GX9/JLKG71pbRo3dLUITXnFuX595eObc2kFFdGTEnsxG7PRLp53M82xA X-Received: by 2002:a17:90a:43:b0:234:d42:1628 with SMTP id 3-20020a17090a004300b002340d421628mr20522882pjb.10.1680073720831; Wed, 29 Mar 2023 00:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680073720; cv=none; d=google.com; s=arc-20160816; b=EGiwskndsu8LU3ZOpgwiHoDcp+cwa49OUM2k4Djr9n4q44QMpZqK41XnVCBPy7Ifke Ea5VC736sufL6RLPu/0T4l0dTc6AdXLRSfm13csfvruepX060Hj5GHb0/lXvVLMiNZB9 lWIl3f1gKztFG9re4lwtxbiXtghjQaUxHJVJZE1bvWv/2l7i9Z+Nbr4MmfUXPZd0Ps/3 KlwEWgcS5wDKr2VKTEsBlqfrNCDpCe6o+g/91unWEXvLnpBWksMa3OCghQVdIAa/Z/7q pX5kVXi9XjgpH/ONM0TtbyBW9djA/JbO92Qo/putpkgrqZ1gPceglkGntuBKWIrS4j8a rS9Q== 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=WjLxNOurATUbjFDLZwj0TNKOYNfp77LWWjyT8u6bDOE=; b=YAXv2eybifsyDvMP7yh3/r71/guAxXzeyh/PBbMX7SFkQPp12e5fiTEChfRFV8ahbx vQrnr5t+jlI0uRZ3GfZyyMaZC8KmKQLD/Kw5hzoFo9jNay7dcWD79uY1dnAD3xLRS4VA miIfyafnyKX0DTyrGKw82xMa5tTdvsSSMDaFbIEzWgQOYJ0VFQCXacinas5S2IGvxPVA BG8psn/4RPWqmleDp1zu20TWiErLnw/055egvZtsqlWEZvnRTsS2JsDtHvZpgl+fD9Pt W6oEWDO+ZO9qgXFAaVPVe9CdXc0as03g7iuvFsZ/w1E0di3fT0pvlT2DFXLXBZhkw9Bz hMGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=AO7IDhb5; 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 ot12-20020a17090b3b4c00b002402275fc56si950259pjb.118.2023.03.29.00.08.34; Wed, 29 Mar 2023 00:08:40 -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=AO7IDhb5; 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 S229771AbjC2HHL (ORCPT + 60 others); Wed, 29 Mar 2023 03:07:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229790AbjC2HHH (ORCPT ); Wed, 29 Mar 2023 03:07:07 -0400 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C4E63AB4 for ; Wed, 29 Mar 2023 00:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680073609; x=1711609609; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=r8BxuyyHOqc0CyM2WILHC+Cb+nOhCeSXeLzrGlI5Jqg=; b=AO7IDhb5VCCS9wK0SpbDp9oU9ssXpPwbIfpKC+un5x/rNqozxs8E/IAE tVZmhHKdxQj5ex4fDLPGNAJVkrJJLMO5Ld9ghUAG4jq1TNUAPiB7wepDs ABYUvwQDyxnYTcuD2omFreEG5/FwOkD+srmUxccMEdRWXJQIN+LQpwD0M ctJLgWbMArh906ZDhvMYK+BZVcC9wKYIPZwY2WEGkRNTisG84oe7fg0+q WlCMnYp+SWhYZnyeoGcV1BZXfaFCSJMGxhTd8ku5X1hTEl3wk+bLfy/3q juWK98ktHPj+ZNkHv06wWyk/RmaNCz7hVrHx0oVDoa6mFyq938vkSwiz0 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="320450763" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="320450763" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 00:06:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10663"; a="795111232" X-IronPort-AV: E=Sophos;i="5.98,300,1673942400"; d="scan'208";a="795111232" Received: from sfrank1-mobl1.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.228.42]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Mar 2023 00:06:07 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Johannes Berg , Gregory Greenman Subject: [PATCH 07/34] wifi: iwlwifi: mvm: make a few warnings only trigger once Date: Wed, 29 Mar 2023 10:05:13 +0300 Message-Id: <20230329100039.f333741d3dcf.If063d4cfe8a583f0f980a1b0ae4e63e17ba4ddc9@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230329070540.2739372-1-gregory.greenman@intel.com> References: <20230329070540.2739372-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_PASS, SPF_NONE autolearn=unavailable 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: Johannes Berg We're hitting these while starting to enable MLO in the driver, but getting them each and every time isn't very useful one way or the other. Make these warnings trigger only once. Signed-off-by: Johannes Berg Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 294e1c1de6b6..2b2221d7582b 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -5591,7 +5591,7 @@ void iwl_mvm_mac_flush(struct ieee80211_hw *hw, struct ieee80211_vif *vif, continue; /* make sure only TDLS peers or the AP are flushed */ - WARN_ON(i != mvmvif->deflink.ap_sta_id && !sta->tdls); + WARN_ON_ONCE(i != mvmvif->deflink.ap_sta_id && !sta->tdls); if (drop) { if (iwl_mvm_flush_sta(mvm, mvmsta, false)) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c index 154f145396ce..aa8b4fb9c201 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-key.c @@ -213,8 +213,8 @@ void iwl_mvm_sec_key_remove_ap(struct iwl_mvm *mvm, u32 sec_key_id = WIDE_ID(DATA_PATH_GROUP, SEC_KEY_CMD); u8 sec_key_ver = iwl_fw_lookup_cmd_ver(mvm->fw, sec_key_id, 0); - if (WARN_ON(vif->type != NL80211_IFTYPE_STATION || - mvmvif->deflink.ap_sta_id == IWL_MVM_INVALID_STA)) + if (WARN_ON_ONCE(vif->type != NL80211_IFTYPE_STATION || + mvmvif->deflink.ap_sta_id == IWL_MVM_INVALID_STA)) return; if (!sec_key_ver) -- 2.38.1