From patchwork Wed Feb 26 01:09:41 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: 3719971 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 89DF1BF40C for ; Wed, 26 Feb 2014 01:10:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 960D220204 for ; Wed, 26 Feb 2014 01:10:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 93488201FB for ; Wed, 26 Feb 2014 01:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752128AbaBZBKD (ORCPT ); Tue, 25 Feb 2014 20:10:03 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:44035 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750954AbaBZBKA (ORCPT ); Tue, 25 Feb 2014 20:10:00 -0500 Received: by mail-pa0-f50.google.com with SMTP id kp14so221367pab.9 for ; Tue, 25 Feb 2014 17:10:00 -0800 (PST) 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=Vr9Z4wxQL6xkAalI4s6RcxXl6q4rXllurzNsRm88U7g=; b=ea2GmhZM/hqQ/XG72ejLXxHExJq94zP/bdIvC76uYGTDXoycXnxeP1G2qQEEErFWtJ y7TNYyyl9ZL03FFfTrVn0JIBuuq/zSZqQRqX0jPIp80NXifAfSw7KQ5tlXezVTSjOXK3 bcnt17p3I6Rr26k31u+6M4FNOG0pNUO7/xqtGfuIC6npbYF7VUwsB77ejCEt910GsDzj 8DWwpnv8+6o2dGEZwi46Uieltrq/Qr+Oi4PfJYFf9EwO5CFBxT+29Xuac3OFuHHpDSX/ lh3izT2iSPEpJn0NXvegPVlgCZ52p0HtpmI1aP+zwKDU8+H4RG5x5rFYDAxceH5YHmLD l7eQ== X-Received: by 10.66.179.143 with SMTP id dg15mr5150922pac.52.1393377000261; Tue, 25 Feb 2014 17:10:00 -0800 (PST) Received: from mcgrof@gmail.com (c-24-7-61-223.hsd1.ca.comcast.net. [24.7.61.223]) by mx.google.com with ESMTPSA id qf7sm154492004pac.14.2014.02.25.17.09.56 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Feb 2014 17:09:59 -0800 (PST) Received: by mcgrof@gmail.com (sSMTP sendmail emulation); Tue, 25 Feb 2014 17:09:54 -0800 From: "Luis R. Rodriguez" To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, linux@eikelenboom.it, "Luis R. Rodriguez" Subject: [PATCH 2/3] cfg80211: fix processing world regdomain when non modular Date: Tue, 25 Feb 2014 17:09:41 -0800 Message-Id: <1393376982-28276-3-git-send-email-mcgrof@do-not-panic.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <1393376982-28276-1-git-send-email-mcgrof@do-not-panic.com> References: <1393376982-28276-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=-6.8 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 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 f5b120f..7203b74 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1857,7 +1857,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; }