Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4017083rwl; Tue, 28 Mar 2023 01:05:47 -0700 (PDT) X-Google-Smtp-Source: AKy350bHAX8NvReBi6wITMW6leUJxXTMhNDCQBRZMXSabpiJrX94YSEWsABEpq/+SuopfMJkNuYH X-Received: by 2002:a17:906:2a54:b0:925:5eb8:92fd with SMTP id k20-20020a1709062a5400b009255eb892fdmr15453332eje.14.1679990747752; Tue, 28 Mar 2023 01:05:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679990747; cv=none; d=google.com; s=arc-20160816; b=mbbUHFJCSLH32E2PdDMsGLgYLbF/u1GqdJJVg3HMqr9QH2QKBm1e9dD29T+kRzvHOc HAzK5PGDksIzXbH5CffnTubX5K1ha8jtbp8OaXJBbUOj8UtS/DgCE0suDVbk79tZQERt jiIvT+l21/2IqmaCbuCOEoxeLdwhXgBEy+CCSTOLZLJ9GS2uM5pShYuBzU4Kl080wf+N BJYjqRaTVjfCBbZqFAONqh8sJGgab3KuavJkch7aHStDlRkm5AF8TzqYkvir672EMDhj IAc0Q2rP7DEIArGyhS6He8sfQj/Dlz9QlssZBUjeu8KVVhCrpM1JFREpWFA7lcADGETx yEcQ== 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=fHXcIx6mE/gpdEswecuW+UajFTfqj4KTddpAC4/bpPQ=; b=RmZdqFEzBML3BDSZbzl1QAneDKOiaLiXqkkILGNGd+opkIFGNIMZ1BrmgoHF3NDhds 7px1KFHMrE4qHY8U3XQpLU4TkHbBhX+MyMfvaNJBdDCF4YUs0iCJdI65eVgrUq4E4hN+ oCuxf58mgNZqjW8365Ii3MkOvnkl+ZDiBQNx8ZA5stLNO8lmcxtlSgK7s65072wAOx7/ PdsTgvQtN04yyT1asuAfr8OuW/0H1EzblVNc5dCUmvJCDLzeOHesvuCG1NgVoOUA1R9K Wbt1/JuZUXtyJUZ2IwRcGCT0uP/2U7zKHxxaMEtLofPDmzeHgK1ObnZy+ejs7TjH7eEp cIAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=hnUdbw+M; 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 k21-20020a170906579500b009337bae35c1si15182202ejq.237.2023.03.28.01.05.32; Tue, 28 Mar 2023 01:05:47 -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=hnUdbw+M; 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 S232672AbjC1IAM (ORCPT + 60 others); Tue, 28 Mar 2023 04:00:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232670AbjC1IAK (ORCPT ); Tue, 28 Mar 2023 04:00:10 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F18E7420A for ; Tue, 28 Mar 2023 01:00:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679990406; x=1711526406; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NeaXlQYE3NEG2nPnLEkx+3n1plhwisNkhAxEARHzLdk=; b=hnUdbw+MFySDZasv6ccSQn25nTfQq6RQvZLEFKT6MvdltfbUjcSH/cZt cuEqB6O8qi+APRrviM8VmznVmkYrjwqON6nVmAGkkBUMacOlOF1IS/6XF UP1DJDDiSApsVz2b0nkGqTRP3nYnvQNf9RJdWCLv5RXiiiymk8RQs8poH Xmmw20sAVUNoC7iK77TzOdxw49FX1hDuH5Ecwv4vq/SawabE/1/6O+V6x wY8+WtzJe+Mb/qFmWl2B+Tmym4OCt7tPCjPBg1U5C18ZJ/Ax/t3shuo+k IWLvSx2dOge7QYk5Soda/QXJnLRmL9hLsse6rQoBUwIxrC8OVdAdwFalT w==; X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="328958114" X-IronPort-AV: E=Sophos;i="5.98,296,1673942400"; d="scan'208";a="328958114" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2023 00:59:44 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10662"; a="773045135" X-IronPort-AV: E=Sophos;i="5.98,296,1673942400"; d="scan'208";a="773045135" Received: from gershonr-mobl.ger.corp.intel.com (HELO ggreenma-mobl2.intel.com) ([10.214.194.136]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Mar 2023 00:59:42 -0700 From: gregory.greenman@intel.com To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, Miri Korenblit , Gregory Greenman Subject: [PATCH 09/31] wifi: iwlwifi: mvm: add support for post_channel_switch in MLD mode Date: Tue, 28 Mar 2023 10:58:49 +0300 Message-Id: <20230328104948.fa3992f7dfd2.Ie298a9b1522e956d7b699f0432795548bc6e47f9@changeid> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230328075911.2370108-1-gregory.greenman@intel.com> References: <20230328075911.2370108-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, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,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: Miri Korenblit Adjust the existing iwl_mvm_post_channel_switch() to the new MLD API and use it in the new MLD ieee80211_ops Signed-off-by: Miri Korenblit Signed-off-by: Gregory Greenman --- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 10 ++++++---- drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c | 1 + drivers/net/wireless/intel/iwlwifi/mvm/mvm.h | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c index ce2f502bfff8..631d1becc6ab 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c @@ -1317,8 +1317,8 @@ static int iwl_mvm_set_tx_power(struct iwl_mvm *mvm, struct ieee80211_vif *vif, return iwl_mvm_send_cmd_pdu(mvm, cmd_id, 0, len, &cmd); } -static int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw, - struct ieee80211_vif *vif) +int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw, + struct ieee80211_vif *vif) { struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw); @@ -1339,8 +1339,10 @@ static int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw, } iwl_mvm_sta_modify_disable_tx(mvm, mvmsta, false); - - iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); + if (mvm->mld_api_is_used) + iwl_mvm_mld_mac_ctxt_changed(mvm, vif, false); + else + iwl_mvm_mac_ctxt_changed(mvm, vif, false, NULL); if (!fw_has_capa(&mvm->fw->ucode_capa, IWL_UCODE_TLV_CAPA_CHANNEL_SWITCH_CMD)) { diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c index 92f174231f60..818aed050b73 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mld-mac80211.c @@ -640,6 +640,7 @@ const struct ieee80211_ops iwl_mvm_mld_hw_ops = { .switch_vif_chanctx = iwl_mvm_mld_switch_vif_chanctx, .join_ibss = iwl_mvm_mld_start_ap_ibss, .leave_ibss = iwl_mvm_mld_stop_ap_ibss, + .post_channel_switch = iwl_mvm_post_channel_switch, .sta_state = iwl_mvm_mld_mac_sta_state, .conf_tx = iwl_mvm_mld_mac_conf_tx, .bss_info_changed = iwl_mvm_mld_bss_info_changed, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h index ba59a6c30529..bf1de6405cd6 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h +++ b/drivers/net/wireless/intel/iwlwifi/mvm/mvm.h @@ -2298,6 +2298,8 @@ static inline u8 iwl_mvm_phy_band_from_nl80211(enum nl80211_band band) /* Channel Switch */ void iwl_mvm_channel_switch_disconnect_wk(struct work_struct *wk); +int iwl_mvm_post_channel_switch(struct ieee80211_hw *hw, + struct ieee80211_vif *vif); /* Channel Context */ /** -- 2.38.1