aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorAssaf Krauss <assaf.krauss@intel.com>2008-06-30 05:23:17 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-06-30 17:37:42 -0400
commit2ff75b7877c40b1917f23cc5fafccaf3c1ab4745 (patch)
tree1b15ff798d6b54ff0c2d6861cc846e09e7aacf23 /drivers/net
parent4faeb86070c38c0df9f5a23c3f6acf5538492a33 (diff)
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')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index bfe1ad262484..0c734fd529ac 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -1063,7 +1063,6 @@ static void iwl_pass_packet_to_mac80211(struct iwl_priv *priv,
1063 return; 1063 return;
1064 } 1064 }
1065 1065
1066 stats->flag = 0;
1067 hdr = (struct ieee80211_hdr *)rxb->skb->data; 1066 hdr = (struct ieee80211_hdr *)rxb->skb->data;
1068 1067
1069 /* in case of HW accelerated crypto and bad decryption, drop */ 1068 /* in case of HW accelerated crypto and bad decryption, drop */
@@ -1197,6 +1196,7 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
1197 1196
1198 rx_status.antenna = 0; 1197 rx_status.antenna = 0;
1199 rx_status.flag = 0; 1198 rx_status.flag = 0;
1199 rx_status.flag |= RX_FLAG_TSFT;
1200 1200
1201 if ((unlikely(rx_start->cfg_phy_cnt > 20))) { 1201 if ((unlikely(rx_start->cfg_phy_cnt > 20))) {
1202 IWL_DEBUG_DROP("dsp size out of range [0,20]: %d/n", 1202 IWL_DEBUG_DROP("dsp size out of range [0,20]: %d/n",
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
3492{ 3492{
3493 struct iwl_priv *priv = hw->priv; 3493 struct iwl_priv *priv = hw->priv;
3494 unsigned long flags; 3494 unsigned long flags;
3495 __le64 timestamp;
3495 3496
3496 mutex_lock(&priv->mutex); 3497 mutex_lock(&priv->mutex);
3497 IWL_DEBUG_MAC80211("enter\n"); 3498 IWL_DEBUG_MAC80211("enter\n");
@@ -3516,6 +3517,8 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk
3516 priv->ibss_beacon = skb; 3517 priv->ibss_beacon = skb;
3517 3518
3518 priv->assoc_id = 0; 3519 priv->assoc_id = 0;
3520 timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp;
3521 priv->timestamp = le64_to_cpu(timestamp) + (priv->beacon_int * 1000);
3519 3522
3520 IWL_DEBUG_MAC80211("leave\n"); 3523 IWL_DEBUG_MAC80211("leave\n");
3521 spin_unlock_irqrestore(&priv->lock, flags); 3524 spin_unlock_irqrestore(&priv->lock, flags);