aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorFry, Donald H <donald.h.fry@intel.com>2011-07-08 11:46:19 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-11 15:02:05 -0400
commit70e3e8a6e831bf58a7eb98187c186221f01d5b64 (patch)
tree0be77a7e692108b009896736058e2224d628cd17 /drivers
parente4c598b7ce36f4416f7672617265bc1fa92e5a5f (diff)
iwlagn: remove indirection for eeprom_query_addr
Not needed since the driver split. Eliminate redundant routine. Signed-off-by: Don Fry <donald.h.fry@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-1000.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-2000.c1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-lib.c3
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.c5
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h1
9 files changed, 4 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-1000.c b/drivers/net/wireless/iwlwifi/iwl-1000.c
index 5be27672eb90..a558df953dfd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-1000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-1000.c
@@ -182,7 +182,6 @@ static struct iwl_lib_ops iwl1000_lib = {
182 EEPROM_REG_BAND_24_HT40_CHANNELS, 182 EEPROM_REG_BAND_24_HT40_CHANNELS,
183 EEPROM_REGULATORY_BAND_NO_HT40, 183 EEPROM_REGULATORY_BAND_NO_HT40,
184 }, 184 },
185 .query_addr = iwlagn_eeprom_query_addr,
186 }, 185 },
187 .temp_ops = { 186 .temp_ops = {
188 .temperature = iwlagn_temperature, 187 .temperature = iwlagn_temperature,
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index 2580dc36f475..28559941d26e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -182,7 +182,6 @@ static struct iwl_lib_ops iwl2000_lib = {
182 EEPROM_6000_REG_BAND_24_HT40_CHANNELS, 182 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
183 EEPROM_REGULATORY_BAND_NO_HT40, 183 EEPROM_REGULATORY_BAND_NO_HT40,
184 }, 184 },
185 .query_addr = iwlagn_eeprom_query_addr,
186 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, 185 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
187 }, 186 },
188 .temp_ops = { 187 .temp_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 1d9bae376d27..55972cfc47ab 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -335,7 +335,6 @@ static struct iwl_lib_ops iwl5000_lib = {
335 EEPROM_REG_BAND_24_HT40_CHANNELS, 335 EEPROM_REG_BAND_24_HT40_CHANNELS,
336 EEPROM_REG_BAND_52_HT40_CHANNELS 336 EEPROM_REG_BAND_52_HT40_CHANNELS
337 }, 337 },
338 .query_addr = iwlagn_eeprom_query_addr,
339 }, 338 },
340 .temp_ops = { 339 .temp_ops = {
341 .temperature = iwlagn_temperature, 340 .temperature = iwlagn_temperature,
@@ -359,7 +358,6 @@ static struct iwl_lib_ops iwl5150_lib = {
359 EEPROM_REG_BAND_24_HT40_CHANNELS, 358 EEPROM_REG_BAND_24_HT40_CHANNELS,
360 EEPROM_REG_BAND_52_HT40_CHANNELS 359 EEPROM_REG_BAND_52_HT40_CHANNELS
361 }, 360 },
362 .query_addr = iwlagn_eeprom_query_addr,
363 }, 361 },
364 .temp_ops = { 362 .temp_ops = {
365 .temperature = iwl5150_temperature, 363 .temperature = iwl5150_temperature,
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 73ea73eafc55..17dc33775186 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -275,7 +275,6 @@ static struct iwl_lib_ops iwl6000_lib = {
275 EEPROM_6000_REG_BAND_24_HT40_CHANNELS, 275 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
276 EEPROM_REG_BAND_52_HT40_CHANNELS 276 EEPROM_REG_BAND_52_HT40_CHANNELS
277 }, 277 },
278 .query_addr = iwlagn_eeprom_query_addr,
279 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, 278 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
280 }, 279 },
281 .temp_ops = { 280 .temp_ops = {
@@ -301,7 +300,6 @@ static struct iwl_lib_ops iwl6030_lib = {
301 EEPROM_6000_REG_BAND_24_HT40_CHANNELS, 300 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
302 EEPROM_REG_BAND_52_HT40_CHANNELS 301 EEPROM_REG_BAND_52_HT40_CHANNELS
303 }, 302 },
304 .query_addr = iwlagn_eeprom_query_addr,
305 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower, 303 .update_enhanced_txpower = iwlcore_eeprom_enhanced_txpower,
306 }, 304 },
307 .temp_ops = { 305 .temp_ops = {
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
index 7745816eaff4..b8347db850e7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-eeprom.c
@@ -150,7 +150,7 @@ int iwl_eeprom_check_sku(struct iwl_priv *priv)
150 150
151void iwl_eeprom_get_mac(const struct iwl_priv *priv, u8 *mac) 151void iwl_eeprom_get_mac(const struct iwl_priv *priv, u8 *mac)
152{ 152{
153 const u8 *addr = priv->cfg->ops->lib->eeprom_ops.query_addr(priv, 153 const u8 *addr = iwl_eeprom_query_addr(priv,
154 EEPROM_MAC_ADDRESS); 154 EEPROM_MAC_ADDRESS);
155 memcpy(mac, addr, ETH_ALEN); 155 memcpy(mac, addr, ETH_ALEN);
156} 156}
@@ -245,10 +245,10 @@ void iwlcore_eeprom_enhanced_txpower(struct iwl_priv *priv)
245 BUILD_BUG_ON(sizeof(struct iwl_eeprom_enhanced_txpwr) != 8); 245 BUILD_BUG_ON(sizeof(struct iwl_eeprom_enhanced_txpwr) != 8);
246 246
247 /* the length is in 16-bit words, but we want entries */ 247 /* the length is in 16-bit words, but we want entries */
248 txp_len = (__le16 *) iwlagn_eeprom_query_addr(priv, EEPROM_TXP_SZ_OFFS); 248 txp_len = (__le16 *) iwl_eeprom_query_addr(priv, EEPROM_TXP_SZ_OFFS);
249 entries = le16_to_cpup(txp_len) * 2 / EEPROM_TXP_ENTRY_LEN; 249 entries = le16_to_cpup(txp_len) * 2 / EEPROM_TXP_ENTRY_LEN;
250 250
251 txp_array = (void *) iwlagn_eeprom_query_addr(priv, EEPROM_TXP_OFFS); 251 txp_array = (void *) iwl_eeprom_query_addr(priv, EEPROM_TXP_OFFS);
252 252
253 for (idx = 0; idx < entries; idx++) { 253 for (idx = 0; idx < entries; idx++) {
254 txp = &txp_array[idx]; 254 txp = &txp_array[idx];
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
index f787ef5c9d4d..94f6d6068661 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-lib.c
@@ -611,8 +611,7 @@ static u32 eeprom_indirect_address(const struct iwl_priv *priv, u32 address)
611 return (address & ADDRESS_MSK) + (offset << 1); 611 return (address & ADDRESS_MSK) + (offset << 1);
612} 612}
613 613
614const u8 *iwlagn_eeprom_query_addr(const struct iwl_priv *priv, 614const u8 *iwl_eeprom_query_addr(const struct iwl_priv *priv, size_t offset)
615 size_t offset)
616{ 615{
617 u32 address = eeprom_indirect_address(priv, offset); 616 u32 address = eeprom_indirect_address(priv, offset);
618 BUG_ON(address >= priv->cfg->base_params->eeprom_size); 617 BUG_ON(address >= priv->cfg->base_params->eeprom_size);
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index ff0b2ed71237..bde03b4f3864 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -180,8 +180,6 @@ int iwlagn_hw_valid_rtc_data_addr(u32 addr);
180int iwlagn_send_tx_power(struct iwl_priv *priv); 180int iwlagn_send_tx_power(struct iwl_priv *priv);
181void iwlagn_temperature(struct iwl_priv *priv); 181void iwlagn_temperature(struct iwl_priv *priv);
182u16 iwlagn_eeprom_calib_version(struct iwl_priv *priv); 182u16 iwlagn_eeprom_calib_version(struct iwl_priv *priv);
183const u8 *iwlagn_eeprom_query_addr(const struct iwl_priv *priv,
184 size_t offset);
185int iwlagn_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq); 183int iwlagn_rx_init(struct iwl_priv *priv, struct iwl_rx_queue *rxq);
186int iwlagn_hw_nic_init(struct iwl_priv *priv); 184int iwlagn_hw_nic_init(struct iwl_priv *priv);
187int iwlagn_wait_tx_queue_empty(struct iwl_priv *priv); 185int iwlagn_wait_tx_queue_empty(struct iwl_priv *priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
index eab2834fc0c6..eee97bcf9802 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
@@ -407,11 +407,6 @@ static int iwl_find_otp_image(struct iwl_priv *priv,
407 return -EINVAL; 407 return -EINVAL;
408} 408}
409 409
410const u8 *iwl_eeprom_query_addr(const struct iwl_priv *priv, size_t offset)
411{
412 return priv->cfg->ops->lib->eeprom_ops.query_addr(priv, offset);
413}
414
415u16 iwl_eeprom_query16(const struct iwl_priv *priv, size_t offset) 410u16 iwl_eeprom_query16(const struct iwl_priv *priv, size_t offset)
416{ 411{
417 if (!priv->eeprom) 412 if (!priv->eeprom)
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index 804f910c651e..e4bf8ac5e64e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -292,7 +292,6 @@ extern const u8 iwl_eeprom_band_1[14];
292 292
293struct iwl_eeprom_ops { 293struct iwl_eeprom_ops {
294 const u32 regulatory_bands[7]; 294 const u32 regulatory_bands[7];
295 const u8* (*query_addr) (const struct iwl_priv *priv, size_t offset);
296 void (*update_enhanced_txpower) (struct iwl_priv *priv); 295 void (*update_enhanced_txpower) (struct iwl_priv *priv);
297}; 296};
298 297