Lines Matching refs:wcn
182 static int put_cfg_tlv_u32(struct wcn36xx *wcn, size_t *len, u32 id, u32 value) in put_cfg_tlv_u32() argument
192 entry = (struct wcn36xx_hal_cfg *) (wcn->hal_buf + *len); in put_cfg_tlv_u32()
206 static void wcn36xx_smd_set_bss_nw_type(struct wcn36xx *wcn, in wcn36xx_smd_set_bss_nw_type() argument
210 if (NL80211_BAND_5GHZ == WCN36XX_BAND(wcn)) in wcn36xx_smd_set_bss_nw_type()
289 static void wcn36xx_smd_set_sta_vht_params(struct wcn36xx *wcn, in wcn36xx_smd_set_sta_vht_params() argument
299 if (wcn36xx_firmware_get_feat_caps(wcn->fw_feat_caps, MU_MIMO)) { in wcn36xx_smd_set_sta_vht_params()
337 static void wcn36xx_smd_set_sta_default_vht_params(struct wcn36xx *wcn, in wcn36xx_smd_set_sta_default_vht_params() argument
340 if (wcn->rf_id == RF_IRIS_WCN3680) { in wcn36xx_smd_set_sta_default_vht_params()
353 static void wcn36xx_smd_set_sta_default_ht_ldpc_params(struct wcn36xx *wcn, in wcn36xx_smd_set_sta_default_ht_ldpc_params() argument
356 if (wcn->rf_id == RF_IRIS_WCN3680) in wcn36xx_smd_set_sta_default_ht_ldpc_params()
362 static void wcn36xx_smd_set_sta_params(struct wcn36xx *wcn, in wcn36xx_smd_set_sta_params() argument
379 sta_params->listen_interval = WCN36XX_LISTEN_INTERVAL(wcn); in wcn36xx_smd_set_sta_params()
422 static int wcn36xx_smd_send_and_wait(struct wcn36xx *wcn, size_t len) in wcn36xx_smd_send_and_wait() argument
427 (struct wcn36xx_hal_msg_header *)wcn->hal_buf; in wcn36xx_smd_send_and_wait()
430 wcn36xx_dbg_dump(WCN36XX_DBG_SMD_DUMP, "HAL >>> ", wcn->hal_buf, len); in wcn36xx_smd_send_and_wait()
432 init_completion(&wcn->hal_rsp_compl); in wcn36xx_smd_send_and_wait()
434 ret = rpmsg_send(wcn->smd_channel, wcn->hal_buf, len); in wcn36xx_smd_send_and_wait()
439 if (wait_for_completion_timeout(&wcn->hal_rsp_compl, in wcn36xx_smd_send_and_wait()
504 int wcn36xx_smd_load_nv(struct wcn36xx *wcn) in wcn36xx_smd_load_nv() argument
512 if (!wcn->nv) { in wcn36xx_smd_load_nv()
513 ret = request_firmware(&wcn->nv, wcn->nv_file, wcn->dev); in wcn36xx_smd_load_nv()
516 wcn->nv_file, ret); in wcn36xx_smd_load_nv()
521 nv_d = (struct nv_data *)wcn->nv->data; in wcn36xx_smd_load_nv()
528 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_load_nv()
531 fw_bytes_left = wcn->nv->size - fm_offset - 4; 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()
552 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_load_nv()
555 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, in wcn36xx_smd_load_nv()
556 wcn->hal_rsp_len); in wcn36xx_smd_load_nv()
568 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_load_nv()
572 static int wcn36xx_smd_start_rsp(struct wcn36xx *wcn, void *buf, size_t len) in wcn36xx_smd_start_rsp() argument
584 memcpy(wcn->crm_version, rsp->start_rsp_params.crm_version, in wcn36xx_smd_start_rsp()
586 memcpy(wcn->wlan_version, rsp->start_rsp_params.wlan_version, in wcn36xx_smd_start_rsp()
590 wcn->crm_version[WCN36XX_HAL_VERSION_LENGTH] = '\0'; in wcn36xx_smd_start_rsp()
591 wcn->wlan_version[WCN36XX_HAL_VERSION_LENGTH] = '\0'; in wcn36xx_smd_start_rsp()
593 wcn->fw_revision = rsp->start_rsp_params.version.revision; in wcn36xx_smd_start_rsp()
594 wcn->fw_version = rsp->start_rsp_params.version.version; in wcn36xx_smd_start_rsp()
595 wcn->fw_minor = rsp->start_rsp_params.version.minor; in wcn36xx_smd_start_rsp()
596 wcn->fw_major = rsp->start_rsp_params.version.major; in wcn36xx_smd_start_rsp()
598 if (wcn->first_boot) { in wcn36xx_smd_start_rsp()
599 wcn->first_boot = false; in wcn36xx_smd_start_rsp()
601 wcn->wlan_version, wcn->crm_version); in wcn36xx_smd_start_rsp()
604 wcn->fw_major, wcn->fw_minor, in wcn36xx_smd_start_rsp()
605 wcn->fw_version, wcn->fw_revision, in wcn36xx_smd_start_rsp()
612 int wcn36xx_smd_start(struct wcn36xx *wcn) in wcn36xx_smd_start() argument
621 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_start()
627 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_start()
629 body = (struct wcn36xx_hal_mac_start_req_msg *)wcn->hal_buf; in wcn36xx_smd_start()
632 if (wcn->rf_id == RF_IRIS_WCN3680) { in wcn36xx_smd_start()
641 ret = put_cfg_tlv_u32(wcn, &len, cfg_vals[i].cfg_id, in wcn36xx_smd_start()
652 ret = wcn36xx_smd_send_and_wait(wcn, body->header.len); in wcn36xx_smd_start()
658 ret = wcn36xx_smd_start_rsp(wcn, wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_start()
665 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_start()
669 int wcn36xx_smd_stop(struct wcn36xx *wcn) in wcn36xx_smd_stop() argument
674 mutex_lock(&wcn->hal_mutex); 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()
686 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_stop()
692 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_stop()
696 int wcn36xx_smd_init_scan(struct wcn36xx *wcn, enum wcn36xx_hal_sys_mode mode, in wcn36xx_smd_init_scan() argument
703 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_init_scan()
715 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_init_scan()
719 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_init_scan()
724 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_init_scan()
729 wcn->sw_scan_init = true; in wcn36xx_smd_init_scan()
731 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_init_scan()
735 int wcn36xx_smd_start_scan(struct wcn36xx *wcn, u8 scan_channel) in wcn36xx_smd_start_scan() argument
740 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_start_scan()
745 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_start_scan()
750 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_start_scan()
755 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_start_scan()
760 wcn->sw_scan_channel = scan_channel; in wcn36xx_smd_start_scan()
762 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_start_scan()
766 int wcn36xx_smd_end_scan(struct wcn36xx *wcn, u8 scan_channel) in wcn36xx_smd_end_scan() argument
771 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_end_scan()
776 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_end_scan()
781 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_end_scan()
786 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_end_scan()
791 wcn->sw_scan_channel = 0; in wcn36xx_smd_end_scan()
793 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_end_scan()
797 int wcn36xx_smd_finish_scan(struct wcn36xx *wcn, in wcn36xx_smd_finish_scan() argument
805 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_finish_scan()
809 msg_body.oper_channel = WCN36XX_HW_CHANNEL(wcn); in wcn36xx_smd_finish_scan()
818 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_finish_scan()
823 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_finish_scan()
828 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_finish_scan()
833 wcn->sw_scan_init = false; in wcn36xx_smd_finish_scan()
835 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_finish_scan()
839 int wcn36xx_smd_start_hw_scan(struct wcn36xx *wcn, struct ieee80211_vif *vif, in wcn36xx_smd_start_hw_scan() argument
849 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_start_hw_scan()
889 PREPARE_HAL_BUF(wcn->hal_buf, (*msg_body)); in wcn36xx_smd_start_hw_scan()
896 ret = wcn36xx_smd_send_and_wait(wcn, msg_body->header.len); in wcn36xx_smd_start_hw_scan()
901 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_start_hw_scan()
909 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_start_hw_scan()
913 int wcn36xx_smd_stop_hw_scan(struct wcn36xx *wcn) in wcn36xx_smd_stop_hw_scan() argument
918 mutex_lock(&wcn->hal_mutex); 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()
929 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_stop_hw_scan()
936 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_stop_hw_scan()
940 int wcn36xx_smd_update_channel_list(struct wcn36xx *wcn, struct cfg80211_scan_request *req) in wcn36xx_smd_update_channel_list() argument
998 mutex_lock(&wcn->hal_mutex); 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()
1008 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_update_channel_list()
1016 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_update_channel_list()
1034 int wcn36xx_smd_switch_channel(struct wcn36xx *wcn, in wcn36xx_smd_switch_channel() argument
1040 mutex_lock(&wcn->hal_mutex); 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()
1055 ret = wcn36xx_smd_switch_channel_rsp(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_switch_channel()
1061 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_switch_channel()
1091 int wcn36xx_smd_process_ptt_msg(struct wcn36xx *wcn, in wcn36xx_smd_process_ptt_msg() argument
1098 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_process_ptt_msg()
1110 PREPARE_HAL_PTT_MSG_BUF(wcn->hal_buf, p_msg_body); in wcn36xx_smd_process_ptt_msg()
1112 ret = wcn36xx_smd_send_and_wait(wcn, p_msg_body->header.len); in wcn36xx_smd_process_ptt_msg()
1117 ret = wcn36xx_smd_process_ptt_msg_rsp(wcn->hal_buf, wcn->hal_rsp_len, in wcn36xx_smd_process_ptt_msg()
1126 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_process_ptt_msg()
1147 int wcn36xx_smd_update_scan_params(struct wcn36xx *wcn, in wcn36xx_smd_update_scan_params() argument
1153 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_update_scan_params()
1167 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_update_scan_params()
1173 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_update_scan_params()
1178 ret = wcn36xx_smd_update_scan_params_rsp(wcn->hal_buf, in wcn36xx_smd_update_scan_params()
1179 wcn->hal_rsp_len); in wcn36xx_smd_update_scan_params()
1186 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_update_scan_params()
1190 static int wcn36xx_smd_add_sta_self_rsp(struct wcn36xx *wcn, in wcn36xx_smd_add_sta_self_rsp() argument
1219 int wcn36xx_smd_add_sta_self(struct wcn36xx *wcn, struct ieee80211_vif *vif) in wcn36xx_smd_add_sta_self() argument
1224 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_add_sta_self()
1229 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_add_sta_self()
1235 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_add_sta_self()
1240 ret = wcn36xx_smd_add_sta_self_rsp(wcn, in wcn36xx_smd_add_sta_self()
1242 wcn->hal_buf, in wcn36xx_smd_add_sta_self()
1243 wcn->hal_rsp_len); in wcn36xx_smd_add_sta_self()
1249 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_add_sta_self()
1253 int wcn36xx_smd_delete_sta_self(struct wcn36xx *wcn, u8 *addr) in wcn36xx_smd_delete_sta_self() argument
1258 mutex_lock(&wcn->hal_mutex); 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()
1270 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_delete_sta_self()
1277 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_delete_sta_self()
1281 int wcn36xx_smd_delete_sta(struct wcn36xx *wcn, u8 sta_index) in wcn36xx_smd_delete_sta() argument
1286 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_delete_sta()
1291 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_delete_sta()
1297 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_delete_sta()
1302 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_delete_sta()
1308 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_delete_sta()
1328 int wcn36xx_smd_join(struct wcn36xx *wcn, const u8 *bssid, u8 *vif, u8 ch) in wcn36xx_smd_join() argument
1333 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_join()
1340 if (conf_is_ht40_minus(&wcn->hw->conf)) in wcn36xx_smd_join()
1343 else if (conf_is_ht40_plus(&wcn->hw->conf)) in wcn36xx_smd_join()
1353 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_join()
1360 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_join()
1365 ret = wcn36xx_smd_join_rsp(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_join()
1371 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_join()
1375 int wcn36xx_smd_set_link_st(struct wcn36xx *wcn, const u8 *bssid, in wcn36xx_smd_set_link_st() argument
1382 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_set_link_st()
1389 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_set_link_st()
1395 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_set_link_st()
1400 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_set_link_st()
1406 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_set_link_st()
1410 static void wcn36xx_smd_convert_sta_to_v1(struct wcn36xx *wcn, in wcn36xx_smd_convert_sta_to_v1() argument
1448 wcn36xx_smd_set_sta_params_v1(struct wcn36xx *wcn, in wcn36xx_smd_set_sta_params_v1() argument
1456 wcn36xx_smd_set_sta_params(wcn, vif, sta, &sta_par_v0); in wcn36xx_smd_set_sta_params_v1()
1457 wcn36xx_smd_convert_sta_to_v1(wcn, &sta_par_v0, sta_par); in wcn36xx_smd_set_sta_params_v1()
1461 wcn36xx_smd_set_sta_vht_params(wcn, sta, sta_par); in wcn36xx_smd_set_sta_params_v1()
1467 wcn36xx_smd_set_sta_default_vht_params(wcn, sta_par); in wcn36xx_smd_set_sta_params_v1()
1468 wcn36xx_smd_set_sta_default_ht_ldpc_params(wcn, sta_par); in wcn36xx_smd_set_sta_params_v1()
1472 static int wcn36xx_smd_config_sta_rsp(struct wcn36xx *wcn, in wcn36xx_smd_config_sta_rsp() argument
1505 static int wcn36xx_smd_config_sta_v1(struct wcn36xx *wcn, in wcn36xx_smd_config_sta_v1() argument
1512 if (wcn->rf_id == RF_IRIS_WCN3680) { in wcn36xx_smd_config_sta_v1()
1521 wcn36xx_smd_set_sta_params_v1(wcn, vif, sta, 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()
1533 static int wcn36xx_smd_config_sta_v0(struct wcn36xx *wcn, in wcn36xx_smd_config_sta_v0() argument
1544 wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params); in wcn36xx_smd_config_sta_v0()
1546 PREPARE_HAL_BUF(wcn->hal_buf, msg); in wcn36xx_smd_config_sta_v0()
1554 return wcn36xx_smd_send_and_wait(wcn, msg.header.len); in wcn36xx_smd_config_sta_v0()
1557 int wcn36xx_smd_config_sta(struct wcn36xx *wcn, struct ieee80211_vif *vif, in wcn36xx_smd_config_sta() argument
1562 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_config_sta()
1564 if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) in wcn36xx_smd_config_sta()
1565 ret = wcn36xx_smd_config_sta_v1(wcn, vif, sta); in wcn36xx_smd_config_sta()
1567 ret = wcn36xx_smd_config_sta_v0(wcn, vif, sta); in wcn36xx_smd_config_sta()
1573 ret = wcn36xx_smd_config_sta_rsp(wcn, in wcn36xx_smd_config_sta()
1575 wcn->hal_buf, in wcn36xx_smd_config_sta()
1576 wcn->hal_rsp_len); in wcn36xx_smd_config_sta()
1582 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_config_sta()
1586 static void wcn36xx_smd_set_bss_params(struct wcn36xx *wcn, in wcn36xx_smd_set_bss_params() argument
1624 wcn36xx_smd_set_bss_nw_type(wcn, sta, bss); in wcn36xx_smd_set_bss_params()
1638 bss->oper_channel = WCN36XX_HW_CHANNEL(wcn); in wcn36xx_smd_set_bss_params()
1640 if (conf_is_ht40_minus(&wcn->hw->conf)) in wcn36xx_smd_set_bss_params()
1642 else if (conf_is_ht40_plus(&wcn->hw->conf)) in wcn36xx_smd_set_bss_params()
1668 bss->max_tx_power = WCN36XX_MAX_POWER(wcn); in wcn36xx_smd_set_bss_params()
1674 static int wcn36xx_smd_config_bss_v1(struct wcn36xx *wcn, in wcn36xx_smd_config_bss_v1() argument
1691 if (wcn->rf_id == RF_IRIS_WCN3680) { in wcn36xx_smd_config_bss_v1()
1702 wcn36xx_smd_set_bss_params(wcn, vif, sta_80211, bssid, update, &bss_v0); in wcn36xx_smd_config_bss_v1()
1703 wcn36xx_smd_set_sta_params_v1(wcn, vif, sta_80211, sta); in wcn36xx_smd_config_bss_v1()
1729 if (wcn->hw->conf.chandef.width == NL80211_CHAN_WIDTH_80) { in wcn36xx_smd_config_bss_v1()
1730 chandef = &wcn->hw->conf.chandef; 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()
1796 static int wcn36xx_smd_config_bss_v0(struct wcn36xx *wcn, in wcn36xx_smd_config_bss_v0() argument
1816 wcn36xx_smd_set_bss_params(wcn, vif, sta, bssid, update, bss); in wcn36xx_smd_config_bss_v0()
1817 wcn36xx_smd_set_sta_params(wcn, vif, sta, sta_params); in wcn36xx_smd_config_bss_v0()
1819 PREPARE_HAL_BUF(wcn->hal_buf, (*msg)); in wcn36xx_smd_config_bss_v0()
1833 ret = wcn36xx_smd_send_and_wait(wcn, msg->header.len); in wcn36xx_smd_config_bss_v0()
1839 static int wcn36xx_smd_config_bss_rsp(struct wcn36xx *wcn, in wcn36xx_smd_config_bss_rsp() argument
1883 int wcn36xx_smd_config_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif, in wcn36xx_smd_config_bss() argument
1889 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_config_bss()
1891 if (!wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) in wcn36xx_smd_config_bss()
1892 ret = wcn36xx_smd_config_bss_v1(wcn, vif, sta, bssid, update); in wcn36xx_smd_config_bss()
1894 ret = wcn36xx_smd_config_bss_v0(wcn, vif, sta, bssid, update); in wcn36xx_smd_config_bss()
1900 ret = wcn36xx_smd_config_bss_rsp(wcn, in wcn36xx_smd_config_bss()
1903 wcn->hal_buf, in wcn36xx_smd_config_bss()
1904 wcn->hal_rsp_len); in wcn36xx_smd_config_bss()
1909 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_config_bss()
1913 int wcn36xx_smd_delete_bss(struct wcn36xx *wcn, struct ieee80211_vif *vif) in wcn36xx_smd_delete_bss() argument
1919 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_delete_bss()
1928 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_delete_bss()
1932 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_delete_bss()
1937 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_delete_bss()
1945 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_delete_bss()
1949 int wcn36xx_smd_send_beacon(struct wcn36xx *wcn, struct ieee80211_vif *vif, in wcn36xx_smd_send_beacon() argument
1956 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_send_beacon()
2002 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_send_beacon()
2008 ret = wcn36xx_smd_send_and_wait(wcn, msg_body.header.len); in wcn36xx_smd_send_beacon()
2013 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_send_beacon()
2019 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_send_beacon()
2023 int wcn36xx_smd_update_proberesp_tmpl(struct wcn36xx *wcn, in wcn36xx_smd_update_proberesp_tmpl() argument
2030 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_update_proberesp_tmpl()
2045 PREPARE_HAL_BUF(wcn->hal_buf, msg); in wcn36xx_smd_update_proberesp_tmpl()
2051 ret = wcn36xx_smd_send_and_wait(wcn, msg.header.len); in wcn36xx_smd_update_proberesp_tmpl()
2056 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_update_proberesp_tmpl()
2063 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_update_proberesp_tmpl()
2067 int wcn36xx_smd_set_stakey(struct wcn36xx *wcn, in wcn36xx_smd_set_stakey() argument
2077 mutex_lock(&wcn->hal_mutex); 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()
2106 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_set_stakey()
2112 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_set_stakey()
2116 int wcn36xx_smd_set_bsskey(struct wcn36xx *wcn, in wcn36xx_smd_set_bsskey() argument
2126 mutex_lock(&wcn->hal_mutex); 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()
2145 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_set_bsskey()
2151 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_set_bsskey()
2155 int wcn36xx_smd_remove_stakey(struct wcn36xx *wcn, in wcn36xx_smd_remove_stakey() argument
2163 mutex_lock(&wcn->hal_mutex); 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()
2177 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_remove_stakey()
2183 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_remove_stakey()
2187 int wcn36xx_smd_remove_bsskey(struct wcn36xx *wcn, in wcn36xx_smd_remove_bsskey() argument
2195 mutex_lock(&wcn->hal_mutex); 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()
2208 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_remove_bsskey()
2214 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_remove_bsskey()
2218 int wcn36xx_smd_enter_bmps(struct wcn36xx *wcn, struct ieee80211_vif *vif) in wcn36xx_smd_enter_bmps() argument
2224 mutex_lock(&wcn->hal_mutex); 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()
2238 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_enter_bmps()
2244 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_enter_bmps()
2248 int wcn36xx_smd_exit_bmps(struct wcn36xx *wcn, struct ieee80211_vif *vif) in wcn36xx_smd_exit_bmps() argument
2254 mutex_lock(&wcn->hal_mutex); 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()
2267 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_exit_bmps()
2273 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_exit_bmps()
2277 int wcn36xx_smd_enter_imps(struct wcn36xx *wcn) in wcn36xx_smd_enter_imps() argument
2282 mutex_lock(&wcn->hal_mutex); 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()
2292 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_enter_imps()
2300 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_enter_imps()
2304 int wcn36xx_smd_exit_imps(struct wcn36xx *wcn) in wcn36xx_smd_exit_imps() argument
2309 mutex_lock(&wcn->hal_mutex); 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()
2319 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_exit_imps()
2326 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_exit_imps()
2330 int wcn36xx_smd_set_power_params(struct wcn36xx *wcn, bool ignore_dtim) in wcn36xx_smd_set_power_params() argument
2335 mutex_lock(&wcn->hal_mutex); 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()
2356 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_set_power_params()
2363 int wcn36xx_smd_keep_alive_req(struct wcn36xx *wcn, in wcn36xx_smd_keep_alive_req() argument
2371 mutex_lock(&wcn->hal_mutex); 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()
2393 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_keep_alive_req()
2399 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_keep_alive_req()
2403 int wcn36xx_smd_dump_cmd_req(struct wcn36xx *wcn, u32 arg1, u32 arg2, in wcn36xx_smd_dump_cmd_req() argument
2409 mutex_lock(&wcn->hal_mutex); 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()
2425 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_dump_cmd_req()
2431 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_dump_cmd_req()
2435 int wcn36xx_smd_feature_caps_exchange(struct wcn36xx *wcn) in wcn36xx_smd_feature_caps_exchange() argument
2440 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_feature_caps_exchange()
2444 if (wcn->rf_id == RF_IRIS_WCN3680) { 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()
2458 if (wcn->hal_rsp_len != sizeof(*rsp)) { in wcn36xx_smd_feature_caps_exchange()
2463 rsp = (struct wcn36xx_hal_feat_caps_msg *) wcn->hal_buf; in wcn36xx_smd_feature_caps_exchange()
2466 wcn->fw_feat_caps[i] = rsp->feat_caps[i]; in wcn36xx_smd_feature_caps_exchange()
2468 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_feature_caps_exchange()
2488 int wcn36xx_smd_add_ba_session(struct wcn36xx *wcn, in wcn36xx_smd_add_ba_session() argument
2499 mutex_lock(&wcn->hal_mutex); 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()
2522 ret = wcn36xx_smd_add_ba_session_rsp(wcn->hal_buf, wcn->hal_rsp_len, in wcn36xx_smd_add_ba_session()
2532 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_add_ba_session()
2536 int wcn36xx_smd_add_ba(struct wcn36xx *wcn, u8 session_id) in wcn36xx_smd_add_ba() argument
2541 mutex_lock(&wcn->hal_mutex); 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()
2554 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_add_ba()
2560 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_add_ba()
2564 int wcn36xx_smd_del_ba(struct wcn36xx *wcn, u16 tid, u8 direction, u8 sta_index) in wcn36xx_smd_del_ba() argument
2569 mutex_lock(&wcn->hal_mutex); 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()
2582 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_del_ba()
2588 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_del_ba()
2592 int wcn36xx_smd_get_stats(struct wcn36xx *wcn, u8 sta_index, u32 stats_mask, in wcn36xx_smd_get_stats() argument
2606 mutex_lock(&wcn->hal_mutex); 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()
2620 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_get_stats()
2626 rsp = (struct wcn36xx_hal_stats_rsp_msg *)wcn->hal_buf; in wcn36xx_smd_get_stats()
2627 rsp_body = (wcn->hal_buf + sizeof(struct wcn36xx_hal_stats_rsp_msg)); in wcn36xx_smd_get_stats()
2643 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_get_stats()
2671 int wcn36xx_smd_trigger_ba(struct wcn36xx *wcn, u8 sta_index, u16 tid, u16 *ssn) in wcn36xx_smd_trigger_ba() argument
2681 mutex_lock(&wcn->hal_mutex); 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()
2699 ret = wcn36xx_smd_trigger_ba_rsp(wcn->hal_buf, wcn->hal_rsp_len, ba_info); in wcn36xx_smd_trigger_ba()
2705 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_trigger_ba()
2713 static int wcn36xx_smd_tx_compl_ind(struct wcn36xx *wcn, void *buf, size_t len) in wcn36xx_smd_tx_compl_ind() argument
2722 wcn36xx_dxe_tx_ack_ind(wcn, rsp->status); in wcn36xx_smd_tx_compl_ind()
2727 static int wcn36xx_smd_hw_scan_ind(struct wcn36xx *wcn, void *buf, size_t len) in wcn36xx_smd_hw_scan_ind() argument
2745 mutex_lock(&wcn->scan_lock); in wcn36xx_smd_hw_scan_ind()
2746 wcn->scan_req = NULL; in wcn36xx_smd_hw_scan_ind()
2747 if (wcn->scan_aborted) in wcn36xx_smd_hw_scan_ind()
2749 mutex_unlock(&wcn->scan_lock); in wcn36xx_smd_hw_scan_ind()
2750 ieee80211_scan_completed(wcn->hw, &scan_info); in wcn36xx_smd_hw_scan_ind()
2764 static int wcn36xx_smd_missed_beacon_ind(struct wcn36xx *wcn, in wcn36xx_smd_missed_beacon_ind() argument
2773 if (wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) { in wcn36xx_smd_missed_beacon_ind()
2774 list_for_each_entry(tmp, &wcn->vif_list, list) { in wcn36xx_smd_missed_beacon_ind()
2788 list_for_each_entry(tmp, &wcn->vif_list, list) { in wcn36xx_smd_missed_beacon_ind()
2802 static int wcn36xx_smd_delete_sta_context_ind(struct wcn36xx *wcn, in wcn36xx_smd_delete_sta_context_ind() argument
2822 list_for_each_entry(vif_priv, &wcn->vif_list, list) { in wcn36xx_smd_delete_sta_context_ind()
2856 static int wcn36xx_smd_print_reg_info_ind(struct wcn36xx *wcn, in wcn36xx_smd_print_reg_info_ind() argument
2880 int wcn36xx_smd_update_cfg(struct wcn36xx *wcn, u32 cfg_id, u32 value) in wcn36xx_smd_update_cfg() argument
2886 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_update_cfg()
2889 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_update_cfg()
2891 body = (struct wcn36xx_hal_update_cfg_req_msg *) wcn->hal_buf; in wcn36xx_smd_update_cfg()
2894 put_cfg_tlv_u32(wcn, &len, cfg_id, value); in wcn36xx_smd_update_cfg()
2898 ret = wcn36xx_smd_send_and_wait(wcn, body->header.len); in wcn36xx_smd_update_cfg()
2903 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_update_cfg()
2909 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_update_cfg()
2913 int wcn36xx_smd_set_mc_list(struct wcn36xx *wcn, in wcn36xx_smd_set_mc_list() argument
2921 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_set_mc_list()
2924 wcn->hal_buf; in wcn36xx_smd_set_mc_list()
2936 ret = wcn36xx_smd_send_and_wait(wcn, msg_body->header.len); in wcn36xx_smd_set_mc_list()
2941 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_set_mc_list()
2947 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_set_mc_list()
2951 int wcn36xx_smd_arp_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, in wcn36xx_smd_arp_offload() argument
2958 mutex_lock(&wcn->hal_mutex); 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()
2978 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_arp_offload()
2984 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_arp_offload()
2989 int wcn36xx_smd_ipv6_ns_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, in wcn36xx_smd_ipv6_ns_offload() argument
2998 mutex_lock(&wcn->hal_mutex); 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()
3034 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_ipv6_ns_offload()
3040 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_ipv6_ns_offload()
3044 int wcn36xx_smd_ipv6_ns_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, in wcn36xx_smd_ipv6_ns_offload() argument
3051 int wcn36xx_smd_gtk_offload(struct wcn36xx *wcn, struct ieee80211_vif *vif, in wcn36xx_smd_gtk_offload() argument
3058 mutex_lock(&wcn->hal_mutex); 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()
3079 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_gtk_offload()
3085 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_gtk_offload()
3089 static int wcn36xx_smd_gtk_offload_get_info_rsp(struct wcn36xx *wcn, in wcn36xx_smd_gtk_offload_get_info_rsp() argument
3096 if (wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len)) in wcn36xx_smd_gtk_offload_get_info_rsp()
3099 rsp = (struct wcn36xx_hal_gtk_offload_get_info_rsp_msg *)wcn->hal_buf; in wcn36xx_smd_gtk_offload_get_info_rsp()
3130 int wcn36xx_smd_gtk_offload_get_info(struct wcn36xx *wcn, in wcn36xx_smd_gtk_offload_get_info() argument
3137 mutex_lock(&wcn->hal_mutex); 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()
3150 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_gtk_offload_get_info()
3155 ret = wcn36xx_smd_gtk_offload_get_info_rsp(wcn, vif); in wcn36xx_smd_gtk_offload_get_info()
3157 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_gtk_offload_get_info()
3161 int wcn36xx_smd_wlan_host_suspend_ind(struct wcn36xx *wcn) in wcn36xx_smd_wlan_host_suspend_ind() argument
3166 mutex_lock(&wcn->hal_mutex); 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()
3175 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_wlan_host_suspend_ind()
3180 int wcn36xx_smd_host_resume(struct wcn36xx *wcn) in wcn36xx_smd_host_resume() argument
3186 mutex_lock(&wcn->hal_mutex); 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()
3198 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_host_resume()
3204 rsp = (struct wcn36xx_hal_host_resume_rsp_msg *)wcn->hal_buf; in wcn36xx_smd_host_resume()
3209 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_host_resume()
3253 int wcn36xx_smd_add_beacon_filter(struct wcn36xx *wcn, in wcn36xx_smd_add_beacon_filter() argument
3262 if (!wcn36xx_firmware_get_feat_caps(wcn->fw_feat_caps, BCN_FILTER)) in wcn36xx_smd_add_beacon_filter()
3265 mutex_lock(&wcn->hal_mutex); in wcn36xx_smd_add_beacon_filter()
3268 PREPARE_HAL_BUF(wcn->hal_buf, msg_body); in wcn36xx_smd_add_beacon_filter()
3270 body = (struct wcn36xx_hal_add_bcn_filter_req_msg *)wcn->hal_buf; in wcn36xx_smd_add_beacon_filter()
3283 ret = wcn36xx_smd_send_and_wait(wcn, body->header.len); in wcn36xx_smd_add_beacon_filter()
3289 ret = wcn36xx_smd_rsp_status_check(wcn->hal_buf, wcn->hal_rsp_len); in wcn36xx_smd_add_beacon_filter()
3295 mutex_unlock(&wcn->hal_mutex); in wcn36xx_smd_add_beacon_filter()
3304 struct wcn36xx *wcn = hw->priv; in wcn36xx_smd_rsp_process() local
3356 memcpy(wcn->hal_buf, buf, len); in wcn36xx_smd_rsp_process()
3357 wcn->hal_rsp_len = len; in wcn36xx_smd_rsp_process()
3358 complete(&wcn->hal_rsp_compl); in wcn36xx_smd_rsp_process()
3379 spin_lock(&wcn->hal_ind_lock); in wcn36xx_smd_rsp_process()
3380 list_add_tail(&msg_ind->list, &wcn->hal_ind_queue); in wcn36xx_smd_rsp_process()
3381 queue_work(wcn->hal_ind_wq, &wcn->hal_ind_work); in wcn36xx_smd_rsp_process()
3382 spin_unlock(&wcn->hal_ind_lock); in wcn36xx_smd_rsp_process()
3395 struct wcn36xx *wcn = in wcn36xx_ind_smd_work() local
3403 spin_lock_irqsave(&wcn->hal_ind_lock, flags); in wcn36xx_ind_smd_work()
3405 if (list_empty(&wcn->hal_ind_queue)) { in wcn36xx_ind_smd_work()
3406 spin_unlock_irqrestore(&wcn->hal_ind_lock, flags); in wcn36xx_ind_smd_work()
3410 hal_ind_msg = list_first_entry(&wcn->hal_ind_queue, in wcn36xx_ind_smd_work()
3414 spin_unlock_irqrestore(&wcn->hal_ind_lock, flags); in wcn36xx_ind_smd_work()
3424 wcn36xx_smd_tx_compl_ind(wcn, in wcn36xx_ind_smd_work()
3429 wcn36xx_smd_missed_beacon_ind(wcn, in wcn36xx_ind_smd_work()
3434 wcn36xx_smd_delete_sta_context_ind(wcn, in wcn36xx_ind_smd_work()
3439 wcn36xx_smd_print_reg_info_ind(wcn, in wcn36xx_ind_smd_work()
3444 wcn36xx_smd_hw_scan_ind(wcn, hal_ind_msg->msg, in wcn36xx_ind_smd_work()
3456 int wcn36xx_smd_open(struct wcn36xx *wcn) in wcn36xx_smd_open() argument
3458 wcn->hal_ind_wq = create_freezable_workqueue("wcn36xx_smd_ind"); in wcn36xx_smd_open()
3459 if (!wcn->hal_ind_wq) in wcn36xx_smd_open()
3462 INIT_WORK(&wcn->hal_ind_work, wcn36xx_ind_smd_work); in wcn36xx_smd_open()
3463 INIT_LIST_HEAD(&wcn->hal_ind_queue); in wcn36xx_smd_open()
3464 spin_lock_init(&wcn->hal_ind_lock); in wcn36xx_smd_open()
3469 void wcn36xx_smd_close(struct wcn36xx *wcn) in wcn36xx_smd_close() argument
3473 cancel_work_sync(&wcn->hal_ind_work); in wcn36xx_smd_close()
3474 destroy_workqueue(wcn->hal_ind_wq); in wcn36xx_smd_close()
3476 list_for_each_entry_safe(msg, tmp, &wcn->hal_ind_queue, list) in wcn36xx_smd_close()