#include <linux/kernel.h>
#include <linux/skbuff.h>
#include <linux/slab.h>
#include <net/mac80211.h>
#include <linux/netdevice.h>
#include <linux/etherdevice.h>
#include <linux/delay.h>
#include <linux/workqueue.h>
#include "commands.h"
#include "3945.h"
#define RS_NAME …
static s32 il3945_expected_tpt_g[RATE_COUNT_3945] = …;
static s32 il3945_expected_tpt_g_prot[RATE_COUNT_3945] = …;
static s32 il3945_expected_tpt_a[RATE_COUNT_3945] = …;
static s32 il3945_expected_tpt_b[RATE_COUNT_3945] = …;
struct il3945_tpt_entry { … };
static struct il3945_tpt_entry il3945_tpt_table_a[] = …;
static struct il3945_tpt_entry il3945_tpt_table_g[] = …;
#define RATE_MAX_WINDOW …
#define RATE_FLUSH …
#define RATE_WIN_FLUSH …
#define IL39_RATE_HIGH_TH …
#define IL_SUCCESS_UP_TH …
#define IL_SUCCESS_DOWN_TH …
#define RATE_MIN_FAILURE_TH …
#define RATE_MIN_SUCCESS_TH …
#define RATE_DECREASE_TH …
#define RATE_RETRY_TH …
static u8
il3945_get_rate_idx_by_rssi(s32 rssi, enum nl80211_band band)
{ … }
static void
il3945_clear_win(struct il3945_rate_scale_data *win)
{ … }
static int
il3945_rate_scale_flush_wins(struct il3945_rs_sta *rs_sta)
{ … }
#define RATE_FLUSH_MAX …
#define RATE_FLUSH_MIN …
#define IL_AVERAGE_PACKETS …
static void
il3945_bg_rate_scale_flush(struct timer_list *t)
{ … }
static void
il3945_collect_tx_data(struct il3945_rs_sta *rs_sta,
struct il3945_rate_scale_data *win, int success,
int retries, int idx)
{ … }
void
il3945_rs_rate_init(struct il_priv *il, struct ieee80211_sta *sta, u8 sta_id)
{ … }
static void *
il3945_rs_alloc(struct ieee80211_hw *hw)
{ … }
static void
il3945_rs_free(void *il)
{ … }
static void *
il3945_rs_alloc_sta(void *il_priv, struct ieee80211_sta *sta, gfp_t gfp)
{ … }
static void
il3945_rs_free_sta(void *il_priv, struct ieee80211_sta *sta, void *il_sta)
{ … }
static void
il3945_rs_tx_status(void *il_rate, struct ieee80211_supported_band *sband,
struct ieee80211_sta *sta, void *il_sta,
struct sk_buff *skb)
{ … }
static u16
il3945_get_adjacent_rate(struct il3945_rs_sta *rs_sta, u8 idx, u16 rate_mask,
enum nl80211_band band)
{ … }
static void
il3945_rs_get_rate(void *il_r, struct ieee80211_sta *sta, void *il_sta,
struct ieee80211_tx_rate_control *txrc)
{ … }
#ifdef CONFIG_MAC80211_DEBUGFS
static ssize_t
il3945_sta_dbgfs_stats_table_read(struct file *file, char __user *user_buf,
size_t count, loff_t *ppos)
{ … }
static const struct file_operations rs_sta_dbgfs_stats_table_ops = …;
static void
il3945_add_debugfs(void *il, void *il_sta, struct dentry *dir)
{ … }
#endif
static void
il3945_rs_rate_init_stub(void *il_r, struct ieee80211_supported_band *sband,
struct cfg80211_chan_def *chandef,
struct ieee80211_sta *sta, void *il_sta)
{ … }
static const struct rate_control_ops rs_ops = …;
void
il3945_rate_scale_init(struct ieee80211_hw *hw, s32 sta_id)
{ … }
int
il3945_rate_control_register(void)
{ … }
void
il3945_rate_control_unregister(void)
{ … }