Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
34 changes: 34 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,37 @@ TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

-------------------------------------------------------------------------------

BSD-3 License

Copyright (c) <YEAR> <COPYRIGHT HOLDERS>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3 changes: 3 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,6 @@ Licensed under the BSD+Patent License

Extracts from RFC3526:
Copyright (c) The Internet Society (2003). All Rights Reserved.

Copyright (c) 2012 - 2015, Lars Bilke
Licensed under the BSD-3 License
2 changes: 2 additions & 0 deletions source/controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ set(EXE_SOURCES
map_ctrl_nbapi.c
map_ctrl_onboarding_handler.c
map_ctrl_post_onboarding_handler.c
map_ctrl_sta.c
map_ctrl_tlv_helper.c
map_ctrl_tlv_parser.c
map_ctrl_topology_tree.c
map_ctrl_utils.c
map_ctrl_vendor.c
map_ctrl_wfa_capi.c
)

Expand Down
6 changes: 4 additions & 2 deletions source/controller/include/map_ctrl_chan_sel.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
#include "i1905.h"

/* Update controller preference and send channel selection request */
int map_ctrl_chan_sel_set(map_radio_info_t *radio, bool *acs_enable, map_channel_set_t *acs_channels,
int *channel, int *bandwidth);
int map_ctrl_chan_sel_set(map_radio_info_t *radio, bool *cloud_mgmt_enable, bool *acs_enable,
map_channel_set_t *acs_channels, int *channel, int *bandwidth);

int map_ctrl_chan_sel_set_channel(map_radio_info_t *radio, int channel);

int map_ctrl_chan_sel_set_bandwidth(map_radio_info_t *radio, int bandwidth);

int map_ctrl_chan_sel_set_cloud_mgmt_enable(map_radio_info_t *radio, bool enable);

/* Update controller preference but do not send channel selection request
To be used when ctl_channels are updated.
*/
Expand Down
15 changes: 15 additions & 0 deletions source/controller/include/map_ctrl_cmdu_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,4 +135,19 @@ int map_handle_chirp_notification(map_ale_info_t *ale, i1905_cmdu_t *cmdu);
/* MAP_R3 17.1.56 (type 0x802a) */
int map_handle_direct_encap_dpp(map_ale_info_t *ale, i1905_cmdu_t *cmdu);

/* MAP_R3 17.1.53 (type 0x802c) */
int map_handle_bss_configuration_request(map_ale_info_t *ale, i1905_cmdu_t *cmdu);

/* MAP_R3 17.1.55 (type 0x802e) */
int map_handle_bss_configuration_result(map_ale_info_t *ale, i1905_cmdu_t *cmdu);

/*#######################################################################
# MAP R6 CMDU HANDLERS #
########################################################################*/
/* MAP_R6 17.1.62 (type 0x8043) */
int map_handle_early_ap_capability_report(map_ale_info_t *ale, i1905_cmdu_t *cmdu);

/* MAP_R6 17.1.67 (type 0x8049) */
int map_handle_available_spectrum_inquiry(map_ale_info_t *ale, i1905_cmdu_t *cmdu);

