# TX_FRM
[TX]

Management of internal frame generation. More...

Collaboration diagram for TX_FRM:

## Data Structures
struct | txl_frame_cfm_tag
| TX frame confirmation descriptor. More...
struct | txl_frame_desc_tag
| TX frame descriptor. More...
struct | txl_frame_env_tag
| Environment variables of the TX frame block. More...
## Typedefs
typedef void(* | cfm_func_ptr )(void *, uint32_t)
| Pointer to confirmation function.
## Enumerations
enum | { TX_DEFAULT_24G, TX_DEFAULT_5G, TX_DEFAULT_NDPA_BRP, TX_DEFAULT_NDP, TX_CUSTOM }
| Type of transmission parameters. More...
enum | { TX_INT, TX_EXT }
| Type of frame descriptor. More...
## Functions
void | txl_frame_init (bool reset)
| Initializes the TX frame module environment.
void | txl_frame_init_desc (struct txl_frame_desc_tag *frame, struct txl_buffer_tag *buffer, struct tx_hw_desc *hwdesc, struct txl_buffer_control *bufctrl)
| Basic initializations of an external TX frame descriptor (e.g such as a beacon descriptor when autonomous beacon transmission is used).
struct txl_frame_desc_tag * | txl_frame_get (int type, int len)
| Get and initialize a TX frame descriptor.
void | txl_frame_prepare (struct txl_frame_desc_tag *frame, int type, int len)
| Prepare TX frame descriptor prior to transmission.
bool | txl_frame_push (struct txl_frame_desc_tag *desc, uint8_t ac)
| Push a TX frame descriptor.
void | txl_frame_cfm (struct txdesc *txdesc)
| Push a TX descriptor in the TX frame confirmation queue This function is called under interrupt by the TX control module once the frame has been transmitted.
void | txl_frame_release (struct txdesc *txdesc, bool postponed)
| Release a descriptor allocated for a packet that has not been sent.
void | txl_frame_evt (int dummy)
| Background event handler of the Tx frame module.
uint8_t | txl_frame_send_null_frame (uint8_t sta_idx, cfm_func_ptr cfm, void *env)
| Builds a NULL frame with RA address pointing to the STA passed as parameter.
uint8_t | txl_frame_send_qosnull_frame (uint8_t sta_idx, uint16_t qos, cfm_func_ptr cfm, void *env)
| Builds a QoS NULL frame with RA address pointing to the STA passed as parameter.
uint8_t | txl_frame_send_tdls_channel_switch_req_frame (struct tdls_chan_switch_req const *param, cfm_func_ptr cfm)
| Builds a TDLS Channel Switch Request frame.
uint8_t | txl_frame_send_tdls_channel_switch_rsp_frame (struct vif_info_tag *vif, uint16_t status, cfm_func_ptr cfm)
| Builds a TDLS Channel Switch Response frame.
uint8_t | txl_frame_send_tdls_peer_traffic_ind_frame (struct tdls_peer_traffic_ind_req const *param, cfm_func_ptr cfm)
| Builds a TDLS Peer Traffic Indication frame.
## Variables
struct txl_frame_env_tag | txl_frame_env
| TX frame environment variables.
uint32_t | txl_frame_pool [NX_TXFRAME_CNT][(sizeof(struct txl_buffer_tag)+NX_TXFRAME_LEN)/4]
| TX frame buffer pool.
uint32_t | txl_tim_ie_pool [NX_VIRT_DEV_MAX][CO_ALIGN4_HI(MAC_TIM_BMP_OFT+1)/4]
| Pool of TIM IE buffers.
uint32_t | txl_tim_bitmap_pool [NX_VIRT_DEV_MAX][CO_ALIGN4_HI(MAC_TIM_SIZE)/4]
| Pool of TIM virtual bitmap.
struct tx_pbd | txl_tim_desc [NX_VIRT_DEV_MAX][2]
| Pool of TIM descriptors.
uint32_t | txl_bcn_pool [NX_VIRT_DEV_MAX][(sizeof(struct txl_buffer_tag)+NX_BCNFRAME_LEN)/4]
| Beacon buffer pool.
struct tx_hw_desc | txl_bcn_hwdesc_pool [NX_VIRT_DEV_MAX]
| TX beacon header descriptor pool.
struct tx_pbd | txl_bcn_end_desc [NX_VIRT_DEV_MAX]
| TX payload buffer descriptor for the post-TIM part of the beacon.
struct txl_buffer_control | txl_bcn_buf_ctrl [NX_VIRT_DEV_MAX]
| TX buffer control structures for the beacon buffers.
struct tx_pbd | txl_p2p_noa_desc [NX_VIRT_DEV_MAX]
| Pool of P2P NOA payload descriptors.
uint16_t | txl_p2p_noa_ie_pool [NX_VIRT_DEV_MAX][P2P_NOA_IE_BUFFER_LEN]
| Pool of P2P NOA Attributes.
struct tx_pbd | txl_mesh_add_ies_desc [RW_MESH_VIF_NB]
| Payload Descriptor for additional IEs of Mesh Beacon.
struct mesh_add_ies_tag | txl_mesh_add_ies [RW_MESH_VIF_NB]
| Buffer containing the additional IEs of Mesh Beacon.
struct tx_hw_desc | txl_frame_hwdesc_pool [NX_TXFRAME_CNT]
| TX frame header descriptor pool.
struct txl_buffer_control | txl_buffer_control_24G
| Default policy table for 2.4GHz band.
struct txl_buffer_control | txl_buffer_control_5G
| Default policy table for 5GHz band.
struct txl_buffer_control | txl_buffer_control_ndpa_brp
| Default policy table for transmission of NDPA and BRP frames sent during Beamforming Sounding procedure.
struct txl_buffer_control | txl_buffer_control_ndp
| Default policy table for NDP frame sent during Beamforming Sounding procedure.
struct txl_buffer_control | txl_frame_buf_ctrl [NX_TXFRAME_CNT]
| TX buffer control structures for the internal frames.
uint32_t | txl_frame_pool [NX_TXFRAME_CNT][(sizeof(struct txl_buffer_tag)+NX_TXFRAME_LEN)/4]
| TX frame buffer pool.
uint32_t | txl_tim_ie_pool [NX_VIRT_DEV_MAX][CO_ALIGN4_HI(MAC_TIM_BMP_OFT+1)/4]
| Pool of TIM IE buffers.
uint32_t | txl_tim_bitmap_pool [NX_VIRT_DEV_MAX][CO_ALIGN4_HI(MAC_TIM_SIZE)/4]
| Pool of TIM virtual bitmap.
struct tx_pbd | txl_tim_desc [NX_VIRT_DEV_MAX][2]
| Pool of TIM descriptors.
uint32_t | txl_bcn_pool [NX_VIRT_DEV_MAX][(sizeof(struct txl_buffer_tag)+NX_BCNFRAME_LEN)/4]
| Beacon buffer pool.
struct tx_hw_desc | txl_bcn_hwdesc_pool [NX_VIRT_DEV_MAX]
| TX beacon header descriptor pool.
struct tx_pbd | txl_bcn_end_desc [NX_VIRT_DEV_MAX]
| TX payload buffer descriptor for the post-TIM part of the beacon.
struct txl_buffer_control | txl_bcn_buf_ctrl [NX_VIRT_DEV_MAX]
| TX buffer control structures for the beacon buffers.
struct tx_pbd | txl_p2p_noa_desc [NX_VIRT_DEV_MAX]
| Pool of P2P NOA payload descriptors.
uint16_t | txl_p2p_noa_ie_pool [NX_VIRT_DEV_MAX][P2P_NOA_IE_BUFFER_LEN]
| Pool of P2P NOA Attributes.
struct tx_pbd | txl_mesh_add_ies_desc [RW_MESH_VIF_NB]
| Payload Descriptor for additional IEs of Mesh Beacon.
struct mesh_add_ies_tag | txl_mesh_add_ies [RW_MESH_VIF_NB]
| Buffer containing the additional IEs of Mesh Beacon.
struct tx_hw_desc | txl_frame_hwdesc_pool [NX_TXFRAME_CNT]
| TX frame header descriptor pool.
struct txl_buffer_control | txl_buffer_control_24G
| Default buffer control structure for 2.4GHz band.
struct txl_buffer_control | txl_buffer_control_5G
| Default buffer control structure for 5GHz band.
struct txl_buffer_control | txl_buffer_control_ndpa_brp
| Default policy table for transmission of NDPA and BRP frames sent during Beamforming Sounding procedure.
struct txl_buffer_control | txl_buffer_control_ndp
| Default policy table for NDP frame sent during Beamforming Sounding procedure.
struct txl_buffer_control | txl_frame_buf_ctrl [NX_TXFRAME_CNT]
| TX buffer control structures for the internal frames.

