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

/freebsd-current/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-current/sys/contrib/dev/rtw88/
H A Dsar.c55 return (s8)clamp_t(s32, tmp, -max - 1, max) - base;
H A Dphy.c422 *lower = clamp_t(u8, min_rssi, dig_min, dig_mid);
423 *upper = clamp_t(u8, *lower + DIG_RSSI_GAIN_OFFSET, dig_min, dig_max);
523 cur_igi = clamp_t(u8, cur_igi, lower_bound, upper_bound);
1537 pwr_limit = clamp_t(s8, pwr_limit,
H A Drtw8723d.c317 rx_evm = clamp_t(s8, -pkt_stat->rx_evm[RF_PATH_A] >> 1, 0, 64);
1891 xtal_cap = clamp_t(s8, xtal_cap + pwrtrk_xtal[delta], 0, 0x3F);
H A Dfw.c734 threshold = clamp_t(s32, threshold, rssi_min, rssi_max);
H A Drtw8822c.c4385 crystal_cap = clamp_t(s8, crystal_cap, 0, XCAP_MASK);
/freebsd-current/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-current/sys/contrib/dev/rtw89/
H A Dsar.c155 return (s8)clamp_t(s32, cfg_mac,
H A Drtw8851b.c933 tmp = clamp_t(s32, tmp << 2, S8_MIN, S8_MAX);
946 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX);
953 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX);
957 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX);
962 tmp = clamp_t(s32, tmp, S8_MIN >> 1, S8_MAX >> 1);
1603 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63);
2120 val = clamp_t(s8, val, -100, 0) + 100;
H A Drtw8852b.c1022 tmp = clamp_t(s32, tmp << 2, S8_MIN, S8_MAX);
1036 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX);
1040 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX);
1052 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX);
1056 tmp = clamp_t(s32, tmp, S8_MIN, S8_MAX);
1061 tmp = clamp_t(s32, tmp, S8_MIN >> 1, S8_MAX >> 1);
1588 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63);
2289 return clamp_t(s8, val + 6, -100, 0) + 100;
H A Drtw8852c.c884 tmp = clamp_t(s32, (-offset_q0 << 3) + (offset_base_q4 >> 1),
895 tmp = clamp_t(s32, -tmp, S8_MIN, S8_MAX);
898 tmp = clamp_t(s32, offset_q0 << 4, S8_MIN, S8_MAX);
1828 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63);
2543 return clamp_t(s8, val + 6, -100, 0) + 100;
H A Drtw8852a.c1359 rf_pwr_cw = clamp_t(s16, rf_pwr_cw, 15, 63);
1841 return clamp_t(s8, val + 6, -100, 0) + 100;
H A Dphy.c2447 crystal_cap = clamp_t(u8, crystal_cap, 0, 127);
3987 rxb_idx = clamp_t(s32, rxb_idx_tmp, RXB_IDX_MIN, RXB_IDX_MAX);
4159 ofdm_cca_th = clamp_t(u8, final_rssi, PD_TH_MIN_RSSI + under_region,
H A Drtw8852c_rfk.c2215 dbm = clamp_t(u8, dbm, 7, 24);
H A Drtw8851b_rfk.c1989 dbm = clamp_t(u8, dbm, 7, 24);
/freebsd-current/sys/dev/bnxt/bnxt_en/
H A Dbnxt.h278 #define clamp_t(type, _x, min, max) min_t(type, max_t(type, _x, min), max) macro
H A Dbnxt_hwrm.c3031 max_buf = clamp_t(uint16_t, max_buf, 1, 63);
3032 max_buf_irq = clamp_t(uint16_t, softc->rx_coal_frames_irq, 1, 63);
3051 max_buf = clamp_t(uint16_t, softc->tx_coal_frames, 1, 63);
3052 max_buf_irq = clamp_t(uint16_t, softc->tx_coal_frames_irq, 1, 63);
H A Dif_bnxt.c1037 entries = clamp_t(u32, entries, ctxm->min_entries, ctxm->max_entries);

Completed in 394 milliseconds