iwlwifi: rename struct iwl4965_priv to struct iwl_priv
This patch renames iwl4965_priv to iwl_priv. iwl_priv will be shared by more hw. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
0a6857e70d
commit
c79dd5b5bc
@ -61,7 +61,7 @@
|
||||
|
||||
#define _iwl4965_write32(priv, ofs, val) writel((val), (priv)->hw_base + (ofs))
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline void __iwl4965_write32(const char *f, u32 l, struct iwl4965_priv *priv,
|
||||
static inline void __iwl4965_write32(const char *f, u32 l, struct iwl_priv *priv,
|
||||
u32 ofs, u32 val)
|
||||
{
|
||||
IWL_DEBUG_IO("write32(0x%08X, 0x%08X) - %s %d\n", ofs, val, f, l);
|
||||
@ -75,7 +75,7 @@ static inline void __iwl4965_write32(const char *f, u32 l, struct iwl4965_priv *
|
||||
|
||||
#define _iwl4965_read32(priv, ofs) readl((priv)->hw_base + (ofs))
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline u32 __iwl4965_read32(char *f, u32 l, struct iwl4965_priv *priv, u32 ofs)
|
||||
static inline u32 __iwl4965_read32(char *f, u32 l, struct iwl_priv *priv, u32 ofs)
|
||||
{
|
||||
IWL_DEBUG_IO("read_direct32(0x%08X) - %s %d\n", ofs, f, l);
|
||||
return _iwl4965_read32(priv, ofs);
|
||||
@ -85,7 +85,7 @@ static inline u32 __iwl4965_read32(char *f, u32 l, struct iwl4965_priv *priv, u3
|
||||
#define iwl4965_read32(p, o) _iwl4965_read32(p, o)
|
||||
#endif
|
||||
|
||||
static inline int _iwl4965_poll_bit(struct iwl4965_priv *priv, u32 addr,
|
||||
static inline int _iwl4965_poll_bit(struct iwl_priv *priv, u32 addr,
|
||||
u32 bits, u32 mask, int timeout)
|
||||
{
|
||||
int i = 0;
|
||||
@ -101,7 +101,7 @@ static inline int _iwl4965_poll_bit(struct iwl4965_priv *priv, u32 addr,
|
||||
}
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline int __iwl4965_poll_bit(const char *f, u32 l,
|
||||
struct iwl4965_priv *priv, u32 addr,
|
||||
struct iwl_priv *priv, u32 addr,
|
||||
u32 bits, u32 mask, int timeout)
|
||||
{
|
||||
int ret = _iwl4965_poll_bit(priv, addr, bits, mask, timeout);
|
||||
@ -116,13 +116,13 @@ static inline int __iwl4965_poll_bit(const char *f, u32 l,
|
||||
#define iwl4965_poll_bit(p, a, b, m, t) _iwl4965_poll_bit(p, a, b, m, t)
|
||||
#endif
|
||||
|
||||
static inline void _iwl4965_set_bit(struct iwl4965_priv *priv, u32 reg, u32 mask)
|
||||
static inline void _iwl4965_set_bit(struct iwl_priv *priv, u32 reg, u32 mask)
|
||||
{
|
||||
_iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) | mask);
|
||||
}
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline void __iwl4965_set_bit(const char *f, u32 l,
|
||||
struct iwl4965_priv *priv, u32 reg, u32 mask)
|
||||
struct iwl_priv *priv, u32 reg, u32 mask)
|
||||
{
|
||||
u32 val = _iwl4965_read32(priv, reg) | mask;
|
||||
IWL_DEBUG_IO("set_bit(0x%08X, 0x%08X) = 0x%08X\n", reg, mask, val);
|
||||
@ -133,13 +133,13 @@ static inline void __iwl4965_set_bit(const char *f, u32 l,
|
||||
#define iwl4965_set_bit(p, r, m) _iwl4965_set_bit(p, r, m)
|
||||
#endif
|
||||
|
||||
static inline void _iwl4965_clear_bit(struct iwl4965_priv *priv, u32 reg, u32 mask)
|
||||
static inline void _iwl4965_clear_bit(struct iwl_priv *priv, u32 reg, u32 mask)
|
||||
{
|
||||
_iwl4965_write32(priv, reg, _iwl4965_read32(priv, reg) & ~mask);
|
||||
}
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline void __iwl4965_clear_bit(const char *f, u32 l,
|
||||
struct iwl4965_priv *priv, u32 reg, u32 mask)
|
||||
struct iwl_priv *priv, u32 reg, u32 mask)
|
||||
{
|
||||
u32 val = _iwl4965_read32(priv, reg) & ~mask;
|
||||
IWL_DEBUG_IO("clear_bit(0x%08X, 0x%08X) = 0x%08X\n", reg, mask, val);
|
||||
@ -150,7 +150,7 @@ static inline void __iwl4965_clear_bit(const char *f, u32 l,
|
||||
#define iwl4965_clear_bit(p, r, m) _iwl4965_clear_bit(p, r, m)
|
||||
#endif
|
||||
|
||||
static inline int _iwl4965_grab_nic_access(struct iwl4965_priv *priv)
|
||||
static inline int _iwl4965_grab_nic_access(struct iwl_priv *priv)
|
||||
{
|
||||
int ret;
|
||||
u32 gp_ctl;
|
||||
@ -194,7 +194,7 @@ static inline int _iwl4965_grab_nic_access(struct iwl4965_priv *priv)
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline int __iwl4965_grab_nic_access(const char *f, u32 l,
|
||||
struct iwl4965_priv *priv)
|
||||
struct iwl_priv *priv)
|
||||
{
|
||||
if (atomic_read(&priv->restrict_refcnt))
|
||||
IWL_DEBUG_INFO("Grabbing access while already held at "
|
||||
@ -210,7 +210,7 @@ static inline int __iwl4965_grab_nic_access(const char *f, u32 l,
|
||||
_iwl4965_grab_nic_access(priv)
|
||||
#endif
|
||||
|
||||
static inline void _iwl4965_release_nic_access(struct iwl4965_priv *priv)
|
||||
static inline void _iwl4965_release_nic_access(struct iwl_priv *priv)
|
||||
{
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
if (atomic_dec_and_test(&priv->restrict_refcnt))
|
||||
@ -220,7 +220,7 @@ static inline void _iwl4965_release_nic_access(struct iwl4965_priv *priv)
|
||||
}
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline void __iwl4965_release_nic_access(const char *f, u32 l,
|
||||
struct iwl4965_priv *priv)
|
||||
struct iwl_priv *priv)
|
||||
{
|
||||
if (atomic_read(&priv->restrict_refcnt) <= 0)
|
||||
IWL_ERROR("Release unheld nic access at line %d.\n", l);
|
||||
@ -235,13 +235,13 @@ static inline void __iwl4965_release_nic_access(const char *f, u32 l,
|
||||
_iwl4965_release_nic_access(priv)
|
||||
#endif
|
||||
|
||||
static inline u32 _iwl4965_read_direct32(struct iwl4965_priv *priv, u32 reg)
|
||||
static inline u32 _iwl4965_read_direct32(struct iwl_priv *priv, u32 reg)
|
||||
{
|
||||
return _iwl4965_read32(priv, reg);
|
||||
}
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline u32 __iwl4965_read_direct32(const char *f, u32 l,
|
||||
struct iwl4965_priv *priv, u32 reg)
|
||||
struct iwl_priv *priv, u32 reg)
|
||||
{
|
||||
u32 value = _iwl4965_read_direct32(priv, reg);
|
||||
if (!atomic_read(&priv->restrict_refcnt))
|
||||
@ -256,14 +256,14 @@ static inline u32 __iwl4965_read_direct32(const char *f, u32 l,
|
||||
#define iwl4965_read_direct32 _iwl4965_read_direct32
|
||||
#endif
|
||||
|
||||
static inline void _iwl4965_write_direct32(struct iwl4965_priv *priv,
|
||||
static inline void _iwl4965_write_direct32(struct iwl_priv *priv,
|
||||
u32 reg, u32 value)
|
||||
{
|
||||
_iwl4965_write32(priv, reg, value);
|
||||
}
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static void __iwl4965_write_direct32(u32 line,
|
||||
struct iwl4965_priv *priv, u32 reg, u32 value)
|
||||
struct iwl_priv *priv, u32 reg, u32 value)
|
||||
{
|
||||
if (!atomic_read(&priv->restrict_refcnt))
|
||||
IWL_ERROR("Nic access not held from line %d\n", line);
|
||||
@ -275,7 +275,7 @@ static void __iwl4965_write_direct32(u32 line,
|
||||
#define iwl4965_write_direct32 _iwl4965_write_direct32
|
||||
#endif
|
||||
|
||||
static inline void iwl4965_write_reg_buf(struct iwl4965_priv *priv,
|
||||
static inline void iwl4965_write_reg_buf(struct iwl_priv *priv,
|
||||
u32 reg, u32 len, u32 *values)
|
||||
{
|
||||
u32 count = sizeof(u32);
|
||||
@ -286,7 +286,7 @@ static inline void iwl4965_write_reg_buf(struct iwl4965_priv *priv,
|
||||
}
|
||||
}
|
||||
|
||||
static inline int _iwl4965_poll_direct_bit(struct iwl4965_priv *priv,
|
||||
static inline int _iwl4965_poll_direct_bit(struct iwl_priv *priv,
|
||||
u32 addr, u32 mask, int timeout)
|
||||
{
|
||||
int i = 0;
|
||||
@ -303,7 +303,7 @@ static inline int _iwl4965_poll_direct_bit(struct iwl4965_priv *priv,
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline int __iwl4965_poll_direct_bit(const char *f, u32 l,
|
||||
struct iwl4965_priv *priv,
|
||||
struct iwl_priv *priv,
|
||||
u32 addr, u32 mask, int timeout)
|
||||
{
|
||||
int ret = _iwl4965_poll_direct_bit(priv, addr, mask, timeout);
|
||||
@ -322,13 +322,13 @@ static inline int __iwl4965_poll_direct_bit(const char *f, u32 l,
|
||||
#define iwl4965_poll_direct_bit _iwl4965_poll_direct_bit
|
||||
#endif
|
||||
|
||||
static inline u32 _iwl4965_read_prph(struct iwl4965_priv *priv, u32 reg)
|
||||
static inline u32 _iwl4965_read_prph(struct iwl_priv *priv, u32 reg)
|
||||
{
|
||||
_iwl4965_write_direct32(priv, HBUS_TARG_PRPH_RADDR, reg | (3 << 24));
|
||||
return _iwl4965_read_direct32(priv, HBUS_TARG_PRPH_RDAT);
|
||||
}
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline u32 __iwl4965_read_prph(u32 line, struct iwl4965_priv *priv, u32 reg)
|
||||
static inline u32 __iwl4965_read_prph(u32 line, struct iwl_priv *priv, u32 reg)
|
||||
{
|
||||
if (!atomic_read(&priv->restrict_refcnt))
|
||||
IWL_ERROR("Nic access not held from line %d\n", line);
|
||||
@ -341,7 +341,7 @@ static inline u32 __iwl4965_read_prph(u32 line, struct iwl4965_priv *priv, u32 r
|
||||
#define iwl4965_read_prph _iwl4965_read_prph
|
||||
#endif
|
||||
|
||||
static inline void _iwl4965_write_prph(struct iwl4965_priv *priv,
|
||||
static inline void _iwl4965_write_prph(struct iwl_priv *priv,
|
||||
u32 addr, u32 val)
|
||||
{
|
||||
_iwl4965_write_direct32(priv, HBUS_TARG_PRPH_WADDR,
|
||||
@ -349,7 +349,7 @@ static inline void _iwl4965_write_prph(struct iwl4965_priv *priv,
|
||||
_iwl4965_write_direct32(priv, HBUS_TARG_PRPH_WDAT, val);
|
||||
}
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline void __iwl4965_write_prph(u32 line, struct iwl4965_priv *priv,
|
||||
static inline void __iwl4965_write_prph(u32 line, struct iwl_priv *priv,
|
||||
u32 addr, u32 val)
|
||||
{
|
||||
if (!atomic_read(&priv->restrict_refcnt))
|
||||
@ -366,7 +366,7 @@ static inline void __iwl4965_write_prph(u32 line, struct iwl4965_priv *priv,
|
||||
#define _iwl4965_set_bits_prph(priv, reg, mask) \
|
||||
_iwl4965_write_prph(priv, reg, (_iwl4965_read_prph(priv, reg) | mask))
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline void __iwl4965_set_bits_prph(u32 line, struct iwl4965_priv *priv,
|
||||
static inline void __iwl4965_set_bits_prph(u32 line, struct iwl_priv *priv,
|
||||
u32 reg, u32 mask)
|
||||
{
|
||||
if (!atomic_read(&priv->restrict_refcnt))
|
||||
@ -385,7 +385,7 @@ static inline void __iwl4965_set_bits_prph(u32 line, struct iwl4965_priv *priv,
|
||||
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
static inline void __iwl4965_set_bits_mask_prph(u32 line,
|
||||
struct iwl4965_priv *priv, u32 reg, u32 bits, u32 mask)
|
||||
struct iwl_priv *priv, u32 reg, u32 bits, u32 mask)
|
||||
{
|
||||
if (!atomic_read(&priv->restrict_refcnt))
|
||||
IWL_ERROR("Nic access not held from line %d\n", line);
|
||||
@ -397,26 +397,26 @@ static inline void __iwl4965_set_bits_mask_prph(u32 line,
|
||||
#define iwl4965_set_bits_mask_prph _iwl4965_set_bits_mask_prph
|
||||
#endif
|
||||
|
||||
static inline void iwl4965_clear_bits_prph(struct iwl4965_priv
|
||||
static inline void iwl4965_clear_bits_prph(struct iwl_priv
|
||||
*priv, u32 reg, u32 mask)
|
||||
{
|
||||
u32 val = _iwl4965_read_prph(priv, reg);
|
||||
_iwl4965_write_prph(priv, reg, (val & ~mask));
|
||||
}
|
||||
|
||||
static inline u32 iwl4965_read_targ_mem(struct iwl4965_priv *priv, u32 addr)
|
||||
static inline u32 iwl4965_read_targ_mem(struct iwl_priv *priv, u32 addr)
|
||||
{
|
||||
iwl4965_write_direct32(priv, HBUS_TARG_MEM_RADDR, addr);
|
||||
return iwl4965_read_direct32(priv, HBUS_TARG_MEM_RDAT);
|
||||
}
|
||||
|
||||
static inline void iwl4965_write_targ_mem(struct iwl4965_priv *priv, u32 addr, u32 val)
|
||||
static inline void iwl4965_write_targ_mem(struct iwl_priv *priv, u32 addr, u32 val)
|
||||
{
|
||||
iwl4965_write_direct32(priv, HBUS_TARG_MEM_WADDR, addr);
|
||||
iwl4965_write_direct32(priv, HBUS_TARG_MEM_WDAT, val);
|
||||
}
|
||||
|
||||
static inline void iwl4965_write_targ_mem_buf(struct iwl4965_priv *priv, u32 addr,
|
||||
static inline void iwl4965_write_targ_mem_buf(struct iwl_priv *priv, u32 addr,
|
||||
u32 len, u32 *values)
|
||||
{
|
||||
iwl4965_write_direct32(priv, HBUS_TARG_MEM_WADDR, addr);
|
||||
|
@ -162,11 +162,11 @@ struct iwl4965_lq_sta {
|
||||
struct dentry *rs_sta_dbgfs_tx_agg_tid_en_file;
|
||||
#endif
|
||||
struct iwl4965_rate dbg_fixed;
|
||||
struct iwl4965_priv *drv;
|
||||
struct iwl_priv *drv;
|
||||
#endif
|
||||
};
|
||||
|
||||
static void rs_rate_scale_perform(struct iwl4965_priv *priv,
|
||||
static void rs_rate_scale_perform(struct iwl_priv *priv,
|
||||
struct net_device *dev,
|
||||
struct ieee80211_hdr *hdr,
|
||||
struct sta_info *sta);
|
||||
@ -229,7 +229,7 @@ static s32 expected_tpt_mimo40MHzSGI[IWL_RATE_COUNT] = {
|
||||
0, 0, 0, 0, 131, 131, 191, 222, 242, 270, 284, 289, 293
|
||||
};
|
||||
|
||||
static int iwl4965_lq_sync_callback(struct iwl4965_priv *priv,
|
||||
static int iwl4965_lq_sync_callback(struct iwl_priv *priv,
|
||||
struct iwl4965_cmd *cmd, struct sk_buff *skb)
|
||||
{
|
||||
/*We didn't cache the SKB; let the caller free it */
|
||||
@ -241,7 +241,7 @@ static inline u8 iwl4965_rate_get_rate(u32 rate_n_flags)
|
||||
return (u8)(rate_n_flags & 0xFF);
|
||||
}
|
||||
|
||||
static int rs_send_lq_cmd(struct iwl4965_priv *priv,
|
||||
static int rs_send_lq_cmd(struct iwl_priv *priv,
|
||||
struct iwl4965_link_quality_cmd *lq, u8 flags)
|
||||
{
|
||||
#ifdef CONFIG_IWLWIFI_DEBUG
|
||||
@ -388,7 +388,7 @@ static u32 rs_tl_get_load(struct iwl4965_lq_sta *lq_data, u8 tid)
|
||||
return tl->total;
|
||||
}
|
||||
|
||||
static void rs_tl_turn_on_agg_for_tid(struct iwl4965_priv *priv,
|
||||
static void rs_tl_turn_on_agg_for_tid(struct iwl_priv *priv,
|
||||
struct iwl4965_lq_sta *lq_data, u8 tid,
|
||||
struct sta_info *sta)
|
||||
{
|
||||
@ -407,7 +407,7 @@ static void rs_tl_turn_on_agg_for_tid(struct iwl4965_priv *priv,
|
||||
}
|
||||
}
|
||||
|
||||
static void rs_tl_turn_on_agg(struct iwl4965_priv *priv, u8 tid,
|
||||
static void rs_tl_turn_on_agg(struct iwl_priv *priv, u8 tid,
|
||||
struct iwl4965_lq_sta *lq_data,
|
||||
struct sta_info *sta)
|
||||
{
|
||||
@ -658,7 +658,7 @@ static inline void rs_toggle_antenna(struct iwl4965_rate *new_rate,
|
||||
}
|
||||
}
|
||||
|
||||
static inline u8 rs_use_green(struct iwl4965_priv *priv,
|
||||
static inline u8 rs_use_green(struct iwl_priv *priv,
|
||||
struct ieee80211_conf *conf)
|
||||
{
|
||||
#ifdef CONFIG_IWL4965_HT
|
||||
@ -821,7 +821,7 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
|
||||
struct iwl4965_link_quality_cmd *table;
|
||||
struct sta_info *sta;
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
struct iwl4965_priv *priv = (struct iwl4965_priv *)priv_rate;
|
||||
struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
|
||||
struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
|
||||
struct ieee80211_hw *hw = local_to_hw(local);
|
||||
struct iwl4965_rate_scale_data *window = NULL;
|
||||
@ -1128,7 +1128,7 @@ static void rs_get_expected_tpt_table(struct iwl4965_lq_sta *lq_sta,
|
||||
* to decrease to match "active" throughput. When moving from MIMO to SISO,
|
||||
* bit rate will typically need to increase, but not if performance was bad.
|
||||
*/
|
||||
static s32 rs_get_best_rate(struct iwl4965_priv *priv,
|
||||
static s32 rs_get_best_rate(struct iwl_priv *priv,
|
||||
struct iwl4965_lq_sta *lq_sta,
|
||||
struct iwl4965_scale_tbl_info *tbl, /* "search" */
|
||||
u16 rate_mask, s8 index, s8 rate)
|
||||
@ -1226,7 +1226,7 @@ static inline u8 rs_is_both_ant_supp(u8 valid_antenna)
|
||||
/*
|
||||
* Set up search table for MIMO
|
||||
*/
|
||||
static int rs_switch_to_mimo(struct iwl4965_priv *priv,
|
||||
static int rs_switch_to_mimo(struct iwl_priv *priv,
|
||||
struct iwl4965_lq_sta *lq_sta,
|
||||
struct ieee80211_conf *conf,
|
||||
struct sta_info *sta,
|
||||
@ -1291,7 +1291,7 @@ static int rs_switch_to_mimo(struct iwl4965_priv *priv,
|
||||
/*
|
||||
* Set up search table for SISO
|
||||
*/
|
||||
static int rs_switch_to_siso(struct iwl4965_priv *priv,
|
||||
static int rs_switch_to_siso(struct iwl_priv *priv,
|
||||
struct iwl4965_lq_sta *lq_sta,
|
||||
struct ieee80211_conf *conf,
|
||||
struct sta_info *sta,
|
||||
@ -1354,7 +1354,7 @@ static int rs_switch_to_siso(struct iwl4965_priv *priv,
|
||||
/*
|
||||
* Try to switch to new modulation mode from legacy
|
||||
*/
|
||||
static int rs_move_legacy_other(struct iwl4965_priv *priv,
|
||||
static int rs_move_legacy_other(struct iwl_priv *priv,
|
||||
struct iwl4965_lq_sta *lq_sta,
|
||||
struct ieee80211_conf *conf,
|
||||
struct sta_info *sta,
|
||||
@ -1452,7 +1452,7 @@ static int rs_move_legacy_other(struct iwl4965_priv *priv,
|
||||
/*
|
||||
* Try to switch to new modulation mode from SISO
|
||||
*/
|
||||
static int rs_move_siso_to_other(struct iwl4965_priv *priv,
|
||||
static int rs_move_siso_to_other(struct iwl_priv *priv,
|
||||
struct iwl4965_lq_sta *lq_sta,
|
||||
struct ieee80211_conf *conf,
|
||||
struct sta_info *sta,
|
||||
@ -1548,7 +1548,7 @@ static int rs_move_siso_to_other(struct iwl4965_priv *priv,
|
||||
/*
|
||||
* Try to switch to new modulation mode from MIMO
|
||||
*/
|
||||
static int rs_move_mimo_to_other(struct iwl4965_priv *priv,
|
||||
static int rs_move_mimo_to_other(struct iwl_priv *priv,
|
||||
struct iwl4965_lq_sta *lq_sta,
|
||||
struct ieee80211_conf *conf,
|
||||
struct sta_info *sta,
|
||||
@ -1728,7 +1728,7 @@ static void rs_stay_in_table(struct iwl4965_lq_sta *lq_sta)
|
||||
/*
|
||||
* Do rate scaling and search for new modulation mode.
|
||||
*/
|
||||
static void rs_rate_scale_perform(struct iwl4965_priv *priv,
|
||||
static void rs_rate_scale_perform(struct iwl_priv *priv,
|
||||
struct net_device *dev,
|
||||
struct ieee80211_hdr *hdr,
|
||||
struct sta_info *sta)
|
||||
@ -2148,7 +2148,7 @@ static void rs_rate_scale_perform(struct iwl4965_priv *priv,
|
||||
}
|
||||
|
||||
|
||||
static void rs_initialize_lq(struct iwl4965_priv *priv,
|
||||
static void rs_initialize_lq(struct iwl_priv *priv,
|
||||
struct ieee80211_conf *conf,
|
||||
struct sta_info *sta)
|
||||
{
|
||||
@ -2213,7 +2213,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
|
||||
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
|
||||
struct sta_info *sta;
|
||||
u16 fc;
|
||||
struct iwl4965_priv *priv = (struct iwl4965_priv *)priv_rate;
|
||||
struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
|
||||
struct iwl4965_lq_sta *lq_sta;
|
||||
|
||||
IWL_DEBUG_RATE_LIMIT("rate scale calculate new rate for skb\n");
|
||||
@ -2294,7 +2294,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
|
||||
int i, j;
|
||||
struct ieee80211_conf *conf = &local->hw.conf;
|
||||
struct ieee80211_supported_band *sband;
|
||||
struct iwl4965_priv *priv = (struct iwl4965_priv *)priv_rate;
|
||||
struct iwl_priv *priv = (struct iwl_priv *)priv_rate;
|
||||
struct iwl4965_lq_sta *lq_sta = priv_sta;
|
||||
|
||||
sband = local->hw.wiphy->bands[local->hw.conf.channel->band];
|
||||
@ -2516,7 +2516,7 @@ static void rs_free(void *priv_rate)
|
||||
|
||||
static void rs_clear(void *priv_rate)
|
||||
{
|
||||
struct iwl4965_priv *priv = (struct iwl4965_priv *) priv_rate;
|
||||
struct iwl_priv *priv = (struct iwl_priv *) priv_rate;
|
||||
|
||||
IWL_DEBUG_RATE("enter\n");
|
||||
|
||||
@ -2726,7 +2726,7 @@ static struct rate_control_ops rs_ops = {
|
||||
int iwl4965_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
|
||||
{
|
||||
struct ieee80211_local *local = hw_to_local(hw);
|
||||
struct iwl4965_priv *priv = hw->priv;
|
||||
struct iwl_priv *priv = hw->priv;
|
||||
struct iwl4965_lq_sta *lq_sta;
|
||||
struct sta_info *sta;
|
||||
int cnt = 0, i;
|
||||
@ -2816,7 +2816,7 @@ int iwl4965_fill_rs_info(struct ieee80211_hw *hw, char *buf, u8 sta_id)
|
||||
|
||||
void iwl4965_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
|
||||
{
|
||||
struct iwl4965_priv *priv = hw->priv;
|
||||
struct iwl_priv *priv = hw->priv;
|
||||
|
||||
priv->lq_mngr.lq_ready = 1;
|
||||
}
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include "iwl-4965.h"
|
||||
#include "iwl-helpers.h"
|
||||
|
||||
static void iwl4965_hw_card_show_info(struct iwl4965_priv *priv);
|
||||
static void iwl4965_hw_card_show_info(struct iwl_priv *priv);
|
||||
|
||||
#define IWL_DECLARE_RATE_INFO(r, s, ip, in, rp, rn, pp, np) \
|
||||
[IWL_RATE_##r##M_INDEX] = { IWL_RATE_##r##M_PLCP, \
|
||||
@ -111,7 +111,7 @@ static int is_fat_channel(__le32 rxon_flags)
|
||||
(rxon_flags & RXON_FLG_CHANNEL_MODE_MIXED_MSK);
|
||||
}
|
||||
|
||||
static u8 is_single_stream(struct iwl4965_priv *priv)
|
||||
static u8 is_single_stream(struct iwl_priv *priv)
|
||||
{
|
||||
#ifdef CONFIG_IWL4965_HT
|
||||
if (!priv->current_ht_config.is_ht ||
|
||||
@ -155,7 +155,7 @@ int iwl4965_hwrate_to_plcp_idx(u32 rate_n_flags)
|
||||
/**
|
||||
* translate ucode response to mac80211 tx status control values
|
||||
*/
|
||||
void iwl4965_hwrate_to_tx_control(struct iwl4965_priv *priv, u32 rate_n_flags,
|
||||
void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv, u32 rate_n_flags,
|
||||
struct ieee80211_tx_control *control)
|
||||
{
|
||||
int rate_index;
|
||||
@ -188,7 +188,7 @@ void iwl4965_hwrate_to_tx_control(struct iwl4965_priv *priv, u32 rate_n_flags,
|
||||
* MIMO (dual stream) requires at least 2, but works better with 3.
|
||||
* This does not determine *which* chains to use, just how many.
|
||||
*/
|
||||
static int iwl4965_get_rx_chain_counter(struct iwl4965_priv *priv,
|
||||
static int iwl4965_get_rx_chain_counter(struct iwl_priv *priv,
|
||||
u8 *idle_state, u8 *rx_state)
|
||||
{
|
||||
u8 is_single = is_single_stream(priv);
|
||||
@ -217,7 +217,7 @@ static int iwl4965_get_rx_chain_counter(struct iwl4965_priv *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl4965_hw_rxq_stop(struct iwl4965_priv *priv)
|
||||
int iwl4965_hw_rxq_stop(struct iwl_priv *priv)
|
||||
{
|
||||
int rc;
|
||||
unsigned long flags;
|
||||
@ -242,7 +242,7 @@ int iwl4965_hw_rxq_stop(struct iwl4965_priv *priv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
u8 iwl4965_hw_find_station(struct iwl4965_priv *priv, const u8 *addr)
|
||||
u8 iwl4965_hw_find_station(struct iwl_priv *priv, const u8 *addr)
|
||||
{
|
||||
int i;
|
||||
int start = 0;
|
||||
@ -274,7 +274,7 @@ u8 iwl4965_hw_find_station(struct iwl4965_priv *priv, const u8 *addr)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int iwl4965_nic_set_pwr_src(struct iwl4965_priv *priv, int pwr_max)
|
||||
static int iwl4965_nic_set_pwr_src(struct iwl_priv *priv, int pwr_max)
|
||||
{
|
||||
int ret;
|
||||
unsigned long flags;
|
||||
@ -307,7 +307,7 @@ static int iwl4965_nic_set_pwr_src(struct iwl4965_priv *priv, int pwr_max)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int iwl4965_rx_init(struct iwl4965_priv *priv, struct iwl4965_rx_queue *rxq)
|
||||
static int iwl4965_rx_init(struct iwl_priv *priv, struct iwl4965_rx_queue *rxq)
|
||||
{
|
||||
int rc;
|
||||
unsigned long flags;
|
||||
@ -360,7 +360,7 @@ static int iwl4965_rx_init(struct iwl4965_priv *priv, struct iwl4965_rx_queue *r
|
||||
}
|
||||
|
||||
/* Tell 4965 where to find the "keep warm" buffer */
|
||||
static int iwl4965_kw_init(struct iwl4965_priv *priv)
|
||||
static int iwl4965_kw_init(struct iwl_priv *priv)
|
||||
{
|
||||
unsigned long flags;
|
||||
int rc;
|
||||
@ -378,7 +378,7 @@ static int iwl4965_kw_init(struct iwl4965_priv *priv)
|
||||
return rc;
|
||||
}
|
||||
|
||||
static int iwl4965_kw_alloc(struct iwl4965_priv *priv)
|
||||
static int iwl4965_kw_alloc(struct iwl_priv *priv)
|
||||
{
|
||||
struct pci_dev *dev = priv->pci_dev;
|
||||
struct iwl4965_kw *kw = &priv->kw;
|
||||
@ -399,7 +399,7 @@ static int iwl4965_kw_alloc(struct iwl4965_priv *priv)
|
||||
*
|
||||
* Does not set up a command, or touch hardware.
|
||||
*/
|
||||
int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv,
|
||||
int iwl4965_set_fat_chan_info(struct iwl_priv *priv,
|
||||
enum ieee80211_band band, u16 channel,
|
||||
const struct iwl4965_eeprom_channel *eeprom_ch,
|
||||
u8 fat_extension_channel)
|
||||
@ -443,7 +443,7 @@ int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv,
|
||||
/**
|
||||
* iwl4965_kw_free - Free the "keep warm" buffer
|
||||
*/
|
||||
static void iwl4965_kw_free(struct iwl4965_priv *priv)
|
||||
static void iwl4965_kw_free(struct iwl_priv *priv)
|
||||
{
|
||||
struct pci_dev *dev = priv->pci_dev;
|
||||
struct iwl4965_kw *kw = &priv->kw;
|
||||
@ -461,7 +461,7 @@ static void iwl4965_kw_free(struct iwl4965_priv *priv)
|
||||
* @param priv
|
||||
* @return error code
|
||||
*/
|
||||
static int iwl4965_txq_ctx_reset(struct iwl4965_priv *priv)
|
||||
static int iwl4965_txq_ctx_reset(struct iwl_priv *priv)
|
||||
{
|
||||
int rc = 0;
|
||||
int txq_id, slots_num;
|
||||
@ -523,7 +523,7 @@ static int iwl4965_txq_ctx_reset(struct iwl4965_priv *priv)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int iwl4965_hw_nic_init(struct iwl4965_priv *priv)
|
||||
int iwl4965_hw_nic_init(struct iwl_priv *priv)
|
||||
{
|
||||
int rc;
|
||||
unsigned long flags;
|
||||
@ -668,7 +668,7 @@ int iwl4965_hw_nic_init(struct iwl4965_priv *priv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl4965_hw_nic_stop_master(struct iwl4965_priv *priv)
|
||||
int iwl4965_hw_nic_stop_master(struct iwl_priv *priv)
|
||||
{
|
||||
int rc = 0;
|
||||
u32 reg_val;
|
||||
@ -704,7 +704,7 @@ int iwl4965_hw_nic_stop_master(struct iwl4965_priv *priv)
|
||||
/**
|
||||
* iwl4965_hw_txq_ctx_stop - Stop all Tx DMA channels, free Tx queue memory
|
||||
*/
|
||||
void iwl4965_hw_txq_ctx_stop(struct iwl4965_priv *priv)
|
||||
void iwl4965_hw_txq_ctx_stop(struct iwl_priv *priv)
|
||||
{
|
||||
|
||||
int txq_id;
|
||||
@ -732,7 +732,7 @@ void iwl4965_hw_txq_ctx_stop(struct iwl4965_priv *priv)
|
||||
iwl4965_hw_txq_ctx_free(priv);
|
||||
}
|
||||
|
||||
int iwl4965_hw_nic_reset(struct iwl4965_priv *priv)
|
||||
int iwl4965_hw_nic_reset(struct iwl_priv *priv)
|
||||
{
|
||||
int rc = 0;
|
||||
unsigned long flags;
|
||||
@ -793,7 +793,7 @@ int iwl4965_hw_nic_reset(struct iwl4965_priv *priv)
|
||||
*/
|
||||
static void iwl4965_bg_statistics_periodic(unsigned long data)
|
||||
{
|
||||
struct iwl4965_priv *priv = (struct iwl4965_priv *)data;
|
||||
struct iwl_priv *priv = (struct iwl_priv *)data;
|
||||
|
||||
queue_work(priv->workqueue, &priv->statistics_work);
|
||||
}
|
||||
@ -805,7 +805,7 @@ static void iwl4965_bg_statistics_periodic(unsigned long data)
|
||||
*/
|
||||
static void iwl4965_bg_statistics_work(struct work_struct *work)
|
||||
{
|
||||
struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv,
|
||||
struct iwl_priv *priv = container_of(work, struct iwl_priv,
|
||||
statistics_work);
|
||||
|
||||
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
|
||||
@ -819,7 +819,7 @@ static void iwl4965_bg_statistics_work(struct work_struct *work)
|
||||
#define CT_LIMIT_CONST 259
|
||||
#define TM_CT_KILL_THRESHOLD 110
|
||||
|
||||
void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv)
|
||||
void iwl4965_rf_kill_ct_config(struct iwl_priv *priv)
|
||||
{
|
||||
struct iwl4965_ct_kill_config cmd;
|
||||
u32 R1, R2, R3;
|
||||
@ -865,7 +865,7 @@ void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv)
|
||||
* enough to receive all of our own network traffic, but not so
|
||||
* high that our DSP gets too busy trying to lock onto non-network
|
||||
* activity/noise. */
|
||||
static int iwl4965_sens_energy_cck(struct iwl4965_priv *priv,
|
||||
static int iwl4965_sens_energy_cck(struct iwl_priv *priv,
|
||||
u32 norm_fa,
|
||||
u32 rx_enable_time,
|
||||
struct statistics_general_data *rx_info)
|
||||
@ -1056,7 +1056,7 @@ static int iwl4965_sens_energy_cck(struct iwl4965_priv *priv,
|
||||
}
|
||||
|
||||
|
||||
static int iwl4965_sens_auto_corr_ofdm(struct iwl4965_priv *priv,
|
||||
static int iwl4965_sens_auto_corr_ofdm(struct iwl_priv *priv,
|
||||
u32 norm_fa,
|
||||
u32 rx_enable_time)
|
||||
{
|
||||
@ -1121,7 +1121,7 @@ static int iwl4965_sens_auto_corr_ofdm(struct iwl4965_priv *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int iwl4965_sensitivity_callback(struct iwl4965_priv *priv,
|
||||
static int iwl4965_sensitivity_callback(struct iwl_priv *priv,
|
||||
struct iwl4965_cmd *cmd, struct sk_buff *skb)
|
||||
{
|
||||
/* We didn't cache the SKB; let the caller free it */
|
||||
@ -1129,7 +1129,7 @@ static int iwl4965_sensitivity_callback(struct iwl4965_priv *priv,
|
||||
}
|
||||
|
||||
/* Prepare a SENSITIVITY_CMD, send to uCode if values have changed */
|
||||
static int iwl4965_sensitivity_write(struct iwl4965_priv *priv, u8 flags)
|
||||
static int iwl4965_sensitivity_write(struct iwl_priv *priv, u8 flags)
|
||||
{
|
||||
int rc = 0;
|
||||
struct iwl4965_sensitivity_cmd cmd ;
|
||||
@ -1206,7 +1206,7 @@ static int iwl4965_sensitivity_write(struct iwl4965_priv *priv, u8 flags)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags, u8 force)
|
||||
void iwl4965_init_sensitivity(struct iwl_priv *priv, u8 flags, u8 force)
|
||||
{
|
||||
int rc = 0;
|
||||
int i;
|
||||
@ -1264,7 +1264,7 @@ void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags, u8 force)
|
||||
/* Reset differential Rx gains in NIC to prepare for chain noise calibration.
|
||||
* Called after every association, but this runs only once!
|
||||
* ... once chain noise is calibrated the first time, it's good forever. */
|
||||
void iwl4965_chain_noise_reset(struct iwl4965_priv *priv)
|
||||
void iwl4965_chain_noise_reset(struct iwl_priv *priv)
|
||||
{
|
||||
struct iwl4965_chain_noise_data *data = NULL;
|
||||
int rc = 0;
|
||||
@ -1293,7 +1293,7 @@ void iwl4965_chain_noise_reset(struct iwl4965_priv *priv)
|
||||
* 1) Which antennas are connected.
|
||||
* 2) Differential rx gain settings to balance the 3 receivers.
|
||||
*/
|
||||
static void iwl4965_noise_calibration(struct iwl4965_priv *priv,
|
||||
static void iwl4965_noise_calibration(struct iwl_priv *priv,
|
||||
struct iwl4965_notif_statistics *stat_resp)
|
||||
{
|
||||
struct iwl4965_chain_noise_data *data = NULL;
|
||||
@ -1526,7 +1526,7 @@ static void iwl4965_noise_calibration(struct iwl4965_priv *priv,
|
||||
return;
|
||||
}
|
||||
|
||||
static void iwl4965_sensitivity_calibration(struct iwl4965_priv *priv,
|
||||
static void iwl4965_sensitivity_calibration(struct iwl_priv *priv,
|
||||
struct iwl4965_notif_statistics *resp)
|
||||
{
|
||||
int rc = 0;
|
||||
@ -1633,7 +1633,7 @@ static void iwl4965_sensitivity_calibration(struct iwl4965_priv *priv,
|
||||
|
||||
static void iwl4965_bg_sensitivity_work(struct work_struct *work)
|
||||
{
|
||||
struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv,
|
||||
struct iwl_priv *priv = container_of(work, struct iwl_priv,
|
||||
sensitivity_work);
|
||||
|
||||
mutex_lock(&priv->mutex);
|
||||
@ -1663,7 +1663,7 @@ static void iwl4965_bg_sensitivity_work(struct work_struct *work)
|
||||
|
||||
static void iwl4965_bg_txpower_work(struct work_struct *work)
|
||||
{
|
||||
struct iwl4965_priv *priv = container_of(work, struct iwl4965_priv,
|
||||
struct iwl_priv *priv = container_of(work, struct iwl_priv,
|
||||
txpower_work);
|
||||
|
||||
/* If a scan happened to start before we got here
|
||||
@ -1691,7 +1691,7 @@ static void iwl4965_bg_txpower_work(struct work_struct *work)
|
||||
/*
|
||||
* Acquire priv->lock before calling this function !
|
||||
*/
|
||||
static void iwl4965_set_wr_ptrs(struct iwl4965_priv *priv, int txq_id, u32 index)
|
||||
static void iwl4965_set_wr_ptrs(struct iwl_priv *priv, int txq_id, u32 index)
|
||||
{
|
||||
iwl4965_write_direct32(priv, HBUS_TARG_WRPTR,
|
||||
(index & 0xff) | (txq_id << 8));
|
||||
@ -1705,7 +1705,7 @@ static void iwl4965_set_wr_ptrs(struct iwl4965_priv *priv, int txq_id, u32 index
|
||||
*
|
||||
* NOTE: Acquire priv->lock before calling this function !
|
||||
*/
|
||||
static void iwl4965_tx_queue_set_status(struct iwl4965_priv *priv,
|
||||
static void iwl4965_tx_queue_set_status(struct iwl_priv *priv,
|
||||
struct iwl4965_tx_queue *txq,
|
||||
int tx_fifo_id, int scd_retry)
|
||||
{
|
||||
@ -1739,17 +1739,17 @@ static const u16 default_queue_to_tx_fifo[] = {
|
||||
IWL_TX_FIFO_HCCA_2
|
||||
};
|
||||
|
||||
static inline void iwl4965_txq_ctx_activate(struct iwl4965_priv *priv, int txq_id)
|
||||
static inline void iwl4965_txq_ctx_activate(struct iwl_priv *priv, int txq_id)
|
||||
{
|
||||
set_bit(txq_id, &priv->txq_ctx_active_msk);
|
||||
}
|
||||
|
||||
static inline void iwl4965_txq_ctx_deactivate(struct iwl4965_priv *priv, int txq_id)
|
||||
static inline void iwl4965_txq_ctx_deactivate(struct iwl_priv *priv, int txq_id)
|
||||
{
|
||||
clear_bit(txq_id, &priv->txq_ctx_active_msk);
|
||||
}
|
||||
|
||||
int iwl4965_alive_notify(struct iwl4965_priv *priv)
|
||||
int iwl4965_alive_notify(struct iwl_priv *priv)
|
||||
{
|
||||
u32 a;
|
||||
int i = 0;
|
||||
@ -1841,7 +1841,7 @@ int iwl4965_alive_notify(struct iwl4965_priv *priv)
|
||||
*
|
||||
* Called when initializing driver
|
||||
*/
|
||||
int iwl4965_hw_set_hw_setting(struct iwl4965_priv *priv)
|
||||
int iwl4965_hw_set_hw_setting(struct iwl_priv *priv)
|
||||
{
|
||||
/* Allocate area for Tx byte count tables and Rx queue status */
|
||||
priv->hw_setting.shared_virt =
|
||||
@ -1876,7 +1876,7 @@ int iwl4965_hw_set_hw_setting(struct iwl4965_priv *priv)
|
||||
*
|
||||
* Destroy all TX DMA queues and structures
|
||||
*/
|
||||
void iwl4965_hw_txq_ctx_free(struct iwl4965_priv *priv)
|
||||
void iwl4965_hw_txq_ctx_free(struct iwl_priv *priv)
|
||||
{
|
||||
int txq_id;
|
||||
|
||||
@ -1894,7 +1894,7 @@ void iwl4965_hw_txq_ctx_free(struct iwl4965_priv *priv)
|
||||
* Does NOT advance any TFD circular buffer read/write indexes
|
||||
* Does NOT free the TFD itself (which is within circular buffer)
|
||||
*/
|
||||
int iwl4965_hw_txq_free_tfd(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq)
|
||||
int iwl4965_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl4965_tx_queue *txq)
|
||||
{
|
||||
struct iwl4965_tfd_frame *bd_tmp = (struct iwl4965_tfd_frame *)&txq->bd[0];
|
||||
struct iwl4965_tfd_frame *bd = &bd_tmp[txq->q.read_ptr];
|
||||
@ -1947,7 +1947,7 @@ int iwl4965_hw_txq_free_tfd(struct iwl4965_priv *priv, struct iwl4965_tx_queue *
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl4965_hw_reg_set_txpower(struct iwl4965_priv *priv, s8 power)
|
||||
int iwl4965_hw_reg_set_txpower(struct iwl_priv *priv, s8 power)
|
||||
{
|
||||
IWL_ERROR("TODO: Implement iwl4965_hw_reg_set_txpower!\n");
|
||||
return -EINVAL;
|
||||
@ -2003,7 +2003,7 @@ static s32 iwl4965_get_voltage_compensation(s32 eeprom_voltage,
|
||||
}
|
||||
|
||||
static const struct iwl4965_channel_info *
|
||||
iwl4965_get_channel_txpower_info(struct iwl4965_priv *priv,
|
||||
iwl4965_get_channel_txpower_info(struct iwl_priv *priv,
|
||||
enum ieee80211_band band, u16 channel)
|
||||
{
|
||||
const struct iwl4965_channel_info *ch_info;
|
||||
@ -2042,7 +2042,7 @@ static s32 iwl4965_get_tx_atten_grp(u16 channel)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static u32 iwl4965_get_sub_band(const struct iwl4965_priv *priv, u32 channel)
|
||||
static u32 iwl4965_get_sub_band(const struct iwl_priv *priv, u32 channel)
|
||||
{
|
||||
s32 b = -1;
|
||||
|
||||
@ -2078,7 +2078,7 @@ static s32 iwl4965_interpolate_value(s32 x, s32 x1, s32 y1, s32 x2, s32 y2)
|
||||
* differences in channel frequencies, which is proportional to differences
|
||||
* in channel number.
|
||||
*/
|
||||
static int iwl4965_interpolate_chan(struct iwl4965_priv *priv, u32 channel,
|
||||
static int iwl4965_interpolate_chan(struct iwl_priv *priv, u32 channel,
|
||||
struct iwl4965_eeprom_calib_ch_info *chan_info)
|
||||
{
|
||||
s32 s = -1;
|
||||
@ -2411,7 +2411,7 @@ static const struct gain_entry gain_table[2][108] = {
|
||||
}
|
||||
};
|
||||
|
||||
static int iwl4965_fill_txpower_tbl(struct iwl4965_priv *priv, u8 band, u16 channel,
|
||||
static int iwl4965_fill_txpower_tbl(struct iwl_priv *priv, u8 band, u16 channel,
|
||||
u8 is_fat, u8 ctrl_chan_high,
|
||||
struct iwl4965_tx_power_db *tx_power_tbl)
|
||||
{
|
||||
@ -2668,7 +2668,7 @@ static int iwl4965_fill_txpower_tbl(struct iwl4965_priv *priv, u8 band, u16 chan
|
||||
* Uses the active RXON for channel, band, and characteristics (fat, high)
|
||||
* The power limit is taken from priv->user_txpower_limit.
|
||||
*/
|
||||
int iwl4965_hw_reg_send_txpower(struct iwl4965_priv *priv)
|
||||
int iwl4965_hw_reg_send_txpower(struct iwl_priv *priv)
|
||||
{
|
||||
struct iwl4965_txpowertable_cmd cmd = { 0 };
|
||||
int rc = 0;
|
||||
@ -2705,7 +2705,7 @@ int iwl4965_hw_reg_send_txpower(struct iwl4965_priv *priv)
|
||||
return rc;
|
||||
}
|
||||
|
||||
int iwl4965_hw_channel_switch(struct iwl4965_priv *priv, u16 channel)
|
||||
int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel)
|
||||
{
|
||||
int rc;
|
||||
u8 band = 0;
|
||||
@ -2749,7 +2749,7 @@ int iwl4965_hw_channel_switch(struct iwl4965_priv *priv, u16 channel)
|
||||
#define RTS_HCCA_RETRY_LIMIT 3
|
||||
#define RTS_DFAULT_RETRY_LIMIT 60
|
||||
|
||||
void iwl4965_hw_build_tx_cmd_rate(struct iwl4965_priv *priv,
|
||||
void iwl4965_hw_build_tx_cmd_rate(struct iwl_priv *priv,
|
||||
struct iwl4965_cmd *cmd,
|
||||
struct ieee80211_tx_control *ctrl,
|
||||
struct ieee80211_hdr *hdr, int sta_id,
|
||||
@ -2816,19 +2816,19 @@ void iwl4965_hw_build_tx_cmd_rate(struct iwl4965_priv *priv,
|
||||
tx->rate_n_flags = iwl4965_hw_set_rate_n_flags(rate_plcp, rate_flags);
|
||||
}
|
||||
|
||||
int iwl4965_hw_get_rx_read(struct iwl4965_priv *priv)
|
||||
int iwl4965_hw_get_rx_read(struct iwl_priv *priv)
|
||||
{
|
||||
struct iwl4965_shared *shared_data = priv->hw_setting.shared_virt;
|
||||
|
||||
return IWL_GET_BITS(*shared_data, rb_closed_stts_rb_num);
|
||||
}
|
||||
|
||||
int iwl4965_hw_get_temperature(struct iwl4965_priv *priv)
|
||||
int iwl4965_hw_get_temperature(struct iwl_priv *priv)
|
||||
{
|
||||
return priv->temperature;
|
||||
}
|
||||
|
||||
unsigned int iwl4965_hw_get_beacon_cmd(struct iwl4965_priv *priv,
|
||||
unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv,
|
||||
struct iwl4965_frame *frame, u8 rate)
|
||||
{
|
||||
struct iwl4965_tx_beacon_cmd *tx_beacon_cmd;
|
||||
@ -2867,7 +2867,7 @@ unsigned int iwl4965_hw_get_beacon_cmd(struct iwl4965_priv *priv,
|
||||
* 4965 supports up to 16 Tx queues in DRAM, mapped to up to 8 Tx DMA
|
||||
* channels supported in hardware.
|
||||
*/
|
||||
int iwl4965_hw_tx_queue_init(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq)
|
||||
int iwl4965_hw_tx_queue_init(struct iwl_priv *priv, struct iwl4965_tx_queue *txq)
|
||||
{
|
||||
int rc;
|
||||
unsigned long flags;
|
||||
@ -2895,7 +2895,7 @@ int iwl4965_hw_tx_queue_init(struct iwl4965_priv *priv, struct iwl4965_tx_queue
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv *priv, void *ptr,
|
||||
int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *ptr,
|
||||
dma_addr_t addr, u16 len)
|
||||
{
|
||||
int index, is_odd;
|
||||
@ -2929,7 +2929,7 @@ int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv *priv, void *ptr,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void iwl4965_hw_card_show_info(struct iwl4965_priv *priv)
|
||||
static void iwl4965_hw_card_show_info(struct iwl_priv *priv)
|
||||
{
|
||||
u16 hw_version = priv->eeprom.board_revision_4965;
|
||||
|
||||
@ -2947,7 +2947,7 @@ static void iwl4965_hw_card_show_info(struct iwl4965_priv *priv)
|
||||
/**
|
||||
* iwl4965_tx_queue_update_wr_ptr - Set up entry in Tx byte-count array
|
||||
*/
|
||||
int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv,
|
||||
int iwl4965_tx_queue_update_wr_ptr(struct iwl_priv *priv,
|
||||
struct iwl4965_tx_queue *txq, u16 byte_cnt)
|
||||
{
|
||||
int len;
|
||||
@ -2978,7 +2978,7 @@ int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv,
|
||||
* Selects how many and which Rx receivers/antennas/chains to use.
|
||||
* This should not be used for scan command ... it puts data in wrong place.
|
||||
*/
|
||||
void iwl4965_set_rxon_chain(struct iwl4965_priv *priv)
|
||||
void iwl4965_set_rxon_chain(struct iwl_priv *priv)
|
||||
{
|
||||
u8 is_single = is_single_stream(priv);
|
||||
u8 idle_state, rx_state;
|
||||
@ -3031,7 +3031,7 @@ static s32 sign_extend(u32 oper, int index)
|
||||
*
|
||||
* A return of <0 indicates bogus data in the statistics
|
||||
*/
|
||||
int iwl4965_get_temperature(const struct iwl4965_priv *priv)
|
||||
int iwl4965_get_temperature(const struct iwl_priv *priv)
|
||||
{
|
||||
s32 temperature;
|
||||
s32 vt;
|
||||
@ -3099,7 +3099,7 @@ int iwl4965_get_temperature(const struct iwl4965_priv *priv)
|
||||
* Assumes caller will replace priv->last_temperature once calibration
|
||||
* executed.
|
||||
*/
|
||||
static int iwl4965_is_temp_calib_needed(struct iwl4965_priv *priv)
|
||||
static int iwl4965_is_temp_calib_needed(struct iwl_priv *priv)
|
||||
{
|
||||
int temp_diff;
|
||||
|
||||
@ -3132,7 +3132,7 @@ static int iwl4965_is_temp_calib_needed(struct iwl4965_priv *priv)
|
||||
/* Calculate noise level, based on measurements during network silence just
|
||||
* before arriving beacon. This measurement can be done only if we know
|
||||
* exactly when to expect beacons, therefore only when we're associated. */
|
||||
static void iwl4965_rx_calc_noise(struct iwl4965_priv *priv)
|
||||
static void iwl4965_rx_calc_noise(struct iwl_priv *priv)
|
||||
{
|
||||
struct statistics_rx_non_phy *rx_info
|
||||
= &(priv->statistics.rx.general);
|
||||
@ -3169,7 +3169,7 @@ static void iwl4965_rx_calc_noise(struct iwl4965_priv *priv)
|
||||
priv->last_rx_noise);
|
||||
}
|
||||
|
||||
void iwl4965_hw_rx_statistics(struct iwl4965_priv *priv, struct iwl4965_rx_mem_buffer *rxb)
|
||||
void iwl4965_hw_rx_statistics(struct iwl_priv *priv, struct iwl4965_rx_mem_buffer *rxb)
|
||||
{
|
||||
struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
|
||||
int change;
|
||||
@ -3233,7 +3233,7 @@ void iwl4965_hw_rx_statistics(struct iwl4965_priv *priv, struct iwl4965_rx_mem_b
|
||||
queue_work(priv->workqueue, &priv->txpower_work);
|
||||
}
|
||||
|
||||
static void iwl4965_add_radiotap(struct iwl4965_priv *priv,
|
||||
static void iwl4965_add_radiotap(struct iwl_priv *priv,
|
||||
struct sk_buff *skb,
|
||||
struct iwl4965_rx_phy_res *rx_start,
|
||||
struct ieee80211_rx_status *stats,
|
||||
@ -3337,7 +3337,7 @@ static void iwl4965_add_radiotap(struct iwl4965_priv *priv,
|
||||
stats->flag |= RX_FLAG_RADIOTAP;
|
||||
}
|
||||
|
||||
static void iwl4965_handle_data_packet(struct iwl4965_priv *priv, int is_data,
|
||||
static void iwl4965_handle_data_packet(struct iwl_priv *priv, int is_data,
|
||||
int include_phy,
|
||||
struct iwl4965_rx_mem_buffer *rxb,
|
||||
struct ieee80211_rx_status *stats)
|
||||
@ -3552,7 +3552,7 @@ void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
|
||||
}
|
||||
#endif /* CONFIG_IWL4965_HT */
|
||||
|
||||
static void iwl4965_sta_modify_ps_wake(struct iwl4965_priv *priv, int sta_id)
|
||||
static void iwl4965_sta_modify_ps_wake(struct iwl_priv *priv, int sta_id)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -3566,7 +3566,7 @@ static void iwl4965_sta_modify_ps_wake(struct iwl4965_priv *priv, int sta_id)
|
||||
iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
|
||||
}
|
||||
|
||||
static void iwl4965_update_ps_mode(struct iwl4965_priv *priv, u16 ps_bit, u8 *addr)
|
||||
static void iwl4965_update_ps_mode(struct iwl_priv *priv, u16 ps_bit, u8 *addr)
|
||||
{
|
||||
/* FIXME: need locking over ps_status ??? */
|
||||
u8 sta_id = iwl4965_hw_find_station(priv, addr);
|
||||
@ -3595,7 +3595,7 @@ static void iwl4965_update_ps_mode(struct iwl4965_priv *priv, u16 ps_bit, u8 *ad
|
||||
* TODO: This was originally written for 3945, need to audit for
|
||||
* proper operation with 4965.
|
||||
*/
|
||||
static void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
|
||||
static void iwl4965_dbg_report_frame(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_packet *pkt,
|
||||
struct ieee80211_hdr *header, int group100)
|
||||
{
|
||||
@ -3729,7 +3729,7 @@ static void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
|
||||
iwl_print_hex_dump(IWL_DL_RX, data, length);
|
||||
}
|
||||
#else
|
||||
static inline void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
|
||||
static inline void iwl4965_dbg_report_frame(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_packet *pkt,
|
||||
struct ieee80211_hdr *header,
|
||||
int group100)
|
||||
@ -3742,7 +3742,7 @@ static inline void iwl4965_dbg_report_frame(struct iwl4965_priv *priv,
|
||||
|
||||
/* Called for REPLY_4965_RX (legacy ABG frames), or
|
||||
* REPLY_RX_MPDU_CMD (HT high-throughput N frames). */
|
||||
static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv,
|
||||
static void iwl4965_rx_reply_rx(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_mem_buffer *rxb)
|
||||
{
|
||||
struct ieee80211_hdr *header;
|
||||
@ -4004,7 +4004,7 @@ static void iwl4965_rx_reply_rx(struct iwl4965_priv *priv,
|
||||
|
||||
/* Cache phy data (Rx signal strength, etc) for HT frame (REPLY_RX_PHY_CMD).
|
||||
* This will be used later in iwl4965_rx_reply_rx() for REPLY_RX_MPDU_CMD. */
|
||||
static void iwl4965_rx_reply_rx_phy(struct iwl4965_priv *priv,
|
||||
static void iwl4965_rx_reply_rx_phy(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_mem_buffer *rxb)
|
||||
{
|
||||
struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
|
||||
@ -4013,7 +4013,7 @@ static void iwl4965_rx_reply_rx_phy(struct iwl4965_priv *priv,
|
||||
sizeof(struct iwl4965_rx_phy_res));
|
||||
}
|
||||
|
||||
static void iwl4965_rx_missed_beacon_notif(struct iwl4965_priv *priv,
|
||||
static void iwl4965_rx_missed_beacon_notif(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_mem_buffer *rxb)
|
||||
|
||||
{
|
||||
@ -4040,7 +4040,7 @@ static void iwl4965_rx_missed_beacon_notif(struct iwl4965_priv *priv,
|
||||
/**
|
||||
* iwl4965_sta_modify_enable_tid_tx - Enable Tx for this TID in station table
|
||||
*/
|
||||
static void iwl4965_sta_modify_enable_tid_tx(struct iwl4965_priv *priv,
|
||||
static void iwl4965_sta_modify_enable_tid_tx(struct iwl_priv *priv,
|
||||
int sta_id, int tid)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -4061,7 +4061,7 @@ static void iwl4965_sta_modify_enable_tid_tx(struct iwl4965_priv *priv,
|
||||
* Go through block-ack's bitmap of ACK'd frames, update driver's record of
|
||||
* ACK vs. not. This gets sent to mac80211, then to rate scaling algo.
|
||||
*/
|
||||
static int iwl4965_tx_status_reply_compressed_ba(struct iwl4965_priv *priv,
|
||||
static int iwl4965_tx_status_reply_compressed_ba(struct iwl_priv *priv,
|
||||
struct iwl4965_ht_agg *agg,
|
||||
struct iwl4965_compressed_ba_resp*
|
||||
ba_resp)
|
||||
@ -4126,7 +4126,7 @@ static int iwl4965_tx_status_reply_compressed_ba(struct iwl4965_priv *priv,
|
||||
/**
|
||||
* iwl4965_tx_queue_stop_scheduler - Stop queue, but keep configuration
|
||||
*/
|
||||
static void iwl4965_tx_queue_stop_scheduler(struct iwl4965_priv *priv,
|
||||
static void iwl4965_tx_queue_stop_scheduler(struct iwl_priv *priv,
|
||||
u16 txq_id)
|
||||
{
|
||||
/* Simply stop the queue, but don't change any configuration;
|
||||
@ -4141,7 +4141,7 @@ static void iwl4965_tx_queue_stop_scheduler(struct iwl4965_priv *priv,
|
||||
* txq_id must be greater than IWL_BACK_QUEUE_FIRST_ID
|
||||
* priv->lock must be held by the caller
|
||||
*/
|
||||
static int iwl4965_tx_queue_agg_disable(struct iwl4965_priv *priv, u16 txq_id,
|
||||
static int iwl4965_tx_queue_agg_disable(struct iwl_priv *priv, u16 txq_id,
|
||||
u16 ssn_idx, u8 tx_fifo)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -4174,7 +4174,7 @@ static int iwl4965_tx_queue_agg_disable(struct iwl4965_priv *priv, u16 txq_id,
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iwl4965_check_empty_hw_queue(struct iwl4965_priv *priv, int sta_id,
|
||||
int iwl4965_check_empty_hw_queue(struct iwl_priv *priv, int sta_id,
|
||||
u8 tid, int txq_id)
|
||||
{
|
||||
struct iwl4965_queue *q = &priv->txq[txq_id].q;
|
||||
@ -4224,7 +4224,7 @@ static inline int iwl4965_queue_dec_wrap(int index, int n_bd)
|
||||
* Handles block-acknowledge notification from device, which reports success
|
||||
* of frames sent via aggregation.
|
||||
*/
|
||||
static void iwl4965_rx_reply_compressed_ba(struct iwl4965_priv *priv,
|
||||
static void iwl4965_rx_reply_compressed_ba(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_mem_buffer *rxb)
|
||||
{
|
||||
struct iwl4965_rx_packet *pkt = (void *)rxb->skb->data;
|
||||
@ -4292,7 +4292,7 @@ static void iwl4965_rx_reply_compressed_ba(struct iwl4965_priv *priv,
|
||||
/**
|
||||
* iwl4965_tx_queue_set_q2ratid - Map unique receiver/tid combination to a queue
|
||||
*/
|
||||
static int iwl4965_tx_queue_set_q2ratid(struct iwl4965_priv *priv, u16 ra_tid,
|
||||
static int iwl4965_tx_queue_set_q2ratid(struct iwl_priv *priv, u16 ra_tid,
|
||||
u16 txq_id)
|
||||
{
|
||||
u32 tbl_dw_addr;
|
||||
@ -4323,7 +4323,7 @@ static int iwl4965_tx_queue_set_q2ratid(struct iwl4965_priv *priv, u16 ra_tid,
|
||||
* NOTE: txq_id must be greater than IWL_BACK_QUEUE_FIRST_ID,
|
||||
* i.e. it must be one of the higher queues used for aggregation
|
||||
*/
|
||||
static int iwl4965_tx_queue_agg_enable(struct iwl4965_priv *priv, int txq_id,
|
||||
static int iwl4965_tx_queue_agg_enable(struct iwl_priv *priv, int txq_id,
|
||||
int tx_fifo, int sta_id, int tid,
|
||||
u16 ssn_idx)
|
||||
{
|
||||
@ -4400,7 +4400,7 @@ static int iwl4965_tx_queue_agg_enable(struct iwl4965_priv *priv, int txq_id,
|
||||
* calling this function (which runs REPLY_TX_LINK_QUALITY_CMD,
|
||||
* which requires station table entry to exist).
|
||||
*/
|
||||
void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr, int is_ap)
|
||||
void iwl4965_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
|
||||
{
|
||||
int i, r;
|
||||
struct iwl4965_link_quality_cmd link_cmd = {
|
||||
@ -4445,7 +4445,7 @@ void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr, int is_ap)
|
||||
|
||||
#ifdef CONFIG_IWL4965_HT
|
||||
|
||||
static u8 iwl4965_is_channel_extension(struct iwl4965_priv *priv,
|
||||
static u8 iwl4965_is_channel_extension(struct iwl_priv *priv,
|
||||
enum ieee80211_band band,
|
||||
u16 channel, u8 extension_chan_offset)
|
||||
{
|
||||
@ -4465,7 +4465,7 @@ static u8 iwl4965_is_channel_extension(struct iwl4965_priv *priv,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static u8 iwl4965_is_fat_tx_allowed(struct iwl4965_priv *priv,
|
||||
static u8 iwl4965_is_fat_tx_allowed(struct iwl_priv *priv,
|
||||
struct ieee80211_ht_info *sta_ht_inf)
|
||||
{
|
||||
struct iwl_ht_info *iwl_ht_conf = &priv->current_ht_config;
|
||||
@ -4486,7 +4486,7 @@ static u8 iwl4965_is_fat_tx_allowed(struct iwl4965_priv *priv,
|
||||
iwl_ht_conf->extension_chan_offset));
|
||||
}
|
||||
|
||||
void iwl4965_set_rxon_ht(struct iwl4965_priv *priv, struct iwl_ht_info *ht_info)
|
||||
void iwl4965_set_rxon_ht(struct iwl_priv *priv, struct iwl_ht_info *ht_info)
|
||||
{
|
||||
struct iwl4965_rxon_cmd *rxon = &priv->staging_rxon;
|
||||
u32 val;
|
||||
@ -4540,7 +4540,7 @@ void iwl4965_set_rxon_ht(struct iwl4965_priv *priv, struct iwl_ht_info *ht_info)
|
||||
return;
|
||||
}
|
||||
|
||||
void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
|
||||
void iwl4965_set_ht_add_station(struct iwl_priv *priv, u8 index,
|
||||
struct ieee80211_ht_info *sta_ht_inf)
|
||||
{
|
||||
__le32 sta_flags;
|
||||
@ -4585,7 +4585,7 @@ void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
|
||||
return;
|
||||
}
|
||||
|
||||
static void iwl4965_sta_modify_add_ba_tid(struct iwl4965_priv *priv,
|
||||
static void iwl4965_sta_modify_add_ba_tid(struct iwl_priv *priv,
|
||||
int sta_id, int tid, u16 ssn)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -4601,7 +4601,7 @@ static void iwl4965_sta_modify_add_ba_tid(struct iwl4965_priv *priv,
|
||||
iwl4965_send_add_station(priv, &priv->stations[sta_id].sta, CMD_ASYNC);
|
||||
}
|
||||
|
||||
static void iwl4965_sta_modify_del_ba_tid(struct iwl4965_priv *priv,
|
||||
static void iwl4965_sta_modify_del_ba_tid(struct iwl_priv *priv,
|
||||
int sta_id, int tid)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -4622,7 +4622,7 @@ static void iwl4965_sta_modify_del_ba_tid(struct iwl4965_priv *priv,
|
||||
* Should never return anything < 7, because they should already
|
||||
* be in use as EDCA AC (0-3), Command (4), HCCA (5, 6).
|
||||
*/
|
||||
static int iwl4965_txq_ctx_activate_free(struct iwl4965_priv *priv)
|
||||
static int iwl4965_txq_ctx_activate_free(struct iwl_priv *priv)
|
||||
{
|
||||
int txq_id;
|
||||
|
||||
@ -4635,7 +4635,7 @@ static int iwl4965_txq_ctx_activate_free(struct iwl4965_priv *priv)
|
||||
static int iwl4965_mac_ht_tx_agg_start(struct ieee80211_hw *hw, const u8 *da,
|
||||
u16 tid, u16 *start_seq_num)
|
||||
{
|
||||
struct iwl4965_priv *priv = hw->priv;
|
||||
struct iwl_priv *priv = hw->priv;
|
||||
int sta_id;
|
||||
int tx_fifo;
|
||||
int txq_id;
|
||||
@ -4695,7 +4695,7 @@ static int iwl4965_mac_ht_tx_agg_stop(struct ieee80211_hw *hw, const u8 *da,
|
||||
u16 tid)
|
||||
{
|
||||
|
||||
struct iwl4965_priv *priv = hw->priv;
|
||||
struct iwl_priv *priv = hw->priv;
|
||||
int tx_fifo_id, txq_id, sta_id, ssn = -1;
|
||||
struct iwl4965_tid_data *tid_data;
|
||||
int ret, write_ptr, read_ptr;
|
||||
@ -4756,7 +4756,7 @@ int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
|
||||
enum ieee80211_ampdu_mlme_action action,
|
||||
const u8 *addr, u16 tid, u16 *ssn)
|
||||
{
|
||||
struct iwl4965_priv *priv = hw->priv;
|
||||
struct iwl_priv *priv = hw->priv;
|
||||
int sta_id;
|
||||
DECLARE_MAC_BUF(mac);
|
||||
|
||||
@ -4789,7 +4789,7 @@ int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
|
||||
#endif /* CONFIG_IWL4965_HT */
|
||||
|
||||
/* Set up 4965-specific Rx frame reply handlers */
|
||||
void iwl4965_hw_rx_handler_setup(struct iwl4965_priv *priv)
|
||||
void iwl4965_hw_rx_handler_setup(struct iwl_priv *priv)
|
||||
{
|
||||
/* Legacy Rx frames */
|
||||
priv->rx_handlers[REPLY_4965_RX] = iwl4965_rx_reply_rx;
|
||||
@ -4806,7 +4806,7 @@ void iwl4965_hw_rx_handler_setup(struct iwl4965_priv *priv)
|
||||
#endif /* CONFIG_IWL4965_HT */
|
||||
}
|
||||
|
||||
void iwl4965_hw_setup_deferred_work(struct iwl4965_priv *priv)
|
||||
void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv)
|
||||
{
|
||||
INIT_WORK(&priv->txpower_work, iwl4965_bg_txpower_work);
|
||||
INIT_WORK(&priv->statistics_work, iwl4965_bg_statistics_work);
|
||||
@ -4818,7 +4818,7 @@ void iwl4965_hw_setup_deferred_work(struct iwl4965_priv *priv)
|
||||
priv->statistics_periodic.function = iwl4965_bg_statistics_periodic;
|
||||
}
|
||||
|
||||
void iwl4965_hw_cancel_deferred_work(struct iwl4965_priv *priv)
|
||||
void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv)
|
||||
{
|
||||
del_timer_sync(&priv->statistics_periodic);
|
||||
|
||||
|
@ -315,13 +315,13 @@ enum {
|
||||
};
|
||||
|
||||
struct iwl4965_cmd;
|
||||
struct iwl4965_priv;
|
||||
struct iwl_priv;
|
||||
|
||||
struct iwl4965_cmd_meta {
|
||||
struct iwl4965_cmd_meta *source;
|
||||
union {
|
||||
struct sk_buff *skb;
|
||||
int (*callback)(struct iwl4965_priv *priv,
|
||||
int (*callback)(struct iwl_priv *priv,
|
||||
struct iwl4965_cmd *cmd, struct sk_buff *skb);
|
||||
} __attribute__ ((packed)) u;
|
||||
|
||||
@ -634,40 +634,40 @@ struct iwl4965_driver_hw_info {
|
||||
*
|
||||
*****************************************************************************/
|
||||
struct iwl4965_addsta_cmd;
|
||||
extern int iwl4965_send_add_station(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_send_add_station(struct iwl_priv *priv,
|
||||
struct iwl4965_addsta_cmd *sta, u8 flags);
|
||||
extern u8 iwl4965_add_station_flags(struct iwl4965_priv *priv, const u8 *addr,
|
||||
extern u8 iwl4965_add_station_flags(struct iwl_priv *priv, const u8 *addr,
|
||||
int is_ap, u8 flags, void *ht_data);
|
||||
extern int iwl4965_is_network_packet(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_is_network_packet(struct iwl_priv *priv,
|
||||
struct ieee80211_hdr *header);
|
||||
extern int iwl4965_power_init_handle(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_handle_data_packet_monitor(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_power_init_handle(struct iwl_priv *priv);
|
||||
extern void iwl4965_handle_data_packet_monitor(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_mem_buffer *rxb,
|
||||
void *data, short len,
|
||||
struct ieee80211_rx_status *stats,
|
||||
u16 phy_flags);
|
||||
extern int iwl4965_is_duplicate_packet(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_is_duplicate_packet(struct iwl_priv *priv,
|
||||
struct ieee80211_hdr *header);
|
||||
extern int iwl4965_rx_queue_alloc(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_rx_queue_reset(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_rx_queue_alloc(struct iwl_priv *priv);
|
||||
extern void iwl4965_rx_queue_reset(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_queue *rxq);
|
||||
extern int iwl4965_calc_db_from_ratio(int sig_ratio);
|
||||
extern int iwl4965_calc_sig_qual(int rssi_dbm, int noise_dbm);
|
||||
extern int iwl4965_tx_queue_init(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_tx_queue_init(struct iwl_priv *priv,
|
||||
struct iwl4965_tx_queue *txq, int count, u32 id);
|
||||
extern void iwl4965_rx_replenish(void *data);
|
||||
extern void iwl4965_tx_queue_free(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq);
|
||||
extern int iwl4965_send_cmd_pdu(struct iwl4965_priv *priv, u8 id, u16 len,
|
||||
extern void iwl4965_tx_queue_free(struct iwl_priv *priv, struct iwl4965_tx_queue *txq);
|
||||
extern int iwl4965_send_cmd_pdu(struct iwl_priv *priv, u8 id, u16 len,
|
||||
const void *data);
|
||||
extern int __must_check iwl4965_send_cmd(struct iwl4965_priv *priv,
|
||||
extern int __must_check iwl4965_send_cmd(struct iwl_priv *priv,
|
||||
struct iwl4965_host_cmd *cmd);
|
||||
extern unsigned int iwl4965_fill_beacon_frame(struct iwl4965_priv *priv,
|
||||
extern unsigned int iwl4965_fill_beacon_frame(struct iwl_priv *priv,
|
||||
struct ieee80211_hdr *hdr,
|
||||
const u8 *dest, int left);
|
||||
extern int iwl4965_rx_queue_update_write_ptr(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_rx_queue_update_write_ptr(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_queue *q);
|
||||
extern int iwl4965_send_statistics_request(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_set_decrypted_flag(struct iwl4965_priv *priv, struct sk_buff *skb,
|
||||
extern int iwl4965_send_statistics_request(struct iwl_priv *priv);
|
||||
extern void iwl4965_set_decrypted_flag(struct iwl_priv *priv, struct sk_buff *skb,
|
||||
u32 decrypt_res,
|
||||
struct ieee80211_rx_status *stats);
|
||||
extern __le16 *ieee80211_get_qos_ctrl(struct ieee80211_hdr *hdr);
|
||||
@ -678,7 +678,7 @@ extern const u8 iwl4965_broadcast_addr[ETH_ALEN];
|
||||
* Currently used by iwl-3945-rs... look at restructuring so that it doesn't
|
||||
* call this... todo... fix that.
|
||||
*/
|
||||
extern u8 iwl4965_sync_station(struct iwl4965_priv *priv, int sta_id,
|
||||
extern u8 iwl4965_sync_station(struct iwl_priv *priv, int sta_id,
|
||||
u16 tx_rate, u8 flags);
|
||||
|
||||
/******************************************************************************
|
||||
@ -697,36 +697,36 @@ extern u8 iwl4965_sync_station(struct iwl4965_priv *priv, int sta_id,
|
||||
* iwl4965_mac_ <-- mac80211 callback
|
||||
*
|
||||
****************************************************************************/
|
||||
extern void iwl4965_hw_rx_handler_setup(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_hw_setup_deferred_work(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_hw_cancel_deferred_work(struct iwl4965_priv *priv);
|
||||
extern int iwl4965_hw_rxq_stop(struct iwl4965_priv *priv);
|
||||
extern int iwl4965_hw_set_hw_setting(struct iwl4965_priv *priv);
|
||||
extern int iwl4965_hw_nic_init(struct iwl4965_priv *priv);
|
||||
extern int iwl4965_hw_nic_stop_master(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_hw_txq_ctx_free(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_hw_txq_ctx_stop(struct iwl4965_priv *priv);
|
||||
extern int iwl4965_hw_nic_reset(struct iwl4965_priv *priv);
|
||||
extern int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl4965_priv *priv, void *tfd,
|
||||
extern void iwl4965_hw_rx_handler_setup(struct iwl_priv *priv);
|
||||
extern void iwl4965_hw_setup_deferred_work(struct iwl_priv *priv);
|
||||
extern void iwl4965_hw_cancel_deferred_work(struct iwl_priv *priv);
|
||||
extern int iwl4965_hw_rxq_stop(struct iwl_priv *priv);
|
||||
extern int iwl4965_hw_set_hw_setting(struct iwl_priv *priv);
|
||||
extern int iwl4965_hw_nic_init(struct iwl_priv *priv);
|
||||
extern int iwl4965_hw_nic_stop_master(struct iwl_priv *priv);
|
||||
extern void iwl4965_hw_txq_ctx_free(struct iwl_priv *priv);
|
||||
extern void iwl4965_hw_txq_ctx_stop(struct iwl_priv *priv);
|
||||
extern int iwl4965_hw_nic_reset(struct iwl_priv *priv);
|
||||
extern int iwl4965_hw_txq_attach_buf_to_tfd(struct iwl_priv *priv, void *tfd,
|
||||
dma_addr_t addr, u16 len);
|
||||
extern int iwl4965_hw_txq_free_tfd(struct iwl4965_priv *priv, struct iwl4965_tx_queue *txq);
|
||||
extern int iwl4965_hw_get_temperature(struct iwl4965_priv *priv);
|
||||
extern int iwl4965_hw_tx_queue_init(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_hw_txq_free_tfd(struct iwl_priv *priv, struct iwl4965_tx_queue *txq);
|
||||
extern int iwl4965_hw_get_temperature(struct iwl_priv *priv);
|
||||
extern int iwl4965_hw_tx_queue_init(struct iwl_priv *priv,
|
||||
struct iwl4965_tx_queue *txq);
|
||||
extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl4965_priv *priv,
|
||||
extern unsigned int iwl4965_hw_get_beacon_cmd(struct iwl_priv *priv,
|
||||
struct iwl4965_frame *frame, u8 rate);
|
||||
extern int iwl4965_hw_get_rx_read(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_hw_build_tx_cmd_rate(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_hw_get_rx_read(struct iwl_priv *priv);
|
||||
extern void iwl4965_hw_build_tx_cmd_rate(struct iwl_priv *priv,
|
||||
struct iwl4965_cmd *cmd,
|
||||
struct ieee80211_tx_control *ctrl,
|
||||
struct ieee80211_hdr *hdr,
|
||||
int sta_id, int tx_id);
|
||||
extern int iwl4965_hw_reg_send_txpower(struct iwl4965_priv *priv);
|
||||
extern int iwl4965_hw_reg_set_txpower(struct iwl4965_priv *priv, s8 power);
|
||||
extern void iwl4965_hw_rx_statistics(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_hw_reg_send_txpower(struct iwl_priv *priv);
|
||||
extern int iwl4965_hw_reg_set_txpower(struct iwl_priv *priv, s8 power);
|
||||
extern void iwl4965_hw_rx_statistics(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_mem_buffer *rxb);
|
||||
extern void iwl4965_disable_events(struct iwl4965_priv *priv);
|
||||
extern int iwl4965_get_temperature(const struct iwl4965_priv *priv);
|
||||
extern void iwl4965_disable_events(struct iwl_priv *priv);
|
||||
extern int iwl4965_get_temperature(const struct iwl_priv *priv);
|
||||
|
||||
/**
|
||||
* iwl4965_hw_find_station - Find station id for a given BSSID
|
||||
@ -736,48 +736,48 @@ extern int iwl4965_get_temperature(const struct iwl4965_priv *priv);
|
||||
* not yet been merged into a single common layer for managing the
|
||||
* station tables.
|
||||
*/
|
||||
extern u8 iwl4965_hw_find_station(struct iwl4965_priv *priv, const u8 *bssid);
|
||||
extern u8 iwl4965_hw_find_station(struct iwl_priv *priv, const u8 *bssid);
|
||||
|
||||
extern int iwl4965_hw_channel_switch(struct iwl4965_priv *priv, u16 channel);
|
||||
extern int iwl4965_tx_queue_reclaim(struct iwl4965_priv *priv, int txq_id, int index);
|
||||
extern int iwl4965_hw_channel_switch(struct iwl_priv *priv, u16 channel);
|
||||
extern int iwl4965_tx_queue_reclaim(struct iwl_priv *priv, int txq_id, int index);
|
||||
extern int iwl4965_queue_space(const struct iwl4965_queue *q);
|
||||
struct iwl4965_priv;
|
||||
struct iwl_priv;
|
||||
|
||||
/*
|
||||
* Forward declare iwl-4965.c functions for iwl-base.c
|
||||
*/
|
||||
extern int iwl4965_tx_queue_update_wr_ptr(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_tx_queue_update_wr_ptr(struct iwl_priv *priv,
|
||||
struct iwl4965_tx_queue *txq,
|
||||
u16 byte_cnt);
|
||||
extern void iwl4965_add_station(struct iwl4965_priv *priv, const u8 *addr,
|
||||
extern void iwl4965_add_station(struct iwl_priv *priv, const u8 *addr,
|
||||
int is_ap);
|
||||
extern void iwl4965_set_rxon_chain(struct iwl4965_priv *priv);
|
||||
extern int iwl4965_alive_notify(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_update_rate_scaling(struct iwl4965_priv *priv, u8 mode);
|
||||
extern void iwl4965_chain_noise_reset(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_init_sensitivity(struct iwl4965_priv *priv, u8 flags,
|
||||
extern void iwl4965_set_rxon_chain(struct iwl_priv *priv);
|
||||
extern int iwl4965_alive_notify(struct iwl_priv *priv);
|
||||
extern void iwl4965_update_rate_scaling(struct iwl_priv *priv, u8 mode);
|
||||
extern void iwl4965_chain_noise_reset(struct iwl_priv *priv);
|
||||
extern void iwl4965_init_sensitivity(struct iwl_priv *priv, u8 flags,
|
||||
u8 force);
|
||||
extern int iwl4965_set_fat_chan_info(struct iwl4965_priv *priv,
|
||||
extern int iwl4965_set_fat_chan_info(struct iwl_priv *priv,
|
||||
enum ieee80211_band band,
|
||||
u16 channel,
|
||||
const struct iwl4965_eeprom_channel *eeprom_ch,
|
||||
u8 fat_extension_channel);
|
||||
extern void iwl4965_rf_kill_ct_config(struct iwl4965_priv *priv);
|
||||
extern void iwl4965_hwrate_to_tx_control(struct iwl4965_priv *priv,
|
||||
extern void iwl4965_rf_kill_ct_config(struct iwl_priv *priv);
|
||||
extern void iwl4965_hwrate_to_tx_control(struct iwl_priv *priv,
|
||||
u32 rate_n_flags,
|
||||
struct ieee80211_tx_control *control);
|
||||
|
||||
#ifdef CONFIG_IWL4965_HT
|
||||
void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
|
||||
enum ieee80211_band band);
|
||||
void iwl4965_set_rxon_ht(struct iwl4965_priv *priv,
|
||||
void iwl4965_set_rxon_ht(struct iwl_priv *priv,
|
||||
struct iwl_ht_info *ht_info);
|
||||
void iwl4965_set_ht_add_station(struct iwl4965_priv *priv, u8 index,
|
||||
void iwl4965_set_ht_add_station(struct iwl_priv *priv, u8 index,
|
||||
struct ieee80211_ht_info *sta_ht_inf);
|
||||
int iwl4965_mac_ampdu_action(struct ieee80211_hw *hw,
|
||||
enum ieee80211_ampdu_mlme_action action,
|
||||
const u8 *addr, u16 tid, u16 *ssn);
|
||||
int iwl4965_check_empty_hw_queue(struct iwl4965_priv *priv, int sta_id,
|
||||
int iwl4965_check_empty_hw_queue(struct iwl_priv *priv, int sta_id,
|
||||
u8 tid, int txq_id);
|
||||
#else
|
||||
static inline void iwl4965_init_ht_hw_capab(struct ieee80211_ht_info *ht_info,
|
||||
@ -966,7 +966,7 @@ enum {
|
||||
|
||||
#endif
|
||||
|
||||
struct iwl4965_priv {
|
||||
struct iwl_priv {
|
||||
|
||||
/* ieee device used by generic ieee processing code */
|
||||
struct ieee80211_hw *hw;
|
||||
@ -982,7 +982,7 @@ struct iwl4965_priv {
|
||||
int alloc_rxb_skb;
|
||||
bool add_radiotap;
|
||||
|
||||
void (*rx_handlers[REPLY_MAX])(struct iwl4965_priv *priv,
|
||||
void (*rx_handlers[REPLY_MAX])(struct iwl_priv *priv,
|
||||
struct iwl4965_rx_mem_buffer *rxb);
|
||||
|
||||
struct ieee80211_supported_band bands[IEEE80211_NUM_BANDS];
|
||||
@ -1214,9 +1214,9 @@ struct iwl4965_priv {
|
||||
#endif
|
||||
struct work_struct statistics_work;
|
||||
struct timer_list statistics_periodic;
|
||||
}; /*iwl4965_priv */
|
||||
}; /*iwl_priv */
|
||||
|
||||
static inline int iwl4965_is_associated(struct iwl4965_priv *priv)
|
||||
static inline int iwl4965_is_associated(struct iwl_priv *priv)
|
||||
{
|
||||
return (priv->active_rxon.filter_flags & RXON_FILTER_ASSOC_MSK) ? 1 : 0;
|
||||
}
|
||||
@ -1259,9 +1259,9 @@ static inline int is_channel_ibss(const struct iwl4965_channel_info *ch)
|
||||
}
|
||||
|
||||
extern const struct iwl4965_channel_info *iwl4965_get_channel_info(
|
||||
const struct iwl4965_priv *priv, enum ieee80211_band band, u16 channel);
|
||||
const struct iwl_priv *priv, enum ieee80211_band band, u16 channel);
|
||||
|
||||
/* Requires full declaration of iwl4965_priv before including */
|
||||
/* Requires full declaration of iwl_priv before including */
|
||||
#include "iwl-4965-io.h"
|
||||
|
||||
#endif /* __iwl4965_4965_h__ */
|
||||
|
@ -81,7 +81,7 @@
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
int iwlcore_eeprom_verify_signature(struct iwl4965_priv *priv)
|
||||
int iwlcore_eeprom_verify_signature(struct iwl_priv *priv)
|
||||
{
|
||||
u32 gp = iwl4965_read32(priv, CSR_EEPROM_GP);
|
||||
if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) {
|
||||
@ -98,7 +98,7 @@ EXPORT_SYMBOL(iwlcore_eeprom_verify_signature);
|
||||
* EEPROM chip, not a single event, so even reads could conflict if they
|
||||
* weren't arbitrated by the semaphore.
|
||||
*/
|
||||
int iwlcore_eeprom_acquire_semaphore(struct iwl4965_priv *priv)
|
||||
int iwlcore_eeprom_acquire_semaphore(struct iwl_priv *priv)
|
||||
{
|
||||
u16 count;
|
||||
int ret;
|
||||
@ -124,7 +124,7 @@ int iwlcore_eeprom_acquire_semaphore(struct iwl4965_priv *priv)
|
||||
}
|
||||
EXPORT_SYMBOL(iwlcore_eeprom_acquire_semaphore);
|
||||
|
||||
void iwlcore_eeprom_release_semaphore(struct iwl4965_priv *priv)
|
||||
void iwlcore_eeprom_release_semaphore(struct iwl_priv *priv)
|
||||
{
|
||||
iwl4965_clear_bit(priv, CSR_HW_IF_CONFIG_REG,
|
||||
CSR_HW_IF_CONFIG_REG_BIT_EEPROM_OWN_SEM);
|
||||
@ -140,7 +140,7 @@ EXPORT_SYMBOL(iwlcore_eeprom_release_semaphore);
|
||||
*
|
||||
* NOTE: This routine uses the non-debug IO access functions.
|
||||
*/
|
||||
int iwl_eeprom_init(struct iwl4965_priv *priv)
|
||||
int iwl_eeprom_init(struct iwl_priv *priv)
|
||||
{
|
||||
u16 *e = (u16 *)&priv->eeprom;
|
||||
u32 gp = iwl4965_read32(priv, CSR_EEPROM_GP);
|
||||
@ -197,7 +197,7 @@ int iwl_eeprom_init(struct iwl4965_priv *priv)
|
||||
EXPORT_SYMBOL(iwl_eeprom_init);
|
||||
|
||||
|
||||
void iwl_eeprom_get_mac(const struct iwl4965_priv *priv, u8 *mac)
|
||||
void iwl_eeprom_get_mac(const struct iwl_priv *priv, u8 *mac)
|
||||
{
|
||||
memcpy(mac, priv->eeprom.mac_address, 6);
|
||||
}
|
||||
|
@ -63,7 +63,7 @@
|
||||
#ifndef __iwl_eeprom_h__
|
||||
#define __iwl_eeprom_h__
|
||||
|
||||
struct iwl4965_priv;
|
||||
struct iwl_priv;
|
||||
|
||||
/*
|
||||
* EEPROM access time values:
|
||||
@ -383,17 +383,17 @@ struct iwl4965_eeprom {
|
||||
/* End of EEPROM */
|
||||
|
||||
struct iwl_eeprom_ops {
|
||||
int (*verify_signature) (struct iwl4965_priv *priv);
|
||||
int (*acquire_semaphore) (struct iwl4965_priv *priv);
|
||||
void (*release_semaphore) (struct iwl4965_priv *priv);
|
||||
int (*verify_signature) (struct iwl_priv *priv);
|
||||
int (*acquire_semaphore) (struct iwl_priv *priv);
|
||||
void (*release_semaphore) (struct iwl_priv *priv);
|
||||
};
|
||||
|
||||
|
||||
void iwl_eeprom_get_mac(const struct iwl4965_priv *priv, u8 *mac);
|
||||
int iwl_eeprom_init(struct iwl4965_priv *priv);
|
||||
void iwl_eeprom_get_mac(const struct iwl_priv *priv, u8 *mac);
|
||||
int iwl_eeprom_init(struct iwl_priv *priv);
|
||||
|
||||
int iwlcore_eeprom_verify_signature(struct iwl4965_priv *priv);
|
||||
int iwlcore_eeprom_acquire_semaphore(struct iwl4965_priv *priv);
|
||||
void iwlcore_eeprom_release_semaphore(struct iwl4965_priv *priv);
|
||||
int iwlcore_eeprom_verify_signature(struct iwl_priv *priv);
|
||||
int iwlcore_eeprom_acquire_semaphore(struct iwl_priv *priv);
|
||||
void iwlcore_eeprom_release_semaphore(struct iwl_priv *priv);
|
||||
|
||||
#endif /* __iwl_eeprom_h__ */
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user