summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-helpers.h
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-04-16 19:29:24 +0400
committerWey-Yi Guy <wey-yi.w.guy@intel.com>2011-04-22 21:21:18 +0400
commitdbf28e21ca391110e90ccad05dda79d2e2f60e0e (patch)
tree76aa45ec1cfb00c09b9cae51742c475ab821911a /drivers/net/wireless/iwlwifi/iwl-helpers.h
parentca7966c88e44233fac113579071a6f55e00ef5ac (diff)
downloadlinux-dbf28e21ca391110e90ccad05dda79d2e2f60e0e.tar.xz
iwlagn: combine firmware code/data
On new hardware, ucode images always come in pairs: code and data. Therefore, combine the variables into an appropriate struct and use that when both code and data are needed. Also, combine allocation and copying so that we have less code in total. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-helpers.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-helpers.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-helpers.h b/drivers/net/wireless/iwlwifi/iwl-helpers.h
index 9309ff2df4c2..41207a3645b8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -64,30 +64,6 @@ static inline int iwl_queue_dec_wrap(int index, int n_bd)
return --index & (n_bd - 1);
}
-/* TODO: Move fw_desc functions to iwl-pci.ko */
-static inline void iwl_free_fw_desc(struct pci_dev *pci_dev,
- struct fw_desc *desc)
-{
- if (desc->v_addr)
- dma_free_coherent(&pci_dev->dev, desc->len,
- desc->v_addr, desc->p_addr);
- desc->v_addr = NULL;
- desc->len = 0;
-}
-
-static inline int iwl_alloc_fw_desc(struct pci_dev *pci_dev,
- struct fw_desc *desc)
-{
- if (!desc->len) {
- desc->v_addr = NULL;
- return -EINVAL;
- }
-
- desc->v_addr = dma_alloc_coherent(&pci_dev->dev, desc->len,
- &desc->p_addr, GFP_KERNEL);
- return (desc->v_addr != NULL) ? 0 : -ENOMEM;
-}
-
/*
* we have 8 bits used like this:
*