X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=net%2Fmac80211%2Fmesh_pathtbl.c;h=5845dc21ce854ea535cb9fa69af2cbcb2b4d4889;hb=f838bad1b3be8ca0c785ee0e0c570dfda74cf377;hp=135022d7ee57f0fe83a77859c71c3e4531c851f1;hpb=b4e08ea141e6d663dec31b31d6289baeaaa2a3a2;p=linux-2.6-omap-h63xx.git diff --git a/net/mac80211/mesh_pathtbl.c b/net/mac80211/mesh_pathtbl.c index 135022d7ee5..5845dc21ce8 100644 --- a/net/mac80211/mesh_pathtbl.c +++ b/net/mac80211/mesh_pathtbl.c @@ -98,7 +98,7 @@ struct mesh_path *mesh_path_lookup(u8 *dst, struct net_device *dev) /** * mesh_path_lookup_by_idx - look up a path in the mesh path table by its index * @idx: index - * @dev: local interface + * @dev: local interface, or NULL for all entries * * Returns: pointer to the mesh path structure, or NULL if not found. * @@ -111,7 +111,9 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct net_device *dev) int i; int j = 0; - for_each_mesh_entry(mesh_paths, p, node, i) + for_each_mesh_entry(mesh_paths, p, node, i) { + if (dev && node->mpath->dev != dev) + continue; if (j++ == idx) { if (MPATH_EXPIRED(node->mpath)) { spin_lock_bh(&node->mpath->state_lock); @@ -121,6 +123,7 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct net_device *dev) } return node->mpath; } + } return NULL; }