Skip to content

Commit

Permalink
add AP MLD Configuration Request and Response message
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppe-lamarca-2312410 authored and soumyasmunshi committed Dec 20, 2024
1 parent 713ee7c commit 6f60825
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 0 deletions.
2 changes: 2 additions & 0 deletions inc/em_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -1738,6 +1738,8 @@ typedef enum {
em_state_ctrl_sta_steer_pending,
em_state_ctrl_sta_disassoc_pending,
em_state_ctrl_set_policy_pending,
em_state_ctrl_ap_mld_config_pending,
em_state_ctrl_ap_mld_configured,

em_state_max,
} em_state_t;
Expand Down
2 changes: 2 additions & 0 deletions inc/em_configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ class em_configuration_t {

int send_topology_response_msg(unsigned char *dst);
int send_topology_notification_by_client(mac_address_t sta, bssid_t bssid, bool assoc);
int send_ap_mld_config_req_msg(unsigned char *buff);
int send_ap_mld_config_resp_msg(unsigned char *buff);

int handle_autoconfig_resp(unsigned char *buff, unsigned int len);
int handle_autoconfig_search(unsigned char *buff, unsigned int len);
Expand Down
42 changes: 42 additions & 0 deletions src/em/config/em_configuration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,36 @@ int em_configuration_t::send_topology_response_msg(unsigned char *dst)
return len;
}

int em_configuration_t::send_ap_mld_config_req_msg(unsigned char *buff)
{
int tlv_len = create_ap_mld_config_tlv(buff);
em_radio_cap_info_t* cap_info = get_data_model()->get_radio_cap(get_radio_interface_mac())->get_radio_cap_info();
em_eht_operations_t *eht_ops = (em_eht_operations_t *)buff;

if ((eht_ops == NULL) || (cap_info == NULL)) {
printf("%s:%d No data Found\n", __func__, __LINE__);
return 0;
}
memcpy(&eht_ops,&cap_info->eht_ops,sizeof(em_eht_operations_t));
tlv_len += sizeof(em_eht_operations_t);
return tlv_len;
}

int em_configuration_t::send_ap_mld_config_resp_msg(unsigned char *buff)
{
int tlv_len = create_ap_mld_config_tlv(buff);
em_radio_cap_info_t* cap_info = get_data_model()->get_radio_cap(get_radio_interface_mac())->get_radio_cap_info();
em_eht_operations_t *eht_ops = (em_eht_operations_t *)buff;

if ((eht_ops == NULL) || (cap_info == NULL)) {
printf("%s:%d No data Found\n", __func__, __LINE__);
return 0;
}
memcpy(&eht_ops,&cap_info->eht_ops,sizeof(em_eht_operations_t));
tlv_len += sizeof(em_eht_operations_t);
return tlv_len;
}

void em_configuration_t::print_bss_configuration_report_tlv(unsigned char *value, unsigned int len)
{
mac_addr_str_t rd_mac_str, bss_mac_str;
Expand Down Expand Up @@ -2895,6 +2925,18 @@ void em_configuration_t::process_msg(unsigned char *data, unsigned int len)
handle_topology_notification(data, len);
}
break;

case em_msg_type_ap_mld_config_req:
if ((get_service_type() == em_service_type_ctrl) && (get_state() == em_state_ctrl_ap_mld_config_pending)) {
send_ap_mld_config_req_msg(data);
}
break;

case em_msg_type_ap_mld_config_resp:
if ((get_service_type() == em_service_type_ctrl) && (get_state() == em_state_ctrl_ap_mld_configured)) {
send_ap_mld_config_resp_msg(data);
}
break;


default:
Expand Down

0 comments on commit 6f60825

Please sign in to comment.