qcacmn: Enable scan command time out if not disabled explicitly
1. Enable scan command time out for all commands if not disabled explicitly. 2. Remove QDF_BUG() for no serialization command buffers Change-Id: I5357211ef6bc44f8ebd4b8acaa56a12f691fa46d CRs-Fixed: 2175843
This commit is contained in:

committed by
snandini

parent
726ea12445
commit
339dc26b21
@@ -47,7 +47,6 @@ wlan_serialization_add_cmd_to_given_queue(qdf_list_t *queue,
|
|||||||
}
|
}
|
||||||
if (qdf_list_empty(&ser_pdev_obj->global_cmd_pool_list)) {
|
if (qdf_list_empty(&ser_pdev_obj->global_cmd_pool_list)) {
|
||||||
serialization_err("list is full, can't add more");
|
serialization_err("list is full, can't add more");
|
||||||
QDF_BUG(0);
|
|
||||||
return WLAN_SER_CMD_DENIED_LIST_FULL;
|
return WLAN_SER_CMD_DENIED_LIST_FULL;
|
||||||
}
|
}
|
||||||
if (qdf_list_remove_front(&ser_pdev_obj->global_cmd_pool_list,
|
if (qdf_list_remove_front(&ser_pdev_obj->global_cmd_pool_list,
|
||||||
|
@@ -435,6 +435,7 @@ struct scan_cb {
|
|||||||
* @ie_whitelist: default ie whitelist attrs
|
* @ie_whitelist: default ie whitelist attrs
|
||||||
* @bt_a2dp_enabled: if bt a2dp is enabled
|
* @bt_a2dp_enabled: if bt a2dp is enabled
|
||||||
* @miracast_enabled: miracast enabled
|
* @miracast_enabled: miracast enabled
|
||||||
|
* @disable_timeout: command timeout disabled
|
||||||
* @scan_start_request_buff: buffer used to pass
|
* @scan_start_request_buff: buffer used to pass
|
||||||
* scan config to event handlers
|
* scan config to event handlers
|
||||||
*/
|
*/
|
||||||
@@ -453,6 +454,7 @@ struct wlan_scan_obj {
|
|||||||
struct probe_req_whitelist_attr ie_whitelist;
|
struct probe_req_whitelist_attr ie_whitelist;
|
||||||
bool bt_a2dp_enabled;
|
bool bt_a2dp_enabled;
|
||||||
bool miracast_enabled;
|
bool miracast_enabled;
|
||||||
|
bool disable_timeout;
|
||||||
struct scan_start_request scan_start_request_buff;
|
struct scan_start_request scan_start_request_buff;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -371,7 +371,7 @@ scm_scan_start_req(struct scheduler_msg *msg)
|
|||||||
struct wlan_serialization_command cmd = {0, };
|
struct wlan_serialization_command cmd = {0, };
|
||||||
enum wlan_serialization_status ser_cmd_status;
|
enum wlan_serialization_status ser_cmd_status;
|
||||||
struct scan_start_request *req;
|
struct scan_start_request *req;
|
||||||
struct wlan_objmgr_psoc *psoc;
|
struct wlan_scan_obj *scan_obj;
|
||||||
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
QDF_STATUS status = QDF_STATUS_SUCCESS;
|
||||||
|
|
||||||
if (!msg) {
|
if (!msg) {
|
||||||
@@ -386,6 +386,12 @@ scm_scan_start_req(struct scheduler_msg *msg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
req = msg->bodyptr;
|
req = msg->bodyptr;
|
||||||
|
scan_obj = wlan_vdev_get_scan_obj(req->vdev);
|
||||||
|
if (!scan_obj) {
|
||||||
|
scm_debug("Couldn't find scan object");
|
||||||
|
return QDF_STATUS_E_NULL_VALUE;
|
||||||
|
}
|
||||||
|
|
||||||
cmd.cmd_type = WLAN_SER_CMD_SCAN;
|
cmd.cmd_type = WLAN_SER_CMD_SCAN;
|
||||||
cmd.cmd_id = req->scan_req.scan_id;
|
cmd.cmd_id = req->scan_req.scan_id;
|
||||||
cmd.cmd_cb = (wlan_serialization_cmd_callback)
|
cmd.cmd_cb = (wlan_serialization_cmd_callback)
|
||||||
@@ -397,15 +403,8 @@ scm_scan_start_req(struct scheduler_msg *msg)
|
|||||||
SCAN_TIMEOUT_GRACE_PERIOD;
|
SCAN_TIMEOUT_GRACE_PERIOD;
|
||||||
cmd.vdev = req->vdev;
|
cmd.vdev = req->vdev;
|
||||||
|
|
||||||
psoc = wlan_vdev_get_psoc(cmd.vdev);
|
if (scan_obj->disable_timeout)
|
||||||
/*
|
|
||||||
* Temp Hack to disable Serialization Timer
|
|
||||||
* Modified Serialization module to ignore timeout of 0 value
|
|
||||||
*/
|
|
||||||
if (wlan_is_emulation_platform(wlan_psoc_get_nif_phy_version(psoc))) {
|
|
||||||
cmd.cmd_timeout_duration = 0;
|
cmd.cmd_timeout_duration = 0;
|
||||||
scm_info("[SCAN-EMULATION]: Disabling Serialization Timer for Emulation\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
scm_info("req: 0x%pK, reqid: %d, scanid: %d, vdevid: %d",
|
scm_info("req: 0x%pK, reqid: %d, scanid: %d, vdevid: %d",
|
||||||
req, req->scan_req.scan_req_id, req->scan_req.scan_id,
|
req, req->scan_req.scan_req_id, req->scan_req.scan_id,
|
||||||
|
@@ -199,6 +199,25 @@ bool ucfg_scan_get_enable(struct wlan_objmgr_psoc *psoc);
|
|||||||
QDF_STATUS ucfg_scan_set_miracast(
|
QDF_STATUS ucfg_scan_set_miracast(
|
||||||
struct wlan_objmgr_psoc *psoc, bool enable);
|
struct wlan_objmgr_psoc *psoc, bool enable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_scan_set_disable_timeout() - Public API to disable/enable scan timeout
|
||||||
|
* @psoc: psoc on which scan timeout need to be disabled
|
||||||
|
* @disable: disable scan timeout if true else enable scan timeout
|
||||||
|
*
|
||||||
|
* Return: QDF_STATUS.
|
||||||
|
*/
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_scan_set_disable_timeout(struct wlan_objmgr_psoc *psoc, bool disable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ucfg_scan_get_disable_timeout() - Public API to get if scan timeout
|
||||||
|
* is enabled or disabled
|
||||||
|
* @psoc: psoc on which scan timeout status need to be checked
|
||||||
|
*
|
||||||
|
* Return: true if timeout is diaabled else false.
|
||||||
|
*/
|
||||||
|
bool ucfg_scan_get_disable_timeout(struct wlan_objmgr_psoc *psoc);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ucfg_scan_set_wide_band_scan() - Public API to disable/enable wide band scan
|
* ucfg_scan_set_wide_band_scan() - Public API to disable/enable wide band scan
|
||||||
* @pdev: psoc on which scans need to be disabled
|
* @pdev: psoc on which scans need to be disabled
|
||||||
|
@@ -949,6 +949,34 @@ QDF_STATUS ucfg_scan_set_miracast(
|
|||||||
return QDF_STATUS_SUCCESS;
|
return QDF_STATUS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS
|
||||||
|
ucfg_scan_set_disable_timeout(struct wlan_objmgr_psoc *psoc, bool disable)
|
||||||
|
{
|
||||||
|
struct wlan_scan_obj *scan_obj;
|
||||||
|
|
||||||
|
scan_obj = wlan_psoc_get_scan_obj(psoc);
|
||||||
|
if (!scan_obj) {
|
||||||
|
scm_err("Failed to get scan object");
|
||||||
|
return QDF_STATUS_E_NULL_VALUE;
|
||||||
|
}
|
||||||
|
scan_obj->disable_timeout = disable;
|
||||||
|
scm_debug("set disable_timeout to %d", scan_obj->disable_timeout);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ucfg_scan_get_disable_timeout(struct wlan_objmgr_psoc *psoc)
|
||||||
|
{
|
||||||
|
struct wlan_scan_obj *scan_obj;
|
||||||
|
|
||||||
|
scan_obj = wlan_psoc_get_scan_obj(psoc);
|
||||||
|
if (!scan_obj) {
|
||||||
|
scm_err("Failed to get scan object");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return scan_obj->disable_timeout;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS
|
QDF_STATUS
|
||||||
ucfg_scan_set_wide_band_scan(struct wlan_objmgr_pdev *pdev, bool enable)
|
ucfg_scan_set_wide_band_scan(struct wlan_objmgr_pdev *pdev, bool enable)
|
||||||
{
|
{
|
||||||
@@ -1281,6 +1309,7 @@ static QDF_STATUS
|
|||||||
wlan_scan_global_init(struct wlan_scan_obj *scan_obj)
|
wlan_scan_global_init(struct wlan_scan_obj *scan_obj)
|
||||||
{
|
{
|
||||||
scan_obj->enable_scan = true;
|
scan_obj->enable_scan = true;
|
||||||
|
scan_obj->disable_timeout = false;
|
||||||
scan_obj->scan_def.active_dwell = SCAN_ACTIVE_DWELL_TIME;
|
scan_obj->scan_def.active_dwell = SCAN_ACTIVE_DWELL_TIME;
|
||||||
scan_obj->scan_def.passive_dwell = SCAN_PASSIVE_DWELL_TIME;
|
scan_obj->scan_def.passive_dwell = SCAN_PASSIVE_DWELL_TIME;
|
||||||
scan_obj->scan_def.max_rest_time = SCAN_MAX_REST_TIME;
|
scan_obj->scan_def.max_rest_time = SCAN_MAX_REST_TIME;
|
||||||
|
Reference in New Issue
Block a user