qcacmn: Add callback api to send stored keys

For STA MLO connection, the AP can send M1 right after assoc
response on assoc link, which will trigger sending keys to FW
for mlo links, but it can happen that wmi_peer_assoc is not
sent for mlo link until this time.
Current code does not have handling for this case.

To solve this, store the link vdev keys and send them once
link vdev is connected.

Change-Id: I882da96280711ca9cfa4d6ba852fda4a8b6d7a77
CRs-Fixed: 3293692
This commit is contained in:
Amruta Kulkarni
2022-09-15 15:35:39 -07:00
committed by Madan Koyyalamudi
부모 3bdf954afc
커밋 319456fee7
9개의 변경된 파일196개의 추가작업 그리고 40개의 파일을 삭제

파일 보기

@@ -50,6 +50,7 @@ void wlan_cfg80211_translate_key(struct wlan_objmgr_vdev *vdev,
qdf_mem_copy(&crypto_key->keyval[0], params->key, params->key_len);
qdf_mem_copy(&crypto_key->keyrsc[0], params->seq, params->seq_len);
crypto_key->key_type = key_type;
crypto_key->cipher_type = osif_nl_to_crypto_cipher_type(params->cipher);
if (IS_WEP_CIPHER(crypto_key->cipher_type) && !mac_addr) {
/*

파일 보기

@@ -245,6 +245,21 @@ typedef QDF_STATUS
typedef QDF_STATUS
(*os_if_cm_napi_serialize_ctrl_cb)(bool action);
/**
* typedef osif_cm_send_vdev_keys_cb - send vdev keys cb
* @vdev: vdev pointer
* @key_index: key index value
* @pairwise: pairwise boolean value
* @cipher_type: cipher type enum value
*
* return: none
*/
typedef QDF_STATUS
(*osif_cm_send_vdev_keys_cb)(struct wlan_objmgr_vdev *vdev,
uint8_t key_index,
bool pairwise,
enum wlan_crypto_cipher_type cipher_type);
/**
* osif_cm_unlink_bss() - function to unlink bss from kernel and scan database
* on connect timeouts reasons
@@ -316,6 +331,7 @@ typedef QDF_STATUS
* @os_if_cm_napi_serialize_ctrl_cb: callback to legacy module to take
* actions on napi serialization
* @save_gtk_cb : callback to legacy module to save gtk
* @send_vdev_keys_cb: callback to send vdev keys
* @set_hlp_data_cb: callback to legacy module to save hlp data
* @ft_preauth_complete_cb: callback to legacy module to send fast
* transition event
@@ -331,6 +347,7 @@ struct osif_cm_ops {
osif_cm_netif_queue_ctrl_cb netif_queue_control_cb;
os_if_cm_napi_serialize_ctrl_cb napi_serialize_control_cb;
osif_cm_save_gtk_cb save_gtk_cb;
osif_cm_send_vdev_keys_cb send_vdev_keys_cb;
#endif
#ifdef WLAN_FEATURE_FILS_SK
osif_cm_set_hlp_data_cb set_hlp_data_cb;
@@ -432,6 +449,24 @@ QDF_STATUS osif_cm_napi_serialize(bool action);
*/
QDF_STATUS osif_cm_save_gtk(struct wlan_objmgr_vdev *vdev,
struct wlan_cm_connect_resp *rsp);
/**
* osif_cm_send_vdev_keys() - Function to send vdev keys
* @vdev: vdev pointer
* @key_index: key index value
* @pairwise: pairwise bool value
* @cipher_type: cipher type value
*
* This function to send vdev keys
*
* Context: Any context.
* Return: QDF_STATUS
*/
QDF_STATUS
osif_cm_send_vdev_keys(struct wlan_objmgr_vdev *vdev,
uint8_t key_index,
bool pairwise,
enum wlan_crypto_cipher_type cipher_type);
#else
static inline QDF_STATUS osif_cm_save_gtk(struct wlan_objmgr_vdev *vdev,
struct wlan_cm_connect_resp *rsp)

파일 보기

@@ -324,6 +324,25 @@ osif_pmksa_candidate_notify_cb(struct wlan_objmgr_vdev *vdev,
{
return osif_pmksa_candidate_notify(vdev, bssid, index, preauth);
}
/**
* osif_cm_send_keys_cb() - Send keys callback
* @vdev: vdev pointer
*
* This callback indicates os_if that
* so that os_if can stop all the activity on this connection
*
* Return: QDF_STATUS
*/
static QDF_STATUS
osif_cm_send_keys_cb(struct wlan_objmgr_vdev *vdev, uint8_t key_index,
bool pairwise, enum wlan_crypto_cipher_type cipher_type)
{
return osif_cm_send_vdev_keys(vdev,
key_index,
pairwise,
cipher_type);
}
#else
static inline QDF_STATUS
osif_cm_disable_netif_queue(struct wlan_objmgr_vdev *vdev)
@@ -468,6 +487,7 @@ static struct mlme_cm_ops cm_ops = {
#ifdef CONN_MGR_ADV_FEATURE
.mlme_cm_roam_sync_cb = osif_cm_roam_sync_cb,
.mlme_cm_pmksa_candidate_notify_cb = osif_pmksa_candidate_notify_cb,
.mlme_cm_send_keys_cb = osif_cm_send_keys_cb,
#endif
#ifdef WLAN_FEATURE_ROAM_OFFLOAD
.mlme_cm_roam_start_cb = osif_cm_roam_start_cb,
@@ -625,6 +645,22 @@ QDF_STATUS osif_cm_save_gtk(struct wlan_objmgr_vdev *vdev,
return ret;
}
QDF_STATUS
osif_cm_send_vdev_keys(struct wlan_objmgr_vdev *vdev,
uint8_t key_index,
bool pairwise,
enum wlan_crypto_cipher_type cipher_type)
{
osif_cm_send_vdev_keys_cb cb = NULL;
if (osif_cm_legacy_ops)
cb = osif_cm_legacy_ops->send_vdev_keys_cb;
if (cb)
return cb(vdev, key_index, pairwise, cipher_type);
return QDF_STATUS_E_FAILURE;
}
#endif
#ifdef WLAN_FEATURE_FILS_SK