diff options
author | Bob Copeland <me@bobcopeland.com> | 2013-03-29 17:38:39 +0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-04-08 11:16:59 +0400 |
commit | ae76eef027f75fadd8a8eda55ee07707f077aacb (patch) | |
tree | 996060a0166128480ad5e55244438cd16448fb99 /net/mac80211/mesh.h | |
parent | 0f71651f935d05557eac5862ff68dd2335b0ce0e (diff) | |
download | linux-ae76eef027f75fadd8a8eda55ee07707f077aacb.tar.xz |
mac80211: return new mpath from mesh_path_add()
Most times that mesh_path_add() is called, it is followed by
a lookup to get the just-added mpath. We can instead just
return the new mpath in the case that we allocated one (or the
existing one if already there), so do that. Also, reorder the
code in mesh_path_add a bit so that we don't need to allocate
in the pre-existing case.
Signed-off-by: Bob Copeland <bob@cozybit.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/mesh.h')
-rw-r--r-- | net/mac80211/mesh.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h index 6ffabbe99c46..da158774eebb 100644 --- a/net/mac80211/mesh.h +++ b/net/mac80211/mesh.h @@ -275,7 +275,8 @@ void mesh_path_fix_nexthop(struct mesh_path *mpath, struct sta_info *next_hop); void mesh_path_expire(struct ieee80211_sub_if_data *sdata); void mesh_rx_path_sel_frame(struct ieee80211_sub_if_data *sdata, struct ieee80211_mgmt *mgmt, size_t len); -int mesh_path_add(struct ieee80211_sub_if_data *sdata, const u8 *dst); +struct mesh_path * +mesh_path_add(struct ieee80211_sub_if_data *sdata, const u8 *dst); int mesh_path_add_gate(struct mesh_path *mpath); int mesh_path_send_to_gates(struct mesh_path *mpath); |