## Detailed Description

Management of internal frame generation.

## Enumeration Type Documentation

anonymous enum

Type of transmission parameters.

Enumerator:

  TX_DEFAULT_24G | Default TX parameters for 2.4GHz - 1Mbps, no protection.
  TX_DEFAULT_5G | Default TX parameters for 5GHz - 6Mbps, no protection.
  TX_DEFAULT_NDPA_BRP | Default TX parameters for NDPA and BRP transmissions.
  TX_DEFAULT_NDP | Default TX parameters for NDP transmissions.
  TX_CUSTOM | Custom TX parameters.

Definition at line 46 of file txl_frame.h.

anonymous enum

Type of frame descriptor.

Enumerator:

  TX_INT | Internal frame descriptor, i.e part of the generic frame module.
  TX_EXT | External frame descriptor.

Definition at line 61 of file txl_frame.h.

## Function Documentation

void txl_frame_cfm | ( | struct txdesc * | txdesc | ) |

Push a TX descriptor in the TX frame confirmation queue This function is called under interrupt by the TX control module once the frame has been transmitted.

Parameters:

  `[in]` | txdesc | TX descriptor to be pushed in the confirmation queue

Definition at line 366 of file txl_frame.c.

References co_list_push_back(), txl_frame_env_tag::desc_done, ke_evt_set(), KE_EVT_TXFRAME_CFM_BIT, txdesc::list_hdr, and txl_frame_env.

