ath11k: Align bss_chan_info structure with firmware
authorSeevalamuthu Mariappan <seevalam@codeaurora.org>
Tue, 20 Jul 2021 21:49:22 +0000 (00:49 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:16:10 +0000 (19:16 +0100)
[ Upstream commit feab5bb8f1d4621025dceae7eef62d5f92de34ac ]

pdev_id in structure 'wmi_pdev_bss_chan_info_event' is wrongly placed
at the beginning. This causes invalid values in survey dump. Hence, align
the structure with the firmware.

Note: The firmware releases follow this order since the feature was
implemented. Also, it is not changing across the branches including
QCA6390.

Tested-on: IPQ8074 hw2.0 AHB WLAN.HK.2.1.0.1-01228-QCAHKSWPL_SILICONZ-1

Signed-off-by: Ritesh Singh <ritesi@codeaurora.org>
Signed-off-by: Seevalamuthu Mariappan <seevalam@codeaurora.org>
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20210720214922.118078-3-jouni@codeaurora.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/wireless/ath/ath11k/wmi.c
drivers/net/wireless/ath/ath11k/wmi.h

index 6c253eae9d0692b083c342f7b7708a6ee9899ccc..27c060dd3fb47de8430b0639f1c3ac9057aa0a16 100644 (file)
@@ -1339,6 +1339,7 @@ int ath11k_wmi_pdev_bss_chan_info_request(struct ath11k *ar,
                                     WMI_TAG_PDEV_BSS_CHAN_INFO_REQUEST) |
                          FIELD_PREP(WMI_TLV_LEN, sizeof(*cmd) - TLV_HDR_SIZE);
        cmd->req_type = type;
+       cmd->pdev_id = ar->pdev->pdev_id;
 
        ath11k_dbg(ar->ab, ATH11K_DBG_WMI,
                   "WMI bss chan info req type %d\n", type);
index d35c47e0b19d429bd55bd5a35a0bdf1103399484..0b7d337b36930a7fbdd30adb781d4b96b9d4dc3c 100644 (file)
@@ -2960,6 +2960,7 @@ struct wmi_pdev_bss_chan_info_req_cmd {
        u32 tlv_header;
        /* ref wmi_bss_chan_info_req_type */
        u32 req_type;
+       u32 pdev_id;
 } __packed;
 
 struct wmi_ap_ps_peer_cmd {
@@ -4056,7 +4057,6 @@ struct wmi_vdev_stopped_event {
 } __packed;
 
 struct wmi_pdev_bss_chan_info_event {
-       u32 pdev_id;
        u32 freq;       /* Units in MHz */
        u32 noise_floor;        /* units are dBm */
        /* rx clear - how often the channel was unused */
@@ -4074,6 +4074,7 @@ struct wmi_pdev_bss_chan_info_event {
        /*rx_cycle cnt for my bss in 64bits format */
        u32 rx_bss_cycle_count_low;
        u32 rx_bss_cycle_count_high;
+       u32 pdev_id;
 } __packed;
 
 #define WMI_VDEV_INSTALL_KEY_COMPL_STATUS_SUCCESS 0