From patchwork Thu Oct 23 06:37:35 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 5138291 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 59AE89F349 for ; Thu, 23 Oct 2014 06:37:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 84AFE20253 for ; Thu, 23 Oct 2014 06:37:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EAB120251 for ; Thu, 23 Oct 2014 06:37:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752158AbaJWGhk (ORCPT ); Thu, 23 Oct 2014 02:37:40 -0400 Received: from mail-wg0-f48.google.com ([74.125.82.48]:64299 "EHLO mail-wg0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750852AbaJWGhj (ORCPT ); Thu, 23 Oct 2014 02:37:39 -0400 Received: by mail-wg0-f48.google.com with SMTP id k14so381763wgh.7 for ; Wed, 22 Oct 2014 23:37:38 -0700 (PDT) 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=c4AzANG/Tvm1nRWxNN/zSe5xINMhi1tWTE8UVbZqY5c=; b=XxRb6vMp0Ul2WIIq5HwXbViBRxE3UOTCBpS4ZNzMNA5T+hoVZ8L26DWbUJeO0OVo0H wCE0LTgPOWSoV6wPPAYYsxznOPD/g+KTaKgP1nUyIoG878hd6UrORz7oh+Gi2ALgYG+c Z6LC98AB2YOqGkf5iEpw+Y2KyFjgohBlaJ7lYkMIHYum6e2Koq1Vf86bOHM6NYlF8VN3 Kp42jP64byF9WT9Q42G1Lj48jjUINdfI3vrj/t/oqIP4QgwBUp+ZSssFTBXctqEAgZl9 PCnwKz/L7K4T3oh9ytNvMB14NRQZNy3mU1i+NYilRsK55zbAEbA6Bh40YRAEN98ruDWQ LRkg== X-Gm-Message-State: ALoCoQnsEE2RE/htdyHqUyggl+A4uFFDhNcFEuudiDEdUEohWEUhMgq50oRBkpQazJd5tYpkFnLc X-Received: by 10.194.103.74 with SMTP id fu10mr3393843wjb.0.1414046258127; Wed, 22 Oct 2014 23:37:38 -0700 (PDT) Received: from athena.amr.corp.intel.com (93-173-169-38.bb.netvision.net.il. [93.173.169.38]) by mx.google.com with ESMTPSA id ko10sm976922wjb.48.2014.10.22.23.37.36 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Oct 2014 23:37:37 -0700 (PDT) From: Arik Nemtsov To: Cc: "Luis R. Rodriguez" , Jonathan Doron Subject: [PATCH 3/5] cfg80211: update missing fields in custom regulatory path Date: Thu, 23 Oct 2014 09:37:35 +0300 Message-Id: <1414046257-22184-4-git-send-email-arik@wizery.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1414046257-22184-1-git-send-email-arik@wizery.com> References: <1414046257-22184-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=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Jonathan Doron Some channels fields were not being updated in the custom regulatory path. Update them according to the code in handle_channel(). Signed-off-by: Jonathan Doron Signed-off-by: Arik Nemtsov Reviewed-by: Luis R. Rodriguez --- net/wireless/reg.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index efbdff0..9575aea 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1691,10 +1691,23 @@ static void handle_channel_custom(struct wiphy *wiphy, if (max_bandwidth_khz < MHZ_TO_KHZ(160)) bw_flags |= IEEE80211_CHAN_NO_160MHZ; + chan->dfs_state = NL80211_DFS_USABLE; + chan->dfs_state_entered = jiffies; + + 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 = (int) MBM_TO_DBM(power_rule->max_eirp); + + if (chan->flags & IEEE80211_CHAN_RADAR) { + if (reg_rule->dfs_cac_ms) + chan->dfs_cac_ms = reg_rule->dfs_cac_ms; + else + chan->dfs_cac_ms = IEEE80211_DFS_MIN_CAC_TIME_MS; + } + + chan->max_power = chan->max_reg_power; } static void handle_band_custom(struct wiphy *wiphy,