Referenced by txl_cfm_flush(), txl_cfm_flush_desc(), and txl_frame_exchange_done().

void txl_frame_evt | ( | int | dummy | ) |

Background event handler of the Tx frame module.

This function parses the list of confirmed frames and call the appropriate callbacks.

Parameters:

  `[in]` | dummy | Parameter not used but required to follow the kernel event callback format

Definition at line 398 of file txl_frame.c.

References txl_frame_desc_tag::cfm, txl_frame_cfm_tag::cfm_func, co_list_pop_front(), co_list_push_back(), txl_frame_env_tag::desc_done, txl_frame_env_tag::desc_free, txl_frame_cfm_tag::env, GLOBAL_INT_DISABLE, GLOBAL_INT_RESTORE, lmacdesc::hw_desc, ke_evt_clear(), KE_EVT_TXFRAME_CFM_BIT, txl_frame_desc_tag::keep_desc, txdesc::list_hdr, txdesc::lmac, txl_cntrl_env_tag::pck_cnt, PROF_TX_FRAME_CFM_CLR, PROF_TX_FRAME_CFM_SET, tx_hd::statinfo, tx_hw_desc::thd, TX_INT, txl_frame_desc_tag::txdesc, txl_cntrl_env, txl_frame_env, and txl_frame_desc_tag::type.

Referenced by txl_cfm_flush(), and txl_cfm_flush_desc().

struct txl_frame_desc_tag* txl_frame_get | ( | int | type,
|  | int | len |
| ) |  |  | `[read]`

Get and initialize a TX frame descriptor.

This function is called by any module that needs to transmit a packet generated internally. The caller can choose whether it prefers to intialize the policy table (i.e. the transmission parameters) with pre-defined one or keep it un-initialized. In any case caller will be able to update parameters afterward.

Parameters:

  `[in]` | type | Type of policy to use for transmission. Possible values are TX_DEFAULT_24G TX_DEFAULT_5G TX_DEFAULT_NDPA_BRP TX_DEFAULT_NDP TX_CUSTOM
  `[in]` | len | Length of the packet to be transmitted (including FCS length)

Returns:
  A pointer to the allocated TX frame descriptor, or NULL if no descriptors are available anymore.

Definition at line 241 of file txl_frame.c.

References co_list_pop_front(), txl_frame_env_tag::desc_free, txl_frame_env, and txl_frame_prepare().

Referenced by bfr_prep_bfr_poll(), bfr_prep_ndp(), bfr_prep_ndpa(), ps_send_pspoll(), txl_frame_send_null_frame(), txl_frame_send_qosnull_frame(), txl_frame_send_tdls_channel_switch_req_frame(), txl_frame_send_tdls_channel_switch_rsp_frame(), and txl_frame_send_tdls_peer_traffic_ind_frame().

void txl_frame_init_desc | ( | struct txl_frame_desc_tag * | frame,
|  | struct txl_buffer_tag * | buffer,
|  | struct tx_hw_desc * | hwdesc,
|  | struct txl_buffer_control * | bufctrl |
| ) |  |  |

Basic initializations of an external TX frame descriptor (e.g such as a beacon descriptor when autonomous beacon transmission is used).

Parameters:

  `[in]` | frame | Pointer to the frame descriptor to be initialized
  `[in]` | buffer | Pointer to the buffer descriptor that need to be attached to the frame descriptor
  `[in]` | hwdesc | Pointer to the HW descriptors that need to be attached to the frame descriptor
  `[in]` | bufctrl | Pointer to the buffer control structure associated with this desc

Definition at line 57 of file txl_frame.c.

References umacdesc::buf_control, lmacdesc::buffer, CPU2HW, tx_hd::datastartptr, tx_hd::frmlifetime, lmacdesc::hw_desc, txdesc::lmac, tx_hd::optlen, POLICY_TABLE_PATTERN, txl_buffer_control::policy_tbl, tx_hw_desc::thd, TX_EXT, TX_HEADER_DESC_PATTERN, txl_frame_desc_tag::txdesc, txl_buffer_payload_get(), txl_frame_desc_tag::type, txdesc::umac, tx_policy_tbl::upatterntx, and tx_hd::upatterntx.

