Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp700762rdg; Wed, 11 Oct 2023 03:09:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IExGF9Gnm51J+41JIqswKEW6QW81NS3wDxwKyHSU8cCyja6ZTb16qX1A3j6vtCglTBrN0VR X-Received: by 2002:a17:90b:314e:b0:274:c622:78cc with SMTP id ip14-20020a17090b314e00b00274c62278ccmr16778762pjb.30.1697018980874; Wed, 11 Oct 2023 03:09:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697018980; cv=none; d=google.com; s=arc-20160816; b=Vvf8/590Oduf4IMCPgrl/57LFClQkRoJquqcx2O/318DsDyj87bFheclT7ZKA3A4HU eFeO2fWFQXlOt2odrBD0AZYpPsyiVT4+QHT4xo6tFVa65ioNvNaQxxOXLnf6ok4m9PlY YL5yaPR4/Rw3TtykjRBpI0gRU9Btu9RQfS7sl38XwB3701hzSYK2uFB47PG/riDU3z6L PRqtmZft1BZBTfS5CXWGhbJDGPFPTpHFY3ar6do/tZvNhBiBpSjaeKitHWhWsXMg8jpW PDOg/beiWDBj1YvFxvDwK+ynSBYEiJ1r2IJkXnmKxPFkJ+jYze0OoKwLtfuDrLFvGktY tmjQ== 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=MG0V1U/9D9sszwguABi8bazQw2G+nGN1/+NrnYqcYoE=; fh=v78ykjHCzCVwxZtbRdthmW7wH6NM9QbVMtLidpf/uiI=; b=dnnvOaQiq2oq071ygYeoLx7G46DFKJYR3eKPwYiiP6S/XOasq5ZBX4PNi1p4Ka5ML2 oFoWqLJzk36WZTqbHV55cJVAV0U9ZyJABGYdb5F58hDLyDeAFRg2NP9WcTIFOnBSl6GR w+TDsehZt/44rQvCj4r6bXwWYUanFgu3+mSf2j9B4aMFH/WOChMGo0qsPE89lKzKye2O dVKOJTD0NqQsOerAmHYUSjdt1TXurQZNROzt+wxORqbd1+Qlrhd8WsVJT1qZwq+cG8/2 axpTnS2IcqIydOdEmAQJL6G8PUkTIZoHChc+tBDQlrto84uZN4SQ6dOREI8S2J5HfLsJ +p7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=D0xDVuM2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id lk12-20020a17090b33cc00b00262e5a82047si11901913pjb.44.2023.10.11.03.09.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 03:09:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=D0xDVuM2; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id DD7F781B75ED; Wed, 11 Oct 2023 03:09:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346031AbjJKKJi (ORCPT + 52 others); Wed, 11 Oct 2023 06:09:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345978AbjJKKIy (ORCPT ); Wed, 11 Oct 2023 06:08:54 -0400 Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.88]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C45FC1FF3 for ; Wed, 11 Oct 2023 03:08:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1697018881; x=1728554881; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Urc8UCFsmxqWVxQ8DbcIYcscWfE+33F/a8fgKYYkJ+I=; b=D0xDVuM2Y31Rz3ZyFyJdW3yySa8lZXttOX2zN1nzA3AA9jKslvu8Koaz 3lN0O2NvKdMRnKmsteDLr/RkaUQyGfQED2NYz9DeYdcwQGFPpdyybAaDo M9fun9v+tQy7O2DFbpi6QGxCF+G1d4DgqnsOkfE92X0wKZjDHeGQ3PsAG LbiUrIMBB9avCC+/8ORYa+s/7uI9BNLi4toMFMlOzZ6VMXQxcaHQkKFNh 3WhdgQyH/BWwK5ZDJa29uObwDCw8x4F1f8B53C8aEdeRAmRsxV2b0SFXB jd8DL/SyXSI13WGrGk0111Ec3Qn12fB1ZrUS2ezIRoC1iKq9Y2mEA8gOV A==; X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="415670601" X-IronPort-AV: E=Sophos;i="6.03,214,1694761200"; d="scan'208";a="415670601" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 03:08:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10859"; a="1001050284" X-IronPort-AV: E=Sophos;i="6.03,214,1694761200"; d="scan'208";a="1001050284" Received: from mzarix-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.249.94.125]) by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2023 03:07:59 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Miri Korenblit , Gregory Greenman Subject: [PATCH 08/16] wifi: iwlwifi: mvm: cleanup MLO and non-MLO unification code Date: Wed, 11 Oct 2023 13:07:23 +0300 Message-Id: <20231011130030.b65fbcdb9295.I2a64a6f1178ee0466755d728addc77acbb2ed6f4@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20231011100731.361200-1-gregory.greenman@intel.com> References: <20231011100731.361200-1-gregory.greenman@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,URIBL_BLOCKED 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 11 Oct 2023 03:09:40 -0700 (PDT) From: Miri Korenblit bss_info_changed() callback of mac80211 was originally in both MLD and non-MLD API. Therefore, we extracted the common part to a function which receives a callback structure with the mode-specific (non-MLO\MLO) ops. Eventually, for MLO API, bss_info_changed() callback was split into 2 callbacks: link_info_changed() and vif_cfg_changed() so it is no longer in use for MLO, only for non-MLO. Remove the code that uses the mode-specific callback structure. Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman --- .../net/wireless/intel/iwlwifi/mvm/mac80211.c | 21 +--------- drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 39 ++----------------- 2 files changed, 6 insertions(+), 54 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index 387642ea2fff..ce65d74413fb 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -3036,22 +3036,6 @@ static void iwl_mvm_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, struct ieee80211_bss_conf *bss_conf, u64 changes) -{ - static const struct iwl_mvm_bss_info_changed_ops callbacks = { - .bss_info_changed_sta = iwl_mvm_bss_info_changed_station, - .bss_info_changed_ap_ibss = iwl_mvm_bss_info_changed_ap_ibss, - }; - - iwl_mvm_bss_info_changed_common(hw, vif, bss_conf, &callbacks, - changes); -} - -void -iwl_mvm_bss_info_changed_common(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_bss_conf *bss_conf, - const struct iwl_mvm_bss_info_changed_ops *callbacks, - u64 changes) { struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); @@ -3062,12 +3046,11 @@ iwl_mvm_bss_info_changed_common(struct ieee80211_hw *hw, switch (vif->type) { case NL80211_IFTYPE_STATION: - callbacks->bss_info_changed_sta(mvm, vif, bss_conf, changes); + iwl_mvm_bss_info_changed_station(mvm, vif, bss_conf, changes); break; case NL80211_IFTYPE_AP: case NL80211_IFTYPE_ADHOC: - callbacks->bss_info_changed_ap_ibss(mvm, vif, bss_conf, - changes); + iwl_mvm_bss_info_changed_ap_ibss(mvm, vif, bss_conf, changes); break; case NL80211_IFTYPE_MONITOR: if (changes & BSS_CHANGED_MU_GROUPS) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index 866753218ec8..fda5ad4723ac 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -1921,41 +1921,10 @@ void iwl_mvm_stop_ap_ibss_common(struct iwl_mvm *mvm, struct ieee80211_vif *vif); /* BSS Info */ -/** - * struct iwl_mvm_bss_info_changed_ops - callbacks for the bss_info_changed() - * - * Since the only difference between both MLD and - * non-MLD versions of bss_info_changed() is these function calls, - * each version will send its specific function calls to - * %iwl_mvm_bss_info_changed_common(). - * - * @bss_info_changed_sta: pointer to the function that handles changes - * in bss_info in sta mode - * @bss_info_changed_ap_ibss: pointer to the function that handles changes - * in bss_info in ap and ibss modes - */ -struct iwl_mvm_bss_info_changed_ops { - void (*bss_info_changed_sta)(struct iwl_mvm *mvm, - struct ieee80211_vif *vif, - struct ieee80211_bss_conf *bss_conf, - u64 changes); - void (*bss_info_changed_ap_ibss)(struct iwl_mvm *mvm, - struct ieee80211_vif *vif, - struct ieee80211_bss_conf *bss_conf, - u64 changes); -}; - -void -iwl_mvm_bss_info_changed_common(struct ieee80211_hw *hw, - struct ieee80211_vif *vif, - struct ieee80211_bss_conf *bss_conf, - const struct iwl_mvm_bss_info_changed_ops *callbacks, - u64 changes); -void -iwl_mvm_bss_info_changed_station_common(struct iwl_mvm *mvm, - struct ieee80211_vif *vif, - struct ieee80211_bss_conf *link_conf, - u64 changes); +void iwl_mvm_bss_info_changed_station_common(struct iwl_mvm *mvm, + struct ieee80211_vif *vif, + struct ieee80211_bss_conf *link_conf, + u64 changes); void iwl_mvm_bss_info_changed_station_assoc(struct iwl_mvm *mvm, struct ieee80211_vif *vif, u64 changes); -- 2.38.1