# MGMTFRAME
[ME]

Declaration of all structures and functions used by the MGMT Frames. More...

Collaboration diagram for MGMTFRAME:

## Functions
uint32_t | me_add_ie_ssid (uint32_t *frame_addr, uint8_t ssid_len, uint8_t *ssid)
| Add SSID Information Element in a frame.
uint32_t | me_add_ie_supp_rates (uint32_t *frame_addr, struct mac_rateset *rateset)
| Add Supported Rate Information Element in a frame.
uint32_t | me_add_ie_ext_supp_rates (uint32_t *frame_addr, struct mac_rateset *rateset)
| Add Extended Supported Rate Information Element in a frame.
uint32_t | me_add_ie_tim (uint32_t *frame_addr, uint8_t dtim_period)
| Add TIM (Traffic Indication Map) Information Element in a frame.
uint32_t | me_add_ie_dsss_param (uint32_t *frame_addr, uint8_t chan)
| Add DS Parameter Information Element in a frame.
uint32_t | me_add_ie_ht_capa (uint32_t *frame_addr)
| Add HT Capabilities Information Element in a frame.
uint32_t | me_add_ie_ht_oper (uint32_t *frame_addr, struct vif_info_tag *vif)
| Add HT Operation Information Element in a frame.
uint16_t | me_build_authenticate (uint32_t frame, uint16_t algo_type, uint16_t seq_nbr, uint16_t status_code, uint32_t *challenge_array_ptr)
| Build an Authentication frame at the AP and the STA.
uint16_t | me_build_deauthenticate (uint32_t frame, uint16_t reason_code)
| Build a De authentication frame at the AP and the STA.
uint16_t | me_build_associate_req (uint32_t frame, struct me_bss_info *bss, struct mac_addr *old_ap_addr_ptr, uint8_t vif_idx, uint32_t *ie_addr, uint16_t *ie_len, struct sm_connect_req const *con_par)
| used to build the Associated REQ frame at STA
void | me_extract_rate_set (uint32_t buffer, uint16_t buflen, struct mac_rateset *mac_rate_set_ptr)
| This function is called to extract the rateset from a management frame.
uint16_t | me_build_add_ba_req (uint32_t frame, struct bam_env_tag *bam_env)
| Builds the ADDBA REQ frame.
uint16_t | me_build_add_ba_rsp (uint32_t frame, struct bam_env_tag *bam_env, uint16_t param, uint8_t dialog_token, uint16_t status_code)
| Builds the ADDBA RSP frame.
uint16_t | me_build_del_ba (uint32_t frame, struct bam_env_tag *bam_env, uint16_t reason_code)
| Builds the DELBA IND frame.
void | me_extract_power_constraint (uint32_t buffer, uint16_t buflen, struct me_bss_info *bss)
| Extract local power constraint from Power Constraint IE.
void | me_extract_country_reg (uint32_t buffer, uint16_t buflen, struct me_bss_info *bss)
| Update tx_power of bss channel from Country IE.
void | me_extract_mobility_domain (uint32_t buffer, uint16_t buflen, struct me_bss_info *bss)
| Extract Mobility Domain IE.
int | me_extract_csa (uint32_t buffer, uint16_t buflen, uint8_t *mode, struct mac_chan_op *chan_desc)
| Extract Channel Switch Announcement (csa) information from beacon.
bool | me_extract_edca_params (uint32_t buffer, uint16_t buflen, struct mac_edca_param_set *edca_param, bool *changed)
| Extract EDCA parameters (i.e.
bool | me_extract_ht_capa (uint32_t buffer, uint16_t buflen, struct mac_htcapability *ht_cap)
| Extract HT capability element from Beacon or ProbeRsp.
bool | me_extract_vht_capa (uint32_t buffer, uint16_t buflen, struct mac_vhtcapability *vht_cap)
| Extract VHT capability element from Beacon or ProbeRsp.

## Detailed Description

Declaration of all structures and functions used by the MGMT Frames.

## Function Documentation

uint32_t me_add_ie_dsss_param | ( | uint32_t * | frame_addr,
|  | uint8_t | chan |
| ) |  |  |

Add DS Parameter Information Element in a frame.

Byte 0: Element ID Byte 1: Length Byte 2: Channel

Parameters:

  `[in,out]` | frame_addr | Pointer to the address at which IE has to be added. When leaving the function, the pointer value matches with the new end of the frame.
  `[in]` | chan | Current Channel

Returns:
  Number of bytes that have been added to the provided frame.

Definition at line 205 of file me_mgmtframe.c.

References co_write8p(), MAC_ELTID_DS, MAC_INFOELT_ID_OFT, MAC_INFOELT_INFO_OFT, and MAC_INFOELT_LEN_OFT.

uint32_t me_add_ie_ext_supp_rates | ( | uint32_t * | frame_addr,
|  | struct mac_rateset * | rateset |
| ) |  |  |

Add Extended Supported Rate Information Element in a frame.

Byte 0: Element ID Byte 1: Length Byte 2-variable: Rates

Parameters:

  `[in,out]` | frame_addr | Pointer to the address at which IE has to be added. When leaving the function, the pointer value matches with the new end of the frame.
  `[in]` | rateset | Supported Rates. Number of rates shall be higher than 8 when entering in this function.

Returns:
  Number of bytes that have been added to the provided frame.

Definition at line 160 of file me_mgmtframe.c.

References mac_rateset::array, co_pack8p(), co_write8p(), mac_rateset::length, MAC_ELTID_EXT_RATES, MAC_INFOELT_ID_OFT, MAC_INFOELT_INFO_OFT, MAC_INFOELT_LEN_OFT, and MAC_RATES_ELMT_MAX_LEN.

Referenced by me_build_associate_req().

uint32_t me_add_ie_ht_capa | ( | uint32_t * | frame_addr | ) |

Add HT Capabilities Information Element in a frame.

Parameters:

  `[in,out]` | frame_addr | Pointer to the address at which IE has to be added. When leaving the function, the pointer value matches with the new end of the frame.

Returns:
  Number of bytes that have been added to the provided frame.

Definition at line 226 of file me_mgmtframe.c.

References mac_htcapability::a_mpdu_param, mac_htcapability::asel_capa, co_htows(), co_pack8p(), co_write16p(), co_write8p(), me_env_tag::ht_cap, mac_htcapability::ht_capa_info, mac_htcapability::ht_extended_capa, MAC_ELTID_HT_CAPA, MAC_HT_CAPA_AMPDU_PARAM_OFT, MAC_HT_CAPA_ASEL_CAPA_OFT, MAC_HT_CAPA_ELMT_LEN, MAC_HT_CAPA_EXTENDED_CAPA_OFT, MAC_HT_CAPA_ID_OFT, MAC_HT_CAPA_INFO_OFT, MAC_HT_CAPA_LEN_OFT, MAC_HT_CAPA_SUPPORTED_MCS_SET_OFT, MAC_HT_CAPA_TX_BEAM_FORMING_CAPA_OFT, MAC_HTCAPA_SMPS_DISABLE, MAC_HTCAPA_SMPS_MSK, MAC_INFOELT_INFO_OFT, MAX_MCS_LEN, mac_htcapability::mcs_rate, me_env, and mac_htcapability::tx_beamforming_capa.

Referenced by me_build_associate_req(), and scanu_build_ie().

uint32_t me_add_ie_ht_oper | ( | uint32_t * | frame_addr,
|  | struct vif_info_tag * | vif |
| ) |  |  |

Add HT Operation Information Element in a frame.

Parameters:

  `[in,out]` | frame_addr | Pointer to the address at which IE has to be added. When leaving the function, the pointer value matches with the new end of the frame.
  `[in]` | vif | Pointer to the structure containing information about the VIF for which the Information Element has to be filled.

Returns:
  Number of bytes that have been added to the provided frame.

Definition at line 256 of file me_mgmtframe.c.

References mac_chan_op::band, BW_20MHZ, mac_chan_op::center1_freq, vif_info_tag::chan_ctxt, chan_ctxt_tag::channel, co_write16p(), co_write8p(), MAC_ELTID_HT_OPERATION, MAC_HT_OPER_BASIC_MSC_SET_OFT, MAC_HT_OPER_ELMT_LEN, MAC_HT_OPER_ID_OFT, MAC_HT_OPER_INFO_OFT, MAC_HT_OPER_INFO_SUBSET2_OFT, MAC_HT_OPER_INFO_SUBSET3_OFT, MAC_HT_OPER_LEN_OFT, MAC_HT_OPER_OP_MODE_MASK, MAC_HT_OPER_PRIM_CH_OFT, MAC_INFOELT_INFO_OFT, phy_freq_to_channel(), mac_chan_op::prim20_freq, and mac_chan_op::type.

uint32_t me_add_ie_ssid | ( | uint32_t * | frame_addr,
|  | uint8_t | ssid_len,
|  | uint8_t * | ssid |
| ) |  |  |

Add SSID Information Element in a frame.

Byte 0: Element ID Byte 1: Length Byte 2-variable: SSID

Parameters:

  `[in,out]` | frame_addr | Pointer to the address at which IE has to be added. When leaving the function, the pointer value matches with the new end of the frame.
  `[in]` | ssid_len | Length of the SSID
  `[in]` | ssid | Pointer to the SSID value in the memory

Returns:
  Number of bytes that have been added to the provided frame.

Definition at line 115 of file me_mgmtframe.c.

References co_pack8p(), co_write8p(), MAC_ELTID_SSID, MAC_INFOELT_ID_OFT, MAC_INFOELT_INFO_OFT, and MAC_INFOELT_LEN_OFT.

Referenced by me_build_associate_req().

uint32_t me_add_ie_supp_rates | ( | uint32_t * | frame_addr,
|  | struct mac_rateset * | rateset |
| ) |  |  |

Add Supported Rate Information Element in a frame.

Byte 0: Element ID Byte 1: Length Byte 2-variable: Rates

Parameters:

  `[in,out]` | frame_addr | Pointer to the address at which IE has to be added. When leaving the function, the pointer value matches with the new end of the frame.
  `[in]` | rateset | Supported Rates. If number of rates is higher than 8, rates from position 8 will have to be part of a Extended Supported Rate IE.

Returns:
  Number of bytes that have been added to the provided frame.

Definition at line 138 of file me_mgmtframe.c.

References mac_rateset::array, co_min(), co_pack8p(), co_write8p(), mac_rateset::length, MAC_ELTID_RATES, MAC_INFOELT_ID_OFT, MAC_INFOELT_INFO_OFT, MAC_INFOELT_LEN_OFT, and MAC_RATES_ELMT_MAX_LEN.

Referenced by me_build_associate_req().

uint32_t me_add_ie_tim | ( | uint32_t * | frame_addr,
|  | uint8_t | dtim_period |
| ) |  |  |

Add TIM (Traffic Indication Map) Information Element in a frame.

Byte 0: Element ID Byte 1: Length Byte 2: DTIM Count (updated by mm_bcn module before beacon transmission) Byte 3: DTIM Period (read and used by mm_bcn module) Byte 4: Bitmap Control (updated by mm_bcn module) Byte 5: Partial Virtual Bitmap (updated by mm_bcn module)

Parameters:

  `[in,out]` | frame_addr | Pointer to the address at which IE has to be added. When leaving the function, the pointer value matches with the new end of the frame.
  `[in]` | dtim_period | DTIM Period

Returns:
  Number of bytes that have been added to the provided frame.

Definition at line 184 of file me_mgmtframe.c.

References co_write8p(), MAC_ELTID_TIM, MAC_INFOELT_ID_OFT, MAC_INFOELT_INFO_OFT, MAC_INFOELT_LEN_OFT, and MAC_TIM_PERIOD_OFT.

uint16_t me_build_add_ba_req | ( | uint32_t | frame,
|  | struct bam_env_tag * | bam_env |
| ) |  |  |

Builds the ADDBA REQ frame.

Parameters:

  `[in]` | frame | Address of the mac frame
  `[in]` | bam_env | Pointer to BAM environment

Returns:
  The length of the built frame.

Definition at line 734 of file me_mgmtframe.c.

References bam_env_tag::ba_timeout, BAM_ADDBAREQ_BA_PARAM_OFFSET, BAM_ADDBAREQ_BA_SSC_OFFSET, BAM_ADDBAREQ_BA_TIMEOUT_OFFSET, BAM_ADDBAREQ_LENGTH, co_htows(), co_write16p(), co_write8p(), bam_env_tag::dialog_token, MAC_ACTION_ACTION_OFT, MAC_ACTION_TOKEN_OFT, MAC_BA_ACTION_ADDBA_REQ, MAC_BA_ACTION_CATEGORY, me_add_ba_ssc_frame(), and me_add_baparamset_frame().

uint16_t me_build_add_ba_rsp | ( | uint32_t | frame,
|  | struct bam_env_tag * | bam_env,
|  | uint16_t | param,
|  | uint8_t | dialog_token,
|  | uint16_t | status_code |
| ) |  |  |

Builds the ADDBA RSP frame.

Parameters:

  `[in]` | frame | Address of the mac frame
  `[in]` | bam_env | Pointer to BAM environment
  `[in]` | param | BA Parameter.
  `[in]` | dialog_token | Value of the Dialog Token.
  `[in]` | status_code | Used to indicate status of the response.

Returns:
  The length of the built frame.

Definition at line 751 of file me_mgmtframe.c.

References bam_env_tag::ba_timeout, BAM_ADDBARSP_BA_PARAM_OFFSET, BAM_ADDBARSP_BA_TIMEOUT_OFFSET, BAM_ADDBARSP_LENGTH, BAM_ADDBARSP_STATUS_OFFSET, co_htows(), co_write16p(), co_write8p(), MAC_ACTION_ACTION_OFT, MAC_ACTION_TOKEN_OFT, MAC_BA_ACTION_ADDBA_RSP, MAC_BA_ACTION_CATEGORY, and MAC_BA_ST_SUCCESS.

uint16_t me_build_associate_req | ( | uint32_t | frame,
|  | struct me_bss_info * | bss,
|  | struct mac_addr * | old_ap_addr_ptr,
|  | uint8_t | vif_idx,
|  | uint32_t * | ie_addr,
|  | uint16_t * | ie_len,
|  | struct sm_connect_req const * | con_par |
| ) |  |  |

used to build the Associated REQ frame at STA

Parameters:

  `[in]` | frame | Address of the mac frame
  `[in]` | bss | Pointer to the BSS information structure
  `[in]` | old_ap_addr_ptr | Pointer to the old AP address
  `[in]` | vif_idx | Index to VIF instance
  `[out]` | ie_addr | Pointer to the address of the IEs
  `[out]` | ie_len | Pointer to the length of the IEs
  `[in]` | con_par | Pointer to the SM connection parameter structure

Returns:
  The length of the built frame

Definition at line 537 of file me_mgmtframe.c.

References mac_ssid::array, mac_chan_def::band, mac_chan_op::band, BSS_CAPA, me_env_tag::chan, me_bss_info::chan, me_chan_config_req::chan2G4, me_chan_config_req::chan2G4_cnt, me_chan_config_req::chan5G, me_chan_config_req::chan5G_cnt, CHAN_DISABLED, co_copy8p(), co_htows(), co_pack8p(), co_write16p(), co_write8p(), CPU2HW, me_bss_info::edca_param, mac_chan_def::flags, mac_chan_def::freq, mobility_domain::ft_capability_policy, sm_env_tag::ft_over_ds, HW2CPU, sm_connect_req::ie_buf, sm_connect_req::ie_len, mac_rateset::length, mac_ssid::length, sm_connect_req::listen_interval, LOCAL_CAPA, MAC_ADDR_CPY, MAC_ASSO_REQ_CAPA_OFT, MAC_ASSO_REQ_LISTEN_OFT, MAC_ASSO_REQ_SSID_OFT, MAC_CAPA_SPECTRUM, MAC_ELTID_MDE, MAC_ELTID_POWER_CAPABILITY, MAC_ELTID_SUPPORTED_CHANNELS, MAC_INFOELT_INFO_OFT, MAC_INFOELT_LEN_OFT, MAC_INFOELT_MDE_ELMT_LEN, MAC_INFOELT_MDE_FT_CAPA_POL_OFT, MAC_INFOELT_MDE_ID_OFT, MAC_INFOELT_MDE_LEN, MAC_INFOELT_MDE_LEN_OFT, MAC_INFOELT_MDE_MDID_OFT, MAC_POWER_CAPABILITY_IE_LEN, MAC_QOS_INFO_AP_UAPSD_ENABLED, MAC_RATES_ELMT_MAX_LEN, MAC_RAW_WME_INFO_ELMT_DEFAULT, MAC_REASSO_REQ_AP_ADDR_OFT, MAC_REASSO_REQ_SSID_OFT, MAC_WME_PARAM_LEN, me_bss_info::mde, mobility_domain::mdid, me_11ac_nss_max(), me_add_ie_ext_supp_rates(), me_add_ie_ht_capa(), me_add_ie_ssid(), me_add_ie_supp_rates(), me_build_capability(), ME_DEFAULT_LISTEN_INTERVAL, me_env, me_phy2mac_bw(), PHY_BAND_2G4, me_env_tag::phy_bw_max, phy_freq_to_channel(), phy_get_rf_gain_capab(), ps_uapsd_enabled(), mac_edca_param_set::qos_info, me_bss_info::rate_set, sm_env, me_bss_info::ssid, mac_chan_op::tx_power, and sm_connect_req::uapsd_queues.

uint16_t me_build_authenticate | ( | uint32_t | frame,
|  | uint16_t | algo_type,
|  | uint16_t | seq_nbr,
|  | uint16_t | status_code,
|  | uint32_t * | challenge_array_ptr |
| ) |  |  |

Build an Authentication frame at the AP and the STA.

Parameters:

  `[in]` | frame | Address of the payload
  `[in]` | algo_type | indicates a single authentication algorithm.
  `[in]` | seq_nbr | indicates the current state of progress through a multi-step transaction
  `[in]` | status_code | indicate the success or failure of a req operation
  `[in]` | challenge_array_ptr | pointer to the challenge_array

Returns:
  The length of the built frame

Definition at line 500 of file me_mgmtframe.c.

References CHALLENGE_TEXT_SIZE, co_copy8p(), co_htows(), co_write16p(), co_write8p(), CPU2HW, MAC_AUTH_ALGONBR_OFT, MAC_AUTH_CHALLENGE_LEN, MAC_AUTH_CHALLENGE_OFT, MAC_AUTH_SEQNBR_OFT, MAC_AUTH_STATUS_OFT, MAC_CHALLENGE_ID_OFT, MAC_CHALLENGE_LEN_OFT, MAC_CHALLENGE_TEXT_OFT, and MAC_ELTID_CHALLENGE.

uint16_t me_build_deauthenticate | ( | uint32_t | frame,
|  | uint16_t | reason_code |
| ) |  |  |

Build a De authentication frame at the AP and the STA.

Parameters:

  `[in]` | frame | Address of the mac frame
  `[in]` | reason_code | Used to indicate reason for generating Deauthentication

Returns:
  The length of the built frame

Definition at line 526 of file me_mgmtframe.c.

References co_htows(), co_write16p(), MAC_DISASSOC_REASON_LEN, and MAC_DISASSOC_REASON_OFT.

uint16_t me_build_del_ba | ( | uint32_t | frame,
|  | struct bam_env_tag * | bam_env,
|  | uint16_t | reason_code |
| ) |  |  |

Builds the DELBA IND frame.

Parameters:

  `[in]` | frame | Address of the mac frame
  `[in]` | bam_env | Pointer to BAM environment
  `[in]` | reason_code | Used to indicate reason for deleting.

Returns:
  The length of the built frame.

Definition at line 772 of file me_mgmtframe.c.

References BAM_DELBA_LENGTH, BAM_DELBA_PARAM_OFFSET, BAM_DELBA_REASON_OFFSET, co_htows(), co_write16p(), co_write8p(), MAC_ACTION_ACTION_OFT, MAC_BA_ACTION_CATEGORY, MAC_BA_ACTION_DELBA, and me_del_baparamset_frame().

void me_extract_country_reg | ( | uint32_t | buffer,
|  | uint16_t | buflen,
|  | struct me_bss_info * | bss |
| ) |  |  |

Update tx_power of bss channel from Country IE.

If country IE is found, update tx power of the bss channel with the tx power set in country IE. Note: Other channel tx power are not updated (assume driver will provide updated channel description after association)

Parameters:

  `[in]` | buffer | Pointer to the Beacon/ProbeRsp frame buffer
  `[in]` | buflen | Beacon/ProbeRsp frame length
  `[out]` | bss | Pointer to the bss info structure

Definition at line 859 of file me_mgmtframe.c.

References mac_chan_op::band, me_bss_info::chan, co_read8p(), MAC_COUNTRY_FIRST_CHAN_OFT, MAC_COUNTRY_NB_CHAN_OFT, MAC_COUNTRY_PWR_LEVEL_OFT, MAC_COUNTRY_STRING_LEN, MAC_COUNTRY_STRING_OFT, MAC_COUNTRY_TRIPLET_LEN, mac_ie_country_find(), PHY_BAND_2G4, phy_freq_to_channel(), mac_chan_op::prim20_freq, and mac_chan_op::tx_power.

Referenced by scanu_join_frame_handler().

int me_extract_csa | ( | uint32_t | buffer,
|  | uint16_t | buflen,
|  | uint8_t * | mode,
|  | struct mac_chan_op * | chan_desc |
| ) |  |  |

Extract Channel Switch Announcement (csa) information from beacon.

If CSA (or ECSA) IE is detected in the beacon, this function will extract target channel configuration, csa counter and csa mode.

Parameters:

  `[in]` | buffer | Pointer to the Beacon frame buffer
  `[in]` | buflen | Beacon frame length
  `[out]` | mode | Indicates whether transmission must be paused or not until channel switch
  `[out]` | chan_desc | Configuration of target channel

Returns:
  The CSA counter (i.e. number of beacon before actual channel switch). 0 means no CSA detected or CSA elements not valid.

Definition at line 916 of file me_mgmtframe.c.

References mac_chan_op::band, mac_chan_op::center1_freq, mac_chan_op::center2_freq, co_read8p(), mac_ie_csa_find(), mac_ie_ecsa_find(), mac_ie_sec_chnl_offset_find(), mac_ie_wide_bw_chnl_find(), MAC_INFOELT_EXT_SWITCH_COUNT_OFT, MAC_INFOELT_EXT_SWITCH_MODE_OFT, MAC_INFOELT_EXT_SWITCH_NEW_CHAN_OFT, MAC_INFOELT_SEC_CH_OFFSET_OFT, MAC_INFOELT_SWITCH_COUNT_OFT, MAC_INFOELT_SWITCH_MODE_OFT, MAC_INFOELT_SWITCH_NEW_CHAN_OFT, MAC_INFOELT_WIDE_BW_CHAN_SWITCH_NEW_CENTER1_OFT, MAC_INFOELT_WIDE_BW_CHAN_SWITCH_NEW_CENTER2_OFT, MAC_INFOELT_WIDE_BW_CHAN_SWITCH_NEW_CW_OFT, me_init_chan(), me_vht_bandwidth_parse(), PHY_BAND_2G4, PHY_BAND_5G, phy_channel_to_freq(), PHY_CHNL_BW_20, PHY_CHNL_BW_40, mac_chan_op::prim20_freq, and mac_chan_op::type.

Referenced by me_beacon_check().

bool me_extract_edca_params | ( | uint32_t | buffer,
|  | uint16_t | buflen,
|  | struct mac_edca_param_set * | edca_param,
|  | bool * | changed |
| ) |  |  |

Extract EDCA parameters (i.e.

WMMIE) from Beacon or ProbeRsp If no WMMIE is present in the buffer, default values are set to the EDCA parameters.

Parameters:

  `[in]` | buffer | Pointer to the Beacon/ProbeRsp frame buffer
  `[in]` | buflen | Beacon/ProbeRsp frame length
  `[in,out]` | edca_param | Current EDCA parameter structure stored
  `[out]` | changed | Flag indicating whether the element changed since last time we got it

Returns:
  true if the WMMIE is present and valid, false otherwise

Definition at line 989 of file me_mgmtframe.c.

References AC_BE, AC_BK, mac_edca_param_set::ac_param, AC_VI, AC_VO, mac_edca_param_set::acm, CO_BIT, co_htowl(), co_read32p(), co_read8p(), mac_ie_wmm_param_find(), MAC_WMM_PARAM_BE_PARAM_OFT, MAC_WMM_PARAM_BK_PARAM_OFT, MAC_WMM_PARAM_QOS_INFO_OFT, MAC_WMM_PARAM_SET_CNT_MSK, MAC_WMM_PARAM_VI_PARAM_OFT, MAC_WMM_PARAM_VO_PARAM_OFT, mac_edca_param_set::param_set_cnt, and mac_edca_param_set::qos_info.

Referenced by me_beacon_check(), and scanu_join_frame_handler().

bool me_extract_ht_capa | ( | uint32_t | buffer,
|  | uint16_t | buflen,
|  | struct mac_htcapability * | ht_cap |
| ) |  |  |

Extract HT capability element from Beacon or ProbeRsp.

Parameters:

  `[in]` | buffer | Pointer to the Beacon/ProbeRsp frame buffer
  `[in]` | buflen | Beacon/ProbeRsp frame length
  `[out]` | ht_cap | HT capability structure

Returns:
  true if the HT capability element is present and valid, false otherwise

Definition at line 1063 of file me_mgmtframe.c.

References mac_htcapability::a_mpdu_param, mac_htcapability::asel_capa, co_read16p(), co_read8p(), co_unpack8p(), co_wtohs(), mac_htcapability::ht_capa_info, mac_htcapability::ht_extended_capa, MAC_HT_CAPA_AMPDU_PARAM_OFT, MAC_HT_CAPA_ASEL_CAPA_OFT, MAC_HT_CAPA_EXTENDED_CAPA_OFT, MAC_HT_CAPA_INFO_OFT, MAC_HT_CAPA_SUPPORTED_MCS_SET_OFT, MAC_HT_CAPA_TX_BEAM_FORMING_CAPA_OFT, mac_ie_ht_capa_find(), MAX_MCS_LEN, mac_htcapability::mcs_rate, and mac_htcapability::tx_beamforming_capa.

Referenced by scanu_join_frame_handler().

void me_extract_mobility_domain | ( | uint32_t | buffer,
|  | uint16_t | buflen,
|  | struct me_bss_info * | bss |
| ) |  |  |

Extract Mobility Domain IE.

Parameters:

  `[in]` | buffer | Pointer to the Beacon/ProbeRsp frame buffer
  `[in]` | buflen | Beacon/ProbeRsp frame length
  `[out]` | bss | Pointer to the bss info structure

Definition at line 900 of file me_mgmtframe.c.

References co_read16p(), co_read8p(), mobility_domain::ft_capability_policy, mac_ie_mde_find(), MAC_INFOELT_MDE_FT_CAPA_POL_OFT, MAC_INFOELT_MDE_MDID_OFT, me_bss_info::mde, and mobility_domain::mdid.

Referenced by scanu_join_frame_handler().

void me_extract_power_constraint | ( | uint32_t | buffer,
|  | uint16_t | buflen,
|  | struct me_bss_info * | bss |
| ) |  |  |

Extract local power constraint from Power Constraint IE.

Parameters:

  `[in]` | buffer | Pointer to the Beacon/ProbeRsp frame buffer
  `[in]` | buflen | Beacon/ProbeRsp frame length
  `[out]` | bss | Pointer to the bss info structure in which power_constraint will be updated

Definition at line 845 of file me_mgmtframe.c.

References co_read8p(), mac_ie_power_constraint_find(), MAC_INFOELT_POWER_CONSTRAINT_OFT, and me_bss_info::power_constraint.

Referenced by me_beacon_check(), and scanu_join_frame_handler().

void me_extract_rate_set | ( | uint32_t | buffer,
|  | uint16_t | buflen,
|  | struct mac_rateset * | mac_rate_set_ptr |
| ) |  |  |

This function is called to extract the rateset from a management frame.

Parameters:

  `[in]` | buffer | Pointer to the frame buffer
  `[in]` | buflen | Frame length
  `[out]` | mac_rate_set_ptr | Found rates

Definition at line 787 of file me_mgmtframe.c.

References mac_rateset::array, co_read8p(), mac_rateset::length, MAC_BASIC_RATE, MAC_BSS_MEMBERSHIP_HT_PHY, MAC_BSS_MEMBERSHIP_VHT_PHY, mac_ie_ext_rates_find(), mac_ie_rates_find(), MAC_RATES_RATES_OFT, and MAC_RATESET_LEN.

Referenced by scanu_join_frame_handler().

bool me_extract_vht_capa | ( | uint32_t | buffer,
|  | uint16_t | buflen,
|  | struct mac_vhtcapability * | vht_cap |
| ) |  |  |

Extract VHT capability element from Beacon or ProbeRsp.

Parameters:

  `[in]` | buffer | Pointer to the Beacon/ProbeRsp frame buffer
  `[in]` | buflen | Beacon/ProbeRsp frame length
  `[out]` | vht_cap | VHT capability structure

Returns:
  true if the VHT capability element is present and valid, false otherwise

Definition at line 1081 of file me_mgmtframe.c.

References co_read16p(), co_read32p(), co_wtohl(), co_wtohs(), mac_ie_vht_capa_find(), MAC_VHT_CAPA_INFO_OFT, MAC_VHT_RX_HIGHEST_RATE_OFT, MAC_VHT_RX_MCS_MAP_OFT, MAC_VHT_TX_HIGHEST_RATE_OFT, MAC_VHT_TX_MCS_MAP_OFT, mac_vhtcapability::rx_highest, mac_vhtcapability::rx_mcs_map, mac_vhtcapability::tx_highest, mac_vhtcapability::tx_mcs_map, and mac_vhtcapability::vht_capa_info.

Referenced by scanu_join_frame_handler().