Skip to content

Commit ab3f9c8

Browse files
andy-shevkvalo
authored andcommitted
ath10k: switch to use new generic UUID API
There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Kalle Valo <[email protected]>
1 parent f35a7f9 commit ab3f9c8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

drivers/net/wireless/ath/ath10k/core.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ struct ath10k_ce_crash_hdr {
462462
struct ath10k_fw_crash_data {
463463
bool crashed_since_read;
464464

465-
uuid_le uuid;
465+
guid_t guid;
466466
struct timespec timestamp;
467467
__le32 registers[REG_DUMP_COUNT_QCA988X];
468468
struct ath10k_ce_crash_data ce_crash_data[CE_COUNT_MAX];

drivers/net/wireless/ath/ath10k/debug.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ struct ath10k_dump_file_data {
7070

7171
/* some info we can get from ath10k struct that might help */
7272

73-
u8 uuid[16];
73+
guid_t guid;
7474

7575
__le32 chip_id;
7676

@@ -719,7 +719,7 @@ ath10k_debug_get_new_fw_crash_data(struct ath10k *ar)
719719
lockdep_assert_held(&ar->data_lock);
720720

721721
crash_data->crashed_since_read = true;
722-
uuid_le_gen(&crash_data->uuid);
722+
guid_gen(&crash_data->guid);
723723
getnstimeofday(&crash_data->timestamp);
724724

725725
return crash_data;
@@ -766,7 +766,7 @@ static struct ath10k_dump_file_data *ath10k_build_dump_file(struct ath10k *ar,
766766

767767
dump_data->version = cpu_to_le32(ATH10K_FW_CRASH_DUMP_VERSION);
768768

769-
memcpy(dump_data->uuid, &crash_data->uuid, sizeof(dump_data->uuid));
769+
guid_copy(&dump_data->guid, &crash_data->guid);
770770
dump_data->chip_id = cpu_to_le32(ar->chip_id);
771771
dump_data->bus_type = cpu_to_le32(0);
772772
dump_data->target_version = cpu_to_le32(ar->target_version);

drivers/net/wireless/ath/ath10k/pci.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1463,7 +1463,7 @@ static void ath10k_pci_dump_registers(struct ath10k *ar,
14631463
static void ath10k_pci_fw_crashed_dump(struct ath10k *ar)
14641464
{
14651465
struct ath10k_fw_crash_data *crash_data;
1466-
char uuid[50];
1466+
char guid[UUID_STRING_LEN + 1];
14671467

14681468
spin_lock_bh(&ar->data_lock);
14691469

@@ -1472,11 +1472,11 @@ static void ath10k_pci_fw_crashed_dump(struct ath10k *ar)
14721472
crash_data = ath10k_debug_get_new_fw_crash_data(ar);
14731473

14741474
if (crash_data)
1475-
scnprintf(uuid, sizeof(uuid), "%pUl", &crash_data->uuid);
1475+
scnprintf(guid, sizeof(guid), "%pUl", &crash_data->guid);
14761476
else
1477-
scnprintf(uuid, sizeof(uuid), "n/a");
1477+
scnprintf(guid, sizeof(guid), "n/a");
14781478

1479-
ath10k_err(ar, "firmware crashed! (uuid %s)\n", uuid);
1479+
ath10k_err(ar, "firmware crashed! (guid %s)\n", guid);
14801480
ath10k_print_driver_info(ar);
14811481
ath10k_pci_dump_registers(ar, crash_data);
14821482
ath10k_ce_dump_registers(ar, crash_data);

0 commit comments

Comments
 (0)