rtl8188eu: Convert typedef for _mutex to struct mutex

This will break builds for kernels before mutexes were introduced. As this
is very early, it should not affect any modern users.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2013-07-24 14:00:39 -05:00
parent dfb5277a29
commit 73f9c27ffd
7 changed files with 12 additions and 17 deletions

View file

@ -205,7 +205,7 @@ struct dvobj_priv
int ep_num[5]; //endpoint number int ep_num[5]; //endpoint number
int RegUsbSS; int RegUsbSS;
_sema usb_suspend_sema; _sema usb_suspend_sema;
_mutex usb_vendor_req_mutex; struct mutex usb_vendor_req_mutex;
u8 * usb_alloc_vendor_req_buf; u8 * usb_alloc_vendor_req_buf;
u8 * usb_vendor_req_buf; u8 * usb_vendor_req_buf;
@ -332,7 +332,7 @@ struct _ADAPTER{
#endif #endif
_adapter *pbuddy_adapter; _adapter *pbuddy_adapter;
_mutex *hw_init_mutex; struct mutex *hw_init_mutex;
_lock br_ext_lock; _lock br_ext_lock;
struct nat25_network_db_entry *nethash[NAT25_HASH_SIZE]; struct nat25_network_db_entry *nethash[NAT25_HASH_SIZE];

View file

@ -46,7 +46,7 @@ A protection mechanism is necessary for the io_rwmem(read/write protocol)
Under Async. IRP (SDIO/USB) Under Async. IRP (SDIO/USB)
The protection mechanism is through the pending queue. 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 // when in USB, IO is through interrupt in/out endpoints
struct usb_device *udev; struct usb_device *udev;
struct urb * piorw_urb; struct urb * piorw_urb;

View file

@ -71,11 +71,6 @@
typedef struct semaphore _sema; typedef struct semaphore _sema;
typedef spinlock_t _lock; 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; typedef struct timer_list _timer;
struct __queue { struct __queue {
@ -168,7 +163,7 @@ __inline static void _exit_critical_bh(_lock *plock, unsigned long *pirqL)
spin_unlock_bh(plock); 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; int ret = 0;
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) #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)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
mutex_unlock(pmutex); 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_free_sema(_sema *sema);
extern void _rtw_up_sema(_sema *sema); extern void _rtw_up_sema(_sema *sema);
extern u32 _rtw_down_sema(_sema *sema); extern u32 _rtw_down_sema(_sema *sema);
extern void _rtw_mutex_init(_mutex *pmutex); extern void _rtw_mutex_init(struct mutex *pmutex);
extern void _rtw_mutex_free(_mutex *pmutex); extern void _rtw_mutex_free(struct mutex *pmutex);
extern void _rtw_spinlock_init(_lock *plock); extern void _rtw_spinlock_init(_lock *plock);
extern void _rtw_spinlock_free(_lock *plock); extern void _rtw_spinlock_free(_lock *plock);

View file

@ -24,7 +24,7 @@
#include <drv_types.h> #include <drv_types.h>
struct sreset_priv { struct sreset_priv {
_mutex silentreset_mutex; struct mutex silentreset_mutex;
u8 silent_reset_inprogress; u8 silent_reset_inprogress;
u8 Wifi_Error_Status; u8 Wifi_Error_Status;
unsigned long last_tx_time; unsigned long last_tx_time;

View file

@ -364,7 +364,7 @@ struct xmit_priv {
u16 nqos_ssn; u16 nqos_ssn;
int ack_tx; int ack_tx;
_mutex ack_tx_mutex; struct mutex ack_tx_mutex;
struct submit_ctx ack_tx_ops; struct submit_ctx ack_tx_ops;
}; };

View file

@ -199,7 +199,7 @@ u32 _rtw_down_sema(_sema *sema)
return _SUCCESS; return _SUCCESS;
} }
void _rtw_mutex_init(_mutex *pmutex) void _rtw_mutex_init(struct mutex *pmutex)
{ {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
mutex_init(pmutex); mutex_init(pmutex);
@ -208,7 +208,7 @@ void _rtw_mutex_init(_mutex *pmutex)
#endif #endif
} }
void _rtw_mutex_free(_mutex *pmutex) void _rtw_mutex_free(struct mutex *pmutex)
{ {
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37)) #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
mutex_destroy(pmutex); mutex_destroy(pmutex);

View file

@ -130,7 +130,7 @@ struct rtw_usb_drv {
struct usb_driver usbdrv; struct usb_driver usbdrv;
int drv_registered; int drv_registered;
_mutex hw_init_mutex; struct mutex hw_init_mutex;
}; };
static struct usb_device_id rtl8188e_usb_id_tbl[] ={ static struct usb_device_id rtl8188e_usb_id_tbl[] ={