diff options
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/wireless/iwlwifi/Kconfig | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/Makefile | 32 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-agn.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debug.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-devtrace.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-drv.c | 112 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-io.c | 19 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-op-mode.h | 3 |
8 files changed, 172 insertions, 26 deletions
diff --git a/drivers/net/wireless/iwlwifi/Kconfig b/drivers/net/wireless/iwlwifi/Kconfig index 2463c0626438..727fbb5db9da 100644 --- a/drivers/net/wireless/iwlwifi/Kconfig +++ b/drivers/net/wireless/iwlwifi/Kconfig | |||
@@ -6,6 +6,7 @@ config IWLWIFI | |||
6 | select LEDS_CLASS | 6 | select LEDS_CLASS |
7 | select LEDS_TRIGGERS | 7 | select LEDS_TRIGGERS |
8 | select MAC80211_LEDS | 8 | select MAC80211_LEDS |
9 | select IWLDVM | ||
9 | ---help--- | 10 | ---help--- |
10 | Select to build the driver supporting the: | 11 | Select to build the driver supporting the: |
11 | 12 | ||
@@ -41,6 +42,10 @@ config IWLWIFI | |||
41 | say M here and read <file:Documentation/kbuild/modules.txt>. The | 42 | say M here and read <file:Documentation/kbuild/modules.txt>. The |
42 | module will be called iwlwifi. | 43 | module will be called iwlwifi. |
43 | 44 | ||
45 | config IWLDVM | ||
46 | tristate "Intel Wireless WiFi" | ||
47 | depends on IWLWIFI | ||
48 | |||
44 | menu "Debugging Options" | 49 | menu "Debugging Options" |
45 | depends on IWLWIFI | 50 | depends on IWLWIFI |
46 | 51 | ||
diff --git a/drivers/net/wireless/iwlwifi/Makefile b/drivers/net/wireless/iwlwifi/Makefile index d615eacbf050..f284ea850bb2 100644 --- a/drivers/net/wireless/iwlwifi/Makefile +++ b/drivers/net/wireless/iwlwifi/Makefile | |||
@@ -1,27 +1,31 @@ | |||
1 | # DVM | ||
2 | obj-$(CONFIG_IWLDVM) += iwldvm.o | ||
3 | iwldvm-objs := iwl-agn.o iwl-agn-rs.o iwl-mac80211.o | ||
4 | iwldvm-objs += iwl-ucode.o iwl-agn-tx.o | ||
5 | iwldvm-objs += iwl-agn-lib.o iwl-agn-calib.o | ||
6 | iwldvm-objs += iwl-agn-tt.o iwl-agn-sta.o iwl-agn-rx.o | ||
7 | iwldvm-objs += iwl-eeprom.o iwl-power.o | ||
8 | iwldvm-objs += iwl-scan.o iwl-led.o | ||
9 | iwldvm-objs += iwl-agn-rxon.o iwl-agn-devices.o | ||
10 | iwldvm-objs += iwl-notif-wait.o | ||
11 | |||
12 | iwldvm-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o | ||
13 | iwldvm-$(CONFIG_IWLWIFI_DEVICE_TESTMODE) += iwl-testmode.o | ||
14 | |||
15 | CFLAGS_iwl-devtrace.o := -I$(src) | ||
16 | |||
1 | # WIFI | 17 | # WIFI |
2 | obj-$(CONFIG_IWLWIFI) += iwlwifi.o | 18 | obj-$(CONFIG_IWLWIFI) += iwlwifi.o |
3 | iwlwifi-objs := iwl-agn.o iwl-agn-rs.o iwl-mac80211.o | ||
4 | iwlwifi-objs += iwl-ucode.o iwl-agn-tx.o iwl-debug.o | ||
5 | iwlwifi-objs += iwl-agn-lib.o iwl-agn-calib.o iwl-io.o | ||
6 | iwlwifi-objs += iwl-agn-tt.o iwl-agn-sta.o iwl-agn-rx.o | ||
7 | |||
8 | iwlwifi-objs += iwl-eeprom.o iwl-power.o | ||
9 | iwlwifi-objs += iwl-scan.o iwl-led.o | ||
10 | iwlwifi-objs += iwl-agn-rxon.o iwl-agn-devices.o | ||
11 | iwlwifi-objs += iwl-5000.o | 19 | iwlwifi-objs += iwl-5000.o |
12 | iwlwifi-objs += iwl-6000.o | 20 | iwlwifi-objs += iwl-6000.o |
13 | iwlwifi-objs += iwl-1000.o | 21 | iwlwifi-objs += iwl-1000.o |
14 | iwlwifi-objs += iwl-2000.o | 22 | iwlwifi-objs += iwl-2000.o |
23 | iwlwifi-objs += iwl-io.o | ||
15 | iwlwifi-objs += iwl-pci.o | 24 | iwlwifi-objs += iwl-pci.o |
16 | iwlwifi-objs += iwl-drv.o | 25 | iwlwifi-objs += iwl-drv.o |
17 | iwlwifi-objs += iwl-notif-wait.o | 26 | iwlwifi-objs += iwl-debug.o |
18 | iwlwifi-objs += iwl-trans-pcie.o iwl-trans-pcie-rx.o iwl-trans-pcie-tx.o | 27 | iwlwifi-objs += iwl-trans-pcie.o iwl-trans-pcie-rx.o iwl-trans-pcie-tx.o |
19 | 28 | ||
20 | |||
21 | iwlwifi-$(CONFIG_IWLWIFI_DEBUGFS) += iwl-debugfs.o | ||
22 | iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o | 29 | iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TRACING) += iwl-devtrace.o |
23 | iwlwifi-$(CONFIG_IWLWIFI_DEVICE_TESTMODE) += iwl-testmode.o | ||
24 | |||
25 | CFLAGS_iwl-devtrace.o := -I$(src) | ||
26 | 30 | ||
27 | ccflags-y += -D__CHECK_ENDIAN__ | 31 | ccflags-y += -D__CHECK_ENDIAN__ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index ec36e2b020b6..5149e6f72945 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -78,7 +78,6 @@ MODULE_DESCRIPTION(DRV_DESCRIPTION); | |||
78 | MODULE_VERSION(DRV_VERSION); | 78 | MODULE_VERSION(DRV_VERSION); |
79 | MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR); | 79 | MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR); |
80 | MODULE_LICENSE("GPL"); | 80 | MODULE_LICENSE("GPL"); |
81 | MODULE_ALIAS("iwlagn"); | ||
82 | 81 | ||
83 | void iwl_update_chain_flags(struct iwl_priv *priv) | 82 | void iwl_update_chain_flags(struct iwl_priv *priv) |
84 | { | 83 | { |
@@ -2344,24 +2343,25 @@ static int __init iwl_init(void) | |||
2344 | goto error_rc_register; | 2343 | goto error_rc_register; |
2345 | } | 2344 | } |
2346 | 2345 | ||
2347 | ret = iwl_pci_register_driver(); | 2346 | ret = iwl_opmode_register("iwldvm", &iwl_dvm_ops); |
2348 | if (ret) | 2347 | if (ret) { |
2349 | goto error_pci_register; | 2348 | pr_err("Unable to register op_mode: %d\n", ret); |
2349 | goto error_opmode_register; | ||
2350 | } | ||
2350 | return ret; | 2351 | return ret; |
2351 | 2352 | ||
2352 | error_pci_register: | 2353 | error_opmode_register: |
2353 | iwlagn_rate_control_unregister(); | 2354 | iwlagn_rate_control_unregister(); |
2354 | error_rc_register: | 2355 | error_rc_register: |
2355 | kmem_cache_destroy(iwl_tx_cmd_pool); | 2356 | kmem_cache_destroy(iwl_tx_cmd_pool); |
2356 | return ret; | 2357 | return ret; |
2357 | } | 2358 | } |
2359 | module_init(iwl_init); | ||
2358 | 2360 | ||
2359 | static void __exit iwl_exit(void) | 2361 | static void __exit iwl_exit(void) |
2360 | { | 2362 | { |
2361 | iwl_pci_unregister_driver(); | 2363 | iwl_opmode_deregister("iwldvm"); |
2362 | iwlagn_rate_control_unregister(); | 2364 | iwlagn_rate_control_unregister(); |
2363 | kmem_cache_destroy(iwl_tx_cmd_pool); | 2365 | kmem_cache_destroy(iwl_tx_cmd_pool); |
2364 | } | 2366 | } |
2365 | |||
2366 | module_exit(iwl_exit); | 2367 | module_exit(iwl_exit); |
2367 | module_init(iwl_init); | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-debug.c b/drivers/net/wireless/iwlwifi/iwl-debug.c index 2d1b42847b9b..0f8fcd1d4fe2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debug.c +++ b/drivers/net/wireless/iwlwifi/iwl-debug.c | |||
@@ -62,6 +62,7 @@ | |||
62 | *****************************************************************************/ | 62 | *****************************************************************************/ |
63 | 63 | ||
64 | #include <linux/interrupt.h> | 64 | #include <linux/interrupt.h> |
65 | #include <linux/export.h> | ||
65 | #include "iwl-debug.h" | 66 | #include "iwl-debug.h" |
66 | #include "iwl-devtrace.h" | 67 | #include "iwl-devtrace.h" |
67 | 68 | ||
@@ -81,8 +82,11 @@ void __iwl_ ##fn(struct device *dev, const char *fmt, ...) \ | |||
81 | } | 82 | } |
82 | 83 | ||
83 | __iwl_fn(warn) | 84 | __iwl_fn(warn) |
85 | EXPORT_SYMBOL_GPL(__iwl_warn); | ||
84 | __iwl_fn(info) | 86 | __iwl_fn(info) |
87 | EXPORT_SYMBOL_GPL(__iwl_info); | ||
85 | __iwl_fn(crit) | 88 | __iwl_fn(crit) |
89 | EXPORT_SYMBOL_GPL(__iwl_crit); | ||
86 | 90 | ||
87 | void __iwl_err(struct device *dev, bool rfkill_prefix, bool trace_only, | 91 | void __iwl_err(struct device *dev, bool rfkill_prefix, bool trace_only, |
88 | const char *fmt, ...) | 92 | const char *fmt, ...) |
@@ -103,6 +107,7 @@ void __iwl_err(struct device *dev, bool rfkill_prefix, bool trace_only, | |||
103 | trace_iwlwifi_err(&vaf); | 107 | trace_iwlwifi_err(&vaf); |
104 | va_end(args); | 108 | va_end(args); |
105 | } | 109 | } |
110 | EXPORT_SYMBOL_GPL(__iwl_err); | ||
106 | 111 | ||
107 | #if defined(CONFIG_IWLWIFI_DEBUG) || defined(CONFIG_IWLWIFI_DEVICE_TRACING) | 112 | #if defined(CONFIG_IWLWIFI_DEBUG) || defined(CONFIG_IWLWIFI_DEVICE_TRACING) |
108 | void __iwl_dbg(struct device *dev, | 113 | void __iwl_dbg(struct device *dev, |
@@ -125,4 +130,5 @@ void __iwl_dbg(struct device *dev, | |||
125 | trace_iwlwifi_dbg(level, in_interrupt(), function, &vaf); | 130 | trace_iwlwifi_dbg(level, in_interrupt(), function, &vaf); |
126 | va_end(args); | 131 | va_end(args); |
127 | } | 132 | } |
133 | EXPORT_SYMBOL_GPL(__iwl_dbg); | ||
128 | #endif | 134 | #endif |
diff --git a/drivers/net/wireless/iwlwifi/iwl-devtrace.c b/drivers/net/wireless/iwlwifi/iwl-devtrace.c index 91f45e71e0a2..70191ddbd8f6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-devtrace.c +++ b/drivers/net/wireless/iwlwifi/iwl-devtrace.c | |||
@@ -42,4 +42,9 @@ EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_event); | |||
42 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_error); | 42 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_error); |
43 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_cont_event); | 43 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_cont_event); |
44 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_wrap_event); | 44 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dev_ucode_wrap_event); |
45 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_info); | ||
46 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_warn); | ||
47 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_crit); | ||
48 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_err); | ||
49 | EXPORT_TRACEPOINT_SYMBOL(iwlwifi_dbg); | ||
45 | #endif | 50 | #endif |
diff --git a/drivers/net/wireless/iwlwifi/iwl-drv.c b/drivers/net/wireless/iwlwifi/iwl-drv.c index d742900969ea..cdfdfaec395e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-drv.c +++ b/drivers/net/wireless/iwlwifi/iwl-drv.c | |||
@@ -77,8 +77,33 @@ | |||
77 | /* private includes */ | 77 | /* private includes */ |
78 | #include "iwl-fw-file.h" | 78 | #include "iwl-fw-file.h" |
79 | 79 | ||
80 | /****************************************************************************** | ||
81 | * | ||
82 | * module boiler plate | ||
83 | * | ||
84 | ******************************************************************************/ | ||
85 | |||
86 | /* | ||
87 | * module name, copyright, version, etc. | ||
88 | */ | ||
89 | #define DRV_DESCRIPTION "Intel(R) Wireless WiFi driver for Linux" | ||
90 | |||
91 | #ifdef CONFIG_IWLWIFI_DEBUG | ||
92 | #define VD "d" | ||
93 | #else | ||
94 | #define VD | ||
95 | #endif | ||
96 | |||
97 | #define DRV_VERSION IWLWIFI_VERSION VD | ||
98 | |||
99 | MODULE_DESCRIPTION(DRV_DESCRIPTION); | ||
100 | MODULE_VERSION(DRV_VERSION); | ||
101 | MODULE_AUTHOR(DRV_COPYRIGHT " " DRV_AUTHOR); | ||
102 | MODULE_LICENSE("GPL"); | ||
103 | |||
80 | /** | 104 | /** |
81 | * struct iwl_drv - drv common data | 105 | * struct iwl_drv - drv common data |
106 | * @list: list of drv structures using this opmode | ||
82 | * @fw: the iwl_fw structure | 107 | * @fw: the iwl_fw structure |
83 | * @op_mode: the running op_mode | 108 | * @op_mode: the running op_mode |
84 | * @trans: transport layer | 109 | * @trans: transport layer |
@@ -89,6 +114,7 @@ | |||
89 | * @request_firmware_complete: the firmware has been obtained from user space | 114 | * @request_firmware_complete: the firmware has been obtained from user space |
90 | */ | 115 | */ |
91 | struct iwl_drv { | 116 | struct iwl_drv { |
117 | struct list_head list; | ||
92 | struct iwl_fw fw; | 118 | struct iwl_fw fw; |
93 | 119 | ||
94 | struct iwl_op_mode *op_mode; | 120 | struct iwl_op_mode *op_mode; |
@@ -102,7 +128,17 @@ struct iwl_drv { | |||
102 | struct completion request_firmware_complete; | 128 | struct completion request_firmware_complete; |
103 | }; | 129 | }; |
104 | 130 | ||
131 | #define DVM_OP_MODE 0 | ||
132 | #define MVM_OP_MODE 1 | ||
105 | 133 | ||
134 | static struct iwlwifi_opmode_table { | ||
135 | const char *name; /* name: iwldvm, iwlmvm, etc */ | ||
136 | const struct iwl_op_mode_ops *ops; /* pointer to op_mode ops */ | ||
137 | struct list_head drv; /* list of devices using this op_mode */ | ||
138 | } iwlwifi_opmode_table[] = { /* ops set when driver is initialized */ | ||
139 | { .name = "iwldvm", .ops = NULL }, | ||
140 | { .name = "iwlmvm", .ops = NULL }, | ||
141 | }; | ||
106 | 142 | ||
107 | /* | 143 | /* |
108 | * struct fw_sec: Just for the image parsing proccess. | 144 | * struct fw_sec: Just for the image parsing proccess. |
@@ -721,7 +757,6 @@ static int validate_sec_sizes(struct iwl_drv *drv, | |||
721 | return 0; | 757 | return 0; |
722 | } | 758 | } |
723 | 759 | ||
724 | |||
725 | /** | 760 | /** |
726 | * iwl_ucode_callback - callback when firmware was loaded | 761 | * iwl_ucode_callback - callback when firmware was loaded |
727 | * | 762 | * |
@@ -733,6 +768,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
733 | struct iwl_drv *drv = context; | 768 | struct iwl_drv *drv = context; |
734 | struct iwl_fw *fw = &drv->fw; | 769 | struct iwl_fw *fw = &drv->fw; |
735 | struct iwl_ucode_header *ucode; | 770 | struct iwl_ucode_header *ucode; |
771 | struct iwlwifi_opmode_table *op; | ||
736 | int err; | 772 | int err; |
737 | struct iwl_firmware_pieces pieces; | 773 | struct iwl_firmware_pieces pieces; |
738 | const unsigned int api_max = drv->cfg->ucode_api_max; | 774 | const unsigned int api_max = drv->cfg->ucode_api_max; |
@@ -863,10 +899,17 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context) | |||
863 | release_firmware(ucode_raw); | 899 | release_firmware(ucode_raw); |
864 | complete(&drv->request_firmware_complete); | 900 | complete(&drv->request_firmware_complete); |
865 | 901 | ||
866 | drv->op_mode = iwl_dvm_ops.start(drv->trans, drv->cfg, &drv->fw); | 902 | op = &iwlwifi_opmode_table[DVM_OP_MODE]; |
867 | 903 | ||
868 | if (!drv->op_mode) | 904 | /* add this device to the list of devices using this op_mode */ |
869 | goto out_free_fw; | 905 | list_add_tail(&drv->list, &op->drv); |
906 | |||
907 | if (op->ops) { | ||
908 | const struct iwl_op_mode_ops *ops = op->ops; | ||
909 | drv->op_mode = ops->start(drv->trans, drv->cfg, &drv->fw); | ||
910 | } else { | ||
911 | request_module_nowait("%s", op->name); | ||
912 | } | ||
870 | 913 | ||
871 | return; | 914 | return; |
872 | 915 | ||
@@ -938,6 +981,67 @@ struct iwl_mod_params iwlwifi_mod_params = { | |||
938 | .auto_agg = true, | 981 | .auto_agg = true, |
939 | /* the rest are 0 by default */ | 982 | /* the rest are 0 by default */ |
940 | }; | 983 | }; |
984 | EXPORT_SYMBOL_GPL(iwlwifi_mod_params); | ||
985 | |||
986 | int iwl_opmode_register(const char *name, const struct iwl_op_mode_ops *ops) | ||
987 | { | ||
988 | int i; | ||
989 | struct iwl_drv *drv; | ||
990 | |||
991 | for (i = 0; i < ARRAY_SIZE(iwlwifi_opmode_table); i++) { | ||
992 | if (strcmp(iwlwifi_opmode_table[i].name, name)) | ||
993 | continue; | ||
994 | iwlwifi_opmode_table[i].ops = ops; | ||
995 | list_for_each_entry(drv, &iwlwifi_opmode_table[i].drv, list) | ||
996 | drv->op_mode = ops->start(drv->trans, drv->cfg, | ||
997 | &drv->fw); | ||
998 | return 0; | ||
999 | } | ||
1000 | return -EIO; | ||
1001 | } | ||
1002 | EXPORT_SYMBOL_GPL(iwl_opmode_register); | ||
1003 | |||
1004 | void iwl_opmode_deregister(const char *name) | ||
1005 | { | ||
1006 | int i; | ||
1007 | struct iwl_drv *drv; | ||
1008 | |||
1009 | for (i = 0; i < ARRAY_SIZE(iwlwifi_opmode_table); i++) { | ||
1010 | if (strcmp(iwlwifi_opmode_table[i].name, name)) | ||
1011 | continue; | ||
1012 | iwlwifi_opmode_table[i].ops = NULL; | ||
1013 | |||
1014 | /* call the stop routine for all devices */ | ||
1015 | list_for_each_entry(drv, &iwlwifi_opmode_table[i].drv, list) { | ||
1016 | if (drv->op_mode) { | ||
1017 | iwl_op_mode_stop(drv->op_mode); | ||
1018 | drv->op_mode = NULL; | ||
1019 | } | ||
1020 | } | ||
1021 | return; | ||
1022 | } | ||
1023 | } | ||
1024 | EXPORT_SYMBOL_GPL(iwl_opmode_deregister); | ||
1025 | |||
1026 | static int __init iwl_drv_init(void) | ||
1027 | { | ||
1028 | int i; | ||
1029 | |||
1030 | for (i = 0; i < ARRAY_SIZE(iwlwifi_opmode_table); i++) | ||
1031 | INIT_LIST_HEAD(&iwlwifi_opmode_table[i].drv); | ||
1032 | |||
1033 | pr_info(DRV_DESCRIPTION ", " DRV_VERSION "\n"); | ||
1034 | pr_info(DRV_COPYRIGHT "\n"); | ||
1035 | |||
1036 | return iwl_pci_register_driver(); | ||
1037 | } | ||
1038 | module_init(iwl_drv_init); | ||
1039 | |||
1040 | static void __exit iwl_drv_exit(void) | ||
1041 | { | ||
1042 | iwl_pci_unregister_driver(); | ||
1043 | } | ||
1044 | module_exit(iwl_drv_exit); | ||
941 | 1045 | ||
942 | #ifdef CONFIG_IWLWIFI_DEBUG | 1046 | #ifdef CONFIG_IWLWIFI_DEBUG |
943 | module_param_named(debug, iwlwifi_mod_params.debug_level, uint, | 1047 | module_param_named(debug, iwlwifi_mod_params.debug_level, uint, |
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.c b/drivers/net/wireless/iwlwifi/iwl-io.c index 081dd34d2387..ee93274214d6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-io.c +++ b/drivers/net/wireless/iwlwifi/iwl-io.c | |||
@@ -27,6 +27,7 @@ | |||
27 | *****************************************************************************/ | 27 | *****************************************************************************/ |
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/device.h> | 29 | #include <linux/device.h> |
30 | #include <linux/export.h> | ||
30 | 31 | ||
31 | #include "iwl-io.h" | 32 | #include "iwl-io.h" |
32 | #include"iwl-csr.h" | 33 | #include"iwl-csr.h" |
@@ -52,6 +53,7 @@ void iwl_set_bit(struct iwl_trans *trans, u32 reg, u32 mask) | |||
52 | __iwl_set_bit(trans, reg, mask); | 53 | __iwl_set_bit(trans, reg, mask); |
53 | spin_unlock_irqrestore(&trans->reg_lock, flags); | 54 | spin_unlock_irqrestore(&trans->reg_lock, flags); |
54 | } | 55 | } |
56 | EXPORT_SYMBOL_GPL(iwl_set_bit); | ||
55 | 57 | ||
56 | void iwl_clear_bit(struct iwl_trans *trans, u32 reg, u32 mask) | 58 | void iwl_clear_bit(struct iwl_trans *trans, u32 reg, u32 mask) |
57 | { | 59 | { |
@@ -61,6 +63,7 @@ void iwl_clear_bit(struct iwl_trans *trans, u32 reg, u32 mask) | |||
61 | __iwl_clear_bit(trans, reg, mask); | 63 | __iwl_clear_bit(trans, reg, mask); |
62 | spin_unlock_irqrestore(&trans->reg_lock, flags); | 64 | spin_unlock_irqrestore(&trans->reg_lock, flags); |
63 | } | 65 | } |
66 | EXPORT_SYMBOL_GPL(iwl_clear_bit); | ||
64 | 67 | ||
65 | int iwl_poll_bit(struct iwl_trans *trans, u32 addr, | 68 | int iwl_poll_bit(struct iwl_trans *trans, u32 addr, |
66 | u32 bits, u32 mask, int timeout) | 69 | u32 bits, u32 mask, int timeout) |
@@ -76,6 +79,7 @@ int iwl_poll_bit(struct iwl_trans *trans, u32 addr, | |||
76 | 79 | ||
77 | return -ETIMEDOUT; | 80 | return -ETIMEDOUT; |
78 | } | 81 | } |
82 | EXPORT_SYMBOL_GPL(iwl_poll_bit); | ||
79 | 83 | ||
80 | int iwl_grab_nic_access_silent(struct iwl_trans *trans) | 84 | int iwl_grab_nic_access_silent(struct iwl_trans *trans) |
81 | { | 85 | { |
@@ -117,6 +121,7 @@ int iwl_grab_nic_access_silent(struct iwl_trans *trans) | |||
117 | 121 | ||
118 | return 0; | 122 | return 0; |
119 | } | 123 | } |
124 | EXPORT_SYMBOL_GPL(iwl_grab_nic_access_silent); | ||
120 | 125 | ||
121 | bool iwl_grab_nic_access(struct iwl_trans *trans) | 126 | bool iwl_grab_nic_access(struct iwl_trans *trans) |
122 | { | 127 | { |
@@ -130,6 +135,7 @@ bool iwl_grab_nic_access(struct iwl_trans *trans) | |||
130 | 135 | ||
131 | return true; | 136 | return true; |
132 | } | 137 | } |
138 | EXPORT_SYMBOL_GPL(iwl_grab_nic_access); | ||
133 | 139 | ||
134 | void iwl_release_nic_access(struct iwl_trans *trans) | 140 | void iwl_release_nic_access(struct iwl_trans *trans) |
135 | { | 141 | { |
@@ -144,6 +150,7 @@ void iwl_release_nic_access(struct iwl_trans *trans) | |||
144 | */ | 150 | */ |
145 | mmiowb(); | 151 | mmiowb(); |
146 | } | 152 | } |
153 | EXPORT_SYMBOL_GPL(iwl_release_nic_access); | ||
147 | 154 | ||
148 | u32 iwl_read_direct32(struct iwl_trans *trans, u32 reg) | 155 | u32 iwl_read_direct32(struct iwl_trans *trans, u32 reg) |
149 | { | 156 | { |
@@ -158,6 +165,7 @@ u32 iwl_read_direct32(struct iwl_trans *trans, u32 reg) | |||
158 | 165 | ||
159 | return value; | 166 | return value; |
160 | } | 167 | } |
168 | EXPORT_SYMBOL_GPL(iwl_read_direct32); | ||
161 | 169 | ||
162 | void iwl_write_direct32(struct iwl_trans *trans, u32 reg, u32 value) | 170 | void iwl_write_direct32(struct iwl_trans *trans, u32 reg, u32 value) |
163 | { | 171 | { |
@@ -170,6 +178,7 @@ void iwl_write_direct32(struct iwl_trans *trans, u32 reg, u32 value) | |||
170 | } | 178 | } |
171 | spin_unlock_irqrestore(&trans->reg_lock, flags); | 179 | spin_unlock_irqrestore(&trans->reg_lock, flags); |
172 | } | 180 | } |
181 | EXPORT_SYMBOL_GPL(iwl_write_direct32); | ||
173 | 182 | ||
174 | int iwl_poll_direct_bit(struct iwl_trans *trans, u32 addr, u32 mask, | 183 | int iwl_poll_direct_bit(struct iwl_trans *trans, u32 addr, u32 mask, |
175 | int timeout) | 184 | int timeout) |
@@ -185,6 +194,7 @@ int iwl_poll_direct_bit(struct iwl_trans *trans, u32 addr, u32 mask, | |||
185 | 194 | ||
186 | return -ETIMEDOUT; | 195 | return -ETIMEDOUT; |
187 | } | 196 | } |
197 | EXPORT_SYMBOL_GPL(iwl_poll_direct_bit); | ||
188 | 198 | ||
189 | static inline u32 __iwl_read_prph(struct iwl_trans *trans, u32 reg) | 199 | static inline u32 __iwl_read_prph(struct iwl_trans *trans, u32 reg) |
190 | { | 200 | { |
@@ -211,6 +221,7 @@ u32 iwl_read_prph(struct iwl_trans *trans, u32 reg) | |||
211 | spin_unlock_irqrestore(&trans->reg_lock, flags); | 221 | spin_unlock_irqrestore(&trans->reg_lock, flags); |
212 | return val; | 222 | return val; |
213 | } | 223 | } |
224 | EXPORT_SYMBOL_GPL(iwl_read_prph); | ||
214 | 225 | ||
215 | void iwl_write_prph(struct iwl_trans *trans, u32 addr, u32 val) | 226 | void iwl_write_prph(struct iwl_trans *trans, u32 addr, u32 val) |
216 | { | 227 | { |
@@ -223,6 +234,7 @@ void iwl_write_prph(struct iwl_trans *trans, u32 addr, u32 val) | |||
223 | } | 234 | } |
224 | spin_unlock_irqrestore(&trans->reg_lock, flags); | 235 | spin_unlock_irqrestore(&trans->reg_lock, flags); |
225 | } | 236 | } |
237 | EXPORT_SYMBOL_GPL(iwl_write_prph); | ||
226 | 238 | ||
227 | void iwl_set_bits_prph(struct iwl_trans *trans, u32 reg, u32 mask) | 239 | void iwl_set_bits_prph(struct iwl_trans *trans, u32 reg, u32 mask) |
228 | { | 240 | { |
@@ -236,6 +248,7 @@ void iwl_set_bits_prph(struct iwl_trans *trans, u32 reg, u32 mask) | |||
236 | } | 248 | } |
237 | spin_unlock_irqrestore(&trans->reg_lock, flags); | 249 | spin_unlock_irqrestore(&trans->reg_lock, flags); |
238 | } | 250 | } |
251 | EXPORT_SYMBOL_GPL(iwl_set_bits_prph); | ||
239 | 252 | ||
240 | void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 reg, | 253 | void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 reg, |
241 | u32 bits, u32 mask) | 254 | u32 bits, u32 mask) |
@@ -250,6 +263,7 @@ void iwl_set_bits_mask_prph(struct iwl_trans *trans, u32 reg, | |||
250 | } | 263 | } |
251 | spin_unlock_irqrestore(&trans->reg_lock, flags); | 264 | spin_unlock_irqrestore(&trans->reg_lock, flags); |
252 | } | 265 | } |
266 | EXPORT_SYMBOL_GPL(iwl_set_bits_mask_prph); | ||
253 | 267 | ||
254 | void iwl_clear_bits_prph(struct iwl_trans *trans, u32 reg, u32 mask) | 268 | void iwl_clear_bits_prph(struct iwl_trans *trans, u32 reg, u32 mask) |
255 | { | 269 | { |
@@ -264,6 +278,7 @@ void iwl_clear_bits_prph(struct iwl_trans *trans, u32 reg, u32 mask) | |||
264 | } | 278 | } |
265 | spin_unlock_irqrestore(&trans->reg_lock, flags); | 279 | spin_unlock_irqrestore(&trans->reg_lock, flags); |
266 | } | 280 | } |
281 | EXPORT_SYMBOL_GPL(iwl_clear_bits_prph); | ||
267 | 282 | ||
268 | void _iwl_read_targ_mem_words(struct iwl_trans *trans, u32 addr, | 283 | void _iwl_read_targ_mem_words(struct iwl_trans *trans, u32 addr, |
269 | void *buf, int words) | 284 | void *buf, int words) |
@@ -281,6 +296,7 @@ void _iwl_read_targ_mem_words(struct iwl_trans *trans, u32 addr, | |||
281 | } | 296 | } |
282 | spin_unlock_irqrestore(&trans->reg_lock, flags); | 297 | spin_unlock_irqrestore(&trans->reg_lock, flags); |
283 | } | 298 | } |
299 | EXPORT_SYMBOL_GPL(_iwl_read_targ_mem_words); | ||
284 | 300 | ||
285 | u32 iwl_read_targ_mem(struct iwl_trans *trans, u32 addr) | 301 | u32 iwl_read_targ_mem(struct iwl_trans *trans, u32 addr) |
286 | { | 302 | { |
@@ -290,6 +306,7 @@ u32 iwl_read_targ_mem(struct iwl_trans *trans, u32 addr) | |||
290 | 306 | ||
291 | return value; | 307 | return value; |
292 | } | 308 | } |
309 | EXPORT_SYMBOL_GPL(iwl_read_targ_mem); | ||
293 | 310 | ||
294 | int _iwl_write_targ_mem_words(struct iwl_trans *trans, u32 addr, | 311 | int _iwl_write_targ_mem_words(struct iwl_trans *trans, u32 addr, |
295 | void *buf, int words) | 312 | void *buf, int words) |
@@ -310,8 +327,10 @@ int _iwl_write_targ_mem_words(struct iwl_trans *trans, u32 addr, | |||
310 | 327 | ||
311 | return result; | 328 | return result; |
312 | } | 329 | } |
330 | EXPORT_SYMBOL_GPL(_iwl_write_targ_mem_words); | ||
313 | 331 | ||
314 | int iwl_write_targ_mem(struct iwl_trans *trans, u32 addr, u32 val) | 332 | int iwl_write_targ_mem(struct iwl_trans *trans, u32 addr, u32 val) |
315 | { | 333 | { |
316 | return _iwl_write_targ_mem_words(trans, addr, &val, 1); | 334 | return _iwl_write_targ_mem_words(trans, addr, &val, 1); |
317 | } | 335 | } |
336 | EXPORT_SYMBOL_GPL(iwl_write_targ_mem); | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-op-mode.h b/drivers/net/wireless/iwlwifi/iwl-op-mode.h index 4ef742b28e08..cec133c87ad8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-op-mode.h +++ b/drivers/net/wireless/iwlwifi/iwl-op-mode.h | |||
@@ -145,6 +145,9 @@ struct iwl_op_mode_ops { | |||
145 | void (*wimax_active)(struct iwl_op_mode *op_mode); | 145 | void (*wimax_active)(struct iwl_op_mode *op_mode); |
146 | }; | 146 | }; |
147 | 147 | ||
148 | int iwl_opmode_register(const char *name, const struct iwl_op_mode_ops *ops); | ||
149 | void iwl_opmode_deregister(const char *name); | ||
150 | |||
148 | /** | 151 | /** |
149 | * struct iwl_op_mode - operational mode | 152 | * struct iwl_op_mode - operational mode |
150 | * | 153 | * |