diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2008-02-25 10:27:47 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-06 15:30:47 -0500 |
commit | 73651ee6396c499ccb59ebc84c9274db01ed026d (patch) | |
tree | 1d59027cbdaec732f3e1378770cbf7b42b48cd70 /net/mac80211/mesh.h | |
parent | d0709a65181beb787ef3f58cfe45536a2bb254c8 (diff) |
mac80211: split sta_info_add
sta_info_add() has two functions: allocating a station info
structure and inserting it into the hash table/list. Splitting
these two functions allows allocating with GFP_KERNEL in many
places instead of GFP_ATOMIC which is now required by the RCU
protection. Additionally, in many places RCU protection is now
no longer needed at all because between sta_info_alloc() and
sta_info_insert() the caller owns the structure.
This fixes a few race conditions with setting initial flags
and similar, but not all (see comments in ieee80211_sta.c and
cfg.c). More documentation on the existing races will be in
a follow-up patch.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/mesh.h')
-rw-r--r-- | net/mac80211/mesh.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index 576eee83d859..aee0b9eb36e3 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h | |||
@@ -232,8 +232,8 @@ void mesh_neighbour_update(u8 *hw_addr, u64 rates, struct net_device *dev, | |||
232 | bool mesh_peer_accepts_plinks(struct ieee802_11_elems *ie, | 232 | bool mesh_peer_accepts_plinks(struct ieee802_11_elems *ie, |
233 | struct net_device *dev); | 233 | struct net_device *dev); |
234 | void mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata); | 234 | void mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata); |
235 | struct sta_info *mesh_plink_add(u8 *hw_addr, u64 rates, | 235 | struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata, |
236 | struct ieee80211_sub_if_data *sdata); | 236 | u8 *hw_addr, u64 rates, gfp_t gfp); |
237 | void mesh_plink_broken(struct sta_info *sta); | 237 | void mesh_plink_broken(struct sta_info *sta); |
238 | void mesh_plink_deactivate(struct sta_info *sta); | 238 | void mesh_plink_deactivate(struct sta_info *sta); |
239 | int mesh_plink_open(struct sta_info *sta); | 239 | int mesh_plink_open(struct sta_info *sta); |