From owner-freebsd-wireless@freebsd.org Sat Feb 20 18:13:59 2016 Return-Path: Delivered-To: freebsd-wireless@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 408D1AAEB28 for ; Sat, 20 Feb 2016 18:13:59 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22b.google.com (mail-ig0-x22b.google.com [IPv6:2607:f8b0:4001:c05::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EA7ECBFF for ; Sat, 20 Feb 2016 18:13:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x22b.google.com with SMTP id 5so57291391igt.0 for ; Sat, 20 Feb 2016 10:13:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=eZTND93L9zMqkxi9qdxG5OWA128ZKeO7lG9xE/p2yXI=; b=o2KZqE0qFCASjo6QFcuMxJBkYkKjHoYniD1UAxCGRG8j2VNxQjCz8GcD9DVU4gxy/O 0uKpKjrl9xZBL4WLgheH7DKUaltI3TpUEyZFpz0nfWspmnY+iY46icN6quqsyE1X50LV werICPd5givAf+ox3BhJ1dFx7KOWlm4XvYfT2HC5B3YI6WNOTcsEUQIOtLfT2fgjZrG+ B+Ygd+UA4EVVhwpL9Ym3K3GNN+X+2zh9fUG8/wk4c+nInBav2KLlD6FZXHeJqxAmZDhO TcFjkU+rmMQubkMmlhp/EhqH58XEkO3admq9BtwUQlqtI3vZq2gy5Ok6IOV4iDI8Cw+b gLXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=eZTND93L9zMqkxi9qdxG5OWA128ZKeO7lG9xE/p2yXI=; b=fiV5LcCGtk5g9HMbaSrqpNGVgId17ChHzTPZ4TpeywWbmk5QG3rQrevj83rSNOkmbd oo9gX+fx2sco1CDXxcsQ5nkCvS/SvmThFBDWRktO1IcD4rNjVt9jM69KQfivhJdI/lF2 mI/zC3e2voylSUr3OZeD2q6tiAqSoiMRdp4asSxwkHNPWsoew/4/84apB7ibr1WVXuUV axYhB4DQBBPt2yiTYSt8+7TfajXJftZCdIyQswoc2L64zIZFs/jJFn/eE8DKkweAoZL7 16HLai5QOQTssOyIGdvgYePTtAxdydxC3SmCgTPb8BKi0tk53jSxMKkhaEKwe+WuSGxp lMdg== X-Gm-Message-State: AG10YORTwlqIXz8h9qxrKHuBx7zLm5UeEeHs7TMwTz89wX6XvUyNSN/gX8F8FTMjkX7W+8VkfK0fA/1Lw2YqOw== MIME-Version: 1.0 X-Received: by 10.50.171.225 with SMTP id ax1mr2977878igc.61.1455992038324; Sat, 20 Feb 2016 10:13:58 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.14.19 with HTTP; Sat, 20 Feb 2016 10:13:58 -0800 (PST) In-Reply-To: References: Date: Sat, 20 Feb 2016 10:13:58 -0800 X-Google-Sender-Auth: saSb2um3Kb7YFWCFLD-1Tu3xK5A Message-ID: Subject: Re: software scan fix - please test (Was: why we can't use the net80211 taskqueue for everything) From: Adrian Chadd To: Andriy Voskoboinyk Cc: "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Feb 2016 18:13:59 -0000 hi! Please do test this patch out! This unblocks a whole lot of tidying up and restructuring of the wifi drivers to make them more predictable! -a On 20 February 2016 at 02:06, Andriy Voskoboinyk wrote: >> hi, >> >> andriy has a few reviews out that tidy up some things, which I'd reply >> to, but .. reviews is offline. So, here's the 30 second version: >> >> * the net80211 taskqueue runs the software scan engine, and the >> software scan engine currently sleeps whilst it's running. >> >> This means that if you put newstate, deferred transmit, etc into the >> net80211 taskqueue, then it just won't run during scan. >> >> The net80211 software scan thing should be modified to not sleep >> whilst it's waiting for scan results and instead just kick off another >> timer event to finish that part of the loop. Then yes, we can just >> migrate * to the net80211 task queue and use it for all serialisation >> of a wifi driver. >> >> (And yes, I'd like to see that done ASAP..) >> >> Thanks, >> >> >> -adrian > > > Hi, > > I have replaced sleeping on conditional variable inside scan task > with scan_curchan task rescheduling (so this problem should be fixed now). > > For everyone, who wishes to test: apply the attached patch > (merged from D5133, D5137, D5139, D5140, D5142, D5143, D5145, D5147, D5148 > and D5152) > and rebuild + install the kernel. Scan should work as before. > > Thanks!