void txl_frame_prepare | ( | struct txl_frame_desc_tag * | frame,
|  | int | type,
|  | int | len |
| ) |  |  |

Prepare TX frame descriptor prior to transmission.

This function is called by any module that needs to transmit a packet generated internally using a specific frame structure (i.e. not taken from common pool like txl_frame_get). The caller can choose whether it prefers to intialize the policy table (i.e. the transmission parameters) with pre-defined one or keep it un-initialized. In any case caller will be able to update parameters afterward.

Parameters:

  `[in]` | frame | Frame to initialize (Must not be null).
  `[in]` | type | Type of policy to use for transmission. Possible values are TX_DEFAULT_24G TX_DEFAULT_5G TX_DEFAULT_NDPA_BRP TX_DEFAULT_NDP TX_CUSTOM
  `[in]` | len | Length of the packet to be transmitted (including FCS length)

Definition at line 258 of file txl_frame.c.

References txl_frame_desc_tag::cfm, txl_frame_cfm_tag::cfm_func, CPU2HW, tx_hd::dataendptr, tx_hd::datastartptr, txl_frame_cfm_tag::env, tx_hd::first_pbd_ptr, tx_hd::frmlen, lmacdesc::hw_desc, txdesc::lmac, MAC_FCS_LEN, tx_hd::macctrlinfo2, txl_buffer_tag::payload, tx_hd::phyctrlinfo, txl_buffer_control::policy_tbl, tx_hd::policyentryaddr, tx_policy_tbl::powercntrlinfo, tx_hw_desc::thd, TX_DEFAULT_24G, TX_DEFAULT_5G, TX_DEFAULT_NDP, TX_DEFAULT_NDPA_BRP, TX_PWR_LEVEL_SET, txl_frame_desc_tag::txdesc, txl_buffer_control_24G, txl_buffer_control_5G, txl_buffer_control_get(), txl_buffer_control_ndp, txl_buffer_control_ndpa_brp, and txl_buffer_get().

Referenced by txl_frame_get().

bool txl_frame_push | ( | struct txl_frame_desc_tag * | desc,
|  | uint8_t | ac |
| ) |  |  |

Push a TX frame descriptor.

This function is called by any module after a call to txl_frame_get. It takes the descriptor returned by this call as parameter.

Parameters:

  `[in]` | desc | Pointer to the descriptor previously returned by txl_frame_get
  `[in]` | ac | Access category on which the frame shall be transmitted

Returns:
  true if the frame was pushed successfully, false otherwise (i.e discarded because the PHY is not on the right channel and the destination is not a known station)

Definition at line 341 of file txl_frame.c.

References mac_hdr::addr1, ASSERT_ERR, tx_hd::datastartptr, EXPECTED_ACK_NO_ACK, EXPECTED_ACK_NORMAL_ACK, HW2CPU, lmacdesc::hw_desc, txdesc::lmac, MAC_ADDR_GROUP, tx_hd::macctrlinfo1, tx_hd::macctrlinfo2, tx_hd::nextfrmexseq_ptr, tx_hd::nextmpdudesc_ptr, tx_hd::statinfo, tx_hw_desc::thd, txl_frame_desc_tag::txdesc, txl_cntrl_push_int(), UNDER_BA_SETUP_BIT, and WHICHDESC_MSK.

Referenced by ps_send_pspoll(), sm_frame_tx_cfm_handler(), txl_frame_send_null_frame(), txl_frame_send_qosnull_frame(), txl_frame_send_tdls_channel_switch_req_frame(), txl_frame_send_tdls_channel_switch_rsp_frame(), and txl_frame_send_tdls_peer_traffic_ind_frame().

void txl_frame_release | ( | struct txdesc * | txdesc,
|  | bool | postponed |
| ) |  |  |

Release a descriptor allocated for a packet that has not been sent.

Parameters:

  `[in]` | txdesc | TX descriptor to be pushed in the confirmation queue
  `[in]` | postponed | Indicate if released frame was a postponed frame

Definition at line 375 of file txl_frame.c.

References txl_frame_desc_tag::cfm, txl_frame_cfm_tag::cfm_func, co_list_push_back(), txl_frame_env_tag::desc_free, txl_frame_cfm_tag::env, txdesc::list_hdr, TX_INT, txl_frame_env, and txl_frame_desc_tag::type.

Referenced by bfr_start_next_calibration(), and sta_mgmt_entry_init().

uint8_t txl_frame_send_null_frame | ( | uint8_t | sta_idx,
|  | cfm_func_ptr | cfm,
|  | void * | env |
| ) |  |  |

