qcacld-3.0: Add support to set/reset BLM suspend state
Once host sends WMI_WOW_ENABLE_CMDID then host components must not send any WMI command to FW. In suspend state if host sends WMI command then FW crashes. Hence add support to set/reset suspend state of Blacklist manager. Thus Blacklist manager checks the suspend state and then only sends WMI command to FW. Change-Id: I2581d38a485c4f930a6e2dfb951c0fdc2306fa3b CRs-Fixed: 2765404
Tento commit je obsažen v:
@@ -192,12 +192,27 @@ void
|
||||
blm_send_reject_ap_list_to_fw(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_list_t *reject_db_list,
|
||||
struct blm_config *cfg);
|
||||
|
||||
/**
|
||||
* blm_update_reject_ap_list_to_fw() - Send the blacklist BSSIDs to FW
|
||||
* @psoc: psoc object
|
||||
*
|
||||
* This API will send the blacklist BSSIDs to FW.
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void blm_update_reject_ap_list_to_fw(struct wlan_objmgr_psoc *psoc);
|
||||
#else
|
||||
static inline void blm_send_reject_ap_list_to_fw(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_list_t *reject_db_list,
|
||||
struct blm_config *cfg)
|
||||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
blm_update_reject_ap_list_to_fw(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
@@ -75,9 +75,13 @@ struct blm_config {
|
||||
|
||||
/**
|
||||
* struct blm_psoc_priv_obj - Psoc priv structure of the blacklist manager.
|
||||
* @pdev_id: pdev id
|
||||
* @is_suspended: is black list manager state suspended
|
||||
* @blm_cfg: These are the config ini params that the user can configure.
|
||||
*/
|
||||
struct blm_psoc_priv_obj {
|
||||
uint8_t pdev_id;
|
||||
bool is_suspended;
|
||||
struct blm_config blm_cfg;
|
||||
};
|
||||
|
||||
|
@@ -790,14 +790,70 @@ static void blm_fill_reject_list(qdf_list_t *reject_db_list,
|
||||
}
|
||||
|
||||
#if defined(WLAN_FEATURE_ROAM_OFFLOAD)
|
||||
void blm_update_reject_ap_list_to_fw(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
struct blm_config *cfg;
|
||||
struct wlan_objmgr_pdev *pdev;
|
||||
struct blm_pdev_priv_obj *blm_ctx;
|
||||
struct blm_psoc_priv_obj *blm_psoc_obj;
|
||||
|
||||
blm_psoc_obj = blm_get_psoc_obj(psoc);
|
||||
if (!blm_psoc_obj) {
|
||||
blm_err("BLM psoc obj NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
pdev = wlan_objmgr_get_pdev_by_id(psoc, blm_psoc_obj->pdev_id,
|
||||
WLAN_MLME_CM_ID);
|
||||
if (!pdev) {
|
||||
blm_err("pdev obj NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
blm_ctx = blm_get_pdev_obj(pdev);
|
||||
if (!blm_ctx) {
|
||||
blm_err("BLM pdev obj NULL");
|
||||
goto end;
|
||||
}
|
||||
|
||||
cfg = &blm_psoc_obj->blm_cfg;
|
||||
blm_send_reject_ap_list_to_fw(pdev, &blm_ctx->reject_ap_list, cfg);
|
||||
|
||||
end:
|
||||
wlan_objmgr_pdev_release_ref(pdev, WLAN_MLME_CM_ID);
|
||||
}
|
||||
|
||||
static void blm_store_pdevid_in_blm_psocpriv(struct wlan_objmgr_pdev *pdev)
|
||||
{
|
||||
struct blm_psoc_priv_obj *blm_psoc_obj;
|
||||
|
||||
blm_psoc_obj = blm_get_psoc_obj(wlan_pdev_get_psoc(pdev));
|
||||
|
||||
if (!blm_psoc_obj) {
|
||||
blm_err("BLM psoc obj NULL");
|
||||
return;
|
||||
}
|
||||
|
||||
blm_psoc_obj->pdev_id = pdev->pdev_objmgr.wlan_pdev_id;
|
||||
}
|
||||
|
||||
void
|
||||
blm_send_reject_ap_list_to_fw(struct wlan_objmgr_pdev *pdev,
|
||||
qdf_list_t *reject_db_list,
|
||||
struct blm_config *cfg)
|
||||
{
|
||||
QDF_STATUS status;
|
||||
bool is_blm_suspended;
|
||||
struct reject_ap_params reject_params = {0};
|
||||
|
||||
ucfg_blm_psoc_get_suspended(wlan_pdev_get_psoc(pdev),
|
||||
&is_blm_suspended);
|
||||
if (is_blm_suspended) {
|
||||
blm_store_pdevid_in_blm_psocpriv(pdev);
|
||||
blm_debug("Failed to send reject AP list to FW as BLM is suspended");
|
||||
return;
|
||||
}
|
||||
|
||||
reject_params.bssid_list =
|
||||
qdf_mem_malloc(sizeof(*reject_params.bssid_list) *
|
||||
PDEV_MAX_NUM_BSSID_DISALLOW_LIST);
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2019 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2019-2020 The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for
|
||||
* any purpose with or without fee is hereby granted, provided that the
|
||||
@@ -46,6 +46,28 @@ QDF_STATUS ucfg_blm_init(void);
|
||||
*/
|
||||
QDF_STATUS ucfg_blm_deinit(void);
|
||||
|
||||
/**
|
||||
* ucfg_blm_psoc_set_suspended() - API to set blacklist mgr state suspended
|
||||
* @psoc: pointer to psoc object
|
||||
* @state: state to be set
|
||||
*
|
||||
* This function sets blacklist mgr state to suspended
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS ucfg_blm_psoc_set_suspended(struct wlan_objmgr_psoc *psoc,
|
||||
bool state);
|
||||
|
||||
/**
|
||||
* ucfg_blm_psoc_get_suspended() - API to get blacklist mgr state suspended
|
||||
* @psoc: pointer to psoc object
|
||||
* @state: pointer to get suspend state of blacklist manager
|
||||
*
|
||||
* Return: QDF_STATUS_SUCCESS - in case of success else return error
|
||||
*/
|
||||
QDF_STATUS ucfg_blm_psoc_get_suspended(struct wlan_objmgr_psoc *psoc,
|
||||
bool *state);
|
||||
|
||||
/**
|
||||
* ucfg_blm_psoc_open() - API to initialize the cfg when psoc is initialized.
|
||||
* @psoc: psoc object
|
||||
|
@@ -22,6 +22,7 @@
|
||||
#include <wlan_blm_ucfg_api.h>
|
||||
#include <wlan_blm_core.h>
|
||||
#include <wlan_blm_api.h>
|
||||
#include "wlan_pmo_obj_mgmt_api.h"
|
||||
|
||||
QDF_STATUS ucfg_blm_init(void)
|
||||
{
|
||||
@@ -106,13 +107,83 @@ QDF_STATUS ucfg_blm_deinit(void)
|
||||
return status;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_blm_psoc_set_suspended(struct wlan_objmgr_psoc *psoc,
|
||||
bool state)
|
||||
{
|
||||
struct blm_psoc_priv_obj *blm_psoc_obj;
|
||||
|
||||
blm_psoc_obj = blm_get_psoc_obj(psoc);
|
||||
|
||||
if (!blm_psoc_obj) {
|
||||
blm_err("BLM psoc obj NULL");
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
blm_psoc_obj->is_suspended = state;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_blm_psoc_get_suspended(struct wlan_objmgr_psoc *psoc,
|
||||
bool *state)
|
||||
{
|
||||
struct blm_psoc_priv_obj *blm_psoc_obj;
|
||||
|
||||
blm_psoc_obj = blm_get_psoc_obj(psoc);
|
||||
|
||||
if (!blm_psoc_obj) {
|
||||
blm_err("BLM psoc obj NULL");
|
||||
*state = true;
|
||||
return QDF_STATUS_E_FAILURE;
|
||||
}
|
||||
|
||||
*state = blm_psoc_obj->is_suspended;
|
||||
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
ucfg_blm_suspend_handler(struct wlan_objmgr_psoc *psoc, void *arg)
|
||||
{
|
||||
ucfg_blm_psoc_set_suspended(psoc, true);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static QDF_STATUS
|
||||
ucfg_blm_resume_handler(struct wlan_objmgr_psoc *psoc, void *arg)
|
||||
{
|
||||
ucfg_blm_psoc_set_suspended(psoc, false);
|
||||
blm_update_reject_ap_list_to_fw(psoc);
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
static inline void
|
||||
ucfg_blm_register_pmo_handler(void)
|
||||
{
|
||||
pmo_register_suspend_handler(WLAN_UMAC_COMP_BLACKLIST_MGR,
|
||||
ucfg_blm_suspend_handler, NULL);
|
||||
pmo_register_resume_handler(WLAN_UMAC_COMP_BLACKLIST_MGR,
|
||||
ucfg_blm_resume_handler, NULL);
|
||||
}
|
||||
|
||||
static inline void
|
||||
ucfg_blm_unregister_pmo_handler(void)
|
||||
{
|
||||
pmo_unregister_suspend_handler(WLAN_UMAC_COMP_BLACKLIST_MGR,
|
||||
ucfg_blm_suspend_handler);
|
||||
pmo_unregister_resume_handler(WLAN_UMAC_COMP_BLACKLIST_MGR,
|
||||
ucfg_blm_resume_handler);
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_blm_psoc_open(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
ucfg_blm_register_pmo_handler();
|
||||
return blm_cfg_psoc_open(psoc);
|
||||
}
|
||||
|
||||
QDF_STATUS ucfg_blm_psoc_close(struct wlan_objmgr_psoc *psoc)
|
||||
{
|
||||
ucfg_blm_unregister_pmo_handler();
|
||||
return QDF_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele