WS63 SDK 文档 7021f4f@fbb_ws63
ws63 和 ws63e 解决方案的 SDK 文档
载入中...
搜索中...
未找到
hmac_tx_mpdu_adapt.h
浏览该文件的文档.
1/*
2 * Copyright (c) HiSilicon (Shanghai) Technologies Co., Ltd. 2022-2022. All rights reserved.
3 * Create: 2022-05-09
4 */
5#ifndef __HMAC_TX_MPDU_ADAPT_H__
6#define __HMAC_TX_MPDU_ADAPT_H__
7
8#include "hal_common_ops.h"
9#include "mac_vap_ext.h"
10#include "frw_msg_rom.h"
11#include "dmac_ext_if_device.h"
12
13#ifdef __cplusplus
14#if __cplusplus
15extern "C" {
16#endif
17#endif
18
24
25
26/*****************************************************************************
27 函 数 名 : hmac_tx_tid_lock_bh
28 功能描述 : 使用锁保护所有tid队列资源
29*****************************************************************************/
30static INLINE__ osal_void hmac_tx_tid_lock_bh(hmac_device_stru *hmac_device)
31{
32#if defined(_PRE_OS_VERSION_LITEOS) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LITEOS != _PRE_OS_VERSION)
33 osal_spin_lock_bh(&hmac_device->lock);
34#else
35 unref_param(hmac_device);
37#endif
38}
39
40/*****************************************************************************
41 函 数 名 : hmac_tx_tid_unlock_bh
42 功能描述 : 释放保护所有tid队列资源的锁
43*****************************************************************************/
44static INLINE__ osal_void hmac_tx_tid_unlock_bh(hmac_device_stru *hmac_device)
45{
46#if defined(_PRE_OS_VERSION_LITEOS) && defined(_PRE_OS_VERSION) && (_PRE_OS_VERSION_LITEOS != _PRE_OS_VERSION)
47 osal_spin_unlock_bh(&hmac_device->lock);
48#else
49 unref_param(hmac_device);
51#endif
52}
53
54static INLINE__ osal_void hmac_tx_excp_free_netbuf(oal_netbuf_stru *net_buffer)
55{
56 oal_netbuf_stru *netbuf = net_buffer;
57 oal_netbuf_stru *buf_next = OSAL_NULL;
58
59 while (netbuf != OSAL_NULL) {
60 buf_next = oal_get_netbuf_next(netbuf);
61 oal_netbuf_free(netbuf);
62 netbuf = buf_next;
63 }
64}
65
66#ifdef _PRE_WLAN_FEATURE_ROAM
67/*****************************************************************************
68 函 数 名 : hmac_tx_enable_in_roaming
69 功能描述 : 判断漫游状态下,是否可以发送帧
70*****************************************************************************/
71static INLINE__ oal_bool_enum_uint8 hmac_tx_enable_in_roaming(const hal_to_dmac_device_stru *hal_device,
72 const hmac_vap_stru *hmac_vap)
73{
74 if (hmac_vap->vap_state == MAC_VAP_STATE_ROAMING) {
75 if (hal_device->current_chan_number != hmac_vap->channel.chan_number) {
76 return OSAL_FALSE;
77 }
78 }
79
80 return OSAL_TRUE;
81}
82#endif
83
84/*****************************************************************************
85 函 数 名 : hmac_tx_is_tx_force
86 功能描述 : 判断是否常发模式
87*****************************************************************************/
88static INLINE__ oal_bool_enum_uint8 hmac_tx_is_tx_force(const hmac_vap_stru *hmac_vap)
89{
90 /* 常发下返回状态OK */
91 if ((hmac_vap->al_tx_flag == EXT_SWITCH_ON) ||
92 (hmac_vap->al_rx_flag == EXT_SWITCH_ON)) {
93 return OSAL_TRUE;
94 }
95#ifdef _PRE_WLAN_FEATURE_ROAM
96 /* 漫游状态时,强制发送该数据帧 */
97 if (hmac_vap->vap_state == MAC_VAP_STATE_ROAMING) {
98 return OSAL_TRUE;
99 }
100#endif
101
102 return OSAL_FALSE;
103}
104
105/*****************************************************************************
106 函 数 名 : hmac_tx_mgmt_get_txop_para
107 功能描述 : 设置管理帧txop 参数
108*****************************************************************************/
109static INLINE__ osal_void hmac_tx_mgmt_get_txop_para(hmac_vap_stru *hmac_vap,
110 hal_tx_txop_alg_stru **txop_alg, const mac_tx_ctl_stru *tx_ctl)
111{
112 if (tx_ctl->ismcast == OSAL_TRUE) {
113 /* 获取组播、广播管理帧 发送参数 */
114 *txop_alg = &(hmac_vap->tx_mgmt_bmcast[hmac_vap->channel.band]);
115 } else {
116 /* 获取单播 管理帧 发送参数 */
117 *txop_alg = &(hmac_vap->tx_mgmt_ucast[hmac_vap->channel.band]);
118 }
119}
120
122 hal_tx_txop_alg_stru *txop_alg, osal_u8 do_default_cfg);
124
126 oal_netbuf_stru *net_buffer, osal_u8 mpdu_num);
129#ifdef __cplusplus
130#if __cplusplus
131}
132#endif
133#endif
134
135#endif
void osal_adapt_kthread_unlock(void)
Definition osal_adapt_task.c:19
void osal_adapt_kthread_lock(void)
Definition osal_adapt_task.c:14
#define unref_param(P)
Definition dmac_misc_type.h:33
hcc_msg_type
Definition frw_msg_rom.h:32
@ EXT_SWITCH_ON
Definition frw_util_common.h:21
void osal_spin_lock_bh(osal_spinlock *lock)
Disable soft interrupts and lock the spin lock.
Definition osal_spinlock.c:77
void osal_spin_unlock_bh(osal_spinlock *lock)
release the spin_lock.
Definition osal_spinlock.c:83
osal_void hmac_tx_send_mpdu(hmac_vap_stru *hmac_vap, hcc_msg_type type, oal_netbuf_stru *net_buffer, osal_u8 mpdu_num)
osal_void hmac_tx_data_send(hmac_tx_data_stat_stru *tx_data, oal_netbuf_head_stru *buff_head)
osal_void hmac_tx_fill_first_cb_info(mac_tx_ctl_stru *tx_ctl, hmac_vap_stru *hmac_vap, hmac_user_stru *hmac_user)
osal_u32 hmac_tx_update_protection_txop_alg(hmac_vap_stru *hmac_vap, const hmac_user_stru *hmac_user, hal_tx_txop_alg_stru *txop_alg, osal_u8 do_default_cfg)
osal_u32 hmac_tx_process_data(hal_to_dmac_device_stru *hal_device, hmac_vap_stru *hmac_vap, oal_netbuf_stru *netbuf)
osal_u8 type
Definition oal_net.h:0
td_u32 oal_netbuf_free(oal_netbuf_stru *netbuf)
osal_u8 oal_bool_enum_uint8
Definition oal_types_device_rom.h:45
#define INLINE__
Definition osal_list.h:25
unsigned char osal_u8
Definition osal_types.h:11
#define OSAL_FALSE
Definition osal_types.h:56
#define OSAL_NULL
Definition osal_types.h:65
void osal_void
Definition osal_types.h:29
#define OSAL_TRUE
Definition osal_types.h:57
unsigned int osal_u32
Definition osal_types.h:13
Definition hal_ops_common_rom.h:240
Definition mac_device_ext.h:856
Definition hmac_tx_mpdu_adapt.h:19
mac_tx_ctl_stru * tx_ctl
Definition hmac_tx_mpdu_adapt.h:22
hmac_user_stru * user
Definition hmac_tx_mpdu_adapt.h:21
hmac_vap_stru * hmac_vap
Definition hmac_tx_mpdu_adapt.h:20
Definition mac_user_ext.h:519
Definition mac_vap_ext.h:2019
mac_channel_stru channel
Definition mac_vap_ext.h:2032
hal_tx_txop_alg_stru tx_mgmt_ucast[WLAN_BAND_BUTT]
Definition mac_vap_ext.h:2296
hal_tx_txop_alg_stru tx_mgmt_bmcast[WLAN_BAND_BUTT]
Definition mac_vap_ext.h:2297
osal_u8 al_tx_flag
Definition mac_vap_ext.h:2044
osal_u8 al_rx_flag
Definition mac_vap_ext.h:2046
mac_vap_state_enum_uint8 vap_state
Definition mac_vap_ext.h:2027
osal_u8 chan_number
Definition wlan_types_base_rom.h:259
wlan_channel_band_enum_uint8 band
Definition wlan_types_base_rom.h:260
Definition dmac_ext_if_device_rom.h:98
osal_u8 ismcast
Definition dmac_ext_if_device_rom.h:114
Definition oal_skbuff.h:73
Definition oal_skbuff.h:82
Definition hal_ops_common_rom.h:529
osal_u8 current_chan_number
Definition hal_ops_common_rom.h:560
@ MAC_VAP_STATE_ROAMING
Definition wlan_resource_common_rom.h:64