aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAshok Nagarajan <ashok@cozybit.com>2012-03-08 12:27:34 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-12 14:19:35 -0400
commit4e13f092f755df5ed8169c8d8bfb952dc057e1aa (patch)
treee66d7eab1a60694acc5deee422e002479135f616
parentaa4545806025c63ec12cfe17528de16dca36b785 (diff)
mac80211_hwsim: Fix set mactime on receiver hwsim radio
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>
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index b4f6cb3298a4..b7ce6a6e355f 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -639,7 +639,6 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
639 } 639 }
640 640
641 memset(&rx_status, 0, sizeof(rx_status)); 641 memset(&rx_status, 0, sizeof(rx_status));
642 rx_status.mactime = le64_to_cpu(__mac80211_hwsim_get_tsf(data));
643 rx_status.flag |= RX_FLAG_MACTIME_MPDU; 642 rx_status.flag |= RX_FLAG_MACTIME_MPDU;
644 rx_status.freq = data->channel->center_freq; 643 rx_status.freq = data->channel->center_freq;
645 rx_status.band = data->channel->band; 644 rx_status.band = data->channel->band;
@@ -684,6 +683,8 @@ static bool mac80211_hwsim_tx_frame_no_nl(struct ieee80211_hw *hw,
684 683
685 if (mac80211_hwsim_addr_match(data2, hdr->addr1)) 684 if (mac80211_hwsim_addr_match(data2, hdr->addr1))
686 ack = true; 685 ack = true;
686 rx_status.mactime =
687 le64_to_cpu(__mac80211_hwsim_get_tsf(data2));
687 memcpy(IEEE80211_SKB_RXCB(nskb), &rx_status, sizeof(rx_status)); 688 memcpy(IEEE80211_SKB_RXCB(nskb), &rx_status, sizeof(rx_status));
688 ieee80211_rx_irqsafe(data2->hw, nskb); 689 ieee80211_rx_irqsafe(data2->hw, nskb);
689 } 690 }