aboutsummaryrefslogtreecommitdiff
path: root/net/wireless/nl80211.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-08 15:39:41 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-08 15:39:41 -0700
commit54dceb008ffcbe003bea9017cad1227a83b6fc3f (patch)
treed4e3345ead16da19efe38dbf97ade38309f8b4f7 /net/wireless/nl80211.c
parent11a100f844f6096787ab20e19f17d72abc957a8f (diff)
parentb46372710ab536c0967f76be5dc41341583d4a54 (diff)
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/wireless/nl80211.c')
-rw-r--r--net/wireless/nl80211.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index fb75f265b39..b7fefffd2d0 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)
mutex_lock(&cfg80211_drv_mutex);
list_for_each_entry(dev, &cfg80211_drv_list, list) {
- if (++idx < start)
+ if (++idx <= start)
continue;
if (nl80211_send_wiphy(skb, NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, NLM_F_MULTI,
- dev) < 0)
+ dev) < 0) {
+ idx--;
break;
+ }
}
mutex_unlock(&cfg80211_drv_mutex);