aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-drv.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-02-08 13:16:17 -0500
committerJohn W. Linville <linville@tuxdriver.com>2013-02-08 13:16:17 -0500
commitf5237f278f30a92401539a54f87ee0c717b6f818 (patch)
tree209d4fd6fb00e660c76ca8ac5d4caed59dbb9957 /drivers/net/wireless/iwlwifi/iwl-drv.c
parentb285109dde7b873b5dc671ef1b3ae3090f4bc72f (diff)
parentb26f5f09ebdeb85ab152344cc1d6d484a3ce967d (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-drv.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-drv.c27
1 files changed, 18 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c
index d3549f493a17..6f228bb2b844 100644
--- a/drivers/net/wireless/iwlwifi/iwl-drv.c
+++ b/drivers/net/wireless/iwlwifi/iwl-drv.c
@@ -5,7 +5,7 @@
5 * 5 *
6 * GPL LICENSE SUMMARY 6 * GPL LICENSE SUMMARY
7 * 7 *
8 * Copyright(c) 2007 - 2012 Intel Corporation. All rights reserved. 8 * Copyright(c) 2007 - 2013 Intel Corporation. All rights reserved.
9 * 9 *
10 * This program is free software; you can redistribute it and/or modify 10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of version 2 of the GNU General Public License as 11 * it under the terms of version 2 of the GNU General Public License as
@@ -30,7 +30,7 @@
30 * 30 *
31 * BSD LICENSE 31 * BSD LICENSE
32 * 32 *
33 * Copyright(c) 2005 - 2012 Intel Corporation. All rights reserved. 33 * Copyright(c) 2005 - 2013 Intel Corporation. All rights reserved.
34 * All rights reserved. 34 * All rights reserved.
35 * 35 *
36 * Redistribution and use in source and binary forms, with or without 36 * Redistribution and use in source and binary forms, with or without
@@ -139,8 +139,10 @@ struct iwl_drv {
139#endif 139#endif
140}; 140};
141 141
142#define DVM_OP_MODE 0 142enum {
143#define MVM_OP_MODE 1 143 DVM_OP_MODE = 0,
144 MVM_OP_MODE = 1,
145};
144 146
145/* Protects the table contents, i.e. the ops pointer & drv list */ 147/* Protects the table contents, i.e. the ops pointer & drv list */
146static struct mutex iwlwifi_opmode_table_mtx; 148static struct mutex iwlwifi_opmode_table_mtx;
@@ -149,8 +151,8 @@ static struct iwlwifi_opmode_table {
149 const struct iwl_op_mode_ops *ops; /* pointer to op_mode ops */ 151 const struct iwl_op_mode_ops *ops; /* pointer to op_mode ops */
150 struct list_head drv; /* list of devices using this op_mode */ 152 struct list_head drv; /* list of devices using this op_mode */
151} iwlwifi_opmode_table[] = { /* ops set when driver is initialized */ 153} iwlwifi_opmode_table[] = { /* ops set when driver is initialized */
152 { .name = "iwldvm", .ops = NULL }, 154 [DVM_OP_MODE] = { .name = "iwldvm", .ops = NULL },
153 { .name = "iwlmvm", .ops = NULL }, 155 [MVM_OP_MODE] = { .name = "iwlmvm", .ops = NULL },
154}; 156};
155 157
156/* 158/*
@@ -268,7 +270,7 @@ struct fw_sec_parsing {
268 */ 270 */
269struct iwl_tlv_calib_data { 271struct iwl_tlv_calib_data {
270 __le32 ucode_type; 272 __le32 ucode_type;
271 __le64 calib; 273 struct iwl_tlv_calib_ctrl calib;
272} __packed; 274} __packed;
273 275
274struct iwl_firmware_pieces { 276struct iwl_firmware_pieces {
@@ -358,7 +360,11 @@ static int iwl_set_default_calib(struct iwl_drv *drv, const u8 *data)
358 ucode_type); 360 ucode_type);
359 return -EINVAL; 361 return -EINVAL;
360 } 362 }
361 drv->fw.default_calib[ucode_type] = le64_to_cpu(def_calib->calib); 363 drv->fw.default_calib[ucode_type].flow_trigger =
364 def_calib->calib.flow_trigger;
365 drv->fw.default_calib[ucode_type].event_trigger =
366 def_calib->calib.event_trigger;
367
362 return 0; 368 return 0;
363} 369}
364 370
@@ -959,7 +965,10 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context)
959 release_firmware(ucode_raw); 965 release_firmware(ucode_raw);
960 966
961 mutex_lock(&iwlwifi_opmode_table_mtx); 967 mutex_lock(&iwlwifi_opmode_table_mtx);
962 op = &iwlwifi_opmode_table[DVM_OP_MODE]; 968 if (fw->mvm_fw)
969 op = &iwlwifi_opmode_table[MVM_OP_MODE];
970 else
971 op = &iwlwifi_opmode_table[DVM_OP_MODE];
963 972
964 /* add this device to the list of devices using this op_mode */ 973 /* add this device to the list of devices using this op_mode */
965 list_add_tail(&drv->list, &op->drv); 974 list_add_tail(&drv->list, &op->drv);