Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 144763
b: refs/heads/master
c: 94c7f2d
h: refs/heads/master
i:
  144761: 53dd963
  144759: ead1744
v: v3
  • Loading branch information
Inaky Perez-Gonzalez committed May 6, 2009
1 parent 92842fb commit c3ee4c4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1a2627a29667fe7c4a9d06e1579a2d65bd39bba
refs/heads/master: 94c7f2d49521b0bb3ab91cbeb3518ac34355d47f
17 changes: 15 additions & 2 deletions trunk/net/wimax/stack.c
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,21 @@ void __wimax_state_change(struct wimax_dev *wimax_dev, enum wimax_st new_state)
*/
void wimax_state_change(struct wimax_dev *wimax_dev, enum wimax_st new_state)
{
/*
* A driver cannot take the wimax_dev out of the
* __WIMAX_ST_NULL state unless by calling wimax_dev_add(). If
* the wimax_dev's state is still NULL, we ignore any request
* to change its state because it means it hasn't been yet
* registered.
*
* There is no need to complain about it, as routines that
* call this might be shared from different code paths that
* are called before or after wimax_dev_add() has done its
* job.
*/
mutex_lock(&wimax_dev->mutex);
__wimax_state_change(wimax_dev, new_state);
if (wimax_dev->state > __WIMAX_ST_NULL)
__wimax_state_change(wimax_dev, new_state);
mutex_unlock(&wimax_dev->mutex);
return;
}
Expand Down Expand Up @@ -376,7 +389,7 @@ EXPORT_SYMBOL_GPL(wimax_state_get);
void wimax_dev_init(struct wimax_dev *wimax_dev)
{
INIT_LIST_HEAD(&wimax_dev->id_table_node);
__wimax_state_set(wimax_dev, WIMAX_ST_UNINITIALIZED);
__wimax_state_set(wimax_dev, __WIMAX_ST_NULL);
mutex_init(&wimax_dev->mutex);
mutex_init(&wimax_dev->mutex_reset);
}
Expand Down

0 comments on commit c3ee4c4

Please sign in to comment.