WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
alg_dbac_chba_rom.h
浏览该文件的文档.
1 /*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2020-2022. All rights reserved.
3 * Description: dbac algorithm
4 */
5
6#ifndef DBAC_CHBA_ROM_H
7#define DBAC_CHBA_ROM_H
8
9#ifdef _PRE_WLAN_FEATURE_DBAC
10/******************************************************************************
11 1 其他头文件包含
12******************************************************************************/
13#include "alg_dbac_rom.h"
14#include "alg_main_rom.h"
16#include "frw_ext_if_rom.h"
17#include "mac_device_rom.h"
18
19#ifdef __cplusplus
20#if __cplusplus
21extern "C" {
22#endif
23#endif
24
25/* 2 宏定义 */
26#define MAX_CHBA_SLOT 32
27#define PER_SLOT (MAX_CHBA_SLOT - 1)
28
29typedef enum {
30 CHBA_SLOT0 = 0,
31 CHBA_SLOT1 = 1,
32 CHBA_SLOT2 = 2,
33 CHBA_SLOT3 = 3,
34 CHBA_SLOT4 = 4,
35 CHBA_SLOT5 = 5,
36 CHBA_SLOT6 = 6,
37 CHBA_SLOT7 = 7,
38 CHBA_SLOT8 = 8,
39 CHBA_SLOT9 = 9,
40 CHBA_SLOT10 = 10,
41 CHBA_SLOT11 = 11,
42 CHBA_SLOT12 = 12,
43 CHBA_SLOT13 = 13,
44 CHBA_SLOT14 = 14,
45 CHBA_SLOT15 = 15,
46 CHBA_SLOT16 = 16,
47 CHBA_SLOT17 = 17,
48 CHBA_SLOT18 = 18,
49 CHBA_SLOT19 = 19,
50 CHBA_SLOT20 = 20,
51 CHBA_SLOT21 = 21,
52 CHBA_SLOT22 = 22,
53 CHBA_SLOT23 = 23,
54 CHBA_SLOT24 = 24,
55 CHBA_SLOT25 = 25,
56 CHBA_SLOT26 = 26,
57 CHBA_SLOT27 = 27,
58 CHBA_SLOT28 = 28,
59 CHBA_SLOT29 = 29,
60 CHBA_SLOT30 = 30,
61 CHBA_SLOT31 = 31,
62 CHBA_SLOT_BUTT
63} alg_dbac_chba_slot_enum;
64typedef osal_u8 alg_dbac_chba_slot_enum_uint8;
65
66#define DISCOVER_SLOT CHBA_SLOT0
67#define DISCOVER_END_SLOT CHBA_SLOT1
68#define CHBA_DBAC_MAX_TBTT_COUNT 10 /* 一个CHBA周期最多tbtt中断数 */
69#define CHBA_DEFALUT_PERIODS_MS 512 /* CHBA默认调度周期时长(ms) */
70
71/* CHBA初始化时默认参数 */
72#define CHBA_DEFAULT_DURATION_MS (13) /* CHBA默认duration时长(ms) */
73#define CHBA_DEFAULT_INTERVAL_MS (16) /* CHBA默认interval时长(ms) */
74#define CHBA_DEFAULT_NOA_DURATION (CHBA_DEFAULT_DURATION_MS << 10) /* CHBA默认noa duration参数(tu) */
75#define CHBA_DEFAULT_NOA_INTERVAL (CHBA_DEFAULT_INTERVAL_MS << 10) /* CHBA默认noa interval参数(tu) */
76
77#define get_slot_by_tsf(a) (((a + 100) >> 10) >> 4)
78#define get_slot_id_by_tsf(a) (get_slot_by_tsf(a) & PER_SLOT)
79
80#define alg_dbac_bit(x) (1U << (x))
81
82struct chba_dbac_info {
83 /* STA抢占CHBA时隙编号bitmap.0:不抢占;其他值:bit_x=1表示slot_x 被抢占 */
84 osal_u32 sta_preempt_chba_bitmap;
85 osal_u8 chan_switch_flag; /* dbac场景chba切信道标志位 */
86 oal_bool_enum_uint8 support_channel_follow; /* 是否支持CHBA信道跟随 */
87 osal_u8 dbac_resume_slot_idx; /* chba dbac恢复发送的slot_idx */
88 osal_u8 resv;
89};
90
91typedef struct {
92 osal_u32 channel_sequence_bitmap; /* CHBA 信道序列工作时隙 */
93 struct chba_dbac_info dbac_info;
94 /* 对应的dmac_vap_stru指针 */
95 dmac_vap_stru *dmac_vap;
96} chba_vap_info_stru;
97
98typedef osal_u32 (*alg_dbac_sta_chba_noa_isr_proc_cb)(alg_dbac_mgr_stru *dbac_mgr, oal_bool_enum_uint8 is_absent_start);
99typedef osal_u32 (*alg_dbac_parse_type_sta_chba_vap_cb)(const dmac_vap_stru *dmac_vap0, const dmac_vap_stru *dmac_vap1,
100 alg_dbac_type_enum_uint8 *dbac_type, osal_u8 *led_vapid, osal_u8 *flw_vapid);
101osal_u32 alg_dbac_parse_type_sta_chba_vap(const dmac_vap_stru *dmac_vap0, const dmac_vap_stru *dmac_vap1,
102 alg_dbac_type_enum_uint8 *dbac_type, osal_u8 *led_vapid, osal_u8 *flw_vapid);
103osal_void alg_dbac_update_sta_chba_mode(alg_dbac_mgr_stru *dbac_mgr,
104 dmac_vap_stru *led_vap, dmac_vap_stru *flw_vap);
105osal_void alg_dbac_sta_chba_noa_isr_proc(
106 alg_dbac_mgr_stru *dbac_mgr, oal_bool_enum_uint8 is_absent_start);
107oal_bool_enum_uint8 alg_chba_dbac_should_protect_vip_frame(alg_dbac_mgr_stru *dbac_mgr);
108osal_void dmac_chba_dbac_update_preempt_info(dmac_vap_stru *dmac_vap, chba_vap_info_stru *chba_vap_info);
109#ifdef __cplusplus
110#if __cplusplus
111}
112#endif
113#endif
114
115#endif /* _PRE_WLAN_FEATURE_DBAC */
116#endif
osal_u8 oal_bool_enum_uint8
Definition oal_types_device_rom.h:45
unsigned char osal_u8
Definition osal_types.h:11
void osal_void
Definition osal_types.h:29
unsigned int osal_u32
Definition osal_types.h:13
Definition dmac_ext_if_rom.h:106