From patchwork Sun Nov 16 14:37:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 5314171 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 E8B03C11AC for ; Sun, 16 Nov 2014 14:37:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5B1F520123 for ; Sun, 16 Nov 2014 14:37:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4D56320120 for ; Sun, 16 Nov 2014 14:37:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755386AbaKPOhr (ORCPT ); Sun, 16 Nov 2014 09:37:47 -0500 Received: from mail-wi0-f178.google.com ([209.85.212.178]:50129 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753183AbaKPOhq (ORCPT ); Sun, 16 Nov 2014 09:37:46 -0500 Received: by mail-wi0-f178.google.com with SMTP id em10so1871969wid.17 for ; Sun, 16 Nov 2014 06:37:45 -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; bh=KRegqlrjY5d4fTYatfo2c36JM586uFvNouG1ce+vYWA=; b=jPy5IpZkiXIOS5PgAoB/dgjql/vK+Jl0qJipwmr8DwUJNDHYNPDR1Ca1JRBC8GD+EE LlVDp+IKAglLxqO4EOR/iHFFp5gYJF+4G8o7qA5CvqvaOXnbcAzmjFyMrjBqDboo4A46 OK/5eHcbCTSMzJ7+dy+fhw1P5PaRBqX1cWoWIdK7wYhOPan/IJmIh865fW1+Lkta0Cwt MqtJuYr+vZVYkKfIHAOEh302neIUn0ueRcXCsK6zaPtqRMHWM7EKoZZWDhX+6+tRuLwU J335d+J3YliYl7hS2C9S4lLfQXip32wqBt3QYcPPqWji+Ixjuuf5AaeGV+BeK6d/RxTd QLyw== X-Gm-Message-State: ALoCoQkthLl+QKDU+LfiI+3HGzci+DS+uH4WWt9gTbMIW12wtMFH6GYU4i97yPTR2UcwaW6cgsTM X-Received: by 10.194.119.230 with SMTP id kx6mr24644288wjb.80.1416148665573; Sun, 16 Nov 2014 06:37:45 -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.43 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 16 Nov 2014 06:37:44 -0800 (PST) From: Arik Nemtsov To: Cc: "Luis R. Rodriguez" , Arik Nemtsov Subject: [PATCH 1/2] cfg80211: update missing fields in custom regulatory path Date: Sun, 16 Nov 2014 16:37:46 +0200 Message-Id: <1416148667-3750-1-git-send-email-arik@wizery.com> X-Mailer: git-send-email 1.9.1 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 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 Acked-by: Luis R. Rodriguez --- net/wireless/reg.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/net/wireless/reg.c b/net/wireless/reg.c index 7449a8c..a60f391 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1597,10 +1597,20 @@ 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_entered = jiffies; 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,