mac80211_hwsim: fixup for tsf setting
authorJavier Cardona <javier@cozybit.com>
Thu, 12 Apr 2012 21:32:21 +0000 (14:32 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 16 Apr 2012 18:19:29 +0000 (14:19 -0400)
Last patch I sent failed to take into account the offset of each phy.

Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mac80211_hwsim.c

index 2d2bfce24fc17633b6d3be370f7211bb0f94a9cb..3edd473d8acdda616333f5880ff75fb59e3e9bfd 100644 (file)
@@ -694,6 +694,7 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
                    ieee80211_is_probe_resp(mgmt->frame_control))
                        mgmt->u.beacon.timestamp = cpu_to_le64(
                                rx_status.mactime +
+                               (data->tsf_offset - data2->tsf_offset) +
                                24 * 8 * 10 / txrate->bitrate);
 
                memcpy(IEEE80211_SKB_RXCB(nskb), &rx_status, sizeof(rx_status));