qcacmn: WMI changes for P2P component
Update WMI layer to adopt to converged P2P component. Change-Id: Ia031476f7ee6071d2e15010fc3f7c998df9995dd CRs-Fixed: 2011217
Этот коммит содержится в:

коммит произвёл
Sandeep Puligilla

родитель
c5da74237c
Коммит
41a58394a7
@@ -33,9 +33,9 @@ target_if_psoc_get_p2p_rx_ops(struct wlan_objmgr_psoc *psoc)
|
||||
|
||||
/**
|
||||
* target_p2p_lo_event_handler() - WMI callback for lo stop event
|
||||
* @scn:
|
||||
* @scn: pointer to scn
|
||||
* @event_buf: event buffer
|
||||
* @len: buffer length
|
||||
* @len: buffer length
|
||||
*
|
||||
* This function gets called from WMI when triggered wmi event
|
||||
* wmi_p2p_lo_stop_event_id.
|
||||
@@ -52,7 +52,7 @@ static int target_p2p_lo_event_handler(ol_scn_t scn, uint8_t *data,
|
||||
struct wlan_lmac_if_p2p_rx_ops *p2p_rx_ops;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
target_if_info("scn:%p, data:%p, datalen:%d", scn, data, datalen);
|
||||
target_if_debug("scn:%p, data:%p, datalen:%d", scn, data, datalen);
|
||||
|
||||
if (!scn || !data) {
|
||||
target_if_err("scn: 0x%p, data: 0x%p", scn, data);
|
||||
@@ -77,7 +77,12 @@ static int target_p2p_lo_event_handler(ol_scn_t scn, uint8_t *data,
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/*TODO, extract wmi lo stop event */
|
||||
if (wmi_extract_p2p_lo_stop_ev_param(wmi_handle, data,
|
||||
event_info)) {
|
||||
target_if_err("Failed to extract wmi p2p lo stop event");
|
||||
qdf_mem_free(event_info);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
p2p_rx_ops = target_if_psoc_get_p2p_rx_ops(psoc);
|
||||
if (p2p_rx_ops->lo_ev_handler) {
|
||||
@@ -91,9 +96,9 @@ static int target_p2p_lo_event_handler(ol_scn_t scn, uint8_t *data,
|
||||
|
||||
/**
|
||||
* target_p2p_noa_event_handler() - WMI callback for noa event
|
||||
* @scn:
|
||||
* @scn: pointer to scn
|
||||
* @event_buf: event buffer
|
||||
* @len: buffer length
|
||||
* @len: buffer length
|
||||
*
|
||||
* This function gets called from WMI when triggered WMI event
|
||||
* wmi_p2p_noa_event_id.
|
||||
@@ -110,7 +115,7 @@ static int target_p2p_noa_event_handler(ol_scn_t scn, uint8_t *data,
|
||||
struct wlan_lmac_if_p2p_rx_ops *p2p_rx_ops;
|
||||
QDF_STATUS status = QDF_STATUS_E_FAILURE;
|
||||
|
||||
target_if_info("scn:%p, data:%p, datalen:%d", scn, data, datalen);
|
||||
target_if_debug("scn:%p, data:%p, datalen:%d", scn, data, datalen);
|
||||
|
||||
if (!scn || !data) {
|
||||
target_if_err("scn: 0x%p, data: 0x%p", scn, data);
|
||||
@@ -131,11 +136,16 @@ static int target_p2p_noa_event_handler(ol_scn_t scn, uint8_t *data,
|
||||
|
||||
event_info = qdf_mem_malloc(sizeof(*event_info));
|
||||
if (!event_info) {
|
||||
target_if_err("Failed to allocate p2p noa information");
|
||||
target_if_err("failed to allocate p2p noa information");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/*TODO, extract wmi noa event */
|
||||
if (wmi_extract_p2p_noa_ev_param(wmi_handle, data,
|
||||
event_info)) {
|
||||
target_if_err("failed to extract wmi p2p noa event");
|
||||
qdf_mem_free(event_info);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
p2p_rx_ops = target_if_psoc_get_p2p_rx_ops(psoc);
|
||||
if (p2p_rx_ops->noa_ev_handler) {
|
||||
@@ -153,7 +163,7 @@ QDF_STATUS target_if_p2p_register_lo_event_handler(
|
||||
int status;
|
||||
wmi_unified_t wmi_handle = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
|
||||
target_if_info("psoc:%p, arg:%p", psoc, arg);
|
||||
target_if_debug("psoc:%p, arg:%p", psoc, arg);
|
||||
|
||||
if (!wmi_handle) {
|
||||
target_if_err("Invalid wmi handle");
|
||||
@@ -161,10 +171,11 @@ QDF_STATUS target_if_p2p_register_lo_event_handler(
|
||||
}
|
||||
|
||||
status = wmi_unified_register_event_handler(wmi_handle,
|
||||
wmi_p2p_lo_stop_event_id, target_p2p_lo_event_handler,
|
||||
WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID,
|
||||
target_p2p_lo_event_handler,
|
||||
WMI_RX_UMAC_CTX);
|
||||
|
||||
target_if_info("wmi register lo event handle, status:%d",
|
||||
target_if_debug("wmi register lo event handle, status:%d",
|
||||
status);
|
||||
|
||||
return status == 0 ? QDF_STATUS_SUCCESS : QDF_STATUS_E_FAILURE;
|
||||
@@ -176,7 +187,7 @@ QDF_STATUS target_if_p2p_register_noa_event_handler(
|
||||
int status;
|
||||
wmi_unified_t wmi_handle = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
|
||||
target_if_info("psoc:%p, arg:%p", psoc, arg);
|
||||
target_if_debug("psoc:%p, arg:%p", psoc, arg);
|
||||
|
||||
if (!wmi_handle) {
|
||||
target_if_err("Invalid wmi handle");
|
||||
@@ -184,10 +195,10 @@ QDF_STATUS target_if_p2p_register_noa_event_handler(
|
||||
}
|
||||
|
||||
status = wmi_unified_register_event_handler(wmi_handle,
|
||||
wmi_p2p_noa_event_id, target_p2p_noa_event_handler,
|
||||
WMI_P2P_NOA_EVENTID, target_p2p_noa_event_handler,
|
||||
WMI_RX_UMAC_CTX);
|
||||
|
||||
target_if_info("wmi register noa event handle, status:%d",
|
||||
target_if_debug("wmi register noa event handle, status:%d",
|
||||
status);
|
||||
|
||||
return status == 0 ? QDF_STATUS_SUCCESS : QDF_STATUS_E_FAILURE;
|
||||
@@ -199,7 +210,7 @@ QDF_STATUS target_if_p2p_unregister_lo_event_handler(
|
||||
int status;
|
||||
wmi_unified_t wmi_handle = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
|
||||
target_if_info("psoc:%p, arg:%p", psoc, arg);
|
||||
target_if_debug("psoc:%p, arg:%p", psoc, arg);
|
||||
|
||||
if (!wmi_handle) {
|
||||
target_if_err("Invalid wmi handle");
|
||||
@@ -207,9 +218,9 @@ QDF_STATUS target_if_p2p_unregister_lo_event_handler(
|
||||
}
|
||||
|
||||
status = wmi_unified_unregister_event_handler(wmi_handle,
|
||||
wmi_p2p_lo_stop_event_id);
|
||||
WMI_P2P_LISTEN_OFFLOAD_STOPPED_EVENTID);
|
||||
|
||||
target_if_info("wmi unregister lo event handle, status:%d",
|
||||
target_if_debug("wmi unregister lo event handle, status:%d",
|
||||
status);
|
||||
|
||||
return status == 0 ? QDF_STATUS_SUCCESS : QDF_STATUS_E_FAILURE;
|
||||
@@ -221,7 +232,7 @@ QDF_STATUS target_if_p2p_unregister_noa_event_handler(
|
||||
int status;
|
||||
wmi_unified_t wmi_handle = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
|
||||
target_if_info("psoc:%p, arg:%p", psoc, arg);
|
||||
target_if_debug("psoc:%p, arg:%p", psoc, arg);
|
||||
|
||||
if (!wmi_handle) {
|
||||
target_if_err("Invalid wmi handle");
|
||||
@@ -229,9 +240,9 @@ QDF_STATUS target_if_p2p_unregister_noa_event_handler(
|
||||
}
|
||||
|
||||
status = wmi_unified_unregister_event_handler(wmi_handle,
|
||||
wmi_p2p_noa_event_id);
|
||||
WMI_P2P_NOA_EVENTID);
|
||||
|
||||
target_if_info("wmi unregister noa event handle, status:%d",
|
||||
target_if_debug("wmi unregister noa event handle, status:%d",
|
||||
status);
|
||||
|
||||
return status == 0 ? QDF_STATUS_SUCCESS : QDF_STATUS_E_FAILURE;
|
||||
@@ -240,19 +251,80 @@ QDF_STATUS target_if_p2p_unregister_noa_event_handler(
|
||||
QDF_STATUS target_if_p2p_set_ps(struct wlan_objmgr_psoc *psoc,
|
||||
struct p2p_ps_config *ps_config)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
struct p2p_ps_params cmd;
|
||||
QDF_STATUS status;
|
||||
wmi_unified_t wmi_handle = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
|
||||
target_if_debug("psoc:%p, vdev_id:%d, opp_ps:%d", psoc,
|
||||
ps_config->vdev_id, ps_config->opp_ps);
|
||||
|
||||
if (!wmi_handle) {
|
||||
target_if_err("Invalid wmi handle");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (!ps_config) {
|
||||
target_if_err("ps config parameters is null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
cmd.opp_ps = ps_config->opp_ps;
|
||||
cmd.ctwindow = ps_config->ct_window;
|
||||
cmd.count = ps_config->count;
|
||||
cmd.duration = ps_config->duration;
|
||||
cmd.interval = ps_config->interval;
|
||||
cmd.single_noa_duration = ps_config->single_noa_duration;
|
||||
cmd.ps_selection = ps_config->ps_selection;
|
||||
cmd.session_id = ps_config->vdev_id;
|
||||
|
||||
if (ps_config->opp_ps)
|
||||
status = wmi_unified_set_p2pgo_oppps_req(wmi_handle,
|
||||
&cmd);
|
||||
else
|
||||
status = wmi_unified_set_p2pgo_noa_req_cmd(wmi_handle,
|
||||
&cmd);
|
||||
|
||||
if (status != QDF_STATUS_SUCCESS)
|
||||
target_if_err("Failed to send set uapsd param, %d",
|
||||
status);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS target_if_p2p_lo_start(struct wlan_objmgr_psoc *psoc,
|
||||
struct p2p_lo_start *lo_start)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
wmi_unified_t wmi_handle = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
|
||||
target_if_debug("psoc:%p, vdev_id:%d", psoc, lo_start->vdev_id);
|
||||
|
||||
if (!wmi_handle) {
|
||||
target_if_err("Invalid wmi handle");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
if (!lo_start) {
|
||||
target_if_err("lo start parameters is null");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
return wmi_unified_p2p_lo_start_cmd(wmi_handle, lo_start);
|
||||
}
|
||||
|
||||
QDF_STATUS target_if_p2p_lo_stop(struct wlan_objmgr_psoc *psoc,
|
||||
uint32_t vdev_id)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
wmi_unified_t wmi_handle = wlan_psoc_get_tgt_if_handle(psoc);
|
||||
|
||||
target_if_debug("psoc:%p, vdev_id:%d", psoc, vdev_id);
|
||||
|
||||
if (!wmi_handle) {
|
||||
target_if_err("Invalid wmi handle");
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
return wmi_unified_p2p_lo_stop_cmd(wmi_handle,
|
||||
(uint8_t)vdev_id);
|
||||
}
|
||||
|
||||
void target_if_p2p_register_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
|
||||
|
Ссылка в новой задаче
Block a user