diff --git a/include/drv_types.h b/include/drv_types.h index 6673408..68f937d 100644 --- a/include/drv_types.h +++ b/include/drv_types.h @@ -205,7 +205,7 @@ struct dvobj_priv int ep_num[5]; //endpoint number int RegUsbSS; _sema usb_suspend_sema; - _mutex usb_vendor_req_mutex; + struct mutex usb_vendor_req_mutex; u8 * usb_alloc_vendor_req_buf; u8 * usb_vendor_req_buf; @@ -332,7 +332,7 @@ struct _ADAPTER{ #endif _adapter *pbuddy_adapter; - _mutex *hw_init_mutex; + struct mutex *hw_init_mutex; _lock br_ext_lock; struct nat25_network_db_entry *nethash[NAT25_HASH_SIZE]; diff --git a/include/osdep_intf.h b/include/osdep_intf.h index 92d229c..f9b6296 100644 --- a/include/osdep_intf.h +++ b/include/osdep_intf.h @@ -46,7 +46,7 @@ A protection mechanism is necessary for the io_rwmem(read/write protocol) Under Async. IRP (SDIO/USB) The protection mechanism is through the pending queue. */ - _mutex ioctl_mutex; + struct mutex ioctl_mutex; // when in USB, IO is through interrupt in/out endpoints struct usb_device *udev; struct urb * piorw_urb; diff --git a/include/osdep_service.h b/include/osdep_service.h index 6bd4cbb..d49f04c 100644 --- a/include/osdep_service.h +++ b/include/osdep_service.h @@ -71,11 +71,6 @@ typedef struct semaphore _sema; typedef spinlock_t _lock; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) - typedef struct mutex _mutex; -#else - typedef struct semaphore _mutex; -#endif typedef struct timer_list _timer; struct __queue { @@ -168,7 +163,7 @@ __inline static void _exit_critical_bh(_lock *plock, unsigned long *pirqL) spin_unlock_bh(plock); } -__inline static int _enter_critical_mutex(_mutex *pmutex, unsigned long *pirqL) +__inline static int _enter_critical_mutex(struct mutex *pmutex, unsigned long *pirqL) { int ret = 0; #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) @@ -180,7 +175,7 @@ __inline static int _enter_critical_mutex(_mutex *pmutex, unsigned long *pirqL) } -__inline static void _exit_critical_mutex(_mutex *pmutex, unsigned long *pirqL) +__inline static void _exit_critical_mutex(struct mutex *pmutex, unsigned long *pirqL) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) mutex_unlock(pmutex); @@ -388,8 +383,8 @@ extern void _rtw_init_sema(_sema *sema, int init_val); extern void _rtw_free_sema(_sema *sema); extern void _rtw_up_sema(_sema *sema); extern u32 _rtw_down_sema(_sema *sema); -extern void _rtw_mutex_init(_mutex *pmutex); -extern void _rtw_mutex_free(_mutex *pmutex); +extern void _rtw_mutex_init(struct mutex *pmutex); +extern void _rtw_mutex_free(struct mutex *pmutex); extern void _rtw_spinlock_init(_lock *plock); extern void _rtw_spinlock_free(_lock *plock); diff --git a/include/rtw_sreset.h b/include/rtw_sreset.h index 1cbe3c5..c7a5474 100644 --- a/include/rtw_sreset.h +++ b/include/rtw_sreset.h @@ -24,7 +24,7 @@ #include struct sreset_priv { - _mutex silentreset_mutex; + struct mutex silentreset_mutex; u8 silent_reset_inprogress; u8 Wifi_Error_Status; unsigned long last_tx_time; diff --git a/include/rtw_xmit.h b/include/rtw_xmit.h index 5da135b..5e5fd50 100644 --- a/include/rtw_xmit.h +++ b/include/rtw_xmit.h @@ -364,7 +364,7 @@ struct xmit_priv { u16 nqos_ssn; int ack_tx; - _mutex ack_tx_mutex; + struct mutex ack_tx_mutex; struct submit_ctx ack_tx_ops; }; diff --git a/os_dep/osdep_service.c b/os_dep/osdep_service.c index 1996cec..e06b8fa 100644 --- a/os_dep/osdep_service.c +++ b/os_dep/osdep_service.c @@ -199,7 +199,7 @@ u32 _rtw_down_sema(_sema *sema) return _SUCCESS; } -void _rtw_mutex_init(_mutex *pmutex) +void _rtw_mutex_init(struct mutex *pmutex) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) mutex_init(pmutex); @@ -208,7 +208,7 @@ void _rtw_mutex_init(_mutex *pmutex) #endif } -void _rtw_mutex_free(_mutex *pmutex) +void _rtw_mutex_free(struct mutex *pmutex) { #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) mutex_destroy(pmutex); diff --git a/os_dep/usb_intf.c b/os_dep/usb_intf.c index 26bfadd..2409a89 100644 --- a/os_dep/usb_intf.c +++ b/os_dep/usb_intf.c @@ -130,7 +130,7 @@ struct rtw_usb_drv { struct usb_driver usbdrv; int drv_registered; - _mutex hw_init_mutex; + struct mutex hw_init_mutex; }; static struct usb_device_id rtl8188e_usb_id_tbl[] ={