Lines Matching refs:cltp
16142 void rtw_clt_port_init(struct clt_port_t *cltp) in rtw_clt_port_init() argument
16144 cltp->bmp = 0; in rtw_clt_port_init()
16145 cltp->num = 0; in rtw_clt_port_init()
16146 _rtw_spinlock_init(&cltp->lock); in rtw_clt_port_init()
16148 void rtw_clt_port_deinit(struct clt_port_t *cltp) in rtw_clt_port_deinit() argument
16150 _rtw_spinlock_free(&cltp->lock); in rtw_clt_port_deinit()
16155 struct clt_port_t *cltp = &dvobj->clt_port; in _hw_client_port_alloc() local
16160 if (cltp->num > MAX_CLIENT_PORT_NUM) { in _hw_client_port_alloc()
16161 RTW_ERR(ADPT_FMT" cann't alloc client (%d)\n", ADPT_ARG(adapter), cltp->num); in _hw_client_port_alloc()
16172 _enter_critical_bh(&cltp->lock, &irql); in _hw_client_port_alloc()
16174 if (!(cltp->bmp & BIT(i))) in _hw_client_port_alloc()
16180 cltp->bmp |= BIT(i); in _hw_client_port_alloc()
16183 cltp->num++; in _hw_client_port_alloc()
16184 _exit_critical_bh(&cltp->lock, &irql); in _hw_client_port_alloc()
16186 __func__, ADPT_ARG(adapter), adapter->client_id, adapter->client_port, cltp->num); in _hw_client_port_alloc()
16191 struct clt_port_t *cltp = &dvobj->clt_port; in _hw_client_port_free() local
16202 __func__, ADPT_ARG(adapter), adapter->client_id, adapter->client_port, cltp->num); in _hw_client_port_free()
16204 _enter_critical_bh(&cltp->lock, &irql); in _hw_client_port_free()
16206 cltp->bmp &= ~ BIT(adapter->client_id); in _hw_client_port_free()
16210 cltp->num--; in _hw_client_port_free()
16211 if (cltp->num < 0) in _hw_client_port_free()
16212 cltp->num = 0; in _hw_client_port_free()
16213 _exit_critical_bh(&cltp->lock, &irql); in _hw_client_port_free()