From patchwork Thu Nov 13 16:13:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arik Nemtsov X-Patchwork-Id: 5299001 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 43D6F9F440 for ; Thu, 13 Nov 2014 16:13:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6EA23201F2 for ; Thu, 13 Nov 2014 16:13:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E3D5201E4 for ; Thu, 13 Nov 2014 16:13:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933117AbaKMQNq (ORCPT ); Thu, 13 Nov 2014 11:13:46 -0500 Received: from mail-wg0-f52.google.com ([74.125.82.52]:47692 "EHLO mail-wg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933088AbaKMQNp (ORCPT ); Thu, 13 Nov 2014 11:13:45 -0500 Received: by mail-wg0-f52.google.com with SMTP id b13so17156185wgh.25 for ; Thu, 13 Nov 2014 08:13:43 -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=e/uEmTvmz1nKR/xqWBgQOw/3OrMcy4dEBIh6e4thmv0=; b=SgE67sDNkt1AGbTGohg9PYb2jLy2a1/hRHZr96px148zRbcwgymIUHQ7+sIhAyi5mk QNDfBDCB3btZQjOSLrOPhHPkx8Lpj/PHFemhtxSArvOCN+iSdPX63/mNAu/brZ8vzF3f 8V47gWWgtKtCTVsnFfjsfcz8Y4pzG41q7R5YD6M4psOtLgLCv5pGbm/uf8xf/4TLUwen Rg52W2tBc5dSZ9qquG3MHNw73VQOW0VtuSp0f6Zrl6kuOmBWBmnt0PH4qRlEVKRaiGtV geZ8m0Crg4BIhCnvKRiLYJT67AnHH8shALOxlXUtgmu8u+n4odT55ngPlkj3gPcIAEby GEWg== X-Gm-Message-State: ALoCoQmnuLONPGX9+60jsgEhmHpH0mHX46AiB17xnknrD5wYXisaist1cQvFvajnpHAXpvw4Y+kV X-Received: by 10.194.92.116 with SMTP id cl20mr5449747wjb.71.1415895223571; Thu, 13 Nov 2014 08:13:43 -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 fl1sm7035069wib.15.2014.11.13.08.13.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 13 Nov 2014 08:13:42 -0800 (PST) From: Arik Nemtsov To: Cc: "Luis R. Rodriguez" , Jonathan Doron Subject: [PATCH v2 2/4] cfg80211: update missing fields in custom regulatory path Date: Thu, 13 Nov 2014 18:13:37 +0200 Message-Id: <1415895219-19848-2-git-send-email-arik@wizery.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1415895219-19848-1-git-send-email-arik@wizery.com> References: <1415895219-19848-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=-7.9 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 Acked-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 6459ddd..174d8f82 100644 --- a/net/wireless/reg.c +++ b/net/wireless/reg.c @@ -1693,10 +1693,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,