Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 90100
b: refs/heads/master
c: 2a8ca29
h: refs/heads/master
v: v3
  • Loading branch information
Luis Carlos Cobo authored and John W. Linville committed Mar 6, 2008
1 parent 80032ab commit aa124b4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 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: a00de5d08b4bcd1e95d02667029406224bd0619b
refs/heads/master: 2a8ca29a88e3858685c463ffd19e11c20d14c73a
7 changes: 5 additions & 2 deletions trunk/net/mac80211/mesh_pathtbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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);
Expand All @@ -121,6 +123,7 @@ struct mesh_path *mesh_path_lookup_by_idx(int idx, struct net_device *dev)
}
return node->mpath;
}
}

return NULL;
}
Expand Down
5 changes: 3 additions & 2 deletions trunk/net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,13 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx,
int i = 0;

list_for_each_entry_rcu(sta, &local->sta_list, list) {
if (dev && dev != sta->sdata->dev)
continue;
if (i < idx) {
++i;
continue;
} else if (!dev || dev == sta->sdata->dev) {
return sta;
}
return sta;
}

return NULL;
Expand Down

0 comments on commit aa124b4

Please sign in to comment.