Builds a NULL frame with RA address pointing to the STA passed as parameter.

Once the NULL frame has been transmitted, the confirmation function is called.

Parameters:

  `[in]` | sta_idx | Index of the station the NULL frame has to be transmitted to
  `[in]` | cfm | Pointer to the function to be called after frame transmission
  `[in]` | env | Environment variable to be put as parameter to the confirmation function

Returns:
  CO_OK if frame was correctly pushed to TX path, CO_FAIL otherwise

Definition at line 457 of file txl_frame.c.

References AC_VO, mac_hdr::addr1, mac_hdr::addr2, mac_hdr::addr3, txl_frame_desc_tag::cfm, txl_frame_cfm_tag::cfm_func, CO_FAIL, CO_OK, mac_hdr::durid, txl_frame_cfm_tag::env, mac_hdr::fctl, txdesc::host, sta_info_tag::inst_nbr, vif_info_tag::mac_addr, sta_info_tag::mac_addr, MAC_FCTRL_NULL_FUNCTION, MAC_FCTRL_TODS, mac_hdr::seq, sta_info_tab, hostdesc::staid, tpc_update_frame_tx_power(), txl_frame_desc_tag::txdesc, txl_buffer_payload_get(), txl_frame_get(), txl_frame_push(), txl_get_seq_ctrl(), hostdesc::vif_idx, vif_info_tab, and vif_mgmt_get_txtype().

Referenced by chan_notify_absence(), chan_notify_presence(), ps_check_tx_status(), and ps_dpsm_update().

uint8_t txl_frame_send_qosnull_frame | ( | uint8_t | sta_idx,
|  | uint16_t | qos,
|  | cfm_func_ptr | cfm,
|  | void * | env |
| ) |  |  |

Builds a QoS NULL frame with RA address pointing to the STA passed as parameter.

Once the NULL frame has been transmitted, the confirmation function is called.

Parameters:

  `[in]` | sta_idx | Index of the station the NULL frame has to be transmitted to
  `[in]` | qos | Value to set in the QoS control field
  `[in]` | cfm | Pointer to the function to be called after frame transmission
  `[in]` | env | Environment variable to be put as parameter to the confirmation function

Returns:
  CO_OK if frame was correctly pushed to TX path, CO_FAIL otherwise

Definition at line 502 of file txl_frame.c.

References AC_VO, mac_hdr_qos::addr1, mac_hdr_qos::addr2, mac_hdr_qos::addr3, vif_info_tag::bssid, txl_frame_desc_tag::cfm, txl_frame_cfm_tag::cfm_func, CO_FAIL, CO_OK, mac_hdr_qos::durid, txl_frame_cfm_tag::env, mac_hdr_qos::fctl, txdesc::host, sta_info_tag::inst_nbr, sta_info_tag::is_tdls, vif_info_tag::mac_addr, sta_info_tag::mac_addr, MAC_FCTRL_FROMDS, MAC_FCTRL_QOS_NULL, MAC_FCTRL_TODS, mac_hdr_qos::qos, mac_hdr_qos::seq, sta_info_tab, hostdesc::staid, tpc_update_frame_tx_power(), txl_frame_desc_tag::txdesc, txl_buffer_payload_get(), txl_frame_get(), txl_frame_push(), vif_info_tag::type, hostdesc::vif_idx, vif_info_tab, vif_mgmt_get_txtype(), and VIF_STA.

Referenced by ps_uapsd_timer_handle(), rxl_pm_check(), tdls_check_frame_action(), tdls_chsw_time_evt(), tdls_keep_alive_evt(), and tdls_keep_alive_frame_tx_cfm().

uint8_t txl_frame_send_tdls_channel_switch_req_frame | ( | struct tdls_chan_switch_req const * | param,
|  | cfm_func_ptr | cfm |
| ) |  |  |

Builds a TDLS Channel Switch Request frame.

Once the TDLS Channel Switch Request frame has been transmitted, the confirmation function is called.

Parameters:

  `[in]` | param | Parameters of the TDLS Channel Switch Request
  `[in]` | cfm | Pointer to the function to be called after frame transmission

Returns:
  CO_OK if frame was correctly pushed to TX path, CO_FAIL otherwise

Definition at line 595 of file txl_frame.c.

