aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-dev.h
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2011-07-08 11:46:14 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-07-11 15:02:03 -0400
commite419d62d72b23392e7f9a5da047fb17d70edc54a (patch)
tree6b6608a26d9cb88f176b530e85d3e8b607927856 /drivers/net/wireless/iwlwifi/iwl-dev.h
parent06f491ef4b659fa6f6850f31d05a4a03db0d9d96 (diff)
iwlagn: consolidate the API that sends host commands and move to transport
Now, there are only two functions to send a host command: * send_cmd that receives a iwl_host_cmd * send_cmd_pdu that builds the iwl_host_cmd itself and received flags The flags CMD_ASYNC / CMD_SYNC / CMD_WANT_SKB are not changed by the API functions. Kill the unused flags CMD_SIZE_NORMAL / CMD_NO_SKB on the way. Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@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/net/wireless/iwlwifi/iwl-dev.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 85e4fa35037..975ad79a5f7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -259,10 +259,8 @@ struct iwl_channel_info {
259 259
260enum { 260enum {
261 CMD_SYNC = 0, 261 CMD_SYNC = 0,
262 CMD_SIZE_NORMAL = 0, 262 CMD_ASYNC = BIT(0),
263 CMD_NO_SKB = 0, 263 CMD_WANT_SKB = BIT(1),
264 CMD_ASYNC = (1 << 1),
265 CMD_WANT_SKB = (1 << 2),
266}; 264};
267 265
268#define DEF_CMD_PAYLOAD_SIZE 320 266#define DEF_CMD_PAYLOAD_SIZE 320
@@ -295,6 +293,16 @@ enum iwl_hcmd_dataflag {
295 IWL_HCMD_DFL_NOCOPY = BIT(0), 293 IWL_HCMD_DFL_NOCOPY = BIT(0),
296}; 294};
297 295
296/**
297 * struct iwl_host_cmd - Host command to the uCode
298 * @data: array of chunks that composes the data of the host command
299 * @reply_page: pointer to the page that holds the response to the host command
300 * @callback:
301 * @flags: can be CMD_* note CMD_WANT_SKB is incompatible withe CMD_ASYNC
302 * @len: array of the lenths of the chunks in data
303 * @dataflags:
304 * @id: id of the host command
305 */
298struct iwl_host_cmd { 306struct iwl_host_cmd {
299 const void *data[IWL_MAX_CMD_TFDS]; 307 const void *data[IWL_MAX_CMD_TFDS];
300 unsigned long reply_page; 308 unsigned long reply_page;
@@ -1234,6 +1242,8 @@ struct iwl_trans;
1234 * @tx_init:inits the tx memory, allocate if needed 1242 * @tx_init:inits the tx memory, allocate if needed
1235 * @tx_stop: stop the tx 1243 * @tx_stop: stop the tx
1236 * @tx_free: frees the tx memory 1244 * @tx_free: frees the tx memory
1245 * @send_cmd:send a host command
1246 * @send_cmd_pdu:send a host command: flags can be CMD_*
1237 */ 1247 */
1238struct iwl_trans_ops { 1248struct iwl_trans_ops {
1239 int (*rx_init)(struct iwl_priv *priv); 1249 int (*rx_init)(struct iwl_priv *priv);
@@ -1243,6 +1253,11 @@ struct iwl_trans_ops {
1243 int (*tx_init)(struct iwl_priv *priv); 1253 int (*tx_init)(struct iwl_priv *priv);
1244 int (*tx_stop)(struct iwl_priv *priv); 1254 int (*tx_stop)(struct iwl_priv *priv);
1245 void (*tx_free)(struct iwl_priv *priv); 1255 void (*tx_free)(struct iwl_priv *priv);
1256
1257 int (*send_cmd)(struct iwl_priv *priv, struct iwl_host_cmd *cmd);
1258
1259 int (*send_cmd_pdu)(struct iwl_priv *priv, u8 id, u32 flags, u16 len,
1260 const void *data);
1246}; 1261};
1247 1262
1248struct iwl_trans { 1263struct iwl_trans {