Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351847
b: refs/heads/master
c: 45034bf
h: refs/heads/master
i:
  351845: 95fea22
  351843: 557de26
  351839: 773f441
v: v3
  • Loading branch information
Thomas Pedersen authored and Johannes Berg committed Jan 4, 2013
1 parent c509c8b commit 49a1c4c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 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: 75ea719cb4773b05cc48e741feb4e267522b9656
refs/heads/master: 45034bfb8c9ecc62db40b438bea7fe728ac8facf
9 changes: 5 additions & 4 deletions trunk/drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ struct mac80211_hwsim_data {
int power_level;

/* difference between this hw's clock and the real clock, in usecs */
u64 tsf_offset;
s64 tsf_offset;
};


Expand Down Expand Up @@ -427,9 +427,10 @@ static void mac80211_hwsim_set_tsf(struct ieee80211_hw *hw,
struct ieee80211_vif *vif, u64 tsf)
{
struct mac80211_hwsim_data *data = hw->priv;
struct timeval tv = ktime_to_timeval(ktime_get_real());
u64 now = tv.tv_sec * USEC_PER_SEC + tv.tv_usec;
data->tsf_offset = tsf - now;
u64 now = mac80211_hwsim_get_tsf(hw, vif);
s64 delta = tsf - now;

data->tsf_offset += delta;
}

static void mac80211_hwsim_monitor_rx(struct ieee80211_hw *hw,
Expand Down

0 comments on commit 49a1c4c

Please sign in to comment.