mirror of
https://github.com/torvalds/linux.git
synced 2026-10-11 04:47:02 +02:00
wifi: iwlwifi: mld: support aborting an ongoing ftm request
Add support for aborting an ongoing FTM request. Signed-off-by: Avraham Stern <avraham.stern@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20260715220243.340040bdc6a3.Ifbbf70021e42bf1d59db6ec45a73f1806a1c2289@changeid
This commit is contained in:
parent
71ac392d8b
commit
ef704fc32a
|
|
@ -459,3 +459,24 @@ void iwl_mld_ftm_restart_cleanup(struct iwl_mld *mld)
|
|||
mld->ftm_initiator.req, GFP_KERNEL);
|
||||
iwl_mld_ftm_reset(mld);
|
||||
}
|
||||
|
||||
void iwl_mld_ftm_abort(struct iwl_mld *mld, struct cfg80211_pmsr_request *req)
|
||||
{
|
||||
struct iwl_tof_range_abort_cmd cmd = {
|
||||
.request_id = req->cookie,
|
||||
};
|
||||
|
||||
lockdep_assert_wiphy(mld->wiphy);
|
||||
|
||||
if (req != mld->ftm_initiator.req)
|
||||
return;
|
||||
|
||||
if (iwl_mld_send_cmd_pdu(mld, WIDE_ID(LOCATION_GROUP,
|
||||
TOF_RANGE_ABORT_CMD),
|
||||
&cmd))
|
||||
IWL_ERR(mld, "failed to abort FTM process\n");
|
||||
|
||||
iwl_mld_cancel_notifications_of_object(mld, IWL_MLD_OBJECT_TYPE_FTM_REQ,
|
||||
mld->ftm_initiator.req->cookie);
|
||||
iwl_mld_ftm_reset(mld);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,5 +25,6 @@ int iwl_mld_ftm_start(struct iwl_mld *mld, struct ieee80211_vif *vif,
|
|||
void iwl_mld_handle_ftm_resp_notif(struct iwl_mld *mld,
|
||||
struct iwl_rx_packet *pkt);
|
||||
void iwl_mld_ftm_restart_cleanup(struct iwl_mld *mld);
|
||||
void iwl_mld_ftm_abort(struct iwl_mld *mld, struct cfg80211_pmsr_request *req);
|
||||
|
||||
#endif /* __iwl_mld_ftm_initiator_h__ */
|
||||
|
|
|
|||
|
|
@ -2852,6 +2852,15 @@ static int iwl_mld_start_pmsr(struct ieee80211_hw *hw,
|
|||
return iwl_mld_ftm_start(mld, vif, request);
|
||||
}
|
||||
|
||||
static void iwl_mld_abort_pmsr(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif,
|
||||
struct cfg80211_pmsr_request *request)
|
||||
{
|
||||
struct iwl_mld *mld = IWL_MAC80211_GET_MLD(hw);
|
||||
|
||||
iwl_mld_ftm_abort(mld, request);
|
||||
}
|
||||
|
||||
static enum ieee80211_neg_ttlm_res
|
||||
iwl_mld_can_neg_ttlm(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
|
||||
struct ieee80211_neg_ttlm *neg_ttlm)
|
||||
|
|
@ -2973,6 +2982,7 @@ const struct ieee80211_ops iwl_mld_hw_ops = {
|
|||
.prep_add_interface = iwl_mld_prep_add_interface,
|
||||
.set_hw_timestamp = iwl_mld_set_hw_timestamp,
|
||||
.start_pmsr = iwl_mld_start_pmsr,
|
||||
.abort_pmsr = iwl_mld_abort_pmsr,
|
||||
.can_neg_ttlm = iwl_mld_can_neg_ttlm,
|
||||
.start_nan = iwl_mld_start_nan,
|
||||
.stop_nan = iwl_mld_stop_nan,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user