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
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
> 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
>