#include <linux/fcntl.h>
#include <linux/fs.h>
#include <linux/uaccess.h>
-#include <linux/interrupt.h>
#include <linux/hardirq.h>
+#include <linux/mutex.h>
#include <net/cfg80211.h>
#include <defs.h>
#include <brcmu_utils.h>
/* OS/stack specifics */
struct brcmf_if *iflist[BRCMF_MAX_IFS];
- struct semaphore proto_sem;
+ struct mutex proto_block;
wait_queue_head_t ioctl_resp_wait;
/* Thread to issue ioctl for multicast */
goto fail;
net->netdev_ops = NULL;
- sema_init(&drvr_priv->proto_sem, 1);
+ mutex_init(&drvr_priv->proto_block);
/* Initialize other structure content */
init_waitqueue_head(&drvr_priv->ioctl_resp_wait);
struct brcmf_info *drvr_priv = drvr->info;
if (drvr_priv) {
- down(&drvr_priv->proto_sem);
+ mutex_lock(&drvr_priv->proto_block);
return 1;
}
return 0;
struct brcmf_info *drvr_priv = drvr->info;
if (drvr_priv) {
- up(&drvr_priv->proto_sem);
+ mutex_unlock(&drvr_priv->proto_block);
return 1;
}