Commit 7c4cbb6e authored by Abhijeet Kolekar's avatar Abhijeet Kolekar Committed by John W. Linville

iwl3945: synchronize timestamp with uCode

In IBSS, TSF maintains local clock counters at each station. Network
Synchronization follows a completely distributed scheme where beacon frames
are generated. Each station maintain its own TSF timestamp, extracted from
beacon timestamps they recieved. Following patch synchronize this beacon timestamp
with uCode.
Signed-off-by: default avatarAbhijeet Kolekar <abhijeet.kolekar@intel.com>
Signed-off-by: default avatarReinette Chatre <reinette.chatre@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 39e6d225
...@@ -4305,6 +4305,7 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk ...@@ -4305,6 +4305,7 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk
{ {
struct iwl_priv *priv = hw->priv; struct iwl_priv *priv = hw->priv;
unsigned long flags; unsigned long flags;
__le64 timestamp;
IWL_DEBUG_MAC80211(priv, "enter\n"); IWL_DEBUG_MAC80211(priv, "enter\n");
...@@ -4326,6 +4327,8 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk ...@@ -4326,6 +4327,8 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk
priv->ibss_beacon = skb; priv->ibss_beacon = skb;
priv->assoc_id = 0; priv->assoc_id = 0;
timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp;
priv->timestamp = le64_to_cpu(timestamp);
IWL_DEBUG_MAC80211(priv, "leave\n"); IWL_DEBUG_MAC80211(priv, "leave\n");
spin_unlock_irqrestore(&priv->lock, flags); spin_unlock_irqrestore(&priv->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment