aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.c7
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c14
-rw-r--r--drivers/net/wireless/iwlwifi/iwl4965-base.c6
6 files changed, 20 insertions, 23 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 76c4ed1135f2..4fdeb5323248 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -2369,18 +2369,4 @@ struct pci_device_id iwl3945_hw_card_ids[] = {
2369 {0} 2369 {0}
2370}; 2370};
2371 2371
2372/*
2373 * Clear the OWNER_MSK, to establish driver (instead of uCode running on
2374 * embedded controller) as EEPROM reader; each read is a series of pulses
2375 * to/from the EEPROM chip, not a single event, so even reads could conflict
2376 * if they weren't arbitrated by some ownership mechanism. Here, the driver
2377 * simply claims ownership, which should be safe when this function is called
2378 * (i.e. before loading uCode!).
2379 */
2380inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv)
2381{
2382 _iwl3945_clear_bit(priv, CSR_EEPROM_GP, CSR_EEPROM_GP_IF_OWNER_MSK);
2383 return 0;
2384}
2385
2386MODULE_DEVICE_TABLE(pci, iwl3945_hw_card_ids); 2372MODULE_DEVICE_TABLE(pci, iwl3945_hw_card_ids);
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index 20b925f57e35..4b07db9cd407 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -671,7 +671,6 @@ extern int iwl3945_hw_channel_switch(struct iwl3945_priv *priv, u16 channel);
671/* 671/*
672 * Forward declare iwl-3945.c functions for iwl-base.c 672 * Forward declare iwl-3945.c functions for iwl-base.c
673 */ 673 */
674extern int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv);
675extern __le32 iwl3945_get_antenna_flags(const struct iwl3945_priv *priv); 674extern __le32 iwl3945_get_antenna_flags(const struct iwl3945_priv *priv);
676extern int iwl3945_init_hw_rate_table(struct iwl3945_priv *priv); 675extern int iwl3945_init_hw_rate_table(struct iwl3945_priv *priv);
677extern void iwl3945_reg_txpower_periodic(struct iwl3945_priv *priv); 676extern void iwl3945_reg_txpower_periodic(struct iwl3945_priv *priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c
index 04db34ba814b..569347ff377b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.c
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.c
@@ -4961,11 +4961,4 @@ int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv)
4961 return rc; 4961 return rc;
4962} 4962}
4963 4963
4964inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv)
4965{
4966 iwl4965_clear_bit(priv, CSR_HW_IF_CONFIG_REG,
4967 CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM);
4968}
4969
4970
4971MODULE_DEVICE_TABLE(pci, iwl4965_hw_card_ids); 4964MODULE_DEVICE_TABLE(pci, iwl4965_hw_card_ids);
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index 78bc148c9f7f..9cb82be0ff80 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -750,7 +750,6 @@ struct iwl4965_priv;
750 * Forward declare iwl-4965.c functions for iwl-base.c 750 * Forward declare iwl-4965.c functions for iwl-base.c
751 */ 751 */
752extern int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv); 752extern int iwl4965_eeprom_acquire_semaphore(struct iwl4965_priv *priv);
753extern void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv);
754 753
755extern int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv, 754extern int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv,
756 struct iwl4965_tx_queue *txq, 755 struct iwl4965_tx_queue *txq,
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index f96a1a2e90f4..8cef48c9d748 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1557,6 +1557,20 @@ static void get_eeprom_mac(struct iwl3945_priv *priv, u8 *mac)
1557 memcpy(mac, priv->eeprom.mac_address, 6); 1557 memcpy(mac, priv->eeprom.mac_address, 6);
1558} 1558}
1559 1559
1560/*
1561 * Clear the OWNER_MSK, to establish driver (instead of uCode running on
1562 * embedded controller) as EEPROM reader; each read is a series of pulses
1563 * to/from the EEPROM chip, not a single event, so even reads could conflict
1564 * if they weren't arbitrated by some ownership mechanism. Here, the driver
1565 * simply claims ownership, which should be safe when this function is called
1566 * (i.e. before loading uCode!).
1567 */
1568static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv)
1569{
1570 _iwl3945_clear_bit(priv, CSR_EEPROM_GP, CSR_EEPROM_GP_IF_OWNER_MSK);
1571 return 0;
1572}
1573
1560/** 1574/**
1561 * iwl3945_eeprom_init - read EEPROM contents 1575 * iwl3945_eeprom_init - read EEPROM contents
1562 * 1576 *
diff --git a/drivers/net/wireless/iwlwifi/iwl4965-base.c b/drivers/net/wireless/iwlwifi/iwl4965-base.c
index 77c635287035..c856835b1f20 100644
--- a/drivers/net/wireless/iwlwifi/iwl4965-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl4965-base.c
@@ -1639,6 +1639,12 @@ static void get_eeprom_mac(struct iwl4965_priv *priv, u8 *mac)
1639 memcpy(mac, priv->eeprom.mac_address, 6); 1639 memcpy(mac, priv->eeprom.mac_address, 6);
1640} 1640}
1641 1641
1642static inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv)
1643{
1644 iwl4965_clear_bit(priv, CSR_HW_IF_CONFIG_REG,
1645 CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM);
1646}
1647
1642/** 1648/**
1643 * iwl4965_eeprom_init - read EEPROM contents 1649 * iwl4965_eeprom_init - read EEPROM contents
1644 * 1650 *