aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Walker <dwalker@mvista.com>2008-05-22 03:00:01 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-05-30 22:18:35 -0400
commit3700b62be8c97bec3eb10198d72edb745652cb70 (patch)
treea6bfb161ba3139a8c67bf8918e7469dac50c7163
parentd8b35fac8c7e1b44d873c1afcc5f88bc5ef4b361 (diff)
ps3: gelic: scan_lock semaphore to mutex
Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
-rw-r--r--drivers/net/ps3_gelic_wireless.c18
-rw-r--r--drivers/net/ps3_gelic_wireless.h2
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/net/ps3_gelic_wireless.c b/drivers/net/ps3_gelic_wireless.c
index 1dae1f2ed813..b338093a01e1 100644
--- a/drivers/net/ps3_gelic_wireless.c
+++ b/drivers/net/ps3_gelic_wireless.c
@@ -695,7 +695,7 @@ static int gelic_wl_get_scan(struct net_device *netdev,
695 unsigned long this_time = jiffies; 695 unsigned long this_time = jiffies;
696 696
697 pr_debug("%s: <-\n", __func__); 697 pr_debug("%s: <-\n", __func__);
698 if (down_interruptible(&wl->scan_lock)) 698 if (mutex_lock_interruptible(&wl->scan_lock))
699 return -EAGAIN; 699 return -EAGAIN;
700 700
701 switch (wl->scan_stat) { 701 switch (wl->scan_stat) {
@@ -733,7 +733,7 @@ static int gelic_wl_get_scan(struct net_device *netdev,
733 wrqu->data.length = ev - extra; 733 wrqu->data.length = ev - extra;
734 wrqu->data.flags = 0; 734 wrqu->data.flags = 0;
735out: 735out:
736 up(&wl->scan_lock); 736 mutex_unlock(&wl->scan_lock);
737 pr_debug("%s: -> %d %d\n", __func__, ret, wrqu->data.length); 737 pr_debug("%s: -> %d %d\n", __func__, ret, wrqu->data.length);
738 return ret; 738 return ret;
739} 739}
@@ -1554,7 +1554,7 @@ static int gelic_wl_start_scan(struct gelic_wl_info *wl, int always_scan)
1554 int ret = 0; 1554 int ret = 0;
1555 1555
1556 pr_debug("%s: <- always=%d\n", __func__, always_scan); 1556 pr_debug("%s: <- always=%d\n", __func__, always_scan);
1557 if (down_interruptible(&wl->scan_lock)) 1557 if (mutex_lock_interruptible(&wl->scan_lock))
1558 return -ERESTARTSYS; 1558 return -ERESTARTSYS;
1559 1559
1560 /* 1560 /*
@@ -1588,7 +1588,7 @@ static int gelic_wl_start_scan(struct gelic_wl_info *wl, int always_scan)
1588 } 1588 }
1589 kfree(cmd); 1589 kfree(cmd);
1590out: 1590out:
1591 up(&wl->scan_lock); 1591 mutex_unlock(&wl->scan_lock);
1592 pr_debug("%s: ->\n", __func__); 1592 pr_debug("%s: ->\n", __func__);
1593 return ret; 1593 return ret;
1594} 1594}
@@ -1610,7 +1610,7 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl)
1610 DECLARE_MAC_BUF(mac); 1610 DECLARE_MAC_BUF(mac);
1611 1611
1612 pr_debug("%s:start\n", __func__); 1612 pr_debug("%s:start\n", __func__);
1613 down(&wl->scan_lock); 1613 mutex_lock(&wl->scan_lock);
1614 1614
1615 if (wl->scan_stat != GELIC_WL_SCAN_STAT_SCANNING) { 1615 if (wl->scan_stat != GELIC_WL_SCAN_STAT_SCANNING) {
1616 /* 1616 /*
@@ -1727,7 +1727,7 @@ static void gelic_wl_scan_complete_event(struct gelic_wl_info *wl)
1727 NULL); 1727 NULL);
1728out: 1728out:
1729 complete(&wl->scan_done); 1729 complete(&wl->scan_done);
1730 up(&wl->scan_lock); 1730 mutex_unlock(&wl->scan_lock);
1731 pr_debug("%s:end\n", __func__); 1731 pr_debug("%s:end\n", __func__);
1732} 1732}
1733 1733
@@ -2282,7 +2282,7 @@ static void gelic_wl_assoc_worker(struct work_struct *work)
2282 wait_for_completion(&wl->scan_done); 2282 wait_for_completion(&wl->scan_done);
2283 2283
2284 pr_debug("%s: scan done\n", __func__); 2284 pr_debug("%s: scan done\n", __func__);
2285 down(&wl->scan_lock); 2285 mutex_lock(&wl->scan_lock);
2286 if (wl->scan_stat != GELIC_WL_SCAN_STAT_GOT_LIST) { 2286 if (wl->scan_stat != GELIC_WL_SCAN_STAT_GOT_LIST) {
2287 gelic_wl_send_iwap_event(wl, NULL); 2287 gelic_wl_send_iwap_event(wl, NULL);
2288 pr_info("%s: no scan list. association failed\n", __func__); 2288 pr_info("%s: no scan list. association failed\n", __func__);
@@ -2302,7 +2302,7 @@ static void gelic_wl_assoc_worker(struct work_struct *work)
2302 if (ret) 2302 if (ret)
2303 pr_info("%s: association failed %d\n", __func__, ret); 2303 pr_info("%s: association failed %d\n", __func__, ret);
2304scan_lock_out: 2304scan_lock_out:
2305 up(&wl->scan_lock); 2305 mutex_unlock(&wl->scan_lock);
2306out: 2306out:
2307 up(&wl->assoc_stat_lock); 2307 up(&wl->assoc_stat_lock);
2308} 2308}
@@ -2431,7 +2431,7 @@ static struct net_device *gelic_wl_alloc(struct gelic_card *card)
2431 2431
2432 INIT_DELAYED_WORK(&wl->event_work, gelic_wl_event_worker); 2432 INIT_DELAYED_WORK(&wl->event_work, gelic_wl_event_worker);
2433 INIT_DELAYED_WORK(&wl->assoc_work, gelic_wl_assoc_worker); 2433 INIT_DELAYED_WORK(&wl->assoc_work, gelic_wl_assoc_worker);
2434 init_MUTEX(&wl->scan_lock); 2434 mutex_init(&wl->scan_lock);
2435 init_MUTEX(&wl->assoc_stat_lock); 2435 init_MUTEX(&wl->assoc_stat_lock);
2436 2436
2437 init_completion(&wl->scan_done); 2437 init_completion(&wl->scan_done);
diff --git a/drivers/net/ps3_gelic_wireless.h b/drivers/net/ps3_gelic_wireless.h
index 103697166720..fb3222e8d3bb 100644
--- a/drivers/net/ps3_gelic_wireless.h
+++ b/drivers/net/ps3_gelic_wireless.h
@@ -241,7 +241,7 @@ enum gelic_wl_assoc_state {
241#define GELIC_WEP_KEYS 4 241#define GELIC_WEP_KEYS 4
242struct gelic_wl_info { 242struct gelic_wl_info {
243 /* bss list */ 243 /* bss list */
244 struct semaphore scan_lock; 244 struct mutex scan_lock;
245 struct list_head network_list; 245 struct list_head network_list;
246 struct list_head network_free_list; 246 struct list_head network_free_list;
247 struct gelic_wl_scan_info *networks; 247 struct gelic_wl_scan_info *networks;