106 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			106 lines
		
	
	
		
			3.9 KiB
		
	
	
	
		
			C
		
	
	
		
			Executable File
		
	
	
	
	
| /****************************************************************************
 | |
| 
 | |
| Copyright(c) 2019 by Aerospace C.Power (Chongqing) Microelectronics. ALL RIGHTS RESERVED.
 | |
| 
 | |
| This Information is proprietary to Aerospace C.Power (Chongqing) Microelectronics and MAY NOT
 | |
| be copied by any method or incorporated into another program without
 | |
| the express written consent of Aerospace C.Power. This Information or any portion
 | |
| thereof remains the property of Aerospace C.Power. The Information contained herein
 | |
| is believed to be accurate and Aerospace C.Power assumes no responsibility or
 | |
| liability for its use in any way and conveys no license or title under
 | |
| any patent or copyright and makes no representation or warranty that this
 | |
| Information is free from patent or copyright infringement.
 | |
| 
 | |
| ****************************************************************************/
 | |
| 
 | |
| #ifndef __MAC_CHECK_SPUR_STA_H__
 | |
| #define __MAC_CHECK_SPUR_STA_H__
 | |
| 
 | |
| /* os shim includes */
 | |
| #include "os_types.h"
 | |
| #include "os_timer_api.h"
 | |
| #include "mac_sched_hw.h"
 | |
| #include "mac_check_spur.h"
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| extern "C" {
 | |
| #endif
 | |
| 
 | |
| /* STA check spur long interval 10s = 10*1000 ms*/
 | |
| #define MAC_STA_CHECK_SPUR_LONG_MS     10000
 | |
| /* STA check spur short interval 4s = 4*1000 ms*/
 | |
| #define MAC_STA_CHECK_SPUR_SHORT_MS    4000
 | |
| 
 | |
| /* STA check spur continuous threshold
 | |
|  * greater or reach this number would
 | |
|  * make the mac restart
 | |
|  */
 | |
| #define STA_CON_SPUR_RESET_THRE  2
 | |
| 
 | |
| /**
 | |
|  *@brief mac_sta_check_spur_timer_handle  mac check spur cco timer handle .
 | |
|  *@param timer_id                         timerid.
 | |
|  *@param arg                              point.
 | |
|  *@exception                              [none.]
 | |
|  *@return                                 [void]
 | |
| */
 | |
| void mac_sta_check_spur_timer_handle(timer_id_t timer_id, void * arg);
 | |
| /**
 | |
|  *@brief mac_sta_check_spur_timer_start   mac sta check spur timer start.
 | |
|  *@param spur_ctxt                        point to mac_check_cpur_ctxt.
 | |
|  *@param vdev                             point to vdev.
 | |
|  *@param status                           status.
 | |
|  *@return                                 [0]
 | |
| */
 | |
| uint32_t mac_sta_check_spur_timer_start(mac_check_spur_ctxt_t *spur_ctxt, \
 | |
|     mac_vdev_t *vdev, uint32_t status);
 | |
| 
 | |
| /**
 | |
|  *@brief mac_sta_check_spur_timer_stop    mac sta check spur timer stop.
 | |
|  *@param spur_ctxt                        point to mac_check_cpur_ctxt.
 | |
|  *@return                                 [0]
 | |
| */
 | |
| uint32_t mac_sta_check_spur_timer_stop(mac_check_spur_ctxt_t *spur_ctxt);
 | |
| 
 | |
| /**
 | |
|  *@brief mac_sta_check_spur_timer_restart mac check spur timer restart.
 | |
|  *@param spur_ctxt                        point to mac_check_cpur_ctxt.
 | |
|  *@param is_local_nw_pkt                  judge is local network pkt.
 | |
|  *@exception                              [none.]
 | |
|  *@return                                 [0]
 | |
| */
 | |
| uint32_t mac_sta_check_spur_timer_restart(mac_check_spur_ctxt_t *spur_ctxt,
 | |
|     uint32_t is_local_nw_pkt);
 | |
| 
 | |
| /**
 | |
|  *@brief mac_sta_check_spur               sta check spur.
 | |
|  *@param spur_ctxt                        point to mac_check_cpur_ctxt.
 | |
|  *@exception                              [none.]
 | |
|  *@return                                 [0: start check spur success,
 | |
|  *                                         1: start check spur fail]
 | |
| */
 | |
| uint32_t mac_sta_check_spur(mac_check_spur_ctxt_t *spur_ctxt);
 | |
| 
 | |
| /**
 | |
|  *@brief mac_sta_period_check_spur        sta period check spur.
 | |
|  *@exception                              [none.]
 | |
|  *@return                                 [0: start check spur success,
 | |
|  *                                         1: start check spur fail]
 | |
|  */
 | |
| uint32_t mac_sta_period_check_spur();
 | |
| 
 | |
| /**
 | |
|  *@brief mac_sta_period_check_spur_ctl_by_other uplayer ctl.
 | |
|  *@param is_start                         start check spur.
 | |
|  *@exception                              [none.]
 | |
|  *@return                                 [hanle success or fail]
 | |
|  */
 | |
| uint32_t mac_sta_period_check_spur_ctl_by_other(uint8_t is_start);
 | |
| 
 | |
| #ifdef __cplusplus
 | |
| }
 | |
| #endif
 | |
| 
 | |
| #endif
 | |
| 
 |