diff options
author | Binoy Jayan <binoy.jayan@linaro.org> | 2016-06-15 11:00:34 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-06-25 14:39:53 -0700 |
commit | b27a6d5e636ac80b223a18ca2b3c892f1caef9e3 (patch) | |
tree | 5cad4443b8f278b9a6b2ad1cf1aa5446eb2cfa31 /drivers/staging/wilc1000/wilc_wlan.c | |
parent | b9811891a9f60ca9c314dcab3244c65930c4cf37 (diff) | |
download | op-kernel-dev-b27a6d5e636ac80b223a18ca2b3c892f1caef9e3.zip op-kernel-dev-b27a6d5e636ac80b223a18ca2b3c892f1caef9e3.tar.gz |
staging: wilc1000: Replace semaphore txq_event with completion
The semaphore 'txq_event' is used as completion, so convert it
to a struct completion type.
Signed-off-by: Binoy Jayan <binoy.jayan@linaro.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/wilc1000/wilc_wlan.c')
-rw-r--r-- | drivers/staging/wilc1000/wilc_wlan.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 11e16d5..1a57135 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -1,3 +1,4 @@ +#include <linux/completion.h> #include "wilc_wlan_if.h" #include "wilc_wlan.h" #include "wilc_wfi_netdevice.h" @@ -89,7 +90,7 @@ static void wilc_wlan_txq_add_to_tail(struct net_device *dev, spin_unlock_irqrestore(&wilc->txq_spinlock, flags); - up(&wilc->txq_event); + complete(&wilc->txq_event); } static int wilc_wlan_txq_add_to_head(struct wilc_vif *vif, @@ -119,7 +120,7 @@ static int wilc_wlan_txq_add_to_head(struct wilc_vif *vif, spin_unlock_irqrestore(&wilc->txq_spinlock, flags); up(&wilc->txq_add_to_head_cs); - up(&wilc->txq_event); + complete(&wilc->txq_event); return 0; } @@ -287,7 +288,8 @@ static int wilc_wlan_txq_filter_dup_tcp_ack(struct net_device *dev) spin_unlock_irqrestore(&wilc->txq_spinlock, wilc->txq_spinlock_flags); while (dropped > 0) { - wilc_lock_timeout(wilc, &wilc->txq_event, 1); + wait_for_completion_timeout(&wilc->txq_event, + msecs_to_jiffies(1)); dropped--; } |