iwlwifi: mvm: Support new version of ranging response notification
As part of the new rate_n_flags, FW added a new version for LOCATION_RANGE_RSP_NTFY, and it's internal structure - LOCATION_RANGE_RSP_AP_ETRY_NTFY. Add support for this. Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20211017123741.c5c6c863631e.I4b493f4eeabbfa1dc965ae012b72fc57de7d5f4f@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
committed by
Luca Coelho
parent
82cdbd11b6
commit
bd8b5f30fa
@ -1501,7 +1501,9 @@ struct iwl_tof_range_rsp_ap_entry_ntfy_v6 {
|
||||
u8 reserved[3];
|
||||
u8 rx_pn[IEEE80211_CCMP_PN_LEN];
|
||||
u8 tx_pn[IEEE80211_CCMP_PN_LEN];
|
||||
} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_6 */
|
||||
} __packed; /* LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_6,
|
||||
LOCATION_RANGE_RSP_AP_ETRY_NTFY_API_S_VER_7 */
|
||||
|
||||
|
||||
/**
|
||||
* enum iwl_tof_response_status - tof response status
|
||||
@ -1582,7 +1584,8 @@ struct iwl_tof_range_rsp_ntfy_v8 {
|
||||
u8 last_report;
|
||||
u8 reserved;
|
||||
struct iwl_tof_range_rsp_ap_entry_ntfy_v6 ap[IWL_MVM_TOF_MAX_APS];
|
||||
} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_8 */
|
||||
} __packed; /* LOCATION_RANGE_RSP_NTFY_API_S_VER_8,
|
||||
LOCATION_RANGE_RSP_NTFY_API_S_VER_9 */
|
||||
|
||||
#define IWL_MVM_TOF_MCSI_BUF_SIZE (245)
|
||||
/**
|
||||
|
@ -1154,6 +1154,7 @@ static u8 iwl_mvm_ftm_get_range_resp_ver(struct iwl_mvm *mvm)
|
||||
static bool iwl_mvm_ftm_resp_size_validation(u8 ver, unsigned int pkt_len)
|
||||
{
|
||||
switch (ver) {
|
||||
case 9:
|
||||
case 8:
|
||||
return pkt_len == sizeof(struct iwl_tof_range_rsp_ntfy_v8);
|
||||
case 7:
|
||||
@ -1217,7 +1218,7 @@ void iwl_mvm_ftm_range_resp(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb)
|
||||
int peer_idx;
|
||||
|
||||
if (new_api) {
|
||||
if (notif_ver == 8) {
|
||||
if (notif_ver >= 8) {
|
||||
fw_ap = &fw_resp_v8->ap[i];
|
||||
iwl_mvm_ftm_pasn_update_pn(mvm, fw_ap);
|
||||
} else if (notif_ver == 7) {
|
||||
|
@ -1044,8 +1044,8 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg,
|
||||
mvm->cmd_ver.range_resp =
|
||||
iwl_fw_lookup_notif_ver(mvm->fw, LOCATION_GROUP,
|
||||
TOF_RANGE_RESPONSE_NOTIF, 5);
|
||||
/* we only support up to version 8 */
|
||||
if (WARN_ON_ONCE(mvm->cmd_ver.range_resp > 8))
|
||||
/* we only support up to version 9 */
|
||||
if (WARN_ON_ONCE(mvm->cmd_ver.range_resp > 9))
|
||||
goto out_free;
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user