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.h517 #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) macro
518 #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.c317 rx_evm = clamp_t(s8, -pkt_stat->rx_evm[RF_PATH_A] >> 1, 0, 64); in query_phy_status_page1()
1891 xtal_cap = clamp_t(s8, xtal_cap + pwrtrk_xtal[delta], 0, 0x3F); in rtw8723d_pwrtrack_set_xtal()
H A Dfw.c734 threshold = clamp_t(s32, threshold, rssi_min, rssi_max); in rtw_fw_beacon_filter_config()
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.c1022 tmp = clamp_t(s32, tmp << 2, S8_MIN, S8_MAX); in rtw8852b_set_gain_offset()
1036 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX); in rtw8852b_set_gain_offset()
1040 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX); in rtw8852b_set_gain_offset()
1052 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX); in rtw8852b_set_gain_offset()
1056 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX); in rtw8852b_set_gain_offset()
1061 tmp = clamp_t(s32, tmp, S8_MIN >> 1, S8_MAX >> 1); in rtw8852b_set_gain_offset()
1588 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63); in rtw8852b_bb_cal_txpwr_ref()
2289 return clamp_t(s8, val + 6, -100, 0) + 100; in rtw8852b_btc_get_bt_rssi()
H A Drtw8851b.c933 tmp = clamp_t(s32, tmp << 2, S8_MIN, S8_MAX); in rtw8851b_set_gain_offset()
946 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX); in rtw8851b_set_gain_offset()
953 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX); in rtw8851b_set_gain_offset()
957 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX); in rtw8851b_set_gain_offset()
962 tmp = clamp_t(s32, tmp, S8_MIN >> 1, S8_MAX >> 1); in rtw8851b_set_gain_offset()
1603 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63); in rtw8851b_bb_cal_txpwr_ref()
2120 val = clamp_t(s8, val, -100, 0) + 100; in rtw8851b_btc_get_bt_rssi()
H A Dsar.c155 return (s8)clamp_t(s32, cfg_mac, in rtw89_txpwr_sar_to_mac()
H A Drtw8852c.c884 tmp = clamp_t(s32, (-offset_q0 << 3) + (offset_base_q4 >> 1), in rtw8852c_set_gain_offset()
895 tmp = clamp_t(s32, -tmp, S8_MIN, S8_MAX); in rtw8852c_set_gain_offset()
898 tmp = clamp_t(s32, offset_q0 << 4, S8_MIN, S8_MAX); in rtw8852c_set_gain_offset()
1828 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63); in rtw8852c_bb_cal_txpwr_ref()
2543 return clamp_t(s8, val + 6, -100, 0) + 100; in rtw8852c_btc_get_bt_rssi()
H A Drtw8852a.c1359 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63); in rtw8852a_bb_cal_txpwr_ref()
1841 return clamp_t(s8, val + 6, -100, 0) + 100; in rtw8852a_btc_get_bt_rssi()
H A Dphy.c2447 crystal_cap = clamp_t(u8, crystal_cap, 0, 127); in rtw89_phy_cfo_set_crystal_cap()
3987 rxb_idx = clamp_t(s32, rxb_idx_tmp, RXB_IDX_MIN, RXB_IDX_MAX); in rtw89_phy_dig_rxb_idx_by_rssi()
4159 ofdm_cca_th = clamp_t(u8, final_rssi, PD_TH_MIN_RSSI + under_region, in rtw89_phy_dig_dyn_pd_th()
H A Drtw8851b_rfk.c1989 dbm = clamp_t(u8, dbm, 7, 24); in _dpk_kip_set_txagc()
H A Drtw8852c_rfk.c2215 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.h278 #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) macro
H A Dif_bnxt.c1037 entries = clamp_t(u32, entries, ctxm->min_entries, ctxm->max_entries); in bnxt_setup_ctxm_pg_tbls()