diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-03-21 16:53:44 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-03-25 16:41:55 -0400 |
commit | 857485c0c46ceee5c658c1761bba4d9a5ddf433f (patch) | |
tree | df2028c6a3d99ad32491efba7b6ca69f7d45edcf /drivers/net/wireless/iwlwifi/iwl-core.h | |
parent | 8622e7058a8764223ae2305d980a38d07f034717 (diff) |
iwlwifi: move host command sending functions to core module
1. Host command sending functions moved from iwl4965-base.c to iwl-hcmd.c
in iwlcore module
2. enqueue_hcmd function currently stays in iwl4965-base.c. It is invoked
through the new 'utils' field in priv's ops.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Assaf Krauss <assaf.krauss@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-core.h')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.h b/drivers/net/wireless/iwlwifi/iwl-core.h index 4dde4d628a8..ce7f90ebf36 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.h +++ b/drivers/net/wireless/iwlwifi/iwl-core.h | |||
@@ -63,6 +63,13 @@ | |||
63 | #ifndef __iwl_core_h__ | 63 | #ifndef __iwl_core_h__ |
64 | #define __iwl_core_h__ | 64 | #define __iwl_core_h__ |
65 | 65 | ||
66 | /************************ | ||
67 | * forward declarations * | ||
68 | ************************/ | ||
69 | struct iwl_host_cmd; | ||
70 | struct iwl_cmd; | ||
71 | |||
72 | |||
66 | #define IWLWIFI_VERSION "1.2.26k" | 73 | #define IWLWIFI_VERSION "1.2.26k" |
67 | #define DRV_COPYRIGHT "Copyright(c) 2003-2008 Intel Corporation" | 74 | #define DRV_COPYRIGHT "Copyright(c) 2003-2008 Intel Corporation" |
68 | 75 | ||
@@ -75,6 +82,10 @@ | |||
75 | #define IWL_SKU_A 0x2 | 82 | #define IWL_SKU_A 0x2 |
76 | #define IWL_SKU_N 0x8 | 83 | #define IWL_SKU_N 0x8 |
77 | 84 | ||
85 | struct iwl_hcmd_utils_ops { | ||
86 | int (*enqueue_hcmd)(struct iwl_priv *priv, struct iwl_host_cmd *cmd); | ||
87 | }; | ||
88 | |||
78 | struct iwl_lib_ops { | 89 | struct iwl_lib_ops { |
79 | /* iwlwifi driver (priv) init */ | 90 | /* iwlwifi driver (priv) init */ |
80 | int (*init_drv)(struct iwl_priv *priv); | 91 | int (*init_drv)(struct iwl_priv *priv); |
@@ -84,6 +95,7 @@ struct iwl_lib_ops { | |||
84 | 95 | ||
85 | struct iwl_ops { | 96 | struct iwl_ops { |
86 | const struct iwl_lib_ops *lib; | 97 | const struct iwl_lib_ops *lib; |
98 | const struct iwl_hcmd_utils_ops *utils; | ||
87 | }; | 99 | }; |
88 | 100 | ||
89 | struct iwl_mod_params { | 101 | struct iwl_mod_params { |
@@ -120,4 +132,18 @@ int iwlcore_set_rxon_channel(struct iwl_priv *priv, | |||
120 | 132 | ||
121 | int iwl_setup(struct iwl_priv *priv); | 133 | int iwl_setup(struct iwl_priv *priv); |
122 | 134 | ||
135 | /***************************************************** | ||
136 | * S e n d i n g H o s t C o m m a n d s * | ||
137 | *****************************************************/ | ||
138 | |||
139 | const char *get_cmd_string(u8 cmd); | ||
140 | int iwl_send_cmd_sync(struct iwl_priv *priv, struct iwl_host_cmd *cmd); | ||
141 | int iwl_send_cmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd); | ||
142 | int iwl_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len, const void *data); | ||
143 | int iwl_send_cmd_pdu_async(struct iwl_priv *priv, u8 id, u16 len, | ||
144 | const void *data, | ||
145 | int (*callback)(struct iwl_priv *priv, | ||
146 | struct iwl_cmd *cmd, | ||
147 | struct sk_buff *skb)); | ||
148 | |||
123 | #endif /* __iwl_core_h__ */ | 149 | #endif /* __iwl_core_h__ */ |