Commit 25f12201 authored by Adham Abozaeid's avatar Adham Abozaeid Committed by Greg Kroah-Hartman

staging: wilc1000: remove manual sleep mode

manual sleep mode was used to put the wilc1000 chip in sleep while in
disconnected state. This is taken care of in the firmware
Signed-off-by: default avatarAdham Abozaeid <adham.abozaeid@microchip.com>
Link: https://lore.kernel.org/r/20190725213125.2810-7-adham.abozaeid@microchip.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7e0cf3e3
...@@ -1056,13 +1056,9 @@ static void handle_scan_timer(struct work_struct *work) ...@@ -1056,13 +1056,9 @@ static void handle_scan_timer(struct work_struct *work)
static void handle_scan_complete(struct work_struct *work) static void handle_scan_complete(struct work_struct *work)
{ {
struct host_if_msg *msg = container_of(work, struct host_if_msg, work); struct host_if_msg *msg = container_of(work, struct host_if_msg, work);
struct wilc *wilc = msg->vif->wilc;
del_timer(&msg->vif->hif_drv->scan_timer); del_timer(&msg->vif->hif_drv->scan_timer);
if (!wilc_wlan_get_num_conn_ifcs(wilc))
wilc_chip_sleep_manually(wilc);
handle_scan_done(msg->vif, SCAN_EVENT_DONE); handle_scan_done(msg->vif, SCAN_EVENT_DONE);
kfree(msg); kfree(msg);
......
...@@ -193,9 +193,7 @@ static int wilc_sdio_suspend(struct device *dev) ...@@ -193,9 +193,7 @@ static int wilc_sdio_suspend(struct device *dev)
dev_info(dev, "sdio suspend\n"); dev_info(dev, "sdio suspend\n");
chip_wakeup(wilc); chip_wakeup(wilc);
if (!wilc->suspend_event) { if (wilc->suspend_event) {
wilc_chip_sleep_manually(wilc);
} else {
host_sleep_notify(wilc); host_sleep_notify(wilc);
chip_allow_sleep(wilc); chip_allow_sleep(wilc);
} }
......
...@@ -455,20 +455,6 @@ void chip_wakeup(struct wilc *wilc) ...@@ -455,20 +455,6 @@ void chip_wakeup(struct wilc *wilc)
} }
EXPORT_SYMBOL_GPL(chip_wakeup); EXPORT_SYMBOL_GPL(chip_wakeup);
void wilc_chip_sleep_manually(struct wilc *wilc)
{
if (wilc->chip_ps_state != WILC_CHIP_WAKEDUP)
return;
acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY);
chip_allow_sleep(wilc);
wilc->hif_func->hif_write_reg(wilc, 0x10a8, 1);
wilc->chip_ps_state = WILC_CHIP_SLEEPING_MANUAL;
release_bus(wilc, WILC_BUS_RELEASE_ONLY);
}
EXPORT_SYMBOL_GPL(wilc_chip_sleep_manually);
void host_wakeup_notify(struct wilc *wilc) void host_wakeup_notify(struct wilc *wilc)
{ {
acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY); acquire_bus(wilc, WILC_BUS_ACQUIRE_ONLY);
......
...@@ -293,8 +293,6 @@ int wilc_wlan_cfg_get(struct wilc_vif *vif, int start, u16 wid, int commit, ...@@ -293,8 +293,6 @@ int wilc_wlan_cfg_get(struct wilc_vif *vif, int start, u16 wid, int commit,
u32 drv_handler); u32 drv_handler);
int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer, int wilc_wlan_txq_add_mgmt_pkt(struct net_device *dev, void *priv, u8 *buffer,
u32 buffer_size, void (*func)(void *, int)); u32 buffer_size, void (*func)(void *, int));
void wilc_chip_sleep_manually(struct wilc *wilc);
void wilc_enable_tcp_ack_filter(struct wilc_vif *vif, bool value); void wilc_enable_tcp_ack_filter(struct wilc_vif *vif, bool value);
int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc); int wilc_wlan_get_num_conn_ifcs(struct wilc *wilc);
netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev); netdev_tx_t wilc_mac_xmit(struct sk_buff *skb, struct net_device *dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment