Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 265981
b: refs/heads/master
c: 4c5ade4
h: refs/heads/master
i:
  265979: c381c07
v: v3
  • Loading branch information
Dan Carpenter authored and John W. Linville committed Sep 13, 2011
1 parent a962ef2 commit 40d53f5
Show file tree
Hide file tree
Showing 2 changed files with 18 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: edf6b784c0e574696915e7b04fe42158f3112d0d
refs/heads/master: 4c5ade414912cd903906339491675352bfccbdfe
19 changes: 17 additions & 2 deletions trunk/net/mac80211/mesh_pathtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,7 @@ static int mesh_path_node_copy(struct hlist_node *p, struct mesh_table *newtbl)
int mesh_pathtbl_init(void)
{
struct mesh_table *tbl_path, *tbl_mpp;
int ret;

tbl_path = mesh_table_alloc(INIT_PATHS_SIZE_ORDER);
if (!tbl_path)
Expand All @@ -1103,25 +1104,39 @@ int mesh_pathtbl_init(void)
tbl_path->copy_node = &mesh_path_node_copy;
tbl_path->mean_chain_len = MEAN_CHAIN_LEN;
tbl_path->known_gates = kzalloc(sizeof(struct hlist_head), GFP_ATOMIC);
if (!tbl_path->known_gates) {
ret = -ENOMEM;
goto free_path;
}
INIT_HLIST_HEAD(tbl_path->known_gates);


tbl_mpp = mesh_table_alloc(INIT_PATHS_SIZE_ORDER);
if (!tbl_mpp) {
mesh_table_free(tbl_path, true);
return -ENOMEM;
ret = -ENOMEM;
goto free_path;
}
tbl_mpp->free_node = &mesh_path_node_free;
tbl_mpp->copy_node = &mesh_path_node_copy;
tbl_mpp->mean_chain_len = MEAN_CHAIN_LEN;
tbl_mpp->known_gates = kzalloc(sizeof(struct hlist_head), GFP_ATOMIC);
if (!tbl_mpp->known_gates) {
ret = -ENOMEM;
goto free_mpp;
}
INIT_HLIST_HEAD(tbl_mpp->known_gates);

/* Need no locking since this is during init */
RCU_INIT_POINTER(mesh_paths, tbl_path);
RCU_INIT_POINTER(mpp_paths, tbl_mpp);

return 0;

free_mpp:
mesh_table_free(tbl_mpp, true);
free_path:
mesh_table_free(tbl_path, true);
return ret;
}

void mesh_path_expire(struct ieee80211_sub_if_data *sdata)
Expand Down

0 comments on commit 40d53f5

Please sign in to comment.