aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-07 12:52:20 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-08 13:59:49 -0500
commit51dc51d12bd609644bbe9877825a1a25a6016639 (patch)
tree8e379a6792d67d701a906edc3f87efba07b4e353 /drivers
parenta75a79a84ffd7fea9e10f327d1e2f2fa25770375 (diff)
iwlwifi: make EEPROM enhanced TX power a bool
There's no need to carry around the function pointer when a boolean indicating that the EEPROM stores enhanced TX power information is sufficient. Signed-off-by: Johannes Berg <johannes.berg@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-2000.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-6000.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.h1
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.h2
5 files changed, 8 insertions, 9 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-2000.c b/drivers/net/wireless/iwlwifi/iwl-2000.c
index d6ba8419c94..14ce83bc71a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-2000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-2000.c
@@ -149,7 +149,7 @@ static struct iwl_lib_ops iwl2000_lib = {
149 EEPROM_6000_REG_BAND_24_HT40_CHANNELS, 149 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
150 EEPROM_REGULATORY_BAND_NO_HT40, 150 EEPROM_REGULATORY_BAND_NO_HT40,
151 }, 151 },
152 .update_enhanced_txpower = iwl_eeprom_enhanced_txpower, 152 .enhanced_txpower = true,
153 }, 153 },
154 .temperature = iwlagn_temperature, 154 .temperature = iwlagn_temperature,
155}; 155};
@@ -167,7 +167,7 @@ static struct iwl_lib_ops iwl2030_lib = {
167 EEPROM_6000_REG_BAND_24_HT40_CHANNELS, 167 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
168 EEPROM_REGULATORY_BAND_NO_HT40, 168 EEPROM_REGULATORY_BAND_NO_HT40,
169 }, 169 },
170 .update_enhanced_txpower = iwl_eeprom_enhanced_txpower, 170 .enhanced_txpower = true,
171 }, 171 },
172 .temperature = iwlagn_temperature, 172 .temperature = iwlagn_temperature,
173}; 173};
diff --git a/drivers/net/wireless/iwlwifi/iwl-6000.c b/drivers/net/wireless/iwlwifi/iwl-6000.c
index 904c50af92f..0f89e45da1a 100644
--- a/drivers/net/wireless/iwlwifi/iwl-6000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-6000.c
@@ -245,7 +245,7 @@ static struct iwl_lib_ops iwl6000_lib = {
245 EEPROM_6000_REG_BAND_24_HT40_CHANNELS, 245 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
246 EEPROM_REG_BAND_52_HT40_CHANNELS 246 EEPROM_REG_BAND_52_HT40_CHANNELS
247 }, 247 },
248 .update_enhanced_txpower = iwl_eeprom_enhanced_txpower, 248 .enhanced_txpower = true,
249 }, 249 },
250 .temperature = iwlagn_temperature, 250 .temperature = iwlagn_temperature,
251}; 251};
@@ -264,7 +264,7 @@ static struct iwl_lib_ops iwl6030_lib = {
264 EEPROM_6000_REG_BAND_24_HT40_CHANNELS, 264 EEPROM_6000_REG_BAND_24_HT40_CHANNELS,
265 EEPROM_REG_BAND_52_HT40_CHANNELS 265 EEPROM_REG_BAND_52_HT40_CHANNELS
266 }, 266 },
267 .update_enhanced_txpower = iwl_eeprom_enhanced_txpower, 267 .enhanced_txpower = true,
268 }, 268 },
269 .temperature = iwlagn_temperature, 269 .temperature = iwlagn_temperature,
270}; 270};
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.h b/drivers/net/wireless/iwlwifi/iwl-agn.h
index b56498b796c..6345ab0f2a9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.h
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.h
@@ -305,7 +305,6 @@ static inline __le32 iwl_hw_set_rate_n_flags(u8 rate, u32 flags)
305} 305}
306 306
307/* eeprom */ 307/* eeprom */
308void iwl_eeprom_enhanced_txpower(struct iwl_priv *priv);
309void iwl_eeprom_get_mac(const struct iwl_shared *shrd, u8 *mac); 308void iwl_eeprom_get_mac(const struct iwl_shared *shrd, u8 *mac);
310 309
311extern int iwl_alive_start(struct iwl_priv *priv); 310extern int iwl_alive_start(struct iwl_priv *priv);
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
index e2d80849001..23cea42b949 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
@@ -589,7 +589,7 @@ iwl_eeprom_enh_txp_read_element(struct iwl_priv *priv,
589#define TXP_CHECK_AND_PRINT(x) ((txp->flags & IWL_EEPROM_ENH_TXP_FL_##x) \ 589#define TXP_CHECK_AND_PRINT(x) ((txp->flags & IWL_EEPROM_ENH_TXP_FL_##x) \
590 ? # x " " : "") 590 ? # x " " : "")
591 591
592void iwl_eeprom_enhanced_txpower(struct iwl_priv *priv) 592static void iwl_eeprom_enhanced_txpower(struct iwl_priv *priv)
593{ 593{
594 struct iwl_shared *shrd = priv->shrd; 594 struct iwl_shared *shrd = priv->shrd;
595 struct iwl_eeprom_enhanced_txpwr *txp_array, *txp; 595 struct iwl_eeprom_enhanced_txpwr *txp_array, *txp;
@@ -1025,8 +1025,8 @@ int iwl_init_channel_map(struct iwl_priv *priv)
1025 * driver need to process addition information 1025 * driver need to process addition information
1026 * to determine the max channel tx power limits 1026 * to determine the max channel tx power limits
1027 */ 1027 */
1028 if (cfg(priv)->lib->eeprom_ops.update_enhanced_txpower) 1028 if (cfg(priv)->lib->eeprom_ops.enhanced_txpower)
1029 cfg(priv)->lib->eeprom_ops.update_enhanced_txpower(priv); 1029 iwl_eeprom_enhanced_txpower(priv);
1030 1030
1031 return 0; 1031 return 0;
1032} 1032}
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.h b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
index 3b17056d567..e4a75834099 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.h
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.h
@@ -302,7 +302,7 @@ extern const u8 iwl_eeprom_band_1[14];
302 302
303struct iwl_eeprom_ops { 303struct iwl_eeprom_ops {
304 const u32 regulatory_bands[7]; 304 const u32 regulatory_bands[7];
305 void (*update_enhanced_txpower) (struct iwl_priv *priv); 305 bool enhanced_txpower;
306}; 306};
307 307
308 308