# /space/home/slher/rel/Beken/v6_4_5/macsw/ip/umac/src/me/me_utils.h File Reference

All utility functions manipulating rates, etc. More...

`#include "co_int.h"`
`#include "co_bool.h"`
`#include "tx_swdesc.h"`

Go to the source code of this file.

## Functions
__INLINE uint8_t | me_phy2mac_bw (uint8_t phy_bw)
| Convert a PHY channel type to a MAC HW BW definition.
__INLINE uint8_t | me_get_sta_bw (uint8_t sta_phy_bw, uint8_t bss_phy_bw)
| Return the maximum PHY BW than can be used with a STA depending on the BSS PHY.
bool | me_set_sta_ht_vht_param (struct sta_info_tag *sta, struct me_bss_info *bss)
| Compute some HT and VHT parameters for the given STA.
uint16_t | me_legacy_rate_bitfield_build (struct mac_rateset const *rateset, bool basic_only)
| Build the legacy rate bitfield according to the rate set passed as parameter.
uint16_t | me_rate_bitfield_vht_build (uint16_t mcs_map_1, uint16_t mcs_map_2)
| Build a VHT-MCS map according to the MCS maps passed as parameters.
uint16_t | me_build_capability (uint8_t vap_idx)
| Build the capability information.
uint32_t | me_build_bss_color_reg (struct me_bss_info *bss)
| Build the BSS color as per MAC HW register format from the BSS operation element.
void | me_init_rate (struct sta_info_tag *sta)
| Initializes Rate control for a STA.
void | me_init_bcmc_rate (struct sta_info_tag *sta)
| Initializes Rate control for a Brodcast/Multicast STA.
struct txl_buffer_control * | me_update_buffer_control (struct sta_info_tag *sta)
| Update the field contained in the Policy Table.
void | me_bw_check (uint32_t ht_op_addr, uint32_t vht_op_addr, struct me_bss_info *bss)
| Check content of the HT and VHT operation element passed as parameters and update the bandwidth and channel information of the BSS accordingly.
void | me_beacon_check (uint8_t vif_idx, uint16_t length, uint32_t bcn_addr)
| Check in the received (in case of STA mode) or just modified (in case of AP mode) beacon if the protection and/or bandwidth of operation have been modified.
void | me_sta_bw_nss_max_upd (uint8_t sta_idx, uint8_t bw, uint8_t nss)
| Update the maximum bandwidth supported by a peer STA.
uint16_t | me_tx_cfm_amsdu (struct txdesc *txdesc)
| Return the A-MSDU size allowed for a TID of one STA.
uint8_t | me_11ac_mcs_max (uint16_t mcs_map)
| Gets the maximum MCS supported (11ac station).
uint8_t | me_11ax_mcs_max (uint16_t mcs_map)
| Gets the maximum MCS supported (11ax station).
uint8_t | me_11ac_nss_max (uint16_t mcs_map)
| Gets the maximum number of spatial streams supported (11ac station).
uint8_t | me_11n_nss_max (uint8_t *mcs_set)
| Gets the maximum number of spatial streams supported (11n station).
uint8_t | me_legacy_ridx_min (uint16_t rate_map)
| Gets the minimum legacy rate index supported.
uint8_t | me_legacy_ridx_max (uint16_t rate_map)
| Gets the maximum legacy rate index supported.
void | me_get_ampdu_params (struct mac_htcapability const *ht_cap, struct mac_vhtcapability const *vht_cap, struct mac_hecapability const *he_cap, uint16_t *ampdu_size_max_ht, uint32_t *ampdu_size_max_vht, uint32_t *ampdu_size_max_he, uint8_t *ampdu_spacing_min)
| Compute the A-MPDU parameters of a peer STA (maximum A-MPDU length, minimum spacing), based on the HT, VHT and HE capabilities.
void | me_vht_bandwidth_parse (uint8_t width, uint8_t center0, uint8_t center1, struct mac_chan_op *chan)
| Update chan bandwidth and center freqs from channel width, channel center frequency segment0 and channel center frequency segment1.

## Detailed Description

All utility functions manipulating rates, etc.

Copyright (C) RivieraWaves 2011-2019

Definition in file me_utils.h.