Lines Matching refs:msg_body

454 #define __INIT_HAL_MSG(msg_body, type, version) \  argument
456 memset(&(msg_body), 0, sizeof(msg_body)); \
457 (msg_body).header.msg_type = type; \
458 (msg_body).header.msg_version = version; \
459 (msg_body).header.len = sizeof(msg_body); \
462 #define INIT_HAL_MSG(msg_body, type) \ argument
463 __INIT_HAL_MSG(msg_body, type, WCN36XX_HAL_MSG_VERSION0)
465 #define INIT_HAL_MSG_V1(msg_body, type) \ argument
466 __INIT_HAL_MSG(msg_body, type, WCN36XX_HAL_MSG_VERSION1)
476 #define PREPARE_HAL_BUF(send_buf, msg_body) \ argument
478 memcpy_and_pad(send_buf, msg_body.header.len, \
479 &msg_body, sizeof(msg_body), 0); \
507 struct wcn36xx_hal_nv_img_download_req_msg msg_body; in wcn36xx_smd_load_nv() local
522 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DOWNLOAD_NV_REQ); in wcn36xx_smd_load_nv()
524 msg_body.header.len += WCN36XX_NV_FRAGMENT_SIZE; in wcn36xx_smd_load_nv()
526 msg_body.frag_number = 0; in wcn36xx_smd_load_nv()
533 msg_body.last_fragment = 0; in wcn36xx_smd_load_nv()
534 msg_body.nv_img_buffer_size = WCN36XX_NV_FRAGMENT_SIZE; in wcn36xx_smd_load_nv()
536 msg_body.last_fragment = 1; in wcn36xx_smd_load_nv()
537 msg_body.nv_img_buffer_size = fw_bytes_left; in wcn36xx_smd_load_nv()
540 msg_body.header.len = sizeof(msg_body) + fw_bytes_left; in wcn36xx_smd_load_nv()
545 memcpy(wcn->hal_buf, &msg_body, sizeof(msg_body)); in wcn36xx_smd_load_nv()
548 memcpy(wcn->hal_buf + sizeof(msg_body), in wcn36xx_smd_load_nv()
550 msg_body.nv_img_buffer_size); in wcn36xx_smd_load_nv()
552 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_load_nv()
562 msg_body.frag_number++; in wcn36xx_smd_load_nv()
565 } while (msg_body.last_fragment != 1); in wcn36xx_smd_load_nv()
614 struct wcn36xx_hal_mac_start_req_msg msg_body, *body; in wcn36xx_smd_start() local
622 INIT_HAL_MSG(msg_body, WCN36XX_HAL_START_REQ); in wcn36xx_smd_start()
624 msg_body.params.type = DRIVER_TYPE_PRODUCTION; in wcn36xx_smd_start()
625 msg_body.params.len = 0; in wcn36xx_smd_start()
627 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_start()
650 msg_body.params.type); in wcn36xx_smd_start()
671 struct wcn36xx_hal_mac_stop_req_msg msg_body; in wcn36xx_smd_stop() local
675 INIT_HAL_MSG(msg_body, WCN36XX_HAL_STOP_REQ); in wcn36xx_smd_stop()
677 msg_body.stop_req_params.reason = HAL_STOP_TYPE_RF_KILL; in wcn36xx_smd_stop()
679 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_stop()
681 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_stop()
700 struct wcn36xx_hal_init_scan_req_msg msg_body; in wcn36xx_smd_init_scan() local
704 INIT_HAL_MSG(msg_body, WCN36XX_HAL_INIT_SCAN_REQ); in wcn36xx_smd_init_scan()
706 msg_body.mode = mode; in wcn36xx_smd_init_scan()
709 msg_body.frame_type = 2; in wcn36xx_smd_init_scan()
710 msg_body.notify = 1; in wcn36xx_smd_init_scan()
711 msg_body.scan_entry.bss_index[0] = vif_priv->bss_index; in wcn36xx_smd_init_scan()
712 msg_body.scan_entry.active_bss_count = 1; in wcn36xx_smd_init_scan()
715 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_init_scan()
717 wcn36xx_dbg(WCN36XX_DBG_HAL, "hal init scan mode %d\n", msg_body.mode); in wcn36xx_smd_init_scan()
719 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_init_scan()
737 struct wcn36xx_hal_start_scan_req_msg msg_body; in wcn36xx_smd_start_scan() local
741 INIT_HAL_MSG(msg_body, WCN36XX_HAL_START_SCAN_REQ); in wcn36xx_smd_start_scan()
743 msg_body.scan_channel = scan_channel; in wcn36xx_smd_start_scan()
745 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_start_scan()
748 msg_body.scan_channel); in wcn36xx_smd_start_scan()
750 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_start_scan()
768 struct wcn36xx_hal_end_scan_req_msg msg_body; in wcn36xx_smd_end_scan() local
772 INIT_HAL_MSG(msg_body, WCN36XX_HAL_END_SCAN_REQ); in wcn36xx_smd_end_scan()
774 msg_body.scan_channel = scan_channel; in wcn36xx_smd_end_scan()
776 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_end_scan()
779 msg_body.scan_channel); in wcn36xx_smd_end_scan()
781 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_end_scan()
802 struct wcn36xx_hal_finish_scan_req_msg msg_body; in wcn36xx_smd_finish_scan() local
806 INIT_HAL_MSG(msg_body, WCN36XX_HAL_FINISH_SCAN_REQ); in wcn36xx_smd_finish_scan()
808 msg_body.mode = mode; in wcn36xx_smd_finish_scan()
809 msg_body.oper_channel = WCN36XX_HW_CHANNEL(wcn); in wcn36xx_smd_finish_scan()
812 msg_body.notify = 1; in wcn36xx_smd_finish_scan()
813 msg_body.frame_type = 2; in wcn36xx_smd_finish_scan()
814 msg_body.scan_entry.bss_index[0] = vif_priv->bss_index; in wcn36xx_smd_finish_scan()
815 msg_body.scan_entry.active_bss_count = 1; in wcn36xx_smd_finish_scan()
818 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_finish_scan()
821 msg_body.mode); in wcn36xx_smd_finish_scan()
823 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_finish_scan()
843 struct wcn36xx_hal_start_scan_offload_req_msg *msg_body; in wcn36xx_smd_start_hw_scan() local
850 msg_body = kzalloc(sizeof(*msg_body), GFP_KERNEL); in wcn36xx_smd_start_hw_scan()
851 if (!msg_body) { in wcn36xx_smd_start_hw_scan()
856 INIT_HAL_MSG((*msg_body), WCN36XX_HAL_START_SCAN_OFFLOAD_REQ); in wcn36xx_smd_start_hw_scan()
858 msg_body->scan_type = WCN36XX_HAL_SCAN_TYPE_ACTIVE; in wcn36xx_smd_start_hw_scan()
859 msg_body->min_ch_time = 30; in wcn36xx_smd_start_hw_scan()
860 msg_body->max_ch_time = 100; in wcn36xx_smd_start_hw_scan()
861 msg_body->scan_hidden = 1; in wcn36xx_smd_start_hw_scan()
862 memcpy(msg_body->mac, vif->addr, ETH_ALEN); in wcn36xx_smd_start_hw_scan()
863 msg_body->bss_type = vif_priv->bss_type; in wcn36xx_smd_start_hw_scan()
864 msg_body->p2p_search = vif->p2p; in wcn36xx_smd_start_hw_scan()
866 msg_body->num_ssid = min_t(u8, req->n_ssids, ARRAY_SIZE(msg_body->ssids)); in wcn36xx_smd_start_hw_scan()
867 for (i = 0; i < msg_body->num_ssid; i++) { in wcn36xx_smd_start_hw_scan()
868 msg_body->ssids[i].length = min_t(u8, req->ssids[i].ssid_len, in wcn36xx_smd_start_hw_scan()
869 sizeof(msg_body->ssids[i].ssid)); in wcn36xx_smd_start_hw_scan()
870 memcpy(msg_body->ssids[i].ssid, req->ssids[i].ssid, in wcn36xx_smd_start_hw_scan()
871 msg_body->ssids[i].length); in wcn36xx_smd_start_hw_scan()
874 msg_body->num_channel = min_t(u8, req->n_channels, in wcn36xx_smd_start_hw_scan()
875 sizeof(msg_body->channels)); in wcn36xx_smd_start_hw_scan()
876 for (i = 0; i < msg_body->num_channel; i++) { in wcn36xx_smd_start_hw_scan()
877 msg_body->channels[i] = in wcn36xx_smd_start_hw_scan()
881 msg_body->header.len -= WCN36XX_MAX_SCAN_IE_LEN; in wcn36xx_smd_start_hw_scan()
884 msg_body->ie_len = req->ie_len; in wcn36xx_smd_start_hw_scan()
885 msg_body->header.len += req->ie_len; in wcn36xx_smd_start_hw_scan()
886 memcpy(msg_body->ie, req->ie, req->ie_len); in wcn36xx_smd_start_hw_scan()
889 PREPARE_HAL_BUF(wcn->hal_buf, (*msg_body)); in wcn36xx_smd_start_hw_scan()
893 msg_body->num_channel, msg_body->num_ssid, in wcn36xx_smd_start_hw_scan()
894 msg_body->p2p_search ? "yes" : "no"); in wcn36xx_smd_start_hw_scan()
896 ret = wcn36xx_smd_send_and_wait(wcn, msg_body->header.len); in wcn36xx_smd_start_hw_scan()
908 kfree(msg_body); in wcn36xx_smd_start_hw_scan()
915 struct wcn36xx_hal_stop_scan_offload_req_msg msg_body; in wcn36xx_smd_stop_hw_scan() local
919 INIT_HAL_MSG(msg_body, WCN36XX_HAL_STOP_SCAN_OFFLOAD_REQ); in wcn36xx_smd_stop_hw_scan()
920 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_stop_hw_scan()
924 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_stop_hw_scan()
942 struct wcn36xx_hal_update_channel_list_req_msg *msg_body; in wcn36xx_smd_update_channel_list() local
945 msg_body = kzalloc(sizeof(*msg_body), GFP_KERNEL); in wcn36xx_smd_update_channel_list()
946 if (!msg_body) in wcn36xx_smd_update_channel_list()
949 INIT_HAL_MSG((*msg_body), WCN36XX_HAL_UPDATE_CHANNEL_LIST_REQ); in wcn36xx_smd_update_channel_list()
951 msg_body->num_channel = min_t(u8, req->n_channels, ARRAY_SIZE(msg_body->channels)); in wcn36xx_smd_update_channel_list()
952 for (i = 0; i < msg_body->num_channel; i++) { in wcn36xx_smd_update_channel_list()
953 struct wcn36xx_hal_channel_param *param = &msg_body->channels[i]; in wcn36xx_smd_update_channel_list()
1000 PREPARE_HAL_BUF(wcn->hal_buf, (*msg_body)); in wcn36xx_smd_update_channel_list()
1002 ret = wcn36xx_smd_send_and_wait(wcn, msg_body->header.len); in wcn36xx_smd_update_channel_list()
1015 kfree(msg_body); in wcn36xx_smd_update_channel_list()
1037 struct wcn36xx_hal_switch_channel_req_msg msg_body; in wcn36xx_smd_switch_channel() local
1041 INIT_HAL_MSG(msg_body, WCN36XX_HAL_CH_SWITCH_REQ); in wcn36xx_smd_switch_channel()
1043 msg_body.channel_number = (u8)ch; in wcn36xx_smd_switch_channel()
1044 msg_body.tx_mgmt_power = 0xbf; in wcn36xx_smd_switch_channel()
1045 msg_body.max_tx_power = 0xbf; in wcn36xx_smd_switch_channel()
1046 memcpy(msg_body.self_sta_mac_addr, vif->addr, ETH_ALEN); in wcn36xx_smd_switch_channel()
1048 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_switch_channel()
1050 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_switch_channel()
1150 struct wcn36xx_hal_update_scan_params_req_ex msg_body; in wcn36xx_smd_update_scan_params() local
1154 INIT_HAL_MSG(msg_body, WCN36XX_HAL_UPDATE_SCAN_PARAM_REQ); in wcn36xx_smd_update_scan_params()
1156 msg_body.dot11d_enabled = false; in wcn36xx_smd_update_scan_params()
1157 msg_body.dot11d_resolved = true; in wcn36xx_smd_update_scan_params()
1159 msg_body.channel_count = channel_count; in wcn36xx_smd_update_scan_params()
1160 memcpy(msg_body.channels, channels, channel_count); in wcn36xx_smd_update_scan_params()
1161 msg_body.active_min_ch_time = 60; in wcn36xx_smd_update_scan_params()
1162 msg_body.active_max_ch_time = 120; in wcn36xx_smd_update_scan_params()
1163 msg_body.passive_min_ch_time = 60; in wcn36xx_smd_update_scan_params()
1164 msg_body.passive_max_ch_time = 110; in wcn36xx_smd_update_scan_params()
1165 msg_body.state = PHY_SINGLE_CHANNEL_CENTERED; in wcn36xx_smd_update_scan_params()
1167 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_update_scan_params()
1171 msg_body.channel_count); in wcn36xx_smd_update_scan_params()
1173 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_update_scan_params()
1221 struct wcn36xx_hal_add_sta_self_req msg_body; in wcn36xx_smd_add_sta_self() local
1225 INIT_HAL_MSG(msg_body, WCN36XX_HAL_ADD_STA_SELF_REQ); in wcn36xx_smd_add_sta_self()
1227 memcpy(&msg_body.self_addr, vif->addr, ETH_ALEN); in wcn36xx_smd_add_sta_self()
1229 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_add_sta_self()
1233 msg_body.self_addr, msg_body.status); in wcn36xx_smd_add_sta_self()
1235 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_add_sta_self()
1255 struct wcn36xx_hal_del_sta_self_req_msg msg_body; in wcn36xx_smd_delete_sta_self() local
1259 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DEL_STA_SELF_REQ); in wcn36xx_smd_delete_sta_self()
1261 memcpy(&msg_body.self_addr, addr, ETH_ALEN); in wcn36xx_smd_delete_sta_self()
1263 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_delete_sta_self()
1265 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_delete_sta_self()
1283 struct wcn36xx_hal_delete_sta_req_msg msg_body; in wcn36xx_smd_delete_sta() local
1287 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DELETE_STA_REQ); in wcn36xx_smd_delete_sta()
1289 msg_body.sta_index = sta_index; in wcn36xx_smd_delete_sta()
1291 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_delete_sta()
1295 msg_body.sta_index); in wcn36xx_smd_delete_sta()
1297 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_delete_sta()
1330 struct wcn36xx_hal_join_req_msg msg_body; in wcn36xx_smd_join() local
1334 INIT_HAL_MSG(msg_body, WCN36XX_HAL_JOIN_REQ); in wcn36xx_smd_join()
1336 memcpy(&msg_body.bssid, bssid, ETH_ALEN); in wcn36xx_smd_join()
1337 memcpy(&msg_body.self_sta_mac_addr, vif, ETH_ALEN); in wcn36xx_smd_join()
1338 msg_body.channel = ch; in wcn36xx_smd_join()
1341 msg_body.secondary_channel_offset = in wcn36xx_smd_join()
1344 msg_body.secondary_channel_offset = in wcn36xx_smd_join()
1347 msg_body.secondary_channel_offset = in wcn36xx_smd_join()
1350 msg_body.link_state = WCN36XX_HAL_LINK_PREASSOC_STATE; in wcn36xx_smd_join()
1352 msg_body.max_tx_power = 0xbf; in wcn36xx_smd_join()
1353 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_join()
1357 msg_body.bssid, msg_body.self_sta_mac_addr, in wcn36xx_smd_join()
1358 msg_body.channel, msg_body.link_state); in wcn36xx_smd_join()
1360 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_join()
1379 struct wcn36xx_hal_set_link_state_req_msg msg_body; in wcn36xx_smd_set_link_st() local
1383 INIT_HAL_MSG(msg_body, WCN36XX_HAL_SET_LINK_ST_REQ); in wcn36xx_smd_set_link_st()
1385 memcpy(&msg_body.bssid, bssid, ETH_ALEN); in wcn36xx_smd_set_link_st()
1386 memcpy(&msg_body.self_mac_addr, sta_mac, ETH_ALEN); in wcn36xx_smd_set_link_st()
1387 msg_body.state = state; in wcn36xx_smd_set_link_st()
1389 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_set_link_st()
1393 msg_body.bssid, msg_body.self_mac_addr, msg_body.state); in wcn36xx_smd_set_link_st()
1395 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_set_link_st()
1509 struct wcn36xx_hal_config_sta_req_msg_v1 msg_body; in wcn36xx_smd_config_sta_v1() local
1513 INIT_HAL_MSG_V1(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); in wcn36xx_smd_config_sta_v1()
1515 INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); in wcn36xx_smd_config_sta_v1()
1516 msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT; in wcn36xx_smd_config_sta_v1()
1519 sta_params = &msg_body.sta_params; in wcn36xx_smd_config_sta_v1()
1523 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_config_sta_v1()
1530 return wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_config_sta_v1()
1680 struct wcn36xx_hal_config_bss_req_msg_v1 *msg_body; in wcn36xx_smd_config_bss_v1() local
1687 msg_body = kzalloc(sizeof(*msg_body), GFP_KERNEL); in wcn36xx_smd_config_bss_v1()
1688 if (!msg_body) in wcn36xx_smd_config_bss_v1()
1692 INIT_HAL_MSG_V1((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); in wcn36xx_smd_config_bss_v1()
1694 INIT_HAL_MSG((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); in wcn36xx_smd_config_bss_v1()
1695 msg_body->header.len -= WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT; in wcn36xx_smd_config_bss_v1()
1698 bss = &msg_body->bss_params; in wcn36xx_smd_config_bss_v1()
1778 PREPARE_HAL_BUF(wcn->hal_buf, (*msg_body)); in wcn36xx_smd_config_bss_v1()
1790 ret = wcn36xx_smd_send_and_wait(wcn, msg_body->header.len); in wcn36xx_smd_config_bss_v1()
1791 kfree(msg_body); in wcn36xx_smd_config_bss_v1()
1915 struct wcn36xx_hal_delete_bss_req_msg msg_body; in wcn36xx_smd_delete_bss() local
1924 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DELETE_BSS_REQ); in wcn36xx_smd_delete_bss()
1926 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_delete_bss()
1928 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_delete_bss()
1930 wcn36xx_dbg(WCN36XX_DBG_HAL, "hal delete bss %d\n", msg_body.bss_index); in wcn36xx_smd_delete_bss()
1932 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_delete_bss()
1953 struct wcn36xx_hal_send_beacon_req_msg msg_body; in wcn36xx_smd_send_beacon() local
1957 INIT_HAL_MSG(msg_body, WCN36XX_HAL_SEND_BEACON_REQ); in wcn36xx_smd_send_beacon()
1966 msg_body.beacon_length = skb_beacon->len + pad; in wcn36xx_smd_send_beacon()
1968 msg_body.beacon_length6 = msg_body.beacon_length + 6; in wcn36xx_smd_send_beacon()
1970 if (msg_body.beacon_length > BEACON_TEMPLATE_SIZE) { in wcn36xx_smd_send_beacon()
1972 msg_body.beacon_length); in wcn36xx_smd_send_beacon()
1976 memcpy(msg_body.beacon, skb_beacon->data, skb_beacon->len); in wcn36xx_smd_send_beacon()
1977 memcpy(msg_body.bssid, vif->addr, ETH_ALEN); in wcn36xx_smd_send_beacon()
1988 memmove(&msg_body.beacon[tim_off + 5 + pvm_len + pad], in wcn36xx_smd_send_beacon()
1989 &msg_body.beacon[tim_off + 5 + pvm_len], in wcn36xx_smd_send_beacon()
1991 memset(&msg_body.beacon[tim_off + 5 + pvm_len], 0, pad); in wcn36xx_smd_send_beacon()
1992 msg_body.beacon[tim_off + 1] += pad; in wcn36xx_smd_send_beacon()
1998 msg_body.tim_ie_offset = 256; in wcn36xx_smd_send_beacon()
2000 msg_body.tim_ie_offset = tim_off+4; in wcn36xx_smd_send_beacon()
2001 msg_body.p2p_ie_offset = p2p_off; in wcn36xx_smd_send_beacon()
2002 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_send_beacon()
2006 msg_body.beacon_length); in wcn36xx_smd_send_beacon()
2008 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_send_beacon()
2074 struct wcn36xx_hal_set_sta_key_req_msg msg_body; in wcn36xx_smd_set_stakey() local
2078 INIT_HAL_MSG(msg_body, WCN36XX_HAL_SET_STAKEY_REQ); in wcn36xx_smd_set_stakey()
2080 msg_body.set_sta_key_params.sta_index = sta_index; in wcn36xx_smd_set_stakey()
2081 msg_body.set_sta_key_params.enc_type = enc_type; in wcn36xx_smd_set_stakey()
2086 msg_body.set_sta_key_params.def_wep_idx = keyidx; in wcn36xx_smd_set_stakey()
2087 msg_body.set_sta_key_params.wep_type = 0; in wcn36xx_smd_set_stakey()
2089 msg_body.set_sta_key_params.key[0].id = keyidx; in wcn36xx_smd_set_stakey()
2090 msg_body.set_sta_key_params.key[0].unicast = 1; in wcn36xx_smd_set_stakey()
2091 msg_body.set_sta_key_params.key[0].direction = WCN36XX_HAL_TX_RX; in wcn36xx_smd_set_stakey()
2092 msg_body.set_sta_key_params.key[0].pae_role = 0; in wcn36xx_smd_set_stakey()
2093 msg_body.set_sta_key_params.key[0].length = keylen; in wcn36xx_smd_set_stakey()
2094 memcpy(msg_body.set_sta_key_params.key[0].key, key, keylen); in wcn36xx_smd_set_stakey()
2097 msg_body.set_sta_key_params.single_tid_rc = 1; in wcn36xx_smd_set_stakey()
2099 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_set_stakey()
2101 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_set_stakey()
2123 struct wcn36xx_hal_set_bss_key_req_msg msg_body; in wcn36xx_smd_set_bsskey() local
2127 INIT_HAL_MSG(msg_body, WCN36XX_HAL_SET_BSSKEY_REQ); in wcn36xx_smd_set_bsskey()
2128 msg_body.bss_idx = bssidx; in wcn36xx_smd_set_bsskey()
2129 msg_body.enc_type = enc_type; in wcn36xx_smd_set_bsskey()
2130 msg_body.num_keys = 1; in wcn36xx_smd_set_bsskey()
2131 msg_body.keys[0].id = keyidx; in wcn36xx_smd_set_bsskey()
2132 msg_body.keys[0].unicast = 0; in wcn36xx_smd_set_bsskey()
2133 msg_body.keys[0].direction = WCN36XX_HAL_RX_ONLY; in wcn36xx_smd_set_bsskey()
2134 msg_body.keys[0].pae_role = 0; in wcn36xx_smd_set_bsskey()
2135 msg_body.keys[0].length = keylen; in wcn36xx_smd_set_bsskey()
2136 memcpy(msg_body.keys[0].key, key, keylen); in wcn36xx_smd_set_bsskey()
2138 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_set_bsskey()
2140 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_set_bsskey()
2160 struct wcn36xx_hal_remove_sta_key_req_msg msg_body; in wcn36xx_smd_remove_stakey() local
2164 INIT_HAL_MSG(msg_body, WCN36XX_HAL_RMV_STAKEY_REQ); in wcn36xx_smd_remove_stakey()
2166 msg_body.sta_idx = sta_index; in wcn36xx_smd_remove_stakey()
2167 msg_body.enc_type = enc_type; in wcn36xx_smd_remove_stakey()
2168 msg_body.key_id = keyidx; in wcn36xx_smd_remove_stakey()
2170 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_remove_stakey()
2172 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_remove_stakey()
2192 struct wcn36xx_hal_remove_bss_key_req_msg msg_body; in wcn36xx_smd_remove_bsskey() local
2196 INIT_HAL_MSG(msg_body, WCN36XX_HAL_RMV_BSSKEY_REQ); in wcn36xx_smd_remove_bsskey()
2197 msg_body.bss_idx = bssidx; in wcn36xx_smd_remove_bsskey()
2198 msg_body.enc_type = enc_type; in wcn36xx_smd_remove_bsskey()
2199 msg_body.key_id = keyidx; in wcn36xx_smd_remove_bsskey()
2201 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_remove_bsskey()
2203 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_remove_bsskey()
2220 struct wcn36xx_hal_enter_bmps_req_msg msg_body; in wcn36xx_smd_enter_bmps() local
2225 INIT_HAL_MSG(msg_body, WCN36XX_HAL_ENTER_BMPS_REQ); in wcn36xx_smd_enter_bmps()
2227 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_enter_bmps()
2228 msg_body.tbtt = vif->bss_conf.sync_tsf; in wcn36xx_smd_enter_bmps()
2229 msg_body.dtim_period = vif_priv->dtim_period; in wcn36xx_smd_enter_bmps()
2231 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_enter_bmps()
2233 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_enter_bmps()
2250 struct wcn36xx_hal_exit_bmps_req_msg msg_body; in wcn36xx_smd_exit_bmps() local
2255 INIT_HAL_MSG(msg_body, WCN36XX_HAL_EXIT_BMPS_REQ); in wcn36xx_smd_exit_bmps()
2257 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_exit_bmps()
2258 msg_body.send_data_null = 1; in wcn36xx_smd_exit_bmps()
2260 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_exit_bmps()
2262 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_exit_bmps()
2279 struct wcn36xx_hal_enter_imps_req_msg msg_body; in wcn36xx_smd_enter_imps() local
2283 INIT_HAL_MSG(msg_body, WCN36XX_HAL_ENTER_IMPS_REQ); in wcn36xx_smd_enter_imps()
2285 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_enter_imps()
2287 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_enter_imps()
2306 struct wcn36xx_hal_exit_imps_req_msg msg_body; in wcn36xx_smd_exit_imps() local
2310 INIT_HAL_MSG(msg_body, WCN36XX_HAL_EXIT_IMPS_REQ); in wcn36xx_smd_exit_imps()
2312 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_exit_imps()
2314 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_exit_imps()
2332 struct wcn36xx_hal_set_power_params_req_msg msg_body; in wcn36xx_smd_set_power_params() local
2336 INIT_HAL_MSG(msg_body, WCN36XX_HAL_SET_POWER_PARAMS_REQ); in wcn36xx_smd_set_power_params()
2342 msg_body.ignore_dtim = 1; in wcn36xx_smd_set_power_params()
2343 msg_body.dtim_period = 2; in wcn36xx_smd_set_power_params()
2345 msg_body.listen_interval = WCN36XX_LISTEN_INTERVAL(wcn); in wcn36xx_smd_set_power_params()
2347 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_set_power_params()
2349 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_set_power_params()
2367 struct wcn36xx_hal_keep_alive_req_msg msg_body; in wcn36xx_smd_keep_alive_req() local
2372 INIT_HAL_MSG(msg_body, WCN36XX_HAL_KEEP_ALIVE_REQ); in wcn36xx_smd_keep_alive_req()
2375 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_keep_alive_req()
2376 msg_body.packet_type = WCN36XX_HAL_KEEP_ALIVE_NULL_PKT; in wcn36xx_smd_keep_alive_req()
2377 msg_body.time_period = WCN36XX_KEEP_ALIVE_TIME_PERIOD; in wcn36xx_smd_keep_alive_req()
2386 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_keep_alive_req()
2388 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_keep_alive_req()
2406 struct wcn36xx_hal_dump_cmd_req_msg msg_body; in wcn36xx_smd_dump_cmd_req() local
2410 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DUMP_COMMAND_REQ); in wcn36xx_smd_dump_cmd_req()
2412 msg_body.arg1 = arg1; in wcn36xx_smd_dump_cmd_req()
2413 msg_body.arg2 = arg2; in wcn36xx_smd_dump_cmd_req()
2414 msg_body.arg3 = arg3; in wcn36xx_smd_dump_cmd_req()
2415 msg_body.arg4 = arg4; in wcn36xx_smd_dump_cmd_req()
2416 msg_body.arg5 = arg5; in wcn36xx_smd_dump_cmd_req()
2418 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_dump_cmd_req()
2420 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_dump_cmd_req()
2437 struct wcn36xx_hal_feat_caps_msg msg_body, *rsp; in wcn36xx_smd_feature_caps_exchange() local
2441 INIT_HAL_MSG(msg_body, WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_REQ); in wcn36xx_smd_feature_caps_exchange()
2443 wcn36xx_firmware_set_feat_caps(msg_body.feat_caps, STA_POWERSAVE); in wcn36xx_smd_feature_caps_exchange()
2445 wcn36xx_firmware_set_feat_caps(msg_body.feat_caps, DOT11AC); in wcn36xx_smd_feature_caps_exchange()
2446 wcn36xx_firmware_set_feat_caps(msg_body.feat_caps, WLAN_CH144); in wcn36xx_smd_feature_caps_exchange()
2447 wcn36xx_firmware_set_feat_caps(msg_body.feat_caps, in wcn36xx_smd_feature_caps_exchange()
2451 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_feature_caps_exchange()
2453 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_feature_caps_exchange()
2495 struct wcn36xx_hal_add_ba_session_req_msg msg_body; in wcn36xx_smd_add_ba_session() local
2500 INIT_HAL_MSG(msg_body, WCN36XX_HAL_ADD_BA_SESSION_REQ); in wcn36xx_smd_add_ba_session()
2502 msg_body.sta_index = sta_index; in wcn36xx_smd_add_ba_session()
2503 memcpy(&msg_body.mac_addr, sta->addr, ETH_ALEN); in wcn36xx_smd_add_ba_session()
2504 msg_body.dialog_token = 0x10; in wcn36xx_smd_add_ba_session()
2505 msg_body.tid = tid; in wcn36xx_smd_add_ba_session()
2508 msg_body.policy = 1; in wcn36xx_smd_add_ba_session()
2509 msg_body.buffer_size = WCN36XX_AGGR_BUFFER_SIZE; in wcn36xx_smd_add_ba_session()
2510 msg_body.timeout = 0; in wcn36xx_smd_add_ba_session()
2512 msg_body.ssn = *ssn; in wcn36xx_smd_add_ba_session()
2513 msg_body.direction = direction; in wcn36xx_smd_add_ba_session()
2515 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_add_ba_session()
2517 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_add_ba_session()
2538 struct wcn36xx_hal_add_ba_req_msg msg_body; in wcn36xx_smd_add_ba() local
2542 INIT_HAL_MSG(msg_body, WCN36XX_HAL_ADD_BA_REQ); in wcn36xx_smd_add_ba()
2544 msg_body.session_id = session_id; in wcn36xx_smd_add_ba()
2545 msg_body.win_size = WCN36XX_AGGR_BUFFER_SIZE; in wcn36xx_smd_add_ba()
2547 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_add_ba()
2549 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_add_ba()
2566 struct wcn36xx_hal_del_ba_req_msg msg_body; in wcn36xx_smd_del_ba() local
2570 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DEL_BA_REQ); in wcn36xx_smd_del_ba()
2572 msg_body.sta_index = sta_index; in wcn36xx_smd_del_ba()
2573 msg_body.tid = tid; in wcn36xx_smd_del_ba()
2574 msg_body.direction = direction; in wcn36xx_smd_del_ba()
2575 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_del_ba()
2577 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_del_ba()
2595 struct wcn36xx_hal_stats_req_msg msg_body; in wcn36xx_smd_get_stats() local
2607 INIT_HAL_MSG(msg_body, WCN36XX_HAL_GET_STATS_REQ); in wcn36xx_smd_get_stats()
2609 msg_body.sta_id = sta_index; in wcn36xx_smd_get_stats()
2610 msg_body.stats_mask = stats_mask; in wcn36xx_smd_get_stats()
2612 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_get_stats()
2614 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_get_stats()
2673 struct wcn36xx_hal_trigger_ba_req_msg msg_body; in wcn36xx_smd_trigger_ba() local
2682 INIT_HAL_MSG(msg_body, WCN36XX_HAL_TRIGGER_BA_REQ); in wcn36xx_smd_trigger_ba()
2684 msg_body.session_id = 0; /* not really used */ in wcn36xx_smd_trigger_ba()
2685 msg_body.candidate_cnt = 1; in wcn36xx_smd_trigger_ba()
2686 msg_body.header.len += sizeof(*candidate); in wcn36xx_smd_trigger_ba()
2687 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_trigger_ba()
2690 (wcn->hal_buf + sizeof(msg_body)); in wcn36xx_smd_trigger_ba()
2694 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_trigger_ba()
2882 struct wcn36xx_hal_update_cfg_req_msg msg_body, *body; in wcn36xx_smd_update_cfg() local
2887 INIT_HAL_MSG(msg_body, WCN36XX_HAL_UPDATE_CFG_REQ); in wcn36xx_smd_update_cfg()
2889 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_update_cfg()
2892 len = msg_body.header.len; in wcn36xx_smd_update_cfg()
2918 struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_req_msg *msg_body = NULL; in wcn36xx_smd_set_mc_list() local
2923 msg_body = (struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_req_msg *) in wcn36xx_smd_set_mc_list()
2925 INIT_HAL_MSG(*msg_body, WCN36XX_HAL_8023_MULTICAST_LIST_REQ); in wcn36xx_smd_set_mc_list()
2929 memcpy(&msg_body->mc_addr_list, fp, in wcn36xx_smd_set_mc_list()
2930 sizeof(msg_body->mc_addr_list)); in wcn36xx_smd_set_mc_list()
2932 msg_body->mc_addr_list.mc_addr_count = 0; in wcn36xx_smd_set_mc_list()
2934 msg_body->mc_addr_list.bss_index = vif_priv->bss_index; in wcn36xx_smd_set_mc_list()
2936 ret = wcn36xx_smd_send_and_wait(wcn, msg_body->header.len); in wcn36xx_smd_set_mc_list()
2955 struct wcn36xx_hal_host_offload_req_msg msg_body; in wcn36xx_smd_arp_offload() local
2960 INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_OFFLOAD_REQ); in wcn36xx_smd_arp_offload()
2961 msg_body.host_offload_params.offload_type = in wcn36xx_smd_arp_offload()
2964 msg_body.host_offload_params.enable = in wcn36xx_smd_arp_offload()
2966 memcpy(&msg_body.host_offload_params.u, in wcn36xx_smd_arp_offload()
2969 msg_body.ns_offload_params.bss_index = vif_priv->bss_index; in wcn36xx_smd_arp_offload()
2971 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_arp_offload()
2973 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_arp_offload()
2993 struct wcn36xx_hal_host_offload_req_msg msg_body; in wcn36xx_smd_ipv6_ns_offload() local
3000 INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_OFFLOAD_REQ); in wcn36xx_smd_ipv6_ns_offload()
3001 ho_params = &msg_body.host_offload_params; in wcn36xx_smd_ipv6_ns_offload()
3002 ns_params = &msg_body.ns_offload_params; in wcn36xx_smd_ipv6_ns_offload()
3027 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_ipv6_ns_offload()
3029 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_ipv6_ns_offload()
3055 struct wcn36xx_hal_gtk_offload_req_msg msg_body; in wcn36xx_smd_gtk_offload() local
3060 INIT_HAL_MSG(msg_body, WCN36XX_HAL_GTK_OFFLOAD_REQ); in wcn36xx_smd_gtk_offload()
3063 memcpy(&msg_body.kek, vif_priv->rekey_data.kek, NL80211_KEK_LEN); in wcn36xx_smd_gtk_offload()
3064 memcpy(&msg_body.kck, vif_priv->rekey_data.kck, NL80211_KCK_LEN); in wcn36xx_smd_gtk_offload()
3065 msg_body.key_replay_counter = in wcn36xx_smd_gtk_offload()
3067 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_gtk_offload()
3069 msg_body.flags = WCN36XX_HAL_GTK_OFFLOAD_FLAGS_DISABLE; in wcn36xx_smd_gtk_offload()
3072 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_gtk_offload()
3074 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_gtk_offload()
3134 struct wcn36xx_hal_gtk_offload_get_info_req_msg msg_body; in wcn36xx_smd_gtk_offload_get_info() local
3139 INIT_HAL_MSG(msg_body, WCN36XX_HAL_GTK_OFFLOAD_GETINFO_REQ); in wcn36xx_smd_gtk_offload_get_info()
3141 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_gtk_offload_get_info()
3143 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_gtk_offload_get_info()
3145 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_gtk_offload_get_info()
3163 struct wcn36xx_hal_wlan_host_suspend_ind_msg msg_body; in wcn36xx_smd_wlan_host_suspend_ind() local
3168 INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_SUSPEND_IND); in wcn36xx_smd_wlan_host_suspend_ind()
3169 msg_body.configured_mcst_bcst_filter_setting = 0; in wcn36xx_smd_wlan_host_suspend_ind()
3170 msg_body.active_session_count = 1; in wcn36xx_smd_wlan_host_suspend_ind()
3171 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_wlan_host_suspend_ind()
3173 ret = rpmsg_send(wcn->smd_channel, wcn->hal_buf, msg_body.header.len); in wcn36xx_smd_wlan_host_suspend_ind()
3182 struct wcn36xx_hal_wlan_host_resume_req_msg msg_body; in wcn36xx_smd_host_resume() local
3188 INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_RESUME_REQ); in wcn36xx_smd_host_resume()
3189 msg_body.configured_mcst_bcst_filter_setting = 0; in wcn36xx_smd_host_resume()
3191 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_host_resume()
3193 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_host_resume()
3256 struct wcn36xx_hal_add_bcn_filter_req_msg msg_body, *body; in wcn36xx_smd_add_beacon_filter() local
3266 INIT_HAL_MSG(msg_body, WCN36XX_HAL_ADD_BCN_FILTER_REQ); in wcn36xx_smd_add_beacon_filter()
3268 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_add_beacon_filter()