diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-08-26 16:15:13 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-28 14:40:53 -0400 |
commit | 1303dcfd0504565aef8ef63487443ab1f814c00f (patch) | |
tree | 7671807235e2de638ae15faf8836abb946104028 /drivers/net/wireless/iwlwifi | |
parent | 924d6356b216e592f596595757db8e955391a489 (diff) |
iwlwifi: fix ICT irq table endianness
The ICT IRQ table is a set of __le32 values, not u32 values,
so when reading it we need to take into account that it has
to be converted to CPU endianness. This was causing a lot of
trouble on my powerpc box where various things would simply
not work for no apparent reason with 5xxx cards, but worked
with 4965 -- which doesn't use the ICT table.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-core.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-dev.h | 2 |
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index c62c081cfbb7..0bfd4e918139 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -1823,7 +1823,7 @@ int iwl_reset_ict(struct iwl_priv *priv) | |||
1823 | spin_lock_irqsave(&priv->lock, flags); | 1823 | spin_lock_irqsave(&priv->lock, flags); |
1824 | iwl_disable_interrupts(priv); | 1824 | iwl_disable_interrupts(priv); |
1825 | 1825 | ||
1826 | memset(&priv->ict_tbl[0],0, sizeof(u32) * ICT_COUNT); | 1826 | memset(&priv->ict_tbl[0], 0, sizeof(u32) * ICT_COUNT); |
1827 | 1827 | ||
1828 | val = priv->aligned_ict_tbl_dma >> PAGE_SHIFT; | 1828 | val = priv->aligned_ict_tbl_dma >> PAGE_SHIFT; |
1829 | 1829 | ||
@@ -1901,13 +1901,13 @@ irqreturn_t iwl_isr_ict(int irq, void *data) | |||
1901 | /* read all entries that not 0 start with ict_index */ | 1901 | /* read all entries that not 0 start with ict_index */ |
1902 | while (priv->ict_tbl[priv->ict_index]) { | 1902 | while (priv->ict_tbl[priv->ict_index]) { |
1903 | 1903 | ||
1904 | val |= priv->ict_tbl[priv->ict_index]; | 1904 | val |= le32_to_cpu(priv->ict_tbl[priv->ict_index]); |
1905 | IWL_DEBUG_ISR(priv, "ICT index %d value 0x%08X\n", | 1905 | IWL_DEBUG_ISR(priv, "ICT index %d value 0x%08X\n", |
1906 | priv->ict_index, | 1906 | priv->ict_index, |
1907 | priv->ict_tbl[priv->ict_index]); | 1907 | le32_to_cpu(priv->ict_tbl[priv->ict_index])); |
1908 | priv->ict_tbl[priv->ict_index] = 0; | 1908 | priv->ict_tbl[priv->ict_index] = 0; |
1909 | priv->ict_index = iwl_queue_inc_wrap(priv->ict_index, | 1909 | priv->ict_index = iwl_queue_inc_wrap(priv->ict_index, |
1910 | ICT_COUNT); | 1910 | ICT_COUNT); |
1911 | 1911 | ||
1912 | } | 1912 | } |
1913 | 1913 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index ccea2e4ab45a..028d50599550 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
@@ -1170,7 +1170,7 @@ struct iwl_priv { | |||
1170 | struct iwl_hw_params hw_params; | 1170 | struct iwl_hw_params hw_params; |
1171 | 1171 | ||
1172 | /* INT ICT Table */ | 1172 | /* INT ICT Table */ |
1173 | u32 *ict_tbl; | 1173 | __le32 *ict_tbl; |
1174 | dma_addr_t ict_tbl_dma; | 1174 | dma_addr_t ict_tbl_dma; |
1175 | dma_addr_t aligned_ict_tbl_dma; | 1175 | dma_addr_t aligned_ict_tbl_dma; |
1176 | int ict_index; | 1176 | int ict_index; |