Lines Matching refs:msg_body
448 #define __INIT_HAL_MSG(msg_body, type, version) \ argument
450 memset(&(msg_body), 0, sizeof(msg_body)); \
451 (msg_body).header.msg_type = type; \
452 (msg_body).header.msg_version = version; \
453 (msg_body).header.len = sizeof(msg_body); \
456 #define INIT_HAL_MSG(msg_body, type) \ argument
457 __INIT_HAL_MSG(msg_body, type, WCN36XX_HAL_MSG_VERSION0)
459 #define INIT_HAL_MSG_V1(msg_body, type) \ argument
460 __INIT_HAL_MSG(msg_body, type, WCN36XX_HAL_MSG_VERSION1)
470 #define PREPARE_HAL_BUF(send_buf, msg_body) \ argument
472 memset(send_buf, 0, msg_body.header.len); \
473 memcpy(send_buf, &msg_body, sizeof(msg_body)); \
501 struct wcn36xx_hal_nv_img_download_req_msg msg_body; in wcn36xx_smd_load_nv() local
516 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DOWNLOAD_NV_REQ); in wcn36xx_smd_load_nv()
518 msg_body.header.len += WCN36XX_NV_FRAGMENT_SIZE; in wcn36xx_smd_load_nv()
520 msg_body.frag_number = 0; in wcn36xx_smd_load_nv()
527 msg_body.last_fragment = 0; in wcn36xx_smd_load_nv()
528 msg_body.nv_img_buffer_size = WCN36XX_NV_FRAGMENT_SIZE; in wcn36xx_smd_load_nv()
530 msg_body.last_fragment = 1; in wcn36xx_smd_load_nv()
531 msg_body.nv_img_buffer_size = fw_bytes_left; in wcn36xx_smd_load_nv()
534 msg_body.header.len = sizeof(msg_body) + fw_bytes_left; in wcn36xx_smd_load_nv()
539 memcpy(wcn->hal_buf, &msg_body, sizeof(msg_body)); in wcn36xx_smd_load_nv()
542 memcpy(wcn->hal_buf + sizeof(msg_body), in wcn36xx_smd_load_nv()
544 msg_body.nv_img_buffer_size); in wcn36xx_smd_load_nv()
546 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_load_nv()
556 msg_body.frag_number++; in wcn36xx_smd_load_nv()
559 } while (msg_body.last_fragment != 1); in wcn36xx_smd_load_nv()
608 struct wcn36xx_hal_mac_start_req_msg msg_body, *body; in wcn36xx_smd_start() local
616 INIT_HAL_MSG(msg_body, WCN36XX_HAL_START_REQ); in wcn36xx_smd_start()
618 msg_body.params.type = DRIVER_TYPE_PRODUCTION; in wcn36xx_smd_start()
619 msg_body.params.len = 0; in wcn36xx_smd_start()
621 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_start()
644 msg_body.params.type); in wcn36xx_smd_start()
665 struct wcn36xx_hal_mac_stop_req_msg msg_body; in wcn36xx_smd_stop() local
669 INIT_HAL_MSG(msg_body, WCN36XX_HAL_STOP_REQ); in wcn36xx_smd_stop()
671 msg_body.stop_req_params.reason = HAL_STOP_TYPE_RF_KILL; in wcn36xx_smd_stop()
673 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_stop()
675 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_stop()
694 struct wcn36xx_hal_init_scan_req_msg msg_body; in wcn36xx_smd_init_scan() local
698 INIT_HAL_MSG(msg_body, WCN36XX_HAL_INIT_SCAN_REQ); in wcn36xx_smd_init_scan()
700 msg_body.mode = mode; in wcn36xx_smd_init_scan()
703 msg_body.frame_type = 2; in wcn36xx_smd_init_scan()
704 msg_body.notify = 1; in wcn36xx_smd_init_scan()
705 msg_body.scan_entry.bss_index[0] = vif_priv->bss_index; in wcn36xx_smd_init_scan()
706 msg_body.scan_entry.active_bss_count = 1; in wcn36xx_smd_init_scan()
709 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_init_scan()
711 wcn36xx_dbg(WCN36XX_DBG_HAL, "hal init scan mode %d\n", msg_body.mode); in wcn36xx_smd_init_scan()
713 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_init_scan()
730 struct wcn36xx_hal_start_scan_req_msg msg_body; in wcn36xx_smd_start_scan() local
734 INIT_HAL_MSG(msg_body, WCN36XX_HAL_START_SCAN_REQ); in wcn36xx_smd_start_scan()
736 msg_body.scan_channel = scan_channel; in wcn36xx_smd_start_scan()
738 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_start_scan()
741 msg_body.scan_channel); in wcn36xx_smd_start_scan()
743 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_start_scan()
760 struct wcn36xx_hal_end_scan_req_msg msg_body; in wcn36xx_smd_end_scan() local
764 INIT_HAL_MSG(msg_body, WCN36XX_HAL_END_SCAN_REQ); in wcn36xx_smd_end_scan()
766 msg_body.scan_channel = scan_channel; in wcn36xx_smd_end_scan()
768 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_end_scan()
771 msg_body.scan_channel); in wcn36xx_smd_end_scan()
773 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_end_scan()
793 struct wcn36xx_hal_finish_scan_req_msg msg_body; in wcn36xx_smd_finish_scan() local
797 INIT_HAL_MSG(msg_body, WCN36XX_HAL_FINISH_SCAN_REQ); in wcn36xx_smd_finish_scan()
799 msg_body.mode = mode; in wcn36xx_smd_finish_scan()
800 msg_body.oper_channel = WCN36XX_HW_CHANNEL(wcn); in wcn36xx_smd_finish_scan()
803 msg_body.notify = 1; in wcn36xx_smd_finish_scan()
804 msg_body.frame_type = 2; in wcn36xx_smd_finish_scan()
805 msg_body.scan_entry.bss_index[0] = vif_priv->bss_index; in wcn36xx_smd_finish_scan()
806 msg_body.scan_entry.active_bss_count = 1; in wcn36xx_smd_finish_scan()
809 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_finish_scan()
812 msg_body.mode); in wcn36xx_smd_finish_scan()
814 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_finish_scan()
833 struct wcn36xx_hal_start_scan_offload_req_msg *msg_body; in wcn36xx_smd_start_hw_scan() local
840 msg_body = kzalloc(sizeof(*msg_body), GFP_KERNEL); in wcn36xx_smd_start_hw_scan()
841 if (!msg_body) { in wcn36xx_smd_start_hw_scan()
846 INIT_HAL_MSG((*msg_body), WCN36XX_HAL_START_SCAN_OFFLOAD_REQ); in wcn36xx_smd_start_hw_scan()
848 msg_body->scan_type = WCN36XX_HAL_SCAN_TYPE_ACTIVE; in wcn36xx_smd_start_hw_scan()
849 msg_body->min_ch_time = 30; in wcn36xx_smd_start_hw_scan()
850 msg_body->max_ch_time = 100; in wcn36xx_smd_start_hw_scan()
851 msg_body->scan_hidden = 1; in wcn36xx_smd_start_hw_scan()
852 memcpy(msg_body->mac, vif->addr, ETH_ALEN); in wcn36xx_smd_start_hw_scan()
853 msg_body->bss_type = vif_priv->bss_type; in wcn36xx_smd_start_hw_scan()
854 msg_body->p2p_search = vif->p2p; in wcn36xx_smd_start_hw_scan()
856 msg_body->num_ssid = min_t(u8, req->n_ssids, ARRAY_SIZE(msg_body->ssids)); in wcn36xx_smd_start_hw_scan()
857 for (i = 0; i < msg_body->num_ssid; i++) { in wcn36xx_smd_start_hw_scan()
858 msg_body->ssids[i].length = min_t(u8, req->ssids[i].ssid_len, in wcn36xx_smd_start_hw_scan()
859 sizeof(msg_body->ssids[i].ssid)); in wcn36xx_smd_start_hw_scan()
860 memcpy(msg_body->ssids[i].ssid, req->ssids[i].ssid, in wcn36xx_smd_start_hw_scan()
861 msg_body->ssids[i].length); in wcn36xx_smd_start_hw_scan()
864 msg_body->num_channel = min_t(u8, req->n_channels, in wcn36xx_smd_start_hw_scan()
865 sizeof(msg_body->channels)); in wcn36xx_smd_start_hw_scan()
866 for (i = 0; i < msg_body->num_channel; i++) { in wcn36xx_smd_start_hw_scan()
867 msg_body->channels[i] = in wcn36xx_smd_start_hw_scan()
871 msg_body->header.len -= WCN36XX_MAX_SCAN_IE_LEN; in wcn36xx_smd_start_hw_scan()
874 msg_body->ie_len = req->ie_len; in wcn36xx_smd_start_hw_scan()
875 msg_body->header.len += req->ie_len; in wcn36xx_smd_start_hw_scan()
876 memcpy(msg_body->ie, req->ie, req->ie_len); in wcn36xx_smd_start_hw_scan()
879 PREPARE_HAL_BUF(wcn->hal_buf, (*msg_body)); in wcn36xx_smd_start_hw_scan()
883 msg_body->num_channel, msg_body->num_ssid, in wcn36xx_smd_start_hw_scan()
884 msg_body->p2p_search ? "yes" : "no"); in wcn36xx_smd_start_hw_scan()
886 ret = wcn36xx_smd_send_and_wait(wcn, msg_body->header.len); in wcn36xx_smd_start_hw_scan()
898 kfree(msg_body); in wcn36xx_smd_start_hw_scan()
905 struct wcn36xx_hal_stop_scan_offload_req_msg msg_body; in wcn36xx_smd_stop_hw_scan() local
909 INIT_HAL_MSG(msg_body, WCN36XX_HAL_STOP_SCAN_OFFLOAD_REQ); in wcn36xx_smd_stop_hw_scan()
910 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_stop_hw_scan()
914 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_stop_hw_scan()
947 struct wcn36xx_hal_switch_channel_req_msg msg_body; in wcn36xx_smd_switch_channel() local
951 INIT_HAL_MSG(msg_body, WCN36XX_HAL_CH_SWITCH_REQ); in wcn36xx_smd_switch_channel()
953 msg_body.channel_number = (u8)ch; in wcn36xx_smd_switch_channel()
954 msg_body.tx_mgmt_power = 0xbf; in wcn36xx_smd_switch_channel()
955 msg_body.max_tx_power = 0xbf; in wcn36xx_smd_switch_channel()
956 memcpy(msg_body.self_sta_mac_addr, vif->addr, ETH_ALEN); in wcn36xx_smd_switch_channel()
958 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_switch_channel()
960 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_switch_channel()
1060 struct wcn36xx_hal_update_scan_params_req_ex msg_body; in wcn36xx_smd_update_scan_params() local
1064 INIT_HAL_MSG(msg_body, WCN36XX_HAL_UPDATE_SCAN_PARAM_REQ); in wcn36xx_smd_update_scan_params()
1066 msg_body.dot11d_enabled = false; in wcn36xx_smd_update_scan_params()
1067 msg_body.dot11d_resolved = true; in wcn36xx_smd_update_scan_params()
1069 msg_body.channel_count = channel_count; in wcn36xx_smd_update_scan_params()
1070 memcpy(msg_body.channels, channels, channel_count); in wcn36xx_smd_update_scan_params()
1071 msg_body.active_min_ch_time = 60; in wcn36xx_smd_update_scan_params()
1072 msg_body.active_max_ch_time = 120; in wcn36xx_smd_update_scan_params()
1073 msg_body.passive_min_ch_time = 60; in wcn36xx_smd_update_scan_params()
1074 msg_body.passive_max_ch_time = 110; in wcn36xx_smd_update_scan_params()
1075 msg_body.state = PHY_SINGLE_CHANNEL_CENTERED; in wcn36xx_smd_update_scan_params()
1077 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_update_scan_params()
1081 msg_body.channel_count); in wcn36xx_smd_update_scan_params()
1083 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_update_scan_params()
1131 struct wcn36xx_hal_add_sta_self_req msg_body; in wcn36xx_smd_add_sta_self() local
1135 INIT_HAL_MSG(msg_body, WCN36XX_HAL_ADD_STA_SELF_REQ); in wcn36xx_smd_add_sta_self()
1137 memcpy(&msg_body.self_addr, vif->addr, ETH_ALEN); in wcn36xx_smd_add_sta_self()
1139 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_add_sta_self()
1143 msg_body.self_addr, msg_body.status); in wcn36xx_smd_add_sta_self()
1145 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_add_sta_self()
1165 struct wcn36xx_hal_del_sta_self_req_msg msg_body; in wcn36xx_smd_delete_sta_self() local
1169 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DEL_STA_SELF_REQ); in wcn36xx_smd_delete_sta_self()
1171 memcpy(&msg_body.self_addr, addr, ETH_ALEN); in wcn36xx_smd_delete_sta_self()
1173 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_delete_sta_self()
1175 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_delete_sta_self()
1193 struct wcn36xx_hal_delete_sta_req_msg msg_body; in wcn36xx_smd_delete_sta() local
1197 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DELETE_STA_REQ); in wcn36xx_smd_delete_sta()
1199 msg_body.sta_index = sta_index; in wcn36xx_smd_delete_sta()
1201 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_delete_sta()
1205 msg_body.sta_index); in wcn36xx_smd_delete_sta()
1207 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_delete_sta()
1240 struct wcn36xx_hal_join_req_msg msg_body; in wcn36xx_smd_join() local
1244 INIT_HAL_MSG(msg_body, WCN36XX_HAL_JOIN_REQ); in wcn36xx_smd_join()
1246 memcpy(&msg_body.bssid, bssid, ETH_ALEN); in wcn36xx_smd_join()
1247 memcpy(&msg_body.self_sta_mac_addr, vif, ETH_ALEN); in wcn36xx_smd_join()
1248 msg_body.channel = ch; in wcn36xx_smd_join()
1251 msg_body.secondary_channel_offset = in wcn36xx_smd_join()
1254 msg_body.secondary_channel_offset = in wcn36xx_smd_join()
1257 msg_body.secondary_channel_offset = in wcn36xx_smd_join()
1260 msg_body.link_state = WCN36XX_HAL_LINK_PREASSOC_STATE; in wcn36xx_smd_join()
1262 msg_body.max_tx_power = 0xbf; in wcn36xx_smd_join()
1263 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_join()
1267 msg_body.bssid, msg_body.self_sta_mac_addr, in wcn36xx_smd_join()
1268 msg_body.channel, msg_body.link_state); in wcn36xx_smd_join()
1270 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_join()
1289 struct wcn36xx_hal_set_link_state_req_msg msg_body; in wcn36xx_smd_set_link_st() local
1293 INIT_HAL_MSG(msg_body, WCN36XX_HAL_SET_LINK_ST_REQ); in wcn36xx_smd_set_link_st()
1295 memcpy(&msg_body.bssid, bssid, ETH_ALEN); in wcn36xx_smd_set_link_st()
1296 memcpy(&msg_body.self_mac_addr, sta_mac, ETH_ALEN); in wcn36xx_smd_set_link_st()
1297 msg_body.state = state; in wcn36xx_smd_set_link_st()
1299 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_set_link_st()
1303 msg_body.bssid, msg_body.self_mac_addr, msg_body.state); in wcn36xx_smd_set_link_st()
1305 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_set_link_st()
1419 struct wcn36xx_hal_config_sta_req_msg_v1 msg_body; in wcn36xx_smd_config_sta_v1() local
1423 INIT_HAL_MSG_V1(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); in wcn36xx_smd_config_sta_v1()
1425 INIT_HAL_MSG(msg_body, WCN36XX_HAL_CONFIG_STA_REQ); in wcn36xx_smd_config_sta_v1()
1426 msg_body.header.len -= WCN36XX_DIFF_STA_PARAMS_V1_NOVHT; in wcn36xx_smd_config_sta_v1()
1429 sta_params = &msg_body.sta_params; in wcn36xx_smd_config_sta_v1()
1433 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_config_sta_v1()
1440 return wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_config_sta_v1()
1590 struct wcn36xx_hal_config_bss_req_msg_v1 *msg_body; in wcn36xx_smd_config_bss_v1() local
1597 msg_body = kzalloc(sizeof(*msg_body), GFP_KERNEL); in wcn36xx_smd_config_bss_v1()
1598 if (!msg_body) in wcn36xx_smd_config_bss_v1()
1602 INIT_HAL_MSG_V1((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); in wcn36xx_smd_config_bss_v1()
1604 INIT_HAL_MSG((*msg_body), WCN36XX_HAL_CONFIG_BSS_REQ); in wcn36xx_smd_config_bss_v1()
1605 msg_body->header.len -= WCN36XX_DIFF_BSS_PARAMS_V1_NOVHT; in wcn36xx_smd_config_bss_v1()
1608 bss = &msg_body->bss_params; in wcn36xx_smd_config_bss_v1()
1688 PREPARE_HAL_BUF(wcn->hal_buf, (*msg_body)); in wcn36xx_smd_config_bss_v1()
1700 ret = wcn36xx_smd_send_and_wait(wcn, msg_body->header.len); in wcn36xx_smd_config_bss_v1()
1701 kfree(msg_body); in wcn36xx_smd_config_bss_v1()
1825 struct wcn36xx_hal_delete_bss_req_msg msg_body; in wcn36xx_smd_delete_bss() local
1834 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DELETE_BSS_REQ); in wcn36xx_smd_delete_bss()
1836 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_delete_bss()
1838 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_delete_bss()
1840 wcn36xx_dbg(WCN36XX_DBG_HAL, "hal delete bss %d\n", msg_body.bss_index); in wcn36xx_smd_delete_bss()
1842 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_delete_bss()
1863 struct wcn36xx_hal_send_beacon_req_msg msg_body; in wcn36xx_smd_send_beacon() local
1867 INIT_HAL_MSG(msg_body, WCN36XX_HAL_SEND_BEACON_REQ); in wcn36xx_smd_send_beacon()
1876 msg_body.beacon_length = skb_beacon->len + pad; in wcn36xx_smd_send_beacon()
1878 msg_body.beacon_length6 = msg_body.beacon_length + 6; in wcn36xx_smd_send_beacon()
1880 if (msg_body.beacon_length > BEACON_TEMPLATE_SIZE) { in wcn36xx_smd_send_beacon()
1882 msg_body.beacon_length); in wcn36xx_smd_send_beacon()
1886 memcpy(msg_body.beacon, skb_beacon->data, skb_beacon->len); in wcn36xx_smd_send_beacon()
1887 memcpy(msg_body.bssid, vif->addr, ETH_ALEN); in wcn36xx_smd_send_beacon()
1898 memmove(&msg_body.beacon[tim_off + 5 + pvm_len + pad], in wcn36xx_smd_send_beacon()
1899 &msg_body.beacon[tim_off + 5 + pvm_len], in wcn36xx_smd_send_beacon()
1901 memset(&msg_body.beacon[tim_off + 5 + pvm_len], 0, pad); in wcn36xx_smd_send_beacon()
1902 msg_body.beacon[tim_off + 1] += pad; in wcn36xx_smd_send_beacon()
1908 msg_body.tim_ie_offset = 256; in wcn36xx_smd_send_beacon()
1910 msg_body.tim_ie_offset = tim_off+4; in wcn36xx_smd_send_beacon()
1911 msg_body.p2p_ie_offset = p2p_off; in wcn36xx_smd_send_beacon()
1912 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_send_beacon()
1916 msg_body.beacon_length); in wcn36xx_smd_send_beacon()
1918 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_send_beacon()
1984 struct wcn36xx_hal_set_sta_key_req_msg msg_body; in wcn36xx_smd_set_stakey() local
1988 INIT_HAL_MSG(msg_body, WCN36XX_HAL_SET_STAKEY_REQ); in wcn36xx_smd_set_stakey()
1990 msg_body.set_sta_key_params.sta_index = sta_index; in wcn36xx_smd_set_stakey()
1991 msg_body.set_sta_key_params.enc_type = enc_type; in wcn36xx_smd_set_stakey()
1996 msg_body.set_sta_key_params.def_wep_idx = keyidx; in wcn36xx_smd_set_stakey()
1997 msg_body.set_sta_key_params.wep_type = 0; in wcn36xx_smd_set_stakey()
1999 msg_body.set_sta_key_params.key[0].id = keyidx; in wcn36xx_smd_set_stakey()
2000 msg_body.set_sta_key_params.key[0].unicast = 1; in wcn36xx_smd_set_stakey()
2001 msg_body.set_sta_key_params.key[0].direction = WCN36XX_HAL_TX_RX; in wcn36xx_smd_set_stakey()
2002 msg_body.set_sta_key_params.key[0].pae_role = 0; in wcn36xx_smd_set_stakey()
2003 msg_body.set_sta_key_params.key[0].length = keylen; in wcn36xx_smd_set_stakey()
2004 memcpy(msg_body.set_sta_key_params.key[0].key, key, keylen); in wcn36xx_smd_set_stakey()
2007 msg_body.set_sta_key_params.single_tid_rc = 1; in wcn36xx_smd_set_stakey()
2009 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_set_stakey()
2011 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_set_stakey()
2033 struct wcn36xx_hal_set_bss_key_req_msg msg_body; in wcn36xx_smd_set_bsskey() local
2037 INIT_HAL_MSG(msg_body, WCN36XX_HAL_SET_BSSKEY_REQ); in wcn36xx_smd_set_bsskey()
2038 msg_body.bss_idx = bssidx; in wcn36xx_smd_set_bsskey()
2039 msg_body.enc_type = enc_type; in wcn36xx_smd_set_bsskey()
2040 msg_body.num_keys = 1; in wcn36xx_smd_set_bsskey()
2041 msg_body.keys[0].id = keyidx; in wcn36xx_smd_set_bsskey()
2042 msg_body.keys[0].unicast = 0; in wcn36xx_smd_set_bsskey()
2043 msg_body.keys[0].direction = WCN36XX_HAL_RX_ONLY; in wcn36xx_smd_set_bsskey()
2044 msg_body.keys[0].pae_role = 0; in wcn36xx_smd_set_bsskey()
2045 msg_body.keys[0].length = keylen; in wcn36xx_smd_set_bsskey()
2046 memcpy(msg_body.keys[0].key, key, keylen); in wcn36xx_smd_set_bsskey()
2048 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_set_bsskey()
2050 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_set_bsskey()
2070 struct wcn36xx_hal_remove_sta_key_req_msg msg_body; in wcn36xx_smd_remove_stakey() local
2074 INIT_HAL_MSG(msg_body, WCN36XX_HAL_RMV_STAKEY_REQ); in wcn36xx_smd_remove_stakey()
2076 msg_body.sta_idx = sta_index; in wcn36xx_smd_remove_stakey()
2077 msg_body.enc_type = enc_type; in wcn36xx_smd_remove_stakey()
2078 msg_body.key_id = keyidx; in wcn36xx_smd_remove_stakey()
2080 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_remove_stakey()
2082 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_remove_stakey()
2102 struct wcn36xx_hal_remove_bss_key_req_msg msg_body; in wcn36xx_smd_remove_bsskey() local
2106 INIT_HAL_MSG(msg_body, WCN36XX_HAL_RMV_BSSKEY_REQ); in wcn36xx_smd_remove_bsskey()
2107 msg_body.bss_idx = bssidx; in wcn36xx_smd_remove_bsskey()
2108 msg_body.enc_type = enc_type; in wcn36xx_smd_remove_bsskey()
2109 msg_body.key_id = keyidx; in wcn36xx_smd_remove_bsskey()
2111 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_remove_bsskey()
2113 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_remove_bsskey()
2130 struct wcn36xx_hal_enter_bmps_req_msg msg_body; in wcn36xx_smd_enter_bmps() local
2135 INIT_HAL_MSG(msg_body, WCN36XX_HAL_ENTER_BMPS_REQ); in wcn36xx_smd_enter_bmps()
2137 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_enter_bmps()
2138 msg_body.tbtt = vif->bss_conf.sync_tsf; in wcn36xx_smd_enter_bmps()
2139 msg_body.dtim_period = vif_priv->dtim_period; in wcn36xx_smd_enter_bmps()
2141 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_enter_bmps()
2143 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_enter_bmps()
2160 struct wcn36xx_hal_exit_bmps_req_msg msg_body; in wcn36xx_smd_exit_bmps() local
2165 INIT_HAL_MSG(msg_body, WCN36XX_HAL_EXIT_BMPS_REQ); in wcn36xx_smd_exit_bmps()
2167 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_exit_bmps()
2168 msg_body.send_data_null = 1; in wcn36xx_smd_exit_bmps()
2170 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_exit_bmps()
2172 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_exit_bmps()
2189 struct wcn36xx_hal_set_power_params_req_msg msg_body; in wcn36xx_smd_set_power_params() local
2193 INIT_HAL_MSG(msg_body, WCN36XX_HAL_SET_POWER_PARAMS_REQ); in wcn36xx_smd_set_power_params()
2199 msg_body.ignore_dtim = 1; in wcn36xx_smd_set_power_params()
2200 msg_body.dtim_period = 2; in wcn36xx_smd_set_power_params()
2202 msg_body.listen_interval = WCN36XX_LISTEN_INTERVAL(wcn); in wcn36xx_smd_set_power_params()
2204 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_set_power_params()
2206 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_set_power_params()
2224 struct wcn36xx_hal_keep_alive_req_msg msg_body; in wcn36xx_smd_keep_alive_req() local
2229 INIT_HAL_MSG(msg_body, WCN36XX_HAL_KEEP_ALIVE_REQ); in wcn36xx_smd_keep_alive_req()
2232 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_keep_alive_req()
2233 msg_body.packet_type = WCN36XX_HAL_KEEP_ALIVE_NULL_PKT; in wcn36xx_smd_keep_alive_req()
2234 msg_body.time_period = WCN36XX_KEEP_ALIVE_TIME_PERIOD; in wcn36xx_smd_keep_alive_req()
2243 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_keep_alive_req()
2245 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_keep_alive_req()
2263 struct wcn36xx_hal_dump_cmd_req_msg msg_body; in wcn36xx_smd_dump_cmd_req() local
2267 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DUMP_COMMAND_REQ); in wcn36xx_smd_dump_cmd_req()
2269 msg_body.arg1 = arg1; in wcn36xx_smd_dump_cmd_req()
2270 msg_body.arg2 = arg2; in wcn36xx_smd_dump_cmd_req()
2271 msg_body.arg3 = arg3; in wcn36xx_smd_dump_cmd_req()
2272 msg_body.arg4 = arg4; in wcn36xx_smd_dump_cmd_req()
2273 msg_body.arg5 = arg5; in wcn36xx_smd_dump_cmd_req()
2275 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_dump_cmd_req()
2277 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_dump_cmd_req()
2337 struct wcn36xx_hal_feat_caps_msg msg_body, *rsp; in wcn36xx_smd_feature_caps_exchange() local
2341 INIT_HAL_MSG(msg_body, WCN36XX_HAL_FEATURE_CAPS_EXCHANGE_REQ); in wcn36xx_smd_feature_caps_exchange()
2343 set_feat_caps(msg_body.feat_caps, STA_POWERSAVE); in wcn36xx_smd_feature_caps_exchange()
2345 set_feat_caps(msg_body.feat_caps, DOT11AC); in wcn36xx_smd_feature_caps_exchange()
2347 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_feature_caps_exchange()
2349 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_feature_caps_exchange()
2391 struct wcn36xx_hal_add_ba_session_req_msg msg_body; in wcn36xx_smd_add_ba_session() local
2396 INIT_HAL_MSG(msg_body, WCN36XX_HAL_ADD_BA_SESSION_REQ); in wcn36xx_smd_add_ba_session()
2398 msg_body.sta_index = sta_index; in wcn36xx_smd_add_ba_session()
2399 memcpy(&msg_body.mac_addr, sta->addr, ETH_ALEN); in wcn36xx_smd_add_ba_session()
2400 msg_body.dialog_token = 0x10; in wcn36xx_smd_add_ba_session()
2401 msg_body.tid = tid; in wcn36xx_smd_add_ba_session()
2404 msg_body.policy = 1; in wcn36xx_smd_add_ba_session()
2405 msg_body.buffer_size = WCN36XX_AGGR_BUFFER_SIZE; in wcn36xx_smd_add_ba_session()
2406 msg_body.timeout = 0; in wcn36xx_smd_add_ba_session()
2408 msg_body.ssn = *ssn; in wcn36xx_smd_add_ba_session()
2409 msg_body.direction = direction; in wcn36xx_smd_add_ba_session()
2411 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_add_ba_session()
2413 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_add_ba_session()
2433 struct wcn36xx_hal_add_ba_req_msg msg_body; in wcn36xx_smd_add_ba() local
2437 INIT_HAL_MSG(msg_body, WCN36XX_HAL_ADD_BA_REQ); in wcn36xx_smd_add_ba()
2439 msg_body.session_id = session_id; in wcn36xx_smd_add_ba()
2440 msg_body.win_size = WCN36XX_AGGR_BUFFER_SIZE; in wcn36xx_smd_add_ba()
2442 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_add_ba()
2444 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_add_ba()
2461 struct wcn36xx_hal_del_ba_req_msg msg_body; in wcn36xx_smd_del_ba() local
2465 INIT_HAL_MSG(msg_body, WCN36XX_HAL_DEL_BA_REQ); in wcn36xx_smd_del_ba()
2467 msg_body.sta_index = sta_index; in wcn36xx_smd_del_ba()
2468 msg_body.tid = tid; in wcn36xx_smd_del_ba()
2469 msg_body.direction = direction; in wcn36xx_smd_del_ba()
2470 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_del_ba()
2472 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_del_ba()
2500 struct wcn36xx_hal_trigger_ba_req_msg msg_body; in wcn36xx_smd_trigger_ba() local
2505 INIT_HAL_MSG(msg_body, WCN36XX_HAL_TRIGGER_BA_REQ); in wcn36xx_smd_trigger_ba()
2507 msg_body.session_id = session_id; in wcn36xx_smd_trigger_ba()
2508 msg_body.candidate_cnt = 1; in wcn36xx_smd_trigger_ba()
2509 msg_body.header.len += sizeof(*candidate); in wcn36xx_smd_trigger_ba()
2510 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_trigger_ba()
2513 (wcn->hal_buf + sizeof(msg_body)); in wcn36xx_smd_trigger_ba()
2517 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_trigger_ba()
2679 struct wcn36xx_hal_update_cfg_req_msg msg_body, *body; in wcn36xx_smd_update_cfg() local
2684 INIT_HAL_MSG(msg_body, WCN36XX_HAL_UPDATE_CFG_REQ); in wcn36xx_smd_update_cfg()
2686 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_update_cfg()
2689 len = msg_body.header.len; in wcn36xx_smd_update_cfg()
2715 struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_req_msg *msg_body = NULL; in wcn36xx_smd_set_mc_list() local
2720 msg_body = (struct wcn36xx_hal_rcv_flt_pkt_set_mc_list_req_msg *) in wcn36xx_smd_set_mc_list()
2722 INIT_HAL_MSG(*msg_body, WCN36XX_HAL_8023_MULTICAST_LIST_REQ); in wcn36xx_smd_set_mc_list()
2726 memcpy(&msg_body->mc_addr_list, fp, in wcn36xx_smd_set_mc_list()
2727 sizeof(msg_body->mc_addr_list)); in wcn36xx_smd_set_mc_list()
2729 msg_body->mc_addr_list.mc_addr_count = 0; in wcn36xx_smd_set_mc_list()
2731 msg_body->mc_addr_list.bss_index = vif_priv->bss_index; in wcn36xx_smd_set_mc_list()
2733 ret = wcn36xx_smd_send_and_wait(wcn, msg_body->header.len); in wcn36xx_smd_set_mc_list()
2752 struct wcn36xx_hal_host_offload_req_msg msg_body; in wcn36xx_smd_arp_offload() local
2757 INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_OFFLOAD_REQ); in wcn36xx_smd_arp_offload()
2758 msg_body.host_offload_params.offload_type = in wcn36xx_smd_arp_offload()
2761 msg_body.host_offload_params.enable = in wcn36xx_smd_arp_offload()
2763 memcpy(&msg_body.host_offload_params.u, in wcn36xx_smd_arp_offload()
2766 msg_body.ns_offload_params.bss_index = vif_priv->bss_index; in wcn36xx_smd_arp_offload()
2768 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_arp_offload()
2770 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_arp_offload()
2790 struct wcn36xx_hal_host_offload_req_msg msg_body; in wcn36xx_smd_ipv6_ns_offload() local
2797 INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_OFFLOAD_REQ); in wcn36xx_smd_ipv6_ns_offload()
2798 ho_params = &msg_body.host_offload_params; in wcn36xx_smd_ipv6_ns_offload()
2799 ns_params = &msg_body.ns_offload_params; in wcn36xx_smd_ipv6_ns_offload()
2824 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_ipv6_ns_offload()
2826 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_ipv6_ns_offload()
2852 struct wcn36xx_hal_gtk_offload_req_msg msg_body; in wcn36xx_smd_gtk_offload() local
2857 INIT_HAL_MSG(msg_body, WCN36XX_HAL_GTK_OFFLOAD_REQ); in wcn36xx_smd_gtk_offload()
2860 memcpy(&msg_body.kek, vif_priv->rekey_data.kek, NL80211_KEK_LEN); in wcn36xx_smd_gtk_offload()
2861 memcpy(&msg_body.kck, vif_priv->rekey_data.kck, NL80211_KCK_LEN); in wcn36xx_smd_gtk_offload()
2862 msg_body.key_replay_counter = in wcn36xx_smd_gtk_offload()
2864 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_gtk_offload()
2866 msg_body.flags = WCN36XX_HAL_GTK_OFFLOAD_FLAGS_DISABLE; in wcn36xx_smd_gtk_offload()
2869 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_gtk_offload()
2871 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_gtk_offload()
2931 struct wcn36xx_hal_gtk_offload_get_info_req_msg msg_body; in wcn36xx_smd_gtk_offload_get_info() local
2936 INIT_HAL_MSG(msg_body, WCN36XX_HAL_GTK_OFFLOAD_GETINFO_REQ); in wcn36xx_smd_gtk_offload_get_info()
2938 msg_body.bss_index = vif_priv->bss_index; in wcn36xx_smd_gtk_offload_get_info()
2940 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_gtk_offload_get_info()
2942 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_gtk_offload_get_info()
2960 struct wcn36xx_hal_wlan_host_suspend_ind_msg msg_body; in wcn36xx_smd_wlan_host_suspend_ind() local
2965 INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_SUSPEND_IND); in wcn36xx_smd_wlan_host_suspend_ind()
2966 msg_body.configured_mcst_bcst_filter_setting = 0; in wcn36xx_smd_wlan_host_suspend_ind()
2967 msg_body.active_session_count = 1; in wcn36xx_smd_wlan_host_suspend_ind()
2968 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_wlan_host_suspend_ind()
2970 ret = rpmsg_send(wcn->smd_channel, wcn->hal_buf, msg_body.header.len); in wcn36xx_smd_wlan_host_suspend_ind()
2979 struct wcn36xx_hal_wlan_host_resume_req_msg msg_body; in wcn36xx_smd_host_resume() local
2985 INIT_HAL_MSG(msg_body, WCN36XX_HAL_HOST_RESUME_REQ); in wcn36xx_smd_host_resume()
2986 msg_body.configured_mcst_bcst_filter_setting = 0; in wcn36xx_smd_host_resume()
2988 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_host_resume()
2990 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_host_resume()