From patchwork Thu Jan 16 14:00:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pontus Fuchs X-Patchwork-Id: 3498881 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4FAC29F32F for ; Thu, 16 Jan 2014 14:01:00 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 543DD20163 for ; Thu, 16 Jan 2014 14:00:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 46F4020158 for ; Thu, 16 Jan 2014 14:00:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752693AbaAPOA4 (ORCPT ); Thu, 16 Jan 2014 09:00:56 -0500 Received: from mail-la0-f44.google.com ([209.85.215.44]:35777 "EHLO mail-la0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752336AbaAPOAz (ORCPT ); Thu, 16 Jan 2014 09:00:55 -0500 Received: by mail-la0-f44.google.com with SMTP id hm7so258873lab.31 for ; Thu, 16 Jan 2014 06:00:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=Lk+hO4ZbVBrXK7MbveP76UXaGNSvCu0+N0077Mapm48=; b=TOGQ3CdLU22OXfaG4Y7fg+0ZatDdaSfiEK2boj749iKpIOuYHHoQLOFPdu3pxOesBU YNcZ5g5FmA/KGy83hyvfYOBHo5HOpJrt6RC7sOX7C4ZKW9MpTJnRA136e25yIWK/XLgY J3IlkbA80wdApBDar5IDdFO6QYHgrgXzK6KOev4tJ8fPqAwL6d4WdVGq5u1FU0UCNvL6 WQhKphrTfTUwh+Q0vRRsPb4ociKkOEiKOMN3N7KhsUKLF37oML5mRutTWsNKmvf6H6O3 FEaDXroi1LQ1zWWRBKj4N979PwwM3NCtDMZ3ZBOOfNfq0EEDx3gyivMzmUQIscN+IvKQ r0Dg== X-Received: by 10.152.5.8 with SMTP id o8mr40430lao.89.1389880851025; Thu, 16 Jan 2014 06:00:51 -0800 (PST) Received: from localhost.localdomain (host-90-238-9-100.mobileonline.telia.com. [90.238.9.100]) by mx.google.com with ESMTPSA id tc8sm4560658lbb.9.2014.01.16.06.00.47 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 16 Jan 2014 06:00:49 -0800 (PST) From: Pontus Fuchs To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org Subject: [PATCH] nl80211: Reset split_start when netlink skb is exhausted Date: Thu, 16 Jan 2014 15:00:40 +0100 Message-Id: <1389880840-27863-1-git-send-email-pontus.fuchs@gmail.com> X-Mailer: git-send-email 1.8.3.2 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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; }