# UTILS
[ME]

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

Collaboration diagram for UTILS:

## 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.

## Function Documentation

uint8_t me_11ac_mcs_max | ( | uint16_t | mcs_map | ) |

Gets the maximum MCS supported (11ac station).

Parameters:

  `[in]` | mcs_map | Bitmap of supported MCSs

Returns:
  The maximum MCS

Definition at line 154 of file me_utils.c.

References MAC_VHT_MCS_MAP_0_7, MAC_VHT_MCS_MAP_0_8, MAC_VHT_MCS_MAP_0_9, and MAC_VHT_MCS_MAP_MSK.

uint8_t me_11ac_nss_max | ( | uint16_t | mcs_map | ) |

Gets the maximum number of spatial streams supported (11ac station).

Parameters:

  `[in]` | mcs_map | Bitmap of supported MCSs

Returns:
  The maximum number of spatial streams

Definition at line 200 of file me_utils.c.

References MAC_VHT_MCS_MAP_MSK, and MAC_VHT_MCS_MAP_NONE.

Referenced by me_build_associate_req(), me_pol_tbl_bw_upd(), and me_sta_bw_nss_max_upd().

uint8_t me_11ax_mcs_max | ( | uint16_t | mcs_map | ) |

Gets the maximum MCS supported (11ax station).

Parameters:

  `[in]` | mcs_map | Bitmap of supported MCSs

Returns:
  The maximum MCS

Definition at line 177 of file me_utils.c.

References MAC_HE_MCS_MAP_0_11, MAC_HE_MCS_MAP_0_7, MAC_HE_MCS_MAP_0_9, and MAC_HE_MCS_MAP_MSK.

uint8_t me_11n_nss_max | ( | uint8_t * | mcs_set | ) |

Gets the maximum number of spatial streams supported (11n station).

Parameters:

  `[in]` | mcs_set | Pointer to the Supported MCS Set array

Returns:
  The RX maximum number of spatial streams

Definition at line 214 of file me_utils.c.

Referenced by me_pol_tbl_bw_upd(), and me_sta_bw_nss_max_upd().

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.

If this is the case, then all the STA associated to the VIF are updated accordingly.

Parameters:

  `[in]` | vif_idx | Index of the VIF for which the beacon is checked
  `[in]` | length | Length of the beacon
  `[in]` | bcn_addr | Payload address of the beacon

Definition at line 1009 of file me_utils.c.

References AC_MAX, mac_edca_param_set::ac_param, mm_set_edca_req::ac_param, vif_info_tag::ap, mac_chan_op::band, BSS_CAPA, mm_set_bss_color_req::bss_color, vif_info_tag::bss_info, me_bss_info::chan, CO_BIT, co_list_next(), co_list_pick(), co_read8p(), vif_info_tag::csa_channel, me_bss_info::edca_param, mm_set_edca_req::hw_queue, vif_info_tag::index, mm_set_txop_rts_thres_req::inst_nbr, mm_set_edca_req::inst_nbr, KE_MSG_ALLOC, ke_msg_send(), sta_info_tag::list_hdr, LOCAL_CAPA, MAC_BEACON_VARIABLE_PART_OFT, MAC_HE_OPER_TXOP_DUR_RTS_THRES_DISABLED, MAC_HE_OPER_TXOP_DUR_RTS_THRES_MSK, MAC_HE_OPER_TXOP_DUR_RTS_THRES_OFT, mac_ie_erp_find(), mac_ie_ht_oper_find(), mac_ie_op_mode_notif_find(), mac_ie_vht_oper_find(), MAC_INFOELT_INFO_OFT, MAC_OPMODE_BW_MSK, MAC_OPMODE_BW_OFT, MAC_OPMODE_RXNSS_MSK, MAC_OPMODE_RXNSS_OFT, MAC_OPMODE_RXNSS_TYPE_BIT, MAC_SWITCH_MODE_TX_TRAFFIC_STOP, me_build_bss_color_reg(), me_bw_check(), me_chan_ctxt_update(), me_erp_prot_check(), me_extract_csa(), me_extract_edca_params(), me_extract_power_constraint(), me_pol_tbl_bw_upd(), me_pol_tbl_prot_upd(), me_sta_bw_nss_max_upd(), mm_send_csa_traffic_ind(), MM_SET_BSS_COLOR_REQ, MM_SET_EDCA_REQ, MM_SET_MU_EDCA_REQ, MM_SET_TXOP_RTS_THRES_REQ, MM_SET_UORA_REQ, mm_set_mu_edca_req::param, PHY_BAND_2G4, me_bss_info::power_constraint, me_bss_info::prot_status, vif_info_tag::sta, STA_CAPA, sta_info_tab, vif_info_tag::sta_list, TASK_ME, TASK_MM, tpc_update_vif_tx_power(), mm_set_txop_rts_thres_req::txop_dur_rts_thres, vif_info_tag::type, mac_chan_op::type, vif_info_tag::u, mm_set_edca_req::uapsd, VIF_AP, vif_info_tab, and VIF_STA.

