From patchwork Mon Apr 21 04:52:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 4022311 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 83AE9BFF02 for ; Mon, 21 Apr 2014 04:55:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A73FE2021B for ; Mon, 21 Apr 2014 04:55:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC68620218 for ; Mon, 21 Apr 2014 04:55:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751521AbaDUEy7 (ORCPT ); Mon, 21 Apr 2014 00:54:59 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:58190 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751381AbaDUEy7 (ORCPT ); Mon, 21 Apr 2014 00:54:59 -0400 Received: by mail-pa0-f43.google.com with SMTP id bj1so3353566pad.30 for ; Sun, 20 Apr 2014 21:54:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=GxqrNPA7l05qu85VpZokc6ce/9kJIdk+T+nLbxpytm4=; b=HZ75sTDOsjz2I3/z3Ix6aL7NRSr0q8iTLw2TUrgrOohdyBTZtvri0qeVSpFbOY3Wgx G1nvvjHB2irFLR5vdJubrLJDOIT4hfFe1czo15944/ikj20OekasIzk2PeeWCn50tak8 VkD+v2Cpki/YCkW+HzSYCXae5oSEhJJYgJ4L3G4miY8iXOGCkz2rdejcGj1t9tESUGCu ri9QET2eBCzeORrxf6itdA8n061qmfPX1zxdgDk+TZEM3c3wZZJHJrtuLGebKCKV3oe7 OUQIKhurhccEnAaAZC+fx60+BKKgoCcGjUXPPTsqLXVoBPDeD1zli3AHig4XSvfLhu/x svow== X-Received: by 10.66.159.233 with SMTP id xf9mr890082pab.139.1398056098507; Sun, 20 Apr 2014 21:54:58 -0700 (PDT) Received: from localhost.localdomain ([61.157.126.13]) by mx.google.com with ESMTPSA id gj9sm75124104pbc.7.2014.04.20.21.54.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 20 Apr 2014 21:54:58 -0700 (PDT) From: "Zhao, Gang" To: Cc: Johannes Berg Subject: [PATCH 03/12] mac80211: minor changes of ieee80211_reconfig() Date: Mon, 21 Apr 2014 12:52:58 +0800 Message-Id: X-Mailer: git-send-email 1.9.0 In-Reply-To: References: In-Reply-To: References: 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.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Try to update chanctx only if local->use_chanctx is true. P2P_DEVICE doesn't support ieee80211_bss_info_change_notify() for now, so it's not needed to set changed flags for P2P_DEVICE. Signed-off-by: Zhao, Gang --- net/mac80211/util.c | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 5a6cc33..ae38592 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -1565,17 +1565,17 @@ int ieee80211_reconfig(struct ieee80211_local *local) list_for_each_entry(ctx, &local->chanctx_list, list) WARN_ON(drv_add_chanctx(local, ctx)); mutex_unlock(&local->chanctx_mtx); - } - list_for_each_entry(sdata, &local->interfaces, list) { - if (!ieee80211_sdata_running(sdata)) - continue; - ieee80211_assign_chanctx(local, sdata); - } + list_for_each_entry(sdata, &local->interfaces, list) { + if (!ieee80211_sdata_running(sdata)) + continue; + ieee80211_assign_chanctx(local, sdata); + } - sdata = rtnl_dereference(local->monitor_sdata); - if (sdata && ieee80211_sdata_running(sdata)) - ieee80211_assign_chanctx(local, sdata); + sdata = rtnl_dereference(local->monitor_sdata); + if (sdata && ieee80211_sdata_running(sdata)) + ieee80211_assign_chanctx(local, sdata); + } /* add STAs back */ mutex_lock(&local->sta_mtx); @@ -1671,13 +1671,10 @@ int ieee80211_reconfig(struct ieee80211_local *local) } break; case NL80211_IFTYPE_WDS: - break; case NL80211_IFTYPE_AP_VLAN: case NL80211_IFTYPE_MONITOR: - /* ignore virtual */ - break; case NL80211_IFTYPE_P2P_DEVICE: - changed = BSS_CHANGED_IDLE; + /* nothing to do */ break; case NL80211_IFTYPE_UNSPECIFIED: case NUM_NL80211_IFTYPES: