* [PATCH] nl80211: Reset split_start when netlink skb is exhausted
@ 2014-01-16 14:00 Pontus Fuchs
2014-01-16 14:04 ` Johannes Berg
0 siblings, 1 reply; 2+ messages in thread
From: Pontus Fuchs @ 2014-01-16 14:00 UTC (permalink / raw)
To: johannes; +Cc: linux-wireless
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.
Signed-off-by: Pontus Fuchs <pontus.fuchs@gmail.com>
---
net/wireless/nl80211.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index d0afd82..c7ce4c7 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1725,6 +1725,7 @@ static int nl80211_dump_wiphy(struct sk_buff *skb, struct netlink_callback *cb)
!skb->len &&
cb->min_dump_alloc < 4096) {
cb->min_dump_alloc = 4096;
+ state->split_start = 0;
rtnl_unlock();
return 1;
}
--
1.8.3.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nl80211: Reset split_start when netlink skb is exhausted
2014-01-16 14:00 [PATCH] nl80211: Reset split_start when netlink skb is exhausted Pontus Fuchs
@ 2014-01-16 14:04 ` Johannes Berg
0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2014-01-16 14:04 UTC (permalink / raw)
To: Pontus Fuchs; +Cc: linux-wireless
On Thu, 2014-01-16 at 15:00 +0100, Pontus Fuchs wrote:
> 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.
Thanks, applied. I added Cc: stable and Fixes: tags as well as adding "!
state->split" to the conditions.
johannes
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-01-16 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-01-16 14:00 [PATCH] nl80211: Reset split_start when netlink skb is exhausted Pontus Fuchs
2014-01-16 14:04 ` Johannes Berg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox