]> Git Repo - linux.git/commitdiff
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl
authorJohn W. Linville <[email protected]>
Wed, 16 May 2012 14:57:32 +0000 (10:57 -0400)
committerJohn W. Linville <[email protected]>
Wed, 16 May 2012 14:57:32 +0000 (10:57 -0400)
1  2 
drivers/net/wireless/ath/ath6kl/debug.c

index 1b76aff7850834a4be33f284c76395e21334e7f4,ced6c6fe54703db72240899e8c2dbb5a14ec8d76..15cfe30e54fdf1dfb8a8c8548a2c6826bc0de98e
@@@ -217,6 -217,12 +217,6 @@@ void dump_cred_dist_stats(struct htc_ta
                   target->credit_info->cur_free_credits);
  }
  
 -static int ath6kl_debugfs_open(struct inode *inode, struct file *file)
 -{
 -      file->private_data = inode->i_private;
 -      return 0;
 -}
 -
  void ath6kl_debug_war(struct ath6kl *ar, enum ath6kl_war war)
  {
        switch (war) {
@@@ -257,7 -263,7 +257,7 @@@ static ssize_t read_file_war_stats(stru
  
  static const struct file_operations fops_war_stats = {
        .read = read_file_war_stats,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -401,8 -407,10 +401,10 @@@ static ssize_t ath6kl_fwlog_block_read(
  
                ret = wait_for_completion_interruptible(
                        &ar->debug.fwlog_completion);
-               if (ret == -ERESTARTSYS)
+               if (ret == -ERESTARTSYS) {
+                       vfree(buf);
                        return ret;
+               }
  
                spin_lock(&ar->debug.fwlog_queue.lock);
        }
@@@ -482,7 -490,7 +484,7 @@@ static ssize_t ath6kl_fwlog_mask_write(
  }
  
  static const struct file_operations fops_fwlog_mask = {
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .read = ath6kl_fwlog_mask_read,
        .write = ath6kl_fwlog_mask_write,
        .owner = THIS_MODULE,
@@@ -634,7 -642,7 +636,7 @@@ static ssize_t read_file_tgt_stats(stru
  
  static const struct file_operations fops_tgt_stats = {
        .read = read_file_tgt_stats,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -699,7 -707,7 +701,7 @@@ static ssize_t read_file_credit_dist_st
  
  static const struct file_operations fops_credit_dist_stats = {
        .read = read_file_credit_dist_stats,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -802,7 -810,7 +804,7 @@@ static ssize_t ath6kl_endpoint_stats_wr
  }
  
  static const struct file_operations fops_endpoint_stats = {
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .read = ath6kl_endpoint_stats_read,
        .write = ath6kl_endpoint_stats_write,
        .owner = THIS_MODULE,
@@@ -875,7 -883,7 +877,7 @@@ static ssize_t ath6kl_regread_write(str
  static const struct file_operations fops_diag_reg_read = {
        .read = ath6kl_regread_read,
        .write = ath6kl_regread_write,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -999,7 -1007,7 +1001,7 @@@ static ssize_t ath6kl_lrssi_roam_read(s
  static const struct file_operations fops_lrssi_roam_threshold = {
        .read = ath6kl_lrssi_roam_read,
        .write = ath6kl_lrssi_roam_write,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -1061,7 -1069,7 +1063,7 @@@ static ssize_t ath6kl_regwrite_write(st
  static const struct file_operations fops_diag_reg_write = {
        .read = ath6kl_regwrite_read,
        .write = ath6kl_regwrite_write,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -1166,7 -1174,7 +1168,7 @@@ static ssize_t ath6kl_roam_table_read(s
  
  static const struct file_operations fops_roam_table = {
        .read = ath6kl_roam_table_read,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -1204,7 -1212,7 +1206,7 @@@ static ssize_t ath6kl_force_roam_write(
  
  static const struct file_operations fops_force_roam = {
        .write = ath6kl_force_roam_write,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -1244,7 -1252,7 +1246,7 @@@ static ssize_t ath6kl_roam_mode_write(s
  
  static const struct file_operations fops_roam_mode = {
        .write = ath6kl_roam_mode_write,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -1286,7 -1294,7 +1288,7 @@@ static ssize_t ath6kl_keepalive_write(s
  }
  
  static const struct file_operations fops_keepalive = {
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .read = ath6kl_keepalive_read,
        .write = ath6kl_keepalive_write,
        .owner = THIS_MODULE,
@@@ -1331,7 -1339,7 +1333,7 @@@ static ssize_t ath6kl_disconnect_timeou
  }
  
  static const struct file_operations fops_disconnect_timeout = {
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .read = ath6kl_disconnect_timeout_read,
        .write = ath6kl_disconnect_timeout_write,
        .owner = THIS_MODULE,
@@@ -1512,7 -1520,7 +1514,7 @@@ static ssize_t ath6kl_create_qos_write(
  
  static const struct file_operations fops_create_qos = {
        .write = ath6kl_create_qos_write,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -1560,7 -1568,7 +1562,7 @@@ static ssize_t ath6kl_delete_qos_write(
  
  static const struct file_operations fops_delete_qos = {
        .write = ath6kl_delete_qos_write,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -1570,10 -1578,15 +1572,15 @@@ static ssize_t ath6kl_bgscan_int_write(
                                size_t count, loff_t *ppos)
  {
        struct ath6kl *ar = file->private_data;
+       struct ath6kl_vif *vif;
        u16 bgscan_int;
        char buf[32];
        ssize_t len;
  
+       vif = ath6kl_vif_first(ar);
+       if (!vif)
+               return -EIO;
        len = min(count, sizeof(buf) - 1);
        if (copy_from_user(buf, user_buf, len))
                return -EFAULT;
        if (bgscan_int == 0)
                bgscan_int = 0xffff;
  
+       vif->bg_scan_period = bgscan_int;
        ath6kl_wmi_scanparams_cmd(ar->wmi, 0, 0, 0, bgscan_int, 0, 0, 0, 3,
                                  0, 0, 0);
  
  
  static const struct file_operations fops_bgscan_int = {
        .write = ath6kl_bgscan_int_write,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -1651,7 -1666,7 +1660,7 @@@ static ssize_t ath6kl_listen_int_read(s
  static const struct file_operations fops_listen_int = {
        .read = ath6kl_listen_int_read,
        .write = ath6kl_listen_int_write,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -1711,7 -1726,7 +1720,7 @@@ static ssize_t ath6kl_power_params_writ
  
  static const struct file_operations fops_power_params = {
        .write = ath6kl_power_params_write,
 -      .open = ath6kl_debugfs_open,
 +      .open = simple_open,
        .owner = THIS_MODULE,
        .llseek = default_llseek,
  };
@@@ -1809,6 -1824,7 +1818,7 @@@ int ath6kl_debug_init_fs(struct ath6kl 
  void ath6kl_debug_cleanup(struct ath6kl *ar)
  {
        skb_queue_purge(&ar->debug.fwlog_queue);
+       complete(&ar->debug.fwlog_completion);
        kfree(ar->debug.roam_tbl);
  }
  
This page took 0.069936 seconds and 4 git commands to generate.