iwlwifi: mvm: remove cipher scheme support
There are no shipping firmware versions with this, and there will also not be in the future, so remove the support. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Luca Coelho <luciano.coelho@intel.com> Link: https://lore.kernel.org/r/iwlwifi.20220304131517.8b3c8b4adf41.Ib3ddb6b250ea2dd72b4ecc88bdd5cffb86af1dcc@changeid Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
This commit is contained in:
parent
b49c2b252b
commit
8b3d2c4882
|
@ -518,34 +518,6 @@ enum iwl_fw_phy_cfg {
|
||||||
FW_PHY_CFG_SHARED_CLK = BIT(31),
|
FW_PHY_CFG_SHARED_CLK = BIT(31),
|
||||||
};
|
};
|
||||||
|
|
||||||
#define IWL_UCODE_MAX_CS 1
|
|
||||||
|
|
||||||
/**
|
|
||||||
* struct iwl_fw_cipher_scheme - a cipher scheme supported by FW.
|
|
||||||
* @cipher: a cipher suite selector
|
|
||||||
* @flags: cipher scheme flags (currently reserved for a future use)
|
|
||||||
* @hdr_len: a size of MPDU security header
|
|
||||||
* @pn_len: a size of PN
|
|
||||||
* @pn_off: an offset of pn from the beginning of the security header
|
|
||||||
* @key_idx_off: an offset of key index byte in the security header
|
|
||||||
* @key_idx_mask: a bit mask of key_idx bits
|
|
||||||
* @key_idx_shift: bit shift needed to get key_idx
|
|
||||||
* @mic_len: mic length in bytes
|
|
||||||
* @hw_cipher: a HW cipher index used in host commands
|
|
||||||
*/
|
|
||||||
struct iwl_fw_cipher_scheme {
|
|
||||||
__le32 cipher;
|
|
||||||
u8 flags;
|
|
||||||
u8 hdr_len;
|
|
||||||
u8 pn_len;
|
|
||||||
u8 pn_off;
|
|
||||||
u8 key_idx_off;
|
|
||||||
u8 key_idx_mask;
|
|
||||||
u8 key_idx_shift;
|
|
||||||
u8 mic_len;
|
|
||||||
u8 hw_cipher;
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
enum iwl_fw_dbg_reg_operator {
|
enum iwl_fw_dbg_reg_operator {
|
||||||
CSR_ASSIGN,
|
CSR_ASSIGN,
|
||||||
CSR_SETBIT,
|
CSR_SETBIT,
|
||||||
|
|
|
@ -133,16 +133,6 @@ struct iwl_fw_paging {
|
||||||
u32 fw_offs;
|
u32 fw_offs;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* struct iwl_fw_cscheme_list - a cipher scheme list
|
|
||||||
* @size: a number of entries
|
|
||||||
* @cs: cipher scheme entries
|
|
||||||
*/
|
|
||||||
struct iwl_fw_cscheme_list {
|
|
||||||
u8 size;
|
|
||||||
struct iwl_fw_cipher_scheme cs[];
|
|
||||||
} __packed;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* enum iwl_fw_type - iwlwifi firmware type
|
* enum iwl_fw_type - iwlwifi firmware type
|
||||||
* @IWL_FW_DVM: DVM firmware
|
* @IWL_FW_DVM: DVM firmware
|
||||||
|
@ -197,7 +187,6 @@ struct iwl_dump_exclude {
|
||||||
* @inst_evtlog_size: event log size for runtime ucode.
|
* @inst_evtlog_size: event log size for runtime ucode.
|
||||||
* @inst_errlog_ptr: error log offfset for runtime ucode.
|
* @inst_errlog_ptr: error log offfset for runtime ucode.
|
||||||
* @type: firmware type (&enum iwl_fw_type)
|
* @type: firmware type (&enum iwl_fw_type)
|
||||||
* @cipher_scheme: optional external cipher scheme.
|
|
||||||
* @human_readable: human readable version
|
* @human_readable: human readable version
|
||||||
* we get the ALIVE from the uCode
|
* we get the ALIVE from the uCode
|
||||||
* @phy_integration_ver: PHY integration version string
|
* @phy_integration_ver: PHY integration version string
|
||||||
|
@ -228,7 +217,6 @@ struct iwl_fw {
|
||||||
|
|
||||||
enum iwl_fw_type type;
|
enum iwl_fw_type type;
|
||||||
|
|
||||||
struct iwl_fw_cipher_scheme cs[IWL_UCODE_MAX_CS];
|
|
||||||
u8 human_readable[FW_VER_HUMAN_READABLE_SZ];
|
u8 human_readable[FW_VER_HUMAN_READABLE_SZ];
|
||||||
|
|
||||||
struct iwl_fw_dbg dbg;
|
struct iwl_fw_dbg dbg;
|
||||||
|
|
|
@ -324,30 +324,6 @@ static void set_sec_offset(struct iwl_firmware_pieces *pieces,
|
||||||
pieces->img[type].sec[sec].offset = offset;
|
pieces->img[type].sec[sec].offset = offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int iwl_store_cscheme(struct iwl_fw *fw, const u8 *data, const u32 len)
|
|
||||||
{
|
|
||||||
int i, j;
|
|
||||||
const struct iwl_fw_cscheme_list *l =
|
|
||||||
(const struct iwl_fw_cscheme_list *)data;
|
|
||||||
const struct iwl_fw_cipher_scheme *fwcs;
|
|
||||||
|
|
||||||
if (len < sizeof(*l) ||
|
|
||||||
len < sizeof(l->size) + l->size * sizeof(l->cs[0]))
|
|
||||||
return -EINVAL;
|
|
||||||
|
|
||||||
for (i = 0, j = 0; i < IWL_UCODE_MAX_CS && i < l->size; i++) {
|
|
||||||
fwcs = &l->cs[j];
|
|
||||||
|
|
||||||
/* we skip schemes with zero cipher suite selector */
|
|
||||||
if (!fwcs->cipher)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
fw->cs[j++] = *fwcs;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Gets uCode section from tlv.
|
* Gets uCode section from tlv.
|
||||||
*/
|
*/
|
||||||
|
@ -926,10 +902,6 @@ static int iwl_parse_tlv_firmware(struct iwl_drv *drv,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IWL_UCODE_TLV_CSCHEME:
|
|
||||||
if (iwl_store_cscheme(&drv->fw, tlv_data, tlv_len))
|
|
||||||
goto invalid_tlv_len;
|
|
||||||
break;
|
|
||||||
case IWL_UCODE_TLV_N_SCAN_CHANNELS:
|
case IWL_UCODE_TLV_N_SCAN_CHANNELS:
|
||||||
if (tlv_len != sizeof(u32))
|
if (tlv_len != sizeof(u32))
|
||||||
goto invalid_tlv_len;
|
goto invalid_tlv_len;
|
||||||
|
|
|
@ -448,28 +448,6 @@ int iwl_mvm_mac_setup_register(struct iwl_mvm *mvm)
|
||||||
hw->wiphy->n_cipher_suites++;
|
hw->wiphy->n_cipher_suites++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* currently FW API supports only one optional cipher scheme */
|
|
||||||
if (mvm->fw->cs[0].cipher) {
|
|
||||||
const struct iwl_fw_cipher_scheme *fwcs = &mvm->fw->cs[0];
|
|
||||||
struct ieee80211_cipher_scheme *cs = &mvm->cs[0];
|
|
||||||
|
|
||||||
mvm->hw->n_cipher_schemes = 1;
|
|
||||||
|
|
||||||
cs->cipher = le32_to_cpu(fwcs->cipher);
|
|
||||||
cs->iftype = BIT(NL80211_IFTYPE_STATION);
|
|
||||||
cs->hdr_len = fwcs->hdr_len;
|
|
||||||
cs->pn_len = fwcs->pn_len;
|
|
||||||
cs->pn_off = fwcs->pn_off;
|
|
||||||
cs->key_idx_off = fwcs->key_idx_off;
|
|
||||||
cs->key_idx_mask = fwcs->key_idx_mask;
|
|
||||||
cs->key_idx_shift = fwcs->key_idx_shift;
|
|
||||||
cs->mic_len = fwcs->mic_len;
|
|
||||||
|
|
||||||
mvm->hw->cipher_schemes = mvm->cs;
|
|
||||||
mvm->ciphers[hw->wiphy->n_cipher_suites] = cs->cipher;
|
|
||||||
hw->wiphy->n_cipher_suites++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (fw_has_capa(&mvm->fw->ucode_capa,
|
if (fw_has_capa(&mvm->fw->ucode_capa,
|
||||||
IWL_UCODE_TLV_CAPA_FTM_CALIBRATED)) {
|
IWL_UCODE_TLV_CAPA_FTM_CALIBRATED)) {
|
||||||
wiphy_ext_feature_set(hw->wiphy,
|
wiphy_ext_feature_set(hw->wiphy,
|
||||||
|
@ -3744,12 +3722,7 @@ static int __iwl_mvm_mac_set_key(struct ieee80211_hw *hw,
|
||||||
/* support HW crypto on TX */
|
/* support HW crypto on TX */
|
||||||
return 0;
|
return 0;
|
||||||
default:
|
default:
|
||||||
/* currently FW supports only one optional cipher scheme */
|
return -EOPNOTSUPP;
|
||||||
if (hw->n_cipher_schemes &&
|
|
||||||
hw->cipher_schemes->cipher == key->cipher)
|
|
||||||
key->flags |= IEEE80211_KEY_FLAG_PUT_IV_SPACE;
|
|
||||||
else
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
|
|
|
@ -1075,7 +1075,6 @@ struct iwl_mvm {
|
||||||
|
|
||||||
|
|
||||||
u32 ciphers[IWL_MVM_NUM_CIPHERS];
|
u32 ciphers[IWL_MVM_NUM_CIPHERS];
|
||||||
struct ieee80211_cipher_scheme cs[IWL_UCODE_MAX_CS];
|
|
||||||
|
|
||||||
struct cfg80211_ftm_responder_stats ftm_resp_stats;
|
struct cfg80211_ftm_responder_stats ftm_resp_stats;
|
||||||
struct {
|
struct {
|
||||||
|
|
Loading…
Reference in New Issue