Structure definitions and Helper function declarations of the UMAC's Rx Module. More...
|
Data Structures | |
| struct | rxu_mic_calc |
| Structure used for RX MIC checking. More... | |
| struct | rxu_cntrl_defrag |
| Structure used during reassembly. More... | |
| struct | rxu_cntrl_reord_elt |
| Structure describing an element of the RX reordering table. More... | |
| struct | rxu_cntrl_reord |
| RX reordering environment declaration. More... | |
| struct | rx_cntrl_rx_status |
| Structure in which we store much information about the current packet. More... | |
| struct | rx_cntrl_dupli |
| Structure used for Duplicate Filtering of packet received on unregistered STA. More... | |
| struct | rx_cntrl_pm_mon |
| Structure used for Duplicate Filtering of packet received on unregistered STA. More... | |
| struct | rxu_cntrl_env_tag |
| The context structure of the UMAC's Rx module. More... | |
| struct | rxu_stat_val |
| RX status value structure (as expected by Upper Layers). More... | |
| struct | rxu_stat_desc |
| RX status descriptor structure (contains value plus other internal data). More... | |
Modules | |
| TASK_RXU | |
Declaration of the RXU task. | |
Defines | |
| #define | RXL_CNTRL_IS_DATA(frame_cntrl) ((frame_cntrl & MAC_FCTRL_TYPE_MASK) == MAC_FCTRL_DATA_T) |
| Indicate if the received packet is a Data packet by reading the Frame Control Field. | |
| #define | RXL_CNTRL_IS_QOS_DATA(frame_cntrl) ((frame_cntrl & MAC_FCTRL_TYPESUBTYPE_MASK) == MAC_FCTRL_QOS_DATA) |
| Indicate if the received packet is a QOS Data packet by reading the Frame Control Field. | |
| #define | RXL_CNTRL_IS_MGT(frame_cntrl) ((frame_cntrl & MAC_FCTRL_TYPE_MASK) == MAC_FCTRL_MGT_T) |
| Indicate if the received packet is a Management packet by reading the Frame Control Field. | |
| #define | RXL_CNTRL_IS_CTRL(frame_cntrl) ((frame_cntrl & MAC_FCTRL_TYPE_MASK) == MAC_FCTRL_CTRL_T) |
| Indicate if the received packet is a Control packet by reading the Frame Control Field. | |
| #define | RXL_CNTRL_IS_PROTECTED(frame_cntrl) ((frame_cntrl & MAC_FCTRL_PROTECTEDFRAME) == MAC_FCTRL_PROTECTEDFRAME) |
| Indicate if the received frame was encrypted (Protected Bit set to 1). | |
| #define | __RX_STAT_DESC_LOC __SHAREDRAM |
| Attribute indicating whether the RX status descriptor pool shall be put in shared RAM or not. | |
| #define | RX_CNTRL_DEFRAG_POOL_SIZE (3) |
| Size of the pool containing Reassembly structure. | |
| #define | RX_CNTRL_DEFRAG_MAX_WAIT (100000) |
| Maximum time we can wait for a fragment (in us). | |
| #define | RX_CNTRL_REORD_POOL_SIZE (NX_REORD) |
| Size of the pool containing reordering structure. | |
| #define | RX_CNTRL_REORD_WIN_SIZE (NX_REORD_BUF_SIZE) |
| Size of the windows used in reordering operations. | |
| #define | RX_CNTRL_REORD_MAX_WAIT (50000) |
| Maximum time we can wait for an SN (in us). | |
| #define | RX_MIN_STAT_DESC_CNT (NX_RXDESC_CNT + 2) |
| Minimum number of RX descriptors. | |
| #define | RX_STAT_DESC_CNT RX_MIN_STAT_DESC_CNT |
| Number of Descriptors for IPC transfers between the embedded and the host. | |
| #define | RX_MAX_AMSDU_SUBFRAME_LEN (LLC_ETHER_MTU + LLC_ETHER_HDR_LEN + LLC_802_2_HDR_LEN) |
| Maximum A-MSDU subframe length we support (Ethernet Header + LLC/SNAP + Ethernet MTU). | |
| #define | RX_FLAGS_IS_AMSDU_BIT CO_BIT(0) |
| Packet contains an A-MSDU. | |
| #define | RX_FLAGS_IS_MPDU_BIT CO_BIT(1) |
| Packet contains a 802.11 MPDU. | |
| #define | RX_FLAGS_4_ADDR_BIT CO_BIT(2) |
| Packet contains 4 addresses. | |
| #define | RX_FLAGS_NEW_MESH_PEER_BIT CO_BIT(3) |
| Packet is a Mesh Beacon received from an unknown Mesh STA. | |
| #define | RX_FLAGS_NON_MSDU_MSK |
| Bitmask indicating that a received packet is not a MSDU. | |
| #define | RX_FLAGS_USER_PRIO_INDEX_OFT 4 |
| Offset of the User priority index field. | |
| #define | RX_FLAGS_USER_PRIO_INDEX_MSK (0x7 << RX_FLAGS_USER_PRIO_INDEX_OFT) |
| Mask of the User priority index field. | |
| #define | RX_FLAGS_VIF_INDEX_OFT 8 |
| Offset of the VIF index field. | |
| #define | RX_FLAGS_VIF_INDEX_MSK (0xFF << RX_FLAGS_VIF_INDEX_OFT) |
| Mask of the VIF index field. | |
| #define | RX_FLAGS_STA_INDEX_OFT 16 |
| Offset of the STA index field. | |
| #define | RX_FLAGS_STA_INDEX_MSK (0xFF << RX_FLAGS_STA_INDEX_OFT) |
| Mask of the STA index field. | |
| #define | RX_FLAGS_DST_INDEX_OFT 24 |
| Offset of the destination STA index field. | |
| #define | RX_FLAGS_DST_INDEX_MSK (0xFF << RX_FLAGS_DST_INDEX_OFT) |
| Mask of the destination STA index field. | |
Enumerations | |
| enum | rx_status_bits { RX_STAT_FORWARD = CO_BIT(0), RX_STAT_ALLOC = CO_BIT(1), RX_STAT_DELETE = CO_BIT(2), RX_STAT_LEN_UPDATE = CO_BIT(3), RX_STAT_ETH_LEN_UPDATE = CO_BIT(4), RX_STAT_COPY = CO_BIT(5), RX_STAT_SPURIOUS = CO_BIT(6), RX_STAT_MONITOR = CO_BIT(7), RX_STAT_UF = CO_BIT(8) } |
RX status bits uploaded in the RX IPC descriptor. More... | |
| enum | rxu_cntrl_frame_info_pos { RXU_CNTRL_MIC_CHECK_NEEDED = CO_BIT(0), RXU_CNTRL_PN_CHECK_NEEDED = CO_BIT(1), RXU_CNTRL_NEW_MESH_PEER = CO_BIT(2), RXU_CNTRL_GROUP_ADDRESSED = CO_BIT(3) } |
Bit field positions for frame_info value (struct rxu_cntrl_rx_status). More... | |
Functions | |
| static void | rxu_upload_cfm (void *env) |
| Callback function used for the confirmation of status descriptor upload. | |
| static struct rxu_stat_desc * | rxu_cntrl_desc_prepare (struct rxdesc *rxdesc, uint16_t rx_status, uint32_t host_id) |
| Prepare a RX status descriptor for upload to upper layers. | |
| __INLINE uint8_t | rxu_cntrl_machdr_len_get (uint16_t frame_cntl) |
| Compute the length of the MAC Header based on the frame control. | |
| static bool | rxu_cntrl_protected_handle (uint8_t *frame, uint32_t statinfo) |
| This function processes the received encrypted frames. | |
| static bool | rxu_cntrl_check_pn (uint64_t *pn, struct key_info_tag *key, uint8_t tid) |
| Check if the received frame is not a replayed one. | |
| static void | rxu_cntrl_remove_sec_hdr_mgmt_frame (struct rxdesc *rxdesc, struct rx_cntrl_rx_status *rx_status) |
Remove security header (if any) in management frame
| |
| static void | rxu_cntrl_mac2eth_update (struct rxdesc *rxdesc) |
| Convert the 802.11 MAC Header into a 802.3 Ethernet Header. | |
| static void | rxu_msdu_upload_and_indicate (struct rxdesc *rxdesc, uint16_t rx_status) |
| Prepare and program the upload of a MSDU to the host buffer This function first calls the MPDU to MSDU conversion procedure. | |
| static void | rxu_mpdu_upload_and_indicate (struct rxdesc *rxdesc, uint16_t rx_status) |
| Prepare and program the upload of a MPDU to the host buffer. | |
| static void | rxu_cntrl_get_da_sa (struct mac_hdr_long *machdr_ptr) |
| Extract the Destination and Source Addresses from the MAC Header IEEE 802.11 Address Field See IEEE 802.11-2012 Table 8.19. | |
| static void | rxu_cntrl_machdr_read (uint8_t *frame) |
| Extract various information from the MAC Header and put them in the RX status structure. | |
| static void | rxu_cntrl_mic_rd_concat (uint32_t mic_buffer, uint8_t mic_p1_len, uint32_t mic_p1_addr, uint32_t mic_p2_addr) |
| Concatenate two parts of MIC stored at different addresses and write the result in a buffer. | |
| static bool | rxu_cntrl_mic_compare (uint32_t *mic_value1, uint32_t *mic_value2) |
| Compare two MIC values. | |
| static void | rxu_cntrl_mic_failure (void) |
| Send a TKIP MIC failure indication to the host based on the parameter of the current packet. | |
| static bool | rxu_cntrl_mic_check (struct rxdesc *rxdesc, struct rxu_mic_calc *mic, bool first_frag, bool last_frag) |
| This function implements the MIC verification functionality used internally by the UMAC's RX module to verify the integrity of the packets components. | |
| static void | rxu_cntrl_defrag_mpdu_transfer (struct rxdesc *rxdesc, struct rxu_cntrl_defrag *defrag, uint16_t cpy_len) |
| This function programs the upload of a fragment of a fragmented MSDU that is not the first one. | |
| static struct rxu_cntrl_defrag * | rxu_cntrl_defrag_get (uint8_t sta_idx, uint16_t sn, uint8_t tid) |
| Go through the list of used reassembly structures in order to find a structure whose station index and tid are the provided values. | |
| static struct rxu_cntrl_defrag * | rxu_cntrl_defrag_alloc (void) |
| Allocate a reassembly structure from the free pool. | |
| static void | rxu_cntrl_defrag_len_update (struct rxu_cntrl_defrag *defrag) |
| This function uploads the length of a reassembled frame after all fragments have been uploaded. | |
| static void | rxu_cntrl_defrag_timeout_cb (void *env) |
| This function is called when a reassembly procedure timeout expires. | |
| static bool | rxu_cntrl_defrag_check (struct rxdesc *rxdesc, uint8_t sta_idx, bool qos) |
| Check if the received frame shall be reassembled. | |
| static bool | rxu_cntrl_duplicate_nsta_check (uint8_t *frame) |
| Duplicate filtering check for non-registered STA. | |
| static bool | rxu_cntrl_duplicate_check (uint16_t frame_cntrl, uint8_t sta_idx, uint8_t qos) |
| Duplicate filtering check for registered STA. | |
| static void | rxu_cntrl_reord_update (struct rxu_cntrl_reord *rx_reord) |
| Move the RX reordering window by one. | |
| static void | rxu_cntrl_reord_flush (struct rxu_cntrl_reord *rx_reord, uint16_t sn_skipped) |
| Flush a certain amount of positions of the RX reordering window This function indicates to the host the packets that have been flushed. | |
| static void | rxu_cntrl_reord_fwd (struct rxu_cntrl_reord *rx_reord) |
| Indicates to the host all the packets that have been unblocked by the reception of the next waited sequence number. | |
| static void | rxu_cntrl_reord_bar_check (uint8_t sta_idx, uint8_t *frame) |
| Update the reordering information accordingly with the provided BlockAck Request PDU. | |
| static bool | rxu_cntrl_reord_check (struct rxdesc *rxdesc, uint8_t sta_idx) |
Perform the reordering checks on the received frame This function may decide to:
| |
| static void | rxu_cntrl_reord_timeout_cb (void *env) |
| This function is called when the timer of a reordering structure expires. | |
| static bool | rxu_cntrl_spurious_check (uint8_t *frame, struct rxdesc *rxdesc) |
| Spurious frame check for non-registered STA. | |
| static void | rxu_cntrl_pm_mon_check (uint8_t *frame, uint32_t statinfo) |
| Check whether the received frame shall trigger the PM monitoring procedure. | |
| static bool | rxu_mgt_route_action (uint32_t *payload, uint16_t length, uint8_t sta_idx, uint8_t *vif_idx, ke_task_id_t *task_id, uint16_t machdr_length, bool *need_machdr) |
| Route the received action frame based on its type. | |
| static bool | rxu_mgt_route (uint16_t framectrl, uint16_t length, uint16_t machdr_length, uint8_t sta_idx, uint8_t *vif_idx, uint32_t *payload, ke_task_id_t *task_id, bool *need_machdr) |
| Route the received management frame based on its type. | |
| static bool | rxu_mgt_frame_ind (uint16_t framectrl, uint16_t length, uint8_t sta_idx, uint8_t *vif_idx, int8_t rssi, struct rx_pbd *pbd, uint16_t machdr_length) |
| Perform the checks on a received management frame to decide whether to upload it or forwarded to an internal kernel task. | |
| static uint8_t | rxu_mgt_search_rx_vif (struct mac_hdr *hdr, uint32_t statinfo) |
| Search to which VIF a received management frame is for. | |
| static bool | rxu_mgt_frame_check (struct rxdesc *rxdesc, uint8_t sta_idx) |
| This function processes the received frames that could carry useful information for some UMAC features (connection monitoring, power-save mode, etc. | |
| static void | rxu_cntrl_desc_init (void) |
| Initializes the list of RX IPC descriptors. | |
| static bool | rxu_upload_monitor (struct rxdesc *rxdesc, bool upload) |
| Check if the frame has to be uploaded to the driver. | |
| void | rxu_cntrl_init (void) |
| initializes the rx_context. | |
| bool | rxu_cntrl_frame_handle (struct rxdesc *rxdesc) |
| Upper MAC RX frame handler. | |
| bool | rxu_cntrl_reord_create (struct sta_info_tag *sta, uint8_t tid, uint16_t ssn) |
| Allocate and initialize a reordering structure upon a new RX BlockAck agreement creation. | |
| void | rxu_cntrl_reord_delete (struct sta_info_tag *sta, uint8_t tid) |
| Delete a reordering structure previously allocated. | |
| void | rxu_cntrl_monitor_pm (struct mac_addr *addr) |
| Start the PM bit monitoring on incoming frames for which the TA is unknown. | |
| uint8_t | rxu_cntrl_get_pm (void) |
| This function returns the PM state of the station for which the PM monitoring was started. | |
| void | rxu_cntrl_evt (int dummy) |
| This function is a kernel event handler that is triggered when new RX descriptors are pushed by the host. | |
| bool | rxu_cntrl_desc_check (void) |
| Check if a RX status descriptor is available. | |
Variables | |
| struct rxu_cntrl_env_tag | rxu_cntrl_env |
| The RX module's environment. | |
|
struct rxu_stat_desc rxu_stat_desc_pool[RX_STAT_DESC_CNT] | __RX_STAT_DESC_LOC |
| Pool of RX status structures. | |
| struct rxu_cntrl_reord | rxu_cntrl_reord_pool [RX_CNTRL_REORD_POOL_SIZE] |
| Pool of reordering structures. | |
| struct rxu_cntrl_defrag | rxu_cntrl_defrag_pool [RX_CNTRL_DEFRAG_POOL_SIZE] |
| Pool of reordering structures. | |
| struct rxu_cntrl_env_tag | rxu_cntrl_env |
| The RX module's environment. | |
| struct rxu_cntrl_reord | rxu_cntrl_reord_pool [RX_CNTRL_REORD_POOL_SIZE] |
| Pool of reordering structures. | |
| struct rxu_cntrl_defrag | rxu_cntrl_defrag_pool [RX_CNTRL_DEFRAG_POOL_SIZE] |
| Pool of Reassembly structures. | |
| struct rxu_stat_desc | rxu_stat_desc_pool [RX_STAT_DESC_CNT] |
| Pool of RX status descriptors. | |
Structure definitions and Helper function declarations of the UMAC's Rx Module.
| #define RX_FLAGS_NON_MSDU_MSK |
Bitmask indicating that a received packet is not a MSDU.
Definition at line 113 of file rxu_cntrl.h.
| enum rx_status_bits |
RX status bits uploaded in the RX IPC descriptor.
Definition at line 82 of file rxu_cntrl.h.
Bit field positions for frame_info value (struct rxu_cntrl_rx_status).
Definition at line 133 of file rxu_cntrl.h.
| static bool rxu_cntrl_check_pn | ( | uint64_t * | pn, | |
| struct key_info_tag * | key, | |||
| uint8_t | tid | |||
| ) | [static] |
Check if the received frame is not a replayed one.
| [in] | pn | Packet number of the frame |
| [in] | key | Key structure attached to the frame |
| [in] | tid | TID of the frame |
Definition at line 345 of file rxu_cntrl.c.
References key_info_tag::rx_pn.
Referenced by rxu_cntrl_reord_check(), rxu_cntrl_reord_flush(), and rxu_cntrl_reord_fwd().
| static struct rxu_cntrl_defrag* rxu_cntrl_defrag_alloc | ( | void | ) | [static, read] |
Allocate a reassembly structure from the free pool.
If no structure is available it gets the oldest one from the used pool. In such case the oldest MSDU pending for reassembly is deleted.
Definition at line 1076 of file rxu_cntrl.c.
References ASSERT_ERR, co_list_pop_front(), rxu_cntrl_defrag::host_id, RX_STAT_DELETE, rxu_cntrl_desc_prepare(), rxu_cntrl_env, rxu_cntrl_env_tag::rxu_defrag_free, and rxu_cntrl_env_tag::rxu_defrag_used.
Referenced by rxu_cntrl_defrag_check().
| static bool rxu_cntrl_defrag_check | ( | struct rxdesc * | rxdesc, | |
| uint8_t | sta_idx, | |||
| bool | qos | |||
| ) | [static] |
Check if the received frame shall be reassembled.
If not it is uploaded and indicated to the host immediately.
| [in] | rxdesc | RX descriptor attached to the received frame |
| [in] | sta_idx | Index of the transmitter station |
| [in] | qos | Flag indicating whether the frame is a QoS one or not |
Definition at line 1158 of file rxu_cntrl.c.
References co_list_extract(), co_list_push_back(), rx_cntrl_rx_status::frame_cntl, rx_hd::frmlen, hal_machw_time(), rx_dmadesc::hd, rxu_cntrl_env_tag::hostid_current, MAC_FCTRL_MOREFRAG, MIC_LEN, mm_timer_clear(), mm_timer_set(), PROF_DEFRAG_CHECK_CLR, PROF_DEFRAG_CHECK_SET, RX_CNTRL_DEFRAG_MAX_WAIT, RX_STAT_ALLOC, RX_STAT_DELETE, RX_STAT_FORWARD, rxu_cntrl_env_tag::rx_status, rxl_dmadesc_get(), rxu_cntrl_defrag_alloc(), rxu_cntrl_defrag_get(), rxu_cntrl_defrag_len_update(), rxu_cntrl_defrag_mpdu_transfer(), rxu_cntrl_defrag_timeout_cb(), rxu_cntrl_desc_prepare(), rxu_cntrl_env, rxu_cntrl_mic_check(), RXU_CNTRL_MIC_CHECK_NEEDED, rxu_cntrl_env_tag::rxu_defrag_free, rxu_cntrl_env_tag::rxu_defrag_used, rxu_msdu_upload_and_indicate(), rx_cntrl_rx_status::sn, rx_cntrl_rx_status::tid, and rxu_cntrl_defrag::tid.
| static struct rxu_cntrl_defrag* rxu_cntrl_defrag_get | ( | uint8_t | sta_idx, | |
| uint16_t | sn, | |||
| uint8_t | tid | |||
| ) | [static, read] |
Go through the list of used reassembly structures in order to find a structure whose station index and tid are the provided values.
| [in] | sta_idx | Index of the transmitter station |
| [in] | sn | Sequence number of the received frame |
| [in] | tid | TID of the frame |
Definition at line 1044 of file rxu_cntrl.c.
References co_list_pick(), rxu_cntrl_defrag::list_hdr, co_list_hdr::next, rxu_cntrl_env, rxu_cntrl_env_tag::rxu_defrag_used, rxu_cntrl_defrag::sn, rxu_cntrl_defrag::sta_idx, and rxu_cntrl_defrag::tid.
Referenced by rxu_cntrl_defrag_check().
| static void rxu_cntrl_defrag_len_update | ( | struct rxu_cntrl_defrag * | defrag | ) | [static] |
This function uploads the length of a reassembled frame after all fragments have been uploaded.
| [in] | defrag | Pointer to the reassembly structure |
Definition at line 1106 of file rxu_cntrl.c.
References rxu_cntrl_defrag::eth_len_present, rxu_cntrl_defrag::frame_len, rxu_stat_val::frame_len, rxu_cntrl_defrag::host_id, PROF_DEFRAG_UPD_LENGTH_CLR, PROF_DEFRAG_UPD_LENGTH_SET, RX_STAT_ETH_LEN_UPDATE, RX_STAT_LEN_UPDATE, rxu_cntrl_desc_prepare(), and rxu_stat_desc::val.
Referenced by rxu_cntrl_defrag_check().
| static void rxu_cntrl_defrag_mpdu_transfer | ( | struct rxdesc * | rxdesc, | |
| struct rxu_cntrl_defrag * | defrag, | |||
| uint16_t | cpy_len | |||
| ) | [static] |
This function programs the upload of a fragment of a fragmented MSDU that is not the first one.
| [in] | rxdesc | RX descriptor attached to the received fragment |
| [in] | defrag | Pointer to the defragmentation structure |
| [in] | cpy_len | Length to be uploaded |
Definition at line 1016 of file rxu_cntrl.c.
References rxu_cntrl_defrag::dma_addr, rxu_cntrl_defrag::mac_hdr_len, PROF_DEFRAG_TRANSFER_CLR, PROF_DEFRAG_TRANSFER_SET, and rxl_mpdu_partial_transfer().
Referenced by rxu_cntrl_defrag_check().
| static void rxu_cntrl_defrag_timeout_cb | ( | void * | env | ) | [static] |
This function is called when a reassembly procedure timeout expires.
It deletes the MSDU pointed by the reassembly structure.
| [in] | env | Pointer to the reassembly structure |
Definition at line 1131 of file rxu_cntrl.c.
References co_list_extract(), co_list_push_back(), rxu_cntrl_defrag::host_id, rxu_cntrl_defrag::list_hdr, macif_rx_desc_upload(), RX_STAT_DELETE, rxu_cntrl_env_tag::rxdesc_ready, rxu_cntrl_desc_prepare(), rxu_cntrl_env, rxu_cntrl_env_tag::rxu_defrag_free, and rxu_cntrl_env_tag::rxu_defrag_used.
Referenced by rxu_cntrl_defrag_check().
| bool rxu_cntrl_desc_check | ( | void | ) |
Check if a RX status descriptor is available.
| static void rxu_cntrl_desc_init | ( | void | ) | [static] |
Initializes the list of RX IPC descriptors.
Definition at line 2384 of file rxu_cntrl.c.
References rx_upload_cntrl_tag::cb, CPU2HW, dma_desc::ctrl, rxu_stat_desc::dma_desc, rx_upload_cntrl_tag::env, rx_upload_cntrl_tag::flags, dma_desc::length, RX_LLICTRL, RX_STAT_DESC_CNT, rxu_stat_desc_pool, rxu_upload_cfm(), dma_desc::src, rxu_stat_val::status, rxu_stat_desc::upload_cntrl, and rxu_stat_desc::val.
| static struct rxu_stat_desc* rxu_cntrl_desc_prepare | ( | struct rxdesc * | rxdesc, | |
| uint16_t | rx_status, | |||
| uint32_t | host_id | |||
| ) | [static, read] |
Prepare a RX status descriptor for upload to upper layers.
| [in] | rxdesc | Pointer to the RX descriptor of the frame |
| [in] | rx_status | Status to be put in the uploaded descriptor |
| [in] | host_id | Host Id of the buffer for which the descriptor is uploaded |
Definition at line 160 of file rxu_cntrl.c.
References ASSERT_REC_VAL, rx_upload_cntrl_tag::cb, co_list_push_back(), rx_upload_cntrl_tag::env, rxu_stat_val::host_id, rx_upload_cntrl_tag::list_hdr, PROF_IPCDESC_PREPARE_CLR, PROF_IPCDESC_PREPARE_SET, RX_STAT_DESC_CNT, rx_upload_cntrl_tag::rxdesc, rxu_cntrl_env_tag::rxdesc_idx, rxu_cntrl_env_tag::rxdesc_ready, rxu_cntrl_env, rxu_stat_desc_pool, rxu_upload_cfm(), rxu_stat_val::status, rxu_stat_desc::upload_cntrl, rxdesc::upload_cntrl, and rxu_stat_desc::val.
Referenced by rxu_cntrl_defrag_alloc(), rxu_cntrl_defrag_check(), rxu_cntrl_defrag_len_update(), rxu_cntrl_defrag_timeout_cb(), rxu_cntrl_reord_flush(), rxu_cntrl_reord_fwd(), rxu_mpdu_upload_and_indicate(), and rxu_msdu_upload_and_indicate().
| static bool rxu_cntrl_duplicate_check | ( | uint16_t | frame_cntrl, | |
| uint8_t | sta_idx, | |||
| uint8_t | qos | |||
| ) | [static] |
Duplicate filtering check for registered STA.
Check if the received packet is the same than the previous received one and discard if required.
| [in] | frame_cntrl | Frame control field of the received frame |
| [in] | sta_idx | Index of the transmitter STA |
| [in] | qos | Flag indicating whether the frame is a QoS one or not |
Definition at line 1359 of file rxu_cntrl.c.
References MAC_FCTRL_RETRY, PROF_RX_DUPLI_CHECK_CLR, PROF_RX_DUPLI_CHECK_SET, sta_info_tag::rx_nqos_last_seqcntl, sta_info_tag::rx_qos_last_seqcntl, rxu_cntrl_env_tag::rx_status, rxu_cntrl_env, rx_cntrl_rx_status::seq_cntl, sta_info_tab, and rx_cntrl_rx_status::tid.
Referenced by rxu_cntrl_reord_check().
| static bool rxu_cntrl_duplicate_nsta_check | ( | uint8_t * | frame | ) | [static] |
Duplicate filtering check for non-registered STA.
Check if the received packet is the same than the previous received one and discard if required.
| [in] | frame | Pointer to the received frame |
Definition at line 1314 of file rxu_cntrl.c.
References mac_hdr::addr2, mac_hdr::fctl, rx_cntrl_dupli::last_seq_cntl, rx_cntrl_dupli::last_src_addr, MAC_FCTRL_RETRY, PROF_RX_DUPLI_NSTA_CHECK_CLR, PROF_RX_DUPLI_NSTA_CHECK_SET, rxu_cntrl_env, rxu_cntrl_env_tag::rxu_dupli, and mac_hdr::seq.
| void rxu_cntrl_evt | ( | int | dummy | ) |
This function is a kernel event handler that is triggered when new RX descriptors are pushed by the host.
This event is triggered only in case no more descriptors were available and the RX handling was therefore stopped.
| [in] | dummy | Parameter not used but required to follow the kernel event callback format |
| bool rxu_cntrl_frame_handle | ( | struct rxdesc * | rxdesc | ) |
Upper MAC RX frame handler.
This function is responsible for executing the different procedures required upon a frame reception (reassembly, reordering, duplicate filtering, management frame routing , MAC to ethernet header conversion, etc.).
| [in] | rxdesc | Pointer to the current RX descriptor |
| static void rxu_cntrl_get_da_sa | ( | struct mac_hdr_long * | machdr_ptr | ) | [static] |
Extract the Destination and Source Addresses from the MAC Header IEEE 802.11 Address Field See IEEE 802.11-2012 Table 8.19.
| ToDS | FromDS | Addr1 | Addr2 | Addr3 | Addr4 | |:----:|:------:|:-----:|:-----:|:-----:|:-----:| | 0 | 0 | DA | SA | BSSID | n/a | | 0 | 1 | DA | BSSID | SA | n/a | | 1 | 0 | BSSID | SA | DA | n/a | | 1 | 1 | RA | TA | DA | SA |
The function fills the corresponding fields in the RX status structure
| [in] | machdr_ptr | Pointer to the MAC Header |
Definition at line 671 of file rxu_cntrl.c.
References mac_hdr_long::addr1, mac_hdr_long::addr2, mac_hdr_long::addr3, mac_hdr_long::addr4, rx_cntrl_rx_status::da, mac_hdr_long::fctl, MAC_ADDR_CPY, MAC_FCTRL_FROMDS, MAC_FCTRL_TODS, rxu_cntrl_env_tag::rx_status, rxu_cntrl_env, and rx_cntrl_rx_status::sa.
Referenced by rxu_cntrl_machdr_read().
| uint8_t rxu_cntrl_get_pm | ( | void | ) |
This function returns the PM state of the station for which the PM monitoring was started.
If no packets were received from this device, then the station is considered as active.
Referenced by me_sta_add_req_handler().
| void rxu_cntrl_init | ( | void | ) |
initializes the rx_context.
This function is called when initializing the UMAC's Rx Context at system start up or at system reset
| static void rxu_cntrl_mac2eth_update | ( | struct rxdesc * | rxdesc | ) | [static] |
Convert the 802.11 MAC Header into a 802.3 Ethernet Header.
| [in] | rxdesc | RX descriptor attached to the frame |
Definition at line 402 of file rxu_cntrl.c.
References co_htons(), rx_cntrl_rx_status::da, mac_eth_hdr::da, rx_pbd::datastartptr, rx_cntrl_rx_status::dst_idx, rx_cntrl_rx_status::eth_len_present, mac_hdr::fctl, rx_hd::first_pbd_ptr, rx_dmadesc::flags, rx_hd::frmlen, rx_dmadesc::hd, HW2CPU, INVALID_STA_IDX, INVALID_VIF_IDX, mac_eth_hdr::len, llc_bridge_tunnel_hdr, llc_rfc1042_hdr, MAC_ADDR_CPY, MAC_FCTRL_TODS_FROMDS, MAC_QOSCTRL_AMSDU_PRESENT, MAC_QOSCTRL_UP_MSK, MAC_QOSCTRL_UP_OFT, rx_cntrl_rx_status::machdr_len, rx_cntrl_rx_status::mesh_ctrl_len, vif_mgmt_env_tag::monitor_vif, rx_cntrl_rx_status::payl_offset, rx_payloaddesc::pbd, llc_snap::proto_id, mac_hdr_qos::qos, mac_hdr_long_qos::qos, RX_FLAGS_IS_AMSDU_BIT, RX_FLAGS_USER_PRIO_INDEX_MSK, RX_FLAGS_USER_PRIO_INDEX_OFT, rxu_cntrl_env_tag::rx_status, RXL_CNTRL_IS_QOS_DATA, rxl_dmadesc_get(), rxu_cntrl_env, rx_cntrl_rx_status::sa, mac_eth_hdr::sa, sizeof_b, vif_info_tag::type, rx_cntrl_rx_status::vif_idx, vif_info_tab, VIF_MESH_POINT, and vif_mgmt_env.
Referenced by rxu_msdu_upload_and_indicate().
| __INLINE uint8_t rxu_cntrl_machdr_len_get | ( | uint16_t | frame_cntl | ) |
Compute the length of the MAC Header based on the frame control.
| [in] | frame_cntl | Frame control of the packet |
Definition at line 211 of file rxu_cntrl.c.
References MAC_FCTRL_FROMDS, MAC_FCTRL_ORDER, MAC_FCTRL_TODS, MAC_LONG_MAC_HDR_LEN, MAC_LONG_QOS_HTC_MAC_HDR_LEN, MAC_LONG_QOS_MAC_HDR_LEN, MAC_SHORT_MAC_HDR_LEN, and RXL_CNTRL_IS_QOS_DATA.
Referenced by rxu_cntrl_machdr_read(), and rxu_cntrl_remove_sec_hdr_mgmt_frame().
| static void rxu_cntrl_machdr_read | ( | uint8_t * | frame | ) | [static] |
Extract various information from the MAC Header and put them in the RX status structure.
| [in] | frame | Pointer to the frame |
Definition at line 709 of file rxu_cntrl.c.
References rx_cntrl_rx_status::a_qos_ctrl, mac_hdr::addr1, CPU2HW, mac_hdr::fctl, rx_cntrl_rx_status::fn, rx_cntrl_rx_status::frame_cntl, rx_cntrl_rx_status::frame_info, MAC_ADDR_GROUP, MAC_FCTRL_QOS_DATA, MAC_FCTRL_TODS_FROMDS, MAC_QOSCTRL_UP_MSK, MAC_SEQCTRL_FRAG_MSK, MAC_SEQCTRL_NUM_OFT, rx_cntrl_rx_status::machdr_len, rxu_cntrl_env_tag::rx_status, rxu_cntrl_env, rxu_cntrl_get_da_sa(), RXU_CNTRL_GROUP_ADDRESSED, rxu_cntrl_machdr_len_get(), mac_hdr::seq, rx_cntrl_rx_status::seq_cntl, rx_cntrl_rx_status::sn, and rx_cntrl_rx_status::tid.
| static bool rxu_cntrl_mic_check | ( | struct rxdesc * | rxdesc, | |
| struct rxu_mic_calc * | mic, | |||
| bool | first_frag, | |||
| bool | last_frag | |||
| ) | [static] |
This function implements the MIC verification functionality used internally by the UMAC's RX module to verify the integrity of the packets components.
| [in] | rxdesc | RX descriptor attached to the received frame |
| [in] | mic | Pointer to the MIC computation structure |
| [in] | first_frag | Flag indicating whether the frame is first fragment or not |
| [in] | last_frag | Flag indicating whether the frame is the last fragment or not |
Received MIC
Definition at line 832 of file rxu_cntrl.c.
References ASSERT_REC_VAL, co_copy8p(), CPU2HW, rx_cntrl_rx_status::da, rx_pbd::dataendptr, rx_pbd::datastartptr, rx_hd::first_pbd_ptr, rx_hd::frmlen, rx_dmadesc::hd, HW2CPU, rx_cntrl_rx_status::key, rxu_mic_calc::last_bytes, rx_cntrl_rx_status::machdr_len, me_mic_calc(), me_mic_end(), me_mic_init(), rxu_mic_calc::mic_calc, MIC_LEN, rx_pbd::next, rx_payloaddesc::pbd, rxu_cntrl_env_tag::rx_status, rxl_dmadesc_get(), rxu_cntrl_env, rxu_cntrl_mic_compare(), rxu_cntrl_mic_failure(), rxu_cntrl_mic_rd_concat(), rx_cntrl_rx_status::sa, rx_cntrl_rx_status::tid, and key_info_tag::u.
Referenced by rxu_cntrl_defrag_check().
| static bool rxu_cntrl_mic_compare | ( | uint32_t * | mic_value1, | |
| uint32_t * | mic_value2 | |||
| ) | [static] |
Compare two MIC values.
| [in] | mic_value1 | |
| [in] | mic_value2 |
Definition at line 789 of file rxu_cntrl.c.
Referenced by rxu_cntrl_mic_check().
| static void rxu_cntrl_mic_rd_concat | ( | uint32_t | mic_buffer, | |
| uint8_t | mic_p1_len, | |||
| uint32_t | mic_p1_addr, | |||
| uint32_t | mic_p2_addr | |||
| ) | [static] |
Concatenate two parts of MIC stored at different addresses and write the result in a buffer.
| [in] | mic_buffer | |
| [in] | mic_p1_len | |
| [in] | mic_p1_addr | |
| [in] | mic_p2_addr |
Definition at line 768 of file rxu_cntrl.c.
References co_copy8p(), and MIC_LEN.
Referenced by rxu_cntrl_mic_check().
| void rxu_cntrl_monitor_pm | ( | struct mac_addr * | addr | ) |
Start the PM bit monitoring on incoming frames for which the TA is unknown.
The monitoring has to be started when the association response has been transmitted, and will end up when the upper layers have added the new STA to the FW.
| [in] | addr | Pointer to the MAC address that we need to monitor. |
Referenced by txl_payload_handle().
| static void rxu_cntrl_pm_mon_check | ( | uint8_t * | frame, | |
| uint32_t | statinfo | |||
| ) | [static] |
Check whether the received frame shall trigger the PM monitoring procedure.
If the received frame corresponds to the expected one, then the PM state of the transmitter is stored.
| [in] | frame | Pointer to the received frame |
| [in] | statinfo | Status information about the received frame as given by the MAC HW |
Definition at line 1788 of file rxu_cntrl.c.
References rx_cntrl_pm_mon::addr, mac_hdr::addr2, mac_hdr::fctl, MAC_ADDR_CMP, MAC_FCTRL_MOREFRAG, MAC_FCTRL_PWRMGT, rx_cntrl_pm_mon::mon, rxu_cntrl_env_tag::pm_mon, rx_cntrl_pm_mon::pm_state, PS_MODE_OFF, PS_MODE_ON, RX_HD_ADDRMIS, and rxu_cntrl_env.
| static bool rxu_cntrl_protected_handle | ( | uint8_t * | frame, | |
| uint32_t | statinfo | |||
| ) | [static] |
This function processes the received encrypted frames.
| [in] | frame | Pointer to the frame |
| [in] | statinfo | Status information field set by the MAC HW |
Definition at line 248 of file rxu_cntrl.c.
References key_info_tag::cipher, CPU2HW, EIV_LEN, rx_cntrl_rx_status::frame_info, HW2CPU, IV_LEN, rx_cntrl_rx_status::key, sta_mgmt_sec_info::key_info, vif_info_tag::key_info, MAC_CIPHER_WPI_SMS4, rx_cntrl_rx_status::machdr_len, rx_cntrl_rx_status::pn, RX_HD_DECR_CCMP128_SUCCESS, RX_HD_DECR_TKIP_SUCCESS, RX_HD_DECR_WEP_SUCCESS, RX_HD_DECRSTATUS, RX_HD_GA_FRAME, rxu_cntrl_env_tag::rx_status, rxu_cntrl_env, RXU_CNTRL_MIC_CHECK_NEEDED, RXU_CNTRL_PN_CHECK_NEEDED, rx_cntrl_rx_status::sta_idx, sta_info_tab, sta_info_tag::sta_sec_info, rx_cntrl_rx_status::vif_idx, vif_info_tab, and WPI_IV_LEN.
| static void rxu_cntrl_remove_sec_hdr_mgmt_frame | ( | struct rxdesc * | rxdesc, | |
| struct rx_cntrl_rx_status * | rx_status | |||
| ) | [static] |
Remove security header (if any) in management frame
| [in] | rxdesc | RX descriptor attached to the frame |
| [out] | rx_status | Pointer to the status structure of the frame |
Definition at line 366 of file rxu_cntrl.c.
References ASSERT_WARN, rx_pbd::datastartptr, mac_hdr::fctl, rx_hd::first_pbd_ptr, rx_hd::frmlen, rx_dmadesc::hd, HW2CPU, rx_cntrl_rx_status::machdr_len, rx_cntrl_rx_status::payl_offset, rx_payloaddesc::pbd, rxl_dmadesc_get(), and rxu_cntrl_machdr_len_get().
Referenced by rxu_mpdu_upload_and_indicate().
| static void rxu_cntrl_reord_bar_check | ( | uint8_t | sta_idx, | |
| uint8_t * | frame | |||
| ) | [static] |
Update the reordering information accordingly with the provided BlockAck Request PDU.
| [in] | sta_idx | Index of the transmitter station |
| [in] | frame | Pointer to the received frame |
Definition at line 1511 of file rxu_cntrl.c.
References sta_info_tag::ba_agmts_rx, bar_frame::bar_cntrl, bar_frame::bar_information, MAC_SEQCTRL_NUM_MAX, MAC_SEQCTRL_NUM_OFT, macif_rx_desc_upload(), PROF_REORD_BAR_CHECK_CLR, PROF_REORD_BAR_CHECK_SET, rxu_cntrl_env_tag::rxdesc_ready, rxu_cntrl_env, rxu_cntrl_reord_flush(), sta_info_tab, and rxu_cntrl_reord::win_start.
| static bool rxu_cntrl_reord_check | ( | struct rxdesc * | rxdesc, | |
| uint8_t | sta_idx | |||
| ) | [static] |
Perform the reordering checks on the received frame This function may decide to:
The RX window is updated according to the previous actions.
| [in] | rxdesc | RX descriptor attached to the received frame |
| [in] | sta_idx | Index of the transmitter station |
Definition at line 1569 of file rxu_cntrl.c.
References rxu_cntrl_reord::active, sta_info_tag::ba_agmts_rx, bam_rx_active(), rxu_cntrl_reord::elt, rx_cntrl_rx_status::frame_cntl, rx_cntrl_rx_status::frame_info, hal_machw_time(), rxu_cntrl_reord_elt::host_id, rxu_cntrl_env_tag::hostid_current, rxu_cntrl_reord::key, rx_cntrl_rx_status::key, MAC_SEQCTRL_NUM_MAX, rxu_cntrl_reord::ooo_pkt_cnt, rxu_cntrl_reord_elt::pn, rx_cntrl_rx_status::pn, rxu_cntrl_reord_elt::pn_check, PROF_REORD_CHECK_CLR, PROF_REORD_CHECK_SET, RX_CNTRL_REORD_WIN_SIZE, RX_STAT_ALLOC, RX_STAT_FORWARD, rxu_cntrl_env_tag::rx_status, rxu_cntrl_reord::rx_status_pos, rxu_cntrl_check_pn(), rxu_cntrl_duplicate_check(), rxu_cntrl_env, RXU_CNTRL_PN_CHECK_NEEDED, rxu_cntrl_reord_flush(), rxu_cntrl_reord_fwd(), rxu_cntrl_reord_update(), rxu_msdu_upload_and_indicate(), rx_cntrl_rx_status::sn, rxu_cntrl_reord::sn_rx_time, sta_info_tab, rx_cntrl_rx_status::tid, and rxu_cntrl_reord::win_start.
| bool rxu_cntrl_reord_create | ( | struct sta_info_tag * | sta, | |
| uint8_t | tid, | |||
| uint16_t | ssn | |||
| ) |
Allocate and initialize a reordering structure upon a new RX BlockAck agreement creation.
| [in] | sta | Pointer to the STA entry involved in this agreement |
| [in] | tid | TID of the agreement |
| [in] | ssn | Sequence number which the block ack window has to be initialized with |
Referenced by mm_ba_add_req_handler().
| void rxu_cntrl_reord_delete | ( | struct sta_info_tag * | sta, | |
| uint8_t | tid | |||
| ) |
Delete a reordering structure previously allocated.
| [in] | sta | Pointer to the STA entry involved in this agreement |
| [in] | tid | TID of the agreement |
Referenced by mm_ba_del_req_handler().
| static void rxu_cntrl_reord_flush | ( | struct rxu_cntrl_reord * | rx_reord, | |
| uint16_t | sn_skipped | |||
| ) | [static] |
Flush a certain amount of positions of the RX reordering window This function indicates to the host the packets that have been flushed.
| [in,out] | rx_reord | Pointer to the reordering structure |
| [in] | sn_skipped | Number of RX reordering window positions to be flushed |
Definition at line 1422 of file rxu_cntrl.c.
References ASSERT_ERR, rxu_cntrl_reord::elt, rxu_cntrl_reord_elt::host_id, rxu_cntrl_reord::key, MAC_SEQCTRL_NUM_MAX, rxu_cntrl_reord::ooo_pkt_cnt, rxu_cntrl_reord_elt::pn, rxu_cntrl_reord_elt::pn_check, PROF_REORD_FLUSH_CLR, PROF_REORD_FLUSH_SET, RX_CNTRL_REORD_WIN_SIZE, RX_STAT_DELETE, RX_STAT_FORWARD, rxu_cntrl_reord::rx_status_pos, rxu_cntrl_check_pn(), rxu_cntrl_desc_prepare(), rxu_cntrl_reord::tid, and rxu_cntrl_reord::win_start.
Referenced by rxu_cntrl_reord_bar_check(), and rxu_cntrl_reord_check().
| static void rxu_cntrl_reord_fwd | ( | struct rxu_cntrl_reord * | rx_reord | ) | [static] |
Indicates to the host all the packets that have been unblocked by the reception of the next waited sequence number.
| [in,out] | rx_reord | Pointer to the reordering structure |
Definition at line 1466 of file rxu_cntrl.c.
References ASSERT_ERR, rxu_cntrl_reord::elt, rxu_cntrl_reord_elt::host_id, rxu_cntrl_reord::key, rxu_cntrl_reord::ooo_pkt_cnt, rxu_cntrl_reord_elt::pn, rxu_cntrl_reord_elt::pn_check, PROF_REORD_FWD_CLR, PROF_REORD_FWD_SET, RX_STAT_DELETE, RX_STAT_FORWARD, rxu_cntrl_reord::rx_status_pos, rxu_cntrl_check_pn(), rxu_cntrl_desc_prepare(), rxu_cntrl_reord_update(), and rxu_cntrl_reord::tid.
Referenced by rxu_cntrl_reord_check(), and rxu_cntrl_reord_timeout_cb().
| static void rxu_cntrl_reord_timeout_cb | ( | void * | env | ) | [static] |
This function is called when the timer of a reordering structure expires.
It checks whether we are waiting for too long for the next expected SN. In such case the packet is considered lost and the reordering window is updated accordingly.
| [in] | env | Pointer to the reordering structure |
Definition at line 1708 of file rxu_cntrl.c.
References co_list_pick(), rxu_cntrl_reord::elt, hal_machw_time_past(), rxu_cntrl_reord_elt::host_id, ke_time(), macif_rx_desc_upload(), mm_timer_set(), rxu_cntrl_reord::ooo_pkt_cnt, RX_CNTRL_REORD_MAX_WAIT, rxu_cntrl_reord::rx_status_pos, rxu_cntrl_env_tag::rxdesc_ready, rxu_cntrl_env, rxu_cntrl_reord_fwd(), rxu_cntrl_reord_update(), rxu_cntrl_reord::sn_rx_time, and rxu_cntrl_reord::timer.
| static void rxu_cntrl_reord_update | ( | struct rxu_cntrl_reord * | rx_reord | ) | [static] |
Move the RX reordering window by one.
| [in,out] | rx_reord | Pointer to the reordering structure |
Definition at line 1405 of file rxu_cntrl.c.
References rxu_cntrl_reord::elt, rxu_cntrl_reord_elt::host_id, MAC_SEQCTRL_NUM_MAX, RX_CNTRL_REORD_WIN_SIZE, rxu_cntrl_reord::rx_status_pos, and rxu_cntrl_reord::win_start.
Referenced by rxu_cntrl_reord_check(), rxu_cntrl_reord_fwd(), and rxu_cntrl_reord_timeout_cb().
| static bool rxu_cntrl_spurious_check | ( | uint8_t * | frame, | |
| struct rxdesc * | rxdesc | |||
| ) | [static] |
Spurious frame check for non-registered STA.
If Class2/Class3 frame is received on AP interface from non authenticated/associated STA, report frame to upper layer. In all other cases ignore the frame.
| [in] | frame | Pointer to the received frame |
| [in,out] | rxdesc | Pointer to the RX descriptor of the frame |
Definition at line 1757 of file rxu_cntrl.c.
References vif_info_tag::active, mac_hdr::addr1, vif_info_tag::index, vif_info_tag::mac_addr, MAC_ADDR_CMP_PACKED, NX_VIRT_DEV_MAX, RX_STAT_SPURIOUS, rxu_cntrl_env_tag::rx_status, rxu_cntrl_env, rxu_mpdu_upload_and_indicate(), vif_info_tag::type, VIF_AP, rx_cntrl_rx_status::vif_idx, and vif_info_tab.
| static bool rxu_mgt_frame_check | ( | struct rxdesc * | rxdesc, | |
| uint8_t | sta_idx | |||
| ) | [static] |
This function processes the received frames that could carry useful information for some UMAC features (connection monitoring, power-save mode, etc.
)
| [in] | rxdesc | SW header descriptor of the frame |
| [in] | sta_idx | Index of the transmitting station if known, INVALID_STA_IDX otherwise |
Definition at line 2322 of file rxu_cntrl.c.
References mac_hdr::addr1, rx_pbd::datastartptr, mac_hdr::fctl, rx_hd::first_pbd_ptr, rx_hd::frmlen, hal_desc_get_rssi(), rx_dmadesc::hd, HW2CPU, INVALID_STA_IDX, INVALID_VIF_IDX, vif_info_tag::mac_addr, MAC_ADDR_CMP, MAC_ADDR_GROUP, MAC_FCTRL_MOREFRAG, MAC_SEQCTRL_FRAG_MSK, rx_cntrl_rx_status::machdr_len, mfp_ignore_mgmt_frame(), vif_mgmt_env_tag::monitor_vif, rx_payloaddesc::pbd, RX_STAT_ALLOC, RX_STAT_FORWARD, rxu_cntrl_env_tag::rx_status, rx_hd::rx_vec_1, rxl_dmadesc_get(), rxu_cntrl_env, rxu_mgt_frame_ind(), rxu_mgt_search_rx_vif(), rxu_mpdu_upload_and_indicate(), mac_hdr::seq, rx_hd::statinfo, rx_cntrl_rx_status::vif_idx, vif_info_tab, and vif_mgmt_env.
| static bool rxu_mgt_frame_ind | ( | uint16_t | framectrl, | |
| uint16_t | length, | |||
| uint8_t | sta_idx, | |||
| uint8_t * | vif_idx, | |||
| int8_t | rssi, | |||
| struct rx_pbd * | pbd, | |||
| uint16_t | machdr_length | |||
| ) | [static] |
Perform the checks on a received management frame to decide whether to upload it or forwarded to an internal kernel task.
| [in] | framectrl | Frame control of the received frame. |
| [in] | length | Length of the received frame. |
| [in] | sta_idx | Index of the station that transmitted the received frame. |
| [in,out] | vif_idx | VIF that received the frame. |
| [in] | rssi | RSSI of the received frame. |
| [in] | pbd | Pointer to the payload of the received frame. |
| [in] | machdr_length | Length of the MAC Header. |
Definition at line 2218 of file rxu_cntrl.c.
References ASSERT_WARN, rxu_mgt_ind::band, rxu_mgt_ind::center_freq, rx_pbd::datastartptr, rxu_mgt_ind::framectrl, HW2CPU, phy_channel_info::info1, rxu_mgt_ind::inst_nbr, KE_MSG_ALLOC_VAR, ke_msg_send(), rxu_mgt_ind::length, rxu_mgt_ind::payload, phy_get_channel(), PHY_PRIM, rxu_mgt_ind::rssi, rxl_mpdu_copy(), RXU_MGT_IND, rxu_mgt_route(), rxu_mgt_ind::sta_idx, and TASK_RXU.
Referenced by rxu_mgt_frame_check().
| static bool rxu_mgt_route | ( | uint16_t | framectrl, | |
| uint16_t | length, | |||
| uint16_t | machdr_length, | |||
| uint8_t | sta_idx, | |||
| uint8_t * | vif_idx, | |||
| uint32_t * | payload, | |||
| ke_task_id_t * | task_id, | |||
| bool * | need_machdr | |||
| ) | [static] |
Route the received management frame based on its type.
| [in] | framectrl | Frame control of the received frame. |
| [in] | length | Length of the received frame. |
| [in] | machdr_length | Length of the MAC Header. |
| [in] | sta_idx | Index of the station that transmitted the received frame. |
| [in,out] | vif_idx | VIF that received the frame. |
| [in] | payload | Pointer to the payload of the received frame. |
| [out] | task_id | Kernel task to which the frame shall be forwarded. |
| [out] | need_machdr | Flag indicating whether the MAC Header is needed for subsequent processes. |
Definition at line 2056 of file rxu_cntrl.c.
References vif_info_tag::active, mac_hdr::addr2, CPU2HW, rx_cntrl_rx_status::frame_info, INVALID_STA_IDX, INVALID_VIF_IDX, ke_state_get(), MAC_BEACON_VARIABLE_PART_OFT, MAC_FCTRL_ACTION, MAC_FCTRL_ASSOCRSP, MAC_FCTRL_AUTHENT, MAC_FCTRL_BEACON, MAC_FCTRL_DEAUTHENT, MAC_FCTRL_DISASSOC, MAC_FCTRL_PROBERSP, MAC_FCTRL_REASSOCRSP, MAC_FCTRL_TYPESUBTYPE_MASK, me_beacon_check(), vif_info_tag::mvif_idx, scanu_env_tag::param, rxu_cntrl_env_tag::rx_status, rxu_cntrl_env, RXU_CNTRL_NEW_MESH_PEER, rxu_mgt_route_action(), scanu_env, SCANU_SCANNING, sm_external_auth_in_progress(), TASK_MESH, TASK_SCANU, TASK_SM, vif_info_tag::type, scanu_start_req::vif_idx, vif_info_tab, VIF_STA, and VIF_UNKNOWN.
Referenced by rxu_mgt_frame_ind().
| static bool rxu_mgt_route_action | ( | uint32_t * | payload, | |
| uint16_t | length, | |||
| uint8_t | sta_idx, | |||
| uint8_t * | vif_idx, | |||
| ke_task_id_t * | task_id, | |||
| uint16_t | machdr_length, | |||
| bool * | need_machdr | |||
| ) | [static] |
Route the received action frame based on its type.
| [in] | payload | Pointer to the payload of the received frame. |
| [in] | length | Length of the received frame. |
| [in] | sta_idx | Index of the station that transmitted the received frame. |
| [in,out] | vif_idx | VIF that received the frame. |
| [out] | task_id | Kernel task to which the frame shall be forwarded. |
| [in] | machdr_length | Length of the MAC Header. |
| [out] | need_machdr | Flag indicating whether the MAC Header is needed for subsequent processes. |
Definition at line 1834 of file rxu_cntrl.c.
References ASSERT_ERR, BW_40MHZ, co_read8p(), CPU2HW, INVALID_STA_IDX, INVALID_VIF_IDX, KE_BUILD_ID, MAC_ACTION_ACTION_OFT, MAC_ACTION_CATEGORY_OFT, MAC_BA_ACTION_CATEGORY, MAC_CHAN_WIDTH_HT_ACTION, MAC_CHAN_WIDTH_WIDTH_OFT, MAC_GROUP_ID_MGMT_VHT_ACTION, MAC_GROUP_ID_MGT_MEMBERSHIP_OFT, MAC_GROUP_ID_MGT_USER_POS_OFT, MAC_HT_ACTION_CATEGORY, MAC_MESH_ACTION_CATEGORY, MAC_OP_MODE_NOTIF_OPMODE_OFT, MAC_OP_MODE_NOTIF_VHT_ACTION, MAC_OPMODE_BW_MSK, MAC_OPMODE_BW_OFT, MAC_OPMODE_RXNSS_MSK, MAC_OPMODE_RXNSS_OFT, MAC_OPMODE_RXNSS_TYPE_BIT, MAC_SA_QUERY_ACTION_CATEGORY, MAC_SELF_PROT_ACTION_CAPA_LEN, MAC_SELF_PROT_ACTION_CATEGORY, MAC_SM_PRW_CTRL_OFT, MAC_SMPS_ENABLE_BIT, MAC_SMPS_HT_ACTION, MAC_VHT_ACTION_CATEGORY, me_sta_bw_nss_max_upd(), vif_info_tag::mvif_idx, STA_CAPA, sta_info_tab, TASK_BAM, TASK_MESH, TASK_SM, vif_info_tag::type, vif_info_tab, and VIF_STA.
Referenced by rxu_mgt_route().
| static uint8_t rxu_mgt_search_rx_vif | ( | struct mac_hdr * | hdr, | |
| uint32_t | statinfo | |||
| ) | [static] |
Search to which VIF a received management frame is for.
| [in] | hdr | Pointer to the MAC Header of the received frame. |
| [in] | statinfo | Status information field as given by the MAC HW |
Definition at line 2283 of file rxu_cntrl.c.
References mac_hdr::addr1, co_list_next(), vif_info_tag::index, INVALID_VIF_IDX, vif_info_tag::list_hdr, vif_info_tag::mac_addr, MAC_ADDR_CMP, RX_HD_ADDRMIS, RX_HD_GA_FRAME, and vif_mgmt_first_used().
Referenced by rxu_mgt_frame_check().
| static void rxu_mpdu_upload_and_indicate | ( | struct rxdesc * | rxdesc, | |
| uint16_t | rx_status | |||
| ) | [static] |
Prepare and program the upload of a MPDU to the host buffer.
| [in] | rxdesc | RX descriptor attached to the frame |
| [in] | rx_status | RX status to be put in the RX IPC descriptor |
Definition at line 607 of file rxu_cntrl.c.
References rx_dmadesc::flags, rx_cntrl_rx_status::frame_info, rx_dmadesc::hd, rxu_cntrl_env_tag::hostid_current, INVALID_VIF_IDX, vif_mgmt_env_tag::monitor_vif, rx_cntrl_rx_status::payl_offset, RX_FLAGS_IS_MPDU_BIT, RX_FLAGS_NEW_MESH_PEER_BIT, RX_FLAGS_STA_INDEX_OFT, RX_FLAGS_VIF_INDEX_OFT, RX_HD_SUCCESS, RX_STAT_MONITOR, rxu_cntrl_env_tag::rx_status, rxl_dmadesc_get(), rxl_mpdu_transfer(), rxu_cntrl_desc_prepare(), rxu_cntrl_env, RXU_CNTRL_NEW_MESH_PEER, rxu_cntrl_remove_sec_hdr_mgmt_frame(), rx_cntrl_rx_status::sta_idx, rx_hd::statinfo, rx_cntrl_rx_status::vif_idx, and vif_mgmt_env.
Referenced by rxu_cntrl_spurious_check(), rxu_mgt_frame_check(), and rxu_upload_monitor().
| static void rxu_msdu_upload_and_indicate | ( | struct rxdesc * | rxdesc, | |
| uint16_t | rx_status | |||
| ) | [static] |
Prepare and program the upload of a MSDU to the host buffer This function first calls the MPDU to MSDU conversion procedure.
| [in] | rxdesc | RX descriptor attached to the frame |
| [in] | rx_status | RX status to be put in the RX IPC descriptor |
Definition at line 571 of file rxu_cntrl.c.
References rx_cntrl_rx_status::dst_idx, rx_dmadesc::flags, rxu_cntrl_env_tag::hostid_current, INVALID_VIF_IDX, vif_mgmt_env_tag::monitor_vif, RX_FLAGS_DST_INDEX_OFT, RX_FLAGS_STA_INDEX_OFT, RX_FLAGS_VIF_INDEX_OFT, RX_STAT_MONITOR, rxu_cntrl_env_tag::rx_status, rxl_dmadesc_get(), rxl_mpdu_transfer(), rxu_cntrl_desc_prepare(), rxu_cntrl_env, rxu_cntrl_mac2eth_update(), rx_cntrl_rx_status::sta_idx, rx_cntrl_rx_status::vif_idx, and vif_mgmt_env.
Referenced by rxu_cntrl_defrag_check(), and rxu_cntrl_reord_check().
| static void rxu_upload_cfm | ( | void * | env | ) | [static] |
Callback function used for the confirmation of status descriptor upload.
| [in] | env | Pointer to the descriptor to update upon confirmation |
Definition at line 137 of file rxu_cntrl.c.
References rxl_host_irq_mitigation_update(), and rxu_stat_val::status.
Referenced by rxu_cntrl_desc_init(), and rxu_cntrl_desc_prepare().
| static bool rxu_upload_monitor | ( | struct rxdesc * | rxdesc, | |
| bool | upload | |||
| ) | [static] |
Check if the frame has to be uploaded to the driver.
If a monitor interface is available and the frame has not been uploaded yet, it will be forwarded to the driver.
| [in] | rxdesc | Pointer to the current RX descriptor |
| [in] | upload | Boolean indicating if the frame has to be uploaded for data interface |
Definition at line 2417 of file rxu_cntrl.c.
References INVALID_VIF_IDX, vif_mgmt_env_tag::monitor_vif, RX_STAT_MONITOR, rxu_cntrl_env_tag::rx_status, rxu_cntrl_env, rxu_mpdu_upload_and_indicate(), rx_cntrl_rx_status::vif_idx, and vif_mgmt_env.
| struct rxu_cntrl_defrag rxu_cntrl_defrag_pool[RX_CNTRL_DEFRAG_POOL_SIZE] |
Pool of reordering structures.
Pool of Reassembly structures.
Definition at line 124 of file rxu_cntrl.c.
1.6.1