#endif /* MAP_CTRL_CMDU_HANDLER_H_ */
14 changes: 12 additions & 2 deletions source/controller/include/map_ctrl_cmdu_tx.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,17 +136,20 @@ int map_send_link_metric_response(map_ale_info_t *ale, uint16_t mid, i1905_trans
/* 1905.1 6.3.6 (type 0x0006) - MID must be the same as what was used in the request */
int map_send_link_metric_response_error(map_ale_info_t *ale, uint16_t mid, uint8_t error_code);

/* 1905.1 6.3.7 (type 0x0007) */
int map_send_autoconfig_search(void);

/* 1905.1 6.3.8 (type 0x0008) */
int map_send_autoconfig_response(i1905_cmdu_t *recv_cmdu, bool ale_is_agent);

/* 1905.1 6.3.9 (type 0x0009) */
int map_send_autoconfig_wsc_m2(map_ale_info_t *ale, map_radio_info_t *radio, i1905_cmdu_t *recv_cmdu, uint16_t *mid);

/* 1905.1 6.3.10 (type 0x000A) */
int map_send_autoconfig_renew(uint8_t freq_band, uint16_t *mid);
int map_send_autoconfig_renew(uint8_t freq_band, uint16_t *mid, bool reset_onboarding);

/* 1905.1 6.3.10 (type 0x000A) */
int map_send_autoconfig_renew_ucast(map_ale_info_t *ale, uint8_t freq_band, uint16_t *mid);
int map_send_autoconfig_renew_ucast(map_ale_info_t *ale, uint8_t freq_band, uint16_t *mid, bool reset_onboarding);

/* 1905.1 6.3.13 (type 0x0004) - args is of type map_vendor_specific_t */
int map_send_vendor_specific(void *args, uint16_t *mid);
Expand Down Expand Up @@ -177,6 +180,7 @@ int map_send_channel_selection_request(void *args, uint16_t *mid);

/* MAP_R2 17.1.14 (type 0x8009) - args is of type map_sta_info_t */
int map_send_client_capability_query(void *args, uint16_t *mid);
int map_send_mld_client_capability_query(void *args, uint16_t *mid);

/* MAP_R2 17.1.16 (type 0x800B) */
int map_send_ap_metrics_query(map_ale_info_t *ale, mac_addr *bssids, uint8_t bssid_nr, uint16_t *mid);
Expand Down Expand Up @@ -235,9 +239,15 @@ int map_send_dpp_cce_indication(map_ale_info_t *ale, uint8_t advertise, uint16_t
/* MAP_R3 17.1.52 (type 0x802F) */
int map_send_dpp_chirp_notification(map_dpp_chirp_value_tlv_t *chirp_value_tlv_list, int num_chirp_tlv, uint16_t *mid);

/* MAP_R3 17.1.54 (type 0x802D) */
int map_send_bss_config_response(map_ale_info_t *ale, map_bss_configuration_response_tlv_t *bss_config_resp_tlv, uint16_t *mid);

/* MAP_R3 17.1.56 (type 0x802A) */
int map_send_direct_encap_dpp(map_ale_info_t *ale, map_dpp_message_tlv_t *dpp_message_tlv, uint16_t *mid);

/* MAP_R3 17.1.58 (type 0x8035) */
int map_send_agent_list_message(map_ale_info_t *ale, uint16_t *mid);

/*#######################################################################
# RAW #
########################################################################*/
Expand Down
19 changes: 19 additions & 0 deletions source/controller/include/map_ctrl_cmdu_validator.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ int map_validate_link_metrics_response(map_ale_info_t *ale, i1905_cmdu_t *cmdu);
/* 1905.1 6.3.7 (type 0x0007) */
int map_validate_ap_autoconfig_search(i1905_cmdu_t *cmdu);

/* 1905.1 6.3.8 (type 0x0008) */
int map_validate_ap_autoconfig_response(i1905_cmdu_t *cmdu);

/* 1905.1 6.3.9 (type 0x0009) */
int map_validate_ap_autoconfig_wsc(i1905_cmdu_t *cmdu);

Expand Down Expand Up @@ -128,6 +131,22 @@ int map_validate_1905_encap_eapol(map_ale_info_t *ale, i1905_cmdu_t *cmdu);
/* MAP_R3 17.1.52 (type 0x802f) */
int map_validate_chirp_notification(map_ale_info_t *ale, i1905_cmdu_t *cmdu);

/* MAP_R3 17.1.53 (type 0x802c) */
int map_validate_bss_configuration_request(UNUSED map_ale_info_t *ale, i1905_cmdu_t *cmdu);

/* MAP_R3 17.1.55 (type 0x802e) */
int map_validate_bss_configuration_result(UNUSED map_ale_info_t *ale, i1905_cmdu_t *cmdu);

/* MAP_R3 17.1.56 (type 0x802a) */
int map_validate_direct_encap_dpp(UNUSED map_ale_info_t *ale, i1905_cmdu_t *cmdu);

/*#######################################################################
# MAP R6 CMDU VALIDATORS #
########################################################################*/
/* MAP_R6 17.1.62 (type 0x8043) */
int map_validate_early_ap_capability_report(map_ale_info_t *ale, i1905_cmdu_t *cmdu);

/* MAP_R6 17.1.67 (type 0x8049) */
int map_validate_available_spectrum_inquiry(map_ale_info_t *ale, i1905_cmdu_t *cmdu);

#endif /* MAP_CTRL_CMDU_VALIDATOR_H_ */
1 change: 1 addition & 0 deletions source/controller/include/map_ctrl_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define CONFIG_RENEW_TIMER_ID "CONFIG_RENEW_TIMER"
#define TOPOLOGY_STABLE_CHECK_TIMER_ID "TOPOLOGY_STABLE_CHECK_TIMER"
#define AUTO_CONFIG_SEARCH_TIMER_ID "AUTO-CONFIG_SEARCH-TIMER"
#define CHAN_SEL_MULTIAP_ALIGN_TIMER_ID "CHAN-SEL-MULTIAP-ALIGN"

#define MAX_TOPOLOGY_QUERY_RETRY 5
#define ALE_KEEP_ALIVE_THRESHOLD_IN_SEC 30
Expand Down
17 changes: 13 additions & 4 deletions source/controller/include/map_ctrl_emex_tlv_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,30 @@

/* Feature IDs reported in Feature Profile */
enum emex_feature_ids {
MAP_EMEX_FEATURE_UNUSED = 0x0000,
MAP_EMEX_FEATURE_UNUSED = 0x0000,
MAP_EMEX_FEATURE_DEVICE_METRICS, /* 0x0001 */
MAP_EMEX_FEATURE_IEEE1905_1_14, /* 0x0002 */
MAP_EMEX_FEATURE_DEVICE_INFO, /* 0x0003 */
MAP_EMEX_FEATURE_ETH_STATS, /* 0x0004 */
MAP_EMEX_FEATURE_REBOOT_RESET = 0x0006, /* 0x0006 */
};

enum emex_reboot_request_action_ids {
MAP_EMEX_REBOOT_ACTION_REBOOT = 0x00,
MAP_EMEX_REBOOT_ACTION_RESET = 0x01,
};

enum emex_reboot_request_reset_types {
MAP_EMEX_RESET_SOFT_RESET = 0x00,
MAP_EMEX_RESET_FACTORY_RESET = 0x01,
};

map_emex_common_feature_list_t *controller_get_emex_common_feature_list(void);

bool map_emex_agent_is_feature_supported(map_ale_info_t *ale, uint16_t id);
bool map_emex_common_is_feature_supported(uint16_t id);

bool map_emex_is_valid_tlv(i1905_vendor_specific_tlv_t* vendor_tlv);
int8_t map_emex_parse_tlv(map_ale_info_t* ale, i1905_vendor_specific_tlv_t* vendor_tlv);
int8_t map_emex_get_emex_tlv(map_ale_info_t *ale, uint16_t emex_tlv_type,
i1905_vendor_specific_tlv_t *vendor_specific_tlv);

int map_emex_handle_cmdu_pre(map_ale_info_t *ale, i1905_cmdu_t *cmdu);
int map_emex_handle_cmdu_post(map_ale_info_t *ale, i1905_cmdu_t *cmdu);
Expand Down
4 changes: 4 additions & 0 deletions source/controller/include/map_ctrl_post_onboarding_handler.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,8 @@ int map_agent_handle_channel_selection(map_ale_info_t *ale, map_radio_info_t *ra

int map_agent_cancel_channel_selection(map_ale_info_t *ale);

int map_agent_start_delayed_channel_selection(map_radio_info_t *radio, uint32_t delay_sec);

int map_agent_cancel_delayed_channel_selection(map_radio_info_t *radio);

#endif /* MAP_CTRL_POST_ONBOARDING_HANDLER_H_ */
14 changes: 14 additions & 0 deletions source/controller/include/map_ctrl_sta.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) 2024-2024 AirTies Wireless Networks
*
* Licensed under the BSD+Patent License.
*/

#ifndef MAP_CTRL_STA_H
#define MAP_CTRL_STA_H

int map_ctrl_sta_init(void);

void map_ctrl_sta_fini(void);

#endif /* MAP_CTRL_STA_H */
6 changes: 3 additions & 3 deletions source/controller/include/map_ctrl_tlv_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ i1905_receiver_link_metric_tlv_t *map_get_receiver_link_metric_tlv(mac_addr loca

i1905_transmitter_link_metric_tlv_t *map_get_transmitter_link_metric_tlv(mac_addr local_al_mac, map_neighbor_link_metric_t *neighbor_lm);

void map_fill_channel_preference_tlv(map_channel_preference_tlv_t *tlv, map_radio_info_t *radio, uint8_t pref_type);
int map_fill_channel_preference_tlv(map_channel_preference_tlv_t *tlv, map_radio_info_t *radio, uint8_t pref_type);

void map_fill_transmit_power_tlv(map_transmit_power_limit_tlv_t *tlv, map_radio_info_t *radio);

/* Fill scan request tlv with all 20MHz operating class received in scan capability tlv.
Optionally set channels != NULL to add only those.
*/
void map_fill_channel_scan_request_tlv(map_channel_scan_request_tlv_t *tlv, map_radio_info_t *radio,
bool fresh_scan, map_channel_set_t *channels);
int map_fill_channel_scan_request_tlv(map_channel_scan_request_tlv_t *tlv, map_radio_info_t *radio,
bool fresh_scan, map_channel_set_t *channels);

void map_fill_default_8021q_settings_tlv(map_cfg_t *cfg, map_default_8021q_settings_tlv_t *tlv);

Expand Down
27 changes: 27 additions & 0 deletions source/controller/include/map_ctrl_tlv_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ int map_parse_ap_wifi6_cap_tlv(map_ale_info_t *ale, map_ap_wifi6_cap_tlv_t *tlv)
/* MAP_R3 17.2.73 */
int map_parse_assoc_wifi6_sta_status_tlv(map_ale_info_t *ale, map_assoc_wifi6_sta_status_tlv_t *tlv);

/* MAP_R3 17.2.75 */
int map_parse_bss_configuration_report_tlv(map_ale_info_t *ale, map_bss_configuration_report_tlv_t *tlv);

/* MAP_R3 17.2.76 */
int map_parse_device_inventory_tlv(map_ale_info_t *ale, map_device_inventory_tlv_t *tlv);

Expand All @@ -143,7 +146,31 @@ int map_parse_1905_encap_eapol_tlv(map_ale_info_t *ale, map_1905_encap_eapol_tlv
/* MAP_R3 17.2.83 */
int map_parse_dpp_chirp_value_tlv(map_ale_info_t *ale, map_dpp_chirp_value_tlv_t *tlv);

/* MAP_R3 17.2.84 */
int map_parse_bss_configuration_request_tlv(map_ale_info_t *ale, map_bss_configuration_request_tlv_t *tlv);

/* MAP_R3 17.2.86 */
int map_parse_dpp_message_tlv(map_ale_info_t *ale, map_dpp_message_tlv_t *tlv);

/*#######################################################################
# MAP R6 TLV HANDLERS #
########################################################################*/
/* MAP_R6 17.2.95 */
int map_parse_wifi7_agent_capability_tlv(map_ale_info_t *ale, map_wifi7_agent_cap_tlv_t *tlv, bool *ret_changed);

/* MAP_R6 17.2.96 */
int map_parse_agent_ap_mld_conf_tlv(map_ale_info_t *ale, map_agent_ap_mld_conf_tlv_t *tlv);

/* MAP_R6 17.2.97 */
int map_parse_bsta_mld_conf_tlv(map_ale_info_t *ale, map_bsta_mld_conf_tlv_t *tlv);

/* MAP_R6 17.2.98 */
int map_parse_assoc_sta_mld_conf_tlv(map_ale_info_t *ale, map_assoc_sta_mld_conf_tlv_t *tlv);

/* MAP_R6 17.2.100 */
int map_parse_aff_sta_metrics_tlv(map_ale_info_t *ale, map_aff_sta_metrics_tlv_t *tlv);

/* MAP_R6 17.2.103 */
int map_parse_eht_operations_tlv(map_ale_info_t *ale, map_eht_operations_tlv_t *tlv);

#endif /* MAP_CTRL_TLV_PARSER_H_ */
Loading