qcacmn: Add handlers for scan queue in scheduler core
Add scheduler message handler function for QDF_MODULE_ID_SCAN queue. Also post scan beacon/probe frames and scan events to SCAN queue instead of TARGET_IF queue. Change-Id: I94e3ea2f0eb5c9592f5cfcd91738778fa65ba815 CRs-Fixed: 2214554
This commit is contained in:

committed by
nshrivas

parent
1fe9fd414a
commit
6ecd284e5a
@@ -1,8 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||||
*
|
|
||||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
|
||||||
*
|
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
@@ -19,11 +16,6 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* This file was originally distributed by Qualcomm Atheros, Inc.
|
|
||||||
* under proprietary terms before Copyright ownership was assigned
|
|
||||||
* to the Linux Foundation.
|
|
||||||
*/
|
|
||||||
#if !defined(__SCHEDULER_API_H)
|
#if !defined(__SCHEDULER_API_H)
|
||||||
#define __SCHEDULER_API_H
|
#define __SCHEDULER_API_H
|
||||||
|
|
||||||
@@ -242,6 +234,15 @@ QDF_STATUS scheduler_os_if_mq_handler(struct scheduler_msg *msg);
|
|||||||
*/
|
*/
|
||||||
QDF_STATUS scheduler_timer_q_mq_handler(struct scheduler_msg *msg);
|
QDF_STATUS scheduler_timer_q_mq_handler(struct scheduler_msg *msg);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* scheduler_scan_mq_handler() - top level message queue handler for
|
||||||
|
* scan queue
|
||||||
|
* @msg: pointer to actual message being handled
|
||||||
|
*
|
||||||
|
* Return: QDF status
|
||||||
|
*/
|
||||||
|
QDF_STATUS scheduler_scan_mq_handler(struct scheduler_msg *msg);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* scheduler_register_wma_legacy_handler() - register legacy wma handler
|
* scheduler_register_wma_legacy_handler() - register legacy wma handler
|
||||||
* @callback: legacy wma handler to be called for WMA messages
|
* @callback: legacy wma handler to be called for WMA messages
|
||||||
|
@@ -1,9 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
* above copyright notice and this permission notice appear in all
|
* above copyright notice and this permission notice appear in all
|
||||||
@@ -19,11 +16,6 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* This file was originally distributed by Qualcomm Atheros, Inc.
|
|
||||||
* under proprietary terms before Copyright ownership was assigned
|
|
||||||
* to the Linux Foundation.
|
|
||||||
*/
|
|
||||||
#if !defined(__SCHEDULER_CORE_H)
|
#if !defined(__SCHEDULER_CORE_H)
|
||||||
#define __SCHEDULER_CORE_H
|
#define __SCHEDULER_CORE_H
|
||||||
|
|
||||||
@@ -37,7 +29,7 @@
|
|||||||
#else
|
#else
|
||||||
#define SCHEDULER_CORE_MAX_MESSAGES 2000
|
#define SCHEDULER_CORE_MAX_MESSAGES 2000
|
||||||
#endif
|
#endif
|
||||||
#define SCHEDULER_NUMBER_OF_MSG_QUEUE 5
|
#define SCHEDULER_NUMBER_OF_MSG_QUEUE 6
|
||||||
#define SCHEDULER_WRAPPER_MAX_FAIL_COUNT (SCHEDULER_CORE_MAX_MESSAGES * 3)
|
#define SCHEDULER_WRAPPER_MAX_FAIL_COUNT (SCHEDULER_CORE_MAX_MESSAGES * 3)
|
||||||
#define SCHEDULER_WATCHDOG_TIMEOUT (10 * 1000) /* 10s */
|
#define SCHEDULER_WATCHDOG_TIMEOUT (10 * 1000) /* 10s */
|
||||||
|
|
||||||
|
@@ -1,9 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
|
||||||
*
|
*
|
||||||
* Previously licensed under the ISC license by Qualcomm Atheros, Inc.
|
|
||||||
*
|
|
||||||
*
|
|
||||||
* Permission to use, copy, modify, and/or distribute this software for
|
* Permission to use, copy, modify, and/or distribute this software for
|
||||||
* any purpose with or without fee is hereby granted, provided that the
|
* any purpose with or without fee is hereby granted, provided that the
|
||||||
* above copyright notice and this permission notice appear in all
|
* above copyright notice and this permission notice appear in all
|
||||||
@@ -19,12 +16,6 @@
|
|||||||
* PERFORMANCE OF THIS SOFTWARE.
|
* PERFORMANCE OF THIS SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
|
||||||
* This file was originally distributed by Qualcomm Atheros, Inc.
|
|
||||||
* under proprietary terms before Copyright ownership was assigned
|
|
||||||
* to the Linux Foundation.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <scheduler_api.h>
|
#include <scheduler_api.h>
|
||||||
#include <scheduler_core.h>
|
#include <scheduler_core.h>
|
||||||
#include <qdf_atomic.h>
|
#include <qdf_atomic.h>
|
||||||
@@ -531,6 +522,27 @@ QDF_STATUS scheduler_timer_q_mq_handler(struct scheduler_msg *msg)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QDF_STATUS scheduler_scan_mq_handler(struct scheduler_msg *msg)
|
||||||
|
{
|
||||||
|
QDF_STATUS (*scan_q_msg_handler)(struct scheduler_msg *);
|
||||||
|
|
||||||
|
if (NULL == msg) {
|
||||||
|
sched_err("Msg is NULL");
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
|
||||||
|
scan_q_msg_handler = msg->callback;
|
||||||
|
|
||||||
|
if (NULL == scan_q_msg_handler) {
|
||||||
|
sched_err("Msg callback is NULL");
|
||||||
|
QDF_ASSERT(0);
|
||||||
|
return QDF_STATUS_E_FAILURE;
|
||||||
|
}
|
||||||
|
scan_q_msg_handler(msg);
|
||||||
|
|
||||||
|
return QDF_STATUS_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
QDF_STATUS scheduler_register_wma_legacy_handler(scheduler_msg_process_fn_t
|
QDF_STATUS scheduler_register_wma_legacy_handler(scheduler_msg_process_fn_t
|
||||||
wma_callback)
|
wma_callback)
|
||||||
{
|
{
|
||||||
|
@@ -211,7 +211,7 @@ tgt_scan_event_handler(struct wlan_objmgr_psoc *psoc,
|
|||||||
msg.callback = scm_scan_event_handler;
|
msg.callback = scm_scan_event_handler;
|
||||||
msg.flush_callback = scm_scan_event_flush_callback;
|
msg.flush_callback = scm_scan_event_flush_callback;
|
||||||
|
|
||||||
status = scheduler_post_msg(QDF_MODULE_ID_TARGET_IF, &msg);
|
status = scheduler_post_msg(QDF_MODULE_ID_SCAN, &msg);
|
||||||
if (QDF_IS_STATUS_ERROR(status)) {
|
if (QDF_IS_STATUS_ERROR(status)) {
|
||||||
wlan_objmgr_vdev_release_ref(event_info->vdev, WLAN_SCAN_ID);
|
wlan_objmgr_vdev_release_ref(event_info->vdev, WLAN_SCAN_ID);
|
||||||
}
|
}
|
||||||
@@ -272,11 +272,11 @@ QDF_STATUS tgt_scan_bcn_probe_rx_callback(struct wlan_objmgr_psoc *psoc,
|
|||||||
msg.callback = scm_handle_bcn_probe;
|
msg.callback = scm_handle_bcn_probe;
|
||||||
msg.flush_callback = scm_bcn_probe_flush_callback;
|
msg.flush_callback = scm_bcn_probe_flush_callback;
|
||||||
|
|
||||||
status = scheduler_post_msg(QDF_MODULE_ID_TARGET_IF, &msg);
|
status = scheduler_post_msg(QDF_MODULE_ID_SCAN, &msg);
|
||||||
|
|
||||||
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
if (!QDF_IS_STATUS_SUCCESS(status)) {
|
||||||
wlan_objmgr_psoc_release_ref(psoc, WLAN_SCAN_ID);
|
wlan_objmgr_psoc_release_ref(psoc, WLAN_SCAN_ID);
|
||||||
scm_err("failed to post to QDF_MODULE_ID_TARGET_IF");
|
scm_err("failed to post to QDF_MODULE_ID_SCAN");
|
||||||
qdf_mem_free(bcn->rx_data);
|
qdf_mem_free(bcn->rx_data);
|
||||||
qdf_mem_free(bcn);
|
qdf_mem_free(bcn);
|
||||||
qdf_nbuf_free(buf);
|
qdf_nbuf_free(buf);
|
||||||
|
Reference in New Issue
Block a user