References mac_hdr_qos::addr1, mac_hdr_qos::addr2, mac_hdr_qos::addr3, mac_addr::array, ASSERT_ERR, mac_chan_op::band, vif_info_tag::bssid, mac_chan_op::center1_freq, mac_chan_op::center2_freq, txl_frame_desc_tag::cfm, txl_frame_cfm_tag::cfm_func, tdls_chan_switch_req::chan, key_info_tag::cipher, CO_FAIL, CO_OK, co_write16p(), co_write32p(), co_write8p(), CPU2HW, sta_mgmt_sec_info::cur_key, tx_hd::dataendptr, mac_hdr_qos::durid, EIV_LEN, txl_frame_cfm_tag::env, mac_hdr_qos::fctl, FRAME_BODY_LLC_H, FRAME_BODY_LLC_L, tx_hd::frmlen, hal_machw_time(), txdesc::host, lmacdesc::hw_desc, vif_info_tag::index, tdls_chan_switch_req::initiator, IV_LEN, txdesc::lmac, MAC_ACTION_ACTION_OFT, sta_info_tag::mac_addr, vif_info_tag::mac_addr, MAC_ADDR_CPY, MAC_ADDR_LEN, MAC_CIPHER_CCMP, MAC_ELTID_CHANNEL_SWITCH_TIMING, MAC_ELTID_LINK_IDENTIFIER, MAC_ELTID_SEC_CH_OFFSET, MAC_ELTID_WIDE_BANDWIDTH_CHAN_SWITCH, MAC_ENCAPSULATED_LLC_L_OFT, MAC_ENCAPSULATED_PAYLOAD_OFT, MAC_ENCAPSULATED_PAYLOAD_TYPE_OFT, MAC_FCS_LEN, MAC_FCTRL_QOS_DATA, MAC_INFOELT_CH_SWITCH_TIMING_LEN, MAC_INFOELT_CH_SWITCH_TIMING_SWTIME_OFT, MAC_INFOELT_CH_SWITCH_TIMING_SWTOUT_OFT, MAC_INFOELT_LEN_OFT, MAC_INFOELT_LINK_ID_BSSID_OFT, MAC_INFOELT_LINK_ID_INIT_STA_OFT, MAC_INFOELT_LINK_ID_LEN, MAC_INFOELT_LINK_ID_RESP_STA_OFT, MAC_INFOELT_SEC_CH_OFFSET_INFO_LEN, MAC_INFOELT_SEC_CH_OFFSET_SEC_ABOVE, MAC_INFOELT_SEC_CH_OFFSET_SEC_BELOW, MAC_INFOELT_SEC_CH_OFFSET_SEC_CH_OFT, MAC_INFOELT_WIDE_BW_CHAN_SWITCH_INFO_LEN, 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, MAC_QOSCTRL_UP_OFT, MAC_SEQCTRL_NUM_OFT, MAC_SHORT_QOS_MAC_HDR_LEN, MAC_TDLS_ACTION_CATEGORY, MAC_TDLS_ACTION_CHANSW_REQ, mac_tid2ac, MIC_LEN, tdls_chan_switch_req::op_class, PAYLOAD_TYPE_TDLS, tdls_chan_switch_req::peer_mac_addr, PHY_CHNL_BW_20, PHY_CHNL_BW_40, phy_freq_to_channel(), mac_chan_op::prim20_freq, PROF_TDLS_CHSW_REQ_TX_CLR, PROF_TDLS_CHSW_REQ_TX_SET, mac_hdr_qos::qos, mac_hdr_qos::seq, vif_info_tag::sta, tdls_chan_switch_req::sta_idx, sta_info_tab, sta_mgmt_get_tx_ssn_and_inc(), sta_info_tag::sta_sec_info, hostdesc::staid, vif_info_tag::tbtt_timer, TDLS_CHANSW_REQ_IE_CH_SWITCH_TIMING_LEN, TDLS_CHANSW_REQ_IE_LINK_ID_LEN, TDLS_CHANSW_REQ_IE_SEC_CH_OFT_LEN, TDLS_CHANSW_REQ_IE_WIDE_BW_CHAN_SWITCH_LEN, TDLS_CHANSW_REQ_IES_OFFSET, TDLS_CHANSW_REQ_OP_CLASS, TDLS_CHANSW_REQ_TARGET_CH_OFFSET, TDLS_CHSW_SWITCH_TIME_US, TDLS_CHSW_TX_FRAME_TIME_US, tdls_get_dt_us(), TDLS_MAX_CHSW_SWITCH_TIME_US, tx_hw_desc::thd, TID_5, mm_timer_tag::time, tpc_update_frame_tx_power(), txl_frame_desc_tag::txdesc, txl_buffer_payload_get(), txl_frame_get(), txl_frame_push(), txl_frame_tdls_add_security_header(), mac_chan_op::type, vif_info_tag::u, hostdesc::vif_idx, tdls_chan_switch_req::vif_index, vif_info_tab, and vif_mgmt_get_txtype().

uint8_t txl_frame_send_tdls_channel_switch_rsp_frame | ( | struct vif_info_tag * | vif,
|  | uint16_t | status,
|  | cfm_func_ptr | cfm |
| ) |  |  |