Referenced by mm_bcn_desc_prep(), and rxu_mgt_route().

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.

Parameters:

  `[in]` | bss | BSS information structure

Returns:
  The BSS color formatted as per MAC HW register format

Referenced by me_beacon_check().

uint16_t me_build_capability | ( | uint8_t | vap_idx | ) |

Build the capability information.

Parameters:

  `[in]` | vap_idx | instance of the device

Returns:
  capability information

Definition at line 617 of file me_utils.c.

References mac_chan_op::band, vif_info_tag::bss_info, me_bss_info::chan, MAC_CAPA_ESS, MAC_CAPA_PRIVA, MAC_CAPA_SHORT_PREAMBLE, MAC_CAPA_SHORT_SLOT, MAC_CAPA_SPECTRUM, PHY_BAND_5G, and vif_info_tab.

Referenced by me_build_associate_req().

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.

Parameters:

  `[in]` | ht_op_addr | Address of the HT operation element to check (0 if not present)
  `[in]` | vht_op_addr | Address of the VHT operation element to check (0 if not present)
  `[in]` | bss | Pointer to the BSS information structure

Definition at line 975 of file me_utils.c.

References mac_chan_op::center1_freq, mac_chan_op::center2_freq, me_bss_info::chan, co_read8p(), MAC_HT_OPER_PRIM_CH_OFT, MAC_VHT_CENTER_FREQ0_OFT, MAC_VHT_CENTER_FREQ1_OFT, MAC_VHT_CHAN_WIDTH_OFT, me_env, me_vht_bandwidth_parse(), me_env_tag::phy_bw_max, PHY_CHNL_BW_20, PHY_CHNL_BW_40, PHY_CHNL_BW_80, mac_chan_op::prim20_freq, and mac_chan_op::type.

Referenced by me_beacon_check(), and scanu_join_frame_handler().

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.

Parameters:

  `[in]` | ht_cap | Pointer to the HT capabilities (NULL if not supported)
  `[in]` | vht_cap | Pointer to the VHT capabilities (NULL if not supported)
  `[in]` | he_cap | Pointer to the HE capabilities (NULL if not supported)
  `[out]` | ampdu_size_max_ht | Maximum A-MPDU size in HT mode
  `[out]` | ampdu_size_max_vht | Maximum A-MPDU size in VHT mode
  `[out]` | ampdu_size_max_he | Maximum A-MPDU size in HE mode
  `[out]` | ampdu_spacing_min | Minimum MPDU start spacing

Definition at line 267 of file me_utils.c.

References mac_htcapability::a_mpdu_param, HE_MAC_CAPA_VAL_GET, MAC_AMPDU_LEN_EXP_MSK, MAC_AMPDU_LEN_EXP_OFT, MAC_AMPDU_MIN_SPACING_MSK, MAC_AMPDU_MIN_SPACING_OFT, MAC_HT_MAX_AMPDU_FACTOR, MAC_VHTCAPA_MAX_A_MPDU_LENGTH_EXP_MSK, MAC_VHTCAPA_MAX_A_MPDU_LENGTH_EXP_OFT, and mac_vhtcapability::vht_capa_info.

Referenced by me_sta_add_req_handler(), and scanu_join_cfm_handler().

__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.

