aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/prism54/isl_ioctl.c10
-rw-r--r--drivers/net/wireless/prism54/islpci_dev.h2
2 files changed, 6 insertions, 6 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
2171static size_t 2171static 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
2196prism54_wpa_bss_ie_init(islpci_private *priv) 2196prism54_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
2202void 2202void
diff --git a/drivers/net/wireless/prism54/islpci_dev.h b/drivers/net/wireless/prism54/islpci_dev.h
index 85ddf89967af..8e55a5fcffae 100644
--- a/drivers/net/wireless/prism54/islpci_dev.h
+++ b/drivers/net/wireless/prism54/islpci_dev.h
@@ -178,7 +178,7 @@ typedef struct {
178 int wpa; /* WPA mode enabled */ 178 int wpa; /* WPA mode enabled */
179 struct list_head bss_wpa_list; 179 struct list_head bss_wpa_list;
180 int num_bss_wpa; 180 int num_bss_wpa;
181 struct semaphore wpa_sem; 181 struct mutex wpa_lock;
182 u8 wpa_ie[MAX_WPA_IE_LEN]; 182 u8 wpa_ie[MAX_WPA_IE_LEN];
183 size_t wpa_ie_len; 183 size_t wpa_ie_len;
184 184