From patchwork Thu Mar 12 13:37:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peer, Ilan" X-Patchwork-Id: 5998741 X-Patchwork-Delegate: johannes@sipsolutions.net 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 54AFFBF910 for ; Thu, 12 Mar 2015 19:35:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8D51720266 for ; Thu, 12 Mar 2015 19:35:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8396320374 for ; Thu, 12 Mar 2015 19:35:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755597AbbCLTfd (ORCPT ); Thu, 12 Mar 2015 15:35:33 -0400 Received: from mga03.intel.com ([134.134.136.65]:44147 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756147AbbCLTfU (ORCPT ); Thu, 12 Mar 2015 15:35:20 -0400 Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga103.jf.intel.com with ESMTP; 12 Mar 2015 12:32:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,390,1422950400"; d="scan'208";a="540117568" Received: from unknown (HELO ipeer-e6430-3.jer.intel.com) ([10.12.217.174]) by orsmga003.jf.intel.com with ESMTP; 12 Mar 2015 12:34:34 -0700 From: Ilan Peer To: linux-wireless@vger.kernel.org Cc: mcgrof@suse.org, Ben , Ilan Peer Subject: [PATCH] cfg80211: Process all pending regulatory requests/hints Date: Thu, 12 Mar 2015 09:37:34 -0400 Message-Id: <1426167454-7070-1-git-send-email-ilan.peer@intel.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=-5.3 required=5.0 tests=BAYES_00, DATE_IN_PAST_03_06, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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: Ben It is possible that there are several regulatory requests pending, but the processing of the last one does not call CRDA, and thus the other requests are not handled. Fix this by rescheduling the work until all requests have been processed. Signed-off-by: Ben Rosenfeld Signed-off-by: Ilan Peer --- net/wireless/reg.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index d867103..8c6cf52 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -2159,6 +2159,13 @@ static void reg_process_pending_hints(void) } reg_process_hint(reg_request); + + lr = get_last_request(); + + spin_lock(®_requests_lock); + if (!list_empty(®_requests_list) && lr && lr->processed) + schedule_work(®_work); + spin_unlock(®_requests_lock); } /* Processes beacon hints -- this has nothing to do with country IEs */