Builds a TDLS Channel Switch Response frame.

Once the TDLS Channel Switch Response frame has been transmitted, the confirmation function is called.

Parameters:

  `[in]` | vif | Pointer to the VIF entry
  `[in]` | status | Status to be set in the TDLS Channel Switch Response
  `[in]` | cfm | Pointer to the function to be called after frame transmission

Returns:
  CO_OK if frame was correctly pushed to TX path, CO_FAIL otherwise

Definition at line 763 of file txl_frame.c.

References mac_hdr_qos::addr1, mac_hdr_qos::addr2, mac_hdr_qos::addr3, mac_addr::array, ASSERT_ERR, vif_info_tag::bssid, txl_frame_desc_tag::cfm, txl_frame_cfm_tag::cfm_func, tdls_info_tag::chsw_time, tdls_info_tag::chsw_timeout, key_info_tag::cipher, CO_FAIL, CO_OK, co_write16p(), co_write32p(), co_write8p(), CPU2HW, sta_mgmt_sec_info::cur_key, tx_hd::dataendptr, mac_hdr_qos::durid, EIV_LEN, txl_frame_cfm_tag::env, mac_hdr_qos::fctl, FRAME_BODY_LLC_H, FRAME_BODY_LLC_L, tx_hd::frmlen, txdesc::host, lmacdesc::hw_desc, vif_info_tag::index, tdls_info_tag::initiator, IV_LEN, txdesc::lmac, MAC_ACTION_ACTION_OFT, vif_info_tag::mac_addr, sta_info_tag::mac_addr, MAC_ADDR_CPY, MAC_ADDR_LEN, MAC_CIPHER_CCMP, MAC_ELTID_CHANNEL_SWITCH_TIMING, MAC_ELTID_LINK_IDENTIFIER, MAC_ENCAPSULATED_LLC_L_OFT, MAC_ENCAPSULATED_PAYLOAD_OFT, MAC_ENCAPSULATED_PAYLOAD_TYPE_OFT, MAC_FCS_LEN, MAC_FCTRL_QOS_DATA, MAC_INFOELT_CH_SWITCH_TIMING_LEN, MAC_INFOELT_CH_SWITCH_TIMING_SWTIME_OFT, MAC_INFOELT_CH_SWITCH_TIMING_SWTOUT_OFT, MAC_INFOELT_LEN_OFT, MAC_INFOELT_LINK_ID_BSSID_OFT, MAC_INFOELT_LINK_ID_INIT_STA_OFT, MAC_INFOELT_LINK_ID_LEN, MAC_INFOELT_LINK_ID_RESP_STA_OFT, MAC_QOSCTRL_UP_OFT, MAC_SEQCTRL_NUM_OFT, MAC_SHORT_QOS_MAC_HDR_LEN, MAC_TDLS_ACTION_CATEGORY, MAC_TDLS_ACTION_CHANSW_RSP, mac_tid2ac, MIC_LEN, PAYLOAD_TYPE_TDLS, PROF_TDLS_CHSW_RESP_TX_CLR, PROF_TDLS_CHSW_RESP_TX_SET, mac_hdr_qos::qos, mac_hdr_qos::seq, vif_info_tag::sta, sta_info_tab, sta_mgmt_get_tx_ssn_and_inc(), sta_info_tag::sta_sec_info, hostdesc::staid, sta_info_tag::staid, sta_info_tag::tdls, TDLS_CHANSW_REQ_IE_CH_SWITCH_TIMING_LEN, TDLS_CHANSW_REQ_IE_LINK_ID_LEN, TDLS_CHANSW_RSP_IES_OFFSET, TDLS_CHANSW_RSP_STATUS_OFFSET, tx_hw_desc::thd, TID_5, tpc_update_frame_tx_power(), txl_frame_desc_tag::txdesc, txl_buffer_payload_get(), txl_frame_get(), txl_frame_push(), txl_frame_tdls_add_security_header(), vif_info_tag::u, hostdesc::vif_idx, and vif_mgmt_get_txtype().

Referenced by tdls_check_frame_action(), tdls_check_peer_ps(), and tdls_chsw_end_evt().

uint8_t txl_frame_send_tdls_peer_traffic_ind_frame | ( | struct tdls_peer_traffic_ind_req const * | param,
|  | cfm_func_ptr | cfm |
| ) |  |  |

Builds a TDLS Peer Traffic Indication frame.

Once the TDLS Peer Traffic Indication frame has been transmitted, the confirmation function is called.

Parameters:

  `[in]` | param | Parameters of the TDLS Peer Traffic Indication
  `[in]` | cfm | Pointer to the function to be called after frame transmission

Returns:
  CO_OK if frame was correctly pushed to TX path, CO_FAIL otherwise

Definition at line 884 of file txl_frame.c.

