/*
 * Copyright (c) 2022, Qualcomm Innovation Center, Inc. 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 above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */

/**
 * DOC: Public API implementation of pre cac called from SAP module
 */

#include "../../core/src/wlan_pre_cac_main.h"
#include "wlan_pre_cac_api.h"

bool wlan_pre_cac_get_status(struct wlan_objmgr_psoc *psoc)
{
	return pre_cac_is_active(psoc);
}

QDF_STATUS wlan_pre_cac_set_status(struct wlan_objmgr_vdev *vdev, bool status)
{
	return pre_cac_set_status(vdev, status);
}

void wlan_pre_cac_set_freq_before_pre_cac(struct wlan_objmgr_vdev *vdev,
					  qdf_freq_t freq)
{
	pre_cac_set_freq_before_pre_cac(vdev, freq);
}

qdf_freq_t wlan_pre_cac_get_freq_before_pre_cac(struct wlan_objmgr_vdev *vdev)
{
	return pre_cac_get_freq_before_pre_cac(vdev);
}

void wlan_pre_cac_complete_set(struct wlan_objmgr_vdev *vdev,
			       bool status)
{
	pre_cac_complete_set(vdev, status);
}

bool wlan_pre_cac_complete_get(struct wlan_objmgr_vdev *vdev)
{
	return pre_cac_complete_get(vdev);
}

void wlan_pre_cac_handle_radar_ind(struct wlan_objmgr_vdev *vdev)
{
	pre_cac_handle_radar_ind(vdev);
}

void wlan_pre_cac_handle_cac_end(struct wlan_objmgr_vdev *vdev)
{
	pre_cac_handle_cac_end(vdev);
}

