This file implements miscellaneous MAC sublayer components.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <compiler.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include "return_val.h"
#include "pal.h"
#include "bmm.h"
#include "qmm.h"
#include "tal.h"
#include "ieee_const.h"
#include "mac_msg_const.h"
#include "mac_api.h"
#include "mac_msg_types.h"
#include "mac_data_structures.h"
#include "stack_config.h"
#include "mac_internal.h"
#include "mac.h"
#include "mac_config.h"
#include "mac_build_config.h"
#include "stb.h"
Functions | |
static void | do_init_pib (void) |
static void | flush_queues (void) |
void | mac_idle_trans (void) |
Resets the MAC helper variables and transition to idle state. More... | |
retval_t | mac_init (void) |
Initializes the MAC sublayer. More... | |
static uint8_t | mac_reset (uint8_t init_pib) |
void | mac_sleep_trans (void) |
Puts the radio to sleep if this is allowed. More... | |
static void | mac_soft_reset (uint8_t init_pib) |
retval_t | mac_timers_init (void) |
retval_t | mac_timers_stop (void) |
void | mac_trx_init_sleep (void) |
MAC function to put the radio to sleep mode. More... | |
void | mac_trx_wakeup (void) |
MAC function to wake-up the radio from sleep state. More... | |
void | mlme_reset_request (uint8_t *m) |
Resets the MAC layer. More... | |
static void | reset_globals (void) |
static void | send_reset_conf (buffer_t *buf_ptr, uint8_t status) |
Variables | |
uint8_t | T_Rx_Enable |
uint8_t | T_Scan_Duration |
|
static |
References mac_pib_tag::mac_AutoRequest, mac_pib_tag::mac_BattLifeExtPeriods, mac_pib_tag::mac_BeaconPayloadLength, mac_pib_tag::mac_BSN, mac_pib_tag::mac_CoordExtendedAddress, mac_pib_tag::mac_CoordShortAddress, mac_pib_tag::mac_DSN, mac_pib, mac_pib_tag::mac_ResponseWaitTime, mac_pib_tag::mac_RxOnWhenIdle, mac_pib_tag::mac_SecurityEnabled, macAssociatedPANCoord_def, macAssociationPermit_def, macAutoRequest_def, macBattLifeExtPeriods_def, macBeaconPayloadLength_def, macCoordShortAddress_def, macGTSPermit_def, macMaxFrameTotalWaitTime_def, macResponseWaitTime_def, macRxOnWhenIdle_def, macSecurityEnabled_def, and macTransactionPersistenceTime_def.
Referenced by mac_soft_reset().
|
static |
References mac_nhle_q, nhle_mac_q, qmm_queue_flush(), and tal_mac_q.
Referenced by mlme_reset_request().
|
static |
References MAC_DISABLE_TRX_FAILURE, mac_soft_reset(), pal_timer_source_select(), tal_reset(), TMR_CLK_SRC_DURING_TRX_AWAKE, and TMR_CLK_SRC_DURING_TRX_SLEEP.
Referenced by mlme_reset_request().
|
static |
References do_init_pib(), ENTER_CRITICAL_REGION, LEAVE_CRITICAL_REGION, mac_timers_stop(), PHY_TRX_OFF, reset_globals(), and tal_rx_enable().
Referenced by mac_idle_trans(), mac_init(), and mac_reset().
|
static |
References FINAL_CAP_SLOT_DEFAULT, mac_busy, MAC_IDLE, mac_last_dsn, mac_last_src_addr, MAC_POLL_IDLE, mac_poll_state, mac_radio_sleep_state, mac_rx_enabled, MAC_SCAN_IDLE, mac_scan_state, mac_state, MAC_SYNC_NEVER, mac_sync_state, and RADIO_AWAKE.
Referenced by mac_soft_reset().
|
static |
References BMM_BUFFER_POINTER, mlme_reset_conf_tag::cmdcode, mac_nhle_q, MLME_RESET_CONFIRM, qmm_queue_append(), and mlme_reset_conf_tag::status.
Referenced by mlme_reset_request().