Lines Matching +full:- +full:exponent
4 * SPDX-License-Identifier: Apache-2.0
34 int ret = -1; in nrf_wifi_set_power_save()
42 vif_ctx_zep = dev->data; in nrf_wifi_set_power_save()
49 rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; in nrf_wifi_set_power_save()
56 k_mutex_lock(&vif_ctx_zep->vif_lock, K_FOREVER); in nrf_wifi_set_power_save()
57 if (!rpu_ctx_zep->rpu_ctx) { in nrf_wifi_set_power_save()
62 switch (params->type) { in nrf_wifi_set_power_save()
64 if ((params->listen_interval < in nrf_wifi_set_power_save()
66 (params->listen_interval > in nrf_wifi_set_power_save()
68 params->fail_reason = in nrf_wifi_set_power_save()
70 return -EINVAL; in nrf_wifi_set_power_save()
73 rpu_ctx_zep->rpu_ctx, in nrf_wifi_set_power_save()
74 vif_ctx_zep->vif_idx, in nrf_wifi_set_power_save()
75 params->listen_interval); in nrf_wifi_set_power_save()
78 if ((vif_ctx_zep->if_type != NRF_WIFI_IFTYPE_STATION) in nrf_wifi_set_power_save()
80 && (vif_ctx_zep->if_type != NRF_WIFI_STA_TX_INJECTOR) in nrf_wifi_set_power_save()
83 && (vif_ctx_zep->if_type != NRF_WIFI_STA_PROMISC_TX_INJECTOR) in nrf_wifi_set_power_save()
88 params->fail_reason = in nrf_wifi_set_power_save()
94 rpu_ctx_zep->rpu_ctx, in nrf_wifi_set_power_save()
95 vif_ctx_zep->vif_idx, in nrf_wifi_set_power_save()
96 params->timeout_ms); in nrf_wifi_set_power_save()
99 if (params->mode == WIFI_PS_MODE_WMM) { in nrf_wifi_set_power_save()
103 status = nrf_wifi_fmac_set_uapsd_queue(rpu_ctx_zep->rpu_ctx, in nrf_wifi_set_power_save()
104 vif_ctx_zep->vif_idx, in nrf_wifi_set_power_save()
108 status = nrf_wifi_fmac_set_power_save(rpu_ctx_zep->rpu_ctx, in nrf_wifi_set_power_save()
109 vif_ctx_zep->vif_idx, in nrf_wifi_set_power_save()
110 params->enabled); in nrf_wifi_set_power_save()
114 rpu_ctx_zep->rpu_ctx, in nrf_wifi_set_power_save()
115 vif_ctx_zep->vif_idx, in nrf_wifi_set_power_save()
116 params->wakeup_mode); in nrf_wifi_set_power_save()
121 if (params->exit_strategy == WIFI_PS_EXIT_EVERY_TIM) { in nrf_wifi_set_power_save()
123 } else if (params->exit_strategy == WIFI_PS_EXIT_CUSTOM_ALGO) { in nrf_wifi_set_power_save()
126 params->fail_reason = in nrf_wifi_set_power_save()
128 return -EINVAL; in nrf_wifi_set_power_save()
132 rpu_ctx_zep->rpu_ctx, in nrf_wifi_set_power_save()
133 vif_ctx_zep->vif_idx, in nrf_wifi_set_power_save()
137 params->fail_reason = in nrf_wifi_set_power_save()
139 return -ENOTSUP; in nrf_wifi_set_power_save()
144 __func__, params->type); in nrf_wifi_set_power_save()
145 params->fail_reason = in nrf_wifi_set_power_save()
153 k_mutex_unlock(&vif_ctx_zep->vif_lock); in nrf_wifi_set_power_save()
164 int ret = -1; in nrf_wifi_get_power_save_config()
171 vif_ctx_zep = dev->data; in nrf_wifi_get_power_save_config()
178 if ((vif_ctx_zep->if_type != NRF_WIFI_IFTYPE_STATION) in nrf_wifi_get_power_save_config()
180 && (vif_ctx_zep->if_type != NRF_WIFI_STA_TX_INJECTOR) in nrf_wifi_get_power_save_config()
183 && (vif_ctx_zep->if_type != NRF_WIFI_STA_PROMISC_TX_INJECTOR) in nrf_wifi_get_power_save_config()
191 rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; in nrf_wifi_get_power_save_config()
197 k_mutex_lock(&vif_ctx_zep->vif_lock, K_FOREVER); in nrf_wifi_get_power_save_config()
198 if (!rpu_ctx_zep->rpu_ctx) { in nrf_wifi_get_power_save_config()
203 fmac_dev_ctx = rpu_ctx_zep->rpu_ctx; in nrf_wifi_get_power_save_config()
210 vif_ctx_zep->ps_info = ps_config; in nrf_wifi_get_power_save_config()
212 vif_ctx_zep->ps_config_info_evnt = false; in nrf_wifi_get_power_save_config()
214 status = nrf_wifi_fmac_get_power_save_info(rpu_ctx_zep->rpu_ctx, in nrf_wifi_get_power_save_config()
215 vif_ctx_zep->vif_idx); in nrf_wifi_get_power_save_config()
226 } while ((vif_ctx_zep->ps_config_info_evnt == false) && in nrf_wifi_get_power_save_config()
237 k_mutex_unlock(&vif_ctx_zep->vif_lock); in nrf_wifi_get_power_save_config()
241 /* TWT interval conversion helpers: User <-> Protocol */
245 int exponent = 0; in nrf_wifi_twt_us_to_float() local
250 mantissa = frexp(twt_interval_ms, &exponent); in nrf_wifi_twt_us_to_float()
253 twt_interval_fp.exponent = exponent; in nrf_wifi_twt_us_to_float()
260 /* Conversion to micro-seconds */ in nrf_wifi_twt_float_to_us()
261 return floor(ldexp(twt_interval_fp.mantissa, twt_interval_fp.exponent) / (1000)) * in nrf_wifi_twt_float_to_us()
305 /* Though setup_cmd enums have 1-1 mapping but due to data type different need these */
394 vif_ctx_zep->ps_info->ps_params.mode = ps_info->ps_mode; in nrf_wifi_event_proc_get_power_save_info()
395 vif_ctx_zep->ps_info->ps_params.enabled = ps_info->enabled; in nrf_wifi_event_proc_get_power_save_info()
396 vif_ctx_zep->ps_info->num_twt_flows = ps_info->num_twt_flows; in nrf_wifi_event_proc_get_power_save_info()
397 vif_ctx_zep->ps_info->ps_params.timeout_ms = ps_info->ps_timeout; in nrf_wifi_event_proc_get_power_save_info()
398 vif_ctx_zep->ps_info->ps_params.listen_interval = ps_info->listen_interval; in nrf_wifi_event_proc_get_power_save_info()
399 vif_ctx_zep->ps_info->ps_params.wakeup_mode = ps_info->extended_ps; in nrf_wifi_event_proc_get_power_save_info()
400 if (ps_info->ps_exit_strategy == EVERY_TIM) { in nrf_wifi_event_proc_get_power_save_info()
401 vif_ctx_zep->ps_info->ps_params.exit_strategy = WIFI_PS_EXIT_EVERY_TIM; in nrf_wifi_event_proc_get_power_save_info()
402 } else if (ps_info->ps_exit_strategy == INT_PS) { in nrf_wifi_event_proc_get_power_save_info()
403 vif_ctx_zep->ps_info->ps_params.exit_strategy = WIFI_PS_EXIT_CUSTOM_ALGO; in nrf_wifi_event_proc_get_power_save_info()
406 for (int i = 0; i < ps_info->num_twt_flows; i++) { in nrf_wifi_event_proc_get_power_save_info()
408 struct wifi_twt_flow_info *twt_zep = &vif_ctx_zep->ps_info->twt_flows[i]; in nrf_wifi_event_proc_get_power_save_info()
409 struct nrf_wifi_umac_config_twt_info *twt_rpu = &ps_info->twt_flow_info[i]; in nrf_wifi_event_proc_get_power_save_info()
413 twt_zep->flow_id = twt_rpu->twt_flow_id; in nrf_wifi_event_proc_get_power_save_info()
414 twt_zep->implicit = twt_rpu->is_implicit ? 1 : 0; in nrf_wifi_event_proc_get_power_save_info()
415 twt_zep->trigger = twt_rpu->ap_trigger_frame ? 1 : 0; in nrf_wifi_event_proc_get_power_save_info()
416 twt_zep->announce = twt_rpu->twt_flow_type == NRF_WIFI_TWT_FLOW_TYPE_ANNOUNCED; in nrf_wifi_event_proc_get_power_save_info()
417 twt_zep->negotiation_type = twt_rpu_to_wifi_mgmt_neg_type(twt_rpu->neg_type); in nrf_wifi_event_proc_get_power_save_info()
418 twt_zep->dialog_token = twt_rpu->dialog_token; in nrf_wifi_event_proc_get_power_save_info()
419 twt_interval_fp.mantissa = twt_rpu->twt_target_wake_interval_mantissa; in nrf_wifi_event_proc_get_power_save_info()
420 twt_interval_fp.exponent = twt_rpu->twt_target_wake_interval_exponent; in nrf_wifi_event_proc_get_power_save_info()
421 twt_zep->twt_interval = nrf_wifi_twt_float_to_us(twt_interval_fp); in nrf_wifi_event_proc_get_power_save_info()
422 twt_zep->twt_wake_interval = twt_rpu->nominal_min_twt_wake_duration; in nrf_wifi_event_proc_get_power_save_info()
425 vif_ctx_zep->ps_config_info_evnt = true; in nrf_wifi_event_proc_get_power_save_info()
432 vif_ctx_zep->twt_flows_map |= BIT(flow_id); in nrf_wifi_twt_update_internal_state()
433 vif_ctx_zep->twt_flow_in_progress_map &= ~BIT(flow_id); in nrf_wifi_twt_update_internal_state()
435 vif_ctx_zep->twt_flows_map &= ~BIT(flow_id); in nrf_wifi_twt_update_internal_state()
453 rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; in nrf_wifi_twt_teardown_flows()
460 k_mutex_lock(&vif_ctx_zep->vif_lock, K_FOREVER); in nrf_wifi_twt_teardown_flows()
461 if (!rpu_ctx_zep->rpu_ctx) { in nrf_wifi_twt_teardown_flows()
467 if (!(vif_ctx_zep->twt_flows_map & BIT(flow_id))) { in nrf_wifi_twt_teardown_flows()
471 status = nrf_wifi_fmac_twt_teardown(rpu_ctx_zep->rpu_ctx, in nrf_wifi_twt_teardown_flows()
472 vif_ctx_zep->vif_idx, in nrf_wifi_twt_teardown_flows()
477 ret = -1; 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()
490 k_mutex_unlock(&vif_ctx_zep->vif_lock); in nrf_wifi_twt_teardown_flows()
501 int ret = -1; in nrf_wifi_set_twt()
508 vif_ctx_zep = dev->data; in nrf_wifi_set_twt()
515 rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; in nrf_wifi_set_twt()
522 k_mutex_lock(&vif_ctx_zep->vif_lock, K_FOREVER); in nrf_wifi_set_twt()
523 if (!rpu_ctx_zep->rpu_ctx) { 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()
567 twt_info.twt_target_wake_interval_exponent = twt_interval_fp.exponent; 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()
572 status = nrf_wifi_fmac_twt_setup(rpu_ctx_zep->rpu_ctx, in nrf_wifi_set_twt()
573 vif_ctx_zep->vif_idx, 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()
614 k_mutex_unlock(&vif_ctx_zep->vif_lock); in nrf_wifi_set_twt()
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()
639 twt_setup_info->info.twt_flow_type == NRF_WIFI_TWT_FLOW_TYPE_ANNOUNCED; in nrf_wifi_event_proc_twt_setup_zep()
641 twt_setup_info->info.nominal_min_twt_wake_duration; in nrf_wifi_event_proc_twt_setup_zep()
642 twt_interval_fp.mantissa = twt_setup_info->info.twt_target_wake_interval_mantissa; in nrf_wifi_event_proc_twt_setup_zep()
643 twt_interval_fp.exponent = twt_setup_info->info.twt_target_wake_interval_exponent; 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()
648 if ((twt_setup_info->info.twt_resp_status == 0) || in nrf_wifi_event_proc_twt_setup_zep()
649 (twt_setup_info->info.neg_type == NRF_WIFI_ACCEPT_TWT)) { 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()
671 twt_params.flow_id = twt_teardown_info->info.twt_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()
698 rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; in nrf_wifi_event_proc_twt_sleep_zep()
704 k_mutex_lock(&vif_ctx_zep->vif_lock, K_FOREVER); in nrf_wifi_event_proc_twt_sleep_zep()
705 if (!rpu_ctx_zep->rpu_ctx) { in nrf_wifi_event_proc_twt_sleep_zep()
710 fmac_dev_ctx = rpu_ctx_zep->rpu_ctx; in nrf_wifi_event_proc_twt_sleep_zep()
712 def_priv = wifi_fmac_priv(fmac_dev_ctx->fpriv); in nrf_wifi_event_proc_twt_sleep_zep()
719 switch (sleep_evnt->info.type) { in nrf_wifi_event_proc_twt_sleep_zep()
721 nrf_wifi_osal_spinlock_take(def_dev_ctx->tx_config.tx_lock); in nrf_wifi_event_proc_twt_sleep_zep()
723 def_dev_ctx->twt_sleep_status = NRF_WIFI_FMAC_TWT_STATE_SLEEP; in nrf_wifi_event_proc_twt_sleep_zep()
725 wifi_mgmt_raise_twt_sleep_state(vif_ctx_zep->zep_net_if_ctx, in nrf_wifi_event_proc_twt_sleep_zep()
727 nrf_wifi_osal_spinlock_rel(def_dev_ctx->tx_config.tx_lock); in nrf_wifi_event_proc_twt_sleep_zep()
730 nrf_wifi_osal_spinlock_take(def_dev_ctx->tx_config.tx_lock); in nrf_wifi_event_proc_twt_sleep_zep()
731 def_dev_ctx->twt_sleep_status = NRF_WIFI_FMAC_TWT_STATE_AWAKE; in nrf_wifi_event_proc_twt_sleep_zep()
732 wifi_mgmt_raise_twt_sleep_state(vif_ctx_zep->zep_net_if_ctx, in nrf_wifi_event_proc_twt_sleep_zep()
738 if (desc < def_priv->num_tx_tokens) { in nrf_wifi_event_proc_twt_sleep_zep()
743 nrf_wifi_osal_spinlock_rel(def_dev_ctx->tx_config.tx_lock); in nrf_wifi_event_proc_twt_sleep_zep()
749 k_mutex_unlock(&vif_ctx_zep->vif_lock); in nrf_wifi_event_proc_twt_sleep_zep()
761 int ret = -1; in nrf_wifi_mode()
768 vif_ctx_zep = dev->data; in nrf_wifi_mode()
774 rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; in nrf_wifi_mode()
780 k_mutex_lock(&vif_ctx_zep->vif_lock, K_FOREVER); in nrf_wifi_mode()
781 if (!rpu_ctx_zep->rpu_ctx) { in nrf_wifi_mode()
786 fmac_dev_ctx = rpu_ctx_zep->rpu_ctx; in nrf_wifi_mode()
791 __func__, dev->name); in nrf_wifi_mode()
795 if (mode->oper == WIFI_MGMT_SET) { in nrf_wifi_mode()
796 status = nrf_wifi_check_mode_validity(mode->mode); in nrf_wifi_mode()
802 if (vif_ctx_zep->authorized && (mode->mode == NRF_WIFI_MONITOR_MODE)) { in nrf_wifi_mode()
814 status = nrf_wifi_fmac_set_mode(rpu_ctx_zep->rpu_ctx, in nrf_wifi_mode()
815 vif_ctx_zep->vif_idx, mode->mode); in nrf_wifi_mode()
822 mode->mode = def_dev_ctx->vif_ctx[vif_ctx_zep->vif_idx]->mode; in nrf_wifi_mode()
824 * This is a work-around to handle current UMAC mode handling. in nrf_wifi_mode()
828 if (def_dev_ctx->vif_ctx[vif_ctx_zep->vif_idx]->txinjection_mode == true) { in nrf_wifi_mode()
829 mode->mode ^= NRF_WIFI_TX_INJECTION_MODE; in nrf_wifi_mode()
833 if (def_dev_ctx->vif_ctx[vif_ctx_zep->vif_idx]->promisc_mode == true) { in nrf_wifi_mode()
834 mode->mode ^= NRF_WIFI_PROMISCUOUS_MODE; in nrf_wifi_mode()
840 k_mutex_unlock(&vif_ctx_zep->vif_lock); in nrf_wifi_mode()
854 int ret = -1; in nrf_wifi_channel()
861 vif_ctx_zep = dev->data; in nrf_wifi_channel()
867 if (vif_ctx_zep->authorized) { in nrf_wifi_channel()
872 rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; in nrf_wifi_channel()
878 k_mutex_lock(&vif_ctx_zep->vif_lock, K_FOREVER); in nrf_wifi_channel()
879 if (!rpu_ctx_zep->rpu_ctx) { in nrf_wifi_channel()
884 fmac_dev_ctx = rpu_ctx_zep->rpu_ctx; in nrf_wifi_channel()
887 if (channel->oper == WIFI_MGMT_SET) { in nrf_wifi_channel()
894 status = nrf_wifi_fmac_set_channel(rpu_ctx_zep->rpu_ctx, vif_ctx_zep->vif_idx, in nrf_wifi_channel()
895 channel->channel); in nrf_wifi_channel()
902 channel->channel = def_dev_ctx->vif_ctx[vif_ctx_zep->vif_idx]->channel; in nrf_wifi_channel()
906 k_mutex_unlock(&vif_ctx_zep->vif_lock); in nrf_wifi_channel()
920 int ret = -1; in nrf_wifi_filter()
927 vif_ctx_zep = dev->data; in nrf_wifi_filter()
933 rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; in nrf_wifi_filter()
934 fmac_dev_ctx = rpu_ctx_zep->rpu_ctx; in nrf_wifi_filter()
937 if (filter->oper == WIFI_MGMT_SET) { in nrf_wifi_filter()
945 if (((def_dev_ctx->vif_ctx[vif_ctx_zep->vif_idx]->mode) & in nrf_wifi_filter()
947 def_dev_ctx->vif_ctx[vif_ctx_zep->vif_idx]->packet_filter = in nrf_wifi_filter()
948 filter->filter; in nrf_wifi_filter()
961 if (filter->filter == WIFI_MGMT_DATA_CTRL_FILTER_SETTING in nrf_wifi_filter()
962 || filter->filter == WIFI_ALL_FILTER_SETTING) { in nrf_wifi_filter()
963 filter->filter = 1; in nrf_wifi_filter()
964 } else if (filter->filter == 0) { in nrf_wifi_filter()
965 filter->filter = in nrf_wifi_filter()
966 def_dev_ctx->vif_ctx[vif_ctx_zep->vif_idx]->packet_filter; in nrf_wifi_filter()
975 status = nrf_wifi_fmac_set_packet_filter(rpu_ctx_zep->rpu_ctx, filter->filter, in nrf_wifi_filter()
976 vif_ctx_zep->vif_idx, filter->buffer_size); in nrf_wifi_filter()
982 filter->filter = def_dev_ctx->vif_ctx[vif_ctx_zep->vif_idx]->packet_filter; in nrf_wifi_filter()
997 int ret = -1; in nrf_wifi_set_rts_threshold()
1004 vif_ctx_zep = dev->data; in nrf_wifi_set_rts_threshold()
1011 rpu_ctx_zep = vif_ctx_zep->rpu_ctx_zep; in nrf_wifi_set_rts_threshold()
1019 if (!rpu_ctx_zep->rpu_ctx) { in nrf_wifi_set_rts_threshold()
1024 if ((int)rts_threshold < -1) { in nrf_wifi_set_rts_threshold()
1026 * For RTS off, -1 is passed to f/w. in nrf_wifi_set_rts_threshold()
1037 k_mutex_lock(&vif_ctx_zep->vif_lock, K_FOREVER); in nrf_wifi_set_rts_threshold()
1039 status = nrf_wifi_fmac_set_wiphy_params(rpu_ctx_zep->rpu_ctx, in nrf_wifi_set_rts_threshold()
1040 vif_ctx_zep->vif_idx, in nrf_wifi_set_rts_threshold()
1048 vif_ctx_zep->rts_threshold_value = (int)rts_threshold; in nrf_wifi_set_rts_threshold()
1052 k_mutex_unlock(&vif_ctx_zep->vif_lock); in nrf_wifi_set_rts_threshold()
1061 int ret = -1; in nrf_wifi_get_rts_threshold()
1068 vif_ctx_zep = dev->data; in nrf_wifi_get_rts_threshold()
1074 *rts_threshold = vif_ctx_zep->rts_threshold_value; in nrf_wifi_get_rts_threshold()