~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/net/mac80211/rc80211_minstrel.h

Version: ~ [ linux-5.5-rc7 ] ~ [ linux-5.4.13 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.97 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.166 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.210 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.210 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.19.8 ] ~ [ linux-3.18.140 ] ~ [ linux-3.17.8 ] ~ [ linux-3.16.81 ] ~ [ linux-3.15.10 ] ~ [ linux-3.14.79 ] ~ [ linux-3.13.11 ] ~ [ linux-3.12.74 ] ~ [ linux-3.11.10 ] ~ [ linux-3.10.108 ] ~ [ linux-3.9.11 ] ~ [ linux-3.8.13 ] ~ [ linux-3.7.10 ] ~ [ linux-3.6.11 ] ~ [ linux-3.5.7 ] ~ [ linux-3.4.113 ] ~ [ linux-3.3.8 ] ~ [ linux-3.2.102 ] ~ [ linux-3.1.10 ] ~ [ linux-3.0.101 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /*
  2  * Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
  3  *
  4  * This program is free software; you can redistribute it and/or modify
  5  * it under the terms of the GNU General Public License version 2 as
  6  * published by the Free Software Foundation.
  7  */
  8 
  9 #ifndef __RC_MINSTREL_H
 10 #define __RC_MINSTREL_H
 11 
 12 struct minstrel_rate {
 13         int bitrate;
 14         int rix;
 15 
 16         unsigned int perfect_tx_time;
 17         unsigned int ack_time;
 18 
 19         int sample_limit;
 20         unsigned int retry_count;
 21         unsigned int retry_count_cts;
 22         unsigned int retry_count_rtscts;
 23         unsigned int adjusted_retry_count;
 24 
 25         u32 success;
 26         u32 attempts;
 27         u32 last_attempts;
 28         u32 last_success;
 29 
 30         /* parts per thousand */
 31         u32 cur_prob;
 32         u32 probability;
 33 
 34         /* per-rate throughput */
 35         u32 cur_tp;
 36 
 37         u64 succ_hist;
 38         u64 att_hist;
 39 };
 40 
 41 struct minstrel_sta_info {
 42         unsigned long stats_update;
 43         unsigned int sp_ack_dur;
 44         unsigned int rate_avg;
 45 
 46         unsigned int lowest_rix;
 47 
 48         unsigned int max_tp_rate;
 49         unsigned int max_tp_rate2;
 50         unsigned int max_prob_rate;
 51         unsigned int packet_count;
 52         unsigned int sample_count;
 53         int sample_deferred;
 54 
 55         unsigned int sample_idx;
 56         unsigned int sample_column;
 57 
 58         int n_rates;
 59         struct minstrel_rate *r;
 60         bool prev_sample;
 61 
 62         /* sampling table */
 63         u8 *sample_table;
 64 
 65 #ifdef CONFIG_MAC80211_DEBUGFS
 66         struct dentry *dbg_stats;
 67 #endif
 68 };
 69 
 70 struct minstrel_priv {
 71         struct ieee80211_hw *hw;
 72         bool has_mrr;
 73         unsigned int cw_min;
 74         unsigned int cw_max;
 75         unsigned int max_retry;
 76         unsigned int ewma_level;
 77         unsigned int segment_size;
 78         unsigned int update_interval;
 79         unsigned int lookaround_rate;
 80         unsigned int lookaround_rate_mrr;
 81 
 82 #ifdef CONFIG_MAC80211_DEBUGFS
 83         /*
 84          * enable fixed rate processing per RC
 85          *   - write static index to debugfs:ieee80211/phyX/rc/fixed_rate_idx
 86          *   - write -1 to enable RC processing again
 87          *   - setting will be applied on next update
 88          */
 89         u32 fixed_rate_idx;
 90         struct dentry *dbg_fixed_rate;
 91 #endif
 92 
 93 };
 94 
 95 struct minstrel_debugfs_info {
 96         size_t len;
 97         char buf[];
 98 };
 99 
100 extern struct rate_control_ops mac80211_minstrel;
101 void minstrel_add_sta_debugfs(void *priv, void *priv_sta, struct dentry *dir);
102 void minstrel_remove_sta_debugfs(void *priv, void *priv_sta);
103 
104 /* debugfs */
105 int minstrel_stats_open(struct inode *inode, struct file *file);
106 ssize_t minstrel_stats_read(struct file *file, char __user *buf, size_t len, loff_t *ppos);
107 int minstrel_stats_release(struct inode *inode, struct file *file);
108 
109 #endif
110 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp