Implements the MLME-DISASSOCIATION functionality.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <compiler.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_build_config.h"
Macros | |
#define | DISASSOC_PAYLOAD_LEN (2) |
Functions | |
static bool | mac_awake_disassociate (buffer_t *buf_ptr) |
static void | mac_gen_mlme_disassociate_conf (buffer_t *buf, uint8_t status, uint8_t dev_addr_mode, uint16_t dev_panid, address_field_t *dev_addr) |
Initiates MLME disassociate confirm message. More... | |
void | mac_prep_disassoc_conf (buffer_t *buf, uint8_t status) |
Prepares a disassociation confirm message with device address information. More... | |
void | mac_process_disassociate_notification (buffer_t *msg) |
Process a disassociation notification command. More... | |
void | mlme_disassociate_request (uint8_t *m) |
Handles the MLME disassociate request command from the NWK layer. More... | |
#define DISASSOC_PAYLOAD_LEN (2) |
Referenced by mlme_disassociate_request().
References BMM_BUFFER_POINTER, CSMA_SLOTTED, CSMA_UNSLOTTED, MAC_SUCCESS, MAKE_MAC_BUSY, NON_BEACON_NWK, tal_pib, and tal_tx_frame().
Referenced by mlme_disassociate_request().
|
static |
Initiates MLME disassociate confirm message.
This function creates and appends a MLME disassociate confirm message into the internal event queue.
buf | Buffer for sending MLME disassociate confirm message to NHLE |
status | Status of disassociation |
dev_addr_mode | Addressing mode of the device that has either requested disassociation or been instructed to disassociate by its coordinator. |
dev_panid | PAN identifier of the device that has either requested disassociation or been instructed to disassociate by its coordinator. |
dev_addr | Address of the device that has either requested disassociation or been instructed to disassociate by its coordinator. |
References ADDR_COPY_DST_SRC_16, ADDR_COPY_DST_SRC_64, BMM_BUFFER_POINTER, mlme_disassociate_conf_tag::cmdcode, mlme_disassociate_conf_tag::DeviceAddress, mlme_disassociate_conf_tag::DeviceAddrMode, mlme_disassociate_conf_tag::DevicePANId, FCF_SHORT_ADDR, address_field_t::long_address, mac_nhle_q, MLME_DISASSOCIATE_CONFIRM, qmm_queue_append(), address_field_t::short_address, and mlme_disassociate_conf_tag::status.
Referenced by mac_prep_disassoc_conf(), and mlme_disassociate_request().