]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: mld: use spec link id and not FW link id
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 23 Jul 2025 06:45:12 +0000 (09:45 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 23 Jul 2025 11:10:24 +0000 (14:10 +0300)
In missed beacon handling, we compare the FW link id to the
bss_param_ch_cnt_link_id, which is a spec link id. Fix it.

Reviewed-by: Somashekhar Puttagangaiah <somashekhar.puttagangaiah@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250723094230.2104f8cac836.I25ed77c2b87bde82a9153e2aa26e09b8a42f6ee3@changeid
drivers/net/wireless/intel/iwlwifi/mld/link.c

index ca5e73cfe36e8954b1be837143d95d19c829715b..782fc41aa1c31446385d1938e24f3293fb0c368d 100644 (file)
@@ -524,21 +524,23 @@ void iwl_mld_handle_missed_beacon_notif(struct iwl_mld *mld,
 {
        const struct iwl_missed_beacons_notif *notif = (const void *)pkt->data;
        union iwl_dbg_tlv_tp_data tp_data = { .fw_pkt = pkt };
-       u32 link_id = le32_to_cpu(notif->link_id);
+       u32 fw_link_id = le32_to_cpu(notif->link_id);
        u32 missed_bcon = le32_to_cpu(notif->consec_missed_beacons);
        u32 missed_bcon_since_rx =
                le32_to_cpu(notif->consec_missed_beacons_since_last_rx);
        u32 scnd_lnk_bcn_lost =
                le32_to_cpu(notif->consec_missed_beacons_other_link);
        struct ieee80211_bss_conf *link_conf =
-               iwl_mld_fw_id_to_link_conf(mld, link_id);
+               iwl_mld_fw_id_to_link_conf(mld, fw_link_id);
        u32 bss_param_ch_cnt_link_id;
        struct ieee80211_vif *vif;
+       u8 link_id;
 
        if (WARN_ON(!link_conf))
                return;
 
        vif = link_conf->vif;
+       link_id = link_conf->link_id;
        bss_param_ch_cnt_link_id = link_conf->bss_param_ch_cnt_link_id;
 
        IWL_DEBUG_INFO(mld,
@@ -550,7 +552,7 @@ void iwl_mld_handle_missed_beacon_notif(struct iwl_mld *mld,
 
        mld->trans->dbg.dump_file_name_ext_valid = true;
        snprintf(mld->trans->dbg.dump_file_name_ext, IWL_FW_INI_MAX_NAME,
-                "LinkId_%d_MacType_%d", link_id,
+                "LinkId_%d_MacType_%d", fw_link_id,
                 iwl_mld_mac80211_iftype_to_fw(vif));
 
        iwl_dbg_tlv_time_point(&mld->fwrt,