diff --git a/core/hdd/src/wlan_hdd_cfg80211.c b/core/hdd/src/wlan_hdd_cfg80211.c index dec76e295516..379b0b78d0e8 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.c +++ b/core/hdd/src/wlan_hdd_cfg80211.c @@ -12078,9 +12078,10 @@ nla_policy qca_wlan_vendor_attr[QCA_WLAN_VENDOR_ATTR_MAX+1] = { .len = QDF_MAC_ADDR_SIZE}, }; -void wlan_hdd_rso_cmd_status_cb(void *ctx, struct rso_cmd_status *rso_status) +void wlan_hdd_rso_cmd_status_cb(hdd_handle_t hdd_handle, + struct rso_cmd_status *rso_status) { - struct hdd_context *hdd_ctx = (struct hdd_context *)ctx; + struct hdd_context *hdd_ctx = hdd_handle_to_context(hdd_handle); struct hdd_adapter *adapter; adapter = hdd_get_adapter_by_vdev(hdd_ctx, rso_status->vdev_id); diff --git a/core/hdd/src/wlan_hdd_cfg80211.h b/core/hdd/src/wlan_hdd_cfg80211.h index 75e8c74c518d..4d744a513234 100644 --- a/core/hdd/src/wlan_hdd_cfg80211.h +++ b/core/hdd/src/wlan_hdd_cfg80211.h @@ -358,7 +358,7 @@ void wlan_hdd_cfg80211_extscan_callback(hdd_handle_t hdd_handle, #endif /* FEATURE_WLAN_EXTSCAN */ /** * wlan_hdd_rso_cmd_status_cb() - HDD callback to read RSO command status - * @ctx: void pointer to hdd context + * @hdd_handle: opaque handle for the hdd context * @rso_status: rso command status * * This callback function is invoked by firmware to update @@ -366,7 +366,8 @@ void wlan_hdd_cfg80211_extscan_callback(hdd_handle_t hdd_handle, * * Return: None */ -void wlan_hdd_rso_cmd_status_cb(void *ctx, struct rso_cmd_status *rso_status); +void wlan_hdd_rso_cmd_status_cb(hdd_handle_t hdd_handle, + struct rso_cmd_status *rso_status); /** * hdd_rssi_threshold_breached() - rssi breached NL event diff --git a/core/sme/inc/sme_api.h b/core/sme/inc/sme_api.h index 9c0c265bb22e..d15825dc3b6e 100644 --- a/core/sme/inc/sme_api.h +++ b/core/sme/inc/sme_api.h @@ -1787,15 +1787,15 @@ QDF_STATUS sme_deregister_tx_queue_cb(mac_handle_t mac_handle); /** * sme_rso_cmd_status_cb() - Set RSO cmd status callback - * @hal: HAL Handle - * @cb: HDD Callback to rso comman status read + * @mac_handle: Opaque handle for the MAC context + * @cb: HDD Callback to rso command status read * * This function is used to save HDD RSO Command status callback in MAC * * Return: QDF_STATUS */ -QDF_STATUS sme_rso_cmd_status_cb(tHalHandle hal, - void (*cb)(void *, struct rso_cmd_status *)); +QDF_STATUS sme_rso_cmd_status_cb(mac_handle_t mac_handle, + rso_cmd_status_cb cb); /** * sme_register_set_connection_info_cb() - Register connection diff --git a/core/sme/inc/sme_internal.h b/core/sme/inc/sme_internal.h index c1013508d9f7..212599398cbb 100644 --- a/core/sme/inc/sme_internal.h +++ b/core/sme/inc/sme_internal.h @@ -240,6 +240,14 @@ typedef void (*bt_activity_info_cb)(hdd_handle_t hdd_handle, typedef void (*congestion_cb)(hdd_handle_t hdd_handle, uint32_t congestion, uint32_t vdev_id); +/** + * typedef rso_cmd_status_cb - RSO command status callback function + * @hdd_handle: HDD handle registered with SME + * @rso_status: Status of the operation + */ +typedef void (*rso_cmd_status_cb)(hdd_handle_t hdd_handle, + struct rso_cmd_status *rso_status); + typedef struct tagSmeStruct { eSmeState state; qdf_mutex_t lkSmeGlobalLock; @@ -323,8 +331,7 @@ typedef struct tagSmeStruct { bool (*set_connection_info_cb)(bool); bool (*get_connection_info_cb)(uint8_t *session_id, enum scan_reject_states *reason); - void (*rso_cmd_status_cb)(void *hdd_context, - struct rso_cmd_status *rso_status); + rso_cmd_status_cb rso_cmd_status_cb; congestion_cb congestion_cb; pwr_save_fail_cb chip_power_save_fail_cb; bt_activity_info_cb bt_activity_info_cb; diff --git a/core/sme/src/common/sme_api.c b/core/sme/src/common/sme_api.c index 8d0c684b1d62..d49167524ca5 100644 --- a/core/sme/src/common/sme_api.c +++ b/core/sme/src/common/sme_api.c @@ -15235,11 +15235,11 @@ QDF_STATUS sme_register_set_connection_info_cb(tHalHandle hHal, return status; } -QDF_STATUS sme_rso_cmd_status_cb(tHalHandle hal, - void (*cb)(void *, struct rso_cmd_status *)) +QDF_STATUS sme_rso_cmd_status_cb(mac_handle_t mac_handle, + rso_cmd_status_cb cb) { QDF_STATUS status = QDF_STATUS_SUCCESS; - tpAniSirGlobal mac = PMAC_STRUCT(hal); + tpAniSirGlobal mac = MAC_CONTEXT(mac_handle); mac->sme.rso_cmd_status_cb = cb; sme_debug("Registered RSO command status callback");