提交 e6856764 编写于 作者: J Justin P. Mattock 提交者: Greg Kroah-Hartman

staging: ath6kl Remove CONFIG_HAS_WAKELOCK

The patch below removes CONFIG_HAS_WAKELOCK since it is no longer in the kernel.
Please let me know, if this is the proper way of doing this and/or more needs
to be done..
Signed-off-by: NJustin P. Mattock <justinmattock@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 2ae44d64
...@@ -25,9 +25,6 @@ ...@@ -25,9 +25,6 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/fs.h> #include <linux/fs.h>
#ifdef CONFIG_HAS_WAKELOCK
#include <linux/wakelock.h>
#endif
#ifdef CONFIG_HAS_EARLYSUSPEND #ifdef CONFIG_HAS_EARLYSUSPEND
#include <linux/earlysuspend.h> #include <linux/earlysuspend.h>
#endif #endif
...@@ -44,11 +41,6 @@ extern int bmienable; ...@@ -44,11 +41,6 @@ extern int bmienable;
extern struct net_device *ar6000_devices[]; extern struct net_device *ar6000_devices[];
extern char ifname[]; extern char ifname[];
#ifdef CONFIG_HAS_WAKELOCK
extern struct wake_lock ar6k_wow_wake_lock;
struct wake_lock ar6k_init_wake_lock;
#endif
const char def_ifname[] = "wlan0"; const char def_ifname[] = "wlan0";
module_param_string(fwpath, fwpath, sizeof(fwpath), 0644); module_param_string(fwpath, fwpath, sizeof(fwpath), 0644);
module_param(enablelogcat, uint, 0644); module_param(enablelogcat, uint, 0644);
...@@ -280,14 +272,8 @@ void android_release_firmware(const struct firmware *firmware) ...@@ -280,14 +272,8 @@ void android_release_firmware(const struct firmware *firmware)
static A_STATUS ar6000_android_avail_ev(void *context, void *hif_handle) static A_STATUS ar6000_android_avail_ev(void *context, void *hif_handle)
{ {
A_STATUS ret; A_STATUS ret;
#ifdef CONFIG_HAS_WAKELOCK
wake_lock(&ar6k_init_wake_lock);
#endif
ar6000_enable_mmchost_detect_change(0); ar6000_enable_mmchost_detect_change(0);
ret = ar6000_avail_ev_p(context, hif_handle); ret = ar6000_avail_ev_p(context, hif_handle);
#ifdef CONFIG_HAS_WAKELOCK
wake_unlock(&ar6k_init_wake_lock);
#endif
return ret; return ret;
} }
...@@ -328,9 +314,6 @@ void android_module_init(OSDRV_CALLBACKS *osdrvCallbacks) ...@@ -328,9 +314,6 @@ void android_module_init(OSDRV_CALLBACKS *osdrvCallbacks)
bmienable = 1; bmienable = 1;
if (ifname[0] == '\0') if (ifname[0] == '\0')
strcpy(ifname, def_ifname); strcpy(ifname, def_ifname);
#ifdef CONFIG_HAS_WAKELOCK
wake_lock_init(&ar6k_init_wake_lock, WAKE_LOCK_SUSPEND, "ar6k_init");
#endif
#ifdef CONFIG_HAS_EARLYSUSPEND #ifdef CONFIG_HAS_EARLYSUSPEND
ar6k_early_suspend.suspend = android_early_suspend; ar6k_early_suspend.suspend = android_early_suspend;
ar6k_early_suspend.resume = android_late_resume; ar6k_early_suspend.resume = android_late_resume;
...@@ -348,9 +331,6 @@ void android_module_exit(void) ...@@ -348,9 +331,6 @@ void android_module_exit(void)
{ {
#ifdef CONFIG_HAS_EARLYSUSPEND #ifdef CONFIG_HAS_EARLYSUSPEND
unregister_early_suspend(&ar6k_early_suspend); unregister_early_suspend(&ar6k_early_suspend);
#endif
#ifdef CONFIG_HAS_WAKELOCK
wake_lock_destroy(&ar6k_init_wake_lock);
#endif #endif
ar6000_enable_mmchost_detect_change(1); ar6000_enable_mmchost_detect_change(1);
} }
...@@ -395,9 +375,6 @@ void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL i ...@@ -395,9 +375,6 @@ void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL i
} }
if (needWake) { if (needWake) {
/* keep host wake up if there is any event and packate comming in*/ /* keep host wake up if there is any event and packate comming in*/
#ifdef CONFIG_HAS_WAKELOCK
wake_lock_timeout(&ar6k_wow_wake_lock, 3*HZ);
#endif
if (wowledon) { if (wowledon) {
char buf[32]; char buf[32];
int len = sprintf(buf, "on"); int len = sprintf(buf, "on");
......
...@@ -30,23 +30,12 @@ ...@@ -30,23 +30,12 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include "wlan_config.h" #include "wlan_config.h"
#ifdef CONFIG_HAS_WAKELOCK
#include <linux/wakelock.h>
#endif
#define WOW_ENABLE_MAX_INTERVAL 0 #define WOW_ENABLE_MAX_INTERVAL 0
#define WOW_SET_SCAN_PARAMS 0 #define WOW_SET_SCAN_PARAMS 0
extern unsigned int wmitimeout; extern unsigned int wmitimeout;
extern wait_queue_head_t arEvent; extern wait_queue_head_t arEvent;
#ifdef CONFIG_PM
#ifdef CONFIG_HAS_WAKELOCK
struct wake_lock ar6k_suspend_wake_lock;
struct wake_lock ar6k_wow_wake_lock;
#endif
#endif /* CONFIG_PM */
#ifdef ANDROID_ENV #ifdef ANDROID_ENV
extern void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL isEvent); extern void android_ar6k_check_wow_status(AR_SOFTC_T *ar, struct sk_buff *skb, A_BOOL isEvent);
#endif #endif
...@@ -89,9 +78,6 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar) ...@@ -89,9 +78,6 @@ static void ar6000_wow_resume(AR_SOFTC_T *ar)
A_UINT16 bg_period = (ar->scParams.bg_period==0) ? 60 : ar->scParams.bg_period; A_UINT16 bg_period = (ar->scParams.bg_period==0) ? 60 : ar->scParams.bg_period;
WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {TRUE, FALSE}; WMI_SET_HOST_SLEEP_MODE_CMD hostSleepMode = {TRUE, FALSE};
ar->arWowState = WLAN_WOW_STATE_NONE; ar->arWowState = WLAN_WOW_STATE_NONE;
#ifdef CONFIG_HAS_WAKELOCK
wake_lock_timeout(&ar6k_wow_wake_lock, 3*HZ);
#endif
if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!=A_OK) { if (wmi_set_host_sleep_mode_cmd(ar->arWmi, &hostSleepMode)!=A_OK) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup restore host awake\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR,("Fail to setup restore host awake\n"));
} }
...@@ -267,9 +253,6 @@ A_STATUS ar6000_resume_ev(void *context) ...@@ -267,9 +253,6 @@ A_STATUS ar6000_resume_ev(void *context)
AR_SOFTC_T *ar = (AR_SOFTC_T *)context; AR_SOFTC_T *ar = (AR_SOFTC_T *)context;
A_UINT16 powerState = ar->arWlanPowerState; A_UINT16 powerState = ar->arWlanPowerState;
#ifdef CONFIG_HAS_WAKELOCK
wake_lock(&ar6k_suspend_wake_lock);
#endif
AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: enter previous state %d wowState %d\n", __func__, powerState, ar->arWowState)); AR_DEBUG_PRINTF(ATH_DEBUG_PM, ("%s: enter previous state %d wowState %d\n", __func__, powerState, ar->arWowState));
switch (powerState) { switch (powerState) {
case WLAN_POWER_STATE_WOW: case WLAN_POWER_STATE_WOW:
...@@ -287,9 +270,6 @@ A_STATUS ar6000_resume_ev(void *context) ...@@ -287,9 +270,6 @@ A_STATUS ar6000_resume_ev(void *context)
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Strange SDIO bus power mode!!\n")); AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Strange SDIO bus power mode!!\n"));
break; break;
} }
#ifdef CONFIG_HAS_WAKELOCK
wake_unlock(&ar6k_suspend_wake_lock);
#endif
return A_OK; return A_OK;
} }
...@@ -704,10 +684,6 @@ void ar6000_pm_init() ...@@ -704,10 +684,6 @@ void ar6000_pm_init()
{ {
A_REGISTER_MODULE_DEBUG_INFO(pm); A_REGISTER_MODULE_DEBUG_INFO(pm);
#ifdef CONFIG_PM #ifdef CONFIG_PM
#ifdef CONFIG_HAS_WAKELOCK
wake_lock_init(&ar6k_suspend_wake_lock, WAKE_LOCK_SUSPEND, "ar6k_suspend");
wake_lock_init(&ar6k_wow_wake_lock, WAKE_LOCK_SUSPEND, "ar6k_wow");
#endif
/* /*
* Register ar6000_pm_device into system. * Register ar6000_pm_device into system.
* We should also add platform_device into the first item of array * We should also add platform_device into the first item of array
...@@ -723,9 +699,5 @@ void ar6000_pm_exit() ...@@ -723,9 +699,5 @@ void ar6000_pm_exit()
{ {
#ifdef CONFIG_PM #ifdef CONFIG_PM
platform_driver_unregister(&ar6000_pm_device); platform_driver_unregister(&ar6000_pm_device);
#ifdef CONFIG_HAS_WAKELOCK
wake_lock_destroy(&ar6k_suspend_wake_lock);
wake_lock_destroy(&ar6k_wow_wake_lock);
#endif
#endif /* CONFIG_PM */ #endif /* CONFIG_PM */
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册