void\r
dhd_conf_wifi_power(bool on)\r
{\r
+ extern struct wl_priv *wlcfg_drv_priv;\r
printk("%s: Enter %d\n", __FUNCTION__, on);\r
if (on) {\r
wl_cfg80211_user_sync(true);\r
wl_android_wifi_on(g_netdev);\r
wl_cfg80211_send_disconnect();\r
- wl_cfgp2p_start_p2p_device(NULL, NULL);\r
+ if (wlcfg_drv_priv && wlcfg_drv_priv->p2p)\r
+ wl_cfgp2p_start_p2p_device(NULL, NULL);\r
+ else \r
+ printk("======= ON : no p2p ======\n");\r
wl_cfg80211_user_sync(false);\r
wifi_ready = true;\r
} else {\r
- extern struct wl_priv *wlcfg_drv_priv;\r
wifi_ready = false;\r
- wl_cfgp2p_clear_management_ie(wlcfg_drv_priv, 0);\r
- wl_cfgp2p_clear_management_ie(wlcfg_drv_priv, 1);\r
- wl_cfgp2p_stop_p2p_device(NULL, wlcfg_drv_priv->p2p_wdev);\r
+ if (wlcfg_drv_priv && wlcfg_drv_priv->p2p) {\r
+ wl_cfgp2p_clear_management_ie(wlcfg_drv_priv, 0);\r
+ wl_cfgp2p_clear_management_ie(wlcfg_drv_priv, 1);\r
+ wl_cfgp2p_stop_p2p_device(NULL, wlcfg_drv_priv->p2p_wdev);\r
+ } else \r
+ printk("======= OFF : no p2p ======\n");\r
dhd_conf_wifi_stop(g_netdev);\r
}\r
printk("%s: Exit %d\n", __FUNCTION__, on);\r
int ifidx = 0;
dhd_info_t *dhd = *(dhd_info_t **)netdev_priv(net);
DHD_OS_WAKE_LOCK(&dhd->pub);
- DHD_TRACE(("%s: Enter %p\n", __FUNCTION__, net));
+ DHD_ERROR(("%s: Enter %p\n", __FUNCTION__, net));
if (dhd->pub.up == 0) {
goto exit;
int ifidx;
int32 ret = 0;
+ DHD_ERROR(("%s: Enter %p\n", __FUNCTION__, net));
+
#if defined(MULTIPLE_SUPPLICANT)
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)) && 1 && 1
if (mutex_is_locked(&_dhd_sdio_mutex_lock_) != 0) {
};
#endif
+static void wl_wakelock_timeout(struct wl_priv *priv)
+{
+#if defined(CONFIG_HAS_WAKELOCK)
+ wake_lock_timeout(&priv->priv_lock, msecs_to_jiffies(20));
+#endif
+}
+
+
#define RETURN_EIO_IF_NOT_UP(wlpriv) \
do { \
struct net_device *checkSysUpNDev = wl_to_prmry_ndev(wlpriv); \
WL_INFO(("device is not ready\n")); \
return -EIO; \
} \
+ if (unlikely(!g_wifi_on)) { \
+ WL_ERR(("g_wifi_on is not ready\n")); \
+ return -EIO; \
+ } \
+ wl_wakelock_timeout(wlpriv); \
} while (0)
wl_init_prof(wl, ndev);
wl_link_down(wl);
DNGL_FUNC(dhd_cfg80211_init, (wl));
-
+#ifdef CONFIG_HAS_WAKELOCK
+ wake_lock_init(&wl->priv_lock, WAKE_LOCK_SUSPEND, "wlan_priv_wake");
+ printk("init wlan_priv_wake\n");
+#endif
return err;
}
wl_term_iscan(wl);
wl_deinit_priv_mem(wl);
unregister_netdevice_notifier(&wl_cfg80211_netdev_notifier);
+#ifdef CONFIG_HAS_WAKELOCK
+ wake_lock_destroy(&wl->priv_lock);
+#endif
}
#if defined(WL_ENABLE_P2P_IF)
#include <linux/wireless.h>
#include <net/cfg80211.h>
#include <linux/rfkill.h>
+#ifdef CONFIG_HAS_WAKELOCK
+#include <linux/wakelock.h>
+#endif
#include <wl_cfgp2p.h>
struct wl_scan_results *bss_list;
struct wl_scan_results *scan_results;
+#if defined(CONFIG_HAS_WAKELOCK)
+ struct wake_lock priv_lock;
+#endif
+
/* scan request object for internal purpose */
struct wl_scan_req *scan_req_int;
/* information element object for internal purpose */