iwlwifi: move symbols into a separate namespace
authorJohannes Berg <johannes.berg@intel.com>
Sun, 30 Jan 2022 09:53:00 +0000 (11:53 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 18 Feb 2022 08:40:52 +0000 (10:40 +0200)
Nobody other than iwlwifi itself should be accessing the symbols
that it exports, so make that clear by moving them into a separate
new namespace ("IWLWIFI").

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20220130115024.67eba0b9867d.I6291815892746956c36489081f24f4f95b5160e4@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/dvm/main.c
drivers/net/wireless/intel/iwlwifi/iwl-drv.h
drivers/net/wireless/intel/iwlwifi/mvm/ops.c

index 90b9becd1673716167f308772b9f7a9d01d100a2..caf452922dbdc051a01a1af9f1d379100dc84286 100644 (file)
@@ -48,6 +48,7 @@
 #define DRV_DESCRIPTION        "Intel(R) Wireless WiFi Link AGN driver for Linux"
 MODULE_DESCRIPTION(DRV_DESCRIPTION);
 MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS(IWLWIFI);
 
 /* Please keep this array *SORTED* by hex value.
  * Access is done through binary search.
index 0fd009e6d6857f5939e73356c9f73a46001fe4d5..80073f973334fc7a0014c506b0ceba7c79b761ca 100644 (file)
@@ -84,7 +84,7 @@ void iwl_drv_stop(struct iwl_drv *drv);
  * everything is built-in, then we can avoid that.
  */
 #ifdef CONFIG_IWLWIFI_OPMODE_MODULAR
-#define IWL_EXPORT_SYMBOL(sym) EXPORT_SYMBOL_GPL(sym)
+#define IWL_EXPORT_SYMBOL(sym) EXPORT_SYMBOL_NS_GPL(sym, IWLWIFI)
 #else
 #define IWL_EXPORT_SYMBOL(sym)
 #endif
index a4c1fdf33b7694abca78cd76fa92470aea36955f..7c6e412af502baabec9962b46cf17aef03db4625 100644 (file)
@@ -32,6 +32,7 @@
 #define DRV_DESCRIPTION        "The new Intel(R) wireless AGN driver for Linux"
 MODULE_DESCRIPTION(DRV_DESCRIPTION);
 MODULE_LICENSE("GPL");
+MODULE_IMPORT_NS(IWLWIFI);
 
 static const struct iwl_op_mode_ops iwl_mvm_ops;
 static const struct iwl_op_mode_ops iwl_mvm_ops_mq;