From patchwork Sat Mar 7 02:36:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Eric W. Biederman" X-Patchwork-Id: 5958351 X-Patchwork-Delegate: kvalo@adurom.com 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 CDFB79F373 for ; Sat, 7 Mar 2015 02:40:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D3836202F2 for ; Sat, 7 Mar 2015 02:40:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F15FE20361 for ; Sat, 7 Mar 2015 02:40:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753877AbbCGCkM (ORCPT ); Fri, 6 Mar 2015 21:40:12 -0500 Received: from out03.mta.xmission.com ([166.70.13.233]:55939 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753594AbbCGCkL convert rfc822-to-8bit (ORCPT ); Fri, 6 Mar 2015 21:40:11 -0500 Received: from in02.mta.xmission.com ([166.70.13.52]) by out03.mta.xmission.com with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1YU4ew-0008LT-6X; Fri, 06 Mar 2015 19:40:10 -0700 Received: from 70-59-163-10.omah.qwest.net ([70.59.163.10] helo=x220.int.ebiederm.org.xmission.com) by in02.mta.xmission.com with esmtpsa (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1YU4ev-0007Dq-Gn; Fri, 06 Mar 2015 19:40:10 -0700 From: ebiederm@xmission.com (Eric W. Biederman) To: Kalle Valo Cc: David Miller , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Emmanuel Grumbach References: <874mpy2gw5.fsf@kamboji.qca.qualcomm.com> <87fv9h7cwl.fsf@x220.int.ebiederm.org> Date: Fri, 06 Mar 2015 20:36:34 -0600 In-Reply-To: <87fv9h7cwl.fsf@x220.int.ebiederm.org> (Eric W. Biederman's message of "Fri, 06 Mar 2015 20:35:22 -0600") Message-ID: <87bnk57cul.fsf_-_@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 X-XM-AID: U2FsdGVkX1/okVUwTwMRFxhc91yzVQElFjv7cbX6x6o= X-SA-Exim-Connect-IP: 70.59.163.10 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.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=unavailable version=3.3.1 X-Spam-DCC: XMission; sa05 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: **;Kalle Valo X-Spam-Relay-Country: X-Spam-Timing: total 301 ms - load_scoreonly_sql: 0.10 (0.0%), signal_user_changed: 5 (1.7%), b_tie_ro: 3.7 (1.2%), parse: 1.51 (0.5%), extract_message_metadata: 18 (6.0%), get_uri_detail_list: 2.9 (1.0%), tests_pri_-1000: 5 (1.8%), tests_pri_-950: 1.08 (0.4%), tests_pri_-900: 0.88 (0.3%), tests_pri_-400: 19 (6.2%), check_bayes: 18 (5.9%), b_tokenize: 5 (1.7%), b_tok_get_all: 6 (2.0%), b_comp_prob: 1.65 (0.5%), b_tok_touch_all: 3.0 (1.0%), b_finish: 0.64 (0.2%), tests_pri_0: 243 (80.6%), tests_pri_500: 4.2 (1.4%), rewrite_mail: 0.00 (0.0%) Subject: [PATCH 1/2] iwlwifi: mvm: Fix the build of mvm/mac-ctxt.c with debugfs disabled X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When attempting to build my kernel I get: CC drivers/net/wireless/iwlwifi/mvm/mac-ctxt.o drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c: In function ‘iwl_mvm_beacon_loss_iterator’: drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c:1378:30: error: ‘struct iwl_mvm_vif’ has no member named ‘mvm’ Fix that by making the new code depend on IWLWIFI_DEBUGFS as the definition of mvm in struct iwl_mvm_if does. Cc: Emmanuel Grumbach Fixes: 9d761fd8a58360e iwlwifi: mvm: add trigger for firmware dump upon missed beacons Signed-off-by: "Eric W. Biederman" --- drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c index 581b3b8f29f9..7ad736ff90ff 100644 --- a/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c +++ b/drivers/net/wireless/iwlwifi/mvm/mac-ctxt.c @@ -1375,18 +1375,21 @@ 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; u32 rx_missed_bcon, rx_missed_bcon_since_rx; +#endif if (mvmvif->id != (u16)le32_to_cpu(missed_beacons->mac_id)) return; - +#ifdef CONFIG_IWLWIFI_DEBUGFS rx_missed_bcon = le32_to_cpu(missed_beacons->consec_missed_beacons); rx_missed_bcon_since_rx = le32_to_cpu(missed_beacons->consec_missed_beacons_since_last_rx); +#endif /* * TODO: the threshold should be adjusted based on latency conditions, * and/or in case of a CS flow on one of the other AP vifs. @@ -1395,6 +1398,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 +1418,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 /* CONFIG_IWLWIFI_DEBUGFS */ } int iwl_mvm_rx_missed_beacons_notif(struct iwl_mvm *mvm,