nl80211: Reset split_start when netlink skb is exhausted
authorPontus Fuchs <pontus.fuchs@gmail.com>
Thu, 16 Jan 2014 14:00:40 +0000 (15:00 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 Feb 2014 21:32:25 +0000 (13:32 -0800)
commitd87e47c32aad947e6ce5d3eb3ca077cabb0387b7
tree7125f9c53cf83aecb5eb4d4abbd3c471af95ae45
parent9ee59d9a5b03f45d9b421b020947846d13f27d08
nl80211: Reset split_start when netlink skb is exhausted

commit f12cb2893069495726c21a4b0178705dacfecfe0 upstream.

When the netlink skb is exhausted split_start is left set. In the
subsequent retry, with a larger buffer, the dump is continued from the
failing point instead of from the beginning.

This was causing my rt28xx based USB dongle to now show up when
running "iw list" with an old iw version without split dump support.

Fixes: 3713b4e364ef ("nl80211: allow splitting wiphy information in dumps")
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
[avoid the entire workaround when state->split is set]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/wireless/nl80211.c