]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
wifi: iwlwifi: stop supporting iwl_omi_send_status_notif ver 1
authorMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 23 Jul 2025 06:45:09 +0000 (09:45 +0300)
committerMiri Korenblit <miriam.rachel.korenblit@intel.com>
Wed, 23 Jul 2025 11:10:24 +0000 (14:10 +0300)
This version doesn't provide the sta id, so we need to look it up -
assuming that no other sta exists, since one of the conditions of
entering OMI is not having P2P/TDLS.

But when we leave OMI, because of the P2P/TDLS activation, the P2P/TDLS
sta can already exist while we receive the notification from the FW.
This causes an error log which is incorrect.

Since OMI is only supported in SC, which is not shipped yet, no one will
use a FW with the old version.
Remove support for it.

Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250723094230.b716b9cebaa7.I2a1cc4be441dbbb5566a9a3d2d330d956ff3ed38@changeid
drivers/net/wireless/intel/iwlwifi/fw/api/datapath.h
drivers/net/wireless/intel/iwlwifi/mld/link.c
drivers/net/wireless/intel/iwlwifi/mld/notif.c

index ee822a87c42ced5e94d5fc5e638989f14a483d24..083136a0c456ae17c131d38a19c90c3b1837648e 100644 (file)
@@ -699,15 +699,6 @@ struct iwl_sec_key_cmd {
        } __packed u; /* SEC_KEY_OPERATION_API_U_VER_1 */
 } __packed; /* SEC_KEY_CMD_API_S_VER_1 */
 
-/**
- * struct iwl_omi_send_status_notif_v1 - OMI status notification
- * @success: indicates that the OMI was sent successfully
- *     (currently always set)
- */
-struct iwl_omi_send_status_notif_v1 {
-       __le32 success;
-} __packed; /* OMI_SEND_STATUS_NTFY_API_S_VER_1 */
-
 /**
  * struct iwl_omi_send_status_notif - OMI status notification
  * @success: indicates that the OMI was sent successfully
index c48cc39096377fabb1a54e774ef456cda591dcda..9797510cab3f51ecde0f5da1015a7c077f414866 100644 (file)
@@ -649,40 +649,28 @@ void iwl_mld_omi_ap_changed_bw(struct iwl_mld *mld,
 void iwl_mld_handle_omi_status_notif(struct iwl_mld *mld,
                                     struct iwl_rx_packet *pkt)
 {
-       int ver = iwl_fw_lookup_notif_ver(mld->fw, DATA_PATH_GROUP,
-                                         OMI_SEND_STATUS_NOTIF, 1);
+       const struct iwl_omi_send_status_notif *notif = (const void *)pkt->data;
        struct ieee80211_link_sta *link_sta;
        struct iwl_mld_link *mld_link;
+       struct iwl_mld_vif *mld_vif;
        struct ieee80211_vif *vif;
+       u32 sta_id;
 
-       if (ver == 2) {
-               const struct iwl_omi_send_status_notif *notif =
-                       (const void *)pkt->data;
-               u32 sta_id = le32_to_cpu(notif->sta_id);
-               struct iwl_mld_vif *mld_vif;
+       sta_id = le32_to_cpu(notif->sta_id);
 
-               if (IWL_FW_CHECK(mld, sta_id >= mld->fw->ucode_capa.num_stations,
-                                "Invalid station %d\n", sta_id))
-                       return;
+       if (IWL_FW_CHECK(mld, sta_id >= mld->fw->ucode_capa.num_stations,
+                        "Invalid station %d\n", sta_id))
+               return;
 
-               link_sta = wiphy_dereference(mld->wiphy,
-                                            mld->fw_id_to_link_sta[sta_id]);
-               if (IWL_FW_CHECK(mld, !link_sta, "Station does not exist\n"))
-                       return;
+       link_sta = wiphy_dereference(mld->wiphy, mld->fw_id_to_link_sta[sta_id]);
+       if (IWL_FW_CHECK(mld, !link_sta, "Station does not exist\n"))
+               return;
 
-               vif = iwl_mld_sta_from_mac80211(link_sta->sta)->vif;
-               mld_vif = iwl_mld_vif_from_mac80211(vif);
+       vif = iwl_mld_sta_from_mac80211(link_sta->sta)->vif;
+       mld_vif = iwl_mld_vif_from_mac80211(vif);
 
-               mld_link = iwl_mld_link_dereference_check(mld_vif,
-                                                         link_sta->link_id);
-               if (WARN(!mld_link, "Link %d does not exist\n",
-                        link_sta->link_id))
-                       return;
-       } else {
-               vif = iwl_mld_get_omi_bw_reduction_pointers(mld, &link_sta,
-                                                           &mld_link);
-       }
-       if (IWL_FW_CHECK(mld, !vif, "unexpected OMI notification\n"))
+       mld_link = iwl_mld_link_dereference_check(mld_vif, link_sta->link_id);
+       if (WARN(!mld_link, "Link %d does not exist\n", link_sta->link_id))
                return;
 
        if (IWL_FW_CHECK(mld, !mld_link->rx_omi.bw_in_progress,
index 3cb700a9708e3f7c4352f1279f962e974f814332..e8f10e8145f944ce62d9df9c32468edbff2cc7e7 100644 (file)
@@ -351,7 +351,6 @@ CMD_VERSIONS(time_msmt_notif,
 CMD_VERSIONS(time_sync_confirm_notif,
             CMD_VER_ENTRY(1, iwl_time_msmt_cfm_notify))
 CMD_VERSIONS(omi_status_notif,
-            CMD_VER_ENTRY(1, iwl_omi_send_status_notif_v1)
             CMD_VER_ENTRY(2, iwl_omi_send_status_notif))
 CMD_VERSIONS(ftm_resp_notif, CMD_VER_ENTRY(10, iwl_tof_range_rsp_ntfy))
 CMD_VERSIONS(beacon_filter_notif, CMD_VER_ENTRY(2, iwl_beacon_filter_notif))