From patchwork Tue Dec 17 20:44:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Emmanuel Grumbach X-Patchwork-Id: 3365521 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 E444AC0D4A for ; Tue, 17 Dec 2013 20:45:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 198C3203AD for ; Tue, 17 Dec 2013 20:45:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2CCDA201F2 for ; Tue, 17 Dec 2013 20:45:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752454Ab3LQUpv (ORCPT ); Tue, 17 Dec 2013 15:45:51 -0500 Received: from mail-ea0-f181.google.com ([209.85.215.181]:59970 "EHLO mail-ea0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752313Ab3LQUpb (ORCPT ); Tue, 17 Dec 2013 15:45:31 -0500 Received: by mail-ea0-f181.google.com with SMTP id m10so3160763eaj.12 for ; Tue, 17 Dec 2013 12:45:30 -0800 (PST) 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; bh=ILWnkkFNiK9vFsnfVZuLY9kjx3ICUNe53JtiBAfnatU=; b=Y81INBFvYJbdvqS009owyUzv12L7vZYApNYSYoZPneJoUMN3mZMxaY5+uS0Ra1cruM v8SVnrhs6Hs+8UTOvzrxRXRUAG1XyvwN8GDrSkS+9yXcvPQgJcCdxpJJZKtC9JGFilOl 5hFdUoLZfY8+ADDCG7tJ94g8tFdnC2QPYmPsJ9x1ECzwOQabrKy7Fhyrx1sU52qd5Sjs LfS5rWF18NO5Y7NkgXVESBskZUxyPRMAO9Pf4LExjhAIIfh00fI2LEylDKJ1gBGjTP4R xX9XvgMUNkM7PThNXyQrV8LZc7NbAmMs0PFHrHTbRRJ03OHSEMz4pXZOTgCMMfN8fZ+G /EEw== X-Received: by 10.14.194.131 with SMTP id m3mr19682691een.2.1387313130020; Tue, 17 Dec 2013 12:45:30 -0800 (PST) Received: from localhost.localdomain (93-173-242-52.bb.netvision.net.il. [93.173.242.52]) by mx.google.com with ESMTPSA id 4sm56278497eed.14.2013.12.17.12.45.28 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 12:45:29 -0800 (PST) From: Emmanuel Grumbach To: linux-wireless@vger.kernel.org Cc: Ilan Peer , Emmanuel Grumbach Subject: [PATCH 32/36] iwlwifi: mvm: Do not allow AP MAC context update if not active Date: Tue, 17 Dec 2013 22:44:35 +0200 Message-Id: <1387313079-28123-32-git-send-email-egrumbach@gmail.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <52B0B72A.5070704@gmail.com> References: <52B0B72A.5070704@gmail.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.3 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 From: Ilan Peer Fix a regression introduced in "iwlwifi: mvm: fix ht protection flags" where an AP/IBSS MAC context could have been updated even before the context was added to the FW. This fix avoids the following warning: WARNING: ... at .../drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c:1132 iwl_mvm_mac_ctxt_changed+0x75/0x90 [iwlmvm]() Changing inactive MAC 0c:8b:fd:01:1a:30/3 Modules linked in: [...] Call Trace: [] dump_stack+0x41/0x52 [] warn_slowpath_common+0x84/0xa0 [] ? iwl_mvm_mac_ctxt_changed+0x75/0x90 [iwlmvm] [] ? iwl_mvm_mac_ctxt_changed+0x75/0x90 [iwlmvm] [] warn_slowpath_fmt+0x33/0x40 [] iwl_mvm_mac_ctxt_changed+0x75/0x90 [iwlmvm] [] iwl_mvm_bss_info_changed+0x22a/0x4b0 [iwlmvm] [] ? mutex_unlock+0xd/0x10 [] ? iwl_mvm_configure_filter+0x58/0x70 [iwlmvm] [] ? iwl_mvm_mac_tx+0xc0/0xc0 [iwlmvm] [] ieee80211_bss_info_change_notify+0xa3/0x1d0 [mac80211] [] ? ieee80211_del_virtual_monitor+0x127/0x1f0 [mac80211] [] ieee80211_do_open+0x12c/0xeb0 [mac80211] [] ? __raw_notifier_call_chain+0x1e/0x30 [] ? raw_notifier_call_chain+0x1f/0x30 [] ieee80211_open+0x5d/0x60 [mac80211] [] __dev_open+0xab/0x140 [] ? _raw_spin_unlock_bh+0x2a/0x30 [] __dev_change_flags+0x81/0x160 [] ? __lock_is_held+0x3c/0x60 [] dev_change_flags+0x21/0x60 Signed-off-by: Ilan Peer Reported-by: Johannes Berg Reviewed-by: Johannes Berg Signed-off-by: Emmanuel Grumbach --- drivers/net/wireless/iwlwifi/mvm/mac80211.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/wireless/iwlwifi/mvm/mac80211.c b/drivers/net/wireless/iwlwifi/mvm/mac80211.c index 272aabd..b61d5a2 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac80211.c @@ -1053,11 +1053,16 @@ iwl_mvm_bss_info_changed_ap_ibss(struct iwl_mvm *mvm, struct ieee80211_bss_conf *bss_conf, u32 changes) { + struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); enum ieee80211_bss_change ht_change = BSS_CHANGED_ERP_CTS_PROT | BSS_CHANGED_HT | BSS_CHANGED_BANDWIDTH; int ret; + /* Changes will be applied when the AP/IBSS is started */ + if (!mvmvif->ap_ibss_active) + return; + if (changes & ht_change) { ret = iwl_mvm_mac_ctxt_changed(mvm, vif); if (ret)