diff options
-rwxr-xr-x | drivers/net/wimax/cmc7xx/send.c | 12 | ||||
-rwxr-xr-x | drivers/net/wimax/cmc7xx/wimax_sdio.c | 6 | ||||
-rw-r--r-- | include/linux/wimax/samsung/wimax732.h | 2 |
3 files changed, 9 insertions, 11 deletions
diff --git a/drivers/net/wimax/cmc7xx/send.c b/drivers/net/wimax/cmc7xx/send.c index 63337bc..d997091 100755 --- a/drivers/net/wimax/cmc7xx/send.c +++ b/drivers/net/wimax/cmc7xx/send.c @@ -13,7 +13,6 @@ */ #include "headers.h" #include "download.h" -#include <linux/mutex.h> static int hw_sdio_write_bank_index(struct net_adapter *adapter, int *write_idx) { @@ -248,7 +247,7 @@ int cmc732_send_thread(void *data) if ((!adapter) || adapter->halted) break; - mutex_lock(&pdata->g_cfg->suspend_mutex); + wake_lock(&adapter->pdata->g_cfg->wimax_tx_lock); pdata->wakeup_assert(1); if ((pdata->g_cfg->wimax_status == WIMAX_STATE_IDLE || @@ -256,7 +255,8 @@ int cmc732_send_thread(void *data) && !pdata->is_modem_awake()) { if (hw_device_wakeup(adapter)) { reset_modem = true; - mutex_unlock(&pdata->g_cfg->suspend_mutex); + wake_unlock( + &adapter->pdata->g_cfg->wimax_tx_lock); break; } } @@ -271,19 +271,17 @@ int cmc732_send_thread(void *data) if (!bufdsc) { pr_debug("Fail...node is null"); - mutex_unlock(&pdata->g_cfg->suspend_mutex); + wake_unlock(&adapter->pdata->g_cfg->wimax_tx_lock); continue; } nRet = sd_send_data(adapter, bufdsc); pdata->wakeup_assert(0); - mutex_unlock(&pdata->g_cfg->suspend_mutex); kfree(bufdsc->buffer); kfree(bufdsc); + wake_unlock(&adapter->pdata->g_cfg->wimax_tx_lock); if (nRet != STATUS_SUCCESS) { pr_debug("SendData Fail******"); ++adapter->XmitErr; - reset_modem = true; - break; } } while (adapter); diff --git a/drivers/net/wimax/cmc7xx/wimax_sdio.c b/drivers/net/wimax/cmc7xx/wimax_sdio.c index 6113a4d..0d2f6a6 100755 --- a/drivers/net/wimax/cmc7xx/wimax_sdio.c +++ b/drivers/net/wimax/cmc7xx/wimax_sdio.c @@ -665,7 +665,6 @@ int wimax_suspend(struct platform_device *pdev, pm_message_t state) return 0; pdata = pdev->dev.platform_data; - mutex_lock(&pdata->g_cfg->suspend_mutex); /* AP active pin LOW */ pdata->signal_ap_active(0); @@ -699,7 +698,6 @@ int wimax_resume(struct platform_device *pdev) /* wait wakeup noti for 1 sec otherwise suspend again */ wake_lock_timeout(&pdata->g_cfg->wimax_wake_lock, 1 * HZ); - mutex_unlock(&pdata->g_cfg->suspend_mutex); return 0; } @@ -728,7 +726,6 @@ static int wimax_probe(struct platform_device *pdev) pr_debug("misc_register() failed"); return error; } - mutex_init(&pdata->g_cfg->suspend_mutex); for (i = 0; i < ARRAY_SIZE(adapter_table); i++) adapter_table[i].driver_data = @@ -749,6 +746,8 @@ static int wimax_probe(struct platform_device *pdev) WAKE_LOCK_SUSPEND, "wimax_wakeup"); wake_lock_init(&pdata->g_cfg->wimax_rxtx_lock, WAKE_LOCK_SUSPEND, "wimax_rxtx"); + wake_lock_init(&pdata->g_cfg->wimax_tx_lock, + WAKE_LOCK_SUSPEND, "wimax_tx"); return error; } @@ -761,6 +760,7 @@ static int wimax_remove(struct platform_device *pdev) /* destroy wake locks */ wake_lock_destroy(&pdata->g_cfg->wimax_wake_lock); wake_lock_destroy(&pdata->g_cfg->wimax_rxtx_lock); + wake_lock_destroy(&pdata->g_cfg->wimax_tx_lock); sdio_unregister_driver(&adapter_driver); misc_deregister(&pdata->swmxctl_dev); diff --git a/include/linux/wimax/samsung/wimax732.h b/include/linux/wimax/samsung/wimax732.h index 9219c98..4c647a7 100644 --- a/include/linux/wimax/samsung/wimax732.h +++ b/include/linux/wimax/samsung/wimax732.h @@ -50,7 +50,7 @@ struct wimax_cfg { int temp_tgid; /* handles unexpected close */ struct wake_lock wimax_wake_lock; /* resume wake lock */ struct wake_lock wimax_rxtx_lock;/* sdio wake lock */ - struct mutex suspend_mutex; + struct wake_lock wimax_tx_lock;/* sdio send lock*/ u8 wimax_status; u8 wimax_mode;/* wimax mode (SDIO, USB, etc..) */ u8 sleep_mode;/* suspend mode (0: VI, 1: IDLE) */ |