Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328355
b: refs/heads/master
c: d556023
h: refs/heads/master
i:
  328353: d9f72c7
  328351: 0ac31e0
v: v3
  • Loading branch information
Ido Yariv authored and Luciano Coelho committed Sep 27, 2012
1 parent db65c30 commit 7d5c1db
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 001e39a8effd5a9774153ca6ca67849a93b95852
refs/heads/master: d556023895c8968fd97ccb08300006b78975a23b
20 changes: 12 additions & 8 deletions trunk/drivers/net/wireless/ti/wlcore/debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1064,14 +1064,16 @@ static ssize_t dev_mem_read(struct file *file,

mutex_lock(&wl->mutex);

if (unlikely(wl->state != WLCORE_STATE_ON)) {
if (unlikely(wl->state == WLCORE_STATE_OFF)) {
ret = -EFAULT;
goto skip_read;
}

ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
goto skip_read;
/*
* Don't fail if elp_wakeup returns an error, so the device's memory
* could be read even if the FW crashed
*/
wl1271_ps_elp_wakeup(wl);

/* store current partition and switch partition */
memcpy(&old_part, &wl->curr_part, sizeof(old_part));
Expand Down Expand Up @@ -1149,14 +1151,16 @@ static ssize_t dev_mem_write(struct file *file, const char __user *user_buf,

mutex_lock(&wl->mutex);

if (unlikely(wl->state != WLCORE_STATE_ON)) {
if (unlikely(wl->state == WLCORE_STATE_OFF)) {
ret = -EFAULT;
goto skip_write;
}

ret = wl1271_ps_elp_wakeup(wl);
if (ret < 0)
goto skip_write;
/*
* Don't fail if elp_wakeup returns an error, so the device's memory
* could be read even if the FW crashed
*/
wl1271_ps_elp_wakeup(wl);

/* store current partition and switch partition */
memcpy(&old_part, &wl->curr_part, sizeof(old_part));
Expand Down

0 comments on commit 7d5c1db

Please sign in to comment.