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>
This commit is contained in:
committed by
John W. Linville
parent
d0709a6518
commit
73651ee639
@@ -232,8 +232,8 @@ void mesh_neighbour_update(u8 *hw_addr, u64 rates, struct net_device *dev,
|
||||
bool mesh_peer_accepts_plinks(struct ieee802_11_elems *ie,
|
||||
struct net_device *dev);
|
||||
void mesh_accept_plinks_update(struct ieee80211_sub_if_data *sdata);
|
||||
struct sta_info *mesh_plink_add(u8 *hw_addr, u64 rates,
|
||||
struct ieee80211_sub_if_data *sdata);
|
||||
struct sta_info *mesh_plink_alloc(struct ieee80211_sub_if_data *sdata,
|
||||
u8 *hw_addr, u64 rates, gfp_t gfp);
|
||||
void mesh_plink_broken(struct sta_info *sta);
|
||||
void mesh_plink_deactivate(struct sta_info *sta);
|
||||
int mesh_plink_open(struct sta_info *sta);
|
||||
|
Reference in New Issue
Block a user