Lines Matching +full:kconfig +full:- +full:ext
1 /** @file wifi-uap.c
5 * Copyright 2008-2024 NXP
7 * SPDX-License-Identifier: BSD-3-Clause
19 #include "wifi-imu.h"
21 #include "wifi-sdio.h"
26 #include "wifi-internal.h"
30 /* fixme: Some of the following options could be added to kconfig. While
31 adding the ranges in kconfig use the ones given as macros in
54 * @return 0 -- success, otherwise fail
58 mlan_adapter *pmadapter = pmpriv->adapter; in wifi_check_11ac_capability()
63 if (!pmadapter->usr_dot_11ac_enable) in wifi_check_11ac_capability()
68 if ((band == BAND_CONFIG_5GHZ) && !(pmadapter->fw_bands & BAND_AAC)) in wifi_check_11ac_capability()
74 …if ((band == BAND_CONFIG_ACS_MODE || band == BAND_CONFIG_MANUAL) && !(pmadapter->fw_bands & BAND_G… in wifi_check_11ac_capability()
95 * @return 0--success, otherwise failure
99 mlan_adapter *pmadapter = pmpriv->adapter; in wifi_uap_set_11ac_status()
119 vht_cfg.vht_cap_info = pmadapter->usr_dot_11ac_dev_cap_a; in wifi_uap_set_11ac_status()
142 vht_cfg.vht_tx_mcs = pmadapter->usr_dot_11ac_mcs_support >> 16; in wifi_uap_set_11ac_status()
143 vht_cfg.vht_rx_mcs = pmadapter->usr_dot_11ac_mcs_support & 0xffff; in wifi_uap_set_11ac_status()
168 * @return 0 -- success, otherwise fail
172 mlan_adapter *pmadapter = pmpriv->adapter; in wifi_check_11ax_capability()
177 if (!pmadapter->usr_dot_11ax_enable) in wifi_check_11ax_capability()
182 if ((band == BAND_CONFIG_5GHZ) && !(pmadapter->fw_bands & BAND_AAX)) in wifi_check_11ax_capability()
188 …if ((band == BAND_CONFIG_ACS_MODE || band == BAND_CONFIG_MANUAL) && !(pmadapter->fw_bands & BAND_G… in wifi_check_11ax_capability()
207 * @return 0--success, otherwise failure
211 mlan_adapter *pmadapter = pmpriv->adapter; in wifi_uap_set_11ax_status()
216 if ((band == BAND_CONFIG_5GHZ && !(pmadapter->fw_bands & BAND_AAX)) || in wifi_uap_set_11ax_status()
217 …((band == BAND_CONFIG_ACS_MODE || band == BAND_CONFIG_MANUAL) && !(pmadapter->fw_bands & BAND_GAX)… in wifi_uap_set_11ax_status()
220 ret = -WM_FAIL; in wifi_uap_set_11ax_status()
227 … (void)memcpy((void *)&he_cfg.he_cap, (const void *)pmadapter->hw_he_cap, pmadapter->hw_hecap_len); in wifi_uap_set_11ax_status()
232 …(void)memcpy((void *)&he_cfg.he_cap, (const void *)pmadapter->hw_2g_he_cap, pmadapter->hw_2g_hecap… in wifi_uap_set_11ax_status()
241 ret = -WM_E_INVAL; in wifi_uap_set_11ax_status()
279 cmd->seq_num = HostCmd_SET_SEQ_NO_BSS_INFO(0 /* seq_num */, 0 /* bss_num */, BSS_TYPE_UAP); in wifi_uap_clear_domain_info()
280 cmd->command = wlan_cpu_to_le16(HostCmd_CMD_802_11D_DOMAIN_INFO); in wifi_uap_clear_domain_info()
281 cmd->size = S_DS_GEN + sizeof(domain_info->action) + sizeof(MrvlIEtypesHeader_t); in wifi_uap_clear_domain_info()
283 domain_info->action = HostCmd_ACT_GEN_SET; in wifi_uap_clear_domain_info()
284 domain_info->domain.header.type = wlan_cpu_to_le16(TLV_TYPE_DOMAIN); in wifi_uap_clear_domain_info()
301 …cmd->seq_num = HostCmd_SET_SEQ_NO_BSS_INFO(0U /* seq_num */, 0U /* bss_num */, (uint16_t)bss_type); in wifi_uap_prepare_and_send_cmd()
302 cmd->result = 0x0; in wifi_uap_prepare_and_send_cmd()
333 mlan_private *priv_uap = mlan_adap->priv[1]; in wifi_uap_downld_domain_params()
334 int region_code = mlan_adap->region_code; in wifi_uap_downld_domain_params()
358 return -WM_FAIL; in wifi_uap_downld_domain_params()
369 return -WM_FAIL; in wifi_uap_downld_domain_params()
416 return -WM_E_INVAL; in wifi_cmd_uap_config()
424 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_cmd_uap_config()
466 mlan_private *priv_sta = (mlan_private *)mlan_adap->priv[0]; in wifi_cmd_uap_config()
467 … if ((priv_sta->media_connected == MFALSE) && wlan_11h_radar_detect_required(pmpriv, channel)) in wifi_cmd_uap_config()
470 return -WM_E_INVAL; in wifi_cmd_uap_config()
676 if (ISSUPP_CHANWIDTH40(mlan_adap->hw_dot_11n_dev_cap) != 0U) in wifi_cmd_uap_config()
680 if (ISSUPP_SHORTGI40(mlan_adap->hw_dot_11n_dev_cap) != 0U) in wifi_cmd_uap_config()
698 if (ISSUPP_RXLDPC(mlan_adap->hw_dot_11n_dev_cap) != 0U) in wifi_cmd_uap_config()
707 return -WM_E_INVAL; in wifi_cmd_uap_config()
710 if (!ISSUPP_TXSTBC(mlan_adap->hw_dot_11n_dev_cap)) in wifi_cmd_uap_config()
712 if (!ISSUPP_RXSTBC(mlan_adap->hw_dot_11n_dev_cap)) in wifi_cmd_uap_config()
714 if (!ISSUPP_CHANWIDTH40(mlan_adap->hw_dot_11n_dev_cap)) in wifi_cmd_uap_config()
719 bss.param.bss_config.tx_bf_cap = mlan_adap->priv[1]->tx_bf_cap; in wifi_cmd_uap_config()
759 if (pmpriv->adapter->usr_dot_11n_enable) in wifi_cmd_uap_config()
766 memcpy(&bss.param.bss_config.wmm_para.ac_params, &mlan_adap->ac_params, in wifi_cmd_uap_config()
771 wlan_cpu_to_le16(mlan_adap->ac_params[i].tx_op_limit); in wifi_cmd_uap_config()
801 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_uap_ctrl_deauth()
823 return -WM_FAIL; in wifi_uap_set_bandwidth()
829 return (-WM_FAIL); in wifi_uap_set_bandwidth()
870 /* Special Case: 20Mhz-only Channel */ in wlan_get_second_channel_offset()
872 if (priv->adapter->region_code != COUNTRY_CODE_US && chan == 165) in wlan_get_second_channel_offset()
922 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_get_sec_channel_offset()
923 mlan_adapter *pmadapter = pmpriv->adapter; in wifi_get_sec_channel_offset()
972 mlan_adap->usr_dot_11n_enable = MTRUE; in wifi_uap_config_wifi_capa()
976 mlan_adap->usr_dot_11ac_enable = MTRUE; in wifi_uap_config_wifi_capa()
980 mlan_adap->usr_dot_11ax_enable = MTRUE; in wifi_uap_config_wifi_capa()
984 mlan_adap->usr_dot_11ax_enable = MFALSE; in wifi_uap_config_wifi_capa()
992 mlan_adap->usr_dot_11ac_enable = MFALSE; in wifi_uap_config_wifi_capa()
995 mlan_adap->usr_dot_11ax_enable = MFALSE; in wifi_uap_config_wifi_capa()
1001 mlan_adap->usr_dot_11n_enable = MFALSE; in wifi_uap_config_wifi_capa()
1003 mlan_adap->usr_dot_11ac_enable = MFALSE; in wifi_uap_config_wifi_capa()
1006 mlan_adap->usr_dot_11ax_enable = MFALSE; in wifi_uap_config_wifi_capa()
1046 return -WM_FAIL; in wifi_uap_start()
1086 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_uap_start()
1091 wm_wifi.uap_support_11d_apis->wifi_uap_downld_domain_params_p(BAND_B); in wifi_uap_start()
1093 wm_wifi.uap_support_11d_apis->wifi_uap_downld_domain_params_p(BAND_A); in wifi_uap_start()
1107 return -WM_E_INVAL; in wifi_uap_bss_sta_list()
1110 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_uap_bss_sta_list()
1122 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_sta_deauth()
1127 return -WM_FAIL; in wifi_sta_deauth()
1133 if (pmpriv->media_connected == MFALSE) in wifi_sta_deauth()
1135 return -WM_FAIL; in wifi_sta_deauth()
1145 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_uap_stop()
1161 uint32_t size = S_DS_GEN + sizeof(HostCmd_DS_ACS_CONFIG) - 1U; in wifi_uap_acs_config_set()
1175 cmd->command = wlan_cpu_to_le16(HostCmd_MMH_ACS_CFG); in wifi_uap_acs_config_set()
1177 uint8_t *tlv = acs_cmd->tlv_buffer; in wifi_uap_acs_config_set()
1183 tlv_chan_list->header.type = TLV_TYPE_CHANLIST; in wifi_uap_acs_config_set()
1184 tlv_chan_list->header.len = active_num_chans * sizeof(ChanScanParamSet_t); in wifi_uap_acs_config_set()
1188 tlv_chan_list->chan_scan_param[i].chan_number = active_chan_list[i]; in wifi_uap_acs_config_set()
1189 tlv_chan_list->chan_scan_param[i].min_scan_time = MRVDRV_ACTIVE_SCAN_CHAN_TIME; in wifi_uap_acs_config_set()
1190 tlv_chan_list->chan_scan_param[i].max_scan_time = MRVDRV_ACTIVE_SCAN_CHAN_TIME; in wifi_uap_acs_config_set()
1193 size += sizeof(tlv_chan_list->header) + tlv_chan_list->header.len; in wifi_uap_acs_config_set()
1195 cmd->size = (t_u16)size; in wifi_uap_acs_config_set()
1196 cmd->seq_num = (0x01) << 12; in wifi_uap_acs_config_set()
1197 cmd->result = 0x00; in wifi_uap_acs_config_set()
1208 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_uap_do_acs()
1222 HostCmd_DS_SYS_CONFIG *sys_config = (HostCmd_DS_SYS_CONFIG *)&cmd->params.sys_config; in wifi_uap_do_acs()
1224 cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); in wifi_uap_do_acs()
1225 …cmd->seq_num = HostCmd_SET_SEQ_NO_BSS_INFO(0 /* seq_num */, 0 /* bss_num */, MLAN_BSS_TYPE_U… in wifi_uap_do_acs()
1226 cmd->result = 0x00; in wifi_uap_do_acs()
1227 sys_config->action = wlan_cpu_to_le16(HostCmd_ACT_GEN_SET); in wifi_uap_do_acs()
1228 cmd_size = sizeof(HostCmd_DS_SYS_CONFIG) - 1 + S_DS_GEN; in wifi_uap_do_acs()
1231 tlv = (t_u8 *)sys_config->tlv_buffer; in wifi_uap_do_acs()
1233 tlv_chan_band->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_CHAN_BAND_CONFIG); in wifi_uap_do_acs()
1234 tlv_chan_band->header.len = wlan_cpu_to_le16(sizeof(t_u8) + sizeof(t_u8)); in wifi_uap_do_acs()
1235 tlv_chan_band->band_config = BAND_CONFIG_ACS_MODE; in wifi_uap_do_acs()
1236 tlv_chan_band->channel = 0; in wifi_uap_do_acs()
1242 tlv_chan_list->header.type = wlan_cpu_to_le16(TLV_TYPE_CHANLIST); in wifi_uap_do_acs()
1243 pscan_chan = tlv_chan_list->chan_scan_param; in wifi_uap_do_acs()
1255 pscan_chan->chan_number = freq_to_chan(freq_list[i]); in wifi_uap_do_acs()
1256 pscan_chan->radio_type = freq_list[i] >= 5180 ? BAND_5GHZ : BAND_2GHZ; in wifi_uap_do_acs()
1270 pscan_chan->chan_number = active_chan_list[i]; in wifi_uap_do_acs()
1271 pscan_chan->radio_type = BAND_2GHZ; in wifi_uap_do_acs()
1278 tlv_chan_list->header.len = wlan_cpu_to_le16(scan_chan_num * sizeof(ChanScanParamSet_t)); in wifi_uap_do_acs()
1279 cmd_size += sizeof(tlv_chan_list->header) + (scan_chan_num * sizeof(ChanScanParamSet_t)); in wifi_uap_do_acs()
1280 tlv += sizeof(tlv_chan_list->header) + (scan_chan_num * sizeof(ChanScanParamSet_t)); in wifi_uap_do_acs()
1282 cmd->size = (t_u16)wlan_cpu_to_le16(cmd_size); in wifi_uap_do_acs()
1351 uint32_t size = S_DS_GEN + sizeof(HostCmd_DS_SYS_CONFIG) - 1; in wifi_uap_enable_sticky_bit()
1356 cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); in wifi_uap_enable_sticky_bit()
1358 sys_config_cmd->action = HostCmd_ACT_GEN_SET; in wifi_uap_enable_sticky_bit()
1359 uint8_t *tlv = sys_config_cmd->tlv_buffer; in wifi_uap_enable_sticky_bit()
1369 tlv_sticky_tim_cfg->tag = MRVL_STICKY_TIM_CONFIG_TLV_ID; in wifi_uap_enable_sticky_bit()
1370 tlv_sticky_tim_cfg->length = sizeof(tlvbuf_sticky_tim_config) - TLVHEADER_LEN; in wifi_uap_enable_sticky_bit()
1371 tlv_sticky_tim_cfg->enable = 1; in wifi_uap_enable_sticky_bit()
1373 tlv_sticky_tim_cfg->duration = 0; in wifi_uap_enable_sticky_bit()
1375 tlv_sticky_tim_cfg->sticky_bitmask = (t_u16)0x3; in wifi_uap_enable_sticky_bit()
1377 size += sizeof(MrvlIEtypesHeader_t) + tlv_sticky_tim_cfg->length; in wifi_uap_enable_sticky_bit()
1378 tlv += sizeof(MrvlIEtypesHeader_t) + tlv_sticky_tim_cfg->length; in wifi_uap_enable_sticky_bit()
1385 tim_cfg->tag = MRVL_STICKY_TIM_STA_MAC_ADDR_TLV_ID; in wifi_uap_enable_sticky_bit()
1386 tim_cfg->length = sizeof(tlvbuf_sticky_tim_sta_mac_addr) - TLVHEADER_LEN; in wifi_uap_enable_sticky_bit()
1387 (void)memcpy((void *)tim_cfg->sta_mac_address, (const void *)mac_addr, MLAN_MAC_ADDR_LENGTH); in wifi_uap_enable_sticky_bit()
1388 tim_cfg->control = 1; in wifi_uap_enable_sticky_bit()
1390 size += sizeof(MrvlIEtypesHeader_t) + tim_cfg->length; in wifi_uap_enable_sticky_bit()
1392 cmd->size = size; in wifi_uap_enable_sticky_bit()
1393 cmd->seq_num = (0x01) << 12; in wifi_uap_enable_sticky_bit()
1394 cmd->result = 0x00; in wifi_uap_enable_sticky_bit()
1405 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_uap_handle_cmd_resp()
1406 HostCmd_DS_SYS_CONFIG *sys_config = (HostCmd_DS_SYS_CONFIG *)&resp->params.sys_config; in wifi_uap_handle_cmd_resp()
1407 uint8_t *tlv = sys_config->tlv_buffer; in wifi_uap_handle_cmd_resp()
1409 if (resp->result == 0U) in wifi_uap_handle_cmd_resp()
1411 switch (header->type) in wifi_uap_handle_cmd_resp()
1416 if (sys_config->action == HostCmd_ACT_GEN_GET) in wifi_uap_handle_cmd_resp()
1422 *tx_power = tlv_tx_power->tx_power; in wifi_uap_handle_cmd_resp()
1431 if (sys_config->action == HostCmd_ACT_GEN_GET) in wifi_uap_handle_cmd_resp()
1437 *sta_ageout_timer = tlv_sta_ageout_timer->sta_ageout_timer; in wifi_uap_handle_cmd_resp()
1446 if (sys_config->action == HostCmd_ACT_GEN_GET) in wifi_uap_handle_cmd_resp()
1452 … *ps_sta_ageout_timer = tlv_ps_sta_ageout_timer->ps_sta_ageout_timer; in wifi_uap_handle_cmd_resp()
1461 if (sys_config->action == HostCmd_ACT_GEN_GET) in wifi_uap_handle_cmd_resp()
1467 *group_rekey_timer = tlv_group_rekey_timer->gk_rekey_time; in wifi_uap_handle_cmd_resp()
1476 if (sys_config->action == HostCmd_ACT_GEN_GET) in wifi_uap_handle_cmd_resp()
1482 *mcbc_rate = tlv_mcbc_rate->mcbc_data_rate; in wifi_uap_handle_cmd_resp()
1492 if (sys_config->action == HostCmd_ACT_GEN_GET) in wifi_uap_handle_cmd_resp()
1499 (void)memcpy((void *)rates, (const void *)tlv_rates->rates, in wifi_uap_handle_cmd_resp()
1500 MIN(MAX_RATES, tlv_rates->header.len)); in wifi_uap_handle_cmd_resp()
1509 pmpriv->uap_state_chan_cb.band_config = tlv_cb->band_config; in wifi_uap_handle_cmd_resp()
1510 pmpriv->uap_state_chan_cb.channel = tlv_cb->channel; in wifi_uap_handle_cmd_resp()
1515 *channel = tlv_cb->channel; in wifi_uap_handle_cmd_resp()
1523 pmpriv->uap_state_chan_cb.max_sta_count = tlv_sta_cnt->max_sta_count; in wifi_uap_handle_cmd_resp()
1524 pmpriv->uap_max_sta = tlv_sta_cnt->max_sta_count; in wifi_uap_handle_cmd_resp()
1529 *sta_count = (int)tlv_sta_cnt->max_sta_count; in wifi_uap_handle_cmd_resp()
1541 wm_wifi.cmd_resp_status = -WM_FAIL; in wifi_uap_handle_cmd_resp()
1548 uint32_t size = S_DS_GEN + sizeof(HostCmd_DS_SYS_CONFIG) - 1U; in wifi_uap_rates_getset()
1553 cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); in wifi_uap_rates_getset()
1555 uint8_t *tlv = sys_config_cmd->tlv_buffer; in wifi_uap_rates_getset()
1561 sys_config_cmd->action = HostCmd_ACT_GEN_GET; in wifi_uap_rates_getset()
1565 sys_config_cmd->action = HostCmd_ACT_GEN_SET; in wifi_uap_rates_getset()
1568 tlv_rates->rates[i] = (t_u8)rates[i]; in wifi_uap_rates_getset()
1572 tlv_rates->header.type = wlan_cpu_to_le16(TLV_TYPE_RATES); in wifi_uap_rates_getset()
1573 tlv_rates->header.len = wlan_cpu_to_le16(i); in wifi_uap_rates_getset()
1578 cmd->size = (t_u16)size; in wifi_uap_rates_getset()
1579 cmd->seq_num = (0x01) << 12; in wifi_uap_rates_getset()
1580 cmd->result = 0x00; in wifi_uap_rates_getset()
1589 uint32_t size = S_DS_GEN + sizeof(HostCmd_DS_SYS_CONFIG) - 1U; in wifi_uap_mcbc_rate_getset()
1594 cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); in wifi_uap_mcbc_rate_getset()
1596 uint8_t *tlv = sys_config_cmd->tlv_buffer; in wifi_uap_mcbc_rate_getset()
1602 sys_config_cmd->action = HostCmd_ACT_GEN_GET; in wifi_uap_mcbc_rate_getset()
1606 sys_config_cmd->action = HostCmd_ACT_GEN_SET; in wifi_uap_mcbc_rate_getset()
1607 tlv_mcbc_rate->mcbc_data_rate = *mcbc_rate; in wifi_uap_mcbc_rate_getset()
1610 tlv_mcbc_rate->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_MCBC_DATA_RATE); in wifi_uap_mcbc_rate_getset()
1611 tlv_mcbc_rate->header.len = wlan_cpu_to_le16(sizeof(t_u16)); in wifi_uap_mcbc_rate_getset()
1616 cmd->size = (t_u16)size; in wifi_uap_mcbc_rate_getset()
1617 cmd->seq_num = (0x01) << 12; in wifi_uap_mcbc_rate_getset()
1618 cmd->result = 0x00; in wifi_uap_mcbc_rate_getset()
1627 uint32_t size = S_DS_GEN + sizeof(HostCmd_DS_SYS_CONFIG) - 1U; in wifi_uap_tx_power_getset()
1632 cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); in wifi_uap_tx_power_getset()
1634 uint8_t *tlv = sys_config_cmd->tlv_buffer; in wifi_uap_tx_power_getset()
1640 sys_config_cmd->action = HostCmd_ACT_GEN_GET; in wifi_uap_tx_power_getset()
1644 sys_config_cmd->action = HostCmd_ACT_GEN_SET; in wifi_uap_tx_power_getset()
1645 tlv_tx_power->tx_power = *tx_power_dbm; in wifi_uap_tx_power_getset()
1647 tlv_tx_power->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_TX_POWER); in wifi_uap_tx_power_getset()
1648 tlv_tx_power->header.len = wlan_cpu_to_le16(sizeof(t_u8)); in wifi_uap_tx_power_getset()
1653 cmd->size = (uint16_t)size; in wifi_uap_tx_power_getset()
1654 cmd->seq_num = (0x01) << 12; in wifi_uap_tx_power_getset()
1655 cmd->result = 0x00; in wifi_uap_tx_power_getset()
1664 uint32_t size = S_DS_GEN + sizeof(HostCmd_DS_SYS_CONFIG) - 1U; in wifi_uap_sta_ageout_timer_getset()
1669 cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); in wifi_uap_sta_ageout_timer_getset()
1671 uint8_t *tlv = sys_config_cmd->tlv_buffer; in wifi_uap_sta_ageout_timer_getset()
1677 sys_config_cmd->action = HostCmd_ACT_GEN_GET; in wifi_uap_sta_ageout_timer_getset()
1681 sys_config_cmd->action = HostCmd_ACT_GEN_SET; in wifi_uap_sta_ageout_timer_getset()
1682 tlv_sta_ageout_timer->sta_ageout_timer = wlan_cpu_to_le32(*sta_ageout_timer); in wifi_uap_sta_ageout_timer_getset()
1684 tlv_sta_ageout_timer->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_STA_AGEOUT_TIMER); in wifi_uap_sta_ageout_timer_getset()
1685 tlv_sta_ageout_timer->header.len = wlan_cpu_to_le16(sizeof(t_u32)); in wifi_uap_sta_ageout_timer_getset()
1690 cmd->size = (t_u16)size; in wifi_uap_sta_ageout_timer_getset()
1691 cmd->seq_num = (0x01) << 12; in wifi_uap_sta_ageout_timer_getset()
1692 cmd->result = 0x00; in wifi_uap_sta_ageout_timer_getset()
1701 uint32_t size = S_DS_GEN + sizeof(HostCmd_DS_SYS_CONFIG) - 1U; in wifi_uap_ps_sta_ageout_timer_getset()
1706 cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); in wifi_uap_ps_sta_ageout_timer_getset()
1708 uint8_t *tlv = sys_config_cmd->tlv_buffer; in wifi_uap_ps_sta_ageout_timer_getset()
1714 sys_config_cmd->action = HostCmd_ACT_GEN_GET; in wifi_uap_ps_sta_ageout_timer_getset()
1718 sys_config_cmd->action = HostCmd_ACT_GEN_SET; in wifi_uap_ps_sta_ageout_timer_getset()
1719 tlv_ps_sta_ageout_timer->ps_sta_ageout_timer = wlan_cpu_to_le32(*ps_sta_ageout_timer); in wifi_uap_ps_sta_ageout_timer_getset()
1721 tlv_ps_sta_ageout_timer->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_PS_STA_AGEOUT_TIMER); in wifi_uap_ps_sta_ageout_timer_getset()
1722 tlv_ps_sta_ageout_timer->header.len = wlan_cpu_to_le16(sizeof(t_u32)); in wifi_uap_ps_sta_ageout_timer_getset()
1727 cmd->size = (uint16_t)size; in wifi_uap_ps_sta_ageout_timer_getset()
1728 cmd->seq_num = (0x01) << 12; in wifi_uap_ps_sta_ageout_timer_getset()
1729 cmd->result = 0x00; in wifi_uap_ps_sta_ageout_timer_getset()
1738 uint32_t size = S_DS_GEN + sizeof(HostCmd_DS_SYS_CONFIG) - 1U; in wifi_uap_group_rekey_timer_getset()
1743 cmd->command = wlan_cpu_to_le16(HOST_CMD_APCMD_SYS_CONFIGURE); in wifi_uap_group_rekey_timer_getset()
1745 uint8_t *tlv = sys_config_cmd->tlv_buffer; in wifi_uap_group_rekey_timer_getset()
1751 sys_config_cmd->action = HostCmd_ACT_GEN_GET; in wifi_uap_group_rekey_timer_getset()
1755 sys_config_cmd->action = HostCmd_ACT_GEN_SET; in wifi_uap_group_rekey_timer_getset()
1756 tlv_group_rekey_timer->gk_rekey_time = wlan_cpu_to_le32(*group_rekey_timer); in wifi_uap_group_rekey_timer_getset()
1758 tlv_group_rekey_timer->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_GRP_REKEY_TIME); in wifi_uap_group_rekey_timer_getset()
1759 tlv_group_rekey_timer->header.len = wlan_cpu_to_le16(sizeof(t_u32)); in wifi_uap_group_rekey_timer_getset()
1764 cmd->size = (t_u16)size; in wifi_uap_group_rekey_timer_getset()
1765 cmd->seq_num = (0x01) << 12; in wifi_uap_group_rekey_timer_getset()
1766 cmd->result = 0x00; in wifi_uap_group_rekey_timer_getset()
1776 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_send_uap_get_channel_cmd()
1798 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_send_uap_max_sta_num_cmd()
1839 * interest to us as pmpriv->uap_state_chan_cb.band_config and
1840 * pmpriv->uap_state_chan_cb.channel are updated.
1855 cmd->command = wlan_cpu_to_le16(HostCmd_CMD_PMF_PARAMS); in wifi_uap_pmf_getset()
1862 sys_pmf_params->action = HostCmd_ACT_GEN_GET; in wifi_uap_pmf_getset()
1866 sys_pmf_params->action = HostCmd_ACT_GEN_SET; in wifi_uap_pmf_getset()
1869 sys_pmf_params->params.mfpc = *mfpc; in wifi_uap_pmf_getset()
1870 sys_pmf_params->params.mfpr = *mfpr; in wifi_uap_pmf_getset()
1872 cmd->size = (t_u16)size; in wifi_uap_pmf_getset()
1873 cmd->seq_num = (0x01) << 12; in wifi_uap_pmf_getset()
1874 cmd->result = 0x00; in wifi_uap_pmf_getset()
1901 cmd_len = sizeof(HostCmd_DS_GEN) + (sizeof(HostCmd_DS_SYS_CONFIG) - 1) + in wifi_set_sta_mac_filter()
1902 … (sizeof(MrvlIEtypes_mac_filter_t) - 1) + (WLAN_MAX_STA_FILTER_NUM * MLAN_MAC_ADDR_LENGTH); in wifi_set_sta_mac_filter()
1906 cmd_len = sizeof(HostCmd_DS_GEN) + (sizeof(HostCmd_DS_SYS_CONFIG) - 1) + in wifi_set_sta_mac_filter()
1907 (sizeof(MrvlIEtypes_mac_filter_t) - 1) + mac_count * MLAN_MAC_ADDR_LENGTH; in wifi_set_sta_mac_filter()
1915 return -WM_FAIL; in wifi_set_sta_mac_filter()
1923 …MrvlIEtypes_mac_filter_t *)(buffer + sizeof(HostCmd_DS_GEN) + (sizeof(HostCmd_DS_SYS_CONFIG) - 1)); in wifi_set_sta_mac_filter()
1926 cmd_buf->command = HOST_CMD_APCMD_SYS_CONFIGURE; in wifi_set_sta_mac_filter()
1927 cmd_buf->size = cmd_len; in wifi_set_sta_mac_filter()
1928 …cmd_buf->seq_num = HostCmd_SET_SEQ_NO_BSS_INFO(0 /* seq_num */, 0 /* bss_num */, MLAN_BSS_TYPE_UAP… in wifi_set_sta_mac_filter()
1929 cmd_buf->result = 0; in wifi_set_sta_mac_filter()
1931 sys_config->action = HostCmd_ACT_GEN_SET; in wifi_set_sta_mac_filter()
1933 tlv->count = mac_count; in wifi_set_sta_mac_filter()
1934 tlv->filter_mode = filter_mode; in wifi_set_sta_mac_filter()
1935 tlv->header.type = wlan_cpu_to_le16(TLV_TYPE_UAP_STA_MAC_ADDR_FILTER); in wifi_set_sta_mac_filter()
1937 if (tlv->count) in wifi_set_sta_mac_filter()
1939 tlv->header.len = tlv->count * MLAN_MAC_ADDR_LENGTH + 2; in wifi_set_sta_mac_filter()
1940 (void)memcpy(tlv->mac_address, mac_addr, mac_count * MLAN_MAC_ADDR_LENGTH); in wifi_set_sta_mac_filter()
1944 tlv->header.len = WLAN_MAX_STA_FILTER_NUM * MLAN_MAC_ADDR_LENGTH + 2; in wifi_set_sta_mac_filter()
1951 return -WM_FAIL; in wifi_set_sta_mac_filter()
1974 wlan_request_ralist_lock(mlan_adap->priv[1]); in wifi_uap_client_assoc()
1976 if (wlan_11n_get_txbastream_tbl((mlan_private *)mlan_adap->priv[1], sta_addr)) in wifi_uap_client_assoc()
1978 wlan_11n_delete_txbastream_tbl_entry((mlan_private *)mlan_adap->priv[1], sta_addr); in wifi_uap_client_assoc()
1981 wlan_cleanup_reorder_tbl((mlan_private *)mlan_adap->priv[1], sta_addr); in wifi_uap_client_assoc()
1983 wlan_ralist_del_enh(mlan_adap->priv[1], sta_addr); in wifi_uap_client_assoc()
1986 … wlan_11n_create_txbastream_tbl((mlan_private *)mlan_adap->priv[1], sta_addr, BA_STREAM_NOT_SETUP); in wifi_uap_client_assoc()
1987 wlan_11n_update_txbastream_tbl_tx_thresh((mlan_private *)mlan_adap->priv[1], sta_addr, 3); in wifi_uap_client_assoc()
1991 …wlan_11n_update_txbastream_tbl_ampdu_supported((mlan_private *)mlan_adap->priv[1], sta_addr, MTRUE… in wifi_uap_client_assoc()
1994 wlan_release_ralist_lock(mlan_adap->priv[1]); in wifi_uap_client_assoc()
1999 wlan_ralist_add_enh(mlan_adap->priv[1], sta_addr); in wifi_uap_client_assoc()
2006 if ((mlan_private *)mlan_adap->priv[1]->is_11n_enabled) in wifi_uap_client_deauth()
2008 wlan_cleanup_reorder_tbl((mlan_private *)mlan_adap->priv[1], sta_addr); in wifi_uap_client_deauth()
2009 wlan_request_ralist_lock((mlan_private *)mlan_adap->priv[1]); in wifi_uap_client_deauth()
2010 wlan_11n_delete_txbastream_tbl_entry((mlan_private *)mlan_adap->priv[1], sta_addr); in wifi_uap_client_deauth()
2011 wlan_release_ralist_lock((mlan_private *)mlan_adap->priv[1]); in wifi_uap_client_deauth()
2016 wlan_ralist_del_enh(mlan_adap->priv[1], sta_addr); in wifi_uap_client_deauth()
2034 left = rsn_ie->len + 2; in wifi_check_rsn_ie()
2037 sys_config->wpa_cfg.group_cipher = 0; in wifi_check_rsn_ie()
2038 sys_config->wpa_cfg.pairwise_cipher_wpa2 = 0; in wifi_check_rsn_ie()
2039 sys_config->key_mgmt = 0; in wifi_check_rsn_ie()
2041 switch (rsn_ie->group_cipher.type) in wifi_check_rsn_ie()
2044 sys_config->wpa_cfg.group_cipher = CIPHER_TKIP; in wifi_check_rsn_ie()
2050 sys_config->wpa_cfg.group_cipher = CIPHER_AES_CCMP; in wifi_check_rsn_ie()
2055 count = wlan_le16_to_cpu(rsn_ie->pairwise_cipher.count); in wifi_check_rsn_ie()
2058 switch (rsn_ie->pairwise_cipher.list[i].type) in wifi_check_rsn_ie()
2061 sys_config->wpa_cfg.pairwise_cipher_wpa2 |= CIPHER_TKIP; in wifi_check_rsn_ie()
2067 sys_config->wpa_cfg.pairwise_cipher_wpa2 |= CIPHER_AES_CCMP; in wifi_check_rsn_ie()
2073 left -= sizeof(IEEEtypes_Rsn_t) + (count - 1) * sizeof(wpa_suite); in wifi_check_rsn_ie()
2076 …key_mgmt = (wpa_suite_auth_key_mgmt_t *)((u8 *)rsn_ie + sizeof(IEEEtypes_Rsn_t) + (count - 1) * si… in wifi_check_rsn_ie()
2077 count = wlan_le16_to_cpu(key_mgmt->count); in wifi_check_rsn_ie()
2078 if (left < (int)(sizeof(wpa_suite_auth_key_mgmt_t) + (count - 1) * sizeof(wpa_suite))) in wifi_check_rsn_ie()
2082 switch (key_mgmt->list[i].type) in wifi_check_rsn_ie()
2092 sys_config->key_mgmt |= KEY_MGMT_EAP; in wifi_check_rsn_ie()
2098 sys_config->key_mgmt |= KEY_MGMT_PSK; in wifi_check_rsn_ie()
2101 sys_config->key_mgmt |= KEY_MGMT_PSK_SHA256; in wifi_check_rsn_ie()
2108 sys_config->key_mgmt |= KEY_MGMT_SAE; in wifi_check_rsn_ie()
2112 sys_config->key_mgmt |= KEY_MGMT_OWE; in wifi_check_rsn_ie()
2134 left = wpa_ie->len + 2; in wifi_check_wpa_ie()
2137 sys_config->wpa_cfg.group_cipher = 0; in wifi_check_wpa_ie()
2138 sys_config->wpa_cfg.pairwise_cipher_wpa = 0; in wifi_check_wpa_ie()
2139 switch (wpa_ie->group_cipher.type) in wifi_check_wpa_ie()
2142 sys_config->wpa_cfg.group_cipher = CIPHER_TKIP; in wifi_check_wpa_ie()
2145 sys_config->wpa_cfg.group_cipher = CIPHER_AES_CCMP; in wifi_check_wpa_ie()
2150 count = wlan_le16_to_cpu(wpa_ie->pairwise_cipher.count); in wifi_check_wpa_ie()
2153 switch (wpa_ie->pairwise_cipher.list[i].type) in wifi_check_wpa_ie()
2156 sys_config->wpa_cfg.pairwise_cipher_wpa |= CIPHER_TKIP; in wifi_check_wpa_ie()
2159 sys_config->wpa_cfg.pairwise_cipher_wpa |= CIPHER_AES_CCMP; in wifi_check_wpa_ie()
2165 left -= sizeof(IEEEtypes_Wpa_t) + (count - 1) * sizeof(wpa_suite); in wifi_check_wpa_ie()
2168 …key_mgmt = (wpa_suite_auth_key_mgmt_t *)((u8 *)wpa_ie + sizeof(IEEEtypes_Wpa_t) + (count - 1) * si… in wifi_check_wpa_ie()
2169 count = wlan_le16_to_cpu(key_mgmt->count); in wifi_check_wpa_ie()
2170 if (left < (int)(sizeof(wpa_suite_auth_key_mgmt_t) + (count - 1) * sizeof(wpa_suite))) in wifi_check_wpa_ie()
2174 switch (key_mgmt->list[i].type) in wifi_check_wpa_ie()
2177 sys_config->key_mgmt = KEY_MGMT_EAP; in wifi_check_wpa_ie()
2180 sys_config->key_mgmt = KEY_MGMT_PSK; in wifi_check_wpa_ie()
2224 if (!memcmp(pvendor_ie->vend_hdr.oui, wpa_oui, sizeof(pvendor_ie->vend_hdr.oui)) && in wifi_find_wpa_ies()
2225 (pvendor_ie->vend_hdr.oui_type == wpa_oui[3])) in wifi_find_wpa_ies()
2235 bytes_left -= (element_len + 2); in wifi_find_wpa_ies()
2239 sys_config->protocol = PROTOCOL_WPA | PROTOCOL_WPA2; in wifi_find_wpa_ies()
2244 sys_config->protocol = PROTOCOL_WPA2; in wifi_find_wpa_ies()
2249 sys_config->protocol = PROTOCOL_WPA; in wifi_find_wpa_ies()
2289 if (!memcmp(pvendor_ie->vend_hdr.oui, wmm_oui, sizeof(pvendor_ie->vend_hdr.oui)) && in wifi_set_wmm_ies()
2290 pvendor_ie->vend_hdr.oui_type == wmm_oui[3]) in wifi_set_wmm_ies()
2295 if (priv->adapter->usr_dot_11n_enable) in wifi_set_wmm_ies()
2303 … memcpy(&sys_config->wmm_para, pcurrent_ptr + sizeof(IEEEtypes_Header_t), element_len); in wifi_set_wmm_ies()
2305 /** Disable U-APSD for now */ in wifi_set_wmm_ies()
2306 sys_config->wmm_para.qos_info &= 0x7F; in wifi_set_wmm_ies()
2309 sys_config->uap_host_based_config = MTRUE; in wifi_set_wmm_ies()
2314 … memset(sys_config->wmm_para.ac_params, 0x00, sizeof(wmm_ac_parameters_t) * MAX_AC_QUEUES); in wifi_set_wmm_ies()
2326 bytes_left -= (element_len + 2); in wifi_set_wmm_ies()
2411 if (!memcmp(pvendor_ie->vend_hdr.oui, wmm_oui, sizeof(pvendor_ie->vend_hdr.oui)) && in wifi_get_specific_ie()
2412 pvendor_ie->vend_hdr.oui_type == wmm_oui[3]) in wifi_get_specific_ie()
2416 else if (!memcmp(pvendor_ie->vend_hdr.oui, p2p_oui, sizeof(pvendor_ie->vend_hdr.oui)) && in wifi_get_specific_ie()
2417 pvendor_ie->vend_hdr.oui_type == p2p_oui[3]) in wifi_get_specific_ie()
2427 else if (!memcmp(pvendor_ie->vend_hdr.oui, wps_oui, sizeof(pvendor_ie->vend_hdr.oui)) && in wifi_get_specific_ie()
2428 pvendor_ie->vend_hdr.oui_type == wps_oui[3]) in wifi_get_specific_ie()
2444 else if (!memcmp(pvendor_ie->vend_hdr.oui, wfd_oui, sizeof(pvendor_ie->vend_hdr.oui)) && in wifi_get_specific_ie()
2445 pvendor_ie->vend_hdr.oui_type == wfd_oui[3]) in wifi_get_specific_ie()
2476 left_len -= (length + 2); in wifi_get_specific_ie()
2509 left_len -= (length + 2); in wifi_find_ie()
2567 left_len -= (length + 2); in wifi_filter_beacon_ies()
2624 if (priv->uap_channel <= 14) in wifi_filter_beacon_ies()
2629 … wifi_d("Retrieve 11ax cfg by channel=%d band=%d", priv->uap_channel, he_cfg.band); in wifi_filter_beacon_ies()
2636 hecap_ie->ieee_hdr.len = he_cap_len; in wifi_filter_beacon_ies()
2637 hecap_ie->ieee_hdr.element_id = he_cfg.he_cap.id; in wifi_filter_beacon_ies()
2639 __memcpy(priv, ie_out + out_len, hecap_ie, hecap_ie->ieee_hdr.len + 2); in wifi_filter_beacon_ies()
2641 out_len += hecap_ie->ieee_hdr.len + 2; in wifi_filter_beacon_ies()
2692 if (!memcmp(pvendor_ie->vend_hdr.oui, wmm_oui, sizeof(pvendor_ie->vend_hdr.oui)) && in wifi_filter_beacon_ies()
2693 pvendor_ie->vend_hdr.oui_type == wmm_oui[3]) in wifi_filter_beacon_ies()
2698 … else if (!memcmp(pvendor_ie->vend_hdr.oui, wps_oui, sizeof(pvendor_ie->vend_hdr.oui)) && in wifi_filter_beacon_ies()
2699 pvendor_ie->vend_hdr.oui_type == wps_oui[3]) in wifi_filter_beacon_ies()
2705 … else if (!memcmp(pvendor_ie->vend_hdr.oui, p2p_oui, sizeof(pvendor_ie->vend_hdr.oui)) && in wifi_filter_beacon_ies()
2706 pvendor_ie->vend_hdr.oui_type == p2p_oui[3]) in wifi_filter_beacon_ies()
2715 … else if (!memcmp(pvendor_ie->vend_hdr.oui, wfd_oui, sizeof(pvendor_ie->vend_hdr.oui)) && in wifi_filter_beacon_ies()
2716 pvendor_ie->vend_hdr.oui_type == wfd_oui[3]) in wifi_filter_beacon_ies()
2750 left_len -= (length + 2); in wifi_filter_beacon_ies()
2754 if (enable_11d && !priv->bss_started && !wlan_11d_is_enabled(priv)) in wifi_filter_beacon_ies()
2806 return -WM_FAIL; in wifi_nxp_set_mgmt_ies()
2815 if (priv->beacon_vendor_index != -1) in wifi_nxp_set_mgmt_ies()
2817 ret = wifi_clear_mgmt_ie2(MLAN_BSS_TYPE_UAP, priv->beacon_vendor_index); in wifi_nxp_set_mgmt_ies()
2821 ret = -WM_FAIL; in wifi_nxp_set_mgmt_ies()
2824 priv->beacon_vendor_index = -1; in wifi_nxp_set_mgmt_ies()
2835 priv->beacon_vendor_index = in wifi_nxp_set_mgmt_ies()
2839 if (priv->beacon_vendor_index == -1) in wifi_nxp_set_mgmt_ies()
2842 ret = -WM_FAIL; in wifi_nxp_set_mgmt_ies()
2856 beacon_ies_data->ie_index = priv->beacon_index; in wifi_nxp_set_mgmt_ies()
2860 …beacon_ies_data->mgmt_subtype_mask = MGMT_MASK_BEACON | MGMT_MASK_ASSOC_RESP | MGMT_MASK_PROBE_RES… in wifi_nxp_set_mgmt_ies()
2861 beacon_ies_data->ie_length = ie_length; in wifi_nxp_set_mgmt_ies()
2862 memcpy(beacon_ies_data->ie_buffer, (void *)ie_buffer, ie_length); in wifi_nxp_set_mgmt_ies()
2866 beacon_ies_data->mgmt_subtype_mask = MGMT_MASK_CLEAR; in wifi_nxp_set_mgmt_ies()
2882 beacon_wps_ies_data->ie_index = priv->beacon_wps_index; in wifi_nxp_set_mgmt_ies()
2885 beacon_wps_ies_data->mgmt_subtype_mask = MGMT_MASK_BEACON; in wifi_nxp_set_mgmt_ies()
2886 beacon_wps_ies_data->ie_length = ie_length; in wifi_nxp_set_mgmt_ies()
2887 memcpy(beacon_wps_ies_data->ie_buffer, (void *)ie_buffer, ie_length); in wifi_nxp_set_mgmt_ies()
2891 beacon_wps_ies_data->mgmt_subtype_mask = MGMT_MASK_CLEAR; in wifi_nxp_set_mgmt_ies()
2908 proberesp_ies_data->ie_index = priv->proberesp_index; in wifi_nxp_set_mgmt_ies()
2911 proberesp_ies_data->mgmt_subtype_mask = MGMT_MASK_PROBE_RESP; in wifi_nxp_set_mgmt_ies()
2912 proberesp_ies_data->ie_length = ie_length; in wifi_nxp_set_mgmt_ies()
2913 memcpy(proberesp_ies_data->ie_buffer, (void *)ie_buffer, ie_length); in wifi_nxp_set_mgmt_ies()
2917 proberesp_ies_data->mgmt_subtype_mask = MGMT_MASK_CLEAR; in wifi_nxp_set_mgmt_ies()
2932 assocresp_ies_data->ie_index = priv->assocresp_index; in wifi_nxp_set_mgmt_ies()
2935 assocresp_ies_data->mgmt_subtype_mask = MGMT_MASK_ASSOC_RESP; in wifi_nxp_set_mgmt_ies()
2936 assocresp_ies_data->ie_length = ie_len; in wifi_nxp_set_mgmt_ies()
2937 memcpy(assocresp_ies_data->ie_buffer, (void *)ie, ie_len); in wifi_nxp_set_mgmt_ies()
2941 assocresp_ies_data->mgmt_subtype_mask = MGMT_MASK_CLEAR; in wifi_nxp_set_mgmt_ies()
2947 ret = -WM_FAIL; in wifi_nxp_set_mgmt_ies()
2985 mlan_adapter *pmadapter = priv->adapter; in wifi_get_second_channel_offset()
2986 if (pmadapter->region_code != COUNTRY_CODE_US && chan == 165) in wifi_get_second_channel_offset()
3046 * @return Pointer of the specific IE -- success, NULL -- fail
3065 left_len -= (length + 2); in wifi_parse_ie_tlv()
3078 * @return Pointer of the specific Extended IE -- success, NULL
3079 * -- fail
3102 left_len -= (length + 2); in wifi_parse_ext_ie_tlv()
3124 ht_cap_info = wlan_le16_to_cpu(htcap_ie->ht_cap.ht_cap_info); in wifi_get_htcap_info()
3144 wifi_d("Get vht_cap from beacon ies: 0x%x\r\n", vhtcap_ie->vht_cap.vht_cap_info); in wifi_get_vhtcap_info()
3161 wifi_d("Get vht_oprat_ie from beacon ies: chan_width=%d\r\n", vht_oprat_ie->chan_width); in wifi_get_vht_oprat_ie()
3173 * @return 0--success, otherwise failure
3177 mlan_adapter *pmadapter = priv->adapter; in wifi_uap_set_11ac_status2()
3186 if (priv->uap_channel > MAX_CHANNELS_BG) in wifi_uap_set_11ac_status2()
3205 if (vhtcap_ie && vhtcap_ie->vht_cap.vht_cap_info != 0) in wifi_uap_set_11ac_status2()
3207 vht_cfg.vht_cap_info = wlan_le32_to_cpu(vhtcap_ie->vht_cap.vht_cap_info); in wifi_uap_set_11ac_status2()
3213 vht_cfg.vht_cap_info = pmadapter->usr_dot_11ac_dev_cap_a; in wifi_uap_set_11ac_status2()
3215 vht_cfg.vht_cap_info = pmadapter->usr_dot_11ac_dev_cap_bg; in wifi_uap_set_11ac_status2()
3232 vht_cfg.vht_tx_mcs = pmadapter->usr_dot_11ac_mcs_support >> 16; in wifi_uap_set_11ac_status2()
3233 vht_cfg.vht_rx_mcs = pmadapter->usr_dot_11ac_mcs_support & 0xffff; in wifi_uap_set_11ac_status2()
3263 * @return 0--success, otherwise failure
3267 mlan_adapter *pmadapter = pmpriv->adapter; in wifi_uap_set_11ax_status2()
3272 if ((band == BAND_CONFIG_5GHZ && !(pmadapter->fw_bands & BAND_AAX)) || in wifi_uap_set_11ax_status2()
3273 …((band == BAND_CONFIG_ACS_MODE || band == BAND_CONFIG_MANUAL) && !(pmadapter->fw_bands & BAND_GAX)… in wifi_uap_set_11ax_status2()
3276 ret = -WM_FAIL; in wifi_uap_set_11ax_status2()
3283 … (void)memcpy((void *)&he_cfg.he_cap, (const void *)pmadapter->hw_he_cap, pmadapter->hw_hecap_len); in wifi_uap_set_11ax_status2()
3288 …(void)memcpy((void *)&he_cfg.he_cap, (const void *)pmadapter->hw_2g_he_cap, pmadapter->hw_2g_hecap… in wifi_uap_set_11ax_status2()
3297 ret = -WM_E_INVAL; in wifi_uap_set_11ax_status2()
3311 ret = -WM_FAIL; in wifi_uap_set_11ax_status2()
3317 …DBG_HEXDUMP(MCMD_D, "hecap_ie", (t_u8 *)hecap_ie, hecap_ie->ieee_hdr.len + sizeof(IEEEtypes_Header… in wifi_uap_set_11ax_status2()
3318 he_cfg.he_cap.id = hecap_ie->ieee_hdr.element_id; in wifi_uap_set_11ax_status2()
3319 he_cfg.he_cap.len = hecap_ie->ieee_hdr.len; in wifi_uap_set_11ax_status2()
3320 memcpy(&he_cfg.he_cap.ext_id, &hecap_ie->ext_id, he_cfg.he_cap.len); in wifi_uap_set_11ax_status2()
3348 if (priv->uap_channel > MAX_CHANNELS_BG) in wifi_set_uap_dfs_cac()
3350 mlan_private *priv_sta = (mlan_private *)mlan_adap->priv[0]; in wifi_set_uap_dfs_cac()
3351 …if ((priv_sta->media_connected == MTRUE) && wlan_11h_radar_detect_required(priv, priv->uap_channel… in wifi_set_uap_dfs_cac()
3357 cacinfo.center_freq = channel_to_frequency(priv->uap_channel, bandcfg->chanBand); in wifi_set_uap_dfs_cac()
3359 cacinfo.ch_offset = bandcfg->chan2Offset; in wifi_set_uap_dfs_cac()
3362 switch (bandcfg->chanWidth) in wifi_set_uap_dfs_cac()
3374 if (bandcfg->chan2Offset == SEC_CHAN_ABOVE) in wifi_set_uap_dfs_cac()
3376 else if (bandcfg->chan2Offset == SEC_CHAN_BELOW) in wifi_set_uap_dfs_cac()
3377 cacinfo.center_freq1 = cacinfo.center_freq - 10; in wifi_set_uap_dfs_cac()
3383 … center_chan = wlan_get_center_freq_idx(priv, BAND_AAC, priv->uap_channel, CHANNEL_BW_80MHZ); in wifi_set_uap_dfs_cac()
3384 cacinfo.center_freq1 = channel_to_frequency(center_chan, bandcfg->chanBand); in wifi_set_uap_dfs_cac()
3392 /* STA has connected to EXT-AP on DFS channel, then uAP should support start network in wifi_set_uap_dfs_cac()
3397 if (wm_wifi.supp_if_callbk_fns->dfs_cac_started_callbk_fn) in wifi_set_uap_dfs_cac()
3399 … wm_wifi.supp_if_callbk_fns->dfs_cac_started_callbk_fn(wm_wifi.hapd_if_priv, &cacinfo); in wifi_set_uap_dfs_cac()
3401 if (wm_wifi.supp_if_callbk_fns->dfs_cac_finished_callbk_fn) in wifi_set_uap_dfs_cac()
3403 … wm_wifi.supp_if_callbk_fns->dfs_cac_finished_callbk_fn(wm_wifi.hapd_if_priv, &cacinfo); in wifi_set_uap_dfs_cac()
3412 mlan_private *priv = (mlan_private *)mlan_adap->priv[1]; in wifi_nxp_beacon_config()
3414 // mlan_adapter *pmadapter = priv->adapter; in wifi_nxp_beacon_config()
3450 return -WM_FAIL; in wifi_nxp_beacon_config()
3455 ie = (const t_u8 *)params->tail_ie.ie; in wifi_nxp_beacon_config()
3456 ie_len = params->tail_ie.ie_len; in wifi_nxp_beacon_config()
3457 remain_priv = priv->adapter->priv[priv->adapter->remain_bss_index]; in wifi_nxp_beacon_config()
3464 if (params->beacon_set) in wifi_nxp_beacon_config()
3466 …ret = wifi_nxp_set_mgmt_ies(priv, params->tail_ie.ie, params->tail_ie.ie_len, params->beacon_ies.i… in wifi_nxp_beacon_config()
3467 … params->beacon_ies.ie_len, params->proberesp_ies.ie, params->proberesp_ies.ie_len, in wifi_nxp_beacon_config()
3468 params->assocresp_ies.ie, params->assocresp_ies.ie_len); in wifi_nxp_beacon_config()
3472 return -WM_FAIL; in wifi_nxp_beacon_config()
3481 ret = -WM_FAIL; in wifi_nxp_beacon_config()
3487 if (priv->uap_max_sta) in wifi_nxp_beacon_config()
3488 sys_config->max_sta_count = priv->uap_max_sta; in wifi_nxp_beacon_config()
3491 sys_config->channel = params->chan.channel; in wifi_nxp_beacon_config()
3492 priv->uap_channel = sys_config->channel; in wifi_nxp_beacon_config()
3493 if (priv->uap_channel != 0U) in wifi_nxp_beacon_config()
3496 if (priv->uap_channel > MAX_CHANNELS_BG) in wifi_nxp_beacon_config()
3498 mlan_private *priv_sta = (mlan_private *)mlan_adap->priv[0]; in wifi_nxp_beacon_config()
3499 …if ((priv_sta->media_connected == MFALSE) && wlan_11h_radar_detect_required(priv, priv->uap_channe… in wifi_nxp_beacon_config()
3501 wuap_e("Cannot start uAP on DFS channel %d", priv->uap_channel); in wifi_nxp_beacon_config()
3502 ret = -WM_FAIL; in wifi_nxp_beacon_config()
3517 sys_config->preamble_type = 0; in wifi_nxp_beacon_config()
3518 sys_config->mgmt_ie_passthru_mask = priv->mgmt_frame_passthru_mask; in wifi_nxp_beacon_config()
3519 memcpy(sys_config->mac_addr, params->bssid, ETH_ALEN); in wifi_nxp_beacon_config()
3522 sys_config->frag_threshold = MLAN_FRAG_MAX_VALUE; in wifi_nxp_beacon_config()
3523 sys_config->rts_threshold = MLAN_RTS_MAX_VALUE; in wifi_nxp_beacon_config()
3525 sys_config->pwe_derivation = params->sae_pwe; in wifi_nxp_beacon_config()
3527 if (params->beacon_int) in wifi_nxp_beacon_config()
3528 sys_config->beacon_period = params->beacon_int; in wifi_nxp_beacon_config()
3530 if (params->dtim_period) in wifi_nxp_beacon_config()
3531 sys_config->dtim_period = params->dtim_period; in wifi_nxp_beacon_config()
3533 if (sys_config->channel <= MAX_CHANNELS_BG) in wifi_nxp_beacon_config()
3535 if (sys_config->channel == 14) in wifi_nxp_beacon_config()
3537 memcpy(sys_config->rates, rates_b, sizeof(rates_b)); in wifi_nxp_beacon_config()
3541 memcpy(sys_config->rates, rates_bg, sizeof(rates_bg)); in wifi_nxp_beacon_config()
3547 memcpy(sys_config->rates, rates_a, sizeof(rates_a)); in wifi_nxp_beacon_config()
3551 if (params->chan.ht_enabled != 1) in wifi_nxp_beacon_config()
3556 if (params->chan.sec_channel_offset == 1) in wifi_nxp_beacon_config()
3560 else if (params->chan.sec_channel_offset == -1) in wifi_nxp_beacon_config()
3565 if (params->chan.bandwidth == 20) in wifi_nxp_beacon_config()
3570 else if (params->chan.bandwidth == 40) in wifi_nxp_beacon_config()
3576 else if (params->chan.bandwidth == 80) in wifi_nxp_beacon_config()
3580 chan2Offset = wifi_get_second_channel_offset(priv, priv->uap_channel); in wifi_nxp_beacon_config()
3585 (void)memcpy((void *)&sys_config->band_cfg, (const void *)&bandcfg, sizeof(bandcfg)); in wifi_nxp_beacon_config()
3588 if (params->chan.vht_enabled == 1) in wifi_nxp_beacon_config()
3598 if (params->chan.he_enabled == 1) in wifi_nxp_beacon_config()
3605 sys_config->ht_cap_info = 0x10c; in wifi_nxp_beacon_config()
3607 sys_config->ht_cap_info |= 0x20; in wifi_nxp_beacon_config()
3610 sys_config->ht_cap_info |= 0x1042; in wifi_nxp_beacon_config()
3611 sys_config->ampdu_param = 3; in wifi_nxp_beacon_config()
3620 sys_config->ht_cap_info = (ht_cap & 0x13ff) | 0x0c; in wifi_nxp_beacon_config()
3622 sys_config->ht_cap_info = (ht_cap & 0x13ff) | 0x0c; in wifi_nxp_beacon_config()
3627 … enable_11n, sys_config->ht_cap_info, priv->uap_channel, bandcfg.chanBand, bandcfg.chanWidth, in wifi_nxp_beacon_config()
3633 wuap_e("Cannot set uAP HT TX Cfg:%x", sys_config->ht_cap_info); in wifi_nxp_beacon_config()
3634 ret = -WM_FAIL; in wifi_nxp_beacon_config()
3638 sys_config->ampdu_param = 3; in wifi_nxp_beacon_config()
3644 (void)memcpy((void *)sys_config->supported_mcs_set, (const void *)supported_mcs_set, in wifi_nxp_beacon_config()
3645 sizeof(sys_config->supported_mcs_set)); in wifi_nxp_beacon_config()
3648 if (!params->ssid.ssid_len) in wifi_nxp_beacon_config()
3650 ret = -WM_FAIL; in wifi_nxp_beacon_config()
3653 …memcpy(sys_config->ssid.ssid, params->ssid.ssid, MIN(MLAN_MAX_SSID_LENGTH, params->ssid.ssid_len)); in wifi_nxp_beacon_config()
3654 sys_config->ssid.ssid_len = MIN(MLAN_MAX_SSID_LENGTH, params->ssid.ssid_len); in wifi_nxp_beacon_config()
3660 if (!params->hide_ssid) in wifi_nxp_beacon_config()
3661 sys_config->bcast_ssid_ctl = 1; in wifi_nxp_beacon_config()
3662 else if (params->hide_ssid == 1) in wifi_nxp_beacon_config()
3663 sys_config->bcast_ssid_ctl = 0; in wifi_nxp_beacon_config()
3664 else if (params->hide_ssid == 2) in wifi_nxp_beacon_config()
3665 sys_config->bcast_ssid_ctl = 2; in wifi_nxp_beacon_config()
3667 sys_config->auth_mode = MLAN_AUTH_MODE_OPEN; in wifi_nxp_beacon_config()
3669 sys_config->protocol = PROTOCOL_NO_SECURITY; in wifi_nxp_beacon_config()
3670 …if ((params->wpa_version & WIFI_NXP_WPA_VERSION_1) && (params->wpa_version & WIFI_NXP_WPA_VERSION_… in wifi_nxp_beacon_config()
3671 sys_config->protocol = PROTOCOL_WPA | PROTOCOL_WPA2; in wifi_nxp_beacon_config()
3672 else if (params->wpa_version & WIFI_NXP_WPA_VERSION_2) in wifi_nxp_beacon_config()
3673 sys_config->protocol = PROTOCOL_WPA2; in wifi_nxp_beacon_config()
3674 else if (params->wpa_version & WIFI_NXP_WPA_VERSION_1) in wifi_nxp_beacon_config()
3675 sys_config->protocol = PROTOCOL_WPA; in wifi_nxp_beacon_config()
3677 if (params->key_mgmt_suites || (params->privacy && params->wpa_version)) in wifi_nxp_beacon_config()
3689 if (vhtopr_ie && vhtopr_ie->chan_width) in wifi_nxp_beacon_config()
3708 if (params->ap_max_inactivity) in wifi_nxp_beacon_config()
3710 sys_config->sta_ageout_timer = params->ap_max_inactivity * 10; in wifi_nxp_beacon_config()
3711 sys_config->ps_sta_ageout_timer = params->ap_max_inactivity * 10; in wifi_nxp_beacon_config()
3713 PRINTM(MIOCTL, "inactivity_timeout=%d\n", params->ap_max_inactivity); in wifi_nxp_beacon_config()
3714 PRINTM(MIOCTL, "sta_ageout_timer=%d ps_sta_ageout_timer=%d\n", sys_config->sta_ageout_timer, in wifi_nxp_beacon_config()
3715 sys_config->ps_sta_ageout_timer); in wifi_nxp_beacon_config()
3720 ret = -WM_FAIL; in wifi_nxp_beacon_config()
3724 …ret = wifi_nxp_set_mgmt_ies(priv, params->tail_ie.ie, params->tail_ie.ie_len, params->beacon_ies.i… in wifi_nxp_beacon_config()
3725 … params->beacon_ies.ie_len, params->proberesp_ies.ie, params->proberesp_ies.ie_len, in wifi_nxp_beacon_config()
3726 params->assocresp_ies.ie, params->assocresp_ies.ie_len); in wifi_nxp_beacon_config()
3730 ret = -WM_FAIL; in wifi_nxp_beacon_config()
3737 wm_wifi.uap_support_11d_apis->wifi_uap_downld_domain_params_p(BAND_B); in wifi_nxp_beacon_config()
3739 wm_wifi.uap_support_11d_apis->wifi_uap_downld_domain_params_p(BAND_A); in wifi_nxp_beacon_config()
3746 priv->uap_host_based = MTRUE; in wifi_nxp_beacon_config()
3748 if (!params->beacon_set) in wifi_nxp_beacon_config()
3757 priv->uap_host_based = MFALSE; in wifi_nxp_beacon_config()
3758 ret = -WM_FAIL; in wifi_nxp_beacon_config()
3781 mlan_private *priv = (mlan_private *)mlan_adap->priv[1]; in wifi_setup_ht_cap()
3782 mlan_adapter *pmadapter = priv->adapter; in wifi_setup_ht_cap()
3796 usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_a; in wifi_setup_ht_cap()
3801 usr_dot_11n_dev_cap = pmadapter->usr_dot_11n_dev_cap_bg; in wifi_setup_ht_cap()
3857 rx_mcs_supp = GET_RXMCSSUPP(pmadapter->usr_dev_mcs_support); in wifi_setup_ht_cap()
3861 (void)__memset(pmadapter, (t_u8 *)&mcs_set[rx_mcs_supp], 0, NUM_MCS_FIELD - rx_mcs_supp); in wifi_setup_ht_cap()
3889 const chan_freq_power_t *pchans_get = region->pcfp; in wifi_setup_channel_flag()
3892 for (i = 0; i < MAX(num_chan, region->num_cfp); i++) in wifi_setup_channel_flag()
3897 if (get_idx >= region->num_cfp) in wifi_setup_channel_flag()
3937 if (pmadapter->region_channel[0].valid) in wifi_setup_channel_info()
3938 region = &pmadapter->region_channel[0]; in wifi_setup_channel_info()
3939 else if (pmadapter->universal_channel[0].valid) in wifi_setup_channel_info()
3940 region = &pmadapter->universal_channel[0]; in wifi_setup_channel_info()
3948 if (pmadapter->region_channel[1].valid) in wifi_setup_channel_info()
3949 region = &pmadapter->region_channel[1]; in wifi_setup_channel_info()
3950 else if (pmadapter->universal_channel[1].valid) in wifi_setup_channel_info()
3951 region = &pmadapter->universal_channel[1]; in wifi_setup_channel_info()
3966 mlan_private *priv = (mlan_private *)mlan_adap->priv[1]; in wifi_setup_vht_cap()
3967 mlan_adapter *pmadapter = priv->adapter; in wifi_setup_vht_cap()
3973 *vht_capab = pmadapter->usr_dot_11ac_dev_cap_a; in wifi_setup_vht_cap()
3989 vht_tx_mcs = pmadapter->usr_dot_11ac_mcs_support >> 16; in wifi_setup_vht_cap()
3990 vht_rx_mcs = pmadapter->usr_dot_11ac_mcs_support & 0xffff; in wifi_setup_vht_cap()
4027 Bit1-7: 0x2 (Supported Channel Width Set.
4029 Bit8-11: 0x3 (Punctured Preamble Rx.
4033 Bit17: 0x1 (NDP with 4xHE-LTF+3.2usGI)
4038 Bit24-25: 0x1 (DCM Max Constellation Tx)
4039 Bit27-28: 0x1 (DCM Max Constellation Rx)
4042 Bit34-36: 0x7 (Beamformee STS <= 80 MHz)
4043 Bit40-42: 0x1 (Number of Sounding Dimentions <= 80 MHz)
4047 Bit58: 0x1 (HE SU PPDU and HE MU PPDU with 4xHE-LTF+0.8usGI)
4048 Bit59-61: 0x1 (Max Nc)
4049 Bit64: 0x1 (HE ER SU PPDU with 4xHE-LTF+0.8usGI)
4050 Bit75: 0x1 (Rx 1024-QAM Support < 242-tone RU)
4080 Bit1-7: 0x1 (Supported Channel Width Set)
4081 Bit8-11: 0x0 (Punctured Preamble Rx)
4089 Bit24-25: 0x1 (DCM Max Constellation Tx)
4090 Bit27-28: 0x1 (DCM Max Constellation Rx)
4093 Bit34-36: 0x7 (Beamformee STS <= 80 MHz)
4094 Bit40-42: 0x1 (Number of Sounding Dimentions <= 80 MHz)
4098 Bit58: 0x1 (HE SU PPDU and HE MU PPDU with 4xHE-LTF+0.8usGI)
4099 Bit59-61: 0x1 (Max Nc)
4100 Bit64: 0x1 (HE ER SU PPDU with 4xHE-LTF+0.8usGI)
4101 Bit75: 0x1 (Rx 1024-QAM Support < 242-tone RU)
4126 * @return 0--success, otherwise failure
4136 hecap_ie->he_mac_cap[0] &= UAP_HE_MAC_CAP0_MASK; in wifi_uap_update_11ax_ie()
4137 hecap_ie->he_mac_cap[1] &= UAP_HE_MAC_CAP1_MASK; in wifi_uap_update_11ax_ie()
4138 hecap_ie->he_mac_cap[2] &= UAP_HE_MAC_CAP2_MASK; in wifi_uap_update_11ax_ie()
4139 hecap_ie->he_mac_cap[3] &= UAP_HE_MAC_CAP3_MASK; in wifi_uap_update_11ax_ie()
4140 hecap_ie->he_mac_cap[4] &= UAP_HE_MAC_CAP4_MASK; in wifi_uap_update_11ax_ie()
4141 hecap_ie->he_mac_cap[5] &= UAP_HE_MAC_CAP5_MASK; in wifi_uap_update_11ax_ie()
4142 hecap_ie->he_phy_cap[0] &= UAP_HE_PHY_CAP0_MASK; in wifi_uap_update_11ax_ie()
4143 hecap_ie->he_phy_cap[1] &= UAP_HE_PHY_CAP1_MASK; in wifi_uap_update_11ax_ie()
4144 hecap_ie->he_phy_cap[2] &= UAP_HE_PHY_CAP2_MASK; in wifi_uap_update_11ax_ie()
4145 hecap_ie->he_phy_cap[3] &= UAP_HE_PHY_CAP3_MASK; in wifi_uap_update_11ax_ie()
4146 hecap_ie->he_phy_cap[4] &= UAP_HE_PHY_CAP4_MASK; in wifi_uap_update_11ax_ie()
4147 hecap_ie->he_phy_cap[5] &= UAP_HE_PHY_CAP5_MASK; in wifi_uap_update_11ax_ie()
4148 hecap_ie->he_phy_cap[6] &= UAP_HE_PHY_CAP6_MASK; in wifi_uap_update_11ax_ie()
4149 hecap_ie->he_phy_cap[7] &= UAP_HE_PHY_CAP7_MASK; in wifi_uap_update_11ax_ie()
4150 hecap_ie->he_phy_cap[8] &= UAP_HE_PHY_CAP8_MASK; in wifi_uap_update_11ax_ie()
4151 hecap_ie->he_phy_cap[9] &= UAP_HE_PHY_CAP9_MASK; in wifi_uap_update_11ax_ie()
4152 hecap_ie->he_phy_cap[10] &= UAP_HE_PHY_CAP10_MASK; in wifi_uap_update_11ax_ie()
4156 hecap_ie->he_mac_cap[0] &= UAP_HE_2G_MAC_CAP0_MASK; in wifi_uap_update_11ax_ie()
4157 hecap_ie->he_mac_cap[1] &= UAP_HE_2G_MAC_CAP1_MASK; in wifi_uap_update_11ax_ie()
4158 hecap_ie->he_mac_cap[2] &= UAP_HE_2G_MAC_CAP2_MASK; in wifi_uap_update_11ax_ie()
4159 hecap_ie->he_mac_cap[3] &= UAP_HE_2G_MAC_CAP3_MASK; in wifi_uap_update_11ax_ie()
4160 hecap_ie->he_mac_cap[4] &= UAP_HE_2G_MAC_CAP4_MASK; in wifi_uap_update_11ax_ie()
4161 hecap_ie->he_mac_cap[5] &= UAP_HE_2G_MAC_CAP5_MASK; in wifi_uap_update_11ax_ie()
4162 hecap_ie->he_phy_cap[0] &= UAP_HE_2G_PHY_CAP0_MASK; in wifi_uap_update_11ax_ie()
4163 hecap_ie->he_phy_cap[1] &= UAP_HE_2G_PHY_CAP1_MASK; in wifi_uap_update_11ax_ie()
4164 hecap_ie->he_phy_cap[2] &= UAP_HE_2G_PHY_CAP2_MASK; in wifi_uap_update_11ax_ie()
4165 hecap_ie->he_phy_cap[3] &= UAP_HE_2G_PHY_CAP3_MASK; in wifi_uap_update_11ax_ie()
4166 hecap_ie->he_phy_cap[4] &= UAP_HE_2G_PHY_CAP4_MASK; in wifi_uap_update_11ax_ie()
4167 hecap_ie->he_phy_cap[5] &= UAP_HE_2G_PHY_CAP5_MASK; in wifi_uap_update_11ax_ie()
4168 hecap_ie->he_phy_cap[6] &= UAP_HE_2G_PHY_CAP6_MASK; in wifi_uap_update_11ax_ie()
4169 hecap_ie->he_phy_cap[7] &= UAP_HE_2G_PHY_CAP7_MASK; in wifi_uap_update_11ax_ie()
4170 hecap_ie->he_phy_cap[8] &= UAP_HE_2G_PHY_CAP8_MASK; in wifi_uap_update_11ax_ie()
4171 hecap_ie->he_phy_cap[9] &= UAP_HE_2G_PHY_CAP9_MASK; in wifi_uap_update_11ax_ie()
4172 hecap_ie->he_phy_cap[10] &= UAP_HE_2G_PHY_CAP10_MASK; in wifi_uap_update_11ax_ie()
4189 mlan_private *priv = (mlan_private *)mlan_adap->priv[1]; in wifi_setup_he_cap()
4226 return -WM_FAIL; in wifi_setup_he_cap()
4228 he_cap->he_supported = 1; in wifi_setup_he_cap()
4229 (void)__memcpy(priv, he_cap->mac_cap, phe_cap->he_mac_cap, sizeof(phe_cap->he_mac_cap)); in wifi_setup_he_cap()
4230 (void)__memcpy(priv, he_cap->phy_cap, phe_cap->he_phy_cap, sizeof(phe_cap->he_phy_cap)); in wifi_setup_he_cap()
4231 memset(&he_cap->mcs, 0xff, WIFI_HE_MAX_MCS_CAPAB_SIZE); in wifi_setup_he_cap()
4232 …(void)__memcpy(priv, &he_cap->mcs, phe_cap->he_txrx_mcs_support, sizeof(phe_cap->he_txrx_mcs_suppo… in wifi_setup_he_cap()
4235 if (phe_cap->he_phy_cap[0] & MBIT(3)) in wifi_setup_he_cap()
4239 if (phe_cap->he_phy_cap[0] & MBIT(4)) in wifi_setup_he_cap()
4242 …(void)__memcpy(priv, (t_u8 *)&he_cap->mcs + sizeof(phe_cap->he_txrx_mcs_support), phe_cap->val, ex… in wifi_setup_he_cap()
4246 ppe_threshold_len = phe_cap->len - HE_CAP_FIX_SIZE - extra_mcs_size; in wifi_setup_he_cap()
4247 if (phe_cap->he_phy_cap[6] & MBIT(7) && ppe_threshold_len) in wifi_setup_he_cap()
4249 (void)__memcpy(priv, he_cap->ppet, &phe_cap->val[extra_mcs_size], ppe_threshold_len); in wifi_setup_he_cap()
4253 he_cap->phy_cap[6] &= ~MBIT(7); in wifi_setup_he_cap()
4254 wifi_d("Clear PPE threshold 0x%x\r\n", he_cap->phy_cap[7]); in wifi_setup_he_cap()
4257 if (band->band == BAND_6GHZ) in wifi_setup_he_cap()
4258 iftype_data->he_6ghz_capa.capa = fw_info.hw_he_6g_cap; in wifi_setup_he_cap()
4295 …moal_memcpy_ext(priv->phandle, &he_cfg.he_cap, phe_cap, hw_hecap_len, sizeof(mlan_ds_11ax_he_capa)… in woal_cfg80211_setup_uap_he_cap()
4315 …moal_memcpy_ext(priv->phandle, &he_cfg.he_cap, phe_cap, hw_hecap_len, sizeof(mlan_ds_11ax_he_capa)… in woal_cfg80211_setup_uap_he_cap()
4353 …&bss.param.sta_info, (const void *)sta_info, sizeof(mlan_ds_sta_info) + (size_t)sta_info->tlv_len); in wifi_uap_sta_info()
4403 mlan_private *priv = (mlan_private *)mlan_adap->priv[1]; in wifi_nxp_sta_add()
4418 ret = -WM_FAIL; in wifi_nxp_sta_add()
4423 if (params->ext_capab_len) in wifi_nxp_sta_add()
4424 req_len += sizeof(MrvlIEtypesHeader_t) + params->ext_capab_len; in wifi_nxp_sta_add()
4425 if (params->supp_rates_len) in wifi_nxp_sta_add()
4426 req_len += sizeof(MrvlIEtypesHeader_t) + params->supp_rates_len; in wifi_nxp_sta_add()
4427 if (params->qosinfo) in wifi_nxp_sta_add()
4429 if (params->ht_capab_len) in wifi_nxp_sta_add()
4432 if (params->vht_capab_len) in wifi_nxp_sta_add()
4437 if (params->he_capab_len) in wifi_nxp_sta_add()
4438 req_len += sizeof(MrvlExtIEtypesHeader_t) + params->he_capab_len; in wifi_nxp_sta_add()
4445 ret = -WM_FAIL; in wifi_nxp_sta_add()
4451 sta_info->listen_interval = params->listen_interval; in wifi_nxp_sta_add()
4452 sta_info->aid = params->aid; in wifi_nxp_sta_add()
4453 sta_info->cap_info = params->capability; in wifi_nxp_sta_add()
4454 sta_info->tlv_len = 0; in wifi_nxp_sta_add()
4455 sta_info->sta_flags = params->flags; in wifi_nxp_sta_add()
4457 memcpy(sta_info->peer_mac, params->addr, MLAN_MAC_ADDR_LENGTH); in wifi_nxp_sta_add()
4459 wuap_d("wlan: UAP/GO add peer station, address =" MACSTR "", MAC2STR(params->addr)); in wifi_nxp_sta_add()
4461 …wuap_d("sta_flags=0x%x listen_interval=%d aid=%d cap_info=0x%x", params->flags, params->listen_int… in wifi_nxp_sta_add()
4462 params->aid, params->capability); in wifi_nxp_sta_add()
4464 pos = &sta_info->tlv[0]; in wifi_nxp_sta_add()
4465 if (params->ext_capab_len) in wifi_nxp_sta_add()
4468 tlv->header.type = EXT_CAPABILITY; in wifi_nxp_sta_add()
4469 tlv->header.len = params->ext_capab_len; in wifi_nxp_sta_add()
4470 memcpy(tlv->data, params->ext_capab, tlv->header.len); in wifi_nxp_sta_add()
4471 pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len; in wifi_nxp_sta_add()
4472 sta_info->tlv_len += sizeof(MrvlIEtypesHeader_t) + tlv->header.len; in wifi_nxp_sta_add()
4475 if (params->supp_rates_len) in wifi_nxp_sta_add()
4478 tlv->header.type = SUPPORTED_RATES; in wifi_nxp_sta_add()
4479 tlv->header.len = params->supp_rates_len; in wifi_nxp_sta_add()
4480 memcpy(tlv->data, params->supp_rates, tlv->header.len); in wifi_nxp_sta_add()
4481 pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len; in wifi_nxp_sta_add()
4482 sta_info->tlv_len += sizeof(MrvlIEtypesHeader_t) + tlv->header.len; in wifi_nxp_sta_add()
4485 if (params->qosinfo) in wifi_nxp_sta_add()
4488 tlv->header.type = QOS_INFO; in wifi_nxp_sta_add()
4489 tlv->header.len = sizeof(qosinfo); in wifi_nxp_sta_add()
4490 qosinfo = params->qosinfo; in wifi_nxp_sta_add()
4491 memcpy(tlv->data, &qosinfo, tlv->header.len); in wifi_nxp_sta_add()
4492 pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len; in wifi_nxp_sta_add()
4493 sta_info->tlv_len += sizeof(MrvlIEtypesHeader_t) + tlv->header.len; in wifi_nxp_sta_add()
4496 if (params->ht_capab_len) in wifi_nxp_sta_add()
4499 tlv->header.type = HT_CAPABILITY; in wifi_nxp_sta_add()
4500 tlv->header.len = sizeof(ieee80211_ht_capab_t); in wifi_nxp_sta_add()
4501 memcpy(tlv->data, ¶ms->ht_capab, tlv->header.len); in wifi_nxp_sta_add()
4502 pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len; in wifi_nxp_sta_add()
4503 sta_info->tlv_len += sizeof(MrvlIEtypesHeader_t) + tlv->header.len; in wifi_nxp_sta_add()
4507 if (params->vht_capab_len) in wifi_nxp_sta_add()
4510 tlv->header.type = VHT_CAPABILITY; in wifi_nxp_sta_add()
4511 tlv->header.len = sizeof(ieee80211_vht_capab_t); in wifi_nxp_sta_add()
4512 memcpy(tlv->data, ¶ms->vht_capab, tlv->header.len); in wifi_nxp_sta_add()
4513 pos += sizeof(MrvlIEtypesHeader_t) + tlv->header.len; in wifi_nxp_sta_add()
4514 sta_info->tlv_len += sizeof(MrvlIEtypesHeader_t) + tlv->header.len; in wifi_nxp_sta_add()
4519 if (params->he_capab_len) in wifi_nxp_sta_add()
4522 ext_tlv->header.type = EXTENSION; in wifi_nxp_sta_add()
4523 ext_tlv->header.len = params->he_capab_len + sizeof(u8); in wifi_nxp_sta_add()
4524 ext_tlv->header.ext_id = HE_CAPABILITY; in wifi_nxp_sta_add()
4525 memcpy(ext_tlv->data, (u8 *)¶ms->he_capab, params->he_capab_len); in wifi_nxp_sta_add()
4526 pos += sizeof(MrvlExtIEtypesHeader_t) + params->he_capab_len; in wifi_nxp_sta_add()
4527 sta_info->tlv_len += sizeof(MrvlExtIEtypesHeader_t) + params->he_capab_len; in wifi_nxp_sta_add()
4535 ret = -WM_FAIL; in wifi_nxp_sta_add()
4549 mlan_private *priv = (mlan_private *)mlan_adap->priv[1]; in wifi_nxp_sta_remove()
4558 ret = -WM_FAIL; in wifi_nxp_sta_remove()
4565 ret = -WM_FAIL; in wifi_nxp_sta_remove()
4574 ret = -WM_FAIL; in wifi_nxp_sta_remove()
4580 memcpy(sta_info->peer_mac, addr, MLAN_MAC_ADDR_LENGTH); in wifi_nxp_sta_remove()
4587 ret = -WM_FAIL; in wifi_nxp_sta_remove()
4604 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_set_uap_rts()
4630 mlan_private *pmpriv = (mlan_private *)mlan_adap->priv[1]; in wifi_set_uap_frag()
4662 …pmgmt_pkt_hdr = wifi_PrepDefaultMgtMsg(SUBTYPE_DEAUTH, (mlan_802_11_mac_addr *)(void *)priv->curr_… in wifi_nxp_uap_disconnect()
4663 (mlan_802_11_mac_addr *)(void *)mac, (mlan_802_11_mac_addr *)(void *)priv->curr_addr, 100); in wifi_nxp_uap_disconnect()
4673 payload_len = sizeof(reason) + sizeof(pmgmt_pkt_hdr->wlan_header); in wifi_nxp_uap_disconnect()
4675 if (payload_len <= (int)sizeof(mgmt_rx->frame.frame)) in wifi_nxp_uap_disconnect()
4678 mgmt_rx->frame.frame_len = payload_len; in wifi_nxp_uap_disconnect()
4679 …(void)memcpy((void *)mgmt_rx->frame.frame, (const void *)(&pmgmt_pkt_hdr->wlan_header), mgmt_rx->f… in wifi_nxp_uap_disconnect()
4680 if (wm_wifi.supp_if_callbk_fns->mgmt_rx_callbk_fn) in wifi_nxp_uap_disconnect()
4682 wm_wifi.supp_if_callbk_fns->mgmt_rx_callbk_fn(wm_wifi.hapd_if_priv, in wifi_nxp_uap_disconnect()
4683 mgmt_rx, mgmt_rx->frame.frame_len, -30); in wifi_nxp_uap_disconnect()
4700 mlan_private *priv = (mlan_private *)mlan_adap->priv[1]; in wifi_nxp_stop_ap()
4703 if ((mlan_adap->in_reset == MTRUE) && (priv->media_connected == MFALSE)) in wifi_nxp_stop_ap()
4710 if (priv->beacon_vendor_index != -1) in wifi_nxp_stop_ap()
4712 ret = wifi_clear_mgmt_ie2(MLAN_BSS_TYPE_UAP, priv->beacon_vendor_index); in wifi_nxp_stop_ap()
4716 return -WM_FAIL; in wifi_nxp_stop_ap()
4718 priv->beacon_vendor_index = -1; in wifi_nxp_stop_ap()
4725 ret = -WM_FAIL; in wifi_nxp_stop_ap()
4734 return -WM_FAIL; in wifi_nxp_stop_ap()
4737 priv->uap_host_based = MFALSE; in wifi_nxp_stop_ap()
4755 mlan_private *priv = (mlan_private *)mlan_adap->priv[1]; in wifi_nxp_set_acl()
4756 int ret = -WM_FAIL; in wifi_nxp_set_acl()
4775 if (params->num_mac_acl <= MAX_MAC_FILTER_NUM) in wifi_nxp_set_acl()
4776 sys_config->filter.mac_count = params->num_mac_acl; in wifi_nxp_set_acl()
4778 sys_config->filter.mac_count = MAX_MAC_FILTER_NUM; in wifi_nxp_set_acl()
4780 if (params->acl_policy == 1U) in wifi_nxp_set_acl()
4781 sys_config->filter.filter_mode = MAC_FILTER_MODE_ALLOW_MAC; in wifi_nxp_set_acl()
4782 else if (params->acl_policy == 0U) in wifi_nxp_set_acl()
4783 sys_config->filter.filter_mode = MAC_FILTER_MODE_BLOCK_MAC; in wifi_nxp_set_acl()
4784 …memcpy(sys_config->filter.mac_list, params->mac_acl, sys_config->filter.mac_count * sizeof(mlan_80… in wifi_nxp_set_acl()
4786 if (priv->uap_host_based == MTRUE) in wifi_nxp_set_acl()