aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
diff options
context:
space:
mode:
authorGolan Ben Ami <golan.ben.ami@intel.com>2017-10-22 08:58:26 -0400
committerLuca Coelho <luciano.coelho@intel.com>2018-04-26 08:18:07 -0400
commita8cbb46f831d2c101feccdd0e0daf3627b8c1dca (patch)
tree2f3d7499530ad0e45e31f2a4abbf74225e40fa9e /drivers/net/wireless/intel/iwlwifi/mvm/utils.c
parent0ddcf3e76ae4d02918e609342a1020b50258fadd (diff)
iwlwifi: allow different csr flags for different device families
Different device families may have different flag values for passing a message to the fw (i.e. SW_RESET). In order to keep the code readable, and avoid conditioning upon the family, store a value for each flag, which indicates the bit that needs to be enabled. Signed-off-by: Golan Ben Ami <golan.ben.ami@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Diffstat (limited to 'drivers/net/wireless/intel/iwlwifi/mvm/utils.c')
-rw-r--r--drivers/net/wireless/intel/iwlwifi/mvm/utils.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
index 0497c7a44def..b002a7afb5f5 100644
--- a/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
+++ b/drivers/net/wireless/intel/iwlwifi/mvm/utils.c
@@ -8,6 +8,7 @@
8 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. 8 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
9 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH 9 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
10 * Copyright (C) 2015 - 2017 Intel Deutschland GmbH 10 * Copyright (C) 2015 - 2017 Intel Deutschland GmbH
11 * Copyright(c) 2018 Intel Corporation
11 * 12 *
12 * This program is free software; you can redistribute it and/or modify 13 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of version 2 of the GNU General Public License as 14 * it under the terms of version 2 of the GNU General Public License as
@@ -35,6 +36,7 @@
35 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. 36 * Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved.
36 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH 37 * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH
37 * Copyright (C) 2015 - 2017 Intel Deutschland GmbH 38 * Copyright (C) 2015 - 2017 Intel Deutschland GmbH
39 * Copyright(c) 2018 Intel Corporation
38 * All rights reserved. 40 * All rights reserved.
39 * 41 *
40 * Redistribution and use in source and binary forms, with or without 42 * Redistribution and use in source and binary forms, with or without
@@ -520,15 +522,15 @@ static void iwl_mvm_dump_lmac_error_log(struct iwl_mvm *mvm, u32 base)
520 522
521 /* set INIT_DONE flag */ 523 /* set INIT_DONE flag */
522 iwl_set_bit(trans, CSR_GP_CNTRL, 524 iwl_set_bit(trans, CSR_GP_CNTRL,
523 CSR_GP_CNTRL_REG_FLAG_INIT_DONE); 525 BIT(trans->cfg->csr->flag_init_done));
524 526
525 /* and wait for clock stabilization */ 527 /* and wait for clock stabilization */
526 if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) 528 if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000)
527 udelay(2); 529 udelay(2);
528 530
529 err = iwl_poll_bit(trans, CSR_GP_CNTRL, 531 err = iwl_poll_bit(trans, CSR_GP_CNTRL,
530 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 532 BIT(trans->cfg->csr->flag_mac_clock_ready),
531 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 533 BIT(trans->cfg->csr->flag_mac_clock_ready),
532 25000); 534 25000);
533 if (err < 0) { 535 if (err < 0) {
534 IWL_DEBUG_INFO(trans, 536 IWL_DEBUG_INFO(trans,