Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
[linux-2.6-microblaze.git] / drivers / net / wireless / ath / ath9k / debug.c
index 7852f6e..87454f6 100644 (file)
@@ -69,7 +69,7 @@ static ssize_t write_file_debug(struct file *file, const char __user *user_buf,
                return -EFAULT;
 
        buf[len] = '\0';
-       if (strict_strtoul(buf, 0, &mask))
+       if (kstrtoul(buf, 0, &mask))
                return -EINVAL;
 
        common->debug_mask = mask;
@@ -114,7 +114,7 @@ static ssize_t write_file_tx_chainmask(struct file *file, const char __user *use
                return -EFAULT;
 
        buf[len] = '\0';
-       if (strict_strtoul(buf, 0, &mask))
+       if (kstrtoul(buf, 0, &mask))
                return -EINVAL;
 
        ah->txchainmask = mask;
@@ -157,7 +157,7 @@ static ssize_t write_file_rx_chainmask(struct file *file, const char __user *use
                return -EFAULT;
 
        buf[len] = '\0';
-       if (strict_strtoul(buf, 0, &mask))
+       if (kstrtoul(buf, 0, &mask))
                return -EINVAL;
 
        ah->rxchainmask = mask;
@@ -244,7 +244,7 @@ static ssize_t write_file_ani(struct file *file,
                return -EFAULT;
 
        buf[len] = '\0';
-       if (strict_strtoul(buf, 0, &ani))
+       if (kstrtoul(buf, 0, &ani))
                return -EINVAL;
 
        if (ani < 0 || ani > 1)
@@ -300,7 +300,7 @@ static ssize_t write_file_ant_diversity(struct file *file,
                goto exit;
 
        buf[len] = '\0';
-       if (strict_strtoul(buf, 0, &antenna_diversity))
+       if (kstrtoul(buf, 0, &antenna_diversity))
                return -EINVAL;
 
        common->antenna_diversity = !!antenna_diversity;
@@ -1270,7 +1270,7 @@ static ssize_t write_file_regidx(struct file *file, const char __user *user_buf,
                return -EFAULT;
 
        buf[len] = '\0';
-       if (strict_strtoul(buf, 0, &regidx))
+       if (kstrtoul(buf, 0, &regidx))
                return -EINVAL;
 
        sc->debug.regidx = regidx;
@@ -1315,7 +1315,7 @@ static ssize_t write_file_regval(struct file *file, const char __user *user_buf,
                return -EFAULT;
 
        buf[len] = '\0';
-       if (strict_strtoul(buf, 0, &regval))
+       if (kstrtoul(buf, 0, &regval))
                return -EINVAL;
 
        ath9k_ps_wakeup(sc);
@@ -1723,6 +1723,14 @@ void ath9k_get_et_stats(struct ieee80211_hw *hw,
        WARN_ON(i != ATH9K_SSTATS_LEN);
 }
 
+void ath9k_deinit_debug(struct ath_softc *sc)
+{
+       if (config_enabled(CONFIG_ATH9K_DEBUGFS) && sc->rfs_chan_spec_scan) {
+               relay_close(sc->rfs_chan_spec_scan);
+               sc->rfs_chan_spec_scan = NULL;
+       }
+}
+
 int ath9k_init_debug(struct ath_hw *ah)
 {
        struct ath_common *common = ath9k_hw_common(ah);