Home
last modified time | relevance | path

Searched refs:clamp_t (Results 1 – 18 of 18) sorted by relevance

/freebsd/sys/compat/linuxkpi/common/include/linux/
H A Dminmax.h63 #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) macro
65 #define clamp_val(val, lo, hi) clamp_t(typeof(val), val, lo, hi)
/freebsd/sys/dev/ena/
H A Dena.h544 #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) macro
545 #define clamp_val(val, lo, hi) clamp_t(__typeof(val), val, lo, hi)
/freebsd/sys/contrib/dev/rtw88/
H A Dsar.c55 return (s8)clamp_t(s32, tmp, -max - 1, max) - base; in rtw_sar_to_phy()
H A Dphy.c422 *lower = clamp_t(u8, min_rssi, dig_min, dig_mid); in rtw_phy_dig_get_boundary()
423 *upper = clamp_t(u8, *lower + DIG_RSSI_GAIN_OFFSET, dig_min, dig_max); in rtw_phy_dig_get_boundary()
523 cur_igi = clamp_t(u8, cur_igi, lower_bound, upper_bound); in rtw_phy_dig()
1537 pwr_limit = clamp_t(s8, pwr_limit, in rtw_phy_set_tx_power_limit()
H A Drtw8723d.c205 rx_evm = clamp_t(s8, -pkt_stat->rx_evm[RF_PATH_A] >> 1, 0, 64); in rtw8723d_phy_set_param()
H A Dfw.c814 thold = clamp_t(s32, thold + rssi_offset, rssi_min, rssi_max); in rtw_fw_set_wowlan_ctrl_cmd()
H A Drtw8822c.c4385 crystal_cap = clamp_t(s8, crystal_cap, 0, XCAP_MASK); in rtw8822c_cfo_track()
/freebsd/sys/contrib/dev/rtw89/
H A Drtw8852b.c
H A Drtw8851b.c956 tmp = clamp_t(s32, tmp << 2, S8_MIN, S8_MAX); in rtw8851b_set_gain_offset()
969 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX); in rtw8851b_set_rxsc_rpl_comp()
976 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX); in rtw8851b_set_rxsc_rpl_comp()
980 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX); in rtw8851b_set_rxsc_rpl_comp()
985 tmp = clamp_t(s32, tmp, S8_MIN >> 1, S8_MAX >> 1); in rtw8851b_set_rxsc_rpl_comp()
1626 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63); in rtw8851b_set_txpwr_ref()
2194 val = clamp_t(s8, val, -100, 0) + 100; in rtw8851b_btc_set_wl_rx_gain()
H A Dsar.c160 return (s8)clamp_t(s32, cfg_mac, in rtw89_query_sar()
H A Drtw8852c.c940 tmp = clamp_t(s32, (-offset_q0 << 3) + (offset_base_q4 >> 1), in rtw8852c_ctrl_ch()
951 tmp = clamp_t(s32, -tmp, S8_MIN, S8_MAX); in rtw8852c_ctrl_ch()
954 tmp = clamp_t(s32, offset_q0 << 4, S8_MIN, S8_MAX); in rtw8852c_ctrl_ch()
1885 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63); in rtw8852c_set_txpwr_ref()
2635 return clamp_t(s8, val + 6, -100, 0) + 100; in rtw8852c_set_wl_lna2()
H A Drtw8852a.c1381 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63); in rtw8852a_set_txpwr_ul_tb_offset()
1891 return clamp_t(s8, val + 6, -100, 0) + 100; in rtw8852a_btc_update_bt_cnt()
H A Dphy.c1866 return clamp_t(s16, dbm << chip->txpwr_factor_mac, -64, 63); in rtw89_phy_fill_txpwr_limit_160m()
3850 crystal_cap = clamp_t(u8, crystal_cap, 0, 127); in rtw89_phy_dig_update_gain_para()
5498 rxb_idx = clamp_t(s32, rxb_idx_tmp, RXB_IDX_MIN, RXB_IDX_MAX);
5674 ofdm_cca_th = clamp_t(u8, final_rssi, PD_TH_MIN_RSSI + under_region,
H A Drtw8851b_rfk.c1989 dbm = clamp_t(u8, dbm, 7, 24); in _dpk_kip_set_txagc()
H A Drtw8852c_rfk.c2216 dbm = clamp_t(u8, dbm, 7, 24); in _dpk_kip_set_txagc()
/freebsd/sys/dev/bnxt/bnxt_en/
H A Dbnxt_hwrm.c3031 max_buf = clamp_t(uint16_t, max_buf, 1, 63); in bnxt_hwrm_set_coal()
3032 max_buf_irq = clamp_t(uint16_t, softc->rx_coal_frames_irq, 1, 63); in bnxt_hwrm_set_coal()
3051 max_buf = clamp_t(uint16_t, softc->tx_coal_frames, 1, 63); in bnxt_hwrm_set_coal()
3052 max_buf_irq = clamp_t(uint16_t, softc->tx_coal_frames_irq, 1, 63); in bnxt_hwrm_set_coal()
H A Dbnxt.h279 #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) macro
H A Dif_bnxt.c1039 entries = clamp_t(u32, entries, ctxm->min_entries, ctxm->max_entries); in bnxt_setup_ctxm_pg_tbls()