diff options
author | Eran Harary <eran.harary@intel.com> | 2014-02-03 02:29:57 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-02-06 14:12:26 -0500 |
commit | 01a9ca510ba4413895d4add6f26665d6c37a5413 (patch) | |
tree | 77a6e76170d1f896ba4e5658258117ffbd6b6b24 /drivers/net/wireless/iwlwifi/mvm/fw.c | |
parent | 9d91356bdc140f2b21c9744d4600fce4af2e4a79 (diff) |
iwlwifi: mvm: support alive notification api version2
Alive notification ver2 support error table information
for 2 CPUs.
This is useful to fetch the error information in case of
firmware assert.
Signed-off-by: Eran Harary <eran.harary@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm/fw.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw.c | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw.c b/drivers/net/wireless/iwlwifi/mvm/fw.c index 155bb20519c2..bae75b308fc0 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw.c +++ b/drivers/net/wireless/iwlwifi/mvm/fw.c | |||
@@ -110,18 +110,46 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait, | |||
110 | container_of(notif_wait, struct iwl_mvm, notif_wait); | 110 | container_of(notif_wait, struct iwl_mvm, notif_wait); |
111 | struct iwl_mvm_alive_data *alive_data = data; | 111 | struct iwl_mvm_alive_data *alive_data = data; |
112 | struct mvm_alive_resp *palive; | 112 | struct mvm_alive_resp *palive; |
113 | 113 | struct mvm_alive_resp_ver2 *palive2; | |
114 | palive = (void *)pkt->data; | 114 | |
115 | 115 | if (iwl_rx_packet_payload_len(pkt) == sizeof(*palive)) { | |
116 | mvm->error_event_table = le32_to_cpu(palive->error_event_table_ptr); | 116 | palive = (void *)pkt->data; |
117 | mvm->log_event_table = le32_to_cpu(palive->log_event_table_ptr); | 117 | |
118 | alive_data->scd_base_addr = le32_to_cpu(palive->scd_base_ptr); | 118 | mvm->support_umac_log = false; |
119 | 119 | mvm->error_event_table = | |
120 | alive_data->valid = le16_to_cpu(palive->status) == IWL_ALIVE_STATUS_OK; | 120 | le32_to_cpu(palive->error_event_table_ptr); |
121 | IWL_DEBUG_FW(mvm, | 121 | mvm->log_event_table = le32_to_cpu(palive->log_event_table_ptr); |
122 | "Alive ucode status 0x%04x revision 0x%01X 0x%01X flags 0x%01X\n", | 122 | alive_data->scd_base_addr = le32_to_cpu(palive->scd_base_ptr); |
123 | le16_to_cpu(palive->status), palive->ver_type, | 123 | |
124 | palive->ver_subtype, palive->flags); | 124 | alive_data->valid = le16_to_cpu(palive->status) == |
125 | IWL_ALIVE_STATUS_OK; | ||
126 | IWL_DEBUG_FW(mvm, | ||
127 | "Alive VER1 ucode status 0x%04x revision 0x%01X 0x%01X flags 0x%01X\n", | ||
128 | le16_to_cpu(palive->status), palive->ver_type, | ||
129 | palive->ver_subtype, palive->flags); | ||
130 | } else { | ||
131 | palive2 = (void *)pkt->data; | ||
132 | |||
133 | mvm->support_umac_log = true; | ||
134 | mvm->error_event_table = | ||
135 | le32_to_cpu(palive2->error_event_table_ptr); | ||
136 | mvm->log_event_table = | ||
137 | le32_to_cpu(palive2->log_event_table_ptr); | ||
138 | alive_data->scd_base_addr = le32_to_cpu(palive2->scd_base_ptr); | ||
139 | mvm->umac_error_event_table = | ||
140 | le32_to_cpu(palive2->error_info_addr); | ||
141 | |||
142 | alive_data->valid = le16_to_cpu(palive2->status) == | ||
143 | IWL_ALIVE_STATUS_OK; | ||
144 | IWL_DEBUG_FW(mvm, | ||
145 | "Alive VER2 ucode status 0x%04x revision 0x%01X 0x%01X flags 0x%01X\n", | ||
146 | le16_to_cpu(palive2->status), palive2->ver_type, | ||
147 | palive2->ver_subtype, palive2->flags); | ||
148 | |||
149 | IWL_DEBUG_FW(mvm, | ||
150 | "UMAC version: Major - 0x%x, Minor - 0x%x\n", | ||
151 | palive2->umac_major, palive2->umac_minor); | ||
152 | } | ||
125 | 153 | ||
126 | return true; | 154 | return true; |
127 | } | 155 | } |