Lines Matching +full:x +full:- +full:max

1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright(c) 2009-2012 Realtek Corporation.*/
14 if (unlikely((comp & rtlpriv->cfg->mod_params->debug_mask) && in _rtl_dbg_print()
15 level <= rtlpriv->cfg->mod_params->debug_level)) { in _rtl_dbg_print()
35 if (unlikely(((comp) & rtlpriv->cfg->mod_params->debug_mask) && in _rtl_dbg_print_data()
36 ((level) <= rtlpriv->cfg->mod_params->debug_level))) { in _rtl_dbg_print_data()
38 current->comm, current->pid, titlestring); in _rtl_dbg_print_data()
57 struct rtl_debugfs_priv *debugfs_priv = m->private; in rtl_debug_get_common()
59 return debugfs_priv->cb_read(m, v); in rtl_debug_get_common()
64 return single_open(file, rtl_debug_get_common, inode->i_private); in dl_debug_open_common()
76 struct rtl_debugfs_priv *debugfs_priv = m->private; in rtl_debug_get_mac_page()
77 struct rtl_priv *rtlpriv = debugfs_priv->rtlpriv; in rtl_debug_get_mac_page()
78 u32 page = debugfs_priv->cb_data; in rtl_debug_get_mac_page()
80 int max = 0xff; in rtl_debug_get_mac_page() local
82 for (n = 0; n <= max; ) { in rtl_debug_get_mac_page()
83 seq_printf(m, "\n%8.8x ", n + page); in rtl_debug_get_mac_page()
84 for (i = 0; i < 4 && n <= max; i++, n += 4) in rtl_debug_get_mac_page()
85 seq_printf(m, "%8.8x ", in rtl_debug_get_mac_page()
117 struct rtl_debugfs_priv *debugfs_priv = m->private; in rtl_debug_get_bb_page()
118 struct rtl_priv *rtlpriv = debugfs_priv->rtlpriv; in rtl_debug_get_bb_page()
119 struct ieee80211_hw *hw = rtlpriv->hw; in rtl_debug_get_bb_page()
120 u32 page = debugfs_priv->cb_data; in rtl_debug_get_bb_page()
122 int max = 0xff; in rtl_debug_get_bb_page() local
124 for (n = 0; n <= max; ) { in rtl_debug_get_bb_page()
125 seq_printf(m, "\n%8.8x ", n + page); in rtl_debug_get_bb_page()
126 for (i = 0; i < 4 && n <= max; i++, n += 4) in rtl_debug_get_bb_page()
127 seq_printf(m, "%8.8x ", in rtl_debug_get_bb_page()
159 struct rtl_debugfs_priv *debugfs_priv = m->private; in rtl_debug_get_reg_rf()
160 struct rtl_priv *rtlpriv = debugfs_priv->rtlpriv; in rtl_debug_get_reg_rf()
161 struct ieee80211_hw *hw = rtlpriv->hw; in rtl_debug_get_reg_rf()
162 enum radio_path rfpath = debugfs_priv->cb_data; in rtl_debug_get_reg_rf()
164 int max = 0x40; in rtl_debug_get_reg_rf() local
167 max = 0xff; in rtl_debug_get_reg_rf()
171 for (n = 0; n <= max; ) { in rtl_debug_get_reg_rf()
172 seq_printf(m, "\n%8.8x ", n); in rtl_debug_get_reg_rf()
173 for (i = 0; i < 4 && n <= max; n += 1, i++) in rtl_debug_get_reg_rf()
174 seq_printf(m, "%8.8x ", in rtl_debug_get_reg_rf()
192 struct rtl_debugfs_priv *debugfs_priv = m->private; in rtl_debug_get_cam_register()
193 struct rtl_priv *rtlpriv = debugfs_priv->rtlpriv; in rtl_debug_get_cam_register()
194 int start = debugfs_priv->cb_data; in rtl_debug_get_cam_register()
204 "\n#################### SECURITY CAM (%d-%d) ##################\n", in rtl_debug_get_cam_register()
205 start, end - 1); in rtl_debug_get_cam_register()
208 seq_printf(m, "\nD: %2x > ", j); in rtl_debug_get_cam_register()
215 while ((i--) >= 0) { in rtl_debug_get_cam_register()
218 rtlpriv->cfg->maps[RWCAM]); in rtl_debug_get_cam_register()
225 rtl_write_dword(rtlpriv, rtlpriv->cfg->maps[RWCAM], in rtl_debug_get_cam_register()
228 rtlpriv->cfg->maps[RCAMO]); in rtl_debug_get_cam_register()
229 seq_printf(m, "%8.8x ", target_val); in rtl_debug_get_cam_register()
248 struct rtl_debugfs_priv *debugfs_priv = m->private; in rtl_debug_get_btcoex()
249 struct rtl_priv *rtlpriv = debugfs_priv->rtlpriv; in rtl_debug_get_btcoex()
251 if (rtlpriv->cfg->ops->get_btc_status()) in rtl_debug_get_btcoex()
252 rtlpriv->btcoexist.btc_ops->btc_display_bt_coex_info(rtlpriv, in rtl_debug_get_btcoex()
269 struct rtl_debugfs_priv *debugfs_priv = filp->private_data; in rtl_debugfs_set_write_reg()
270 struct rtl_priv *rtlpriv = debugfs_priv->rtlpriv; in rtl_debugfs_set_write_reg()
277 return -EFAULT; in rtl_debugfs_set_write_reg()
279 tmp_len = (count > sizeof(tmp) - 1 ? sizeof(tmp) - 1 : count); in rtl_debugfs_set_write_reg()
282 return -EFAULT; in rtl_debugfs_set_write_reg()
287 num = sscanf(tmp, "%x %x %x", &addr, &val, &len); in rtl_debugfs_set_write_reg()
290 return -EINVAL; in rtl_debugfs_set_write_reg()
318 struct rtl_debugfs_priv *debugfs_priv = filp->private_data; in rtl_debugfs_set_write_h2c()
319 struct rtl_priv *rtlpriv = debugfs_priv->rtlpriv; in rtl_debugfs_set_write_h2c()
320 struct ieee80211_hw *hw = rtlpriv->hw; in rtl_debugfs_set_write_h2c()
328 return -EFAULT; in rtl_debugfs_set_write_h2c()
330 tmp_len = (count > sizeof(tmp) - 1 ? sizeof(tmp) - 1 : count); in rtl_debugfs_set_write_h2c()
333 return -EFAULT; in rtl_debugfs_set_write_h2c()
337 h2c_len = sscanf(tmp, "%X %X %X %X %X %X %X %X", in rtl_debugfs_set_write_h2c()
344 return -EINVAL; in rtl_debugfs_set_write_h2c()
349 rtlpriv->cfg->ops->fill_h2c_cmd(hw, h2c_data_packed[0], in rtl_debugfs_set_write_h2c()
350 h2c_len - 1, in rtl_debugfs_set_write_h2c()
364 struct rtl_debugfs_priv *debugfs_priv = filp->private_data; in rtl_debugfs_set_write_rfreg()
365 struct rtl_priv *rtlpriv = debugfs_priv->rtlpriv; in rtl_debugfs_set_write_rfreg()
366 struct ieee80211_hw *hw = rtlpriv->hw; in rtl_debugfs_set_write_rfreg()
374 return -EFAULT; in rtl_debugfs_set_write_rfreg()
376 tmp_len = (count > sizeof(tmp) - 1 ? sizeof(tmp) - 1 : count); in rtl_debugfs_set_write_rfreg()
379 return -EFAULT; in rtl_debugfs_set_write_rfreg()
383 num = sscanf(tmp, "%X %X %X %X", in rtl_debugfs_set_write_rfreg()
389 return -EINVAL; in rtl_debugfs_set_write_rfreg()
410 struct rtl_debugfs_priv *debugfs_priv = filp->private_data; in rtl_debugfs_common_write()
412 return debugfs_priv->cb_write(filp, buffer, count, loff); in rtl_debugfs_common_write()
441 snprintf(rtlpriv->dbg.debugfs_name, 18, "%pMF", rtlefuse->dev_addr); in rtl_debug_add_one()
443 rtlpriv->dbg.debugfs_dir = in rtl_debug_add_one()
444 debugfs_create_dir(rtlpriv->dbg.debugfs_name, debugfs_topdir); in rtl_debug_add_one()
446 parent = rtlpriv->dbg.debugfs_dir; in rtl_debug_add_one()
499 debugfs_remove_recursive(rtlpriv->dbg.debugfs_dir); in rtl_debug_remove_one()
500 rtlpriv->dbg.debugfs_dir = NULL; in rtl_debug_remove_one()