From patchwork Sun Nov 16 14:37:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 5314181 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 BFEDBC11AD for ; Sun, 16 Nov 2014 14:37:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F297720120 for ; Sun, 16 Nov 2014 14:37:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1D1142012F for ; Sun, 16 Nov 2014 14:37:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755395AbaKPOht (ORCPT ); Sun, 16 Nov 2014 09:37:49 -0500 Received: from mail-wi0-f169.google.com ([209.85.212.169]:59644 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755393AbaKPOhs (ORCPT ); Sun, 16 Nov 2014 09:37:48 -0500 Received: by mail-wi0-f169.google.com with SMTP id r20so299955wiv.4 for ; Sun, 16 Nov 2014 06:37:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Q/pJGhjuQ/SK4xcDmlDF7Uk7wjUCi1elF1LYzQZl58w=; b=G0offSJn/rx9GWkdEaP7VjmsgB9wBJsRhQJ6lfc6IstXzgEpHgnWQ6pmwVdvSQDqOM oms+sNui1khbv5WnSLf4g3xkmEJ4Egz5EJNDHUOKb8QNBBYAQaxVDAcjQsjd3oZ28Vt7 9nJbLNbndwQjN6foFmNRvHyJMQEcZvq0SQWrKft/iE9vVgfuJWeJcmpQgtefWM69BEeT r/E6T7WSGgMlP6gNaUbJUYpjmnr2eQK1Y58EJ0afUMYiveeqLP9bAfYIhqFpAo+KhSJf /3EHPTSWslV+VNjSGNYLpoZ8Alo0+Bhda21YdFHv0zLHMk2QIjQFH7GGCJNRsBDfwOD5 D7lw== X-Gm-Message-State: ALoCoQkbfUw/uzv7FyQKleAu7efIbttQ/d09Nt5NUP1C1lg+ftJUaAkrrWRocLkn36L23X8C3RGX X-Received: by 10.180.87.33 with SMTP id u1mr23489137wiz.20.1416148667075; Sun, 16 Nov 2014 06:37:47 -0800 (PST) Received: from athena.amr.corp.intel.com (93-173-54-222.bb.netvision.net.il. [93.173.54.222]) by mx.google.com with ESMTPSA id n3sm5960843wiw.5.2014.11.16.06.37.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Nov 2014 06:37:46 -0800 (PST) From: Arik Nemtsov To: Cc: "Luis R. Rodriguez" , Arik Nemtsov Subject: [PATCH 2/2] cfg80211: explicitly initialize some fields in custom reg path Date: Sun, 16 Nov 2014 16:37:47 +0200 Message-Id: <1416148667-3750-2-git-send-email-arik@wizery.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1416148667-3750-1-git-send-email-arik@wizery.com> References: <1416148667-3750-1-git-send-email-arik@wizery.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.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, 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 Explicitly initialize the DFS state and beacon found state when handling channels in the custom regulatory path. Signed-off-by: Arik Nemtsov Acked-by: Luis R. Rodriguez --- net/wireless/reg.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index a60f391..32d8310 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1598,6 +1598,9 @@ static void handle_channel_custom(struct wiphy *wiphy, bw_flags |= IEEE80211_CHAN_NO_160MHZ; chan->dfs_state_entered = jiffies; + chan->dfs_state = NL80211_DFS_USABLE; + + chan->beacon_found = false; chan->flags |= map_regdom_flags(reg_rule->flags) | bw_flags; chan->max_antenna_gain = (int) MBI_TO_DBI(power_rule->max_antenna_gain); chan->max_reg_power = chan->max_power =