Commit 1f3a8e09 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6

* 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (970 commits)
  staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_
  staging:iio: Trivial kconfig reorganization and uniformity improvements.
  staging:iio:documenation partial update.
  staging:iio: use pollfunc allocation helpers in remaining drivers.
  staging:iio:max1363 misc cleanups and use of for_each_bit_set to simplify event code spitting out.
  staging:iio: implement an iio_info structure to take some of the constant elements out of iio_dev.
  staging:iio:meter:ade7758: Use private data space from iio_allocate_device
  staging:iio:accel:lis3l02dq make write_reg_8 take value not a pointer to value.
  staging:iio: ring core cleanups + check if read_last available in lis3l02dq
  staging:iio:core cleanup: squash tiny wrappers and use dev_set_name to handle creation of event interface name.
  staging:iio: poll func allocation clean up.
  staging:iio:ad7780 trivial unused header cleanup.
  staging:iio:adc: AD7780: Use private data space from iio_allocate_device + trivial fixes
  staging:iio:adc:AD7780: Convert to new channel registration method
  staging:iio:adc: AD7606: Drop dev_data in favour of iio_priv()
  staging:iio:adc: AD7606: Consitently use indio_dev
  staging:iio: Rip out helper for software rings.
  staging:iio:adc:AD7298: Use private data space from iio_allocate_device
  staging:iio: rationalization of different buffer implementation hooks.
  staging:iio:imu:adis16400 avoid allocating rx, tx, and state separately from iio_dev.
  ...

Fix up trivial conflicts in
 - drivers/staging/intel_sst/intelmid.c: patches applied in both branches
 - drivers/staging/rt2860/common/cmm_data_{pci,usb}.c: removed vs spelling
 - drivers/staging/usbip/vhci_sysfs.c: trivial header file inclusion
