diff options
author | Matthias Kaehlcke <matthias@kaehlcke.net> | 2008-02-15 14:57:07 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:17 -0500 |
commit | f948db5de53ec49ede377df30eed0642cc213055 (patch) | |
tree | abe6fda51314108c9e78c6189dcbc9eb9d157d5b /drivers/net/wireless/prism54/isl_ioctl.c | |
parent | f8139218b32e9a68fc6779fa0ce45c5078c23c8a (diff) |
prism54: Convert wpa_sem in a mutex
The semaphore wpa_sem is used as mutex, convert it to the mutex API
Signed-off-by: Matthias Kaehlcke <matthias@kaehlcke.net>
Acked-by: Luis R. Rodriguez <mcgrof@winlab.rutgers.edu>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/prism54/isl_ioctl.c')
-rw-r--r-- | drivers/net/wireless/prism54/isl_ioctl.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/prism54/isl_ioctl.c b/drivers/net/wireless/prism54/isl_ioctl.c index 3fb6a7b54038..2d91a56d6a39 100644 --- a/drivers/net/wireless/prism54/isl_ioctl.c +++ b/drivers/net/wireless/prism54/isl_ioctl.c | |||
@@ -2114,7 +2114,7 @@ prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid, | |||
2114 | if (wpa_ie_len > MAX_WPA_IE_LEN) | 2114 | if (wpa_ie_len > MAX_WPA_IE_LEN) |
2115 | wpa_ie_len = MAX_WPA_IE_LEN; | 2115 | wpa_ie_len = MAX_WPA_IE_LEN; |
2116 | 2116 | ||
2117 | down(&priv->wpa_sem); | 2117 | mutex_lock(&priv->wpa_lock); |
2118 | 2118 | ||
2119 | /* try to use existing entry */ | 2119 | /* try to use existing entry */ |
2120 | list_for_each(ptr, &priv->bss_wpa_list) { | 2120 | list_for_each(ptr, &priv->bss_wpa_list) { |
@@ -2165,7 +2165,7 @@ prism54_wpa_bss_ie_add(islpci_private *priv, u8 *bssid, | |||
2165 | kfree(bss); | 2165 | kfree(bss); |
2166 | } | 2166 | } |
2167 | 2167 | ||
2168 | up(&priv->wpa_sem); | 2168 | mutex_unlock(&priv->wpa_lock); |
2169 | } | 2169 | } |
2170 | 2170 | ||
2171 | static size_t | 2171 | static size_t |
@@ -2175,7 +2175,7 @@ prism54_wpa_bss_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie) | |||
2175 | struct islpci_bss_wpa_ie *bss = NULL; | 2175 | struct islpci_bss_wpa_ie *bss = NULL; |
2176 | size_t len = 0; | 2176 | size_t len = 0; |
2177 | 2177 | ||
2178 | down(&priv->wpa_sem); | 2178 | mutex_lock(&priv->wpa_lock); |
2179 | 2179 | ||
2180 | list_for_each(ptr, &priv->bss_wpa_list) { | 2180 | list_for_each(ptr, &priv->bss_wpa_list) { |
2181 | bss = list_entry(ptr, struct islpci_bss_wpa_ie, list); | 2181 | bss = list_entry(ptr, struct islpci_bss_wpa_ie, list); |
@@ -2187,7 +2187,7 @@ prism54_wpa_bss_ie_get(islpci_private *priv, u8 *bssid, u8 *wpa_ie) | |||
2187 | len = bss->wpa_ie_len; | 2187 | len = bss->wpa_ie_len; |
2188 | memcpy(wpa_ie, bss->wpa_ie, len); | 2188 | memcpy(wpa_ie, bss->wpa_ie, len); |
2189 | } | 2189 | } |
2190 | up(&priv->wpa_sem); | 2190 | mutex_unlock(&priv->wpa_lock); |
2191 | 2191 | ||
2192 | return len; | 2192 | return len; |
2193 | } | 2193 | } |
@@ -2196,7 +2196,7 @@ void | |||
2196 | prism54_wpa_bss_ie_init(islpci_private *priv) | 2196 | prism54_wpa_bss_ie_init(islpci_private *priv) |
2197 | { | 2197 | { |
2198 | INIT_LIST_HEAD(&priv->bss_wpa_list); | 2198 | INIT_LIST_HEAD(&priv->bss_wpa_list); |
2199 | sema_init(&priv->wpa_sem, 1); | 2199 | mutex_init(&priv->wpa_lock); |
2200 | } | 2200 | } |
2201 | 2201 | ||
2202 | void | 2202 | void |