Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247104
b: refs/heads/master
c: f9f774c
h: refs/heads/master
v: v3
  • Loading branch information
Juuso Oikarinen authored and Luciano Coelho committed Apr 19, 2011
1 parent 09bfc6e commit 12578a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1d732e8cf3dcc09d7c862b6c12f876533529073d
refs/heads/master: f9f774c17e19da6f98bd7b57527f55d0ec920fce
7 changes: 7 additions & 0 deletions trunk/drivers/net/wireless/wl12xx/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,7 @@ static struct platform_device wl1271_device = {
},
};

static DEFINE_MUTEX(wl_list_mutex);
static LIST_HEAD(wl_list);

static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
Expand Down Expand Up @@ -369,10 +370,12 @@ static int wl1271_dev_notify(struct notifier_block *me, unsigned long what,
return NOTIFY_DONE;

wl_temp = hw->priv;
mutex_lock(&wl_list_mutex);
list_for_each_entry(wl, &wl_list, list) {
if (wl == wl_temp)
break;
}
mutex_unlock(&wl_list_mutex);
if (wl != wl_temp)
return NOTIFY_DONE;

Expand Down Expand Up @@ -1390,8 +1393,10 @@ static int wl1271_op_add_interface(struct ieee80211_hw *hw,
out:
mutex_unlock(&wl->mutex);

mutex_lock(&wl_list_mutex);
if (!ret)
list_add(&wl->list, &wl_list);
mutex_unlock(&wl_list_mutex);

return ret;
}
Expand All @@ -1404,7 +1409,9 @@ static void __wl1271_op_remove_interface(struct wl1271 *wl)

wl1271_info("down");

mutex_lock(&wl_list_mutex);
list_del(&wl->list);
mutex_unlock(&wl_list_mutex);

WARN_ON(wl->state != WL1271_STATE_ON);

Expand Down

0 comments on commit 12578a7

Please sign in to comment.