Skip to content

Commit

Permalink
mac80211: reduce station management complexity
Browse files Browse the repository at this point in the history
Now that IBSS no longer needs to insert stations
from atomic context, we can get rid of all the
special cases for that, and even get rid of the
sta_lock (though it needs to stay as tim_lock.)

This makes the station management code much more
straight-forward.

Signed-off-by: Johannes Berg <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
jmberg-intel authored and linvjw committed Dec 15, 2011
1 parent 8bf11d8 commit 4d33960
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 203 deletions.
11 changes: 4 additions & 7 deletions net/mac80211/ieee80211_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -855,18 +855,15 @@ struct ieee80211_local {

/* Station data */
/*
* The mutex only protects the list and counter,
* reads are done in RCU.
* Additionally, the lock protects the hash table,
* the pending list and each BSS's TIM bitmap.
* The mutex only protects the list, hash table and
* counter, reads are done with RCU.
*/
struct mutex sta_mtx;
spinlock_t sta_lock;
spinlock_t tim_lock;
unsigned long num_sta;
struct list_head sta_list, sta_pending_list;
struct list_head sta_list;
struct sta_info __rcu *sta_hash[STA_HASH_SIZE];
struct timer_list sta_cleanup;
struct work_struct sta_finish_work;
int sta_generation;

struct sk_buff_head pending[IEEE80211_MAX_QUEUES];
Expand Down
Loading

0 comments on commit 4d33960

Please sign in to comment.