From patchwork Tue Apr 22 03:39:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Luis R. Rodriguez" X-Patchwork-Id: 4028031 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 73AECBFF02 for ; Tue, 22 Apr 2014 03:40:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D4932021F for ; Tue, 22 Apr 2014 03:40:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A6B4D2020F for ; Tue, 22 Apr 2014 03:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754359AbaDVDj5 (ORCPT ); Mon, 21 Apr 2014 23:39:57 -0400 Received: from mail-pd0-f176.google.com ([209.85.192.176]:60700 "EHLO mail-pd0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754612AbaDVDjx (ORCPT ); Mon, 21 Apr 2014 23:39:53 -0400 Received: by mail-pd0-f176.google.com with SMTP id r10so4368660pdi.35 for ; Mon, 21 Apr 2014 20:39:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=sYvGxlAwDAh1ZBrBw9jtRJCiF+o7+3pB6NuRXrI8pNU=; b=KaTzKoXwtUsIwh08FDTkvU+pU4hq9pvawOZTBtobLkmolr32Lbixx68obsoMvZtbw6 /d34HNP320ml5U+IcuVvHmW9aVC4jfDoS6JH2gpL6gJRrqgq2I17vPKTXUzqjePJ3Svf WdqsS5S3536/qjY69DOH6M5tyldtJQ2ddbaU2fFTC05ncEAGnwQDPII+rM9PfTFc/JIS G+cNHIvv0FUgGG+4z6B61EUdeget8W1t+PJ+goQ2hUABV+6kt44YV6bZSRzeHIlaIn/V g69w8m8ySWe6Qjgao56YmAJ6tDXJC8ta/mJ0ZMXuL81vuBmTaESiEcCxl9a6Mdi9Zi1l aA3A== X-Received: by 10.66.193.161 with SMTP id hp1mr41745014pac.20.1398137993397; Mon, 21 Apr 2014 20:39:53 -0700 (PDT) Received: from mcgrof@gmail.com (c-98-234-145-61.hsd1.ca.comcast.net. [98.234.145.61]) by mx.google.com with ESMTPSA id pq3sm81387603pbb.57.2014.04.21.20.39.49 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 21 Apr 2014 20:39:51 -0700 (PDT) Received: by mcgrof@gmail.com (sSMTP sendmail emulation); Mon, 21 Apr 2014 20:39:48 -0700 From: "Luis R. Rodriguez" To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, lkml20140418@newton.leun.net, arik@wizery.com, linux@eikelenboom.it, "Luis R. Rodriguez" Subject: [PATCH 2/2] cfg80211: fix processing world regdomain when non modular Date: Mon, 21 Apr 2014 20:39:35 -0700 Message-Id: <1398137975-14275-3-git-send-email-mcgrof@do-not-panic.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1398137975-14275-1-git-send-email-mcgrof@do-not-panic.com> References: <1398137975-14275-1-git-send-email-mcgrof@do-not-panic.com> 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.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, 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 From: "Luis R. Rodriguez" This allows processing of the last regulatory request when we determine its still pending. Without this if a regulatory request failed to get processed by userspace we wouldn't be able to re-process it later. An example situation that can lead to an unprocessed last_request is enabling cfg80211 to be built-in to the kernel, not enabling CFG80211_INTERNAL_REGDB and the CRDA binary not being available at the time the udev rule that kicks of CRDA triggers. In such a situation we want to let some cfg80211 triggers eventually kick CRDA for us again. Without this if the first cycle attempt to kick off CRDA failed we'd be stuck without the ability to change process any further regulatory domains. cfg80211 will trigger re-processing of the regulatory queue whenever schedule_work(®_work) is called, currently this happens when: * suspend / resume * disconnect * a beacon hint gets triggered (non DFS 5 GHz AP found) * a regulatory request gets added to the queue We don't have any specific opportunistic late boot triggers to address a late mount of where CRDA resides though, adding that should be done separately through another patch. Without an opportunistic fix then this fix relies at least one of the triggeres above to happen. Reported-by: Sander Eikelenboom Signed-off-by: Luis R. Rodriguez --- net/wireless/reg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 081c571..625c41e 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1912,7 +1912,7 @@ static void reg_process_pending_hints(void) /* When last_request->processed becomes true this will be rescheduled */ if (lr && !lr->processed) { - REG_DBG_PRINT("Pending regulatory request, waiting for it to be processed...\n"); + reg_process_hint(lr); return; }