diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/prism54/islpci_dev.c | 2 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_dev.h | 3 | ||||
-rw-r--r-- | drivers/net/wireless/prism54/islpci_mgt.c | 4 |
3 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/prism54/islpci_dev.c b/drivers/net/wireless/prism54/islpci_dev.c index 219dd651dc41..dbb538ccb4ec 100644 --- a/drivers/net/wireless/prism54/islpci_dev.c +++ b/drivers/net/wireless/prism54/islpci_dev.c | |||
@@ -861,7 +861,7 @@ islpci_setup(struct pci_dev *pdev) | |||
861 | init_waitqueue_head(&priv->reset_done); | 861 | init_waitqueue_head(&priv->reset_done); |
862 | 862 | ||
863 | /* init the queue read locks, process wait counter */ | 863 | /* init the queue read locks, process wait counter */ |
864 | sema_init(&priv->mgmt_sem, 1); | 864 | mutex_init(&priv->mgmt_lock); |
865 | priv->mgmt_received = NULL; | 865 | priv->mgmt_received = NULL; |
866 | init_waitqueue_head(&priv->mgmt_wqueue); | 866 | init_waitqueue_head(&priv->mgmt_wqueue); |
867 | sema_init(&priv->stats_sem, 1); | 867 | sema_init(&priv->stats_sem, 1); |
diff --git a/drivers/net/wireless/prism54/islpci_dev.h b/drivers/net/wireless/prism54/islpci_dev.h index 736666da6c24..4e0182ce835b 100644 --- a/drivers/net/wireless/prism54/islpci_dev.h +++ b/drivers/net/wireless/prism54/islpci_dev.h | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/wireless.h> | 26 | #include <linux/wireless.h> |
27 | #include <net/iw_handler.h> | 27 | #include <net/iw_handler.h> |
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/mutex.h> | ||
29 | 30 | ||
30 | #include "isl_38xx.h" | 31 | #include "isl_38xx.h" |
31 | #include "isl_oid.h" | 32 | #include "isl_oid.h" |
@@ -164,7 +165,7 @@ typedef struct { | |||
164 | wait_queue_head_t reset_done; | 165 | wait_queue_head_t reset_done; |
165 | 166 | ||
166 | /* used by islpci_mgt_transaction */ | 167 | /* used by islpci_mgt_transaction */ |
167 | struct semaphore mgmt_sem; /* serialize access to mailbox and wqueue */ | 168 | struct mutex mgmt_lock; /* serialize access to mailbox and wqueue */ |
168 | struct islpci_mgmtframe *mgmt_received; /* mbox for incoming frame */ | 169 | struct islpci_mgmtframe *mgmt_received; /* mbox for incoming frame */ |
169 | wait_queue_head_t mgmt_wqueue; /* waitqueue for mbox */ | 170 | wait_queue_head_t mgmt_wqueue; /* waitqueue for mbox */ |
170 | 171 | ||
diff --git a/drivers/net/wireless/prism54/islpci_mgt.c b/drivers/net/wireless/prism54/islpci_mgt.c index 2246f7930b4e..f7c677e2094d 100644 --- a/drivers/net/wireless/prism54/islpci_mgt.c +++ b/drivers/net/wireless/prism54/islpci_mgt.c | |||
@@ -460,7 +460,7 @@ islpci_mgt_transaction(struct net_device *ndev, | |||
460 | 460 | ||
461 | *recvframe = NULL; | 461 | *recvframe = NULL; |
462 | 462 | ||
463 | if (down_interruptible(&priv->mgmt_sem)) | 463 | if (mutex_lock_interruptible(&priv->mgmt_lock)) |
464 | return -ERESTARTSYS; | 464 | return -ERESTARTSYS; |
465 | 465 | ||
466 | prepare_to_wait(&priv->mgmt_wqueue, &wait, TASK_UNINTERRUPTIBLE); | 466 | prepare_to_wait(&priv->mgmt_wqueue, &wait, TASK_UNINTERRUPTIBLE); |
@@ -504,7 +504,7 @@ islpci_mgt_transaction(struct net_device *ndev, | |||
504 | /* TODO: we should reset the device here */ | 504 | /* TODO: we should reset the device here */ |
505 | out: | 505 | out: |
506 | finish_wait(&priv->mgmt_wqueue, &wait); | 506 | finish_wait(&priv->mgmt_wqueue, &wait); |
507 | up(&priv->mgmt_sem); | 507 | mutex_unlock(&priv->mgmt_lock); |
508 | return err; | 508 | return err; |
509 | } | 509 | } |
510 | 510 | ||