1
0
mirror of https://github.com/aircrack-ng/rtl8812au.git synced 2024-11-22 21:34:37 +00:00

Remove more Windows code

This commit is contained in:
kimocoder 2022-06-06 03:31:23 +02:00
parent 3b0cdfc23e
commit 9590d7e626

View File

@ -1212,11 +1212,6 @@ void _rtw_init_sema(_sema *sema, int init_val)
#ifdef PLATFORM_FREEBSD #ifdef PLATFORM_FREEBSD
sema_init(sema, init_val, "rtw_drv"); sema_init(sema, init_val, "rtw_drv");
#endif #endif
#ifdef PLATFORM_OS_XP
KeInitializeSemaphore(sema, init_val, SEMA_UPBND); /* count=0; */
#endif
#ifdef PLATFORM_OS_CE #ifdef PLATFORM_OS_CE
if (*sema == NULL) if (*sema == NULL)
@ -1247,11 +1242,6 @@ void _rtw_up_sema(_sema *sema)
#ifdef PLATFORM_FREEBSD #ifdef PLATFORM_FREEBSD
sema_post(sema); sema_post(sema);
#endif #endif
#ifdef PLATFORM_OS_XP
KeReleaseSemaphore(sema, IO_NETWORK_INCREMENT, 1, FALSE);
#endif
#ifdef PLATFORM_OS_CE #ifdef PLATFORM_OS_CE
ReleaseSemaphore(*sema, 1, NULL); ReleaseSemaphore(*sema, 1, NULL);
@ -1273,13 +1263,6 @@ u32 _rtw_down_sema(_sema *sema)
sema_wait(sema); sema_wait(sema);
return _SUCCESS; return _SUCCESS;
#endif #endif
#ifdef PLATFORM_OS_XP
if (STATUS_SUCCESS == KeWaitForSingleObject(sema, Executive, KernelMode, TRUE, NULL))
return _SUCCESS;
else
return _FAIL;
#endif
#ifdef PLATFORM_OS_CE #ifdef PLATFORM_OS_CE
if (WAIT_OBJECT_0 == WaitForSingleObject(*sema, INFINITE)) if (WAIT_OBJECT_0 == WaitForSingleObject(*sema, INFINITE))
@ -1310,10 +1293,6 @@ inline void kthread_thread_exit(_completion *comp)
#ifdef PLATFORM_OS_CE #ifdef PLATFORM_OS_CE
ExitThread(STATUS_SUCCESS); ExitThread(STATUS_SUCCESS);
#endif #endif
#ifdef PLATFORM_OS_XP
PsTerminateSystemThread(STATUS_SUCCESS);
#endif
} }
inline void _rtw_init_completion(_completion *comp) inline void _rtw_init_completion(_completion *comp)
@ -1349,11 +1328,6 @@ void _rtw_mutex_init(_mutex *pmutex)
#ifdef PLATFORM_FREEBSD #ifdef PLATFORM_FREEBSD
mtx_init(pmutex, "", NULL, MTX_DEF | MTX_RECURSE); mtx_init(pmutex, "", NULL, MTX_DEF | MTX_RECURSE);
#endif #endif
#ifdef PLATFORM_OS_XP
KeInitializeMutex(pmutex, 0);
#endif
#ifdef PLATFORM_OS_CE #ifdef PLATFORM_OS_CE
*pmutex = CreateMutex(NULL, _FALSE, NULL); *pmutex = CreateMutex(NULL, _FALSE, NULL);
@ -1376,10 +1350,6 @@ void _rtw_mutex_free(_mutex *pmutex)
#endif #endif
#ifdef PLATFORM_OS_XP
#endif
#ifdef PLATFORM_OS_CE #ifdef PLATFORM_OS_CE
#endif #endif
@ -1396,11 +1366,6 @@ void _rtw_spinlock_init(_lock *plock)
#ifdef PLATFORM_FREEBSD #ifdef PLATFORM_FREEBSD
mtx_init(plock, "", NULL, MTX_DEF | MTX_RECURSE); mtx_init(plock, "", NULL, MTX_DEF | MTX_RECURSE);
#endif #endif
#ifdef PLATFORM_WINDOWS
NdisAllocateSpinLock(plock);
#endif
} }
@ -1410,12 +1375,6 @@ void _rtw_spinlock_free(_lock *plock)
mtx_destroy(plock); mtx_destroy(plock);
#endif #endif
#ifdef PLATFORM_WINDOWS
NdisFreeSpinLock(plock);
#endif
} }
#ifdef PLATFORM_FREEBSD #ifdef PLATFORM_FREEBSD
extern PADAPTER prtw_lock; extern PADAPTER prtw_lock;
@ -1449,11 +1408,6 @@ void _rtw_spinlock(_lock *plock)
#ifdef PLATFORM_FREEBSD #ifdef PLATFORM_FREEBSD
mtx_lock(plock); mtx_lock(plock);
#endif #endif
#ifdef PLATFORM_WINDOWS
NdisAcquireSpinLock(plock);
#endif
} }
@ -1468,11 +1422,6 @@ void _rtw_spinunlock(_lock *plock)
#ifdef PLATFORM_FREEBSD #ifdef PLATFORM_FREEBSD
mtx_unlock(plock); mtx_unlock(plock);
#endif #endif
#ifdef PLATFORM_WINDOWS
NdisReleaseSpinLock(plock);
#endif
} }
@ -1487,11 +1436,6 @@ void _rtw_spinlock_ex(_lock *plock)
#ifdef PLATFORM_FREEBSD #ifdef PLATFORM_FREEBSD
mtx_lock(plock); mtx_lock(plock);
#endif #endif
#ifdef PLATFORM_WINDOWS
NdisDprAcquireSpinLock(plock);
#endif
} }