diff options
author | Assaf Krauss <assaf.krauss@intel.com> | 2008-06-30 17:23:17 +0800 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-06-30 17:37:42 -0400 |
commit | 2ff75b7877c40b1917f23cc5fafccaf3c1ab4745 (patch) | |
tree | 1b15ff798d6b54ff0c2d6861cc846e09e7aacf23 /drivers/net/wireless/iwlwifi/iwl4965-base.c | |
parent | 4faeb86070c38c0df9f5a23c3f6acf5538492a33 (diff) | |
download | lwn-2ff75b7877c40b1917f23cc5fafccaf3c1ab4745.tar.gz lwn-2ff75b7877c40b1917f23cc5fafccaf3c1ab4745.zip |
iwlwifi: adjust TSF in IBSS
This patch makes the driver, in IBSS mode, comply with TSF requirements
in 2 ways:
1. It notifies mac80211 of its TSF timestamp.
2. It uses the given timestamp in the beacon template to update the ucode.
Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl4965-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl4965-base.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c index 1b2d9f12a3a1..d1bf599e483f 100644 --- a/drivers/net/wireless/iwlwifi/iwl4965-base.c +++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c @@ -3492,6 +3492,7 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk { struct iwl_priv *priv = hw->priv; unsigned long flags; + __le64 timestamp; mutex_lock(&priv->mutex); IWL_DEBUG_MAC80211("enter\n"); @@ -3516,6 +3517,8 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk priv->ibss_beacon = skb; priv->assoc_id = 0; + timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; + priv->timestamp = le64_to_cpu(timestamp) + (priv->beacon_int * 1000); IWL_DEBUG_MAC80211("leave\n"); spin_unlock_irqrestore(&priv->lock, flags); |