diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/common-spectral.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/common-spectral.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath9k/common-spectral.c b/drivers/net/wireless/ath/ath9k/common-spectral.c index 5e77fe1f5b0d..440e16e641e4 100644 --- a/drivers/net/wireless/ath/ath9k/common-spectral.c +++ b/drivers/net/wireless/ath/ath9k/common-spectral.c @@ -479,14 +479,16 @@ ath_cmn_is_fft_buf_full(struct ath_spec_scan_priv *spec_priv) { int i = 0; int ret = 0; + struct rchan_buf *buf; struct rchan *rc = spec_priv->rfs_chan_spec_scan; - for_each_online_cpu(i) - ret += relay_buf_full(*per_cpu_ptr(rc->buf, i)); - - i = num_online_cpus(); + for_each_possible_cpu(i) { + if ((buf = *per_cpu_ptr(rc->buf, i))) { + ret += relay_buf_full(buf); + } + } - if (ret == i) + if (ret) return 1; else return 0; @@ -1096,23 +1098,23 @@ void ath9k_cmn_spectral_init_debug(struct ath_spec_scan_priv *spec_priv, return; debugfs_create_file("spectral_scan_ctl", - S_IRUSR | S_IWUSR, + 0600, debugfs_phy, spec_priv, &fops_spec_scan_ctl); debugfs_create_file("spectral_short_repeat", - S_IRUSR | S_IWUSR, + 0600, debugfs_phy, spec_priv, &fops_spectral_short_repeat); debugfs_create_file("spectral_count", - S_IRUSR | S_IWUSR, + 0600, debugfs_phy, spec_priv, &fops_spectral_count); debugfs_create_file("spectral_period", - S_IRUSR | S_IWUSR, + 0600, debugfs_phy, spec_priv, &fops_spectral_period); debugfs_create_file("spectral_fft_period", - S_IRUSR | S_IWUSR, + 0600, debugfs_phy, spec_priv, &fops_spectral_fft_period); } |