Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
unsigned long this_time = jiffies;
pr_debug("%s: <-\n", __func__);
unsigned long this_time = jiffies;
pr_debug("%s: <-\n", __func__);
- if (down_interruptible(&wl->scan_lock))
+ if (mutex_lock_interruptible(&wl->scan_lock))
return -EAGAIN;
switch (wl->scan_stat) {
return -EAGAIN;
switch (wl->scan_stat) {
wrqu->data.length = ev - extra;
wrqu->data.flags = 0;
out:
wrqu->data.length = ev - extra;
wrqu->data.flags = 0;
out:
+ mutex_unlock(&wl->scan_lock);
pr_debug("%s: -> %d %d\n", __func__, ret, wrqu->data.length);
return ret;
}
pr_debug("%s: -> %d %d\n", __func__, ret, wrqu->data.length);
return ret;
}
int ret = 0;
pr_debug("%s: <- always=%d\n", __func__, always_scan);
int ret = 0;
pr_debug("%s: <- always=%d\n", __func__, always_scan);
- if (down_interruptible(&wl->scan_lock))
+ if (mutex_lock_interruptible(&wl->scan_lock))
+ mutex_unlock(&wl->scan_lock);
pr_debug("%s: ->\n", __func__);
return ret;
}
pr_debug("%s: ->\n", __func__);
return ret;
}
DECLARE_MAC_BUF(mac);
pr_debug("%s:start\n", __func__);
DECLARE_MAC_BUF(mac);
pr_debug("%s:start\n", __func__);
+ mutex_lock(&wl->scan_lock);
if (wl->scan_stat != GELIC_WL_SCAN_STAT_SCANNING) {
/*
if (wl->scan_stat != GELIC_WL_SCAN_STAT_SCANNING) {
/*
NULL);
out:
complete(&wl->scan_done);
NULL);
out:
complete(&wl->scan_done);
+ mutex_unlock(&wl->scan_lock);
pr_debug("%s:end\n", __func__);
}
pr_debug("%s:end\n", __func__);
}
wait_for_completion(&wl->scan_done);
pr_debug("%s: scan done\n", __func__);
wait_for_completion(&wl->scan_done);
pr_debug("%s: scan done\n", __func__);
+ mutex_lock(&wl->scan_lock);
if (wl->scan_stat != GELIC_WL_SCAN_STAT_GOT_LIST) {
gelic_wl_send_iwap_event(wl, NULL);
pr_info("%s: no scan list. association failed\n", __func__);
if (wl->scan_stat != GELIC_WL_SCAN_STAT_GOT_LIST) {
gelic_wl_send_iwap_event(wl, NULL);
pr_info("%s: no scan list. association failed\n", __func__);
if (ret)
pr_info("%s: association failed %d\n", __func__, ret);
scan_lock_out:
if (ret)
pr_info("%s: association failed %d\n", __func__, ret);
scan_lock_out:
+ mutex_unlock(&wl->scan_lock);
out:
up(&wl->assoc_stat_lock);
}
out:
up(&wl->assoc_stat_lock);
}
INIT_DELAYED_WORK(&wl->event_work, gelic_wl_event_worker);
INIT_DELAYED_WORK(&wl->assoc_work, gelic_wl_assoc_worker);
INIT_DELAYED_WORK(&wl->event_work, gelic_wl_event_worker);
INIT_DELAYED_WORK(&wl->assoc_work, gelic_wl_assoc_worker);
- init_MUTEX(&wl->scan_lock);
+ mutex_init(&wl->scan_lock);
init_MUTEX(&wl->assoc_stat_lock);
init_completion(&wl->scan_done);
init_MUTEX(&wl->assoc_stat_lock);
init_completion(&wl->scan_done);
#define GELIC_WEP_KEYS 4
struct gelic_wl_info {
/* bss list */
#define GELIC_WEP_KEYS 4
struct gelic_wl_info {
/* bss list */
- struct semaphore scan_lock;
+ struct mutex scan_lock;
struct list_head network_list;
struct list_head network_free_list;
struct gelic_wl_scan_info *networks;
struct list_head network_list;
struct list_head network_free_list;
struct gelic_wl_scan_info *networks;