diff options
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r-- | net/wireless/nl80211.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index fb75f265b39c..b7fefffd2d0d 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -199,12 +199,14 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb) | |||
199 | 199 | ||
200 | mutex_lock(&cfg80211_drv_mutex); | 200 | mutex_lock(&cfg80211_drv_mutex); |
201 | list_for_each_entry(dev, &cfg80211_drv_list, list) { | 201 | list_for_each_entry(dev, &cfg80211_drv_list, list) { |
202 | if (++idx < start) | 202 | if (++idx <= start) |
203 | continue; | 203 | continue; |
204 | if (nl80211_send_wiphy(skb, NETLINK_CB(cb->skb).pid, | 204 | if (nl80211_send_wiphy(skb, NETLINK_CB(cb->skb).pid, |
205 | cb->nlh->nlmsg_seq, NLM_F_MULTI, | 205 | cb->nlh->nlmsg_seq, NLM_F_MULTI, |
206 | dev) < 0) | 206 | dev) < 0) { |
207 | idx--; | ||
207 | break; | 208 | break; |
209 | } | ||
208 | } | 210 | } |
209 | mutex_unlock(&cfg80211_drv_mutex); | 211 | mutex_unlock(&cfg80211_drv_mutex); |
210 | 212 | ||