Commit 34222e0a authored by Pekka Enberg's avatar Pekka Enberg Committed by Greg Kroah-Hartman

Staging: w35und: use msleep() and udelay()

This patch removes the OS_SLEEP() wrapper and changes the call-sites to use
msleep() and udelay() where appropriate.
Signed-off-by: default avatarPekka Enberg <penberg@cs.helsinki.fi>
Acked-by: default avatarPavel Machek <pavel@suse.cz>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 4fc838fe
......@@ -131,7 +131,7 @@ Wb35Reg_WriteSync( phw_data_t pHwData, u16 RegisterNo, u32 RegisterValue )
// 20060717.5 Wait until EP0VM stop
while (pWb35Reg->EP0vm_state != VM_STOP)
OS_SLEEP(10000);
msleep(10);
// Sync IoCallDriver
pWb35Reg->EP0vm_state = VM_RUNNING;
......@@ -294,7 +294,7 @@ Wb35Reg_ReadSync( phw_data_t pHwData, u16 RegisterNo, u32 * pRegisterValue )
// 20060717.5 Wait until EP0VM stop
while (pWb35Reg->EP0vm_state != VM_STOP)
OS_SLEEP(10000);
msleep(10);
pWb35Reg->EP0vm_state = VM_RUNNING;
ret = usb_control_msg( pHwData->WbUsb.udev,
......@@ -508,9 +508,9 @@ Wb35Reg_destroy(phw_data_t pHwData)
// Wait for Reg operation completed
do {
OS_SLEEP(10000); // Delay for waiting function enter 940623.1.a
msleep(10); // Delay for waiting function enter 940623.1.a
} while (pWb35Reg->EP0vm_state != VM_STOP);
OS_SLEEP(10000); // Delay for waiting function enter 940623.1.b
msleep(10); // Delay for waiting function enter 940623.1.b
// Release all the data in RegQueue
spin_lock_irq( &pWb35Reg->EP0VM_spin_lock );
......
......@@ -191,9 +191,9 @@ void Wb35Rx_destroy(phw_data_t pHwData)
PWB35RX pWb35Rx = &pHwData->Wb35Rx;
do {
OS_SLEEP(10000); // Delay for waiting function enter 940623.1.a
msleep(10); // Delay for waiting function enter 940623.1.a
} while (pWb35Rx->EP3vm_state != VM_STOP);
OS_SLEEP(10000); // Delay for waiting function exit 940623.1.b
msleep(10); // Delay for waiting function exit 940623.1.b
if (pWb35Rx->RxUrb)
usb_free_urb( pWb35Rx->RxUrb );
......
......@@ -175,9 +175,9 @@ void Wb35Tx_destroy(phw_data_t pHwData)
// Wait for VM stop
do {
OS_SLEEP(10000); // Delay for waiting function enter 940623.1.a
msleep(10); // Delay for waiting function enter 940623.1.a
} while( (pWb35Tx->EP2vm_state != VM_STOP) && (pWb35Tx->EP4vm_state != VM_STOP) );
OS_SLEEP(10000); // Delay for waiting function enter 940623.1.b
msleep(10); // Delay for waiting function enter 940623.1.b
if (pWb35Tx->Tx4Urb)
usb_free_urb( pWb35Tx->Tx4Urb );
......
......@@ -11,10 +11,6 @@
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#define OS_SLEEP( _MT ) { set_current_state(TASK_INTERRUPTIBLE); \
schedule_timeout( _MT*HZ/1000000 ); }
//---------------------------------------------------------------------------
// RW_CONTEXT --
//
......
......@@ -1075,7 +1075,7 @@ void _tx_iq_calibration_winbond(hw_data_t *phw_data)
//; [BB-chip]: Calibration (6h). Caculate TX-path IQ imbalance and setting TX path IQ compensation table
//phy_set_rf_data(phw_data, 3, (3<<24)|0x025586);
OS_SLEEP(30000); // 20060612.1.a 30ms delay. Add the follow 2 lines
msleep(30); // 20060612.1.a 30ms delay. Add the follow 2 lines
//To adjust TXVGA to fit iq_mag_0 range from 1250 ~ 1750
adjust_TXVGA_for_iq_mag( phw_data );
......@@ -1698,7 +1698,7 @@ unsigned char adjust_TXVGA_for_iq_mag(hw_data_t *phw_data)
phw_data->txvga_setting_for_cal = current_txvga;
//pa_stall_execution(30000);//Sleep(30);
OS_SLEEP(30000); // 20060612.1.a
msleep(30); // 20060612.1.a
if( !hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &reg_mode_ctrl) ) // 20060718.1 modify
return FALSE;
......@@ -1715,10 +1715,10 @@ unsigned char adjust_TXVGA_for_iq_mag(hw_data_t *phw_data)
PHY_DEBUG(("[CAL] MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
//pa_stall_execution(US);
OS_SLEEP(1); // 20060612.1.a
udelay(1); // 20060612.1.a
//pa_stall_execution(300);//Sleep(30);
OS_SLEEP(300); // 20060612.1.a
udelay(300); // 20060612.1.a
// b.
hw_get_dxx_reg(phw_data, REG_CALIB_READ1, &val);
......@@ -1726,7 +1726,7 @@ unsigned char adjust_TXVGA_for_iq_mag(hw_data_t *phw_data)
PHY_DEBUG(("[CAL] CALIB_READ1 = 0x%08X\n", val));
//pa_stall_execution(US);
//pa_stall_execution(300);//Sleep(30);
OS_SLEEP(300); // 20060612.1.a
udelay(300); // 20060612.1.a
iqcal_tone_i0 = _s13_to_s32(val & 0x00001FFF);
iqcal_tone_q0 = _s13_to_s32((val & 0x03FFE000) >> 13);
......
This diff is collapsed.
......@@ -80,7 +80,7 @@ void hal_halt(phw_data_t pHwData, void *ppa_data)
{
case 4:
case 3: OS_TIMER_CANCEL( &pHwData->LEDTimer, &cancel );
OS_SLEEP(100000); // Wait for Timer DPC exit 940623.2
msleep(100); // Wait for Timer DPC exit 940623.2
Wb35Rx_destroy( pHwData ); // Release the Rx
case 2: Wb35Tx_destroy( pHwData ); // Release the Tx
case 1: Wb35Reg_destroy( pHwData ); // Release the Wb35 Regisster resources
......
......@@ -128,7 +128,7 @@ WbWlanHalt( PADAPTER Adapter )
#ifdef _PE_USB_INI_DUMP_
WBDEBUG(("[w35und] Hal_stop O.K.\n"));
#endif
OS_SLEEP(100000);// Waiting Irp completed
msleep(100);// Waiting Irp completed
// Destroy the NDIS module
WBLINUX_Destroy( Adapter );
......@@ -238,7 +238,7 @@ WbWLanInitialize(PADAPTER Adapter)
// Waiting for HAL setting OK
while (!hal_idle(pHwData))
OS_SLEEP(10000);
msleep(10);
MTO_Init(Adapter);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment