qcacmn: Add support to delete all pasn peers
Add support to delete all pasn peers Change-Id: I2c3d95cb8994693d8944d69624d2db0992f2f03d CRs-Fixed: 3158523
This commit is contained in:

committed by
Madan Koyyalamudi

parent
b7fa703306
commit
f0cac26bbb
@@ -24,6 +24,7 @@
|
|||||||
#include "qdf_types.h"
|
#include "qdf_types.h"
|
||||||
#include "qdf_status.h"
|
#include "qdf_status.h"
|
||||||
#include <wlan_objmgr_cmn.h>
|
#include <wlan_objmgr_cmn.h>
|
||||||
|
#include "wifi_pos_public_struct.h"
|
||||||
|
|
||||||
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
|
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
|
||||||
/**
|
/**
|
||||||
|
@@ -526,6 +526,8 @@ static int target_if_vdev_mgr_peer_delete_all_response_handler(
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vdev_peer_del_all_resp.peer_type_bitmap = vdev_rsp->peer_type_bitmap;
|
||||||
|
|
||||||
status = rx_ops->vdev_mgr_peer_delete_all_response(
|
status = rx_ops->vdev_mgr_peer_delete_all_response(
|
||||||
psoc,
|
psoc,
|
||||||
&vdev_peer_del_all_resp);
|
&vdev_peer_del_all_resp);
|
||||||
|
@@ -1178,6 +1178,11 @@ static QDF_STATUS target_if_vdev_mgr_peer_delete_all_send(
|
|||||||
}
|
}
|
||||||
|
|
||||||
vdev_rsp->expire_time = PEER_DELETE_ALL_RESPONSE_TIMER;
|
vdev_rsp->expire_time = PEER_DELETE_ALL_RESPONSE_TIMER;
|
||||||
|
vdev_rsp->peer_type_bitmap = param->peer_type_bitmap;
|
||||||
|
|
||||||
|
mlme_debug("VDEV_%d: PSOC_%d vdev delete all: bitmap:%d", vdev_id,
|
||||||
|
wlan_psoc_get_id(psoc), vdev_rsp->peer_type_bitmap);
|
||||||
|
|
||||||
target_if_vdev_mgr_rsp_timer_start(psoc, vdev_rsp,
|
target_if_vdev_mgr_rsp_timer_start(psoc, vdev_rsp,
|
||||||
PEER_DELETE_ALL_RESPONSE_BIT);
|
PEER_DELETE_ALL_RESPONSE_BIT);
|
||||||
|
|
||||||
|
@@ -281,5 +281,8 @@ void target_if_wifi_pos_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
|
|||||||
wifi_pos_handle_ranging_peer_create_rsp;
|
wifi_pos_handle_ranging_peer_create_rsp;
|
||||||
wifi_pos_rx_ops->wifi_pos_ranging_peer_delete_cb =
|
wifi_pos_rx_ops->wifi_pos_ranging_peer_delete_cb =
|
||||||
wifi_pos_handle_ranging_peer_delete;
|
wifi_pos_handle_ranging_peer_delete;
|
||||||
|
wifi_pos_rx_ops->wifi_pos_vdev_delete_all_ranging_peers_rsp_cb =
|
||||||
|
wifi_pos_vdev_delete_all_ranging_peers_rsp;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -29,6 +29,8 @@
|
|||||||
#include "target_if_wifi_pos.h"
|
#include "target_if_wifi_pos.h"
|
||||||
#include "target_if_wifi_pos_tx_ops.h"
|
#include "target_if_wifi_pos_tx_ops.h"
|
||||||
#include "wifi_pos_utils_i.h"
|
#include "wifi_pos_utils_i.h"
|
||||||
|
#include "wifi_pos_api.h"
|
||||||
|
#include "wifi_pos_pasn_api.h"
|
||||||
#include "target_if.h"
|
#include "target_if.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -311,6 +313,8 @@ void target_if_wifi_pos_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
|||||||
wifi_pos_tx_ops->data_req_tx = target_if_wifi_pos_oem_data_req;
|
wifi_pos_tx_ops->data_req_tx = target_if_wifi_pos_oem_data_req;
|
||||||
wifi_pos_tx_ops->wifi_pos_parse_measreq_chan_info =
|
wifi_pos_tx_ops->wifi_pos_parse_measreq_chan_info =
|
||||||
target_if_wifi_pos_parse_measreq_chan_info;
|
target_if_wifi_pos_parse_measreq_chan_info;
|
||||||
|
wifi_pos_tx_ops->wifi_pos_vdev_delete_all_ranging_peers_cb =
|
||||||
|
wifi_pos_vdev_delete_all_ranging_peers;
|
||||||
|
|
||||||
target_if_wifi_pos_register_11az_ops(wifi_pos_tx_ops);
|
target_if_wifi_pos_register_11az_ops(wifi_pos_tx_ops);
|
||||||
}
|
}
|
||||||
|
@@ -892,6 +892,9 @@ struct wlan_lmac_if_iot_sim_tx_ops {
|
|||||||
* request buffer.
|
* request buffer.
|
||||||
* @send_rtt_pasn_auth_status: Send PASN peers authentication status
|
* @send_rtt_pasn_auth_status: Send PASN peers authentication status
|
||||||
* @send_rtt_pasn_deauth: Send PASN peer deauth command
|
* @send_rtt_pasn_deauth: Send PASN peer deauth command
|
||||||
|
* @wifi_pos_delete_all_vdev_ranging_peers_cb: Delete all ranging peers for
|
||||||
|
* given vdev. This is called before vdev delete to cleanup all the ranging
|
||||||
|
* peers of that vdev.
|
||||||
*/
|
*/
|
||||||
struct wlan_lmac_if_wifi_pos_tx_ops {
|
struct wlan_lmac_if_wifi_pos_tx_ops {
|
||||||
QDF_STATUS (*wifi_pos_register_events)(struct wlan_objmgr_psoc *psoc);
|
QDF_STATUS (*wifi_pos_register_events)(struct wlan_objmgr_psoc *psoc);
|
||||||
@@ -914,6 +917,8 @@ struct wlan_lmac_if_wifi_pos_tx_ops {
|
|||||||
struct wlan_pasn_auth_status *data);
|
struct wlan_pasn_auth_status *data);
|
||||||
QDF_STATUS (*send_rtt_pasn_deauth)(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS (*send_rtt_pasn_deauth)(struct wlan_objmgr_psoc *psoc,
|
||||||
struct qdf_mac_addr *peer_mac);
|
struct qdf_mac_addr *peer_mac);
|
||||||
|
QDF_STATUS (*wifi_pos_vdev_delete_all_ranging_peers_cb)
|
||||||
|
(struct wlan_objmgr_vdev *vdev);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -1909,6 +1914,8 @@ struct wlan_lmac_if_iot_sim_rx_ops {
|
|||||||
* confirm event for PASN Peer.
|
* confirm event for PASN Peer.
|
||||||
* @wifi_pos_ranging_peer_delete_cb: Ranging peer delete handle function
|
* @wifi_pos_ranging_peer_delete_cb: Ranging peer delete handle function
|
||||||
* pointer.
|
* pointer.
|
||||||
|
* @wifi_pos_vdev_delete_all_ranging_peers_rsp_cb: Callback to handle vdev
|
||||||
|
* delete all ranging peers response
|
||||||
*/
|
*/
|
||||||
struct wlan_lmac_if_wifi_pos_rx_ops {
|
struct wlan_lmac_if_wifi_pos_rx_ops {
|
||||||
int (*oem_rsp_event_rx)(struct wlan_objmgr_psoc *psoc,
|
int (*oem_rsp_event_rx)(struct wlan_objmgr_psoc *psoc,
|
||||||
@@ -1926,6 +1933,8 @@ struct wlan_lmac_if_wifi_pos_rx_ops {
|
|||||||
(struct wlan_objmgr_psoc *psoc,
|
(struct wlan_objmgr_psoc *psoc,
|
||||||
struct wlan_pasn_request *info,
|
struct wlan_pasn_request *info,
|
||||||
uint8_t vdev_id, uint8_t num_peers);
|
uint8_t vdev_id, uint8_t num_peers);
|
||||||
|
QDF_STATUS (*wifi_pos_vdev_delete_all_ranging_peers_rsp_cb)
|
||||||
|
(struct wlan_objmgr_psoc *psoc, uint8_t vdev_id);
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -108,6 +108,7 @@ defined(QCA_WIFI_QCA5018)
|
|||||||
* @timer_status: status of timer
|
* @timer_status: status of timer
|
||||||
* @rsp_timer_inuse: Status bit to inform whether the rsp timer is inuse
|
* @rsp_timer_inuse: Status bit to inform whether the rsp timer is inuse
|
||||||
* @vdev_id: vdev object id
|
* @vdev_id: vdev object id
|
||||||
|
* @peer_type_bitmap: Peer type bitmap
|
||||||
*/
|
*/
|
||||||
struct vdev_response_timer {
|
struct vdev_response_timer {
|
||||||
struct wlan_objmgr_psoc *psoc;
|
struct wlan_objmgr_psoc *psoc;
|
||||||
@@ -117,6 +118,7 @@ struct vdev_response_timer {
|
|||||||
QDF_STATUS timer_status;
|
QDF_STATUS timer_status;
|
||||||
qdf_atomic_t rsp_timer_inuse;
|
qdf_atomic_t rsp_timer_inuse;
|
||||||
uint8_t vdev_id;
|
uint8_t vdev_id;
|
||||||
|
uint32_t peer_type_bitmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -165,10 +167,12 @@ struct vdev_delete_response {
|
|||||||
* struct peer_delete_all_response - peer delete all response structure
|
* struct peer_delete_all_response - peer delete all response structure
|
||||||
* @vdev_id: vdev id
|
* @vdev_id: vdev id
|
||||||
* @status: FW status for vdev delete all peer request
|
* @status: FW status for vdev delete all peer request
|
||||||
|
* @peer_type_bitmap: bitmap of peer type to delete from enum wlan_peer_type
|
||||||
*/
|
*/
|
||||||
struct peer_delete_all_response {
|
struct peer_delete_all_response {
|
||||||
uint8_t vdev_id;
|
uint8_t vdev_id;
|
||||||
uint8_t status;
|
uint8_t status;
|
||||||
|
uint32_t peer_type_bitmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -757,9 +757,12 @@ struct vdev_down_params {
|
|||||||
/**
|
/**
|
||||||
* struct peer_delete_all_params - peer delete all request parameter
|
* struct peer_delete_all_params - peer delete all request parameter
|
||||||
* @vdev_id: vdev id
|
* @vdev_id: vdev id
|
||||||
|
* @peer_type_bitmap: Bitmap of type with bits corresponding to value from
|
||||||
|
* enum wlan_peer_type
|
||||||
*/
|
*/
|
||||||
struct peer_delete_all_params {
|
struct peer_delete_all_params {
|
||||||
uint8_t vdev_id;
|
uint8_t vdev_id;
|
||||||
|
uint32_t peer_type_bitmap;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define AC_MAX 4
|
#define AC_MAX 4
|
||||||
|
@@ -134,6 +134,48 @@ wifi_pos_send_pasn_auth_status(struct wlan_objmgr_psoc *psoc,
|
|||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
wifi_pos_send_pasn_peer_deauth(struct wlan_objmgr_psoc *psoc,
|
wifi_pos_send_pasn_peer_deauth(struct wlan_objmgr_psoc *psoc,
|
||||||
struct qdf_mac_addr *peer_mac);
|
struct qdf_mac_addr *peer_mac);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wifi_pos_get_pasn_peer_count() - Wifi POS get total pasn peer count
|
||||||
|
* @vdev: Pointer to vdev object
|
||||||
|
*
|
||||||
|
* Return: Total number of pasn peers
|
||||||
|
*/
|
||||||
|
uint8_t
|
||||||
|
wifi_pos_get_pasn_peer_count(struct wlan_objmgr_vdev *vdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wifi_pos_update_pasn_peer_count() - Increment pasn peer count
|
||||||
|
* @vdev: Pointer to vdev object
|
||||||
|
* @is_increment: flag to indicate if peer count needs to be incremented
|
||||||
|
*
|
||||||
|
* Return: None
|
||||||
|
*/
|
||||||
|
void wifi_pos_update_pasn_peer_count(struct wlan_objmgr_vdev *vdev,
|
||||||
|
bool is_increment);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wifi_pos_vdev_delete_all_ranging_peers() - Delete all ranging peers
|
||||||
|
* associated with given vdev id
|
||||||
|
* @psoc: Psoc pointer
|
||||||
|
* @vdev_id: vdev id
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wifi_pos_vdev_delete_all_ranging_peers(struct wlan_objmgr_vdev *vdev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* wifi_pos_vdev_delete_all_ranging_peers_rsp() - Delete all vdev peers response
|
||||||
|
* handler
|
||||||
|
* @psoc: Psoc pointer
|
||||||
|
* @vdev_id: vdev id
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
wifi_pos_vdev_delete_all_ranging_peers_rsp(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint8_t vdev_id);
|
||||||
#else
|
#else
|
||||||
static inline
|
static inline
|
||||||
QDF_STATUS wifi_pos_handle_ranging_peer_create(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS wifi_pos_handle_ranging_peer_create(struct wlan_objmgr_psoc *psoc,
|
||||||
@@ -179,5 +221,22 @@ wifi_pos_send_pasn_peer_deauth(struct wlan_objmgr_psoc *psoc,
|
|||||||
{
|
{
|
||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
wifi_pos_update_pasn_peer_count(struct wlan_objmgr_vdev *vdev,
|
||||||
|
bool is_increment)
|
||||||
|
{}
|
||||||
|
|
||||||
|
static inline uint8_t
|
||||||
|
wifi_pos_get_pasn_peer_count(struct wlan_objmgr_vdev *vdev)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline QDF_STATUS
|
||||||
|
wifi_pos_vdev_delete_all_ranging_peers(struct wlan_objmgr_vdev *vdev)
|
||||||
|
{
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
#endif /* WIFI_POS_CONVERGED && WLAN_FEATURE_RTT_11AZ_SUPPORT */
|
#endif /* WIFI_POS_CONVERGED && WLAN_FEATURE_RTT_11AZ_SUPPORT */
|
||||||
#endif /* _WIFI_POS_PASN_API_H_ */
|
#endif /* _WIFI_POS_PASN_API_H_ */
|
||||||
|
@@ -104,9 +104,14 @@ struct wifi_pos_11az_context {
|
|||||||
/**
|
/**
|
||||||
* struct wifi_pos_vdev_priv_obj - Wifi Pos module vdev private object
|
* struct wifi_pos_vdev_priv_obj - Wifi Pos module vdev private object
|
||||||
* @pasn_context: 11az security peers context.
|
* @pasn_context: 11az security peers context.
|
||||||
|
* @num_pasn_peers: Total number of PASN peers
|
||||||
|
* @is_delete_all_pasn_peer_in_progress: Delete all the VDEV PASN peers in
|
||||||
|
* progress
|
||||||
*/
|
*/
|
||||||
struct wifi_pos_vdev_priv_obj {
|
struct wifi_pos_vdev_priv_obj {
|
||||||
struct wifi_pos_11az_context pasn_context;
|
struct wifi_pos_11az_context pasn_context;
|
||||||
|
uint8_t num_pasn_peers;
|
||||||
|
bool is_delete_all_pasn_peer_in_progress;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -220,6 +220,7 @@ typedef void (*wifi_pos_send_rsp_handler)(struct wlan_objmgr_psoc *, uint32_t,
|
|||||||
* struct wifi_pos_legacy_ops - wifi pos module legacy callbacks
|
* struct wifi_pos_legacy_ops - wifi pos module legacy callbacks
|
||||||
* @pasn_peer_create_cb: PASN peer create callback
|
* @pasn_peer_create_cb: PASN peer create callback
|
||||||
* @pasn_peer_delete_cb: PASN peer delete callback
|
* @pasn_peer_delete_cb: PASN peer delete callback
|
||||||
|
* @pasn_vdev_delete_resume_cb: PASN resume vdev delete callback
|
||||||
*/
|
*/
|
||||||
struct wifi_pos_legacy_ops {
|
struct wifi_pos_legacy_ops {
|
||||||
QDF_STATUS (*pasn_peer_create_cb)(struct wlan_objmgr_psoc *psoc,
|
QDF_STATUS (*pasn_peer_create_cb)(struct wlan_objmgr_psoc *psoc,
|
||||||
@@ -229,6 +230,7 @@ struct wifi_pos_legacy_ops {
|
|||||||
struct qdf_mac_addr *peer_addr,
|
struct qdf_mac_addr *peer_addr,
|
||||||
uint8_t vdev_id,
|
uint8_t vdev_id,
|
||||||
bool no_fw_peer_delete);
|
bool no_fw_peer_delete);
|
||||||
|
QDF_STATUS (*pasn_vdev_delete_resume_cb)(struct wlan_objmgr_vdev *vdev);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -33,6 +33,39 @@
|
|||||||
#include "wlan_objmgr_psoc_obj.h"
|
#include "wlan_objmgr_psoc_obj.h"
|
||||||
#include "wlan_objmgr_peer_obj.h"
|
#include "wlan_objmgr_peer_obj.h"
|
||||||
#include "wlan_lmac_if_def.h"
|
#include "wlan_lmac_if_def.h"
|
||||||
|
#include "wlan_vdev_mgr_tgt_if_tx_api.h"
|
||||||
|
|
||||||
|
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
|
||||||
|
uint8_t wifi_pos_get_pasn_peer_count(struct wlan_objmgr_vdev *vdev)
|
||||||
|
{
|
||||||
|
struct wifi_pos_vdev_priv_obj *vdev_pos_obj;
|
||||||
|
|
||||||
|
vdev_pos_obj = wifi_pos_get_vdev_priv_obj(vdev);
|
||||||
|
if (!vdev_pos_obj) {
|
||||||
|
wifi_pos_err("Wifi pos vdev priv obj is null");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return vdev_pos_obj->num_pasn_peers;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wifi_pos_update_pasn_peer_count(struct wlan_objmgr_vdev *vdev,
|
||||||
|
bool is_increment)
|
||||||
|
{
|
||||||
|
struct wifi_pos_vdev_priv_obj *vdev_pos_obj;
|
||||||
|
|
||||||
|
vdev_pos_obj = wifi_pos_get_vdev_priv_obj(vdev);
|
||||||
|
if (!vdev_pos_obj) {
|
||||||
|
wifi_pos_err("Wifi pos vdev priv obj is null");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_increment)
|
||||||
|
vdev_pos_obj->num_pasn_peers++;
|
||||||
|
else
|
||||||
|
vdev_pos_obj->num_pasn_peers--;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void wifi_pos_set_11az_failed_peers(struct wlan_objmgr_vdev *vdev,
|
void wifi_pos_set_11az_failed_peers(struct wlan_objmgr_vdev *vdev,
|
||||||
struct qdf_mac_addr *mac_addr)
|
struct qdf_mac_addr *mac_addr)
|
||||||
@@ -313,7 +346,7 @@ QDF_STATUS wifi_pos_handle_ranging_peer_create(struct wlan_objmgr_psoc *psoc,
|
|||||||
struct wlan_objmgr_vdev *vdev;
|
struct wlan_objmgr_vdev *vdev;
|
||||||
struct wifi_pos_vdev_priv_obj *vdev_pos_obj;
|
struct wifi_pos_vdev_priv_obj *vdev_pos_obj;
|
||||||
struct wifi_pos_11az_context *pasn_context;
|
struct wifi_pos_11az_context *pasn_context;
|
||||||
QDF_STATUS status;
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
|
||||||
legacy_cb = wifi_pos_get_legacy_ops(psoc);
|
legacy_cb = wifi_pos_get_legacy_ops(psoc);
|
||||||
@@ -369,6 +402,7 @@ QDF_STATUS wifi_pos_handle_ranging_peer_create(struct wlan_objmgr_psoc *psoc,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wifi_pos_update_pasn_peer_count(vdev, true);
|
||||||
if (req[i].is_ltf_keyseed_required) {
|
if (req[i].is_ltf_keyseed_required) {
|
||||||
peer = wlan_objmgr_get_peer_by_mac(psoc,
|
peer = wlan_objmgr_get_peer_by_mac(psoc,
|
||||||
req[i].peer_mac.bytes,
|
req[i].peer_mac.bytes,
|
||||||
@@ -444,9 +478,11 @@ wifi_pos_handle_ranging_peer_create_rsp(struct wlan_objmgr_psoc *psoc,
|
|||||||
wifi_pos_debug("Received peer create response for " QDF_MAC_ADDR_FMT " status:%d pending_count:%d",
|
wifi_pos_debug("Received peer create response for " QDF_MAC_ADDR_FMT " status:%d pending_count:%d",
|
||||||
QDF_MAC_ADDR_REF(peer_mac->bytes), peer_create_status,
|
QDF_MAC_ADDR_REF(peer_mac->bytes), peer_create_status,
|
||||||
pasn_context->num_pending_peer_creation);
|
pasn_context->num_pending_peer_creation);
|
||||||
if (peer_create_status)
|
if (peer_create_status) {
|
||||||
wifi_pos_move_peers_to_fail_list(vdev, peer_mac,
|
wifi_pos_move_peers_to_fail_list(vdev, peer_mac,
|
||||||
WLAN_WIFI_POS_PASN_PEER_TYPE_MAX);
|
WLAN_WIFI_POS_PASN_PEER_TYPE_MAX);
|
||||||
|
wifi_pos_update_pasn_peer_count(vdev, false);
|
||||||
|
}
|
||||||
|
|
||||||
status = wifi_pos_check_and_initiate_pasn_authentication(psoc, vdev,
|
status = wifi_pos_check_and_initiate_pasn_authentication(psoc, vdev,
|
||||||
pasn_context);
|
pasn_context);
|
||||||
@@ -464,10 +500,32 @@ QDF_STATUS wifi_pos_handle_ranging_peer_delete(struct wlan_objmgr_psoc *psoc,
|
|||||||
struct wlan_objmgr_peer *peer;
|
struct wlan_objmgr_peer *peer;
|
||||||
struct wlan_pasn_request *del_peer_list;
|
struct wlan_pasn_request *del_peer_list;
|
||||||
struct wlan_objmgr_vdev *vdev;
|
struct wlan_objmgr_vdev *vdev;
|
||||||
|
struct wifi_pos_vdev_priv_obj *vdev_pos_obj;
|
||||||
bool no_fw_peer_delete;
|
bool no_fw_peer_delete;
|
||||||
uint8_t peer_count = 0, i;
|
uint8_t peer_count = 0, i;
|
||||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
|
||||||
|
WLAN_WIFI_POS_CORE_ID);
|
||||||
|
if (!vdev) {
|
||||||
|
wifi_pos_err("Vdev object is null");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
vdev_pos_obj = wifi_pos_get_vdev_priv_obj(vdev);
|
||||||
|
if (!vdev_pos_obj) {
|
||||||
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_WIFI_POS_CORE_ID);
|
||||||
|
wifi_pos_err("Wifi pos vdev priv obj is null");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (vdev_pos_obj->is_delete_all_pasn_peer_in_progress) {
|
||||||
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_WIFI_POS_CORE_ID);
|
||||||
|
wifi_pos_err("Vdev delete all peer in progress. Ignore indvidual peer delete");
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_WIFI_POS_CORE_ID);
|
||||||
|
|
||||||
legacy_cb = wifi_pos_get_legacy_ops(psoc);
|
legacy_cb = wifi_pos_get_legacy_ops(psoc);
|
||||||
if (!legacy_cb || !legacy_cb->pasn_peer_delete_cb) {
|
if (!legacy_cb || !legacy_cb->pasn_peer_delete_cb) {
|
||||||
wifi_pos_err("legacy callback is not registered");
|
wifi_pos_err("legacy callback is not registered");
|
||||||
@@ -640,3 +698,96 @@ bool wifi_pos_is_ltf_keyseed_required_for_peer(struct wlan_objmgr_peer *peer)
|
|||||||
|
|
||||||
return peer_priv->is_ltf_keyseed_required;
|
return peer_priv->is_ltf_keyseed_required;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static
|
||||||
|
void wifi_pos_delete_objmgr_ranging_peer(struct wlan_objmgr_vdev *vdev,
|
||||||
|
void *object, void *arg)
|
||||||
|
{
|
||||||
|
struct wlan_objmgr_peer *peer = object;
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
status = wlan_objmgr_peer_obj_delete(peer);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
wifi_pos_err("Failed to delete peer");
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wifi_pos_vdev_delete_all_ranging_peers(struct wlan_objmgr_vdev *vdev)
|
||||||
|
{
|
||||||
|
QDF_STATUS status;
|
||||||
|
struct vdev_mlme_obj *vdev_mlme;
|
||||||
|
struct wifi_pos_vdev_priv_obj *vdev_pos_obj;
|
||||||
|
struct peer_delete_all_params param;
|
||||||
|
|
||||||
|
vdev_pos_obj = wifi_pos_get_vdev_priv_obj(vdev);
|
||||||
|
if (!vdev_pos_obj) {
|
||||||
|
wifi_pos_err("Wifi pos vdev priv obj is null");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!vdev_pos_obj->num_pasn_peers)
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
|
vdev_pos_obj->is_delete_all_pasn_peer_in_progress = true;
|
||||||
|
status = wlan_objmgr_iterate_peerobj_list(vdev,
|
||||||
|
wifi_pos_delete_objmgr_ranging_peer,
|
||||||
|
NULL, WLAN_WIFI_POS_CORE_ID);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
wifi_pos_err("Delete objmgr peers failed");
|
||||||
|
|
||||||
|
vdev_mlme = wlan_vdev_mlme_get_cmpt_obj(vdev);
|
||||||
|
if (!vdev_mlme) {
|
||||||
|
wifi_pos_err(" VDEV MLME component object is NULL");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
param.vdev_id = wlan_vdev_get_id(vdev);
|
||||||
|
param.peer_type_bitmap = BIT(WLAN_PEER_RTT_PASN);
|
||||||
|
|
||||||
|
status = tgt_vdev_mgr_peer_delete_all_send(vdev_mlme, ¶m);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
wifi_pos_err("Send vdev delete all peers failed");
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
wifi_pos_vdev_delete_all_ranging_peers_rsp(struct wlan_objmgr_psoc *psoc,
|
||||||
|
uint8_t vdev_id)
|
||||||
|
{
|
||||||
|
struct wifi_pos_legacy_ops *legacy_cb;
|
||||||
|
struct wlan_objmgr_vdev *vdev;
|
||||||
|
struct wifi_pos_vdev_priv_obj *vdev_pos_obj;
|
||||||
|
QDF_STATUS status;
|
||||||
|
|
||||||
|
vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, vdev_id,
|
||||||
|
WLAN_WIFI_POS_CORE_ID);
|
||||||
|
if (!vdev) {
|
||||||
|
wifi_pos_err(" VDEV is NULL");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
vdev_pos_obj = wifi_pos_get_vdev_priv_obj(vdev);
|
||||||
|
if (!vdev_pos_obj) {
|
||||||
|
wifi_pos_err("Wifi pos vdev priv obj is null");
|
||||||
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_WIFI_POS_CORE_ID);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
vdev_pos_obj->is_delete_all_pasn_peer_in_progress = false;
|
||||||
|
|
||||||
|
legacy_cb = wifi_pos_get_legacy_ops(psoc);
|
||||||
|
if (!legacy_cb || !legacy_cb->pasn_vdev_delete_resume_cb) {
|
||||||
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_WIFI_POS_CORE_ID);
|
||||||
|
wifi_pos_err("legacy callbacks is not registered");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
status = legacy_cb->pasn_vdev_delete_resume_cb(vdev);
|
||||||
|
if (QDF_IS_STATUS_ERROR(status))
|
||||||
|
wifi_pos_err("Delete all PASN peer failed");
|
||||||
|
|
||||||
|
wlan_objmgr_vdev_release_ref(vdev, WLAN_WIFI_POS_CORE_ID);
|
||||||
|
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
@@ -1396,6 +1396,30 @@ static QDF_STATUS send_peer_delete_cmd_tlv(wmi_unified_t wmi,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
wmi_get_converted_peer_bitmap(uint32_t src_peer_bitmap, uint32_t *dst_bitmap)
|
||||||
|
{
|
||||||
|
if (QDF_HAS_PARAM(src_peer_bitmap, WLAN_PEER_SELF))
|
||||||
|
WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET(dst_bitmap,
|
||||||
|
WMI_PEER_TYPE_DEFAULT);
|
||||||
|
|
||||||
|
if (QDF_HAS_PARAM(src_peer_bitmap, WLAN_PEER_AP))
|
||||||
|
WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET(dst_bitmap,
|
||||||
|
WMI_PEER_TYPE_BSS);
|
||||||
|
|
||||||
|
if (QDF_HAS_PARAM(src_peer_bitmap, WLAN_PEER_TDLS))
|
||||||
|
WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET(dst_bitmap,
|
||||||
|
WMI_PEER_TYPE_TDLS);
|
||||||
|
|
||||||
|
if (QDF_HAS_PARAM(src_peer_bitmap, WLAN_PEER_NDP))
|
||||||
|
WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET(dst_bitmap,
|
||||||
|
WMI_PEER_TYPE_NAN_DATA);
|
||||||
|
|
||||||
|
if (QDF_HAS_PARAM(src_peer_bitmap, WLAN_PEER_RTT_PASN))
|
||||||
|
WMI_VDEV_DELETE_ALL_PEER_BITMAP_SET(dst_bitmap,
|
||||||
|
WMI_PEER_TYPE_PASN);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* send_peer_delete_all_cmd_tlv() - send PEER delete all command to fw
|
* send_peer_delete_all_cmd_tlv() - send PEER delete all command to fw
|
||||||
* @wmi: wmi handle
|
* @wmi: wmi handle
|
||||||
@@ -1422,8 +1446,11 @@ static QDF_STATUS send_peer_delete_all_cmd_tlv(
|
|||||||
WMITLV_GET_STRUCT_TLVLEN
|
WMITLV_GET_STRUCT_TLVLEN
|
||||||
(wmi_vdev_delete_all_peer_cmd_fixed_param));
|
(wmi_vdev_delete_all_peer_cmd_fixed_param));
|
||||||
cmd->vdev_id = param->vdev_id;
|
cmd->vdev_id = param->vdev_id;
|
||||||
|
wmi_get_converted_peer_bitmap(param->peer_type_bitmap,
|
||||||
|
cmd->peer_type_bitmap);
|
||||||
|
|
||||||
wmi_debug("vdev_id %d", cmd->vdev_id);
|
wmi_debug("vdev_id %d peer_type_bitmap:%d", cmd->vdev_id,
|
||||||
|
param->peer_type_bitmap);
|
||||||
wmi_mtrace(WMI_VDEV_DELETE_ALL_PEER_CMDID, cmd->vdev_id, 0);
|
wmi_mtrace(WMI_VDEV_DELETE_ALL_PEER_CMDID, cmd->vdev_id, 0);
|
||||||
if (wmi_unified_cmd_send(wmi, buf, len,
|
if (wmi_unified_cmd_send(wmi, buf, len,
|
||||||
WMI_VDEV_DELETE_ALL_PEER_CMDID)) {
|
WMI_VDEV_DELETE_ALL_PEER_CMDID)) {
|
||||||
|
Reference in New Issue
Block a user