Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp3190973pxb; Thu, 10 Feb 2022 14:44:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJzEhyL6gR5pq6sb0JBia3wGEF80uLIS6l0QE49DFsv6RY01Zm8cYAWlEfWOUkgct7x3cCKZ X-Received: by 2002:a17:90b:1c8d:: with SMTP id oo13mr5051272pjb.201.1644533057208; Thu, 10 Feb 2022 14:44:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644533057; cv=none; d=google.com; s=arc-20160816; b=L7eb48Roecy97BcIB5moUh0HIX0IBVGIfzf6Gz61AvqW8oLHN7+Pw4WGPJSqEPrHup KKv3mIisphylibStSUESbXiKtaOGXFfc9Ta+kyHdJ6puLf+laRXVx2WFxbEWHrBxB8eO Hm6dmCTPE0IlLfvvkM6GhxMGGinXPpAtE4wR8yyHZ6nYI6k2n81AoTjUZ39t2LWjb9LL v5m9qBgOF423sPN/da7zrXSelehAlOLYhFeGMW5ORFkN9KpjfNdvn4GBGH6phW/5v2fM MQwOX+jy5JZ8BzsIVslEqP4eQZNR9wsVEln8POiEq1jpX7sFdx9leWflbZX3gH3Oh4Ug UTfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:cc:to:from; bh=jyfgoz96rp5rxrZEDINLwGf+NjmChNSBPyWhckcjb80=; b=u7pfAmjr0K6kfPn2eUm17SIcTt1vWryXzszPqz0hFrbSGijxrPP7uTjuzlmWEwFUMC 2bRpOzTSvzYM9ySVpe2OqRTHuf8QOeqgfGcY9wEigIBAVxMbI0f8WgO6XMTmTX9FS44J dHmh39liWDaYBeIbJqmCsXXnPMMF1qbNknV4c9rMFXo/dSRUAszqEY5MuiSHEJBVFyjW ifLs2JE81TZcjV18j/HqPv+5x09pj7wv05YxiML6bmz4xjcBKPyZJ76YyZe7knuontLH 4kpebhm3J8TFVSjbeG0kjdlSwKGREnk4m94T2eCOp6Kcd3whQhQjGnB2OkOKdmq+g+Gx LhXg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fz21si2629413pjb.58.2022.02.10.14.44.05; Thu, 10 Feb 2022 14:44:17 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244839AbiBJQwa (ORCPT + 73 others); Thu, 10 Feb 2022 11:52:30 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:36072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244845AbiBJQw3 (ORCPT ); Thu, 10 Feb 2022 11:52:29 -0500 Received: from farmhouse.coelho.fi (paleale.coelho.fi [176.9.41.70]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5717DEE for ; Thu, 10 Feb 2022 08:52:30 -0800 (PST) Received: from 91-156-4-210.elisa-laajakaista.fi ([91.156.4.210] helo=kveik.ger.corp.intel.com) by farmhouse.coelho.fi with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1nICDO-000Bxy-Rx; Thu, 10 Feb 2022 18:22:40 +0200 From: Luca Coelho To: kvalo@kernel.org Cc: luca@coelho.fi, linux-wireless@vger.kernel.org Date: Thu, 10 Feb 2022 18:22:25 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220210162234.285578-1-luca@coelho.fi> References: <20220210162234.285578-1-luca@coelho.fi> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,KHOP_HELO_FCRDNS, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 Subject: [PATCH 02/11] iwlwifi: remove command ID argument from queue allocation Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Johannes Berg The command ID here is always hard-coded to the same, so we can remove it. In the future we actually need to make this configurable, but that doesn't need to be on each call, it can be done through the transport configuration. Signed-off-by: Johannes Berg Signed-off-by: Luca Coelho --- drivers/net/wireless/intel/iwlwifi/iwl-trans.h | 10 ++++------ drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 5 ++--- drivers/net/wireless/intel/iwlwifi/queue/tx.c | 5 +++-- drivers/net/wireless/intel/iwlwifi/queue/tx.h | 5 ++--- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h index 6a4d3eafdc19..50342bf0a5d7 100644 --- a/drivers/net/wireless/intel/iwlwifi/iwl-trans.h +++ b/drivers/net/wireless/intel/iwlwifi/iwl-trans.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2005-2014, 2018-2021 Intel Corporation + * Copyright (C) 2005-2014, 2018-2022 Intel Corporation * Copyright (C) 2013-2015 Intel Mobile Communications GmbH * Copyright (C) 2016-2017 Intel Deutschland GmbH */ @@ -571,8 +571,7 @@ struct iwl_trans_ops { /* 22000 functions */ int (*txq_alloc)(struct iwl_trans *trans, __le16 flags, u8 sta_id, u8 tid, - int cmd_id, int size, - unsigned int queue_wdg_timeout); + int size, unsigned int queue_wdg_timeout); void (*txq_free)(struct iwl_trans *trans, int queue); int (*rxq_dma_data)(struct iwl_trans *trans, int queue, struct iwl_trans_rxq_dma_data *data); @@ -1246,8 +1245,7 @@ iwl_trans_txq_free(struct iwl_trans *trans, int queue) static inline int iwl_trans_txq_alloc(struct iwl_trans *trans, __le16 flags, u8 sta_id, u8 tid, - int cmd_id, int size, - unsigned int wdg_timeout) + int size, unsigned int wdg_timeout) { might_sleep(); @@ -1260,7 +1258,7 @@ iwl_trans_txq_alloc(struct iwl_trans *trans, } return trans->ops->txq_alloc(trans, flags, sta_id, tid, - cmd_id, size, wdg_timeout); + size, wdg_timeout); } static inline void iwl_trans_txq_set_shared_mode(struct iwl_trans *trans, diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c index cb993fe0bb2b..bf3aca0b2fc5 100644 --- a/drivers/net/wireless/intel/iwlwifi/mvm/sta.c +++ b/drivers/net/wireless/intel/iwlwifi/mvm/sta.c @@ -783,9 +783,8 @@ static int iwl_mvm_tvqm_enable_txq(struct iwl_mvm *mvm, do { __le16 enable = cpu_to_le16(TX_QUEUE_CFG_ENABLE_QUEUE); - queue = iwl_trans_txq_alloc(mvm->trans, enable, - sta_id, tid, SCD_QUEUE_CFG, - size, timeout); + queue = iwl_trans_txq_alloc(mvm->trans, enable, sta_id, + tid, size, timeout); if (queue < 0) IWL_DEBUG_TX_QUEUES(mvm, diff --git a/drivers/net/wireless/intel/iwlwifi/queue/tx.c b/drivers/net/wireless/intel/iwlwifi/queue/tx.c index 49625c679a5a..047092ea34fb 100644 --- a/drivers/net/wireless/intel/iwlwifi/queue/tx.c +++ b/drivers/net/wireless/intel/iwlwifi/queue/tx.c @@ -7,6 +7,7 @@ #include "iwl-debug.h" #include "iwl-io.h" +#include "fw/api/commands.h" #include "fw/api/tx.h" #include "queue/tx.h" #include "iwl-fh.h" @@ -1185,7 +1186,7 @@ static int iwl_txq_alloc_response(struct iwl_trans *trans, struct iwl_txq *txq, } int iwl_txq_dyn_alloc(struct iwl_trans *trans, __le16 flags, u8 sta_id, u8 tid, - int cmd_id, int size, unsigned int timeout) + int size, unsigned int timeout) { struct iwl_txq *txq; struct iwl_tx_queue_cfg_cmd cmd = { @@ -1194,7 +1195,7 @@ int iwl_txq_dyn_alloc(struct iwl_trans *trans, __le16 flags, u8 sta_id, u8 tid, .tid = tid, }; struct iwl_host_cmd hcmd = { - .id = cmd_id, + .id = SCD_QUEUE_CFG, .len = { sizeof(cmd) }, .data = { &cmd, }, .flags = CMD_WANT_SKB, diff --git a/drivers/net/wireless/intel/iwlwifi/queue/tx.h b/drivers/net/wireless/intel/iwlwifi/queue/tx.h index 7db675b89f8d..726dd001e65b 100644 --- a/drivers/net/wireless/intel/iwlwifi/queue/tx.h +++ b/drivers/net/wireless/intel/iwlwifi/queue/tx.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */ /* - * Copyright (C) 2020-2021 Intel Corporation + * Copyright (C) 2020-2022 Intel Corporation */ #ifndef __iwl_trans_queue_tx_h__ #define __iwl_trans_queue_tx_h__ @@ -114,8 +114,7 @@ void iwl_txq_gen2_tfd_unmap(struct iwl_trans *trans, int iwl_txq_dyn_alloc(struct iwl_trans *trans, __le16 flags, u8 sta_id, u8 tid, - int cmd_id, int size, - unsigned int timeout); + int size, unsigned int timeout); int iwl_txq_gen2_tx(struct iwl_trans *trans, struct sk_buff *skb, struct iwl_device_tx_cmd *dev_cmd, int txq_id); -- 2.34.1