aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-05 14:24:42 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-03-06 15:16:14 -0500
commitbffc66ce2210b149fd171eccad2aef9802c0b35d (patch)
tree472f5307310c9454556988a28c54b82134a14250
parentc977a33d84fb3d706faa0b62f9671f49b16dde34 (diff)
iwlwifi: move queue functions to PCI-E
iwl_queue_inc_wrap/iwl_queue_dec_wrap aren't shared functions, they are PCI-E specific, so move them into the appropriate header. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-shared.h20
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h20
2 files changed, 20 insertions, 20 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h
index ed1811d43550..787d726efbc8 100644
--- a/drivers/net/wireless/iwlwifi/iwl-shared.h
+++ b/drivers/net/wireless/iwlwifi/iwl-shared.h
@@ -413,26 +413,6 @@ static inline bool iwl_have_debug_level(u32 level)
413 return iwlagn_mod_params.debug_level & level; 413 return iwlagn_mod_params.debug_level & level;
414} 414}
415 415
416/**
417 * iwl_queue_inc_wrap - increment queue index, wrap back to beginning
418 * @index -- current index
419 * @n_bd -- total number of entries in queue (must be power of 2)
420 */
421static inline int iwl_queue_inc_wrap(int index, int n_bd)
422{
423 return ++index & (n_bd - 1);
424}
425
426/**
427 * iwl_queue_dec_wrap - decrement queue index, wrap back to end
428 * @index -- current index
429 * @n_bd -- total number of entries in queue (must be power of 2)
430 */
431static inline int iwl_queue_dec_wrap(int index, int n_bd)
432{
433 return --index & (n_bd - 1);
434}
435
436struct iwl_rx_cmd_buffer { 416struct iwl_rx_cmd_buffer {
437 struct page *_page; 417 struct page *_page;
438}; 418};
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
index 632d4099900e..44952c371d33 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans-pcie-int.h
@@ -115,6 +115,26 @@ struct iwl_dma_ptr {
115 size_t size; 115 size_t size;
116}; 116};
117 117
118/**
119 * iwl_queue_inc_wrap - increment queue index, wrap back to beginning
120 * @index -- current index
121 * @n_bd -- total number of entries in queue (must be power of 2)
122 */
123static inline int iwl_queue_inc_wrap(int index, int n_bd)
124{
125 return ++index & (n_bd - 1);
126}
127
128/**
129 * iwl_queue_dec_wrap - decrement queue index, wrap back to end
130 * @index -- current index
131 * @n_bd -- total number of entries in queue (must be power of 2)
132 */
133static inline int iwl_queue_dec_wrap(int index, int n_bd)
134{
135 return --index & (n_bd - 1);
136}
137
118/* 138/*
119 * This queue number is required for proper operation 139 * This queue number is required for proper operation
120 * because the ucode will stop/start the scheduler as 140 * because the ucode will stop/start the scheduler as