• Home
  • Raw
  • Download

Lines Matching refs:ar

146 		if (dev->ar->mbox_info.gmbox_addr != 0) {  in ath6kl_dump_registers()
220 void ath6kl_debug_war(struct ath6kl *ar, enum ath6kl_war war) in ath6kl_debug_war() argument
224 ar->debug.war_stats.invalid_rate++; in ath6kl_debug_war()
232 struct ath6kl *ar = file->private_data; in read_file_war_stats() local
247 "Invalid rates", ar->debug.war_stats.invalid_rate); in read_file_war_stats()
265 void ath6kl_debug_fwlog_event(struct ath6kl *ar, const void *buf, size_t len) in ath6kl_debug_fwlog_event() argument
288 spin_lock(&ar->debug.fwlog_queue.lock); in ath6kl_debug_fwlog_event()
290 __skb_queue_tail(&ar->debug.fwlog_queue, skb); in ath6kl_debug_fwlog_event()
291 complete(&ar->debug.fwlog_completion); in ath6kl_debug_fwlog_event()
294 while (skb_queue_len(&ar->debug.fwlog_queue) > in ath6kl_debug_fwlog_event()
296 skb = __skb_dequeue(&ar->debug.fwlog_queue); in ath6kl_debug_fwlog_event()
300 spin_unlock(&ar->debug.fwlog_queue.lock); in ath6kl_debug_fwlog_event()
307 struct ath6kl *ar = inode->i_private; in ath6kl_fwlog_open() local
309 if (ar->debug.fwlog_open) in ath6kl_fwlog_open()
312 ar->debug.fwlog_open = true; in ath6kl_fwlog_open()
320 struct ath6kl *ar = inode->i_private; in ath6kl_fwlog_release() local
322 ar->debug.fwlog_open = false; in ath6kl_fwlog_release()
330 struct ath6kl *ar = file->private_data; in ath6kl_fwlog_read() local
341 ath6kl_read_fwlogs(ar); in ath6kl_fwlog_read()
343 spin_lock(&ar->debug.fwlog_queue.lock); in ath6kl_fwlog_read()
345 while ((skb = __skb_dequeue(&ar->debug.fwlog_queue))) { in ath6kl_fwlog_read()
348 __skb_queue_head(&ar->debug.fwlog_queue, skb); in ath6kl_fwlog_read()
359 spin_unlock(&ar->debug.fwlog_queue.lock); in ath6kl_fwlog_read()
383 struct ath6kl *ar = file->private_data; in ath6kl_fwlog_block_read() local
394 spin_lock(&ar->debug.fwlog_queue.lock); in ath6kl_fwlog_block_read()
396 if (skb_queue_len(&ar->debug.fwlog_queue) == 0) { in ath6kl_fwlog_block_read()
398 init_completion(&ar->debug.fwlog_completion); in ath6kl_fwlog_block_read()
400 spin_unlock(&ar->debug.fwlog_queue.lock); in ath6kl_fwlog_block_read()
403 &ar->debug.fwlog_completion); in ath6kl_fwlog_block_read()
407 spin_lock(&ar->debug.fwlog_queue.lock); in ath6kl_fwlog_block_read()
410 while ((skb = __skb_dequeue(&ar->debug.fwlog_queue))) { in ath6kl_fwlog_block_read()
413 __skb_queue_head(&ar->debug.fwlog_queue, skb); in ath6kl_fwlog_block_read()
424 spin_unlock(&ar->debug.fwlog_queue.lock); in ath6kl_fwlog_block_read()
455 struct ath6kl *ar = file->private_data; in ath6kl_fwlog_mask_read() local
459 len = snprintf(buf, sizeof(buf), "0x%x\n", ar->debug.fwlog_mask); in ath6kl_fwlog_mask_read()
468 struct ath6kl *ar = file->private_data; in ath6kl_fwlog_mask_write() local
471 ret = kstrtou32_from_user(user_buf, count, 0, &ar->debug.fwlog_mask); in ath6kl_fwlog_mask_write()
475 ret = ath6kl_wmi_config_debug_module_cmd(ar->wmi, in ath6kl_fwlog_mask_write()
477 ar->debug.fwlog_mask); in ath6kl_fwlog_mask_write()
495 struct ath6kl *ar = file->private_data; in read_file_tgt_stats() local
504 vif = ath6kl_vif_first(ar); in read_file_tgt_stats()
514 if (down_interruptible(&ar->sem)) { in read_file_tgt_stats()
521 if (ath6kl_wmi_get_stats_cmd(ar->wmi, 0)) { in read_file_tgt_stats()
522 up(&ar->sem); in read_file_tgt_stats()
527 left = wait_event_interruptible_timeout(ar->event_wq, in read_file_tgt_stats()
531 up(&ar->sem); in read_file_tgt_stats()
646 struct ath6kl *ar = file->private_data; in read_file_credit_dist_stats() local
647 struct htc_target *target = ar->htc_target; in read_file_credit_dist_stats()
724 struct ath6kl *ar = file->private_data; in ath6kl_endpoint_stats_read() local
725 struct htc_target *target = ar->htc_target; in ath6kl_endpoint_stats_read()
779 struct ath6kl *ar = file->private_data; in ath6kl_endpoint_stats_write() local
780 struct htc_target *target = ar->htc_target; in ath6kl_endpoint_stats_write()
834 struct ath6kl *ar = file->private_data; in ath6kl_regread_read() local
838 if (ar->debug.dbgfs_diag_reg) in ath6kl_regread_read()
840 ar->debug.dbgfs_diag_reg); in ath6kl_regread_read()
852 struct ath6kl *ar = file->private_data; in ath6kl_regread_write() local
864 ar->debug.dbgfs_diag_reg = reg_addr; in ath6kl_regread_write()
879 struct ath6kl *ar = inode->i_private; in ath6kl_regdump_open() local
888 if (!ar->debug.dbgfs_diag_reg) in ath6kl_regdump_open()
902 addr = ar->debug.dbgfs_diag_reg; in ath6kl_regdump_open()
904 status = ath6kl_diag_read32(ar, in ath6kl_regdump_open()
905 TARG_VTOP(ar->target_type, addr), in ath6kl_regdump_open()
920 status = ath6kl_diag_read32(ar, in ath6kl_regdump_open()
921 TARG_VTOP(ar->target_type, addr), in ath6kl_regdump_open()
967 struct ath6kl *ar = file->private_data; in ath6kl_lrssi_roam_write() local
973 ar->lrssi_roam_threshold = lrssi_roam_threshold; in ath6kl_lrssi_roam_write()
975 ath6kl_wmi_set_roam_lrssi_cmd(ar->wmi, ar->lrssi_roam_threshold); in ath6kl_lrssi_roam_write()
984 struct ath6kl *ar = file->private_data; in ath6kl_lrssi_roam_read() local
988 len = snprintf(buf, sizeof(buf), "%u\n", ar->lrssi_roam_threshold); in ath6kl_lrssi_roam_read()
1005 struct ath6kl *ar = file->private_data; in ath6kl_regwrite_read() local
1010 ar->debug.diag_reg_addr_wr, ar->debug.diag_reg_val_wr); in ath6kl_regwrite_read()
1019 struct ath6kl *ar = file->private_data; in ath6kl_regwrite_write() local
1045 ar->debug.diag_reg_addr_wr = reg_addr; in ath6kl_regwrite_write()
1046 ar->debug.diag_reg_val_wr = reg_val; in ath6kl_regwrite_write()
1048 if (ath6kl_diag_write32(ar, ar->debug.diag_reg_addr_wr, in ath6kl_regwrite_write()
1049 cpu_to_le32(ar->debug.diag_reg_val_wr))) in ath6kl_regwrite_write()
1063 int ath6kl_debug_roam_tbl_event(struct ath6kl *ar, const void *buf, in ath6kl_debug_roam_tbl_event() argument
1078 if (ar->debug.roam_tbl == NULL || in ath6kl_debug_roam_tbl_event()
1079 ar->debug.roam_tbl_len < (unsigned int) len) { in ath6kl_debug_roam_tbl_event()
1080 kfree(ar->debug.roam_tbl); in ath6kl_debug_roam_tbl_event()
1081 ar->debug.roam_tbl = kmalloc(len, GFP_ATOMIC); in ath6kl_debug_roam_tbl_event()
1082 if (ar->debug.roam_tbl == NULL) in ath6kl_debug_roam_tbl_event()
1086 memcpy(ar->debug.roam_tbl, buf, len); in ath6kl_debug_roam_tbl_event()
1087 ar->debug.roam_tbl_len = len; in ath6kl_debug_roam_tbl_event()
1089 if (test_bit(ROAM_TBL_PEND, &ar->flag)) { in ath6kl_debug_roam_tbl_event()
1090 clear_bit(ROAM_TBL_PEND, &ar->flag); in ath6kl_debug_roam_tbl_event()
1091 wake_up(&ar->event_wq); in ath6kl_debug_roam_tbl_event()
1100 struct ath6kl *ar = file->private_data; in ath6kl_roam_table_read() local
1109 if (down_interruptible(&ar->sem)) in ath6kl_roam_table_read()
1112 set_bit(ROAM_TBL_PEND, &ar->flag); in ath6kl_roam_table_read()
1114 ret = ath6kl_wmi_get_roam_tbl_cmd(ar->wmi); in ath6kl_roam_table_read()
1116 up(&ar->sem); in ath6kl_roam_table_read()
1121 ar->event_wq, !test_bit(ROAM_TBL_PEND, &ar->flag), WMI_TIMEOUT); in ath6kl_roam_table_read()
1122 up(&ar->sem); in ath6kl_roam_table_read()
1127 if (ar->debug.roam_tbl == NULL) in ath6kl_roam_table_read()
1130 tbl = (struct wmi_target_roam_tbl *) ar->debug.roam_tbl; in ath6kl_roam_table_read()
1172 struct ath6kl *ar = file->private_data; in ath6kl_force_roam_write() local
1192 ret = ath6kl_wmi_force_roam_cmd(ar->wmi, bssid); in ath6kl_force_roam_write()
1210 struct ath6kl *ar = file->private_data; in ath6kl_roam_mode_write() local
1232 ret = ath6kl_wmi_set_roam_mode_cmd(ar->wmi, mode); in ath6kl_roam_mode_write()
1246 void ath6kl_debug_set_keepalive(struct ath6kl *ar, u8 keepalive) in ath6kl_debug_set_keepalive() argument
1248 ar->debug.keepalive = keepalive; in ath6kl_debug_set_keepalive()
1254 struct ath6kl *ar = file->private_data; in ath6kl_keepalive_read() local
1258 len = snprintf(buf, sizeof(buf), "%u\n", ar->debug.keepalive); in ath6kl_keepalive_read()
1267 struct ath6kl *ar = file->private_data; in ath6kl_keepalive_write() local
1275 ret = ath6kl_wmi_set_keepalive_cmd(ar->wmi, 0, val); in ath6kl_keepalive_write()
1290 void ath6kl_debug_set_disconnect_timeout(struct ath6kl *ar, u8 timeout) in ath6kl_debug_set_disconnect_timeout() argument
1292 ar->debug.disc_timeout = timeout; in ath6kl_debug_set_disconnect_timeout()
1299 struct ath6kl *ar = file->private_data; in ath6kl_disconnect_timeout_read() local
1303 len = snprintf(buf, sizeof(buf), "%u\n", ar->debug.disc_timeout); in ath6kl_disconnect_timeout_read()
1312 struct ath6kl *ar = file->private_data; in ath6kl_disconnect_timeout_write() local
1320 ret = ath6kl_wmi_disctimeout_cmd(ar->wmi, 0, val); in ath6kl_disconnect_timeout_write()
1340 struct ath6kl *ar = file->private_data; in ath6kl_create_qos_write() local
1349 vif = ath6kl_vif_first(ar); in ath6kl_create_qos_write()
1502 ath6kl_wmi_create_pstream_cmd(ar->wmi, vif->fw_vif_idx, &pstream); in ath6kl_create_qos_write()
1519 struct ath6kl *ar = file->private_data; in ath6kl_delete_qos_write() local
1527 vif = ath6kl_vif_first(ar); in ath6kl_delete_qos_write()
1549 ath6kl_wmi_delete_pstream_cmd(ar->wmi, vif->fw_vif_idx, in ath6kl_delete_qos_write()
1566 struct ath6kl *ar = file->private_data; in ath6kl_bgscan_int_write() local
1582 ath6kl_wmi_scanparams_cmd(ar->wmi, 0, 0, 0, bgscan_int, 0, 0, 0, 3, in ath6kl_bgscan_int_write()
1599 struct ath6kl *ar = file->private_data; in ath6kl_listen_int_write() local
1605 vif = ath6kl_vif_first(ar); in ath6kl_listen_int_write()
1621 ath6kl_wmi_listeninterval_cmd(ar->wmi, vif->fw_vif_idx, in ath6kl_listen_int_write()
1631 struct ath6kl *ar = file->private_data; in ath6kl_listen_int_read() local
1636 vif = ath6kl_vif_first(ar); in ath6kl_listen_int_read()
1657 struct ath6kl *ar = file->private_data; in ath6kl_power_params_write() local
1700 ath6kl_wmi_pmparams_cmd(ar->wmi, 0, idle_period, ps_poll_num, in ath6kl_power_params_write()
1713 void ath6kl_debug_init(struct ath6kl *ar) in ath6kl_debug_init() argument
1715 skb_queue_head_init(&ar->debug.fwlog_queue); in ath6kl_debug_init()
1716 init_completion(&ar->debug.fwlog_completion); in ath6kl_debug_init()
1722 ar->debug.fwlog_mask = 0; in ath6kl_debug_init()
1730 int ath6kl_debug_init_fs(struct ath6kl *ar) in ath6kl_debug_init_fs() argument
1732 ar->debugfs_phy = debugfs_create_dir("ath6kl", in ath6kl_debug_init_fs()
1733 ar->wiphy->debugfsdir); in ath6kl_debug_init_fs()
1734 if (!ar->debugfs_phy) in ath6kl_debug_init_fs()
1737 debugfs_create_file("tgt_stats", S_IRUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1740 debugfs_create_file("credit_dist_stats", S_IRUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1744 ar->debugfs_phy, ar, &fops_endpoint_stats); in ath6kl_debug_init_fs()
1746 debugfs_create_file("fwlog", S_IRUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1749 debugfs_create_file("fwlog_block", S_IRUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1752 debugfs_create_file("fwlog_mask", S_IRUSR | S_IWUSR, ar->debugfs_phy, in ath6kl_debug_init_fs()
1753 ar, &fops_fwlog_mask); in ath6kl_debug_init_fs()
1755 debugfs_create_file("reg_addr", S_IRUSR | S_IWUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1758 debugfs_create_file("reg_dump", S_IRUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1762 ar->debugfs_phy, ar, &fops_lrssi_roam_threshold); in ath6kl_debug_init_fs()
1765 ar->debugfs_phy, ar, &fops_diag_reg_write); in ath6kl_debug_init_fs()
1767 debugfs_create_file("war_stats", S_IRUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1770 debugfs_create_file("roam_table", S_IRUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1773 debugfs_create_file("force_roam", S_IWUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1776 debugfs_create_file("roam_mode", S_IWUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1779 debugfs_create_file("keepalive", S_IRUSR | S_IWUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1783 ar->debugfs_phy, ar, &fops_disconnect_timeout); in ath6kl_debug_init_fs()
1785 debugfs_create_file("create_qos", S_IWUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1788 debugfs_create_file("delete_qos", S_IWUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1792 ar->debugfs_phy, ar, &fops_bgscan_int); in ath6kl_debug_init_fs()
1795 ar->debugfs_phy, ar, &fops_listen_int); in ath6kl_debug_init_fs()
1797 debugfs_create_file("power_params", S_IWUSR, ar->debugfs_phy, ar, in ath6kl_debug_init_fs()
1803 void ath6kl_debug_cleanup(struct ath6kl *ar) in ath6kl_debug_cleanup() argument
1805 skb_queue_purge(&ar->debug.fwlog_queue); in ath6kl_debug_cleanup()
1806 kfree(ar->debug.roam_tbl); in ath6kl_debug_cleanup()