From: Pontus Fuchs <pontus.fuchs@gmail.com>
To: johannes@sipsolutions.net
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH] nl80211: Reset split_start on error path when split dump is not used
Date: Thu, 16 Jan 2014 14:34:39 +0100 [thread overview]
Message-ID: <1389879279-20832-1-git-send-email-pontus.fuchs@gmail.com> (raw)
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 | 2 ++
1 file changed, 2 insertions(+)
Supersedes "nl80211: Don't touch split_start when split dump is not used"
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index d0afd82..ba6d438 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -1631,6 +1631,8 @@ static int nl80211_send_wiphy(struct cfg80211_registered_device *dev,
return genlmsg_end(msg, hdr);
nla_put_failure:
+ if (!state->split)
+ state->split_start = 0;
genlmsg_cancel(msg, hdr);
return -EMSGSIZE;
}
--
1.8.3.2
next reply other threads:[~2014-01-16 13:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-16 13:34 Pontus Fuchs [this message]
2014-01-16 13:41 ` [PATCH] nl80211: Reset split_start on error path when split dump is not used Johannes Berg
2014-01-16 13:50 ` Pontus Fuchs
2014-01-16 13:53 ` Johannes Berg
2014-01-16 13:59 ` Pontus Fuchs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1389879279-20832-1-git-send-email-pontus.fuchs@gmail.com \
--to=pontus.fuchs@gmail.com \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).