Lines Matching refs:wmi
146 ret = ath9k_wmi_connect(priv->htc, priv->wmi, &priv->wmi_cmd_ep); in ath9k_init_htc_services()
242 r = ath9k_wmi_cmd(priv->wmi, WMI_REG_READ_CMDID, in ath9k_regread()
269 ret = ath9k_wmi_cmd(priv->wmi, WMI_REG_READ_CMDID, in ath9k_multi_regread()
289 r = ath9k_wmi_cmd(priv->wmi, WMI_REG_WRITE_CMDID, in ath9k_regwrite_multi()
290 (u8 *) &priv->wmi->multi_write, in ath9k_regwrite_multi()
291 sizeof(struct register_write) * priv->wmi->multi_write_idx, in ath9k_regwrite_multi()
297 priv->wmi->multi_write_idx); in ath9k_regwrite_multi()
299 priv->wmi->multi_write_idx = 0; in ath9k_regwrite_multi()
313 r = ath9k_wmi_cmd(priv->wmi, WMI_REG_WRITE_CMDID, in ath9k_regwrite_single()
329 mutex_lock(&priv->wmi->multi_write_mutex); in ath9k_regwrite_buffer()
332 priv->wmi->multi_write[priv->wmi->multi_write_idx].reg = in ath9k_regwrite_buffer()
334 priv->wmi->multi_write[priv->wmi->multi_write_idx].val = in ath9k_regwrite_buffer()
337 priv->wmi->multi_write_idx++; in ath9k_regwrite_buffer()
340 if (priv->wmi->multi_write_idx == MAX_CMD_NUMBER) in ath9k_regwrite_buffer()
343 mutex_unlock(&priv->wmi->multi_write_mutex); in ath9k_regwrite_buffer()
352 if (atomic_read(&priv->wmi->mwrite_cnt)) in ath9k_regwrite()
364 atomic_inc(&priv->wmi->mwrite_cnt); in ath9k_enable_regwrite_buffer()
373 atomic_dec(&priv->wmi->mwrite_cnt); in ath9k_regwrite_flush()
375 mutex_lock(&priv->wmi->multi_write_mutex); in ath9k_regwrite_flush()
377 if (priv->wmi->multi_write_idx) in ath9k_regwrite_flush()
380 mutex_unlock(&priv->wmi->multi_write_mutex); in ath9k_regwrite_flush()
392 mutex_lock(&priv->wmi->multi_rmw_mutex); in ath9k_reg_rmw_buffer()
395 priv->wmi->multi_rmw[priv->wmi->multi_rmw_idx].reg = in ath9k_reg_rmw_buffer()
397 priv->wmi->multi_rmw[priv->wmi->multi_rmw_idx].set = in ath9k_reg_rmw_buffer()
399 priv->wmi->multi_rmw[priv->wmi->multi_rmw_idx].clr = in ath9k_reg_rmw_buffer()
402 priv->wmi->multi_rmw_idx++; in ath9k_reg_rmw_buffer()
405 if (priv->wmi->multi_rmw_idx == MAX_RMW_CMD_NUMBER) { in ath9k_reg_rmw_buffer()
406 r = ath9k_wmi_cmd(priv->wmi, WMI_REG_RMW_CMDID, in ath9k_reg_rmw_buffer()
407 (u8 *) &priv->wmi->multi_rmw, in ath9k_reg_rmw_buffer()
408 sizeof(struct register_write) * priv->wmi->multi_rmw_idx, in ath9k_reg_rmw_buffer()
414 priv->wmi->multi_rmw_idx); in ath9k_reg_rmw_buffer()
416 priv->wmi->multi_rmw_idx = 0; in ath9k_reg_rmw_buffer()
419 mutex_unlock(&priv->wmi->multi_rmw_mutex); in ath9k_reg_rmw_buffer()
433 atomic_dec(&priv->wmi->m_rmw_cnt); in ath9k_reg_rmw_flush()
435 mutex_lock(&priv->wmi->multi_rmw_mutex); in ath9k_reg_rmw_flush()
437 if (priv->wmi->multi_rmw_idx) { in ath9k_reg_rmw_flush()
438 r = ath9k_wmi_cmd(priv->wmi, WMI_REG_RMW_CMDID, in ath9k_reg_rmw_flush()
439 (u8 *) &priv->wmi->multi_rmw, in ath9k_reg_rmw_flush()
440 sizeof(struct register_rmw) * priv->wmi->multi_rmw_idx, in ath9k_reg_rmw_flush()
446 priv->wmi->multi_rmw_idx); in ath9k_reg_rmw_flush()
448 priv->wmi->multi_rmw_idx = 0; in ath9k_reg_rmw_flush()
451 mutex_unlock(&priv->wmi->multi_rmw_mutex); in ath9k_reg_rmw_flush()
463 atomic_inc(&priv->wmi->m_rmw_cnt); in ath9k_enable_rmw_buffer()
479 ret = ath9k_wmi_cmd(priv->wmi, WMI_REG_RMW_CMDID, in ath9k_reg_rmw_single()
506 if (atomic_read(&priv->wmi->m_rmw_cnt)) in ath9k_reg_rmw()
953 priv->wmi = ath9k_init_wmi(priv); in ath9k_htc_probe_device()
954 if (!priv->wmi) { in ath9k_htc_probe_device()