From patchwork Wed Mar 4 17:59:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alban Gruin X-Patchwork-Id: 5938751 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 99D53BF440 for ; Wed, 4 Mar 2015 18:00:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CF00320272 for ; Wed, 4 Mar 2015 18:00:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E37C02026C for ; Wed, 4 Mar 2015 18:00:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757793AbbCDR7t (ORCPT ); Wed, 4 Mar 2015 12:59:49 -0500 Received: from mail-wg0-f68.google.com ([74.125.82.68]:33195 "EHLO mail-wg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933141AbbCDR7s (ORCPT ); Wed, 4 Mar 2015 12:59:48 -0500 Received: by wggx13 with SMTP id x13so222070wgg.0; Wed, 04 Mar 2015 09:59:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:cc:cc:subject:date:message-id:mime-version:content-type; bh=SRecq4QtUoZ2ZD4WNQGWoE0KHc4RNR8APhIqWv8ZjY8=; b=f0ZwKNTv5bmeMq75scrLN/skIAziBu8DeX140b4xewNlLjIW04PytZE9PbBkppXTRA oLU9F9lnjt0ji13WrPFHIFdqIcCBQiO+odFnRoSmQfirtv3YKDdoZYig5mg/ByT7NSPZ 9HkVqKZjq10w8SO0LeoteVbueOewsejKyP1JdP14t6HX8uVKSzdlhIsJ0eY5l2wV4bKe kqHaicn3WUm8XUzdEFVgduoJP50GuRBSjDMM0rzQzIMIyPdm+yVgqjdpYzRbQ9MwjYIE SXBGFE4uwz3dYMC5I2JHsRktzkF2UZouG/MGlyO54jVPkrnrGwuldrSa1y+wp9IwdKoE HQPg== X-Received: by 10.180.105.40 with SMTP id gj8mr59256250wib.67.1425491986716; Wed, 04 Mar 2015 09:59:46 -0800 (PST) Received: from ylate (AToulouse-554-1-10-34.w92-149.abo.wanadoo.fr. [92.149.93.34]) by mx.google.com with ESMTPSA id dj5sm6957842wjb.28.2015.03.04.09.59.45 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 04 Mar 2015 09:59:45 -0800 (PST) From: Alban Gruin To: linux-kernel@vger.kernel.org Cc: linux-wireless@vger.kernel.org Cc: johannes.berg@intel.com Cc: emmanuel.grumbach@intel.com Subject: [PATCH] iwlwifi: mvm: fix usage of debug specific variables Date: Wed, 04 Mar 2015 18:59:07 +0100 Message-ID: <871tl4ej9w.fsf@ylate.i-did-not-set--mail-host-address--so-tickle-me> MIME-Version: 1.0 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 variables in structs "iwl_mvm" and "iwl_mvm_vif" are used for debug purpose, and are declared only if CONFIG_IWLWIFI_DEBUGFS is set. However, some of these variables are used even if CONFIG_IWLWIFI_DEBUGFS is not set, resulting in a compilation error. This patch aims to fix this issue by adding a preprocessor condition where these variables are used. Signed-off-by: Alban Gruin --- drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 4 ++++ drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c | 3 +++ 2 files changed, 7 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c index 581b3b8..42bd545 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c @@ -1375,10 +1375,12 @@ static void iwl_mvm_beacon_loss_iterator(void *_data, u8 *mac, { struct iwl_missed_beacons_notif *missed_beacons = _data; struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); +#ifdef CONFIG_IWLWIFI_DEBUGFS struct iwl_mvm *mvm = mvmvif->mvm; struct iwl_fw_dbg_trigger_missed_bcon *bcon_trig; struct iwl_fw_dbg_trigger_tlv *trigger; u32 stop_trig_missed_bcon, stop_trig_missed_bcon_since_rx; +#endif u32 rx_missed_bcon, rx_missed_bcon_since_rx; if (mvmvif->id != (u16)le32_to_cpu(missed_beacons->mac_id)) @@ -1395,6 +1397,7 @@ static void iwl_mvm_beacon_loss_iterator(void *_data, u8 *mac, IWL_MVM_MISSED_BEACONS_THRESHOLD) ieee80211_beacon_loss(vif); +#ifdef CONFIG_IWLWIFI_DEBUGFS if (!iwl_fw_dbg_trigger_enabled(mvm->fw, FW_DBG_TRIGGER_MISSED_BEACONS)) return; @@ -1414,6 +1417,7 @@ static void iwl_mvm_beacon_loss_iterator(void *_data, u8 *mac, if (rx_missed_bcon_since_rx >= stop_trig_missed_bcon_since_rx || rx_missed_bcon >= stop_trig_missed_bcon) iwl_mvm_fw_dbg_collect_trig(mvm, trigger, NULL, 0); +#endif } int iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm, diff --git a/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c index 1bd10ed..850c72c 100644 --- a/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c +++ b/drivers/net/wireless/iwlwifi/mvm/phy-ctxt.c @@ -175,8 +175,11 @@ static void iwl_mvm_phy_ctxt_cmd_data(struct iwl_mvm *mvm, cmd->rxchain_info |= cpu_to_le32(idle_cnt << PHY_RX_CHAIN_CNT_POS); cmd->rxchain_info |= cpu_to_le32(active_cnt << PHY_RX_CHAIN_MIMO_CNT_POS); + +#ifdef CONFIG_IWLWIFI_DEBUGFS if (unlikely(mvm->dbgfs_rx_phyinfo)) cmd->rxchain_info = cpu_to_le32(mvm->dbgfs_rx_phyinfo); +#endif cmd->txchain_info = cpu_to_le32(iwl_mvm_get_valid_tx_ant(mvm)); }