Lines Matching +full:len +full:- +full:or +full:- +full:define

2  * Copyright (c) 2008-2011 Atheros Communications Inc.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
27 #define ATH9K_DFS_STAT(s, p) \
28 len += scnprintf(buf + len, size - len, "%28s : %10u\n", s, \
29 sc->debug.stats.dfs_stats.p)
30 #define ATH9K_DFS_POOL_STAT(s, p) \
31 len += scnprintf(buf + len, size - len, "%28s : %10u\n", s, \
37 struct ath_softc *sc = file->private_data; in read_file_dfs()
38 struct ath9k_hw_version *hw_ver = &sc->sc_ah->hw_version; in read_file_dfs()
40 unsigned int len = 0, size = 8000; in read_file_dfs() local
45 return -ENOMEM; in read_file_dfs()
47 len += scnprintf(buf + len, size - len, "DFS support for " in read_file_dfs()
49 hw_ver->macVersion, hw_ver->macRev, in read_file_dfs()
50 (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_DFS) ? in read_file_dfs()
53 if (!sc->dfs_detector) { in read_file_dfs()
54 len += scnprintf(buf + len, size - len, in read_file_dfs()
59 dfs_pool_stats = sc->dfs_detector->get_stats(sc->dfs_detector); in read_file_dfs()
61 len += scnprintf(buf + len, size - len, "Pulse detector statistics:\n"); in read_file_dfs()
71 len += scnprintf(buf + len, size - len, "Radar detector statistics " in read_file_dfs()
73 sc->dfs_detector->region); in read_file_dfs()
76 len += scnprintf(buf + len, size - len, "Global Pool statistics:\n"); in read_file_dfs()
86 if (len > size) in read_file_dfs()
87 len = size; in read_file_dfs()
89 retval = simple_read_from_buffer(user_buf, count, ppos, buf, len); in read_file_dfs()
96 #define DFS_STATS_RESET_MAGIC 0x80000000
100 struct ath_softc *sc = file->private_data; in write_file_dfs()
108 memset(&sc->debug.stats.dfs_stats, 0, in write_file_dfs()
109 sizeof(sc->debug.stats.dfs_stats)); in write_file_dfs()
117 struct ath_softc *sc = file->private_data; in write_file_simulate_radar()
119 ieee80211_radar_detected(sc->hw); in write_file_simulate_radar()
142 sc->debug.debugfs_phy, sc, &fops_dfs_stats); in ath9k_dfs_init_debug()
144 sc->debug.debugfs_phy, sc, &fops_simulate_radar); in ath9k_dfs_init_debug()