Skip to content

Commit

Permalink
mac80211_hwsim: Fix set mactime on receiver hwsim radio
Browse files Browse the repository at this point in the history
The patch "mac80211_hwsim:  Add tsf to beacons, probe responses and radiotap
header" was setting the mactime on wrong hwsim radio. This patch fixes it.

Signed-off-by: Ashok Nagarajan <ashok@cozybit.com>
Signed-off-by: Javier Cardona <javier@cozybit.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Ashok Nagarajan authored and John W. Linville committed Mar 12, 2012
1 parent aa45458 commit 4e13f09
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,6 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
}

memset(&rx_status, 0, sizeof(rx_status));
rx_status.mactime = le64_to_cpu(__mac80211_hwsim_get_tsf(data));
rx_status.flag |= RX_FLAG_MACTIME_MPDU;
rx_status.freq = data->channel->center_freq;
rx_status.band = data->channel->band;
Expand Down Expand Up @@ -684,6 +683,8 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,

if (mac80211_hwsim_addr_match(data2, hdr->addr1))
ack = true;
rx_status.mactime =
le64_to_cpu(__mac80211_hwsim_get_tsf(data2));
memcpy(IEEE80211_SKB_RXCB(nskb), &rx_status, sizeof(rx_status));
ieee80211_rx_irqsafe(data2->hw, nskb);
}
Expand Down

0 comments on commit 4e13f09

Please sign in to comment.