This function generally takes the minimum of the 2 BW passed as parameter, except if the BSS is a 80P80. In such case the maximum common BW might be 80MHz instead of 160MHz if the STA supports 160MHz but not 80P80

Parameters:

  `[in]` | sta_phy_bw | Max PHY BW of the STA
  `[in]` | bss_phy_bw | PHY BW of the BSS

Returns:
  The maximum PHY common BW

Definition at line 65 of file me_utils.h.

References co_min(), PHY_CHNL_BW_80, and PHY_CHNL_BW_80P80.

Referenced by me_pol_tbl_bw_upd(), and me_set_sta_ht_vht_param().

void me_init_bcmc_rate | ( | struct sta_info_tag * | sta | ) |

Initializes Rate control for a Brodcast/Multicast STA.

Parameters:

  `[in]` | sta | STA to initialize

Definition at line 680 of file me_utils.c.

References mac_rateset::array, ASSERT_ERR, sta_info_tag::info, mac_rateset::length, MAC_BASIC_RATE, me_rate_translate(), sta_info_tag::pol_tbl, sta_capa_info::rate_set, rc_init_bcmc_rate(), and sta_pol_tbl_cntl::upd_field.

void me_init_rate | ( | struct sta_info_tag * | sta | ) |

Initializes Rate control for a STA.

Parameters:

  `[in]` | sta | STA to initialize

Definition at line 673 of file me_utils.c.

References me_update_buffer_control(), and rc_init().

Referenced by me_sta_add_req_handler(), and mm_sta_add_cfm_handler().

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.

Include only basic rates or not depending on the corresponding parameter.

Parameters:

  `[in]` | rateset | The rate set containing the legacy rates
  `[in]` | basic_only | If this parameter is true, then only basic rates are extracted from the rate set

Returns:
  The legacy rate bitfield

Definition at line 566 of file me_utils.c.

References mac_rateset::array, ASSERT_WARN, CO_BIT, mac_rateset::length, MAC_BASIC_RATE, MAC_RATESET_LEN, and me_rate_translate().

Referenced by apm_start_req_handler(), and scanu_join_frame_handler().

uint8_t me_legacy_ridx_max | ( | uint16_t | rate_map | ) |

Gets the maximum legacy rate index supported.

Parameters:

  `[in]` | rate_map | Bitmap of legacy rate indexes

Returns:
  The maximum rate index

Definition at line 243 of file me_utils.c.

References HW_RATE_54MBPS, and MAC_RATESET_LEN.

uint8_t me_legacy_ridx_min | ( | uint16_t | rate_map | ) |

Gets the minimum legacy rate index supported.

Parameters:

  `[in]` | rate_map | Bitmap of legacy rate indexes

Returns:
  The minimum rate index

Definition at line 228 of file me_utils.c.

References MAC_RATESET_LEN.

__INLINE uint8_t me_phy2mac_bw | ( | uint8_t | phy_bw | ) |

Convert a PHY channel type to a MAC HW BW definition.

Parameters:

  `[in]` | phy_bw | PHY channel type

Returns:
  The corresponding MAC HW BW value

Definition at line 46 of file me_utils.h.

References BW_160MHZ, and PHY_CHNL_BW_80P80.

Referenced by me_build_associate_req(), me_pol_tbl_bw_upd(), me_set_sta_ht_vht_param(), and me_sta_bw_nss_max_upd().

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.

Parameters:

  `[in]` | mcs_map_1 | The first VHT-MCS Map
  `[in]` | mcs_map_2 | The second VHT-MCS Map

Returns:
  The VHT-MCS map of the station

Definition at line 594 of file me_utils.c.

References co_min(), MAC_VHT_MCS_MAP_MSK, and MAC_VHT_MCS_MAP_NONE.

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.

This function computes the maximum PHY BW we can use with the peer STA

Parameters:

  `[in]` | sta | Pointer to the STA element
  `[in]` | bss | Pointer to the BSS information element

Returns:
  Whether the STA supports SMPS or not

Definition at line 77 of file me_utils.c.

