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) |
|
static |
References mac_pib_tag::mac_AutoRequest, mac_pib_tag::mac_BattLifeExtPeriods, mac_pib_tag::mac_CoordExtendedAddress, mac_pib_tag::mac_CoordShortAddress, mac_pib_tag::mac_DSN, mac_pib_tag::mac_GTSPermit, mac_pib_tag::mac_MaxFrameTotalWaitTime, 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, macTransactionPersistenceTime_def, mac_pib_tag::privateIllegalFrameType, mac_pib_tag::privateNoDataAfterAssocReq, and mac_pib_tag::privateVirtualPANs.
Referenced by mac_soft_reset().
|
static |
References flush_gts_queues(), mac_nhle_q, nhle_mac_q, and tal_mac_q.
Referenced by mlme_reset_request().
|
static |
References MAC_DISABLE_TRX_FAILURE, mac_soft_reset(), pal_timer_source_select(), status, 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_bc_data_indicated, mac_busy, mac_final_cap_slot, 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, RADIO_AWAKE, and reset_gts_globals().
Referenced by mac_soft_reset().
|
static |
References mlme_reset_conf_tag::cmdcode, mac_nhle_q, MLME_RESET_CONFIRM, status, and mlme_reset_conf_tag::status.
Referenced by mlme_reset_request().