qcacmn: Add support for 11az RTT

- target_if layer was calling UMAC layer wifi_pos_get_rx_ops(). This was
  leading to compilation errror in WIN platform. Hence, added target_if
  layer API target_if_wifi_pos_get_rx_ops().

- WMI_RX_SERIALIZER_CTX is used to register PASN peer create and delete.
  WIN platform does not use the above context. Hence, use WMI_RX_UMAC_CTX
  for WIN and WMI_RX_SERIALIZER_CTX for MCC.

- WIFI_POS rx_ops callbacks are registered in target_if layer. But, these
  callbacks are called by UMAC component. Hence, move this registration
  function to UMAC layer.

- Add an API to convert host PASN peer type value to target defined value.

Change-Id: I2a262121f959c2343e88158b94468d104b9e164c
CRs-Fixed: 3289852
This commit is contained in:
Shashikala Prabhu
2022-09-27 14:18:04 +05:30
committato da Madan Koyyalamudi
parent 2cfc1273ba
commit 5e43636b8c
12 ha cambiato i file con 80 aggiunte e 69 eliminazioni

Vedi File

@@ -66,6 +66,12 @@
#define targetif_nofl_debug(params...) \
QDF_TRACE_DEBUG_NO_FL(QDF_MODULE_ID_TARGET_IF, params)
#ifdef SERIALIZE_WMI_RX_EXECUTION_CTX
#define WMI_RX_EXECUTION_CTX WMI_RX_SERIALIZER_CTX
#else
#define WMI_RX_EXECUTION_CTX WMI_RX_UMAC_CTX
#endif /* SERIALIZE_WMI_RX_EXECUTION_CTX */
typedef struct wlan_objmgr_psoc *(*get_psoc_handle_callback)(
void *scn_handle);

Vedi File

@@ -104,15 +104,6 @@ int target_if_wifi_pos_pasn_peer_delete_ev_handler(ol_scn_t scn,
uint8_t *buf,
uint32_t len);
/**
* target_if_wifi_pos_register_rx_ops() - Register wifi pos module target_if
* RX ops
* @rx_ops: RX ops pointer
*
* Return: None
*/
void target_if_wifi_pos_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops);
#else
static inline
int target_if_wifi_pos_pasn_peer_create_ev_handler(ol_scn_t scn,
@@ -129,9 +120,5 @@ int target_if_wifi_pos_pasn_peer_delete_ev_handler(ol_scn_t scn,
{
return 0;
}
static inline
void target_if_wifi_pos_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
{}
#endif /* WIFI_POS_CONVERGED && WLAN_FEATURE_RTT_11AZ_SUPPORT */
#endif /* _WIFI_POS_TGT_IF_RX_OPS_H_ */

Vedi File

@@ -154,6 +154,20 @@ int wifi_pos_oem_err_rpt_ev_handler(ol_scn_t scn, uint8_t *buf,
}
#if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
static struct wlan_lmac_if_wifi_pos_rx_ops *
target_if_wifi_pos_get_rx_ops(struct wlan_objmgr_psoc *psoc)
{
struct wlan_lmac_if_rx_ops *rx_ops;
rx_ops = wlan_psoc_get_lmac_if_rxops(psoc);
if (!rx_ops) {
wifi_pos_err("rx_ops is NULL");
return NULL;
}
return &rx_ops->wifi_pos_rx_ops;
}
int target_if_wifi_pos_pasn_peer_create_ev_handler(ol_scn_t scn,
uint8_t *buf,
uint32_t len)
@@ -201,7 +215,7 @@ int target_if_wifi_pos_pasn_peer_create_ev_handler(ol_scn_t scn,
return -EINVAL;
}
rx_ops = wifi_pos_get_rx_ops(psoc);
rx_ops = target_if_wifi_pos_get_rx_ops(psoc);
if (!rx_ops || !rx_ops->wifi_pos_ranging_peer_create_cb) {
wifi_pos_err("%s is null",
!rx_ops ? "rx_ops" : "rx_ops_cb");
@@ -259,7 +273,7 @@ int target_if_wifi_pos_pasn_peer_delete_ev_handler(ol_scn_t scn,
return QDF_STATUS_E_NULL_VALUE;
}
rx_ops = wifi_pos_get_rx_ops(psoc);
rx_ops = target_if_wifi_pos_get_rx_ops(psoc);
if (!rx_ops || !rx_ops->wifi_pos_ranging_peer_delete_cb) {
wifi_pos_err("%s is null",
!rx_ops ? "rx_ops" : "rx_ops_cb");
@@ -277,20 +291,5 @@ int target_if_wifi_pos_pasn_peer_delete_ev_handler(ol_scn_t scn,
return 0;
}
void target_if_wifi_pos_register_rx_ops(struct wlan_lmac_if_rx_ops *rx_ops)
{
struct wlan_lmac_if_wifi_pos_rx_ops *wifi_pos_rx_ops =
&rx_ops->wifi_pos_rx_ops;
wifi_pos_rx_ops->wifi_pos_ranging_peer_create_cb =
wifi_pos_handle_ranging_peer_create;
wifi_pos_rx_ops->wifi_pos_ranging_peer_create_rsp_cb =
wifi_pos_handle_ranging_peer_create_rsp;
wifi_pos_rx_ops->wifi_pos_ranging_peer_delete_cb =
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

Vedi File

@@ -168,7 +168,7 @@ target_if_wifi_pos_register_11az_events(struct wlan_objmgr_psoc *psoc)
get_wmi_unified_hdl_from_psoc(psoc),
wmi_rtt_pasn_peer_create_req_eventid,
target_if_wifi_pos_pasn_peer_create_ev_handler,
WMI_RX_SERIALIZER_CTX);
WMI_RX_EXECUTION_CTX);
if (QDF_IS_STATUS_ERROR(status)) {
target_if_err("register pasn peer create event_handler failed");
return QDF_STATUS_E_INVAL;
@@ -178,7 +178,7 @@ target_if_wifi_pos_register_11az_events(struct wlan_objmgr_psoc *psoc)
get_wmi_unified_hdl_from_psoc(psoc),
wmi_rtt_pasn_peer_delete_eventid,
target_if_wifi_pos_pasn_peer_delete_ev_handler,
WMI_RX_SERIALIZER_CTX);
WMI_RX_EXECUTION_CTX);
if (QDF_IS_STATUS_ERROR(status)) {
target_if_err("register pasn peer delete event_handler failed");
return status;
@@ -313,8 +313,6 @@ 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->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);
}