mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
qcacld-3.0: Refactor hdd callback (de)registration into a single function
As part of "load once unload never" architecture, cds modules can be opened and closed several times. Refactor the hdd callback registration/ de-registration into hdd_register_cb/hdd_deregister_cb which can be invoked during the open/close of the modules respectively. Change-Id: I2da9018ff2fa6188e61e007c896bc13e8fddcb7d CRs-Fixed: 1026817
This commit is contained in:
parent
c811dccdac
commit
4b55da70d6
19 changed files with 475 additions and 102 deletions
|
|
@ -772,6 +772,7 @@ QDF_STATUS cds_reset_sap_mandatory_channels(void);
|
|||
#ifdef FEATURE_WLAN_MCC_TO_SCC_SWITCH
|
||||
QDF_STATUS cds_register_sap_restart_channel_switch_cb(
|
||||
void (*sap_restart_chan_switch_cb)(void *, uint32_t, uint32_t));
|
||||
QDF_STATUS cds_deregister_sap_restart_channel_switch_cb(void);
|
||||
#endif
|
||||
QDF_STATUS cds_get_pcl_for_existing_conn(enum cds_con_mode mode,
|
||||
uint8_t *pcl_ch, uint32_t *len,
|
||||
|
|
|
|||
|
|
@ -8262,6 +8262,29 @@ QDF_STATUS cds_register_sap_restart_channel_switch_cb(
|
|||
cds_ctx->sap_restart_chan_switch_cb = sap_restart_chan_switch_cb;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* cds_deregister_sap_restart_channel_switch_cb() - De-Register callback for SAP
|
||||
* channel switch without restart
|
||||
*
|
||||
* De Registers callback to perform channel switch
|
||||
*
|
||||
* Return: QDF_STATUS Enumeration
|
||||
*/
|
||||
QDF_STATUS cds_deregister_sap_restart_channel_switch_cb(void)
|
||||
{
|
||||
p_cds_contextType cds_ctx;
|
||||
|
||||
cds_ctx = cds_get_global_context();
|
||||
if (!cds_ctx) {
|
||||
cds_err("Invalid CDS context");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
cds_ctx->sap_restart_chan_switch_cb = NULL;
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1740,4 +1740,6 @@ QDF_STATUS hdd_sme_close_session_callback(void *pContext);
|
|||
int hdd_reassoc(hdd_adapter_t *adapter, const uint8_t *bssid,
|
||||
const uint8_t channel, const handoff_src src);
|
||||
|
||||
int hdd_register_cb(hdd_context_t *hdd_ctx);
|
||||
void hdd_deregister_cb(hdd_context_t *hdd_ctx);
|
||||
#endif /* end #if !defined(WLAN_HDD_MAIN_H) */
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2015 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2015-2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -71,6 +71,7 @@ void memdump_deinit(void);
|
|||
int wlan_hdd_cfg80211_get_fw_mem_dump(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data, int data_len);
|
||||
void wlan_hdd_cfg80211_fw_mem_dump_cb(void *ctx, struct fw_dump_rsp *dump_rsp);
|
||||
#else
|
||||
static inline int memdump_init(void)
|
||||
{
|
||||
|
|
@ -87,6 +88,10 @@ static inline int wlan_hdd_cfg80211_get_fw_mem_dump(struct wiphy *wiphy,
|
|||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
static inline void wlan_hdd_cfg80211_fw_mem_dump_cb(void *ctx,
|
||||
struct fw_dump_rsp *dump_rsp)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* if !defined(WLAN_HDD_MEMDUMP_H)*/
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ int wlan_hdd_cfg80211_nan_request(struct wiphy *wiphy,
|
|||
int data_len);
|
||||
|
||||
bool wlan_hdd_nan_is_supported(void);
|
||||
void wlan_hdd_nan_init(struct hdd_context_s *hdd_ctx);
|
||||
/**
|
||||
* hdd_nan_populate_cds_config() - Populate NAN cds configuration
|
||||
* @cds_cfg: CDS Configuration
|
||||
|
|
@ -59,18 +58,19 @@ static inline void hdd_nan_populate_cds_config(struct cds_config_info *cds_cfg,
|
|||
{
|
||||
cds_cfg->is_nan_enabled = hdd_ctx->config->enable_nan_support;
|
||||
}
|
||||
|
||||
void wlan_hdd_cfg80211_nan_callback(void *ctx, tSirNanEvent *msg);
|
||||
#else
|
||||
static inline bool wlan_hdd_nan_is_supported(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
static inline void wlan_hdd_nan_init(struct hdd_context_s *hdd_ctx)
|
||||
{
|
||||
}
|
||||
static inline void hdd_nan_populate_cds_config(struct cds_config_info *cds_cfg,
|
||||
hdd_context_t *hdd_ctx)
|
||||
{
|
||||
}
|
||||
static inline void wlan_hdd_cfg80211_nan_callback(void *ctx,
|
||||
tSirNanEvent *msg)
|
||||
{
|
||||
}
|
||||
#endif /* WLAN_FEATURE_NAN */
|
||||
#endif /* __WLAN_HDD_NAN_H */
|
||||
|
|
|
|||
|
|
@ -61,13 +61,13 @@ enum hdd_tsf_capture_state {
|
|||
};
|
||||
|
||||
#ifdef WLAN_FEATURE_TSF
|
||||
void wlan_hdd_tsf_init(struct hdd_context_s *hdd_ctx);
|
||||
int hdd_capture_tsf(struct hdd_adapter_s *adapter, uint32_t *buf, int len);
|
||||
int hdd_indicate_tsf(struct hdd_adapter_s *adapter, uint32_t *buf, int len);
|
||||
int wlan_hdd_cfg80211_handle_tsf_cmd(struct wiphy *wiphy,
|
||||
struct wireless_dev *wdev,
|
||||
const void *data,
|
||||
int data_len);
|
||||
int hdd_get_tsf_cb(void *pcb_cxt, struct stsf *ptsf);
|
||||
#else
|
||||
static inline void wlan_hdd_tsf_init(struct hdd_context_s *hdd_ctx)
|
||||
{
|
||||
|
|
@ -93,6 +93,11 @@ static inline int wlan_hdd_cfg80211_handle_tsf_cmd(struct wiphy *wiphy,
|
|||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
static inline int hdd_get_tsf_cb(void *pcb_cxt, struct stsf *ptsf)
|
||||
{
|
||||
return -ENOTSUPP;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -104,6 +104,7 @@
|
|||
#include <wlan_hdd_regulatory.h>
|
||||
#include "ol_rx_fwd.h"
|
||||
#include "wlan_hdd_lpass.h"
|
||||
#include "nan_api.h"
|
||||
|
||||
#ifdef MODULE
|
||||
#define WLAN_MODULE_NAME module_name(THIS_MODULE)
|
||||
|
|
@ -4218,6 +4219,9 @@ void hdd_wlan_exit(hdd_context_t *hdd_ctx)
|
|||
*/
|
||||
hdd_stop_all_adapters(hdd_ctx);
|
||||
|
||||
/* De-register the SME callbacks */
|
||||
hdd_deregister_cb(hdd_ctx);
|
||||
|
||||
/* Stop all the modules */
|
||||
qdf_status = cds_disable(p_cds_context);
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status)) {
|
||||
|
|
@ -6818,11 +6822,6 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
|
|||
if (ret)
|
||||
goto err_close_adapter;
|
||||
|
||||
sme_register11d_scan_done_callback(hdd_ctx->hHal, hdd_11d_scan_done);
|
||||
|
||||
sme_register_oem_data_rsp_callback(hdd_ctx->hHal,
|
||||
hdd_send_oem_data_rsp_msg);
|
||||
|
||||
/* FW capabilities received, Set the Dot11 mode */
|
||||
sme_setdef_dot11mode(hdd_ctx->hHal);
|
||||
|
||||
|
|
@ -6859,7 +6858,6 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
|
|||
hddLog(LOGE, FL("Failed to init ACS Skip timer"));
|
||||
#endif
|
||||
|
||||
wlan_hdd_nan_init(hdd_ctx);
|
||||
sme_cbacks.sme_get_valid_channels = sme_get_cfg_valid_channels;
|
||||
sme_cbacks.sme_get_nss_for_vdev = sme_get_vdev_type_nss;
|
||||
status = cds_init_policy_mgr(&sme_cbacks);
|
||||
|
|
@ -6895,32 +6893,11 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
|
|||
hdd_bus_bw_compute_cbk, (void *)hdd_ctx);
|
||||
#endif
|
||||
|
||||
wlan_hdd_cfg80211_stats_ext_init(hdd_ctx);
|
||||
|
||||
sme_ext_scan_register_callback(hdd_ctx->hHal,
|
||||
wlan_hdd_cfg80211_extscan_callback);
|
||||
|
||||
status = hdd_register_for_sap_restart_with_channel_switch();
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
goto err_exit_nl_srv;
|
||||
|
||||
sme_set_rssi_threshold_breached_cb(hdd_ctx->hHal,
|
||||
hdd_rssi_threshold_breached);
|
||||
|
||||
status = sme_bpf_offload_register_callback(hdd_ctx->hHal,
|
||||
hdd_get_bpf_offload_cb);
|
||||
if (QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("set bpf offload callback failed");
|
||||
|
||||
hdd_cfg80211_link_layer_stats_init(hdd_ctx);
|
||||
wlan_hdd_tsf_init(hdd_ctx);
|
||||
wlan_hdd_send_all_scan_intf_info(hdd_ctx);
|
||||
wlan_hdd_send_version_pkg(hdd_ctx->target_fw_version,
|
||||
hdd_ctx->target_hw_version,
|
||||
hdd_ctx->target_hw_name);
|
||||
|
||||
wlan_hdd_dcc_register_for_dcc_stats_event(hdd_ctx);
|
||||
|
||||
if (hdd_ctx->config->dual_mac_feature_disable) {
|
||||
status = wlan_hdd_disable_all_dual_mac_features(hdd_ctx);
|
||||
if (status != QDF_STATUS_SUCCESS) {
|
||||
|
|
@ -6944,6 +6921,12 @@ int hdd_wlan_startup(struct device *dev, void *hif_sc)
|
|||
|
||||
memdump_init();
|
||||
|
||||
ret = hdd_register_cb(hdd_ctx);
|
||||
if (ret) {
|
||||
hdd_err("Failed to register HDD callbacks!");
|
||||
goto err_exit_nl_srv;
|
||||
}
|
||||
|
||||
goto success;
|
||||
|
||||
err_debugfs_exit:
|
||||
|
|
@ -6992,6 +6975,122 @@ success:
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_register_cb() - Register HDD callbacks.
|
||||
* @hdd_ctx: HDD context
|
||||
*
|
||||
* Register the HDD callbacks to CDS/SME.
|
||||
*
|
||||
* Return: 0 for success or Error code for failure
|
||||
*/
|
||||
int hdd_register_cb(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
int ret = 0;
|
||||
|
||||
ENTER();
|
||||
|
||||
sme_register11d_scan_done_callback(hdd_ctx->hHal, hdd_11d_scan_done);
|
||||
|
||||
sme_register_oem_data_rsp_callback(hdd_ctx->hHal,
|
||||
hdd_send_oem_data_rsp_msg);
|
||||
|
||||
status = sme_fw_mem_dump_register_cb(hdd_ctx->hHal,
|
||||
wlan_hdd_cfg80211_fw_mem_dump_cb);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("Failed to register memdump callback");
|
||||
ret = -EINVAL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
sme_set_tsfcb(hdd_ctx->hHal, hdd_get_tsf_cb, hdd_ctx);
|
||||
sme_nan_register_callback(hdd_ctx->hHal,
|
||||
wlan_hdd_cfg80211_nan_callback);
|
||||
sme_stats_ext_register_callback(hdd_ctx->hHal,
|
||||
wlan_hdd_cfg80211_stats_ext_callback);
|
||||
|
||||
sme_ext_scan_register_callback(hdd_ctx->hHal,
|
||||
wlan_hdd_cfg80211_extscan_callback);
|
||||
|
||||
status = cds_register_sap_restart_channel_switch_cb(
|
||||
(void *)hdd_sap_restart_with_channel_switch);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("restart cb registration failed");
|
||||
ret = -EINVAL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
sme_set_rssi_threshold_breached_cb(hdd_ctx->hHal,
|
||||
hdd_rssi_threshold_breached);
|
||||
|
||||
status = sme_bpf_offload_register_callback(hdd_ctx->hHal,
|
||||
hdd_get_bpf_offload_cb);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
hdd_err("set bpf offload callback failed");
|
||||
ret = -EINVAL;
|
||||
return ret;
|
||||
}
|
||||
|
||||
sme_set_link_layer_stats_ind_cb(hdd_ctx->hHal,
|
||||
wlan_hdd_cfg80211_link_layer_stats_callback);
|
||||
|
||||
wlan_hdd_dcc_register_for_dcc_stats_event(hdd_ctx);
|
||||
|
||||
EXIT();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_deregister_cb() - De-Register HDD callbacks.
|
||||
* @hdd_ctx: HDD context
|
||||
*
|
||||
* De-Register the HDD callbacks to CDS/SME.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void hdd_deregister_cb(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
|
||||
ENTER();
|
||||
|
||||
status = sme_deregister_for_dcc_stats_event(hdd_ctx->hHal);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("De-register of dcc stats callback failed: %d",
|
||||
status);
|
||||
|
||||
sme_reset_link_layer_stats_ind_cb(hdd_ctx->hHal);
|
||||
status = sme_bpf_offload_deregister_callback(hdd_ctx->hHal);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("De-register bpf offload callback failed: %d",
|
||||
status);
|
||||
sme_reset_rssi_threshold_breached_cb(hdd_ctx->hHal);
|
||||
|
||||
status = cds_deregister_sap_restart_channel_switch_cb();
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("De-register restart cb registration failed: %d",
|
||||
status);
|
||||
|
||||
sme_stats_ext_register_callback(hdd_ctx->hHal,
|
||||
wlan_hdd_cfg80211_stats_ext_callback);
|
||||
|
||||
sme_nan_deregister_callback(hdd_ctx->hHal);
|
||||
status = sme_reset_tsfcb(hdd_ctx->hHal);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("Failed to de-register tsfcb the callback:%d",
|
||||
status);
|
||||
status = sme_fw_mem_dump_unregister_cb(hdd_ctx->hHal);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status))
|
||||
hdd_err("Failed to de-register the fw mem dump callback: %d",
|
||||
status);
|
||||
|
||||
sme_deregister_oem_data_rsp_callback(hdd_ctx->hHal);
|
||||
sme_deregister11d_scan_done_callback(hdd_ctx->hHal);
|
||||
|
||||
EXIT();
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_softap_sta_deauth() - handle deauth req from HDD
|
||||
* @adapter: Pointer to the HDD
|
||||
|
|
|
|||
|
|
@ -100,14 +100,14 @@ static void memdump_cleanup_timer_cb(void *data)
|
|||
/**
|
||||
* wlan_hdd_cfg80211_fw_mem_dump_cb() - Callback to receive FW memory dump
|
||||
* @ctx: pointer to HDD context.
|
||||
* @rsp: pointer to fw dump copy complete response
|
||||
* @dump_rsp: pointer to fw dump copy complete response
|
||||
*
|
||||
* This is a callback function used to indicate user space about the
|
||||
* availability for firmware memory dump via vendor event.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void wlan_hdd_cfg80211_fw_mem_dump_cb(void *ctx,
|
||||
void wlan_hdd_cfg80211_fw_mem_dump_cb(void *ctx,
|
||||
struct fw_dump_rsp *dump_rsp)
|
||||
{
|
||||
hdd_context_t *hdd_ctx = ctx;
|
||||
|
|
@ -611,7 +611,6 @@ void memdump_deinit(void)
|
|||
}
|
||||
|
||||
memdump_procfs_remove();
|
||||
sme_fw_mem_dump_unregister_cb(hdd_ctx->hHal);
|
||||
|
||||
mutex_lock(&hdd_ctx->memdump_lock);
|
||||
if (hdd_ctx->fw_dump_loc) {
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ int wlan_hdd_cfg80211_nan_request(struct wiphy *wiphy,
|
|||
*
|
||||
* Return: nothing
|
||||
*/
|
||||
static void wlan_hdd_cfg80211_nan_callback(void *ctx, tSirNanEvent *msg)
|
||||
void wlan_hdd_cfg80211_nan_callback(void *ctx, tSirNanEvent *msg)
|
||||
{
|
||||
hdd_context_t *hdd_ctx = ctx;
|
||||
struct sk_buff *vendor_event;
|
||||
|
|
@ -174,18 +174,3 @@ bool wlan_hdd_nan_is_supported(void)
|
|||
{
|
||||
return sme_is_feature_supported_by_fw(NAN);
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_hdd_nan_init() - HDD NAN initialization function
|
||||
* @hdd_ctx: Global HDD context
|
||||
*
|
||||
* This function is called to initialize the HDD NAN feature. Currently
|
||||
* the only operation required is to register a callback with SME.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void wlan_hdd_nan_init(hdd_context_t *hdd_ctx)
|
||||
{
|
||||
sme_nan_register_callback(hdd_ctx->hHal,
|
||||
wlan_hdd_cfg80211_nan_callback);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1988,7 +1988,7 @@ void wlan_hdd_dcc_register_for_dcc_stats_event(hdd_context_t *hdd_ctx)
|
|||
int rc;
|
||||
|
||||
rc = sme_register_for_dcc_stats_event(hdd_ctx->hHal, hdd_ctx,
|
||||
wlan_hdd_dcc_stats_event_callback);
|
||||
wlan_hdd_dcc_stats_event_callback);
|
||||
if (rc)
|
||||
hdd_err("Register callback failed: %d", rc);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2011-2015 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2011-2016 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
||||
*
|
||||
|
|
@ -289,4 +289,7 @@ int wlan_hdd_cfg80211_dcc_update_ndl(struct wiphy *wiphy,
|
|||
|
||||
void wlan_hdd_dcc_register_for_dcc_stats_event(hdd_context_t *hdd_ctx);
|
||||
|
||||
void wlan_hdd_dcc_stats_event(void *context_ptr, void *response_ptr);
|
||||
|
||||
|
||||
#endif /* __WLAN_HDD_OCB_H */
|
||||
|
|
|
|||
|
|
@ -1326,6 +1326,8 @@ QDF_STATUS hdd_wlan_shutdown(void)
|
|||
hdd_cleanup_scan_queue(pHddCtx);
|
||||
hdd_reset_all_adapters(pHddCtx);
|
||||
|
||||
/* De-register the HDD callbacks */
|
||||
hdd_deregister_cb(pHddCtx);
|
||||
hdd_ipa_uc_ssr_deinit();
|
||||
|
||||
cds_sched_context = get_cds_sched_ctxt();
|
||||
|
|
@ -1615,15 +1617,11 @@ QDF_STATUS hdd_wlan_re_init(void *hif_sc)
|
|||
/* Allow the phone to go to sleep */
|
||||
hdd_allow_suspend(WIFI_POWER_EVENT_WAKELOCK_DRIVER_REINIT);
|
||||
|
||||
sme_ext_scan_register_callback(pHddCtx->hHal,
|
||||
wlan_hdd_cfg80211_extscan_callback);
|
||||
|
||||
qdf_status = hdd_register_for_sap_restart_with_channel_switch();
|
||||
if (!QDF_IS_STATUS_SUCCESS(qdf_status))
|
||||
/* Error already logged */
|
||||
ret = hdd_register_cb(pHddCtx);
|
||||
if (ret) {
|
||||
hdd_err("Failed to register HDD callbacks!");
|
||||
goto err_cds_disable;
|
||||
|
||||
sme_set_rssi_threshold_breached_cb(pHddCtx->hHal, hdd_rssi_threshold_breached);
|
||||
}
|
||||
|
||||
wlan_hdd_send_all_scan_intf_info(pHddCtx);
|
||||
wlan_hdd_send_version_pkg(pHddCtx->target_fw_version,
|
||||
|
|
|
|||
|
|
@ -962,7 +962,7 @@ static void hdd_link_layer_process_radio_stats(hdd_adapter_t *pAdapter,
|
|||
*
|
||||
* Return: None
|
||||
*/
|
||||
static void wlan_hdd_cfg80211_link_layer_stats_callback(void *ctx,
|
||||
void wlan_hdd_cfg80211_link_layer_stats_callback(void *ctx,
|
||||
int indType, void *pRsp)
|
||||
{
|
||||
hdd_context_t *pHddCtx = (hdd_context_t *) ctx;
|
||||
|
|
@ -1071,18 +1071,6 @@ static void wlan_hdd_cfg80211_link_layer_stats_callback(void *ctx,
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* hdd_cfg80211_link_layer_stats_init() - Initialize link layer stats
|
||||
* @pHddCtx: Pointer to hdd context
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void hdd_cfg80211_link_layer_stats_init(hdd_context_t *pHddCtx)
|
||||
{
|
||||
sme_set_link_layer_stats_ind_cb(pHddCtx->hHal,
|
||||
wlan_hdd_cfg80211_link_layer_stats_callback);
|
||||
}
|
||||
|
||||
const struct
|
||||
nla_policy
|
||||
qca_wlan_vendor_ll_set_policy[QCA_WLAN_VENDOR_ATTR_LL_STATS_SET_MAX + 1] = {
|
||||
|
|
@ -1557,7 +1545,7 @@ int wlan_hdd_cfg80211_stats_ext_request(struct wiphy *wiphy,
|
|||
*
|
||||
* Return: nothing
|
||||
*/
|
||||
static void wlan_hdd_cfg80211_stats_ext_callback(void *ctx,
|
||||
void wlan_hdd_cfg80211_stats_ext_callback(void *ctx,
|
||||
tStatsExtEvent *msg)
|
||||
{
|
||||
|
||||
|
|
@ -1614,18 +1602,6 @@ static void wlan_hdd_cfg80211_stats_ext_callback(void *ctx,
|
|||
cfg80211_vendor_event(vendor_event, GFP_KERNEL);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* wlan_hdd_cfg80211_stats_ext_init() - ext stats init
|
||||
* @ctx: Pointer to HDD context
|
||||
*
|
||||
* Return: nothing
|
||||
*/
|
||||
void wlan_hdd_cfg80211_stats_ext_init(hdd_context_t *pHddCtx)
|
||||
{
|
||||
sme_stats_ext_register_callback(pHddCtx->hHal,
|
||||
wlan_hdd_cfg80211_stats_ext_callback);
|
||||
}
|
||||
#endif /* End of WLAN_FEATURE_STATS_EXT */
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -88,8 +88,6 @@ struct index_data_rate_type {
|
|||
*/
|
||||
#define LL_STATS_EVENT_BUF_SIZE 4096
|
||||
|
||||
void hdd_cfg80211_link_layer_stats_init(hdd_context_t *pHddCtx);
|
||||
|
||||
/**
|
||||
* wlan_hdd_cfg80211_ll_stats_set() - set link layer stats
|
||||
* @wiphy: Pointer to wiphy
|
||||
|
|
@ -142,11 +140,6 @@ static inline bool hdd_link_layer_stats_supported(void)
|
|||
|
||||
#else
|
||||
|
||||
static inline void hdd_cfg80211_link_layer_stats_init(hdd_context_t *pHddCtx)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
static inline void hdd_init_ll_stats_ctx(void)
|
||||
{
|
||||
return;
|
||||
|
|
@ -174,7 +167,6 @@ int wlan_hdd_cfg80211_stats_ext_request(struct wiphy *wiphy,
|
|||
const void *data,
|
||||
int data_len);
|
||||
|
||||
void wlan_hdd_cfg80211_stats_ext_init(hdd_context_t *pHddCtx);
|
||||
#else
|
||||
static inline void wlan_hdd_cfg80211_stats_ext_init(hdd_context_t *pHddCtx) {}
|
||||
#endif /* End of WLAN_FEATURE_STATS_EXT */
|
||||
|
|
@ -207,5 +199,10 @@ int wlan_hdd_cfg80211_dump_survey(struct wiphy *wiphy,
|
|||
void hdd_display_hif_stats(void);
|
||||
void hdd_clear_hif_stats(void);
|
||||
|
||||
void wlan_hdd_cfg80211_stats_ext_callback(void *ctx,
|
||||
tStatsExtEvent *msg);
|
||||
|
||||
void wlan_hdd_cfg80211_link_layer_stats_callback(void *ctx,
|
||||
int indType, void *pRsp);
|
||||
#endif /* end #if !defined(WLAN_HDD_STATS_H) */
|
||||
|
||||
|
|
|
|||
|
|
@ -201,7 +201,7 @@ int hdd_indicate_tsf(struct hdd_adapter_s *adapter, uint32_t *buf, int len)
|
|||
*
|
||||
* Return: 0 for success or non-zero negative failure code
|
||||
*/
|
||||
static int hdd_get_tsf_cb(void *pcb_cxt, struct stsf *ptsf)
|
||||
int hdd_get_tsf_cb(void *pcb_cxt, struct stsf *ptsf)
|
||||
{
|
||||
struct hdd_context_s *hddctx;
|
||||
struct hdd_adapter_s *adapter;
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ typedef struct sNanRequestReq {
|
|||
|
||||
typedef void (*NanCallback)(void *, tSirNanEvent *);
|
||||
void sme_nan_register_callback(tHalHandle hHal, NanCallback callback);
|
||||
void sme_nan_deregister_callback(tHalHandle hHal);
|
||||
QDF_STATUS sme_nan_request(tpNanRequestReq input);
|
||||
|
||||
#endif /* __NAN_API_H__ */
|
||||
|
|
|
|||
|
|
@ -365,15 +365,23 @@ extern QDF_STATUS sme_set_host_power_save(tHalHandle hHal, bool psMode);
|
|||
void sme_set_dhcp_till_power_active_flag(tHalHandle hHal, uint8_t flag);
|
||||
extern QDF_STATUS sme_register11d_scan_done_callback(tHalHandle hHal,
|
||||
csr_scan_completeCallback);
|
||||
void sme_deregister11d_scan_done_callback(tHalHandle hHal);
|
||||
|
||||
#ifdef FEATURE_OEM_DATA_SUPPORT
|
||||
extern QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle h_hal,
|
||||
sme_send_oem_data_rsp_msg callback);
|
||||
void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal);
|
||||
|
||||
#else
|
||||
static inline QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle h_hal,
|
||||
sme_send_oem_data_rsp_msg callback)
|
||||
{
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
static inline void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal)
|
||||
{
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
extern QDF_STATUS sme_wow_add_pattern(tHalHandle hHal,
|
||||
|
|
@ -812,6 +820,7 @@ typedef struct sStatsExtRequestReq {
|
|||
typedef void (*StatsExtCallback)(void *, tStatsExtEvent *);
|
||||
void sme_stats_ext_register_callback(tHalHandle hHal,
|
||||
StatsExtCallback callback);
|
||||
void sme_stats_ext_deregister_callback(tHalHandle hhal);
|
||||
QDF_STATUS sme_stats_ext_request(uint8_t session_id,
|
||||
tpStatsExtRequestReq input);
|
||||
QDF_STATUS sme_stats_ext_event(tHalHandle hHal, void *pMsg);
|
||||
|
|
@ -878,6 +887,7 @@ QDF_STATUS sme_ll_stats_get_req(tHalHandle hHal,
|
|||
QDF_STATUS sme_set_link_layer_stats_ind_cb(tHalHandle hHal,
|
||||
void (*callbackRoutine)(void *callbackCtx,
|
||||
int indType, void *pRsp));
|
||||
QDF_STATUS sme_reset_link_layer_stats_ind_cb(tHalHandle hhal);
|
||||
#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
|
||||
|
||||
QDF_STATUS sme_fw_mem_dump(tHalHandle hHal, void *recvd_req);
|
||||
|
|
@ -973,6 +983,7 @@ QDF_STATUS sme_set_rssi_monitoring(tHalHandle hal,
|
|||
struct rssi_monitor_req *input);
|
||||
QDF_STATUS sme_set_rssi_threshold_breached_cb(tHalHandle hal,
|
||||
void (*cb)(void *, struct rssi_breach_event *));
|
||||
QDF_STATUS sme_reset_rssi_threshold_breached_cb(tHalHandle hal);
|
||||
|
||||
QDF_STATUS sme_register_mgmt_frame_ind_callback(tHalHandle hal,
|
||||
sir_mgmt_frame_ind_callback callback);
|
||||
|
|
@ -1050,6 +1061,8 @@ QDF_STATUS sme_dcc_update_ndl(tHalHandle hHal, void *context,
|
|||
|
||||
QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context,
|
||||
ocb_callback callback);
|
||||
QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle hHal);
|
||||
|
||||
void sme_add_set_thermal_level_callback(tHalHandle hal,
|
||||
sme_set_thermal_level_callback callback);
|
||||
|
||||
|
|
@ -1096,13 +1109,22 @@ QDF_STATUS sme_ht40_stop_obss_scan(tHalHandle hHal, uint32_t vdev_id);
|
|||
QDF_STATUS sme_set_tsfcb(tHalHandle hHal,
|
||||
int (*cb_fn)(void *cb_ctx, struct stsf *ptsf), void *cb_ctx);
|
||||
|
||||
QDF_STATUS sme_reset_tsfcb(tHalHandle h_hal);
|
||||
|
||||
#ifdef WLAN_FEATURE_TSF
|
||||
QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue);
|
||||
QDF_STATUS sme_reset_tsf_gpio(tHalHandle h_hal);
|
||||
|
||||
#else
|
||||
static inline QDF_STATUS sme_set_tsf_gpio(tHalHandle h_hal, uint32_t pinvalue)
|
||||
{
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
static inline QDF_STATUS sme_reset_tsf_gpio(tHalHandle h_hal)
|
||||
{
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
QDF_STATUS sme_update_mimo_power_save(tHalHandle hHal,
|
||||
|
|
@ -1117,6 +1139,7 @@ QDF_STATUS sme_remove_beacon_filter(tHalHandle hal, uint32_t session_id);
|
|||
QDF_STATUS sme_bpf_offload_register_callback(tHalHandle hal,
|
||||
void (*pbpf_get_offload_cb)(void *,
|
||||
struct sir_bpf_get_offload *));
|
||||
QDF_STATUS sme_bpf_offload_deregister_callback(tHalHandle hal);
|
||||
|
||||
QDF_STATUS sme_get_bpf_offload_capabilities(tHalHandle hal);
|
||||
QDF_STATUS sme_set_bpf_instructions(tHalHandle hal,
|
||||
|
|
|
|||
|
|
@ -4728,6 +4728,29 @@ QDF_STATUS sme_register11d_scan_done_callback(tHalHandle hHal,
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_deregister11d_scan_done_callback() - De-register scandone callback
|
||||
* @h_hal: Handler return by mac_open
|
||||
*
|
||||
* This function De-registers the scandone callback to SME
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void sme_deregister11d_scan_done_callback(tHalHandle h_hal)
|
||||
{
|
||||
tpAniSirGlobal pmac;
|
||||
|
||||
if (!h_hal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("hHal is not valid"));
|
||||
return;
|
||||
}
|
||||
|
||||
pmac = PMAC_STRUCT(h_hal);
|
||||
pmac->scan.callback11dScanDone = NULL;
|
||||
}
|
||||
|
||||
|
||||
#ifdef FEATURE_OEM_DATA_SUPPORT
|
||||
/**
|
||||
* sme_register_oem_data_rsp_callback() - Register a routine of
|
||||
|
|
@ -4752,6 +4775,27 @@ QDF_STATUS sme_register_oem_data_rsp_callback(tHalHandle h_hal,
|
|||
return status;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_deregister_oem_data_rsp_callback() - De-register OEM datarsp callback
|
||||
* @h_hal: Handler return by mac_open
|
||||
* This function De-registers the OEM data response callback to SME
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void sme_deregister_oem_data_rsp_callback(tHalHandle h_hal)
|
||||
{
|
||||
tpAniSirGlobal pmac;
|
||||
|
||||
if (!h_hal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("hHal is not valid"));
|
||||
return;
|
||||
}
|
||||
pmac = PMAC_STRUCT(h_hal);
|
||||
|
||||
pmac->oemData.oem_data_rsp_callback = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
@ -7330,7 +7374,7 @@ QDF_STATUS sme_preferred_network_found_ind(tHalHandle hHal, void *pMsg)
|
|||
|
||||
#endif /* FEATURE_WLAN_SCAN_PNO */
|
||||
|
||||
/*
|
||||
/**
|
||||
* sme_set_tsfcb() - Set callback for TSF capture
|
||||
* @h_hal: Handler return by mac_open
|
||||
* @cb_fn: Callback function pointer
|
||||
|
|
@ -7353,6 +7397,35 @@ QDF_STATUS sme_set_tsfcb(tHalHandle h_hal,
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_reset_tsfcb() - Reset callback for TSF capture
|
||||
* @h_hal: Handler return by mac_open
|
||||
*
|
||||
* This function reset the tsf capture callback to SME
|
||||
*
|
||||
* Return: QDF_STATUS
|
||||
*/
|
||||
QDF_STATUS sme_reset_tsfcb(tHalHandle h_hal)
|
||||
{
|
||||
tpAniSirGlobal mac;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!h_hal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("h_hal is not valid"));
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
mac = PMAC_STRUCT(h_hal);
|
||||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
mac->sme.get_tsf_cb = NULL;
|
||||
mac->sme.get_tsf_cxt = NULL;
|
||||
sme_release_global_lock(&mac->sme);
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
#ifdef WLAN_FEATURE_TSF
|
||||
/*
|
||||
* sme_set_tsf_gpio() - set gpio pin that be toggled when capture tef
|
||||
|
|
@ -11420,6 +11493,40 @@ QDF_STATUS sme_register_for_dcc_stats_event(tHalHandle hHal, void *context,
|
|||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_deregister_for_dcc_stats_event() - De-Register for the periodic DCC stats
|
||||
* event
|
||||
* @h_hal: Hal Handle
|
||||
*
|
||||
* This function de-registers the DCC perioc stats callback
|
||||
*
|
||||
* Return: QDF_STATUS Enumeration
|
||||
*/
|
||||
QDF_STATUS sme_deregister_for_dcc_stats_event(tHalHandle h_hal)
|
||||
{
|
||||
tpAniSirGlobal mac;
|
||||
QDF_STATUS status;
|
||||
|
||||
if (!h_hal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("h_hal is not valid"));
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
mac = PMAC_STRUCT(h_hal);
|
||||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("Failed to acquire global lock"));
|
||||
return status;
|
||||
}
|
||||
mac->sme.dcc_stats_event_callback = NULL;
|
||||
mac->sme.dcc_stats_event_context = NULL;
|
||||
sme_release_global_lock(&mac->sme);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void sme_get_recovery_stats(tHalHandle hHal)
|
||||
{
|
||||
uint8_t i;
|
||||
|
|
@ -12513,6 +12620,30 @@ void sme_stats_ext_register_callback(tHalHandle hHal, StatsExtCallback callback)
|
|||
pMac->sme.StatsExtCallback = callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_stats_ext_deregister_callback() - De-register ext stats callback
|
||||
* @h_hal: Hal Handle
|
||||
*
|
||||
* This function is called to de initialize the HDD NAN feature. Currently
|
||||
* the only operation required is to de-register a callback with SME.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void sme_stats_ext_deregister_callback(tHalHandle h_hal)
|
||||
{
|
||||
tpAniSirGlobal pmac;
|
||||
|
||||
if (!h_hal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("hHal is not valid"));
|
||||
return;
|
||||
}
|
||||
|
||||
pmac = PMAC_STRUCT(h_hal);
|
||||
pmac->sme.StatsExtCallback = NULL;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
\fn sme_stats_ext_request
|
||||
|
||||
|
|
@ -13683,6 +13814,41 @@ QDF_STATUS sme_set_link_layer_stats_ind_cb
|
|||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_reset_link_layer_stats_ind_cb() - SME API to reset link layer stats
|
||||
* indication
|
||||
* @h_hal: Hal Handle
|
||||
*
|
||||
* This function reset's the link layer stats indication
|
||||
*
|
||||
* Return: QDF_STATUS Enumeration
|
||||
*/
|
||||
|
||||
QDF_STATUS sme_reset_link_layer_stats_ind_cb(tHalHandle h_hal)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
tpAniSirGlobal pmac;
|
||||
|
||||
if (!h_hal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("hHal is not valid"));
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
pmac = PMAC_STRUCT(h_hal);
|
||||
|
||||
status = sme_acquire_global_lock(&pmac->sme);
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
pmac->sme.pLinkLayerStatsIndCallback = NULL;
|
||||
sme_release_global_lock(&pmac->sme);
|
||||
} else {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR, "%s: sme_acquire_global_lock error",
|
||||
__func__);
|
||||
}
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
#endif /* WLAN_FEATURE_LINK_LAYER_STATS */
|
||||
|
||||
/**
|
||||
|
|
@ -14530,17 +14696,50 @@ void sme_update_user_configured_nss(tHalHandle hal, uint8_t nss)
|
|||
|
||||
/**
|
||||
* sme_set_rssi_threshold_breached_cb() - set rssi threshold breached callback
|
||||
* @hal: global hal handle
|
||||
* @h_hal: global hal handle
|
||||
* @cb: callback function pointer
|
||||
*
|
||||
* This function stores the rssi threshold breached callback function.
|
||||
*
|
||||
* Return: QDF_STATUS enumeration.
|
||||
*/
|
||||
QDF_STATUS sme_set_rssi_threshold_breached_cb(tHalHandle hal,
|
||||
QDF_STATUS sme_set_rssi_threshold_breached_cb(tHalHandle h_hal,
|
||||
void (*cb)(void *, struct rssi_breach_event *))
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
tpAniSirGlobal mac;
|
||||
|
||||
if (!h_hal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("hHal is not valid"));
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
mac = PMAC_STRUCT(h_hal);
|
||||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("sme_acquire_global_lock failed!(status=%d)"),
|
||||
status);
|
||||
return status;
|
||||
}
|
||||
|
||||
mac->sme.rssi_threshold_breached_cb = cb;
|
||||
sme_release_global_lock(&mac->sme);
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_set_rssi_threshold_breached_cb() - Reset rssi threshold breached callback
|
||||
* @hal: global hal handle
|
||||
*
|
||||
* This function de-registers the rssi threshold breached callback function.
|
||||
*
|
||||
* Return: QDF_STATUS enumeration.
|
||||
*/
|
||||
QDF_STATUS sme_reset_rssi_threshold_breached_cb(tHalHandle hal)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
tpAniSirGlobal mac = PMAC_STRUCT(hal);
|
||||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
|
|
@ -14551,7 +14750,7 @@ QDF_STATUS sme_set_rssi_threshold_breached_cb(tHalHandle hal,
|
|||
return status;
|
||||
}
|
||||
|
||||
mac->sme.rssi_threshold_breached_cb = cb;
|
||||
mac->sme.rssi_threshold_breached_cb = NULL;
|
||||
sme_release_global_lock(&mac->sme);
|
||||
return status;
|
||||
}
|
||||
|
|
@ -15626,6 +15825,41 @@ uint32_t sme_get_wni_dot11_mode(tHalHandle hal)
|
|||
mac_ctx->roam.configParam.uCfgDot11Mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_bpf_offload_deregister_callback() - Register get bpf offload callbacK
|
||||
*
|
||||
* @h_hal - MAC global handle
|
||||
* @callback_routine - callback routine from HDD
|
||||
*
|
||||
* This API is invoked by HDD to de-register its callback in SME
|
||||
*
|
||||
* Return: QDF_STATUS Enumeration
|
||||
*/
|
||||
QDF_STATUS sme_bpf_offload_deregister_callback(tHalHandle h_hal)
|
||||
{
|
||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||
tpAniSirGlobal mac;
|
||||
|
||||
if (!h_hal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("hHal is not valid"));
|
||||
return QDF_STATUS_E_INVAL;
|
||||
}
|
||||
|
||||
mac = PMAC_STRUCT(h_hal);
|
||||
|
||||
status = sme_acquire_global_lock(&mac->sme);
|
||||
if (QDF_IS_STATUS_SUCCESS(status)) {
|
||||
mac->sme.pbpf_get_offload_cb = NULL;
|
||||
sme_release_global_lock(&mac->sme);
|
||||
} else {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("sme_acquire_global_lock failed"));
|
||||
}
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* sme_create_mon_session() - post message to create PE session for monitormode
|
||||
* operation
|
||||
|
|
|
|||
|
|
@ -59,6 +59,28 @@ void sme_nan_register_callback(tHalHandle hHal, NanCallback callback)
|
|||
pMac->sme.nanCallback = callback;
|
||||
}
|
||||
|
||||
/**
|
||||
* sme_nan_deregister_callback() - NAN De-register cb function
|
||||
* @h_hal: Hal handle
|
||||
*
|
||||
* De-register nan rsp callback with sme layer.
|
||||
*
|
||||
* Return: void
|
||||
*/
|
||||
void sme_nan_deregister_callback(tHalHandle h_hal)
|
||||
{
|
||||
tpAniSirGlobal pmac;
|
||||
|
||||
if (!h_hal) {
|
||||
QDF_TRACE(QDF_MODULE_ID_SME, QDF_TRACE_LEVEL_ERROR,
|
||||
FL("hHal is not valid"));
|
||||
return;
|
||||
}
|
||||
pmac = PMAC_STRUCT(h_hal);
|
||||
pmac->sme.nanCallback = NULL;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* Function: sme_nan_request
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in a new issue