References AC_VI, mac_hdr_qos::addr1, mac_hdr_qos::addr2, mac_hdr_qos::addr3, mac_addr::array, ASSERT_ERR, vif_info_tag::bssid, txl_frame_desc_tag::cfm, txl_frame_cfm_tag::cfm_func, key_info_tag::cipher, CO_FAIL, CO_OK, co_write16p(), co_write32p(), co_write8p(), CPU2HW, sta_mgmt_sec_info::cur_key, tx_hd::dataendptr, tdls_peer_traffic_ind_req::dialog_token, mac_hdr_qos::durid, EIV_LEN, txl_frame_cfm_tag::env, mac_hdr_qos::fctl, FRAME_BODY_LLC_H, FRAME_BODY_LLC_L, tx_hd::frmlen, txdesc::host, lmacdesc::hw_desc, vif_info_tag::index, tdls_info_tag::initiator, IV_LEN, tdls_peer_traffic_ind_req::last_sn, tdls_peer_traffic_ind_req::last_tid, txdesc::lmac, MAC_ACTION_ACTION_OFT, MAC_ACTION_TOKEN_OFT, vif_info_tag::mac_addr, MAC_ADDR_CPY, MAC_ADDR_LEN, MAC_CIPHER_CCMP, MAC_ELTID_LINK_IDENTIFIER, MAC_ELTID_PTI_CONTROL, MAC_ELTID_TPU_BUFFER_STATUS, MAC_ENCAPSULATED_LLC_L_OFT, MAC_ENCAPSULATED_PAYLOAD_OFT, MAC_ENCAPSULATED_PAYLOAD_TYPE_OFT, MAC_FCS_LEN, MAC_FCTRL_QOS_DATA, MAC_FCTRL_TODS, MAC_INFOELT_LEN_OFT, MAC_INFOELT_LINK_ID_BSSID_OFT, MAC_INFOELT_LINK_ID_INIT_STA_OFT, MAC_INFOELT_LINK_ID_LEN, MAC_INFOELT_LINK_ID_RESP_STA_OFT, MAC_INFOELT_PTI_CONTROL_LEN, MAC_INFOELT_PTI_CONTROL_SEQ_CTRL_OFT, MAC_INFOELT_PTI_CONTROL_TID_OFT, MAC_INFOELT_TPU_BUF_STATUS_AC_STATUS, MAC_INFOELT_TPU_BUF_STATUS_LEN, MAC_QOSCTRL_UP_OFT, MAC_SEQCTRL_NUM_OFT, MAC_SHORT_QOS_MAC_HDR_LEN, MAC_TDLS_ACTION_CATEGORY, MAC_TDLS_ACTION_PEER_TRAFFIC_IND, MIC_LEN, PAYLOAD_TYPE_TDLS, tdls_peer_traffic_ind_req::peer_mac_addr, mac_hdr_qos::qos, mac_hdr_qos::seq, vif_info_tag::sta, tdls_peer_traffic_ind_req::sta_idx, sta_info_tab, sta_mgmt_get_tx_ssn_and_inc(), sta_info_tag::sta_sec_info, hostdesc::staid, sta_info_tag::staid, sta_info_tag::tdls, TDLS_PEER_TRAFFIC_IND_IE_LINK_ID_LEN, TDLS_PEER_TRAFFIC_IND_IE_PTI_CTRL_LEN, TDLS_PEER_TRAFFIC_IND_IE_TPU_BUF_STATUS_LEN, TDLS_PEER_TRAFFIC_IND_IES_OFFSET, tx_hw_desc::thd, TID_5, tpc_update_frame_tx_power(), txl_frame_desc_tag::txdesc, txl_buffer_payload_get(), txl_frame_get(), txl_frame_push(), txl_frame_tdls_add_security_header(), vif_info_tag::u, hostdesc::vif_idx, tdls_peer_traffic_ind_req::vif_index, vif_info_tab, and vif_mgmt_get_txtype().

Referenced by tdls_keep_alive_evt(), and tdls_peer_traffic_ind_req_handler().

## Variable Documentation

struct txl_buffer_control txl_buffer_control_24G

Default buffer control structure for 2.4GHz band.

Default policy table for 2.4GHz band.

Definition at line 72 of file txl_frame_shared.c.

Referenced by mm_bcn_desc_prep(), txl_frame_init(), txl_frame_prepare(), and txu_cntrl_umacdesc_mgmt_prep().

struct txl_buffer_control txl_buffer_control_5G

Default buffer control structure for 5GHz band.

Default policy table for 5GHz band.

Definition at line 74 of file txl_frame_shared.c.

Referenced by mm_bcn_desc_prep(), txl_frame_init(), txl_frame_prepare(), and txu_cntrl_umacdesc_mgmt_prep().