Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 300689
b: refs/heads/master
c: 9bdd3a6
h: refs/heads/master
i:
  300687: 49ec35f
v: v3
  • Loading branch information
Javier Cardona authored and John W. Linville committed Apr 10, 2012
1 parent c6ea76b commit 08376c7
Show file tree
Hide file tree
Showing 2 changed files with 13 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: f483ad25c397bc2b33542fe245ea99c22c8a750c
refs/heads/master: 9bdd3a6bf8513a0a9eda031d15b36e4677854243
12 changes: 12 additions & 0 deletions trunk/net/mac80211/debugfs_netdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -424,16 +424,28 @@ static ssize_t ieee80211_if_parse_tsf(
struct ieee80211_local *local = sdata->local;
unsigned long long tsf;
int ret;
int tsf_is_delta = 0;

if (strncmp(buf, "reset", 5) == 0) {
if (local->ops->reset_tsf) {
drv_reset_tsf(local, sdata);
wiphy_info(local->hw.wiphy, "debugfs reset TSF\n");
}
} else {
if (buflen > 10 && buf[1] == '=') {
if (buf[0] == '+')
tsf_is_delta = 1;
else if (buf[0] == '-')
tsf_is_delta = -1;
else
return -EINVAL;
buf += 2;
}
ret = kstrtoull(buf, 10, &tsf);
if (ret < 0)
return -EINVAL;
if (tsf_is_delta)
tsf = drv_get_tsf(local, sdata) + tsf_is_delta * tsf;
if (local->ops->set_tsf) {
drv_set_tsf(local, sdata, tsf);
wiphy_info(local->hw.wiphy,
Expand Down

0 comments on commit 08376c7

Please sign in to comment.