# /space/home/slher/rel/Beken/v6_4_5/macsw/ip/lmac/src/bfr/bfr.h File Reference

Beamformer Module Definitions. More...

`#include "rwnx_config.h"`
`#include "co_list.h"`
`#include "mac_frame.h"`
`#include "dma.h"`
`#include "tx_swdesc.h"`
`#include "vif_mgmt.h"`

Go to the source code of this file.

## Data Structures
struct | bfr_mem_node
| Structure representing a piece of BFR memory. More...
struct | bfr_env_tag
| Structure representing the environment used to manage all transmissions as a beamformer. More...
struct | bfr_info_sta
| Structure containing required information for BFR transmission to a given STA. More...
## Defines
BFR Memory Configuration
#define | BFR_MEM_REP_NB_MAX (6)
| Maximal number of beamforming reports that can be downloaded in BFR Memory.
#define | BFR_MEM_BASE_ADDR (0x60C05000)
| Base address of BFR Memory in HW memory (FPGA B).
#define | BFM_MEM_PTR_SIZE (BFR_MEM_REP_NB_MAX * 2)
| Size of section in BFR Memory containing pointer to reports (in bytes).
#define | BFR_MEM_START_ADDR (BFM_MEM_PTR_SIZE)
| Start Address of remaining BFR Memory (Offset from BFR_MEM_BASE_ADDR).
#define | BFR_MEM_NODE_NB (BFR_MEM_REP_NB_MAX)
| Number of memory nodes that can be used to describe state of BFR Memory.
Frame Information for NPDA
#define | BFR_NDPA_SU_LEN (MAC_LONG_CTRLFRAME_LEN + 3)
| Length of NDP Announcement Frame sent during SU Calibration (in bytes).
#define | BFR_NDPA_STA_INFO_LEN (2)
| Length of a STA Information field.
#define | BFR_NDPA_TOKEN_MAX (0x3F)
| Maximal sounding dialog token value (63).
#define | BFR_NPDA_TOKEN_POS (2)
| Position of Sounding Dialog Token Number in Sounding Dialog Token field.
#define | BFR_NDPA_TOKEN_MASK (BFR_NDPA_TOKEN_MAX << BFR_NPDA_TOKEN_POS)
| Mask allowing to get/set Dialog Token value.
#define | BFR_NPDA_AID12_POS (0)
| Position of AID12 field in STA Info field.
#define | BFR_NDPA_AID12_MASK (0xFFF)
| Mask allowing to get/set AID12 value.
#define | BFR_NPDA_FBACK_POS (12)
| Position of Feedback Type field in STA Info field.
#define | BFR_NDPA_FBACK_MASK (0x1000)
| Mask allowing to get/set Feedback Type value.
#define | BFR_NPDA_NC_IDX_POS (13)
| Position of NC Index field in STA Info field.
#define | BFR_NDPA_NC_IDX_MASK (0xFE00)
| Mask allowing to get/set NC Index value.
VHT NDP Announcement frame format (see 802.11ac-2013, section 8.3.1.20)
Offset of Dialog Token field (from beginning of frame)
#define | BFR_NDPA_DIALOG_TOKEN_OFFSET (16)
| Offset of first STA Info field (from beginning of frame).
#define | BFR_NDPA_STA_INFO_OFFSET (17)
| Offset of first STA Info field (from beginning of frame).
#define | BFR_NDPA_STA_INFO_LENGTH (2)
| Length of STA Info field.
Frame Information for BRP (Beamforming Report Poll)
#define | BFR_BRP_LEN (MAC_LONG_CTRLFRAME_LEN + 1)
| Length of Beamforming Report Poll Frame (in bytes).
Beamforming Report Poll frame format (see 802.11ac-2013, section 8.3.1.21)
Offset of Retransmission Bitmap field
#define | BFR_BRP_RETX_BITMAP_OFFSET (16)
Frame Information for VHT MIMO Control field
#define | BFR_MIMO_CTRL_NC_OFFSET (0)
| Offset of NC Index field.
#define | BFR_MIMO_CTRL_NR_OFFSET (3)
| Offset of NR Index field.
#define | BFR_MIMO_CTRL_CHAN_WIDTH_OFFSET (6)
| Offset of Channel Width field.
#define | BFR_MIMO_CTRL_GROUPING_OFFSET (8)
| Offset of Grouping field.
#define | BFR_MIMO_CTRL_CODEBOOK_OFFSET (10)
| Offset of Codebook Information field.
#define | BFR_MIMO_CTRL_FEEDBACK_OFFSET (11)
| Offset of Feedback Type field.
#define | BFR_MIMO_CTRL_REM_SEGM_OFFSET (12)
| Offset of Remaining Feedback Segments field.
#define | BFR_MIMO_CTRL_FIRST_SEGM_OFFSET (15)
| Offset of First Feedback Segment field.
#define | BFR_MIMO_CTRL_RESERVED_OFFSET (16)
| Offset of Reserved Bits.
#define | BFR_MIMO_CTRL_TOKEN_OFFSET (18)
| Offset of Sounding Dialog Token Number field.
#define | BFR_MIMO_CTRL_NC_MASK (0x7)
| Non-shifted mask for NC Index field.
#define | BFR_MIMO_CTRL_NR_MASK (0x7)
| Non-shifted mask for NR Index field.
#define | BFR_MIMO_CTRL_CHAN_WIDTH_MASK (0x3)
| Non-shifted mask for Channel Width field.
#define | BFR_MIMO_CTRL_GROUPING_MASK (0x3)
| Non-shifted mask for Grouping field.
#define | BFR_MIMO_CTRL_CODEBOOK_MASK (0x1)
| Non-shifted mask for Codebook Information field.
#define | BFR_MIMO_CTRL_FEEDBACK_MASK (0x1)
| Non-shifted mask for Feedback Type field.
#define | BFR_MIMO_CTRL_REM_SEGM_MASK (0x7)
| Non-shifted mask for Remaining Feedback Segments field.
#define | BFR_MIMO_CTRL_FIRST_SEGM_MASK (0x1)
| Non-shifted mask for First Feedback Segment field.
#define | BFR_MIMO_CTRL_TOKEN_MASK (0x3F)
| Non-shifted mask for Sounding Dialog Token Number field.
Miscellaneous
#define | BFR_CALIB_TMR_DFLT_DUR (50000)
| Default Calibration Timer duration (in us).
#define | BFR_CALIB_MAX_DELAY (500000)
| Maximum time between two calibrations for a STA if no traffic is ongoing (in us).
#define | BFR_INVALID_SMM_INDEX (0xFF)
| Invalid SMM Index (no report can be used for the transmission).
#define | BFR_VHT_BFR_CATEGORY_OFFSET (24)
| VHT Compressed Beamforming frame format (see 802.11ac-2013, section 8.5.23.2) Offset of Category field.
#define | BFR_VHT_BFR_VHT_ACTION_OFFSET (25)
| Offset of VHT Action field.
#define | BFR_VHT_BFR_VHT_MIMO_CTRL_OFFSET (26)
| Offset of VHT MIMO Control field.
#define | BFR_VHT_REPORT_OFFSET (29)
| Offset of Report.
#define | BFR_INVALID_NC (0xFF)
| Invalid NC value.
## Enumerations
enum | bfr_rx_status { BFR_RX_STATUS_NOT_VALID = 0, BFR_RX_STATUS_VALID, BFR_RX_STATUS_ERROR }
| RX Upload status returned in bfr_rx_frame_ind function. More...
enum | bfr_fback_type_val { BFR_SU_TYPE = 0, BFR_MU_TYPE }
| Feedback Type values. More...
enum | bfr_status { BFR_STATUS_IDLE = 0, BFR_STATUS_SU_CALIB, BFR_STATUS_MU_CALIB }
| BFR Environment status values. More...
enum | bfr_sta_info_status { BFR_STA_MU_CAPABLE = 0, BFR_STA_HAS_VALID_REPORT, BFR_STA_DOWNLOAD, BFR_STA_CALIBRATE, BFR_STA_REPORT_UPDATED }
| BFR STA Information Status Bit Positions. More...
## Functions
__INLINE bool | bfr_is_enabled (void)
| Return if Beamformer role can be used based on HW capabilities.
__INLINE bool | bfr_is_calibrated (uint8_t sta_idx)
| Return if a given station has been successfully calibrated.
__INLINE bool | bfr_is_bfmed_sglt_allowed (struct txdesc *txdesc)
| Return if a frame pointed by the given TX descriptor can be beamformed if transmitted as a singleton MPDU.
void | bfr_init (void)
| Initialize stack for support of TX Beamforming.
void | bfr_add_sta_ind (uint8_t sta_idx, bool mu_capable, uint16_t aid, uint32_t host_addr, uint16_t host_length, uint8_t nss)
| Configure the Beamformer environment for a STA that is at least SU Beamformee capable (this check has to be done before call of this function).
void | bfr_del_sta_ind (uint8_t sta_idx)
| Clean the Beamformer environment previously allocated for a given STA.
uint8_t | bfr_rx_frame_ind (uint8_t sta_idx, struct rxdesc *rxdesc, uint8_t *frame)
| Inform BFR module about reception of a frame.
bool | bfr_tx_frame_ind (struct txdesc *txdesc, struct dma_desc *dma_desc_bfr)
| This function is supposed to be called before each transmission of the first MPDU of an A-MPDU or a singleton MPDU to a STA that is at least SU Beamformee capable.
void | bfr_tx_cfm (struct txdesc *txdesc)
| Handle confirmation of transmission of a beamformed frame.
uint8_t | bfr_get_last_nc (uint8_t sta_idx)
| Returns the latest Nc value received in a Beamforming report for a given beamformee.
void | bfr_group_update_req (struct mm_mu_group_update_req const *param)
| Handle group update request sent by the upper layers.
## Variables
struct bfr_env_tag | bfr_env
| Beamformer common environment.
struct bfr_info_sta | bfr_sta_infos [NX_REMOTE_STA_MAX]
| BFR Information for each STA.

## Detailed Description

Beamformer Module Definitions.

Copyright (C) RivieraWaves 2016-2019

Definition in file bfr.h.