diff options
Diffstat (limited to 'drivers/net/wimax/cmc7xx/send.c')
-rwxr-xr-x | drivers/net/wimax/cmc7xx/send.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wimax/cmc7xx/send.c b/drivers/net/wimax/cmc7xx/send.c index d997091..63337bc 100755 --- a/drivers/net/wimax/cmc7xx/send.c +++ b/drivers/net/wimax/cmc7xx/send.c @@ -13,6 +13,7 @@ */ #include "headers.h" #include "download.h" +#include <linux/mutex.h> static int hw_sdio_write_bank_index(struct net_adapter *adapter, int *write_idx) { @@ -247,7 +248,7 @@ int cmc732_send_thread(void *data) if ((!adapter) || adapter->halted) break; - wake_lock(&adapter->pdata->g_cfg->wimax_tx_lock); + mutex_lock(&pdata->g_cfg->suspend_mutex); pdata->wakeup_assert(1); if ((pdata->g_cfg->wimax_status == WIMAX_STATE_IDLE || @@ -255,8 +256,7 @@ int cmc732_send_thread(void *data) && !pdata->is_modem_awake()) { if (hw_device_wakeup(adapter)) { reset_modem = true; - wake_unlock( - &adapter->pdata->g_cfg->wimax_tx_lock); + mutex_unlock(&pdata->g_cfg->suspend_mutex); break; } } @@ -271,17 +271,19 @@ int cmc732_send_thread(void *data) if (!bufdsc) { pr_debug("Fail...node is null"); - wake_unlock(&adapter->pdata->g_cfg->wimax_tx_lock); + mutex_unlock(&pdata->g_cfg->suspend_mutex); 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); |