Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6276214yba; Wed, 1 May 2019 09:09:07 -0700 (PDT) X-Google-Smtp-Source: APXvYqxWu/sqqDcmaLFS+cNwl1y9myTC7oOpbUQ+kTvVSOCON1m+b47tX0AIQetNmCMPCusWq77z X-Received: by 2002:a17:902:3c5:: with SMTP id d63mr27475749pld.328.1556726947224; Wed, 01 May 2019 09:09:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556726947; cv=none; d=google.com; s=arc-20160816; b=Qags9d5YM00zWpTXPOezP4q4F/mWZ3bGteTFCdZ4+nzmWq6a7ETIGnLyZZviSLjyCS uGE2WV3neKGlKr03QRlwe1iuKNZy7nJREFtw1oRwPCwRLltO+g7x0GIrC6zKRTMcKBB0 1CNM6Xb28puraVCRmyr8jsdPotFK5er1GVRrGNJ74vGPqPXrJ6uw7Qz1sxukn3rddLOB hGhfcT1dk28gU0DvJDc4FBeBdkbaAumNR8XiR1Yxv1ni3ngGtZceGdRAF85n5cA+VIPn /LqzOoLF+hA8Czqrb9l7pqvtZUH8f6Sv0x/jn7fC5l4rlP3YiTBIDGUAdUMycGFFVrNu bv9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=q4rw/TmAd7xRrYhy2VnFYirt5gND6Ko8rdJvjAVLp94=; b=jYLxPpeRjS34xk+N3C0dh4afNtUpVplQOTfR+Ye3Ovw0MC/nlwn1MmwYiXsGFCvMhZ av5yiw8xEn6I1yMo8UFeYFfl/ML/F9tDZNx1RyrezNQydIjGv94XoCLFgzVsxGBI3l2B wcYFMfT6Gb/XmUUCAVqXlSUWfiOEnBEfJrOwzg75rMOBAKEe85k9Ql+tvacBjSam0fCN 1MZEwhc+9Vx98EF/yZSVxB++y3m71EszOi78V3VUaK4UriWoMpIsPJB97lEYUFiRPJkM 6njEzswU6NQ2ZURE2paTf5b0LxBfTmP7cCdNUg4dvxROFq/SudW4VBf7tPqKjhQFqQQ4 Xjvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ur6dLlAD; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n5si18011542plk.419.2019.05.01.09.08.52; Wed, 01 May 2019 09:09:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ur6dLlAD; spf=pass (google.com: best guess record for domain of linux-wireless-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726928AbfEAQIG (ORCPT + 99 others); Wed, 1 May 2019 12:08:06 -0400 Received: from mail.kernel.org ([198.145.29.99]:37030 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726923AbfEAQIF (ORCPT ); Wed, 1 May 2019 12:08:05 -0400 Received: from localhost.localdomain (unknown [151.66.22.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 00DFC208C3; Wed, 1 May 2019 16:08:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556726884; bh=B/Jk6O8a2sYQWcjpv96I3LvQhXS+izx789M/LXlrzbA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ur6dLlADsg6EFLUUrDPEV1YCZRAgzrXpbDH++Scfikbk0ckVkipzPfmmCkHt7zcio kLDzgzAOVZeFA6QCEaXzzfKGdVhVNhcpdTzrwKMs60r4xzm5nGgAgY3t8/891CP+m5 ZXdaqFwAPvTb8Pn1qkon+wfarpNvi04gV9Is/01A= From: Lorenzo Bianconi To: nbd@nbd.name Cc: lorenzo.bianconi@redhat.com, linux-wireless@vger.kernel.org, ryder.lee@mediatek.com, royluo@google.com Subject: [RFC 08/17] mt7615: remove query from mt7615_mcu_msg_send signature Date: Wed, 1 May 2019 18:07:30 +0200 Message-Id: <4726f34219aa6a01158e53ee2f40db248ef6c9e4.1556726268.git.lorenzo@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt7615/mcu.c | 53 +++++++++---------- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index e71a79c11812..8aca5ac9c383 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -49,7 +49,7 @@ struct mt7615_fw_trailer { #define FW_START_WORKING_PDA_CR4 BIT(2) static int __mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb, - int cmd, int query, int dest, int *wait_seq) + int cmd, int dest, int *wait_seq) { struct mt7615_mcu_txd *mcu_txd; u8 seq, q_idx, pkt_fmt; @@ -94,15 +94,14 @@ static int __mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb, mcu_txd->seq = seq; if (cmd < 0) { + mcu_txd->set_query = MCU_Q_NA; mcu_txd->cid = -cmd; } else { mcu_txd->cid = MCU_CMD_EXT_CID; + mcu_txd->set_query = MCU_Q_SET; mcu_txd->ext_cid = cmd; - if (query != MCU_Q_NA) - mcu_txd->ext_cid_ack = 1; + mcu_txd->ext_cid_ack = 1; } - - mcu_txd->set_query = query; mcu_txd->s2d_index = dest; if (wait_seq) @@ -116,9 +115,9 @@ static int __mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb, return mt76_tx_queue_skb_raw(dev, qid, skb, 0); } -static int mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb, - int cmd, int query, int dest, - struct sk_buff **skb_ret) +static int +mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb, + int cmd, int dest, struct sk_buff **skb_ret) { unsigned long expires = jiffies + 10 * HZ; struct mt7615_mcu_rxd *rxd; @@ -126,7 +125,7 @@ static int mt7615_mcu_msg_send(struct mt7615_dev *dev, struct sk_buff *skb, mutex_lock(&dev->mt76.mmio.mcu.mutex); - ret = __mt7615_mcu_msg_send(dev, skb, cmd, query, dest, &seq); + ret = __mt7615_mcu_msg_send(dev, skb, cmd, dest, &seq); if (ret) goto out; @@ -179,7 +178,7 @@ static int mt7615_mcu_init_download(struct mt7615_dev *dev, u32 addr, struct sk_buff *skb = mt7615_mcu_msg_alloc(&req, sizeof(req)); return mt7615_mcu_msg_send(dev, skb, -MCU_CMD_TARGET_ADDRESS_LEN_REQ, - MCU_Q_NA, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } static int mt7615_mcu_send_firmware(struct mt7615_dev *dev, const void *data, @@ -197,7 +196,7 @@ static int mt7615_mcu_send_firmware(struct mt7615_dev *dev, const void *data, return -ENOMEM; ret = __mt7615_mcu_msg_send(dev, skb, -MCU_CMD_FW_SCATTER, - MCU_Q_NA, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); if (ret) break; @@ -221,7 +220,7 @@ static int mt7615_mcu_start_firmware(struct mt7615_dev *dev, u32 addr, struct sk_buff *skb = mt7615_mcu_msg_alloc(&req, sizeof(req)); return mt7615_mcu_msg_send(dev, skb, -MCU_CMD_FW_START_REQ, - MCU_Q_NA, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } static int mt7615_mcu_restart(struct mt7615_dev *dev) @@ -229,7 +228,7 @@ static int mt7615_mcu_restart(struct mt7615_dev *dev) struct sk_buff *skb = mt7615_mcu_msg_alloc(NULL, 0); return mt7615_mcu_msg_send(dev, skb, -MCU_CMD_RESTART_DL_REQ, - MCU_Q_NA, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } static int mt7615_mcu_patch_sem_ctrl(struct mt7615_dev *dev, bool get) @@ -249,7 +248,7 @@ static int mt7615_mcu_patch_sem_ctrl(struct mt7615_dev *dev, bool get) int ret; ret = mt7615_mcu_msg_send(dev, skb, -MCU_CMD_PATCH_SEM_CONTROL, - MCU_Q_NA, MCU_S2D_H2N, &skb_ret); + MCU_S2D_H2N, &skb_ret); if (ret) goto out; @@ -272,7 +271,7 @@ static int mt7615_mcu_start_patch(struct mt7615_dev *dev) struct sk_buff *skb = mt7615_mcu_msg_alloc(&req, sizeof(req)); return mt7615_mcu_msg_send(dev, skb, -MCU_CMD_PATCH_FINISH_REQ, - MCU_Q_NA, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } static int mt7615_driver_own(struct mt7615_dev *dev) @@ -559,7 +558,7 @@ int mt7615_mcu_set_eeprom(struct mt7615_dev *dev) data[off - MT_EE_NIC_CONF_0].val = eep[off]; return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_EFUSE_BUFFER_MODE, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } int mt7615_mcu_init_mac(struct mt7615_dev *dev) @@ -575,7 +574,7 @@ int mt7615_mcu_init_mac(struct mt7615_dev *dev) struct sk_buff *skb = mt7615_mcu_msg_alloc(&req, sizeof(req)); return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_MAC_INIT_CTRL, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } int mt7615_mcu_set_rts_thresh(struct mt7615_dev *dev, u32 val) @@ -595,7 +594,7 @@ int mt7615_mcu_set_rts_thresh(struct mt7615_dev *dev, u32 val) struct sk_buff *skb = mt7615_mcu_msg_alloc(&req, sizeof(req)); return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_PROTECT_CTRL, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } int mt7615_mcu_set_wmm(struct mt7615_dev *dev, u8 queue, @@ -634,7 +633,7 @@ int mt7615_mcu_set_wmm(struct mt7615_dev *dev, u8 queue, skb = mt7615_mcu_msg_alloc(&req, sizeof(req)); return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_EDCA_UPDATE, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } int mt7615_mcu_ctrl_pm_state(struct mt7615_dev *dev, int enter) @@ -665,7 +664,7 @@ int mt7615_mcu_ctrl_pm_state(struct mt7615_dev *dev, int enter) struct sk_buff *skb = mt7615_mcu_msg_alloc(&req, sizeof(req)); return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_PM_STATE_CTRL, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } static int __mt7615_mcu_set_dev_info(struct mt7615_dev *dev, @@ -713,7 +712,7 @@ static int __mt7615_mcu_set_dev_info(struct mt7615_dev *dev, memcpy(skb_push(skb, sizeof(req_hdr)), &req_hdr, sizeof(req_hdr)); return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_DEV_INFO_UPDATE, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } int mt7615_mcu_set_dev_info(struct mt7615_dev *dev, struct ieee80211_vif *vif, @@ -839,7 +838,7 @@ static int __mt7615_mcu_set_bss_info(struct mt7615_dev *dev, bss_info_tag_handler[i].handler(dev, bss_info, skb); return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_BSS_INFO_UPDATE, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } int mt7615_mcu_set_bss_info(struct mt7615_dev *dev, @@ -923,7 +922,7 @@ __mt7615_mcu_set_wtbl(struct mt7615_dev *dev, int wlan_idx, memcpy(skb_put(skb, buf_len), buf, buf_len); return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_WTBL_UPDATE, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } static enum mt7615_cipher_type @@ -1102,7 +1101,7 @@ __mt7615_mcu_set_sta_rec(struct mt7615_dev *dev, int bss_idx, memcpy(skb_put(skb, buf_len), buf, buf_len); return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_STA_REC_UPDATE, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } int mt7615_mcu_set_sta_rec_bmc(struct mt7615_dev *dev, @@ -1231,7 +1230,7 @@ int mt7615_mcu_set_bcn(struct mt7615_dev *dev, struct ieee80211_vif *vif, skb = mt7615_mcu_msg_alloc(&req, sizeof(req)); return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_BCN_OFFLOAD, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } int mt7615_mcu_set_channel(struct mt7615_dev *dev) @@ -1297,13 +1296,13 @@ int mt7615_mcu_set_channel(struct mt7615_dev *dev) skb = mt7615_mcu_msg_alloc(&req, sizeof(req)); ret = mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_CHANNEL_SWITCH, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); if (ret) return ret; skb = mt7615_mcu_msg_alloc(&req, sizeof(req)); return mt7615_mcu_msg_send(dev, skb, MCU_EXT_CMD_SET_RX_PATH, - MCU_Q_SET, MCU_S2D_H2N, NULL); + MCU_S2D_H2N, NULL); } int mt7615_mcu_set_ht_cap(struct mt7615_dev *dev, struct ieee80211_vif *vif, -- 2.20.1