Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 171851
b: refs/heads/master
c: 3b53fde
h: refs/heads/master
i:
  171849: b513893
  171847: 7b38c09
v: v3
  • Loading branch information
Johannes Berg authored and John W. Linville committed Nov 18, 2009
1 parent ca0b267 commit b556e7d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 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: cb53a150caa3068ce366b75dd354718145f5e893
refs/heads/master: 3b53fde8ac40c4321389def14d7f4a9e14092fd3
4 changes: 2 additions & 2 deletions trunk/net/mac80211/cfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,13 @@ static void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
static int ieee80211_dump_station(struct wiphy *wiphy, struct net_device *dev,
int idx, u8 *mac, struct station_info *sinfo)
{
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
struct sta_info *sta;
int ret = -ENOENT;

rcu_read_lock();

sta = sta_info_get_by_idx(local, idx, dev);
sta = sta_info_get_by_idx(sdata, idx);
if (sta) {
ret = 0;
memcpy(mac, sta->sta.addr, ETH_ALEN);
Expand Down
7 changes: 4 additions & 3 deletions trunk/net/mac80211/sta_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,15 @@ struct sta_info *sta_info_get(struct ieee80211_local *local, const u8 *addr)
return sta;
}

struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx,
struct net_device *dev)
struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata,
int idx)
{
struct ieee80211_local *local = sdata->local;
struct sta_info *sta;
int i = 0;

list_for_each_entry_rcu(sta, &local->sta_list, list) {
if (dev && dev != sta->sdata->dev)
if (sdata != sta->sdata)
continue;
if (i < idx) {
++i;
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/mac80211/sta_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -409,8 +409,8 @@ struct sta_info *sta_info_get(struct ieee80211_local *local, const u8 *addr);
/*
* Get STA info by index, BROKEN!
*/
struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx,
struct net_device *dev);
struct sta_info *sta_info_get_by_idx(struct ieee80211_sub_if_data *sdata,
int idx);
/*
* Create a new STA info, caller owns returned structure
* until sta_info_insert().
Expand Down

0 comments on commit b556e7d

Please sign in to comment.