diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2008-10-14 15:32:48 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-10-31 19:00:30 -0400 |
commit | 499b1883038a7db2dcf8b64229f8533ce2c8f0fc (patch) | |
tree | 34e5682d4e7e682412c1ffb5c2ff06a991c7ecbd /drivers/net/wireless/iwlwifi/iwl-dev.h | |
parent | 76eff18bdc5feaa53f1be33709b67df02f1d55e9 (diff) |
iwlwifi: fix TX cmd dma unmapping
This patch:
1. fixes command DMA unmapping, this might be visible only
on platforms where DMA unmapping is no noop such as PPC64 (not tested)
2. attaches correctly high memory part of the host command buffer
3. changes structure of TFD TB
instead of describing transmit buffer (TB) tuple it describes single
TB and makes code more readable on price of one unaligned access
4. eliminates using of IWL_GET/SET_BITs for TFD handling
5. renames TFD structures to mach the HW spec
6. reduces iwl_tx_info size by reserving first TB to the host command
This patch should not have any visible effect on x86 32
This patch is rework of
iwlwifi: fix DMA code and bugs from
Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@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.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index 0f57bf40e8d7..1f42e90c5f30 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -112,11 +112,9 @@ struct iwl_queue { | |||
112 | * space less than this */ | 112 | * space less than this */ |
113 | } __attribute__ ((packed)); | 113 | } __attribute__ ((packed)); |
114 | 114 | ||
115 | #define MAX_NUM_OF_TBS (20) | ||
116 | |||
117 | /* One for each TFD */ | 115 | /* One for each TFD */ |
118 | struct iwl_tx_info { | 116 | struct iwl_tx_info { |
119 | struct sk_buff *skb[MAX_NUM_OF_TBS]; | 117 | struct sk_buff *skb[IWL_NUM_OF_TBS - 1]; |
120 | }; | 118 | }; |
121 | 119 | ||
122 | /** | 120 | /** |
@@ -134,7 +132,7 @@ struct iwl_tx_info { | |||
134 | */ | 132 | */ |
135 | struct iwl_tx_queue { | 133 | struct iwl_tx_queue { |
136 | struct iwl_queue q; | 134 | struct iwl_queue q; |
137 | struct iwl_tfd_frame *bd; | 135 | struct iwl_tfd *tfds; |
138 | struct iwl_cmd *cmd[TFD_TX_CMD_SLOTS]; | 136 | struct iwl_cmd *cmd[TFD_TX_CMD_SLOTS]; |
139 | struct iwl_tx_info *txb; | 137 | struct iwl_tx_info *txb; |
140 | int need_update; | 138 | int need_update; |
@@ -252,7 +250,8 @@ struct iwl_cmd_meta { | |||
252 | /* The CMD_SIZE_HUGE flag bit indicates that the command | 250 | /* The CMD_SIZE_HUGE flag bit indicates that the command |
253 | * structure is stored at the end of the shared queue memory. */ | 251 | * structure is stored at the end of the shared queue memory. */ |
254 | u32 flags; | 252 | u32 flags; |
255 | 253 | DECLARE_PCI_UNMAP_ADDR(mapping) | |
254 | DECLARE_PCI_UNMAP_LEN(len) | ||
256 | } __attribute__ ((packed)); | 255 | } __attribute__ ((packed)); |
257 | 256 | ||
258 | #define IWL_CMD_MAX_PAYLOAD 320 | 257 | #define IWL_CMD_MAX_PAYLOAD 320 |