parents c44dead7 1a4b6f66
......@@ -67,10 +67,6 @@ source "drivers/staging/echo/Kconfig"
source "drivers/staging/brcm80211/Kconfig"
source "drivers/staging/rt2860/Kconfig"
source "drivers/staging/rt2870/Kconfig"
source "drivers/staging/comedi/Kconfig"
source "drivers/staging/olpc_dcon/Kconfig"
......@@ -177,5 +173,9 @@ source "drivers/staging/gma500/Kconfig"
source "drivers/staging/altera-stapl/Kconfig"
source "drivers/staging/mei/Kconfig"
source "drivers/staging/nvec/Kconfig"
endif # !STAGING_EXCLUDE_BUILD
endif # STAGING
......@@ -12,13 +12,12 @@ obj-$(CONFIG_VIDEO_CX25821) += cx25821/
obj-$(CONFIG_VIDEO_TM6000) += tm6000/
obj-$(CONFIG_DVB_CXD2099) += cxd2099/
obj-$(CONFIG_LIRC_STAGING) += lirc/
obj-$(CONFIG_USB_IP_COMMON) += usbip/
obj-$(CONFIG_USBIP_CORE) += usbip/
obj-$(CONFIG_W35UND) += winbond/
obj-$(CONFIG_PRISM2_USB) += wlan-ng/
obj-$(CONFIG_ECHO) += echo/
obj-$(CONFIG_BRCM80211) += brcm80211/
obj-$(CONFIG_RT2860) += rt2860/
obj-$(CONFIG_RT2870) += rt2870/
obj-$(CONFIG_BRCMSMAC) += brcm80211/
obj-$(CONFIG_BRCMFMAC) += brcm80211/
obj-$(CONFIG_COMEDI) += comedi/
obj-$(CONFIG_FB_OLPC_DCON) += olpc_dcon/
obj-$(CONFIG_ASUS_OLED) += asus_oled/
......@@ -70,3 +69,5 @@ obj-$(CONFIG_ALTERA_STAPL) +=altera-stapl/
obj-$(CONFIG_TOUCHSCREEN_CLEARPAD_TM1217) += cptm1217/
obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += ste_rmi4/
obj-$(CONFIG_DRM_PSB) += gma500/
obj-$(CONFIG_INTEL_MEI) += mei/
obj-$(CONFIG_MFD_NVEC) += nvec/
......@@ -100,12 +100,6 @@ config AR600x_BT_RESET_PIN
help
WLAN GPIO to be used for resetting BT
config ATH6KL_CFG80211
bool "CFG80211 support"
depends on ATH6K_LEGACY && CFG80211
help
Enables support for CFG80211 APIs. The default option is to use WEXT. Even with this option enabled, WEXT is not explicitly disabled and the onus of not exercising WEXT lies on the application(s) running in the user space.
config ATH6KL_HTC_RAW_INTERFACE
bool "RAW HTC support"
depends on ATH6K_LEGACY
......
......@@ -29,26 +29,6 @@ ccflags-y += -I$(obj)/os
ccflags-y += -I$(obj)/bmi/include
ccflags-y += -I$(obj)/include/common/AR6002/hw4.0
ifeq ($(CONFIG_AR600x_SD31_XXX),y)
ccflags-y += -DAR600x_SD31_XXX
endif
ifeq ($(CONFIG_AR600x_WB31_XXX),y)
ccflags-y += -DAR600x_WB31_XXX
endif
ifeq ($(CONFIG_AR600x_SD32_XXX),y)
ccflags-y += -DAR600x_SD32_XXX
endif
ifeq ($(CONFIG_AR600x_CUSTOM_XXX),y)
ccflags-y += -DAR600x_CUSTOM_XXX
endif
ifeq ($(CONFIG_ATH6KL_ENABLE_COEXISTENCE),y)
ccflags-y += -DENABLE_COEXISTENCE
endif
ifeq ($(CONFIG_AR600x_DUAL_ANTENNA),y)
ccflags-y += -DAR600x_DUAL_ANTENNA
endif
......@@ -85,11 +65,6 @@ ifeq ($(CONFIG_ATH6KL_CONFIG_GPIO_BT_RESET),y)
ccflags-y += -DATH6KL_CONFIG_GPIO_BT_RESET
endif
ifeq ($(CONFIG_ATH6KL_CFG80211),y)
ccflags-y += -DATH6K_CONFIG_CFG80211
ath6kl-y += os/linux/cfg80211.o
endif
ifeq ($(CONFIG_ATH6KL_HTC_RAW_INTERFACE),y)
ccflags-y += -DHTC_RAW_INTERFACE
endif
......@@ -115,18 +90,8 @@ ifeq ($(CONFIG_ATH6KL_SKIP_ABI_VERSION_CHECK),y)
ccflags-y += -DATH6KL_SKIP_ABI_VERSION_CHECK
endif
ccflags-y += -DLINUX -DKERNEL_2_6
ccflags-y += -DTCMD
ccflags-y += -DSEND_EVENT_TO_APP
ccflags-y += -DUSER_KEYS
ccflags-y += -DNO_SYNC_FLUSH
ccflags-y += -DHTC_EP_STAT_PROFILING
ccflags-y += -DATH_AR6K_11N_SUPPORT
ccflags-y += -DWAPI_ENABLE
ccflags-y += -DCHECKSUM_OFFLOAD
ccflags-y += -DWLAN_HEADERS
ccflags-y += -DINIT_MODE_DRV_ENABLED
ccflags-y += -DBMIENABLE_SET
obj-$(CONFIG_ATH6K_LEGACY) := ath6kl.o
ath6kl-y += htc2/AR6000/ar6k.o
......@@ -136,14 +101,12 @@ ath6kl-y += htc2/htc_recv.o
ath6kl-y += htc2/htc_services.o
ath6kl-y += htc2/htc.o
ath6kl-y += bmi/src/bmi.o
ath6kl-y += os/linux/cfg80211.o
ath6kl-y += os/linux/ar6000_drv.o
ath6kl-y += os/linux/ar6000_raw_if.o
ath6kl-y += os/linux/ar6000_pm.o
ath6kl-y += os/linux/netbuf.o
ath6kl-y += os/linux/wireless_ext.o
ath6kl-y += os/linux/ioctl.o
ath6kl-y += os/linux/hci_bridge.o
ath6kl-y += os/linux/ar6k_pal.o
ath6kl-y += miscdrv/common_drv.o
ath6kl-y += miscdrv/credit_dist.o
ath6kl-y += wmi/wmi.o
......
......@@ -26,11 +26,10 @@
#include "a_config.h"
#include "athdefs.h"
#include "a_types.h"
#include "a_osapi.h"
#define ATH_MODULE_NAME bmi
#include "a_debug.h"
#include "AR6002/hw2.0/hw/mbox_host_reg.h"
#include "hw/mbox_host_reg.h"
#include "bmi_msg.h"
#define ATH_DEBUG_BMI ATH_DEBUG_MAKE_MODULE_MASK(0)
......
......@@ -95,12 +95,12 @@ void
BMICleanup(void)
{
if (pBMICmdCredits) {
A_FREE(pBMICmdCredits);
kfree(pBMICmdCredits);
pBMICmdCredits = NULL;
}
if (pBMICmdBuf) {
A_FREE(pBMICmdBuf);
kfree(pBMICmdBuf);
pBMICmdBuf = NULL;
}
}
......@@ -127,12 +127,12 @@ BMIDone(struct hif_device *device)
}
if (pBMICmdCredits) {
A_FREE(pBMICmdCredits);
kfree(pBMICmdCredits);
pBMICmdCredits = NULL;
}
if (pBMICmdBuf) {
A_FREE(pBMICmdBuf);
kfree(pBMICmdBuf);
pBMICmdBuf = NULL;
}
......
......@@ -27,7 +27,6 @@
#include "a_config.h"
#include "athdefs.h"
#include "a_types.h"
#include "a_osapi.h"
#include "hif.h"
#include "../../../common/hif_sdio_common.h"
......
......@@ -37,7 +37,7 @@
#include "hif_internal.h"
#define ATH_MODULE_NAME hif
#include "a_debug.h"
#include "AR6002/hw2.0/hw/mbox_host_reg.h"
#include "hw/mbox_host_reg.h"
#if HIF_USE_DMA_BOUNCE_BUFFER
/* macro to check if DMA buffer is WORD-aligned and DMA-able. Most host controllers assume the
......@@ -53,62 +53,189 @@
#if defined(CONFIG_PM)
#define dev_to_sdio_func(d) container_of(d, struct sdio_func, dev)
#define to_sdio_driver(d) container_of(d, struct sdio_driver, drv)
static int hifDeviceSuspend(struct device *dev);
static int hifDeviceResume(struct device *dev);
#endif /* CONFIG_PM */
static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id *id);
static void hifDeviceRemoved(struct sdio_func *func);
static struct hif_device *addHifDevice(struct sdio_func *func);
static struct hif_device *getHifDevice(struct sdio_func *func);
static void delHifDevice(struct hif_device * device);
static int Func0_CMD52WriteByte(struct mmc_card *card, unsigned int address, unsigned char byte);
static int Func0_CMD52ReadByte(struct mmc_card *card, unsigned int address, unsigned char *byte);
static int hifEnableFunc(struct hif_device *device, struct sdio_func *func);
static int hifDisableFunc(struct hif_device *device, struct sdio_func *func);
OSDRV_CALLBACKS osdrvCallbacks;
int reset_sdio_on_unload = 0;
module_param(reset_sdio_on_unload, int, 0644);
extern u32 nohifscattersupport;
static struct hif_device *ath6kl_alloc_hifdev(struct sdio_func *func)
{
struct hif_device *hifdevice;
/* ------ Static Variables ------ */
static const struct sdio_device_id ar6k_id_table[] = {
{ SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6002_BASE | 0x0)) },
{ SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6002_BASE | 0x1)) },
{ SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6003_BASE | 0x0)) },
{ SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6003_BASE | 0x1)) },
{ /* null */ },
};
MODULE_DEVICE_TABLE(sdio, ar6k_id_table);
hifdevice = kzalloc(sizeof(struct hif_device), GFP_KERNEL);
static struct sdio_driver ar6k_driver = {
.name = "ar6k_wlan",
.id_table = ar6k_id_table,
.probe = hifDeviceInserted,
.remove = hifDeviceRemoved,
#if HIF_USE_DMA_BOUNCE_BUFFER
hifdevice->dma_buffer = kmalloc(HIF_DMA_BUFFER_SIZE, GFP_KERNEL);
#endif
hifdevice->func = func;
hifdevice->powerConfig = HIF_DEVICE_POWER_UP;
sdio_set_drvdata(func, hifdevice);
return hifdevice;
}
static struct hif_device *ath6kl_get_hifdev(struct sdio_func *func)
{
return (struct hif_device *) sdio_get_drvdata(func);
}
static const struct sdio_device_id ath6kl_hifdev_ids[] = {
{ SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6002_BASE | 0x0)) },
{ SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6002_BASE | 0x1)) },
{ SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6003_BASE | 0x0)) },
{ SDIO_DEVICE(MANUFACTURER_CODE, (MANUFACTURER_ID_AR6003_BASE | 0x1)) },
{ /* null */ },
};
MODULE_DEVICE_TABLE(sdio, ath6kl_hifdev_ids);
static int ath6kl_hifdev_probe(struct sdio_func *func,
const struct sdio_device_id *id)
{
int ret;
struct hif_device *device;
int count;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE,
("ath6kl: Function: 0x%X, Vendor ID: 0x%X, "
"Device ID: 0x%X, block size: 0x%X/0x%X\n",
func->num, func->vendor, func->device,
func->max_blksize, func->cur_blksize));
ath6kl_alloc_hifdev(func);
device = ath6kl_get_hifdev(func);
device->id = id;
device->is_disabled = true;
spin_lock_init(&device->lock);
spin_lock_init(&device->asynclock);
DL_LIST_INIT(&device->ScatterReqHead);
/* Try to allow scatter unless globally overridden */
if (!nohifscattersupport)
device->scatter_enabled = true;
A_MEMZERO(device->busRequest, sizeof(device->busRequest));
for (count = 0; count < BUS_REQUEST_MAX_NUM; count++) {
sema_init(&device->busRequest[count].sem_req, 0);
hifFreeBusRequest(device, &device->busRequest[count]);
}
sema_init(&device->sem_async, 0);
ret = hifEnableFunc(device, func);
return ret;
}
static void ath6kl_hifdev_remove(struct sdio_func *func)
{
int status = 0;
struct hif_device *device;
device = ath6kl_get_hifdev(func);
if (device->claimedContext != NULL)
status = osdrvCallbacks.
deviceRemovedHandler(device->claimedContext, device);
if (device->is_disabled)
device->is_disabled = false;
else
status = hifDisableFunc(device, func);
CleanupHIFScatterResources(device);
delHifDevice(device);
}
#if defined(CONFIG_PM)
/* New suspend/resume based on linux-2.6.32
* Need to patch linux-2.6.32 with mmc2.6.32_suspend.patch
* Need to patch with msmsdcc2.6.29_suspend.patch for msm_sdcc host
*/
static struct dev_pm_ops ar6k_device_pm_ops = {
.suspend = hifDeviceSuspend,
.resume = hifDeviceResume,
static int ath6kl_hifdev_suspend(struct device *dev)
{
struct sdio_func *func = dev_to_sdio_func(dev);
int status = 0;
struct hif_device *device;
device = ath6kl_get_hifdev(func);
if (device && device->claimedContext &&
osdrvCallbacks.deviceSuspendHandler) {
/* set true first for PowerStateChangeNotify(..) */
device->is_suspend = true;
status = osdrvCallbacks.
deviceSuspendHandler(device->claimedContext);
if (status)
device->is_suspend = false;
}
CleanupHIFScatterResources(device);
switch (status) {
case 0:
return 0;
case A_EBUSY:
/* Hack for kernel in order to support deep sleep and wow */
return -EBUSY;
default:
return -1;
}
}
static int ath6kl_hifdev_resume(struct device *dev)
{
struct sdio_func *func = dev_to_sdio_func(dev);
int status = 0;
struct hif_device *device;
device = ath6kl_get_hifdev(func);
if (device && device->claimedContext &&
osdrvCallbacks.deviceSuspendHandler) {
status = osdrvCallbacks.
deviceResumeHandler(device->claimedContext);
if (status == 0)
device->is_suspend = false;
}
return status;
}
static const struct dev_pm_ops ath6kl_hifdev_pmops = {
.suspend = ath6kl_hifdev_suspend,
.resume = ath6kl_hifdev_resume,
};
#endif /* CONFIG_PM */
static struct sdio_driver ath6kl_hifdev_driver = {
.name = "ath6kl_hifdev",
.id_table = ath6kl_hifdev_ids,
.probe = ath6kl_hifdev_probe,
.remove = ath6kl_hifdev_remove,
#if defined(CONFIG_PM)
.drv = {
.pm = &ath6kl_hifdev_pmops,
},
#endif
};
/* make sure we only unregister when registered. */
static int registered = 0;
OSDRV_CALLBACKS osdrvCallbacks;
extern u32 onebitmode;
extern u32 busspeedlow;
extern u32 debughif;
static void ResetAllCards(void);
static int hifDisableFunc(struct hif_device *device, struct sdio_func *func);
static int hifEnableFunc(struct hif_device *device, struct sdio_func *func);
#ifdef DEBUG
......@@ -125,31 +252,22 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(hif,
/* ------ Functions ------ */
int HIFInit(OSDRV_CALLBACKS *callbacks)
{
int status;
AR_DEBUG_ASSERT(callbacks != NULL);
A_REGISTER_MODULE_DEBUG_INFO(hif);
int r;
AR_DEBUG_ASSERT(callbacks != NULL);
/* store the callback handlers */
osdrvCallbacks = *callbacks;
A_REGISTER_MODULE_DEBUG_INFO(hif);
/* Register with bus driver core */
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: HIFInit registering\n"));
registered = 1;
#if defined(CONFIG_PM)
if (callbacks->deviceSuspendHandler && callbacks->deviceResumeHandler) {
ar6k_driver.drv.pm = &ar6k_device_pm_ops;
}
#endif /* CONFIG_PM */
status = sdio_register_driver(&ar6k_driver);
AR_DEBUG_ASSERT(status==0);
/* store the callback handlers */
osdrvCallbacks = *callbacks;
if (status != 0) {
return A_ERROR;
}
/* Register with bus driver core */
registered = 1;
return 0;
r = sdio_register_driver(&ath6kl_hifdev_driver);
if (r < 0)
return r;
return 0;
}
static int
......@@ -763,7 +881,7 @@ HIFShutDownDevice(struct hif_device *device)
registered = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE,
("AR6000: Unregistering with the bus driver\n"));
sdio_unregister_driver(&ar6k_driver);
sdio_unregister_driver(&ath6kl_hifdev_driver);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE,
("AR6000: Unregistered\n"));
}
......@@ -778,7 +896,7 @@ hifIRQHandler(struct sdio_func *func)
struct hif_device *device;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifIRQHandler\n"));
device = getHifDevice(func);
device = ath6kl_get_hifdev(func);
atomic_set(&device->irqHandling, 1);
/* release the host during ints so we can pick it back up when we process cmds */
sdio_release_host(device->func);
......@@ -823,48 +941,6 @@ static int enable_task(void *param)
}
#endif
static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id *id)
{
int ret;
struct hif_device * device;
int count;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE,
("AR6000: hifDeviceInserted, Function: 0x%X, Vendor ID: 0x%X, Device ID: 0x%X, block size: 0x%X/0x%X\n",
func->num, func->vendor, func->device, func->max_blksize, func->cur_blksize));
addHifDevice(func);
device = getHifDevice(func);
device->id = id;
device->is_disabled = true;
spin_lock_init(&device->lock);
spin_lock_init(&device->asynclock);
DL_LIST_INIT(&device->ScatterReqHead);
if (!nohifscattersupport) {
/* try to allow scatter operation on all instances,
* unless globally overridden */
device->scatter_enabled = true;
}
/* Initialize the bus requests to be used later */
A_MEMZERO(device->busRequest, sizeof(device->busRequest));
for (count = 0; count < BUS_REQUEST_MAX_NUM; count ++) {
sema_init(&device->busRequest[count].sem_req, 0);
hifFreeBusRequest(device, &device->busRequest[count]);
}
sema_init(&device->sem_async, 0);
ret = hifEnableFunc(device, func);
return ret;
}
void
HIFAckInterrupt(struct hif_device *device)
{
......@@ -955,7 +1031,7 @@ static int hifDisableFunc(struct hif_device *device, struct sdio_func *func)
int status = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDisableFunc\n"));
device = getHifDevice(func);
device = ath6kl_get_hifdev(func);
if (!IS_ERR(device->async_task)) {
init_completion(&device->async_completion);
device->async_shutdown = 1;
......@@ -1004,7 +1080,7 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
int ret = 0;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifEnableFunc\n"));
device = getHifDevice(func);
device = ath6kl_get_hifdev(func);
if (device->is_disabled) {
/* enable the SDIO function */
......@@ -1016,7 +1092,7 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
if (ret) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("AR6000: failed to enable 4-bit ASYNC IRQ mode %d \n",ret));
sdio_release_host(func);
return A_ERROR;
return ret;
}
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: 4-bit ASYNC IRQ mode enabled\n"));
}
......@@ -1027,14 +1103,14 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), Unable to enable AR6K: 0x%X\n",
__FUNCTION__, ret));
sdio_release_host(func);
return A_ERROR;
return ret;
}
ret = sdio_set_block_size(func, HIF_MBOX_BLOCK_SIZE);
sdio_release_host(func);
if (ret) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), Unable to set block size 0x%x AR6K: 0x%X\n",
__FUNCTION__, HIF_MBOX_BLOCK_SIZE, ret));
return A_ERROR;
return ret;
}
device->is_disabled = false;
/* create async I/O thread */
......@@ -1045,7 +1121,7 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
"AR6K Async");
if (IS_ERR(device->async_task)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), to create async task\n", __FUNCTION__));
return A_ERROR;
return -ENOMEM;
}
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: start async task\n"));
wake_up_process(device->async_task );
......@@ -1060,14 +1136,14 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
} else {
taskFunc = enable_task;
taskName = "AR6K enable";
ret = A_PENDING;
ret = -ENOMEM;
#endif /* CONFIG_PM */
}
/* create resume thread */
pTask = kthread_create(taskFunc, (void *)device, taskName);
if (IS_ERR(pTask)) {
AR_DEBUG_PRINTF(ATH_DEBUG_ERROR, ("AR6000: %s(), to create enabel task\n", __FUNCTION__));
return A_ERROR;
return -ENOMEM;
}
wake_up_process(pTask);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifEnableFunc\n"));
......@@ -1076,79 +1152,6 @@ static int hifEnableFunc(struct hif_device *device, struct sdio_func *func)
return ret;
}
#if defined(CONFIG_PM)
static int hifDeviceSuspend(struct device *dev)
{
struct sdio_func *func=dev_to_sdio_func(dev);
int status = 0;
struct hif_device *device;
device = getHifDevice(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceSuspend\n"));
if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) {
device->is_suspend = true; /* set true first for PowerStateChangeNotify(..) */
status = osdrvCallbacks.deviceSuspendHandler(device->claimedContext);
if (status) {
device->is_suspend = false;
}
}
CleanupHIFScatterResources(device);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceSuspend\n"));