diff options
| author | John W. Linville <[email protected]> | 2012-05-16 10:57:32 -0400 | 
|---|---|---|
| committer | John W. Linville <[email protected]> | 2012-05-16 10:57:32 -0400 | 
| commit | 12d9568333de3bfc50ff8d3312c097ba7ea7fe3c (patch) | |
| tree | c92a8f034bfc37bc129a26834ef78543d06c8b9d /drivers/net/wireless/ath/ath6kl/debug.c | |
| parent | 5f561f686b90f51d97a1a6985175860200e55a2d (diff) | |
| parent | f3740572512075839e1a7ebde970081106fed3f0 (diff) | |
Merge branch 'for-linville' of git://github.com/kvalo/ath6kl
Diffstat (limited to 'drivers/net/wireless/ath/ath6kl/debug.c')
| -rw-r--r-- | drivers/net/wireless/ath/ath6kl/debug.c | 12 | 
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c index 1b76aff78508..15cfe30e54fd 100644 --- a/drivers/net/wireless/ath/ath6kl/debug.c +++ b/drivers/net/wireless/ath/ath6kl/debug.c @@ -401,8 +401,10 @@ static ssize_t ath6kl_fwlog_block_read(struct file *file,  		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);  	} @@ -1570,10 +1572,15 @@ static ssize_t ath6kl_bgscan_int_write(struct file *file,  				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; @@ -1585,6 +1592,8 @@ static ssize_t ath6kl_bgscan_int_write(struct file *file,  	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); @@ -1809,6 +1818,7 @@ int ath6kl_debug_init_fs(struct ath6kl *ar)  void ath6kl_debug_cleanup(struct ath6kl *ar)  {  	skb_queue_purge(&ar->debug.fwlog_queue); +	complete(&ar->debug.fwlog_completion);  	kfree(ar->debug.roam_tbl);  }  |