Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203807
b: refs/heads/master
c: 2189d13
h: refs/heads/master
i:
  203805: b7b7402
  203803: c0aea00
  203799: ea2c462
  203791: 37a2548
  203775: 2250b59
v: v3
  • Loading branch information
Dan Carpenter authored and John W. Linville committed Jul 26, 2010
1 parent 28fd872 commit 965e6ba
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9746010bd3c825d364b783b327990d25962657dd
refs/heads/master: 2189d13f6cfc58627a01d6a91591e59a2fa62902
18 changes: 18 additions & 0 deletions trunk/drivers/net/wireless/ath/ath5k/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,9 @@ static ssize_t read_file_beacon(struct file *file, char __user *user_buf,
"TSF\t\t0x%016llx\tTU: %08x\n",
(unsigned long long)tsf, TSF_TO_TU(tsf));

if (len > sizeof(buf))
len = sizeof(buf);

return simple_read_from_buffer(user_buf, count, ppos, buf, len);
}

Expand Down Expand Up @@ -334,6 +337,9 @@ static ssize_t read_file_debug(struct file *file, char __user *user_buf,
sc->debug.level == dbg_info[i].level ? '+' : ' ',
dbg_info[i].level, dbg_info[i].desc);

if (len > sizeof(buf))
len = sizeof(buf);

return simple_read_from_buffer(user_buf, count, ppos, buf, len);
}

Expand Down Expand Up @@ -433,6 +439,9 @@ static ssize_t read_file_antenna(struct file *file, char __user *user_buf,
len += snprintf(buf+len, sizeof(buf)-len,
"AR5K_PHY_ANT_SWITCH_TABLE_1\t0x%08x\n", v);

if (len > sizeof(buf))
len = sizeof(buf);

return simple_read_from_buffer(user_buf, count, ppos, buf, len);
}

Expand Down Expand Up @@ -542,6 +551,9 @@ static ssize_t read_file_frameerrors(struct file *file, char __user *user_buf,
len += snprintf(buf+len, sizeof(buf)-len, "[TX all\t%d]\n",
st->tx_all_count);

if (len > sizeof(buf))
len = sizeof(buf);

return simple_read_from_buffer(user_buf, count, ppos, buf, len);
}

Expand Down Expand Up @@ -681,6 +693,9 @@ static ssize_t read_file_ani(struct file *file, char __user *user_buf,
ATH5K_ANI_CCK_TRIG_HIGH - (ATH5K_PHYERR_CNT_MAX -
ath5k_hw_reg_read(sc->ah, AR5K_PHYERR_CNT2)));

if (len > sizeof(buf))
len = sizeof(buf);

return simple_read_from_buffer(user_buf, count, ppos, buf, len);
}

Expand Down Expand Up @@ -766,6 +781,9 @@ static ssize_t read_file_queue(struct file *file, char __user *user_buf,
len += snprintf(buf+len, sizeof(buf)-len, " len: %d\n", n);
}

if (len > sizeof(buf))
len = sizeof(buf);

return simple_read_from_buffer(user_buf, count, ppos, buf, len);
}

Expand Down

0 comments on commit 965e6ba

Please sign in to comment.