Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp429192ybt; Wed, 8 Jul 2020 03:27:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRRawLm9jlbbUKVNsX/FB9t5KdykBsIWvBirQrRaHcjCQJO+YR8bilhkhdfj46qqpUTq7B X-Received: by 2002:a17:907:7244:: with SMTP id ds4mr43119552ejc.509.1594204045587; Wed, 08 Jul 2020 03:27:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594204045; cv=none; d=google.com; s=arc-20160816; b=EzC0lwOVeZtFN3dhPztOn9FCzv1Lzzzh5nsOyAzzSiLlSVtDzm1RGLHTy9w6i/2CAw kTbnEMNMKTP3VbceUkef8ZWtM4JflDC2O4ZhM3O283tVibT4CW6SCRBBuz/LAy9zfkUG xpsWlktq8EXp4kf3ZS8lDFkyukkL3iZ0Kd9dGp4GZfpxnkrSbLrlsUbFh+2Ux/7zDi0h lJjaZMzpjSLfFtgw9ScuGtNl2o2w2pK+ggcV+w8hErOl4YVyfHSNmyQ4ifIVxGrhR3ue JZ+4AqimZDF0CeoHoSvV38rR43S/VCLiQNXOrFCNGEgc7RMnOGMaVgbGYeS347aM0/yH Mo3Q== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=mGpJoK8jnr4yGkLu7VUyYT1BTy1ifzNRaja2IOEjAVQ=; b=acBoaAwFVrCLAC1XTeZ0bxWU0mf69uGbeaZwzcwg0J3O4hBlnglMrLd6TZWor5EfC+ EsPG9u6TQCY5V9m0zgc+A8hIdiu0Q0R+fTGP7nKRGcjpJ+JvTkHNfPpWlg688ETqidjP XUGc1RJIyHwG8nFtv6Fw6t9u9GObtl9nF7p2EKylbthlQy2o7sd6m0puXQUd7fsWgq2p hkTIcMHlz/e7Y46LysseZmkpEDr8cR+1nkMyKXZqyVWp6k2t8jcjhabQPRV/neRLgWvt Uawcs3PXyGKFB3D3zwaYuiC4/zIpbFB3DuUhNX+EQQvG9eissMJTMuKvCQXk1GTEMW/8 tZNg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BgDRDfxq; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id nw19si13376105ejb.264.2020.07.08.03.26.49; Wed, 08 Jul 2020 03:27:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=BgDRDfxq; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 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 S1728148AbgGHK0T (ORCPT + 99 others); Wed, 8 Jul 2020 06:26:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:33590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726110AbgGHK0S (ORCPT ); Wed, 8 Jul 2020 06:26:18 -0400 Received: from localhost.localdomain.com (unknown [151.48.133.17]) (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 61682206F6; Wed, 8 Jul 2020 10:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1594203978; bh=CUOXOWrfN1ofxpKkBuSS6kwoWfVGf956UrSH1W8mer8=; h=From:To:Cc:Subject:Date:From; b=BgDRDfxqGx5Sje4HsLPJmXsbohODCmijSt8KGe7emOGzXt4V6Ou7scSqKkQ8oLX8P wJafXqPPLWfkIgPow77uK6WT7xpSk7gNx9Oge0k8fqjIfpuRJ9UYX3itDGKJ4RgL2p ypH+i4UUm7nMI5taK3InS8MxPan3jrFV1bRb5EnI= From: Lorenzo Bianconi To: nbd@nbd.name Cc: linux-wireless@vger.kernel.org, lorenzo.bianconi@redhat.com, sean.wang@mediatek.com Subject: [PATCH] mt76: mt7615: always compile mt7615_mcu_set_bss_pm Date: Wed, 8 Jul 2020 12:26:11 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 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 Move mt7615_mcu_set_bss_pm out of CONFIG_PM in order to fix the following issue reported by kernel test robot ERROR: modpost: "mt7615_mcu_set_bss_pm" [drivers/net/wireless/mediatek/mt76/mt7615/mt7615-common.ko] undefined! Reported-by: kernel test robot Signed-off-by: Lorenzo Bianconi --- .../net/wireless/mediatek/mt76/mt7615/mcu.c | 68 +++++++++---------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c index b6f9eadb265a..d6bedc7eb726 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c @@ -3527,40 +3527,6 @@ int mt7615_mcu_apply_tx_dpd(struct mt7615_phy *phy) return ret; } -#ifdef CONFIG_PM -int mt7615_mcu_set_hif_suspend(struct mt7615_dev *dev, bool suspend) -{ - struct { - struct { - u8 hif_type; /* 0x0: HIF_SDIO - * 0x1: HIF_USB - * 0x2: HIF_PCIE - */ - u8 pad[3]; - } __packed hdr; - struct hif_suspend_tlv { - __le16 tag; - __le16 len; - u8 suspend; - } __packed hif_suspend; - } req = { - .hif_suspend = { - .tag = cpu_to_le16(0), /* 0: UNI_HIF_CTRL_BASIC */ - .len = cpu_to_le16(sizeof(struct hif_suspend_tlv)), - .suspend = suspend, - }, - }; - - if (mt76_is_mmio(&dev->mt76)) - req.hdr.hif_type = 2; - else if (mt76_is_usb(&dev->mt76)) - req.hdr.hif_type = 1; - - return __mt76_mcu_send_msg(&dev->mt76, MCU_UNI_CMD_HIF_CTRL, - &req, sizeof(req), true); -} -EXPORT_SYMBOL_GPL(mt7615_mcu_set_hif_suspend); - int mt7615_mcu_set_bss_pm(struct mt7615_dev *dev, struct ieee80211_vif *vif, bool enable) { @@ -3602,6 +3568,40 @@ int mt7615_mcu_set_bss_pm(struct mt7615_dev *dev, struct ieee80211_vif *vif, &req, sizeof(req), false); } +#ifdef CONFIG_PM +int mt7615_mcu_set_hif_suspend(struct mt7615_dev *dev, bool suspend) +{ + struct { + struct { + u8 hif_type; /* 0x0: HIF_SDIO + * 0x1: HIF_USB + * 0x2: HIF_PCIE + */ + u8 pad[3]; + } __packed hdr; + struct hif_suspend_tlv { + __le16 tag; + __le16 len; + u8 suspend; + } __packed hif_suspend; + } req = { + .hif_suspend = { + .tag = cpu_to_le16(0), /* 0: UNI_HIF_CTRL_BASIC */ + .len = cpu_to_le16(sizeof(struct hif_suspend_tlv)), + .suspend = suspend, + }, + }; + + if (mt76_is_mmio(&dev->mt76)) + req.hdr.hif_type = 2; + else if (mt76_is_usb(&dev->mt76)) + req.hdr.hif_type = 1; + + return __mt76_mcu_send_msg(&dev->mt76, MCU_UNI_CMD_HIF_CTRL, + &req, sizeof(req), true); +} +EXPORT_SYMBOL_GPL(mt7615_mcu_set_hif_suspend); + static int mt7615_mcu_set_wow_ctrl(struct mt7615_phy *phy, struct ieee80211_vif *vif, bool suspend, struct cfg80211_wowlan *wowlan) -- 2.26.2