From patchwork Wed Feb 26 01:09:42 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: 3719981 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 C7B78BF13A for ; Wed, 26 Feb 2014 01:10:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D3B4220204 for ; Wed, 26 Feb 2014 01:10:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF041201FB for ; Wed, 26 Feb 2014 01:10:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752187AbaBZBKI (ORCPT ); Tue, 25 Feb 2014 20:10:08 -0500 Received: from mail-pa0-f54.google.com ([209.85.220.54]:63637 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750954AbaBZBKF (ORCPT ); Tue, 25 Feb 2014 20:10:05 -0500 Received: by mail-pa0-f54.google.com with SMTP id fa1so220349pad.13 for ; Tue, 25 Feb 2014 17:10:05 -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=yqKon1BUqqB84Fz0gTD1CH01FHzRJdOpLiZ8Px5tJ98=; b=gPgk6FuQlNsw2S5iiHQTbG3fQhfokkomiEq8v6/ov43foS2AuJTNccnTRLn5ONWSaM DRNYUo1gcLBd9ZI3QEI6K3waYeLGAABrW39eweAOcuRdgWCaqGBMynFPgSmzz4uobWGD ymfg8qkSOz4+K1Mx/T20zl9xtqOZrEdeYWqmP8B+P4KhwmRglX5u3HBSwLkuSN1d/FLX UlbjI13axz0GxJIhEdn9OgWZL4dUe4CNPAb9MquKgIZFiWevPU/8qkz1/85melvsEKeV NvyU5YclqmReBzm+36Kq6WhGJ+lXcuUqvJaHVpsuzdwIzxPnUYkHaXMN/nl55PGJKSNy 21XA== X-Received: by 10.68.229.164 with SMTP id sr4mr3161994pbc.82.1393377005446; Tue, 25 Feb 2014 17:10:05 -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 dk1sm14937892pbc.46.2014.02.25.17.10.02 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Feb 2014 17:10:04 -0800 (PST) Received: by mcgrof@gmail.com (sSMTP sendmail emulation); Tue, 25 Feb 2014 17:10:00 -0800 From: "Luis R. Rodriguez" To: johannes@sipsolutions.net Cc: linux-wireless@vger.kernel.org, linux@eikelenboom.it, "Luis R. Rodriguez" Subject: [PATCH 3/3] cfg80211: processing regulatory requests on netdev notifier Date: Tue, 25 Feb 2014 17:09:42 -0800 Message-Id: <1393376982-28276-4-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 adds a trigger to review any pending regulatory requests whenever an 802.11 device interface is brought down or up. We use this as an opportunistic trigger for checking the regulatory work queues as otherwise they they're only checked upon an initial regulatory request or when beacon hints are found. This opportunistic mechanism can be used to trigger kicking the queues regulatory queues at any time from userspace without having to change the regulatory state. A timer just waiting upon init is not that appropriate as when it should be triggered will depend on systems, a much better approach is to use and add opportunistic triggers. The interface coming up is typically a good indicator that filesystems have been mounted since firmware is required for some devices. Reported-by: Sander Eikelenboom Signed-off-by: Luis R. Rodriguez --- net/wireless/reg.h | 1 + 1 file changed, 1 insertion(+) diff --git a/net/wireless/reg.h b/net/wireless/reg.h index 37c180d..51912b3 100644 --- a/net/wireless/reg.h +++ b/net/wireless/reg.h @@ -37,6 +37,7 @@ unsigned int reg_get_max_bandwidth(const struct ieee80211_regdomain *rd, const struct ieee80211_reg_rule *rule); bool reg_last_request_cell_base(void); +void reg_process_pending_work(void); /** * regulatory_hint_found_beacon - hints a beacon was found on a channel