References sta_capa_info::bw_cur, me_bss_info::chan, co_min(), HE_PHY_CAPA_BIT_IS_SET, HE_PHY_CAPA_CHAN_WIDTH_SET_160MHZ_IN_5G, HE_PHY_CAPA_CHAN_WIDTH_SET_40MHZ_80MHZ_IN_5G, HE_PHY_CAPA_CHAN_WIDTH_SET_40MHZ_IN_2G, HE_PHY_CAPA_CHAN_WIDTH_SET_80PLUS80_MHZ_IN_5G, HE_PHY_CAPA_VAL_GET, sta_capa_info::ht_cap, mac_htcapability::ht_capa_info, sta_info_tag::info, MAC_HTCAPA_40_MHZ, MAC_HTCAPA_RX_STBC_MSK, MAC_HTCAPA_RX_STBC_OFT, MAC_HTCAPA_SMPS_DISABLE, MAC_HTCAPA_SMPS_MSK, MAC_VHTCAPA_RXSTBC_MSK, MAC_VHTCAPA_RXSTBC_OFT, MAC_VHTCAPA_SUPP_CHAN_WIDTH_160, MAC_VHTCAPA_SUPP_CHAN_WIDTH_160_80P80, MAC_VHTCAPA_SUPP_CHAN_WIDTH_MSK, me_env, me_get_sta_bw(), me_phy2mac_bw(), sta_capa_info::phy_bw_max, me_env_tag::phy_bw_max, PHY_CHNL_BW_160, PHY_CHNL_BW_20, PHY_CHNL_BW_40, PHY_CHNL_BW_80, PHY_CHNL_BW_80P80, STA_CAPA, sta_capa_info::stbc_nss, me_env_tag::stbc_nss, and mac_chan_op::type.

Referenced by me_sta_add_req_handler(), and mm_sta_add_cfm_handler().

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.

This function is called upon the reception of a HT Notify Channel Width or VHT Operation Mode Notification action frame.

Parameters:

  `[in]` | sta_idx | Index of the STA for which the BW is updated
  `[in]` | bw | Maximum bandwidth to use with this STA
  `[in]` | nss | Maximum number of SS we can use with this STA

Definition at line 1253 of file me_utils.c.

References ASSERT_ERR, vif_info_tag::bss_info, sta_capa_info::bw_cur, me_bss_info::chan, CO_BIT, co_min(), me_env_tag::ht_cap, sta_capa_info::ht_cap, sta_info_tag::info, sta_info_tag::inst_nbr, LOCAL_CAPA, mac_htcapability::mcs_rate, me_11ac_nss_max(), me_11n_nss_max(), me_env, me_phy2mac_bw(), sta_capa_info::phy_bw_max, sta_info_tag::pol_tbl, rc_update_bw_nss_max(), vif_info_tag::sta, STA_CAPA, sta_info_tab, STA_MGMT_POL_UPD_BW, sta_info_tag::staid, mac_chan_op::type, vif_info_tag::u, sta_pol_tbl_cntl::upd_field, and vif_info_tab.

Referenced by me_beacon_check(), me_sta_add_req_handler(), rxu_mgt_route_action(), and tdls_chsw_time_evt().

uint16_t me_tx_cfm_amsdu | ( | struct txdesc * | txdesc | ) |

Return the A-MSDU size allowed for a TID of one STA.

This is sent to host for each tx confirmation.

Parameters:

  `[in]` | txdesc | Tx descriptor (Containing STA and TID information)

Returns:
  The amsdu size allowed for the TID of this STA

Definition at line 1318 of file me_utils.c.

References bam_env_tag::amsdu, sta_info_tag::ba_info, bam_env, sta_mgmt_ba_info::bam_idx_tx, BAM_INVALID_TASK_IDX, txdesc::host, sta_info_tag::inst_nbr, rc_get_max_amsdu_len(), sta_info_tab, hostdesc::staid, and hostdesc::tid.

struct txl_buffer_control* me_update_buffer_control | ( | struct sta_info_tag * | sta | ) | `[read]`

Update the field contained in the Policy Table.

Parameters:

  `[in]` | sta | STA Interface Information

Returns:
  The buffer control structure to be used for the transmission

Definition at line 700 of file me_utils.c.

