From: Amitkumar Karwar <[email protected]>
This function is generic. It doesn't contain wowlan specific code.
It should not be under CONFIG_PM. This patch resolves compilation
errors observed when CONFIG_PM flag is disabled.
Reported-by: kbuild test robot <[email protected]>
Fixes: ef71ed0608c ("rsi: sdio: Add WOWLAN support for S5 shutdown state")
Fixes: a24e35fcee0 ("rsi: sdio: Add WOWLAN support for S4 hibernate state")
Fixes: e1ced6422a3 ("rsi: sdio: add WOWLAN support for S3 suspend state")
Signed-off-by: Amitkumar Karwar <[email protected]>
---
drivers/net/wireless/rsi/rsi_91x_sdio.c | 52 ++++++++++++++++-----------------
drivers/net/wireless/rsi/rsi_sdio.h | 1 -
2 files changed, 26 insertions(+), 27 deletions(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_sdio.c b/drivers/net/wireless/rsi/rsi_91x_sdio.c
index 3288fb6..b0cf411 100644
--- a/drivers/net/wireless/rsi/rsi_91x_sdio.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio.c
@@ -871,6 +871,32 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
return status;
}
+static int rsi_sdio_reinit_device(struct rsi_hw *adapter)
+{
+ struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
+ struct sdio_func *pfunction = sdev->pfunction;
+ int ii;
+
+ for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
+ skb_queue_purge(&adapter->priv->tx_queue[ii]);
+
+ /* Initialize device again */
+ sdio_claim_host(pfunction);
+
+ sdio_release_irq(pfunction);
+ rsi_reset_card(pfunction);
+
+ sdio_enable_func(pfunction);
+ rsi_setupcard(adapter);
+ rsi_init_sdio_slave_regs(adapter);
+ sdio_claim_irq(pfunction, rsi_handle_interrupt);
+ rsi_hal_device_init(adapter);
+
+ sdio_release_host(pfunction);
+
+ return 0;
+}
+
static struct rsi_host_intf_ops sdio_host_intf_ops = {
.write_pkt = rsi_sdio_host_intf_write_pkt,
.read_pkt = rsi_sdio_host_intf_read_pkt,
@@ -1281,32 +1307,6 @@ static void rsi_shutdown(struct device *dev)
rsi_dbg(INFO_ZONE, "***** RSI module shut down *****\n");
}
-int rsi_sdio_reinit_device(struct rsi_hw *adapter)
-{
- struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
- struct sdio_func *pfunction = sdev->pfunction;
- int ii;
-
- for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
- skb_queue_purge(&adapter->priv->tx_queue[ii]);
-
- /* Initialize device again */
- sdio_claim_host(pfunction);
-
- sdio_release_irq(pfunction);
- rsi_reset_card(pfunction);
-
- sdio_enable_func(pfunction);
- rsi_setupcard(adapter);
- rsi_init_sdio_slave_regs(adapter);
- sdio_claim_irq(pfunction, rsi_handle_interrupt);
- rsi_hal_device_init(adapter);
-
- sdio_release_host(pfunction);
-
- return 0;
-}
-
static int rsi_restore(struct device *dev)
{
struct sdio_func *pfunction = dev_to_sdio_func(dev);
diff --git a/drivers/net/wireless/rsi/rsi_sdio.h b/drivers/net/wireless/rsi/rsi_sdio.h
index 8fbf90e..49c549b 100644
--- a/drivers/net/wireless/rsi/rsi_sdio.h
+++ b/drivers/net/wireless/rsi/rsi_sdio.h
@@ -131,5 +131,4 @@ int rsi_sdio_master_access_msword(struct rsi_hw *adapter, u16 ms_word);
void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit);
int rsi_sdio_determine_event_timeout(struct rsi_hw *adapter);
int rsi_sdio_check_buffer_status(struct rsi_hw *adapter, u8 q_num);
-int rsi_sdio_reinit_device(struct rsi_hw *adapter);
#endif
--
2.7.4
Amitkumar Karwar <[email protected]> wrote:
> From: Amitkumar Karwar <[email protected]>
>
> This function is generic. It doesn't contain wowlan specific code.
> It should not be under CONFIG_PM. This patch resolves compilation
> errors observed when CONFIG_PM flag is disabled.
>
> Reported-by: kbuild test robot <[email protected]>
> Fixes: ef71ed0608c ("rsi: sdio: Add WOWLAN support for S5 shutdown state")
> Fixes: a24e35fcee0 ("rsi: sdio: Add WOWLAN support for S4 hibernate state")
> Fixes: e1ced6422a3 ("rsi: sdio: add WOWLAN support for S3 suspend state")
> Signed-off-by: Amitkumar Karwar <[email protected]>
2 patches applied to wireless-drivers-next.git, thanks.
39f1332c526c rsi: move rsi_sdio_reinit_device() out of CONFIG_PM
e6b3b2ed3d27 rsi: fix kbuild reported build errors with CONFIG_PM off
--
https://patchwork.kernel.org/patch/10036297/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
From: Amitkumar Karwar <[email protected]>
Some wowlan related code was outside CONFIG_PM flag which caused these
build errors. They are fixed by moving that code under CONFIG_PM flag.
Reported-by: kbuild test robot <[email protected]>
Fixes: ef71ed0608c ("rsi: sdio: Add WOWLAN support for S5 shutdown state")
Fixes: a24e35fcee0 ("rsi: sdio: Add WOWLAN support for S4 hibernate state")
Fixes: e1ced6422a3 ("rsi: sdio: add WOWLAN support for S3 suspend state")
Signed-off-by: Amitkumar Karwar <[email protected]>
---
drivers/net/wireless/rsi/rsi_91x_mac80211.c | 5 ++++-
drivers/net/wireless/rsi/rsi_91x_mgmt.c | 2 ++
drivers/net/wireless/rsi/rsi_common.h | 2 ++
drivers/net/wireless/rsi/rsi_mgmt.h | 2 ++
4 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rsi/rsi_91x_mac80211.c b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
index 36c63e9..32f5cb4 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c
@@ -1752,6 +1752,7 @@ static int rsi_mac80211_cancel_roc(struct ieee80211_hw *hw)
return 0;
}
+#ifdef CONFIG_PM
static const struct wiphy_wowlan_support rsi_wowlan_support = {
.flags = WIPHY_WOWLAN_ANY |
WIPHY_WOWLAN_MAGIC_PKT |
@@ -1824,7 +1825,6 @@ int rsi_config_wowlan(struct rsi_hw *adapter, struct cfg80211_wowlan *wowlan)
}
EXPORT_SYMBOL(rsi_config_wowlan);
-#ifdef CONFIG_PM
static int rsi_mac80211_suspend(struct ieee80211_hw *hw,
struct cfg80211_wowlan *wowlan)
{
@@ -1977,7 +1977,10 @@ int rsi_mac80211_attach(struct rsi_common *common)
wiphy->features |= NL80211_FEATURE_INACTIVITY_TIMER;
wiphy->reg_notifier = rsi_reg_notify;
+#ifdef CONFIG_PM
wiphy->wowlan = &rsi_wowlan_support;
+#endif
+
wiphy_ext_feature_set(wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
/* Wi-Fi direct parameters */
diff --git a/drivers/net/wireless/rsi/rsi_91x_mgmt.c b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
index d38a09f..46c9d54 100644
--- a/drivers/net/wireless/rsi/rsi_91x_mgmt.c
+++ b/drivers/net/wireless/rsi/rsi_91x_mgmt.c
@@ -1597,6 +1597,7 @@ static int rsi_send_beacon(struct rsi_common *common)
return 0;
}
+#ifdef CONFIG_PM
int rsi_send_wowlan_request(struct rsi_common *common, u16 flags,
u16 sleep_status)
{
@@ -1630,6 +1631,7 @@ int rsi_send_wowlan_request(struct rsi_common *common, u16 flags,
return rsi_send_internal_mgmt_frame(common, skb);
}
+#endif
/**
* rsi_handle_ta_confirm_type() - This function handles the confirm frames.
diff --git a/drivers/net/wireless/rsi/rsi_common.h b/drivers/net/wireless/rsi/rsi_common.h
index 70b8b4b..d07dbba 100644
--- a/drivers/net/wireless/rsi/rsi_common.h
+++ b/drivers/net/wireless/rsi/rsi_common.h
@@ -83,7 +83,9 @@ u16 rsi_get_connected_channel(struct ieee80211_vif *vif);
struct rsi_hw *rsi_91x_init(void);
void rsi_91x_deinit(struct rsi_hw *adapter);
int rsi_read_pkt(struct rsi_common *common, s32 rcv_pkt_len);
+#ifdef CONFIG_PM
int rsi_config_wowlan(struct rsi_hw *adapter, struct cfg80211_wowlan *wowlan);
+#endif
struct rsi_sta *rsi_find_sta(struct rsi_common *common, u8 *mac_addr);
struct ieee80211_vif *rsi_get_vif(struct rsi_hw *adapter, u8 *mac);
void rsi_roc_timeout(struct timer_list *t);
diff --git a/drivers/net/wireless/rsi/rsi_mgmt.h b/drivers/net/wireless/rsi/rsi_mgmt.h
index 76337ce..389094a 100644
--- a/drivers/net/wireless/rsi/rsi_mgmt.h
+++ b/drivers/net/wireless/rsi/rsi_mgmt.h
@@ -668,8 +668,10 @@ int rsi_band_check(struct rsi_common *common, struct ieee80211_channel *chan);
int rsi_send_rx_filter_frame(struct rsi_common *common, u16 rx_filter_word);
int rsi_send_radio_params_update(struct rsi_common *common);
int rsi_set_antenna(struct rsi_common *common, u8 antenna);
+#ifdef CONFIG_PM
int rsi_send_wowlan_request(struct rsi_common *common, u16 flags,
u16 sleep_status);
+#endif
int rsi_send_ps_request(struct rsi_hw *adapter, bool enable,
struct ieee80211_vif *vif);
#endif
--
2.7.4