/space/home/slher/rel/Beken/v6_4_5/macsw/ip/umac/src/rxu/rxu_cntrl.c File Reference

The UMAC's Rx module implementation. More...

#include "co_int.h"
#include "co_bool.h"
#include <string.h>
#include "compiler.h"
#include "rxu_cntrl.h"
#include "macif.h"
#include "co_ring.h"
#include "ke_event.h"
#include "ke_task.h"
#include "me_task.h"
#include "mac_frame.h"
#include "rxl_cntrl.h"
#include "sta_mgmt.h"
#include "vif_mgmt.h"
#include "mm.h"
#include "rxl_hwdesc.h"
#include "ps.h"
#include "co_utils.h"
#include "co_endian.h"
#include "hal_desc.h"
#include "llc.h"
#include "bam.h"
#include "mac_ie.h"
#include "me_utils.h"
#include "rxu_task.h"
#include "scanu_task.h"
#include "scanu.h"
#include "sm.h"
#include "mfp.h"
#include "mesh_hwmp.h"

Go to the source code of this file.

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.

Functions

static void rxu_upload_cfm (void *env)
 Callback function used for the confirmation of status descriptor upload.
static struct rxu_stat_descrxu_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

  • When using MFP
  • When using SHARED-KEY authentication.

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_defragrxu_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_defragrxu_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:

  • Upload and forward the frame immediately to the host if it is in order
  • Upload and not forward if the frame is not in order
  • Discard the frame if already received or too old.

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.

Detailed Description

The UMAC's Rx module implementation.

Copyright (C) RivieraWaves 2011-2019

Definition in file rxu_cntrl.c.


Generated on 14 Jan 2020 for Ceva-RW WLAN FullMAC SW documentation by  doxygen 1.6.1