diff options
Diffstat (limited to 'net/mac80211/ibss.c')
-rw-r--r-- | net/mac80211/ibss.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index c87caad383f0..a8e23232267e 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <asm/unaligned.h> | 22 | #include <asm/unaligned.h> |
23 | 23 | ||
24 | #include "ieee80211_i.h" | 24 | #include "ieee80211_i.h" |
25 | #include "driver-ops.h" | ||
25 | #include "rate.h" | 26 | #include "rate.h" |
26 | 27 | ||
27 | #define IEEE80211_SCAN_INTERVAL (2 * HZ) | 28 | #define IEEE80211_SCAN_INTERVAL (2 * HZ) |
@@ -75,10 +76,9 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata, | |||
75 | struct ieee80211_supported_band *sband; | 76 | struct ieee80211_supported_band *sband; |
76 | u32 bss_change; | 77 | u32 bss_change; |
77 | 78 | ||
78 | if (local->ops->reset_tsf) { | 79 | |
79 | /* Reset own TSF to allow time synchronization work. */ | 80 | /* Reset own TSF to allow time synchronization work. */ |
80 | local->ops->reset_tsf(local_to_hw(local)); | 81 | drv_reset_tsf(local); |
81 | } | ||
82 | 82 | ||
83 | skb = ifibss->skb; | 83 | skb = ifibss->skb; |
84 | rcu_assign_pointer(ifibss->presp, NULL); | 84 | rcu_assign_pointer(ifibss->presp, NULL); |
@@ -315,12 +315,13 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata, | |||
315 | bitrates[rx_status->rate_idx].bitrate; | 315 | bitrates[rx_status->rate_idx].bitrate; |
316 | 316 | ||
317 | rx_timestamp = rx_status->mactime + (24 * 8 * 10 / rate); | 317 | rx_timestamp = rx_status->mactime + (24 * 8 * 10 / rate); |
318 | } else if (local && local->ops && local->ops->get_tsf) | 318 | } else { |
319 | /* second best option: get current TSF */ | 319 | /* |
320 | rx_timestamp = local->ops->get_tsf(local_to_hw(local)); | 320 | * second best option: get current TSF |
321 | else | 321 | * (will return -1 if not supported) |
322 | /* can't merge without knowing the TSF */ | 322 | */ |
323 | rx_timestamp = -1LLU; | 323 | rx_timestamp = drv_get_tsf(local); |
324 | } | ||
324 | 325 | ||
325 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 326 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
326 | printk(KERN_DEBUG "RX beacon SA=%pM BSSID=" | 327 | printk(KERN_DEBUG "RX beacon SA=%pM BSSID=" |
@@ -591,10 +592,7 @@ static void ieee80211_rx_mgmt_probe_req(struct ieee80211_sub_if_data *sdata, | |||
591 | len < 24 + 2 || !ifibss->presp) | 592 | len < 24 + 2 || !ifibss->presp) |
592 | return; | 593 | return; |
593 | 594 | ||
594 | if (local->ops->tx_last_beacon) | 595 | tx_last_beacon = drv_tx_last_beacon(local); |
595 | tx_last_beacon = local->ops->tx_last_beacon(local_to_hw(local)); | ||
596 | else | ||
597 | tx_last_beacon = 1; | ||
598 | 596 | ||
599 | #ifdef CONFIG_MAC80211_IBSS_DEBUG | 597 | #ifdef CONFIG_MAC80211_IBSS_DEBUG |
600 | printk(KERN_DEBUG "%s: RX ProbeReq SA=%pM DA=%pM BSSID=%pM" | 598 | printk(KERN_DEBUG "%s: RX ProbeReq SA=%pM DA=%pM BSSID=%pM" |