diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index 55f2ae3e30..42e66128bb 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -10088,19 +10088,19 @@ out: /** * wlan_hdd_p2p_lo_event_callback - P2P listen offload stop event handler - * @context_ptr - hdd context pointer - * @event_ptr - event structure pointer + * @context: context registered with sme_register_p2p_lo_event(). HDD + * always registers a hdd context pointer + * @evt:event structure pointer * * This is the p2p listen offload stop event handler, it sends vendor * event back to supplicant to notify the stop reason. * * Return: None */ -static void wlan_hdd_p2p_lo_event_callback(void *context_ptr, - void *event_ptr) +static void wlan_hdd_p2p_lo_event_callback(void *context, + struct sir_p2p_lo_event *evt) { - struct hdd_context *hdd_ctx = (struct hdd_context *)context_ptr; - struct sir_p2p_lo_event *evt = event_ptr; + struct hdd_context *hdd_ctx = context; struct sk_buff *vendor_event; struct hdd_adapter *adapter; diff --git a/core/sme/inc/sme_internal.h b/core/sme/inc/sme_internal.h index 52fb3e2dad..536f10e45a 100644 --- a/core/sme/inc/sme_internal.h +++ b/core/sme/inc/sme_internal.h @@ -150,7 +150,8 @@ typedef void (*ext_scan_ind_cb)(hdd_handle_t hdd_handle, typedef void (*ocb_callback)(void *context, void *response); typedef void (*sme_set_thermal_level_callback)(hdd_handle_t hdd_handle, u_int8_t level); -typedef void (*p2p_lo_callback)(void *context, void *event); +typedef void (*p2p_lo_callback)(void *context, + struct sir_p2p_lo_event *event); #ifdef FEATURE_OEM_DATA_SUPPORT typedef void (*sme_send_oem_data_rsp_msg)(struct oem_data_rsp *); #endif diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 029da0918a..0320328894 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -14382,7 +14382,7 @@ void sme_update_hw_dbs_capable(tHalHandle hal, uint8_t hw_dbs_capable) * Return: none */ void sme_register_p2p_lo_event(tHalHandle hHal, void *context, - p2p_lo_callback callback) + p2p_lo_callback callback) { tpAniSirGlobal pMac = PMAC_STRUCT(hHal); QDF_STATUS status = QDF_STATUS_E_FAILURE; diff --git a/core/wma/src/wma_features.c b/core/wma/src/wma_features.c index b8612af323..423a2b6e06 100644 --- a/core/wma/src/wma_features.c +++ b/core/wma/src/wma_features.c @@ -5121,7 +5121,8 @@ int wma_p2p_lo_event_handler(void *handle, uint8_t *event_buf, event->vdev_id = fix_param->vdev_id; event->reason_code = fix_param->reason; - p_mac->sme.p2p_lo_event_callback(p_mac->hdd_handle, event); + p_mac->sme.p2p_lo_event_callback(p_mac->sme.p2p_lo_event_context, + event); wma->interfaces[event->vdev_id].p2p_lo_in_progress = false;