mac_caps = wmi_mac_phy_caps + phy_idx;
 
-       pdev->pdev_id = le32_to_cpu(mac_caps->pdev_id);
+       pdev->pdev_id = ath12k_wmi_mac_phy_get_pdev_id(mac_caps);
        pdev_cap->supported_bands |= le32_to_cpu(mac_caps->supported_bands);
        pdev_cap->ampdu_density = le32_to_cpu(mac_caps->ampdu_density);
 
        fw_pdev = &ab->fw_pdev[ab->fw_pdev_count];
        fw_pdev->supported_bands = le32_to_cpu(mac_caps->supported_bands);
-       fw_pdev->pdev_id = le32_to_cpu(mac_caps->pdev_id);
+       fw_pdev->pdev_id = ath12k_wmi_mac_phy_get_pdev_id(mac_caps);
        fw_pdev->phy_id = le32_to_cpu(mac_caps->phy_id);
        ab->fw_pdev_count++;
 
                for (i = 0; i < ab->fw_pdev_count; i++) {
                        struct ath12k_fw_pdev *fw_pdev = &ab->fw_pdev[i];
 
-                       if (fw_pdev->pdev_id == le32_to_cpu(caps->pdev_id) &&
+                       if (fw_pdev->pdev_id == ath12k_wmi_caps_ext_get_pdev_id(caps) &&
                            fw_pdev->phy_id == le32_to_cpu(caps->phy_id)) {
                                bands = fw_pdev->supported_bands;
                                break;
                        return 0;
        } else {
                for (i = 0; i < ab->num_radios; i++) {
-                       if (ab->pdevs[i].pdev_id == le32_to_cpu(caps->pdev_id))
+                       if (ab->pdevs[i].pdev_id ==
+                           ath12k_wmi_caps_ext_get_pdev_id(caps))
                                break;
                }
 
 
 
 #define WMI_MAX_HECAP_PHY_SIZE                 (3)
 
+/* pdev_id is present in lower 16 bits of pdev_and_hw_link_ids in
+ * ath12k_wmi_mac_phy_caps_params & ath12k_wmi_caps_ext_params.
+ *
+ * hw_link_id is present in higher 16 bits of pdev_and_hw_link_ids.
+ */
+#define WMI_CAPS_PARAMS_PDEV_ID                GENMASK(15, 0)
+#define WMI_CAPS_PARAMS_HW_LINK_ID     GENMASK(31, 16)
+
 struct ath12k_wmi_mac_phy_caps_params {
        __le32 hw_mode_id;
-       __le32 pdev_id;
+       __le32 pdev_and_hw_link_ids;
        __le32 phy_id;
        __le32 supported_flags;
        __le32 supported_bands;
 
 struct ath12k_wmi_caps_ext_params {
        __le32 hw_mode_id;
-       union {
-               struct {
-                       __le16 pdev_id;
-                       __le16 hw_link_id;
-               } __packed ath12k_wmi_pdev_to_link_map;
-               __le32 pdev_id;
-       };
+       __le32 pdev_and_hw_link_ids;
        __le32 phy_id;
        __le32 wireless_modes_ext;
        __le32 eht_cap_mac_info_2ghz[WMI_MAX_EHTCAP_MAC_SIZE];
 int ath12k_wmi_set_hw_mode(struct ath12k_base *ab,
                           enum wmi_host_hw_mode_config_type mode);
 
+static inline u32
+ath12k_wmi_caps_ext_get_pdev_id(const struct ath12k_wmi_caps_ext_params *param)
+{
+       return le32_get_bits(param->pdev_and_hw_link_ids, WMI_CAPS_PARAMS_PDEV_ID);
+}
+
+static inline u32
+ath12k_wmi_caps_ext_get_hw_link_id(const struct ath12k_wmi_caps_ext_params *param)
+{
+       return le32_get_bits(param->pdev_and_hw_link_ids, WMI_CAPS_PARAMS_HW_LINK_ID);
+}
+
+static inline u32
+ath12k_wmi_mac_phy_get_pdev_id(const struct ath12k_wmi_mac_phy_caps_params *param)
+{
+       return le32_get_bits(param->pdev_and_hw_link_ids,
+                            WMI_CAPS_PARAMS_PDEV_ID);
+}
+
+static inline u32
+ath12k_wmi_mac_phy_get_hw_link_id(const struct ath12k_wmi_mac_phy_caps_params *param)
+{
+       return le32_get_bits(param->pdev_and_hw_link_ids,
+                            WMI_CAPS_PARAMS_HW_LINK_ID);
+}
+
 #endif