Commit 0de76736 authored by Johannes Berg's avatar Johannes Berg Committed by Wey-Yi Guy

iwlwifi: clean up declarations

A number of declarations in iwl-core.h should
be in agn specific files, and also rename the
iwl-calib.h file to iwl-agn-calib.h to better
reflect that it belongs to agn.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
parent 14e8e4af
...@@ -43,7 +43,7 @@ ...@@ -43,7 +43,7 @@
#include "iwl-core.h" #include "iwl-core.h"
#include "iwl-io.h" #include "iwl-io.h"
#include "iwl-helpers.h" #include "iwl-helpers.h"
#include "iwl-calib.h" #include "iwl-agn-calib.h"
#include "iwl-sta.h" #include "iwl-sta.h"
#include "iwl-agn-led.h" #include "iwl-agn-led.h"
#include "iwl-agn.h" #include "iwl-agn.h"
......
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
#include "iwl-dev.h" #include "iwl-dev.h"
#include "iwl-core.h" #include "iwl-core.h"
#include "iwl-calib.h" #include "iwl-agn-calib.h"
/***************************************************************************** /*****************************************************************************
* INIT calibrations framework * INIT calibrations framework
......
...@@ -79,4 +79,8 @@ static inline void iwl_chain_noise_reset(struct iwl_priv *priv) ...@@ -79,4 +79,8 @@ static inline void iwl_chain_noise_reset(struct iwl_priv *priv)
priv->cfg->ops->utils->chain_noise_reset(priv); priv->cfg->ops->utils->chain_noise_reset(priv);
} }
int iwl_send_calib_results(struct iwl_priv *priv);
int iwl_calib_set(struct iwl_calib_result *res, const u8 *buf, int len);
void iwl_calib_free_results(struct iwl_priv *priv);
#endif /* __iwl_calib_h__ */ #endif /* __iwl_calib_h__ */
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "iwl-dev.h" #include "iwl-dev.h"
#include "iwl-core.h" #include "iwl-core.h"
#include "iwl-calib.h" #include "iwl-agn-calib.h"
#include "iwl-sta.h" #include "iwl-sta.h"
#include "iwl-io.h" #include "iwl-io.h"
#include "iwl-helpers.h" #include "iwl-helpers.h"
......
...@@ -38,6 +38,7 @@ ...@@ -38,6 +38,7 @@
#include "iwl-helpers.h" #include "iwl-helpers.h"
#include "iwl-agn-hw.h" #include "iwl-agn-hw.h"
#include "iwl-agn.h" #include "iwl-agn.h"
#include "iwl-agn-calib.h"
static const s8 iwlagn_default_queue_to_tx_fifo[] = { static const s8 iwlagn_default_queue_to_tx_fifo[] = {
IWL_TX_FIFO_VO, IWL_TX_FIFO_VO,
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#include "iwl-io.h" #include "iwl-io.h"
#include "iwl-helpers.h" #include "iwl-helpers.h"
#include "iwl-sta.h" #include "iwl-sta.h"
#include "iwl-calib.h" #include "iwl-agn-calib.h"
#include "iwl-agn.h" #include "iwl-agn.h"
......
...@@ -177,8 +177,15 @@ void iwlagn_rx_reply_rx(struct iwl_priv *priv, ...@@ -177,8 +177,15 @@ void iwlagn_rx_reply_rx(struct iwl_priv *priv,
struct iwl_rx_mem_buffer *rxb); struct iwl_rx_mem_buffer *rxb);
void iwlagn_rx_reply_rx_phy(struct iwl_priv *priv, void iwlagn_rx_reply_rx_phy(struct iwl_priv *priv,
struct iwl_rx_mem_buffer *rxb); struct iwl_rx_mem_buffer *rxb);
void iwl_rx_handle(struct iwl_priv *priv);
/* tx */ /* tx */
void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq);
int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv,
struct iwl_tx_queue *txq,
dma_addr_t addr, u16 len, u8 reset, u8 pad);
int iwl_hw_tx_queue_init(struct iwl_priv *priv,
struct iwl_tx_queue *txq);
void iwlagn_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags, void iwlagn_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags,
struct ieee80211_tx_info *info); struct ieee80211_tx_info *info);
int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb); int iwlagn_tx_skb(struct iwl_priv *priv, struct sk_buff *skb);
...@@ -289,4 +296,20 @@ void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id); ...@@ -289,4 +296,20 @@ void iwl_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id);
void iwl_sta_modify_sleep_tx_count(struct iwl_priv *priv, int sta_id, int cnt); void iwl_sta_modify_sleep_tx_count(struct iwl_priv *priv, int sta_id, int cnt);
int iwl_update_bcast_stations(struct iwl_priv *priv); int iwl_update_bcast_stations(struct iwl_priv *priv);
/* rate */
static inline u32 iwl_ant_idx_to_flags(u8 ant_idx)
{
return BIT(ant_idx) << RATE_MCS_ANT_POS;
}
static inline u8 iwl_hw_get_rate(__le32 rate_n_flags)
{
return le32_to_cpu(rate_n_flags) & 0xFF;
}
static inline __le32 iwl_hw_set_rate_n_flags(u8 rate, u32 flags)
{
return cpu_to_le32(flags|(u32)rate);
}
#endif /* __iwl_agn_h__ */ #endif /* __iwl_agn_h__ */
...@@ -396,7 +396,6 @@ struct iwl_cfg { ...@@ -396,7 +396,6 @@ struct iwl_cfg {
struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg, struct ieee80211_hw *iwl_alloc_all(struct iwl_cfg *cfg,
struct ieee80211_ops *hw_ops); struct ieee80211_ops *hw_ops);
void iwl_activate_qos(struct iwl_priv *priv);
int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue, int iwl_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
const struct ieee80211_tx_queue_params *params); const struct ieee80211_tx_queue_params *params);
int iwl_mac_tx_last_beacon(struct ieee80211_hw *hw); int iwl_mac_tx_last_beacon(struct ieee80211_hw *hw);
...@@ -505,7 +504,6 @@ void iwl_rx_reply_error(struct iwl_priv *priv, ...@@ -505,7 +504,6 @@ void iwl_rx_reply_error(struct iwl_priv *priv,
******************************************************/ ******************************************************/
void iwl_cmd_queue_free(struct iwl_priv *priv); void iwl_cmd_queue_free(struct iwl_priv *priv);
int iwl_rx_queue_alloc(struct iwl_priv *priv); int iwl_rx_queue_alloc(struct iwl_priv *priv);
void iwl_rx_handle(struct iwl_priv *priv);
void iwl_rx_queue_update_write_ptr(struct iwl_priv *priv, void iwl_rx_queue_update_write_ptr(struct iwl_priv *priv,
struct iwl_rx_queue *q); struct iwl_rx_queue *q);
int iwl_rx_queue_space(const struct iwl_rx_queue *q); int iwl_rx_queue_space(const struct iwl_rx_queue *q);
...@@ -523,12 +521,6 @@ void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb); ...@@ -523,12 +521,6 @@ void iwl_rx_csa(struct iwl_priv *priv, struct iwl_rx_mem_buffer *rxb);
/***************************************************** /*****************************************************
* TX * TX
******************************************************/ ******************************************************/
void iwl_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl_tx_queue *txq);
int iwl_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv,
struct iwl_tx_queue *txq,
dma_addr_t addr, u16 len, u8 reset, u8 pad);
int iwl_hw_tx_queue_init(struct iwl_priv *priv,
struct iwl_tx_queue *txq);
void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq); void iwl_txq_update_write_ptr(struct iwl_priv *priv, struct iwl_tx_queue *txq);
int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq,
int slots_num, u32 txq_id); int slots_num, u32 txq_id);
...@@ -547,24 +539,6 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force); ...@@ -547,24 +539,6 @@ int iwl_set_tx_power(struct iwl_priv *priv, s8 tx_power, bool force);
u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv, u8 iwl_rate_get_lowest_plcp(struct iwl_priv *priv,
struct iwl_rxon_context *ctx); struct iwl_rxon_context *ctx);
static inline u32 iwl_ant_idx_to_flags(u8 ant_idx)
{
return BIT(ant_idx) << RATE_MCS_ANT_POS;
}
static inline u8 iwl_hw_get_rate(__le32 rate_n_flags)
{
return le32_to_cpu(rate_n_flags) & 0xFF;
}
static inline u32 iwl_hw_get_rate_n_flags(__le32 rate_n_flags)
{
return le32_to_cpu(rate_n_flags) & 0x1FFFF;
}
static inline __le32 iwl_hw_set_rate_n_flags(u8 rate, u32 flags)
{
return cpu_to_le32(flags|(u32)rate);
}
/******************************************************************************* /*******************************************************************************
* Scanning * Scanning
******************************************************************************/ ******************************************************************************/
...@@ -600,13 +574,6 @@ void iwl_cancel_scan_deferred_work(struct iwl_priv *priv); ...@@ -600,13 +574,6 @@ void iwl_cancel_scan_deferred_work(struct iwl_priv *priv);
#define IWL_SCAN_CHECK_WATCHDOG (HZ * 7) #define IWL_SCAN_CHECK_WATCHDOG (HZ * 7)
/*******************************************************************************
* Calibrations - implemented in iwl-calib.c
******************************************************************************/
int iwl_send_calib_results(struct iwl_priv *priv);
int iwl_calib_set(struct iwl_calib_result *res, const u8 *buf, int len);
void iwl_calib_free_results(struct iwl_priv *priv);
/***************************************************** /*****************************************************
* S e n d i n g H o s t C o m m a n d s * * S e n d i n g H o s t C o m m a n d s *
*****************************************************/ *****************************************************/
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include "iwl-debug.h" #include "iwl-debug.h"
#include "iwl-core.h" #include "iwl-core.h"
#include "iwl-io.h" #include "iwl-io.h"
#include "iwl-calib.h"
/* create and remove of files */ /* create and remove of files */
#define DEBUGFS_ADD_FILE(name, parent, mode) do { \ #define DEBUGFS_ADD_FILE(name, parent, mode) do { \
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include "iwl-core.h" #include "iwl-core.h"
#include "iwl-sta.h" #include "iwl-sta.h"
#include "iwl-io.h" #include "iwl-io.h"
#include "iwl-calib.h"
#include "iwl-helpers.h" #include "iwl-helpers.h"
/************************** RX-FUNCTIONS ****************************/ /************************** RX-FUNCTIONS ****************************/
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment