diff options
Diffstat (limited to 'net/mac80211/sta_info.c')
-rw-r--r-- | net/mac80211/sta_info.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c index e27f896dae53..3b84c16cf054 100644 --- a/net/mac80211/sta_info.c +++ b/net/mac80211/sta_info.c | |||
@@ -115,12 +115,13 @@ struct sta_info *sta_info_get_by_idx(struct ieee80211_local *local, int idx, | |||
115 | int i = 0; | 115 | int i = 0; |
116 | 116 | ||
117 | list_for_each_entry_rcu(sta, &local->sta_list, list) { | 117 | list_for_each_entry_rcu(sta, &local->sta_list, list) { |
118 | if (dev && dev != sta->sdata->dev) | ||
119 | continue; | ||
118 | if (i < idx) { | 120 | if (i < idx) { |
119 | ++i; | 121 | ++i; |
120 | continue; | 122 | continue; |
121 | } else if (!dev || dev == sta->sdata->dev) { | ||
122 | return sta; | ||
123 | } | 123 | } |
124 | return sta; | ||
124 | } | 125 | } |
125 | 126 | ||
126 | return NULL; | 127 | return NULL; |