aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-4965.h
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2008-03-21 16:53:44 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-03-25 16:41:55 -0400
commit857485c0c46ceee5c658c1761bba4d9a5ddf433f (patch)
treedf2028c6a3d99ad32491efba7b6ca69f7d45edcf /drivers/net/wireless/iwlwifi/iwl-4965.h
parent8622e7058a8764223ae2305d980a38d07f034717 (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-4965.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-4965.h33
1 files changed, 15 insertions, 18 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.h b/drivers/net/wireless/iwlwifi/iwl-4965.h
index b73c1544e909..810b8e28dc83 100644
--- a/drivers/net/wireless/iwlwifi/iwl-4965.h
+++ b/drivers/net/wireless/iwlwifi/iwl-4965.h
@@ -140,7 +140,7 @@ struct iwl4965_tx_info {
140struct iwl4965_tx_queue { 140struct iwl4965_tx_queue {
141 struct iwl4965_queue q; 141 struct iwl4965_queue q;
142 struct iwl4965_tfd_frame *bd; 142 struct iwl4965_tfd_frame *bd;
143 struct iwl4965_cmd *cmd; 143 struct iwl_cmd *cmd;
144 dma_addr_t dma_addr_cmd; 144 dma_addr_t dma_addr_cmd;
145 struct iwl4965_tx_info *txb; 145 struct iwl4965_tx_info *txb;
146 int need_update; 146 int need_update;
@@ -312,15 +312,15 @@ enum {
312 CMD_WANT_SKB = (1 << 2), 312 CMD_WANT_SKB = (1 << 2),
313}; 313};
314 314
315struct iwl4965_cmd; 315struct iwl_cmd;
316struct iwl_priv; 316struct iwl_priv;
317 317
318struct iwl4965_cmd_meta { 318struct iwl_cmd_meta {
319 struct iwl4965_cmd_meta *source; 319 struct iwl_cmd_meta *source;
320 union { 320 union {
321 struct sk_buff *skb; 321 struct sk_buff *skb;
322 int (*callback)(struct iwl_priv *priv, 322 int (*callback)(struct iwl_priv *priv,
323 struct iwl4965_cmd *cmd, struct sk_buff *skb); 323 struct iwl_cmd *cmd, struct sk_buff *skb);
324 } __attribute__ ((packed)) u; 324 } __attribute__ ((packed)) u;
325 325
326 /* The CMD_SIZE_HUGE flag bit indicates that the command 326 /* The CMD_SIZE_HUGE flag bit indicates that the command
@@ -330,15 +330,15 @@ struct iwl4965_cmd_meta {
330} __attribute__ ((packed)); 330} __attribute__ ((packed));
331 331
332/** 332/**
333 * struct iwl4965_cmd 333 * struct iwl_cmd
334 * 334 *
335 * For allocation of the command and tx queues, this establishes the overall 335 * For allocation of the command and tx queues, this establishes the overall
336 * size of the largest command we send to uCode, except for a scan command 336 * size of the largest command we send to uCode, except for a scan command
337 * (which is relatively huge; space is allocated separately). 337 * (which is relatively huge; space is allocated separately).
338 */ 338 */
339struct iwl4965_cmd { 339struct iwl_cmd {
340 struct iwl4965_cmd_meta meta; /* driver data */ 340 struct iwl_cmd_meta meta; /* driver data */
341 struct iwl4965_cmd_header hdr; /* uCode API */ 341 struct iwl_cmd_header hdr; /* uCode API */
342 union { 342 union {
343 struct iwl4965_addsta_cmd addsta; 343 struct iwl4965_addsta_cmd addsta;
344 struct iwl4965_led_cmd led; 344 struct iwl4965_led_cmd led;
@@ -358,15 +358,15 @@ struct iwl4965_cmd {
358 } __attribute__ ((packed)) cmd; 358 } __attribute__ ((packed)) cmd;
359} __attribute__ ((packed)); 359} __attribute__ ((packed));
360 360
361struct iwl4965_host_cmd { 361struct iwl_host_cmd {
362 u8 id; 362 u8 id;
363 u16 len; 363 u16 len;
364 struct iwl4965_cmd_meta meta; 364 struct iwl_cmd_meta meta;
365 const void *data; 365 const void *data;
366}; 366};
367 367
368#define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl4965_cmd) - \ 368#define TFD_MAX_PAYLOAD_SIZE (sizeof(struct iwl_cmd) - \
369 sizeof(struct iwl4965_cmd_meta)) 369 sizeof(struct iwl_cmd_meta))
370 370
371/* 371/*
372 * RX related structures and functions 372 * RX related structures and functions
@@ -656,10 +656,6 @@ extern int iwl4965_tx_queue_init(struct iwl_priv *priv,
656 struct iwl4965_tx_queue *txq, int count, u32 id); 656 struct iwl4965_tx_queue *txq, int count, u32 id);
657extern void iwl4965_rx_replenish(void *data); 657extern void iwl4965_rx_replenish(void *data);
658extern void iwl4965_tx_queue_free(struct iwl_priv *priv, struct iwl4965_tx_queue *txq); 658extern void iwl4965_tx_queue_free(struct iwl_priv *priv, struct iwl4965_tx_queue *txq);
659extern int iwl4965_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len,
660 const void *data);
661extern int __must_check iwl4965_send_cmd(struct iwl_priv *priv,
662 struct iwl4965_host_cmd *cmd);
663extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv, 659extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv,
664 struct ieee80211_hdr *hdr, 660 struct ieee80211_hdr *hdr,
665 const u8 *dest, int left); 661 const u8 *dest, int left);
@@ -674,6 +670,7 @@ int iwl4965_init_geos(struct iwl_priv *priv);
674void iwl4965_free_geos(struct iwl_priv *priv); 670void iwl4965_free_geos(struct iwl_priv *priv);
675 671
676extern const u8 iwl4965_broadcast_addr[ETH_ALEN]; 672extern const u8 iwl4965_broadcast_addr[ETH_ALEN];
673int iwl4965_enqueue_hcmd(struct iwl_priv *priv, struct iwl_host_cmd *cmd);
677 674
678/* 675/*
679 * Currently used by iwl-3945-rs... look at restructuring so that it doesn't 676 * Currently used by iwl-3945-rs... look at restructuring so that it doesn't
@@ -718,7 +715,7 @@ extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv,
718 struct iwl4965_frame *frame, u8 rate); 715 struct iwl4965_frame *frame, u8 rate);
719extern int iwl4965_hw_get_rx_read(struct iwl_priv *priv); 716extern int iwl4965_hw_get_rx_read(struct iwl_priv *priv);
720extern void iwl4965_hw_build_tx_cmd_rate(struct iwl_priv *priv, 717extern void iwl4965_hw_build_tx_cmd_rate(struct iwl_priv *priv,
721 struct iwl4965_cmd *cmd, 718 struct iwl_cmd *cmd,
722 struct ieee80211_tx_control *ctrl, 719 struct ieee80211_tx_control *ctrl,
723 struct ieee80211_hdr *hdr, 720 struct ieee80211_hdr *hdr,
724 int sta_id, int tx_id); 721 int sta_id, int tx_id);