aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-shared.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-shared.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-shared.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-shared.h b/drivers/net/wireless/iwlwifi/iwl-shared.h
index 9790d7eba39b..73ea5e7a1f99 100644
--- a/drivers/net/wireless/iwlwifi/iwl-shared.h
+++ b/drivers/net/wireless/iwlwifi/iwl-shared.h
@@ -67,6 +67,7 @@
67#include <linux/spinlock.h> 67#include <linux/spinlock.h>
68#include <linux/mutex.h> 68#include <linux/mutex.h>
69#include <linux/gfp.h> 69#include <linux/gfp.h>
70#include <linux/mm.h> /* for page_address */
70#include <net/mac80211.h> 71#include <net/mac80211.h>
71 72
72#include "iwl-commands.h" 73#include "iwl-commands.h"
@@ -287,6 +288,26 @@ static inline void iwl_free_pages(struct iwl_shared *shrd, unsigned long page)
287 free_pages(page, shrd->hw_params.rx_page_order); 288 free_pages(page, shrd->hw_params.rx_page_order);
288} 289}
289 290
291/**
292 * iwl_queue_inc_wrap - increment queue index, wrap back to beginning
293 * @index -- current index
294 * @n_bd -- total number of entries in queue (must be power of 2)
295 */
296static inline int iwl_queue_inc_wrap(int index, int n_bd)
297{
298 return ++index & (n_bd - 1);
299}
300
301/**
302 * iwl_queue_dec_wrap - decrement queue index, wrap back to end
303 * @index -- current index
304 * @n_bd -- total number of entries in queue (must be power of 2)
305 */
306static inline int iwl_queue_dec_wrap(int index, int n_bd)
307{
308 return --index & (n_bd - 1);
309}
310
290struct iwl_rx_mem_buffer { 311struct iwl_rx_mem_buffer {
291 dma_addr_t page_dma; 312 dma_addr_t page_dma;
292 struct page *page; 313 struct page *page;
@@ -357,6 +378,8 @@ int iwl_probe(struct iwl_bus *bus, const struct iwl_trans_ops *trans_ops,
357 struct iwl_cfg *cfg); 378 struct iwl_cfg *cfg);
358void __devexit iwl_remove(struct iwl_priv * priv); 379void __devexit iwl_remove(struct iwl_priv * priv);
359 380
381void iwl_rx_dispatch(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb);
382int iwlagn_hw_valid_rtc_data_addr(u32 addr);
360void iwl_start_tx_ba_trans_ready(struct iwl_priv *priv, 383void iwl_start_tx_ba_trans_ready(struct iwl_priv *priv,
361 enum iwl_rxon_context_id ctx, 384 enum iwl_rxon_context_id ctx,
362 u8 sta_id, u8 tid); 385 u8 sta_id, u8 tid);
@@ -364,6 +387,26 @@ void iwl_stop_tx_ba_trans_ready(struct iwl_priv *priv,
364 enum iwl_rxon_context_id ctx, 387 enum iwl_rxon_context_id ctx,
365 u8 sta_id, u8 tid); 388 u8 sta_id, u8 tid);
366void iwl_set_hw_rfkill_state(struct iwl_priv *priv, bool state); 389void iwl_set_hw_rfkill_state(struct iwl_priv *priv, bool state);
390void iwl_apm_stop(struct iwl_priv *priv);
391int iwl_apm_init(struct iwl_priv *priv);
392void iwlagn_fw_error(struct iwl_priv *priv, bool ondemand);
393const char *get_cmd_string(u8 cmd);
394bool iwl_check_for_ct_kill(struct iwl_priv *priv);
395
396#ifdef CONFIG_IWLWIFI_DEBUGFS
397void iwl_reset_traffic_log(struct iwl_priv *priv);
398#endif /* CONFIG_IWLWIFI_DEBUGFS */
399
400#ifdef CONFIG_IWLWIFI_DEBUG
401void iwl_print_rx_config_cmd(struct iwl_priv *priv, u8 ctxid);
402#else
403static inline void iwl_print_rx_config_cmd(struct iwl_priv *priv, u8 ctxid);
404{
405}
406#endif
407
408#define IWL_CMD(x) case x: return #x
409#define IWL_MASK(lo, hi) ((1 << (hi)) | ((1 << (hi)) - (1 << (lo))))
367 410
368/***************************************************** 411/*****************************************************
369* DRIVER STATUS FUNCTIONS 412* DRIVER STATUS FUNCTIONS