Lines Matching refs:mvm
68 struct iwl_mvm *mvm; member
76 struct iwl_mvm *mvm = file->private_data; in iwl_dbgfs_tx_flush_write() local
82 if (!mvm->ucode_loaded || mvm->cur_ucode != IWL_UCODE_REGULAR) in iwl_dbgfs_tx_flush_write()
93 IWL_ERR(mvm, "FLUSHING queues: scd_q_msk = 0x%x\n", scd_q_msk); in iwl_dbgfs_tx_flush_write()
95 mutex_lock(&mvm->mutex); in iwl_dbgfs_tx_flush_write()
96 ret = iwl_mvm_flush_tx_path(mvm, scd_q_msk, true) ? : count; in iwl_dbgfs_tx_flush_write()
97 mutex_unlock(&mvm->mutex); in iwl_dbgfs_tx_flush_write()
106 struct iwl_mvm *mvm = file->private_data; in iwl_dbgfs_sta_drain_write() local
112 if (!mvm->ucode_loaded || mvm->cur_ucode != IWL_UCODE_REGULAR) in iwl_dbgfs_sta_drain_write()
123 mutex_lock(&mvm->mutex); in iwl_dbgfs_sta_drain_write()
125 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[sta_id], in iwl_dbgfs_sta_drain_write()
126 lockdep_is_held(&mvm->mutex)); in iwl_dbgfs_sta_drain_write()
130 ret = iwl_mvm_drain_sta(mvm, (void *)sta->drv_priv, drain) ? : in iwl_dbgfs_sta_drain_write()
133 mutex_unlock(&mvm->mutex); in iwl_dbgfs_sta_drain_write()
141 struct iwl_mvm *mvm = file->private_data; in iwl_dbgfs_sram_read() local
149 if (!mvm->dbgfs_sram_offset && !mvm->dbgfs_sram_len) { in iwl_dbgfs_sram_read()
150 mvm->dbgfs_sram_offset = 0x800000; in iwl_dbgfs_sram_read()
151 if (!mvm->ucode_loaded) in iwl_dbgfs_sram_read()
153 img = &mvm->fw->img[mvm->cur_ucode]; in iwl_dbgfs_sram_read()
154 mvm->dbgfs_sram_len = img->sec[IWL_UCODE_SECTION_DATA].len; in iwl_dbgfs_sram_read()
156 len = mvm->dbgfs_sram_len; in iwl_dbgfs_sram_read()
171 mvm->dbgfs_sram_offset); in iwl_dbgfs_sram_read()
173 iwl_trans_read_mem_bytes(mvm->trans, in iwl_dbgfs_sram_read()
174 mvm->dbgfs_sram_offset, in iwl_dbgfs_sram_read()
197 struct iwl_mvm *mvm = file->private_data; in iwl_dbgfs_sram_write() local
210 mvm->dbgfs_sram_offset = offset; in iwl_dbgfs_sram_write()
211 mvm->dbgfs_sram_len = len; in iwl_dbgfs_sram_write()
213 mvm->dbgfs_sram_offset = 0; in iwl_dbgfs_sram_write()
214 mvm->dbgfs_sram_len = 0; in iwl_dbgfs_sram_write()
223 struct iwl_mvm *mvm = file->private_data; in iwl_dbgfs_stations_read() local
228 mutex_lock(&mvm->mutex); in iwl_dbgfs_stations_read()
232 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[i], in iwl_dbgfs_stations_read()
233 lockdep_is_held(&mvm->mutex)); in iwl_dbgfs_stations_read()
244 mutex_unlock(&mvm->mutex); in iwl_dbgfs_stations_read()
253 struct iwl_mvm *mvm = file->private_data; in iwl_dbgfs_power_down_allow_write() local
257 if (!mvm->ucode_loaded) in iwl_dbgfs_power_down_allow_write()
266 IWL_DEBUG_POWER(mvm, "%s device power down\n", in iwl_dbgfs_power_down_allow_write()
280 struct iwl_mvm *mvm = file->private_data; in iwl_dbgfs_power_down_d3_allow_write() local
290 IWL_DEBUG_POWER(mvm, "%s device power down in d3\n", in iwl_dbgfs_power_down_d3_allow_write()
298 mvm->prevent_power_down_d3 = !allow; in iwl_dbgfs_power_down_d3_allow_write()
309 struct iwl_mvm *mvm = mvmvif->dbgfs_data; in iwl_dbgfs_mac_params_read() local
317 mutex_lock(&mvm->mutex); in iwl_dbgfs_mac_params_read()
341 sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[ap_sta_id], in iwl_dbgfs_mac_params_read()
342 lockdep_is_held(&mvm->mutex)); in iwl_dbgfs_mac_params_read()
359 mutex_unlock(&mvm->mutex); in iwl_dbgfs_mac_params_read()
379 struct iwl_mvm *mvm = file->private_data; in iwl_dbgfs_bt_notif_read() local
380 struct iwl_bt_coex_profile_notif *notif = &mvm->last_bt_notif; in iwl_dbgfs_bt_notif_read()
388 mutex_lock(&mvm->mutex); in iwl_dbgfs_bt_notif_read()
453 mutex_unlock(&mvm->mutex); in iwl_dbgfs_bt_notif_read()
466 struct iwl_mvm *mvm = file->private_data; in iwl_dbgfs_fw_restart_write() local
472 mutex_lock(&mvm->mutex); in iwl_dbgfs_fw_restart_write()
475 ret = iwl_mvm_send_cmd_pdu(mvm, REPLY_ERROR, CMD_SYNC, 0, NULL); in iwl_dbgfs_fw_restart_write()
477 mutex_unlock(&mvm->mutex); in iwl_dbgfs_fw_restart_write()
507 if (!debugfs_create_file(#name, mode, parent, mvm, \
531 int iwl_mvm_dbgfs_register(struct iwl_mvm *mvm, struct dentry *dbgfs_dir) in iwl_mvm_dbgfs_register() argument
535 mvm->debugfs_dir = dbgfs_dir; in iwl_mvm_dbgfs_register()
537 MVM_DEBUGFS_ADD_FILE(tx_flush, mvm->debugfs_dir, S_IWUSR); in iwl_mvm_dbgfs_register()
538 MVM_DEBUGFS_ADD_FILE(sta_drain, mvm->debugfs_dir, S_IWUSR); in iwl_mvm_dbgfs_register()
539 MVM_DEBUGFS_ADD_FILE(sram, mvm->debugfs_dir, S_IWUSR | S_IRUSR); in iwl_mvm_dbgfs_register()
542 MVM_DEBUGFS_ADD_FILE(power_down_allow, mvm->debugfs_dir, S_IWUSR); in iwl_mvm_dbgfs_register()
543 MVM_DEBUGFS_ADD_FILE(power_down_d3_allow, mvm->debugfs_dir, S_IWUSR); in iwl_mvm_dbgfs_register()
544 MVM_DEBUGFS_ADD_FILE(fw_restart, mvm->debugfs_dir, S_IWUSR); in iwl_mvm_dbgfs_register()
553 if (!debugfs_create_symlink("iwlwifi", mvm->hw->wiphy->debugfsdir, buf)) in iwl_mvm_dbgfs_register()
558 IWL_ERR(mvm, "Can't create the mvm debugfs directory\n"); in iwl_mvm_dbgfs_register()
562 void iwl_mvm_vif_dbgfs_register(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_vif_dbgfs_register() argument
572 mvmvif->dbgfs_data = mvm; in iwl_mvm_vif_dbgfs_register()
575 IWL_ERR(mvm, "Failed to create debugfs directory under %s\n", in iwl_mvm_vif_dbgfs_register()
597 mvm->debugfs_dir, buf); in iwl_mvm_vif_dbgfs_register()
599 IWL_ERR(mvm, "Can't create debugfs symbolic link under %s\n", in iwl_mvm_vif_dbgfs_register()
603 IWL_ERR(mvm, "Can't create debugfs entity\n"); in iwl_mvm_vif_dbgfs_register()
606 void iwl_mvm_vif_dbgfs_clean(struct iwl_mvm *mvm, struct ieee80211_vif *vif) in iwl_mvm_vif_dbgfs_clean() argument