diff mbox series

[v2,iwlwifi-next] iwlwifi: iwl-eeprom-parse: mostly dvm only

Message ID alpine.BSF.2.00.2103101358170.72241@ai.fobar.qr
State New
Delegated to: Luca Coelho
Headers show
Series [v2,iwlwifi-next] iwlwifi: iwl-eeprom-parse: mostly dvm only | expand

Commit Message

Bjoern A. Zeeb March 10, 2021, 2:40 p.m. UTC
Most of iwl-eeprom-parse.c is only used for dvm but not for mvm.
Hide the parts under #if IS_ENABLED(CONFIG_IWLDVM) to reduce size
and code surface for mvm-only builds.

Sponsored by:  The FreeBSD Foundation
Signed-off-by: Bjoern A. Zeeb <bz@FreeBSD.ORG>
---
changes since v1 - reduce diff context
---
  drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c | 4 ++++
  1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
index f12b86563728..d7a7835b935c 100644
--- a/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
+++ b/drivers/net/wireless/intel/iwlwifi/iwl-eeprom-parse.c
@@ -10,6 +10,7 @@ 
  #include "iwl-modparams.h"
  #include "iwl-eeprom-parse.h"

+#if IS_ENABLED(CONFIG_IWLDVM)
  /* EEPROM offset definitions */

  /* indirect access definitions */
@@ -647,6 +648,7 @@  static int iwl_init_channel_map(struct device *dev, const struct iwl_cfg *cfg,

  	return n_channels;
  }
+#endif

  int iwl_init_sband_channels(struct iwl_nvm_data *data,
  			    struct ieee80211_supported_band *sband,
@@ -750,6 +752,7 @@  void iwl_init_ht_hw_capab(struct iwl_trans *trans,
  	}
  }

+#if IS_ENABLED(CONFIG_IWLDVM)
  static void iwl_init_sbands(struct iwl_trans *trans, const struct iwl_cfg *cfg,
  			    struct iwl_nvm_data *data,
  			    const u8 *eeprom, size_t eeprom_size)
@@ -873,3 +876,4 @@  iwl_parse_eeprom_data(struct iwl_trans *trans, const struct iwl_cfg *cfg,
  	return NULL;
  }
  IWL_EXPORT_SYMBOL(iwl_parse_eeprom_data);
+#endif