References bfr_get_last_nc(), BFR_INVALID_NC, BSS_COLOR_MASK, BSS_COLOR_OFT, vif_info_tag::bss_info, sta_pol_tbl_cntl::buf_ctrl, BW_TX_RCX_MASK, CO_BIT, FORMAT_MOD_TX_RCX_MASK, FORMAT_MOD_TX_RCX_OFT, FORMATMOD_HE_SU, FORMATMOD_HT_MF, FORMATMOD_NON_HT_DUP_OFDM, FORMATMOD_VHT, GLOBAL_INT_DISABLE, GLOBAL_INT_RESTORE, HT_NSS_MASK, HT_NSS_OFT, HW_RATE_6MBPS, sta_info_tag::info, sta_info_tag::inst_nbr, MAC_HE_OPER_BSS_COLOR_DISABLED_BIT, MAC_HE_OPER_BSS_COLOR_MASK, MAC_HE_OPER_BSS_COLOR_OFT, MCS_INDEX_TX_RCX_MASK, MCS_INDEX_TX_RCX_OFT, N_RETRY_RCX_MASK, N_RETRY_RCX_OFT, phy_get_ntx(), tx_policy_tbl::phycntrlinfo1, tx_policy_tbl::phycntrlinfo2, sta_info_tag::pol_tbl, txl_buffer_control::policy_tbl, tx_policy_tbl::powercntrlinfo, PRE_TYPE_TX_RCX_MASK, PROF_RC_UPD_RETRY_CHAIN_CLR, PROF_RC_UPD_RETRY_CHAIN_SET, PROF_RC_UPD_RETRY_CHAIN_TRIAL_CLR, PROF_RC_UPD_RETRY_CHAIN_TRIAL_SET, sta_pol_tbl_cntl::prot_cfg, rc_rate_stats::rate_config, RATE_CONTROL_STEPS, rc_sta_stats::rate_stats, tx_policy_tbl::ratecntrlinfo, RC_MAX_NUM_RETRY, rc_trial_check_bfm_stbc_htc(), rc_sta_stats::retry_step_idx, SHORT_GI_TX_RCX_MASK, STA_MGMT_POL_TRIAL_RATE, STA_MGMT_POL_UPD_BSS_COLOR, STA_MGMT_POL_UPD_PROT, STA_MGMT_POL_UPD_RATE, STA_MGMT_POL_UPD_TX_POWER, STA_MGMT_PROT_HW_MASK, sta_pol_tbl_cntl::sta_stats, sta_info_tag::staid, sta_capa_info::stbc_nss, STBC_PT_MASK, STBC_PT_OFT, tpc_get_vif_tx_power(), rc_sta_stats::trial_idx, rc_sta_stats::trial_rate, txl_buffer_control::tx_flags, TX_PWR_LEVEL_MASK, TX_PWR_LEVEL_SET, TX_SWDESC_UMAC_BEAMFORM_BIT, TX_SWDESC_UMAC_HTC_BIT, sta_pol_tbl_cntl::upd_field, VHT_NSS_MASK, VHT_NSS_OFT, and vif_info_tab.

Referenced by me_init_rate(), and txu_cntrl_check_rate().

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.

This is the information found on VHT operation and Wide Bandwidth Channel Switch elements. If the new bandwidth is not supported by the PHY (e.g. 160Mhz or 80+80MHz) then the bandwidth is limited to the 'primary' 80MHZ channel.

Parameters:

  `[in]` | width | Channel Width
  `[in]` | center0 | Channel Center Frequency Segment 0
  `[in]` | center1 | Channel Center Frequency Segment 1
  `[in,out]` | chan | Channel description to update. 'band' and 'prim20_freq' fields must be valid when calling this function

Definition at line 1342 of file me_utils.c.

References mac_chan_op::band, mac_chan_op::center1_freq, mac_chan_op::center2_freq, me_env, me_env_tag::phy_bw_max, phy_channel_to_freq(), PHY_CHNL_BW_160, PHY_CHNL_BW_80, PHY_CHNL_BW_80P80, mac_chan_op::prim20_freq, and mac_chan_op::type.

Referenced by me_bw_check(), and me_extract_csa().