wifi: iwlwifi: add support for ALIVE v8
The firmware added a field to describe the platform Id. Just print it. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250430155443.dc387ae36e0f.Iafd364c6b23749597b658015be97295ad0c1730d@changeid
This commit is contained in:
committed by
Miri Korenblit
parent
f7cc80b871
commit
0bd6ede71a
@@ -112,6 +112,16 @@ struct iwl_alive_ntf_v6 {
|
||||
struct iwl_imr_alive_info imr;
|
||||
} __packed; /* UCODE_ALIVE_NTFY_API_S_VER_6 */
|
||||
|
||||
struct iwl_alive_ntf {
|
||||
__le16 status;
|
||||
__le16 flags;
|
||||
struct iwl_lmac_alive lmac_data[2];
|
||||
struct iwl_umac_alive umac_data;
|
||||
struct iwl_sku_id sku_id;
|
||||
struct iwl_imr_alive_info imr;
|
||||
__le64 platform_id;
|
||||
} __packed; /* UCODE_ALIVE_NTFY_API_S_VER_8 */
|
||||
|
||||
/**
|
||||
* enum iwl_extended_cfg_flags - commands driver may send before
|
||||
* finishing init flow
|
||||
|
||||
@@ -103,12 +103,13 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
||||
struct iwl_rx_packet *pkt, void *data)
|
||||
{
|
||||
unsigned int pkt_len = iwl_rx_packet_payload_len(pkt);
|
||||
unsigned int expected_sz;
|
||||
struct iwl_mld *mld =
|
||||
container_of(notif_wait, struct iwl_mld, notif_wait);
|
||||
struct iwl_trans *trans = mld->trans;
|
||||
u32 version = iwl_fw_lookup_notif_ver(mld->fw, LEGACY_GROUP,
|
||||
UCODE_ALIVE_NTFY, 0);
|
||||
struct iwl_alive_ntf_v6 *palive;
|
||||
struct iwl_alive_ntf *palive;
|
||||
bool *alive_valid = data;
|
||||
struct iwl_umac_alive *umac;
|
||||
struct iwl_lmac_alive *lmac1;
|
||||
@@ -117,7 +118,19 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
||||
u32 umac_error_table;
|
||||
u16 status;
|
||||
|
||||
if (version < 6 || version > 7 || pkt_len != sizeof(*palive))
|
||||
switch (version) {
|
||||
case 6:
|
||||
case 7:
|
||||
expected_sz = sizeof(struct iwl_alive_ntf_v6);
|
||||
break;
|
||||
case 8:
|
||||
expected_sz = sizeof(struct iwl_alive_ntf);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
||||
if (pkt_len != expected_sz)
|
||||
return false;
|
||||
|
||||
palive = (void *)pkt->data;
|
||||
@@ -171,6 +184,10 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
||||
IWL_DEBUG_FW(mld, "FW alive flags 0x%x\n",
|
||||
le16_to_cpu(palive->flags));
|
||||
|
||||
if (version >= 8)
|
||||
IWL_DEBUG_FW(mld, "platform_id 0x%llx\n",
|
||||
le64_to_cpu(palive->platform_id));
|
||||
|
||||
iwl_fwrt_update_fw_versions(&mld->fwrt, lmac1, umac);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -114,7 +114,7 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
||||
u32 i;
|
||||
|
||||
|
||||
if (version == 6) {
|
||||
if (version >= 6) {
|
||||
struct iwl_alive_ntf_v6 *palive;
|
||||
|
||||
if (pkt_len < sizeof(*palive))
|
||||
@@ -157,6 +157,17 @@ static bool iwl_alive_fn(struct iwl_notif_wait_data *notif_wait,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (version >= 8) {
|
||||
const struct iwl_alive_ntf *palive_v8 =
|
||||
(void *)pkt->data;
|
||||
|
||||
if (pkt_len < sizeof(*palive_v8))
|
||||
return false;
|
||||
|
||||
IWL_DEBUG_FW(mvm, "platform id: 0x%llx\n",
|
||||
palive_v8->platform_id);
|
||||
}
|
||||
}
|
||||
|
||||
if (version >= 5) {
|
||||
|
||||
Reference in New Issue
Block a user