BA
/
BaBoRo1
Embed:
(wiki syntax)
Show/hide line numbers
mac_mlme.h
00001 /* 00002 * Copyright (c) 2014-2017, Arm Limited and affiliates. 00003 * SPDX-License-Identifier: Apache-2.0 00004 * 00005 * Licensed under the Apache License, Version 2.0 (the "License"); 00006 * you may not use this file except in compliance with the License. 00007 * You may obtain a copy of the License at 00008 * 00009 * http://www.apache.org/licenses/LICENSE-2.0 00010 * 00011 * Unless required by applicable law or agreed to in writing, software 00012 * distributed under the License is distributed on an "AS IS" BASIS, 00013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00014 * See the License for the specific language governing permissions and 00015 * limitations under the License. 00016 */ 00017 00018 /* 00019 * \file mac_mlme.h 00020 * \brief Add short description about this file!!! 00021 * 00022 */ 00023 00024 #ifndef MAC_MLME_H_ 00025 #define MAC_MLME_H_ 00026 00027 //TODO: Check if these are in correct place 00028 #include "net_interface.h" 00029 00030 struct nwk_scan_params; 00031 struct nwk_filter_params; 00032 struct protocol_interface_rf_mac_setup; 00033 struct arm_event_s; 00034 struct arm_device_driver_list; 00035 struct mlme_poll_s; 00036 struct mlme_beacon_ind_s; 00037 struct mlme_reset_s; 00038 struct mlme_scan_s; 00039 struct mlme_start_s; 00040 struct mlme_get_conf_s; 00041 struct mlme_set_s; 00042 00043 void mac_mlme_scan_confirmation_handle(struct protocol_interface_rf_mac_setup *rf_ptr); 00044 00045 /** 00046 * MLME Scan Request 00047 * 00048 */ 00049 void mac_mlme_scan_request(const struct mlme_scan_s *msg, struct protocol_interface_rf_mac_setup *rf_mac_setup); 00050 /** 00051 * MLME Start Request 00052 * 00053 */ 00054 int8_t mac_mlme_start_req(const struct mlme_start_s *s, struct protocol_interface_rf_mac_setup *rf_mac_setup); 00055 /** 00056 * MLME Reset Request 00057 * 00058 */ 00059 int8_t mac_mlme_reset(struct protocol_interface_rf_mac_setup *rf_mac_setup, const struct mlme_reset_s *reset); 00060 00061 int8_t mac_mlme_set_req(struct protocol_interface_rf_mac_setup *rf_mac_setup,const struct mlme_set_s *set_req); 00062 00063 int8_t mac_mlme_get_req(struct protocol_interface_rf_mac_setup *rf_mac_setup, struct mlme_get_conf_s *get_req); 00064 00065 void mac_extended_mac_set(struct protocol_interface_rf_mac_setup *rf_mac_setup, const uint8_t *mac64); 00066 00067 /** 00068 * MLME Poll Request 00069 * 00070 */ 00071 void mac_mlme_poll_req(struct protocol_interface_rf_mac_setup *cur, const struct mlme_poll_s *poll_req); 00072 00073 void mac_mlme_poll_process_confirm(struct protocol_interface_rf_mac_setup *rf_mac_setup, uint8_t status); 00074 00075 /** 00076 * Radio Disable and enable functions 00077 */ 00078 void mac_mlme_mac_radio_disabled(struct protocol_interface_rf_mac_setup *rf_mac_setup); 00079 void mac_mlme_mac_radio_enable(struct protocol_interface_rf_mac_setup *rf_mac_set); 00080 00081 /** 00082 * Initialize MAC channel selection sequence 00083 * 00084 * TODO: initialize channel select sequence 00085 * in coordinator mode 00086 * 00087 * \param new_channel channel to set 00088 * 00089 * \return 0 success 00090 * \return -1 HW error 00091 */ 00092 int8_t mac_mlme_rf_channel_change(struct protocol_interface_rf_mac_setup *rf_mac_setup, uint8_t new_channel); 00093 00094 void mac_mlme_active_scan_response_timer_start(void *interface); 00095 00096 /** 00097 * @brief mac_mlme_beacon_notify Function which is called every time a beacon is received 00098 * @param rf_mac_setup Current MAC setup 00099 * @param data Reference to beacon data 00100 * @return 00101 */ 00102 int mac_mlme_beacon_notify(struct protocol_interface_rf_mac_setup *rf_mac_setup, struct mlme_beacon_ind_s *data); 00103 00104 void mac_mlme_event_cb(void *mac_ptr); 00105 00106 void mac_mlme_set_active_state(struct protocol_interface_rf_mac_setup *entry, bool new_state); 00107 00108 struct protocol_interface_rf_mac_setup * mac_mlme_data_base_allocate(uint8_t *mac64, struct arm_device_driver_list *dev_driver, struct mac_description_storage_size_s *storage_sizes); 00109 void mac_mlme_data_base_deallocate(struct protocol_interface_rf_mac_setup *rf_mac); 00110 00111 uint8_t mac_mlme_set_new_sqn(struct protocol_interface_rf_mac_setup *rf_setup); 00112 uint8_t mac_mlme_set_new_beacon_sqn(struct protocol_interface_rf_mac_setup *rf_setup); 00113 00114 uint16_t mac_mlme_get_panid(struct protocol_interface_rf_mac_setup *rf_setup); 00115 00116 void mac_frame_src_address_set_from_interface(uint8_t SrcAddrMode,struct protocol_interface_rf_mac_setup *rf_ptr, uint8_t *addressPtr); 00117 00118 int8_t mac_mlme_beacon_tx(struct protocol_interface_rf_mac_setup *rf_ptr); 00119 uint8_t mac_mlme_beacon_req_tx(struct protocol_interface_rf_mac_setup *rf_ptr); 00120 int8_t mac_mlme_virtual_confirmation_handle(int8_t driver_id, const uint8_t *data_ptr, uint16_t length); 00121 00122 #endif /* MAC_MLME_H_ */
Generated on Tue Jul 12 2022 12:22:03 by
