wifi: iwlwifi: stop supporting iwl_omi_send_status_notif ver 1

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
This commit is contained in:
Miri Korenblit 2025-07-23 09:45:09 +03:00
parent 5d94c61c9d
commit b089c415e0
3 changed files with 14 additions and 36 deletions

View 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

View 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,

View 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))