#include <linux/kernel.h>
#include <linux/rtnetlink.h>
#include <linux/module.h>
#include <linux/slab.h>
#include "rate.h"
#include "ieee80211_i.h"
#include "debugfs.h"
struct rate_control_alg { … };
static LIST_HEAD(rate_ctrl_algs);
static DEFINE_MUTEX(rate_ctrl_mutex);
static char *ieee80211_default_rc_algo = …;
module_param(ieee80211_default_rc_algo, charp, 0644);
MODULE_PARM_DESC(…) …;
void rate_control_rate_init(struct sta_info *sta)
{ … }
void rate_control_tx_status(struct ieee80211_local *local,
struct ieee80211_tx_status *st)
{ … }
void rate_control_rate_update(struct ieee80211_local *local,
struct ieee80211_supported_band *sband,
struct sta_info *sta, unsigned int link_id,
u32 changed)
{ … }
int ieee80211_rate_control_register(const struct rate_control_ops *ops)
{ … }
EXPORT_SYMBOL(…);
void ieee80211_rate_control_unregister(const struct rate_control_ops *ops)
{ … }
EXPORT_SYMBOL(…);
static const struct rate_control_ops *
ieee80211_try_rate_control_ops_get(const char *name)
{ … }
static const struct rate_control_ops *
ieee80211_rate_control_ops_get(const char *name)
{ … }
#ifdef CONFIG_MAC80211_DEBUGFS
static ssize_t rcname_read(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos)
{ … }
const struct file_operations rcname_ops = …;
#endif
static struct rate_control_ref *
rate_control_alloc(const char *name, struct ieee80211_local *local)
{ … }
static void rate_control_free(struct ieee80211_local *local,
struct rate_control_ref *ctrl_ref)
{ … }
void ieee80211_check_rate_mask(struct ieee80211_link_data *link)
{ … }
static bool rc_no_data_or_no_ack_use_min(struct ieee80211_tx_rate_control *txrc)
{ … }
static void rc_send_low_basicrate(struct ieee80211_tx_rate *rate,
u32 basic_rates,
struct ieee80211_supported_band *sband)
{ … }
static void __rate_control_send_low(struct ieee80211_hw *hw,
struct ieee80211_supported_band *sband,
struct ieee80211_sta *sta,
struct ieee80211_tx_info *info,
u32 rate_mask)
{ … }
static bool rate_control_send_low(struct ieee80211_sta *pubsta,
struct ieee80211_tx_rate_control *txrc)
{ … }
static bool rate_idx_match_legacy_mask(s8 *rate_idx, int n_bitrates, u32 mask)
{ … }
static bool rate_idx_match_mcs_mask(s8 *rate_idx, u8 *mcs_mask)
{ … }
static bool rate_idx_match_vht_mcs_mask(s8 *rate_idx, u16 *vht_mask)
{ … }
static void rate_idx_match_mask(s8 *rate_idx, u16 *rate_flags,
struct ieee80211_supported_band *sband,
enum nl80211_chan_width chan_width,
u32 mask,
u8 mcs_mask[IEEE80211_HT_MCS_MASK_LEN],
u16 vht_mask[NL80211_VHT_NSS_MAX])
{ … }
static void rate_fixup_ratelist(struct ieee80211_vif *vif,
struct ieee80211_supported_band *sband,
struct ieee80211_tx_info *info,
struct ieee80211_tx_rate *rates,
int max_rates)
{ … }
static void rate_control_fill_sta_table(struct ieee80211_sta *sta,
struct ieee80211_tx_info *info,
struct ieee80211_tx_rate *rates,
int max_rates)
{ … }
static bool rate_control_cap_mask(struct ieee80211_sub_if_data *sdata,
struct ieee80211_supported_band *sband,
struct ieee80211_sta *sta, u32 *mask,
u8 mcs_mask[IEEE80211_HT_MCS_MASK_LEN],
u16 vht_mask[NL80211_VHT_NSS_MAX])
{ … }
static void
rate_control_apply_mask_ratetbl(struct sta_info *sta,
struct ieee80211_supported_band *sband,
struct ieee80211_sta_rates *rates)
{ … }
static void rate_control_apply_mask(struct ieee80211_sub_if_data *sdata,
struct ieee80211_sta *sta,
struct ieee80211_supported_band *sband,
struct ieee80211_tx_rate *rates,
int max_rates)
{ … }
void ieee80211_get_tx_rates(struct ieee80211_vif *vif,
struct ieee80211_sta *sta,
struct sk_buff *skb,
struct ieee80211_tx_rate *dest,
int max_rates)
{ … }
EXPORT_SYMBOL(…);
void rate_control_get_rate(struct ieee80211_sub_if_data *sdata,
struct sta_info *sta,
struct ieee80211_tx_rate_control *txrc)
{ … }
int rate_control_set_rates(struct ieee80211_hw *hw,
struct ieee80211_sta *pubsta,
struct ieee80211_sta_rates *rates)
{ … }
EXPORT_SYMBOL(…);
int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local,
const char *name)
{ … }
void rate_control_deinitialize(struct ieee80211_local *local)
{ … }