aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2010-10-04 08:50:06 -0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2010-10-14 12:46:42 -0400
commit12e934dc602fafba946b33587c38077ebceb3698 (patch)
tree9528b8448c291c7fa91d8c68e415571c46fb9ca2 /drivers/net/wireless
parent085fbca29d7b4574c4e42189ee5789004e4beff7 (diff)
iwlwifi: rename ibss_beacon variable
Since we're also going to support AP (GO) mode, the variable isn't used for just IBSS beacons any more -- rename it to not mislead readers. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c26
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c16
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c26
4 files changed, 36 insertions, 36 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 6771c404fa73..0cc090b485a9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -317,15 +317,15 @@ static u32 iwl_fill_beacon_frame(struct iwl_priv *priv,
317 struct ieee80211_hdr *hdr, 317 struct ieee80211_hdr *hdr,
318 int left) 318 int left)
319{ 319{
320 if (!priv->ibss_beacon) 320 if (!priv->beacon_skb)
321 return 0; 321 return 0;
322 322
323 if (priv->ibss_beacon->len > left) 323 if (priv->beacon_skb->len > left)
324 return 0; 324 return 0;
325 325
326 memcpy(hdr, priv->ibss_beacon->data, priv->ibss_beacon->len); 326 memcpy(hdr, priv->beacon_skb->data, priv->beacon_skb->len);
327 327
328 return priv->ibss_beacon->len; 328 return priv->beacon_skb->len;
329} 329}
330 330
331/* Parse the beacon frame to find the TIM element and set tim_idx & tim_size */ 331/* Parse the beacon frame to find the TIM element and set tim_idx & tim_size */
@@ -653,10 +653,10 @@ static void iwl_bg_beacon_update(struct work_struct *work)
653 } 653 }
654 654
655 /* new beacon skb is allocated every time; dispose previous.*/ 655 /* new beacon skb is allocated every time; dispose previous.*/
656 if (priv->ibss_beacon) 656 if (priv->beacon_skb)
657 dev_kfree_skb(priv->ibss_beacon); 657 dev_kfree_skb(priv->beacon_skb);
658 658
659 priv->ibss_beacon = beacon; 659 priv->beacon_skb = beacon;
660 660
661 iwl_send_beacon_cmd(priv); 661 iwl_send_beacon_cmd(priv);
662 out: 662 out:
@@ -2993,9 +2993,9 @@ static void __iwl_down(struct iwl_priv *priv)
2993 exit: 2993 exit:
2994 memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp)); 2994 memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp));
2995 2995
2996 if (priv->ibss_beacon) 2996 if (priv->beacon_skb)
2997 dev_kfree_skb(priv->ibss_beacon); 2997 dev_kfree_skb(priv->beacon_skb);
2998 priv->ibss_beacon = NULL; 2998 priv->beacon_skb = NULL;
2999 2999
3000 /* clear out any free frames */ 3000 /* clear out any free frames */
3001 iwl_clear_free_frames(priv); 3001 iwl_clear_free_frames(priv);
@@ -4131,7 +4131,7 @@ static int iwl_init_drv(struct iwl_priv *priv)
4131{ 4131{
4132 int ret; 4132 int ret;
4133 4133
4134 priv->ibss_beacon = NULL; 4134 priv->beacon_skb = NULL;
4135 4135
4136 spin_lock_init(&priv->sta_lock); 4136 spin_lock_init(&priv->sta_lock);
4137 spin_lock_init(&priv->hcmd_lock); 4137 spin_lock_init(&priv->hcmd_lock);
@@ -4645,8 +4645,8 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
4645 4645
4646 iwl_free_isr_ict(priv); 4646 iwl_free_isr_ict(priv);
4647 4647
4648 if (priv->ibss_beacon) 4648 if (priv->beacon_skb)
4649 dev_kfree_skb(priv->ibss_beacon); 4649 dev_kfree_skb(priv->beacon_skb);
4650 4650
4651 ieee80211_free_hw(priv->hw); 4651 ieee80211_free_hw(priv->hw);
4652} 4652}
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 89b1827054e5..09a4d1700952 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1552,10 +1552,10 @@ static void iwlcore_beacon_update(struct ieee80211_hw *hw,
1552 1552
1553 spin_lock_irqsave(&priv->lock, flags); 1553 spin_lock_irqsave(&priv->lock, flags);
1554 1554
1555 if (priv->ibss_beacon) 1555 if (priv->beacon_skb)
1556 dev_kfree_skb(priv->ibss_beacon); 1556 dev_kfree_skb(priv->beacon_skb);
1557 1557
1558 priv->ibss_beacon = skb; 1558 priv->beacon_skb = skb;
1559 1559
1560 timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; 1560 timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp;
1561 priv->timestamp = le64_to_cpu(timestamp); 1561 priv->timestamp = le64_to_cpu(timestamp);
@@ -1610,8 +1610,8 @@ void iwl_bss_info_changed(struct ieee80211_hw *hw,
1610 } 1610 }
1611 1611
1612 if (changes & BSS_CHANGED_BEACON && vif->type == NL80211_IFTYPE_AP) { 1612 if (changes & BSS_CHANGED_BEACON && vif->type == NL80211_IFTYPE_AP) {
1613 dev_kfree_skb(priv->ibss_beacon); 1613 dev_kfree_skb(priv->beacon_skb);
1614 priv->ibss_beacon = ieee80211_beacon_get(hw, vif); 1614 priv->beacon_skb = ieee80211_beacon_get(hw, vif);
1615 } 1615 }
1616 1616
1617 if (changes & BSS_CHANGED_BEACON_INT && vif->type == NL80211_IFTYPE_AP) 1617 if (changes & BSS_CHANGED_BEACON_INT && vif->type == NL80211_IFTYPE_AP)
@@ -2060,10 +2060,10 @@ void iwl_mac_reset_tsf(struct ieee80211_hw *hw)
2060 spin_lock_irqsave(&priv->lock, flags); 2060 spin_lock_irqsave(&priv->lock, flags);
2061 2061
2062 /* new association get rid of ibss beacon skb */ 2062 /* new association get rid of ibss beacon skb */
2063 if (priv->ibss_beacon) 2063 if (priv->beacon_skb)
2064 dev_kfree_skb(priv->ibss_beacon); 2064 dev_kfree_skb(priv->beacon_skb);
2065 2065
2066 priv->ibss_beacon = NULL; 2066 priv->beacon_skb = NULL;
2067 2067
2068 priv->timestamp = 0; 2068 priv->timestamp = 0;
2069 2069
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index de43e1350ed1..70e07fa48405 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -1383,8 +1383,6 @@ struct iwl_priv {
1383 1383
1384 enum nl80211_iftype iw_mode; 1384 enum nl80211_iftype iw_mode;
1385 1385
1386 struct sk_buff *ibss_beacon;
1387
1388 /* Last Rx'd beacon timestamp */ 1386 /* Last Rx'd beacon timestamp */
1389 u64 timestamp; 1387 u64 timestamp;
1390 1388
@@ -1496,8 +1494,10 @@ struct iwl_priv {
1496 struct work_struct scan_completed; 1494 struct work_struct scan_completed;
1497 struct work_struct rx_replenish; 1495 struct work_struct rx_replenish;
1498 struct work_struct abort_scan; 1496 struct work_struct abort_scan;
1497
1499 struct work_struct beacon_update; 1498 struct work_struct beacon_update;
1500 struct iwl_rxon_context *beacon_ctx; 1499 struct iwl_rxon_context *beacon_ctx;
1500 struct sk_buff *beacon_skb;
1501 1501
1502 struct work_struct tt_work; 1502 struct work_struct tt_work;
1503 struct work_struct ct_enter; 1503 struct work_struct ct_enter;
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index 3ee3e55fa546..8f8c4b73f8b9 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -317,15 +317,15 @@ unsigned int iwl3945_fill_beacon_frame(struct iwl_priv *priv,
317 int left) 317 int left)
318{ 318{
319 319
320 if (!iwl_is_associated(priv, IWL_RXON_CTX_BSS) || !priv->ibss_beacon) 320 if (!iwl_is_associated(priv, IWL_RXON_CTX_BSS) || !priv->beacon_skb)
321 return 0; 321 return 0;
322 322
323 if (priv->ibss_beacon->len > left) 323 if (priv->beacon_skb->len > left)
324 return 0; 324 return 0;
325 325
326 memcpy(hdr, priv->ibss_beacon->data, priv->ibss_beacon->len); 326 memcpy(hdr, priv->beacon_skb->data, priv->beacon_skb->len);
327 327
328 return priv->ibss_beacon->len; 328 return priv->beacon_skb->len;
329} 329}
330 330
331static int iwl3945_send_beacon_cmd(struct iwl_priv *priv) 331static int iwl3945_send_beacon_cmd(struct iwl_priv *priv)
@@ -813,10 +813,10 @@ static void iwl3945_bg_beacon_update(struct work_struct *work)
813 813
814 mutex_lock(&priv->mutex); 814 mutex_lock(&priv->mutex);
815 /* new beacon skb is allocated every time; dispose previous.*/ 815 /* new beacon skb is allocated every time; dispose previous.*/
816 if (priv->ibss_beacon) 816 if (priv->beacon_skb)
817 dev_kfree_skb(priv->ibss_beacon); 817 dev_kfree_skb(priv->beacon_skb);
818 818
819 priv->ibss_beacon = beacon; 819 priv->beacon_skb = beacon;
820 mutex_unlock(&priv->mutex); 820 mutex_unlock(&priv->mutex);
821 821
822 iwl3945_send_beacon_cmd(priv); 822 iwl3945_send_beacon_cmd(priv);
@@ -2642,9 +2642,9 @@ static void __iwl3945_down(struct iwl_priv *priv)
2642 exit: 2642 exit:
2643 memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp)); 2643 memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp));
2644 2644
2645 if (priv->ibss_beacon) 2645 if (priv->beacon_skb)
2646 dev_kfree_skb(priv->ibss_beacon); 2646 dev_kfree_skb(priv->beacon_skb);
2647 priv->ibss_beacon = NULL; 2647 priv->beacon_skb = NULL;
2648 2648
2649 /* clear out any free frames */ 2649 /* clear out any free frames */
2650 iwl3945_clear_free_frames(priv); 2650 iwl3945_clear_free_frames(priv);
@@ -3848,7 +3848,7 @@ static int iwl3945_init_drv(struct iwl_priv *priv)
3848 struct iwl3945_eeprom *eeprom = (struct iwl3945_eeprom *)priv->eeprom; 3848 struct iwl3945_eeprom *eeprom = (struct iwl3945_eeprom *)priv->eeprom;
3849 3849
3850 priv->retry_rate = 1; 3850 priv->retry_rate = 1;
3851 priv->ibss_beacon = NULL; 3851 priv->beacon_skb = NULL;
3852 3852
3853 spin_lock_init(&priv->sta_lock); 3853 spin_lock_init(&priv->sta_lock);
3854 spin_lock_init(&priv->hcmd_lock); 3854 spin_lock_init(&priv->hcmd_lock);
@@ -4256,8 +4256,8 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
4256 iwl_free_channel_map(priv); 4256 iwl_free_channel_map(priv);
4257 iwlcore_free_geos(priv); 4257 iwlcore_free_geos(priv);
4258 kfree(priv->scan_cmd); 4258 kfree(priv->scan_cmd);
4259 if (priv->ibss_beacon) 4259 if (priv->beacon_skb)
4260 dev_kfree_skb(priv->ibss_beacon); 4260 dev_kfree_skb(priv->beacon_skb);
4261 4261
4262 ieee80211_free_hw(priv->hw); 4262 ieee80211_free_hw(priv->hw);
4263} 4263}