From patchwork Sun Jan 4 10:13:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eliad Peller X-Patchwork-Id: 5563001 X-Patchwork-Delegate: johannes@sipsolutions.net 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C9BB29F2ED for ; Sun, 4 Jan 2015 10:13:39 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EAA862017A for ; Sun, 4 Jan 2015 10:13:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F33C5201C8 for ; Sun, 4 Jan 2015 10:13:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752599AbbADKNe (ORCPT ); Sun, 4 Jan 2015 05:13:34 -0500 Received: from mail-wg0-f53.google.com ([74.125.82.53]:46180 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750979AbbADKNb (ORCPT ); Sun, 4 Jan 2015 05:13:31 -0500 Received: by mail-wg0-f53.google.com with SMTP id x13so8271152wgg.12 for ; Sun, 04 Jan 2015 02:13:30 -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=4NDIxV7ApwmYLjcXl+3Uu+sLHFNuseDeKm2+D5Agkrk=; b=csBTCODGVRblYsIMWeLHOIYxZ/Cc9f2AFVQSsEiLgDwMBzaI25YyUOO8fX5MMXlf+L HbLcKzrlkZf4IYib4MKKMmuJeXXgQYTdni5JraeamRxGxhM9hb0IkW5MYJvRvs07IO3F 37l7toSoEOwgS6dL4QM42EKRN22R6ueLNFhWaQ/rHbfGc8zR3lRpvxc4Ue7d4EZ5hrrI 3CPqeA/qaOpdtK7L2O9q8ku3F4z/1zj6NSTMxhEmIBZvTPX72zrV2/bTAA8WNG2HO+Go 2hJTx0F2PuIO8y678pyuVHf+CGWPUE88CKX2G6D8dfaM2b2h3l7DAehsBiEWpEPzmG6d 33/g== X-Gm-Message-State: ALoCoQnu7RkoYAzyrHm1KtfRKzq5o0S8PMvYJ0j9vtQzSZi0IJ9S20Hhl8r9vwtoV+pX83yMdU1L X-Received: by 10.194.95.10 with SMTP id dg10mr168971409wjb.82.1420366410623; Sun, 04 Jan 2015 02:13:30 -0800 (PST) Received: from muse.ger.corp.intel.com (89-138-233-251.bb.netvision.net.il. [89.138.233.251]) by mx.google.com with ESMTPSA id gb10sm45781034wjb.21.2015.01.04.02.13.29 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 04 Jan 2015 02:13:30 -0800 (PST) From: Eliad Peller To: Johannes Berg Cc: Subject: [PATCH 3/3] mac80211: always recalc_radar on chanctx changes Date: Sun, 4 Jan 2015 12:13:19 +0200 Message-Id: <1420366399-31535-3-git-send-email-eliad@wizery.com> X-Mailer: git-send-email 1.8.5.2.229.g4448466.dirty In-Reply-To: <1420366399-31535-1-git-send-email-eliad@wizery.com> References: <1420366399-31535-1-git-send-email-eliad@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 ieee80211_recalc_radar_chanctx() changes the global local->radar_detect_enabled in case of a change from the current chanctx radar_enabled state. Thus, we need to make sure it will be called even if the current chanctx is going to be freed (so local->radar_detect_enabled will be cleared if needed). Signed-off-by: Eliad Peller --- net/mac80211/chan.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c index 7f83451..9261cc0 100644 --- a/net/mac80211/chan.c +++ b/net/mac80211/chan.c @@ -629,10 +629,12 @@ out: sdata->vif.bss_conf.idle = !conf; + if (curr_ctx) + ieee80211_recalc_radar_chanctx(local, curr_ctx); + if (curr_ctx && ieee80211_chanctx_num_assigned(local, curr_ctx) > 0) { ieee80211_recalc_chanctx_chantype(local, curr_ctx); ieee80211_recalc_smps_chanctx(local, curr_ctx); - ieee80211_recalc_radar_chanctx(local, curr_ctx); ieee80211_recalc_chanctx_min_def(local, curr_ctx); }