Lines Matching refs:twt_params
446 struct wifi_twt_params twt_params = {0}; in nrf_wifi_twt_teardown_flows() local
483 twt_params.operation = WIFI_TWT_TEARDOWN; in nrf_wifi_twt_teardown_flows()
484 twt_params.flow_id = flow_id; in nrf_wifi_twt_teardown_flows()
485 twt_params.teardown_status = WIFI_TWT_TEARDOWN_SUCCESS; in nrf_wifi_twt_teardown_flows()
486 wifi_mgmt_raise_twt_event(vif_ctx_zep->zep_net_if_ctx, &twt_params); in nrf_wifi_twt_teardown_flows()
495 struct wifi_twt_params *twt_params) in nrf_wifi_set_twt() argument
503 if (!dev || !twt_params) { in nrf_wifi_set_twt()
528 if (!(twt_params->operation == WIFI_TWT_TEARDOWN && twt_params->teardown.teardown_all) && in nrf_wifi_set_twt()
529 twt_params->flow_id >= WIFI_MAX_TWT_FLOWS) { in nrf_wifi_set_twt()
531 __func__, twt_params->flow_id); in nrf_wifi_set_twt()
532 twt_params->fail_reason = WIFI_TWT_FAIL_INVALID_FLOW_ID; in nrf_wifi_set_twt()
536 switch (twt_params->operation) { in nrf_wifi_set_twt()
538 if (vif_ctx_zep->twt_flow_in_progress_map & BIT(twt_params->flow_id)) { in nrf_wifi_set_twt()
539 twt_params->fail_reason = WIFI_TWT_FAIL_OPERATION_IN_PROGRESS; in nrf_wifi_set_twt()
543 if (twt_params->setup_cmd == WIFI_TWT_SETUP_CMD_REQUEST) { in nrf_wifi_set_twt()
544 if (vif_ctx_zep->twt_flows_map & BIT(twt_params->flow_id)) { in nrf_wifi_set_twt()
545 twt_params->fail_reason = WIFI_TWT_FAIL_FLOW_ALREADY_EXISTS; in nrf_wifi_set_twt()
551 nrf_wifi_twt_us_to_float(twt_params->setup.twt_interval); in nrf_wifi_set_twt()
553 twt_info.twt_flow_id = twt_params->flow_id; in nrf_wifi_set_twt()
554 twt_info.neg_type = twt_wifi_mgmt_to_rpu_neg_type(twt_params->negotiation_type); in nrf_wifi_set_twt()
555 twt_info.setup_cmd = twt_wifi_mgmt_to_rpu_setup_cmd(twt_params->setup_cmd); in nrf_wifi_set_twt()
556 twt_info.ap_trigger_frame = twt_params->setup.trigger; in nrf_wifi_set_twt()
557 twt_info.is_implicit = twt_params->setup.implicit; in nrf_wifi_set_twt()
558 if (twt_params->setup.announce) { in nrf_wifi_set_twt()
565 twt_params->setup.twt_wake_interval; in nrf_wifi_set_twt()
569 twt_info.dialog_token = twt_params->dialog_token; in nrf_wifi_set_twt()
570 twt_info.twt_wake_ahead_duration = twt_params->setup.twt_wake_ahead_duration; in nrf_wifi_set_twt()
581 if (!twt_params->teardown.teardown_all) { in nrf_wifi_set_twt()
582 if (!(vif_ctx_zep->twt_flows_map & BIT(twt_params->flow_id))) { in nrf_wifi_set_twt()
583 twt_params->fail_reason = WIFI_TWT_FAIL_INVALID_FLOW_ID; in nrf_wifi_set_twt()
586 start_flow_id = twt_params->flow_id; in nrf_wifi_set_twt()
587 end_flow_id = twt_params->flow_id + 1; in nrf_wifi_set_twt()
588 twt_info.twt_flow_id = twt_params->flow_id; in nrf_wifi_set_twt()
623 struct wifi_twt_params twt_params = { 0 }; in nrf_wifi_event_proc_twt_setup_zep() local
632 twt_params.operation = WIFI_TWT_SETUP; in nrf_wifi_event_proc_twt_setup_zep()
633 twt_params.flow_id = twt_setup_info->info.twt_flow_id; in nrf_wifi_event_proc_twt_setup_zep()
634 twt_params.negotiation_type = twt_rpu_to_wifi_mgmt_neg_type(twt_setup_info->info.neg_type); in nrf_wifi_event_proc_twt_setup_zep()
635 twt_params.setup_cmd = twt_rpu_to_wifi_mgmt_setup_cmd(twt_setup_info->info.setup_cmd); in nrf_wifi_event_proc_twt_setup_zep()
636 twt_params.setup.trigger = twt_setup_info->info.ap_trigger_frame ? 1 : 0; in nrf_wifi_event_proc_twt_setup_zep()
637 twt_params.setup.implicit = twt_setup_info->info.is_implicit ? 1 : 0; in nrf_wifi_event_proc_twt_setup_zep()
638 twt_params.setup.announce = in nrf_wifi_event_proc_twt_setup_zep()
640 twt_params.setup.twt_wake_interval = in nrf_wifi_event_proc_twt_setup_zep()
644 twt_params.setup.twt_interval = nrf_wifi_twt_float_to_us(twt_interval_fp); in nrf_wifi_event_proc_twt_setup_zep()
645 twt_params.dialog_token = twt_setup_info->info.dialog_token; in nrf_wifi_event_proc_twt_setup_zep()
646 twt_params.resp_status = twt_setup_info->info.twt_resp_status; in nrf_wifi_event_proc_twt_setup_zep()
650 nrf_wifi_twt_update_internal_state(vif_ctx_zep, true, twt_params.flow_id); in nrf_wifi_event_proc_twt_setup_zep()
653 wifi_mgmt_raise_twt_event(vif_ctx_zep->zep_net_if_ctx, &twt_params); in nrf_wifi_event_proc_twt_setup_zep()
662 struct wifi_twt_params twt_params = {0}; in nrf_wifi_event_proc_twt_teardown_zep() local
670 twt_params.operation = WIFI_TWT_TEARDOWN; in nrf_wifi_event_proc_twt_teardown_zep()
671 twt_params.flow_id = twt_teardown_info->info.twt_flow_id; in nrf_wifi_event_proc_twt_teardown_zep()
673 nrf_wifi_twt_update_internal_state(vif_ctx_zep, false, twt_params.flow_id); in nrf_wifi_event_proc_twt_teardown_zep()
675 wifi_mgmt_raise_twt_event(vif_ctx_zep->zep_net_if_ctx, &twt_params); in nrf_wifi_event_proc_twt_teardown_zep()