2020-07-08 10:27:25

by Lorenzo Bianconi

[permalink] [raw]
Subject: [PATCH] mt76: mt7615: always compile mt7615_mcu_set_bss_pm

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 <[email protected]>
Signed-off-by: Lorenzo Bianconi <[email protected]>
---
.../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


2020-07-14 08:42:06

by Kalle Valo

[permalink] [raw]
Subject: Re: [PATCH] mt76: mt7615: always compile mt7615_mcu_set_bss_pm

Lorenzo Bianconi <[email protected]> writes:

> 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 <[email protected]>
> Signed-off-by: Lorenzo Bianconi <[email protected]>

What commit caused this? Should this go to v5.8?

--
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches

2020-07-14 08:56:12

by Lorenzo Bianconi

[permalink] [raw]
Subject: Re: [PATCH] mt76: mt7615: always compile mt7615_mcu_set_bss_pm

> Lorenzo Bianconi <[email protected]> writes:
>
> > 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 <[email protected]>
> > Signed-off-by: Lorenzo Bianconi <[email protected]>
>
> What commit caused this? Should this go to v5.8?

Hi Kalle,

this is a fix for a commit in runtime-pm series
(https://patchwork.kernel.org/cover/11641171/). I posted a follow-up
patch and I did not put the fixes tag for this reason.
Next time I will add an explicit comment, sorry.

Regards,
Lorenzo

>
> --
> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
>


Attachments:
(No filename) (831.00 B)
signature.asc (235.00 B)
Download all attachments