Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2004 Sam Leffler, Errno Consulting |
| 3 | * Copyright (c) 2004 Video54 Technologies, Inc. |
Sujith Manoharan | 5b68138 | 2011-05-17 13:36:18 +0530 | [diff] [blame] | 4 | * Copyright (c) 2008-2011 Atheros Communications Inc. |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 5 | * |
| 6 | * Permission to use, copy, modify, and/or distribute this software for any |
| 7 | * purpose with or without fee is hereby granted, provided that the above |
| 8 | * copyright notice and this permission notice appear in all copies. |
| 9 | * |
| 10 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
| 11 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF |
| 12 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR |
| 13 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 14 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 15 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF |
| 16 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 17 | */ |
| 18 | |
| 19 | #ifndef RC_H |
| 20 | #define RC_H |
| 21 | |
Luis R. Rodriguez | db86f07 | 2009-11-05 08:44:39 -0800 | [diff] [blame] | 22 | #include "hw.h" |
| 23 | |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 24 | struct ath_softc; |
| 25 | |
Sujith | 46d14a5 | 2008-11-18 09:08:13 +0530 | [diff] [blame] | 26 | #define ATH_RATE_MAX 30 |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 27 | #define RATE_TABLE_SIZE 72 |
Sujith | 2c5a744 | 2008-11-18 09:08:33 +0530 | [diff] [blame] | 28 | |
Senthil Balasubramanian | f63b340 | 2010-07-27 19:16:31 +0530 | [diff] [blame] | 29 | #define RC_INVALID 0x0000 |
| 30 | #define RC_LEGACY 0x0001 |
| 31 | #define RC_SS 0x0002 |
| 32 | #define RC_DS 0x0004 |
| 33 | #define RC_TS 0x0008 |
| 34 | #define RC_HT_20 0x0010 |
| 35 | #define RC_HT_40 0x0020 |
| 36 | |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 37 | #define RC_STREAM_MASK 0xe |
| 38 | #define RC_DS_OR_LATER(f) ((((f) & RC_STREAM_MASK) == RC_DS) || \ |
| 39 | (((f) & RC_STREAM_MASK) == (RC_DS | RC_TS))) |
| 40 | #define RC_TS_ONLY(f) (((f) & RC_STREAM_MASK) == RC_TS) |
| 41 | #define RC_SS_OR_LEGACY(f) ((f) & (RC_SS | RC_LEGACY)) |
Senthil Balasubramanian | f63b340 | 2010-07-27 19:16:31 +0530 | [diff] [blame] | 42 | |
| 43 | #define RC_HT_2040 (RC_HT_20 | RC_HT_40) |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 44 | #define RC_ALL_STREAM (RC_SS | RC_DS | RC_TS) |
Senthil Balasubramanian | f63b340 | 2010-07-27 19:16:31 +0530 | [diff] [blame] | 45 | #define RC_L_SD (RC_LEGACY | RC_SS | RC_DS) |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 46 | #define RC_L_SDT (RC_LEGACY | RC_SS | RC_DS | RC_TS) |
Senthil Balasubramanian | f63b340 | 2010-07-27 19:16:31 +0530 | [diff] [blame] | 47 | #define RC_HT_S_20 (RC_HT_20 | RC_SS) |
Senthil Balasubramanian | f63b340 | 2010-07-27 19:16:31 +0530 | [diff] [blame] | 48 | #define RC_HT_D_20 (RC_HT_20 | RC_DS) |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 49 | #define RC_HT_T_20 (RC_HT_20 | RC_TS) |
| 50 | #define RC_HT_S_40 (RC_HT_40 | RC_SS) |
Senthil Balasubramanian | f63b340 | 2010-07-27 19:16:31 +0530 | [diff] [blame] | 51 | #define RC_HT_D_40 (RC_HT_40 | RC_DS) |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 52 | #define RC_HT_T_40 (RC_HT_40 | RC_TS) |
| 53 | |
| 54 | #define RC_HT_SD_20 (RC_HT_20 | RC_SS | RC_DS) |
| 55 | #define RC_HT_DT_20 (RC_HT_20 | RC_DS | RC_TS) |
| 56 | #define RC_HT_SD_40 (RC_HT_40 | RC_SS | RC_DS) |
| 57 | #define RC_HT_DT_40 (RC_HT_40 | RC_DS | RC_TS) |
| 58 | |
| 59 | #define RC_HT_SD_2040 (RC_HT_2040 | RC_SS | RC_DS) |
| 60 | #define RC_HT_SDT_2040 (RC_HT_2040 | RC_SS | RC_DS | RC_TS) |
| 61 | |
| 62 | #define RC_HT_SDT_20 (RC_HT_20 | RC_SS | RC_DS | RC_TS) |
| 63 | #define RC_HT_SDT_40 (RC_HT_40 | RC_SS | RC_DS | RC_TS) |
| 64 | |
Senthil Balasubramanian | f63b340 | 2010-07-27 19:16:31 +0530 | [diff] [blame] | 65 | #define RC_ALL (RC_LEGACY | RC_HT_2040 | RC_ALL_STREAM) |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 66 | |
Sujith | 394cf0a | 2009-02-09 13:26:54 +0530 | [diff] [blame] | 67 | enum { |
| 68 | WLAN_RC_PHY_OFDM, |
| 69 | WLAN_RC_PHY_CCK, |
| 70 | WLAN_RC_PHY_HT_20_SS, |
| 71 | WLAN_RC_PHY_HT_20_DS, |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 72 | WLAN_RC_PHY_HT_20_TS, |
Sujith | 394cf0a | 2009-02-09 13:26:54 +0530 | [diff] [blame] | 73 | WLAN_RC_PHY_HT_40_SS, |
| 74 | WLAN_RC_PHY_HT_40_DS, |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 75 | WLAN_RC_PHY_HT_40_TS, |
Sujith | 394cf0a | 2009-02-09 13:26:54 +0530 | [diff] [blame] | 76 | WLAN_RC_PHY_HT_20_SS_HGI, |
| 77 | WLAN_RC_PHY_HT_20_DS_HGI, |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 78 | WLAN_RC_PHY_HT_20_TS_HGI, |
Sujith | 394cf0a | 2009-02-09 13:26:54 +0530 | [diff] [blame] | 79 | WLAN_RC_PHY_HT_40_SS_HGI, |
| 80 | WLAN_RC_PHY_HT_40_DS_HGI, |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 81 | WLAN_RC_PHY_HT_40_TS_HGI, |
Sujith | 394cf0a | 2009-02-09 13:26:54 +0530 | [diff] [blame] | 82 | WLAN_RC_PHY_MAX |
| 83 | }; |
| 84 | |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 85 | #define WLAN_RC_PHY_DS(_phy) ((_phy == WLAN_RC_PHY_HT_20_DS) \ |
| 86 | || (_phy == WLAN_RC_PHY_HT_40_DS) \ |
| 87 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \ |
| 88 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI)) |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 89 | #define WLAN_RC_PHY_TS(_phy) ((_phy == WLAN_RC_PHY_HT_20_TS) \ |
| 90 | || (_phy == WLAN_RC_PHY_HT_40_TS) \ |
| 91 | || (_phy == WLAN_RC_PHY_HT_20_TS_HGI) \ |
| 92 | || (_phy == WLAN_RC_PHY_HT_40_TS_HGI)) |
Luis R. Rodriguez | c755ad3 | 2009-12-07 12:38:41 -0500 | [diff] [blame] | 93 | #define WLAN_RC_PHY_20(_phy) ((_phy == WLAN_RC_PHY_HT_20_SS) \ |
| 94 | || (_phy == WLAN_RC_PHY_HT_20_DS) \ |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 95 | || (_phy == WLAN_RC_PHY_HT_20_TS) \ |
Luis R. Rodriguez | c755ad3 | 2009-12-07 12:38:41 -0500 | [diff] [blame] | 96 | || (_phy == WLAN_RC_PHY_HT_20_SS_HGI) \ |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 97 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \ |
| 98 | || (_phy == WLAN_RC_PHY_HT_20_TS_HGI)) |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 99 | #define WLAN_RC_PHY_40(_phy) ((_phy == WLAN_RC_PHY_HT_40_SS) \ |
| 100 | || (_phy == WLAN_RC_PHY_HT_40_DS) \ |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 101 | || (_phy == WLAN_RC_PHY_HT_40_TS) \ |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 102 | || (_phy == WLAN_RC_PHY_HT_40_SS_HGI) \ |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 103 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI) \ |
| 104 | || (_phy == WLAN_RC_PHY_HT_40_TS_HGI)) |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 105 | #define WLAN_RC_PHY_SGI(_phy) ((_phy == WLAN_RC_PHY_HT_20_SS_HGI) \ |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 106 | || (_phy == WLAN_RC_PHY_HT_20_DS_HGI) \ |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 107 | || (_phy == WLAN_RC_PHY_HT_20_TS_HGI) \ |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 108 | || (_phy == WLAN_RC_PHY_HT_40_SS_HGI) \ |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 109 | || (_phy == WLAN_RC_PHY_HT_40_DS_HGI) \ |
| 110 | || (_phy == WLAN_RC_PHY_HT_40_TS_HGI)) |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 111 | |
| 112 | #define WLAN_RC_PHY_HT(_phy) (_phy >= WLAN_RC_PHY_HT_20_SS) |
| 113 | |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 114 | #define WLAN_RC_CAP_MODE(capflag) (((capflag & WLAN_RC_HT_FLAG) ? \ |
Senthil Balasubramanian | f63b340 | 2010-07-27 19:16:31 +0530 | [diff] [blame] | 115 | ((capflag & WLAN_RC_40_FLAG) ? RC_HT_40 : RC_HT_20) : RC_LEGACY)) |
| 116 | |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 117 | #define WLAN_RC_CAP_STREAM(capflag) (((capflag & WLAN_RC_TS_FLAG) ? \ |
| 118 | (RC_TS) : ((capflag & WLAN_RC_DS_FLAG) ? RC_DS : RC_SS))) |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 119 | |
| 120 | /* Return TRUE if flag supports HT20 && client supports HT20 or |
| 121 | * return TRUE if flag supports HT40 && client supports HT40. |
| 122 | * This is used becos some rates overlap between HT20/HT40. |
| 123 | */ |
Sujith | 46d14a5 | 2008-11-18 09:08:13 +0530 | [diff] [blame] | 124 | #define WLAN_RC_PHY_HT_VALID(flag, capflag) \ |
Senthil Balasubramanian | f63b340 | 2010-07-27 19:16:31 +0530 | [diff] [blame] | 125 | (((flag & RC_HT_20) && !(capflag & WLAN_RC_40_FLAG)) || \ |
| 126 | ((flag & RC_HT_40) && (capflag & WLAN_RC_40_FLAG))) |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 127 | |
| 128 | #define WLAN_RC_DS_FLAG (0x01) |
Senthil Balasubramanian | 1d9d06a | 2010-07-27 19:16:32 +0530 | [diff] [blame] | 129 | #define WLAN_RC_TS_FLAG (0x02) |
| 130 | #define WLAN_RC_40_FLAG (0x04) |
| 131 | #define WLAN_RC_SGI_FLAG (0x08) |
| 132 | #define WLAN_RC_HT_FLAG (0x10) |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 133 | |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 134 | /** |
| 135 | * struct ath_rate_table - Rate Control table |
Mohammed Shafi Shajakhan | 7a82665 | 2010-10-13 11:47:09 +0530 | [diff] [blame] | 136 | * @rate_cnt: total number of rates for the given wireless mode |
| 137 | * @mcs_start: MCS rate index offset |
| 138 | * @rate_flags: Rate Control flags |
| 139 | * @phy: CCK/OFDM/HT20/HT40 |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 140 | * @ratekbps: rate in Kbits per second |
| 141 | * @user_ratekbps: user rate in Kbits per second |
| 142 | * @ratecode: rate that goes into HW descriptors |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 143 | * @dot11rate: value that goes into supported |
| 144 | * rates info element of MLME |
| 145 | * @ctrl_rate: Index of next lower basic rate, used for duration computation |
Mohammed Shafi Shajakhan | 7a82665 | 2010-10-13 11:47:09 +0530 | [diff] [blame] | 146 | * @cw40index: Index of rates having 40MHz channel width |
| 147 | * @sgi_index: Index of rates having Short Guard Interval |
| 148 | * @ht_index: high throughput rates having 40MHz channel width and |
| 149 | * Short Guard Interval |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 150 | * @probe_interval: interval for rate control to probe for other rates |
Sujith | 46d14a5 | 2008-11-18 09:08:13 +0530 | [diff] [blame] | 151 | * @initial_ratemax: initial ratemax value |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 152 | */ |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 153 | struct ath_rate_table { |
| 154 | int rate_cnt; |
Felix Fietkau | 545750d | 2009-11-23 22:21:01 +0100 | [diff] [blame] | 155 | int mcs_start; |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 156 | struct { |
Senthil Balasubramanian | f63b340 | 2010-07-27 19:16:31 +0530 | [diff] [blame] | 157 | u16 rate_flags; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 158 | u8 phy; |
| 159 | u32 ratekbps; |
| 160 | u32 user_ratekbps; |
| 161 | u8 ratecode; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 162 | u8 dot11rate; |
| 163 | u8 ctrl_rate; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 164 | u8 cw40index; |
| 165 | u8 sgi_index; |
| 166 | u8 ht_index; |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 167 | } info[RATE_TABLE_SIZE]; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 168 | u32 probe_interval; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 169 | u8 initial_ratemax; |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 170 | }; |
| 171 | |
Sujith | 256b7759 | 2008-11-18 09:03:12 +0530 | [diff] [blame] | 172 | struct ath_rateset { |
| 173 | u8 rs_nrates; |
| 174 | u8 rs_rates[ATH_RATE_MAX]; |
| 175 | }; |
| 176 | |
Felix Fietkau | 772d551 | 2010-10-13 16:43:26 +0200 | [diff] [blame] | 177 | struct ath_rc_stats { |
| 178 | u32 success; |
| 179 | u32 retries; |
| 180 | u32 xretries; |
| 181 | u8 per; |
| 182 | }; |
| 183 | |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 184 | /** |
Sujith | 46d14a5 | 2008-11-18 09:08:13 +0530 | [diff] [blame] | 185 | * struct ath_rate_priv - Rate Control priv data |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 186 | * @state: RC state |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 187 | * @probe_rate: rate we are probing at |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 188 | * @probe_time: msec timestamp for last probe |
| 189 | * @hw_maxretry_pktcnt: num of packets since we got HW max retry error |
| 190 | * @max_valid_rate: maximum number of valid rate |
| 191 | * @per_down_time: msec timestamp for last PER down step |
| 192 | * @valid_phy_ratecnt: valid rate count |
| 193 | * @rate_max_phy: phy index for the max rate |
Vasanthakumar Thiagarajan | 922bac6 | 2009-07-14 20:14:13 -0400 | [diff] [blame] | 194 | * @per: PER for every valid rate in % |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 195 | * @probe_interval: interval for ratectrl to probe for other rates |
Sujith | 256b7759 | 2008-11-18 09:03:12 +0530 | [diff] [blame] | 196 | * @ht_cap: HT capabilities |
Sujith | 256b7759 | 2008-11-18 09:03:12 +0530 | [diff] [blame] | 197 | * @neg_rates: Negotatied rates |
| 198 | * @neg_ht_rates: Negotiated HT rates |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 199 | */ |
Sujith | 46d14a5 | 2008-11-18 09:08:13 +0530 | [diff] [blame] | 200 | struct ath_rate_priv { |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 201 | u8 rate_table_size; |
| 202 | u8 probe_rate; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 203 | u8 hw_maxretry_pktcnt; |
| 204 | u8 max_valid_rate; |
Sujith | 46d14a5 | 2008-11-18 09:08:13 +0530 | [diff] [blame] | 205 | u8 valid_rate_index[RATE_TABLE_SIZE]; |
Sujith | 256b7759 | 2008-11-18 09:03:12 +0530 | [diff] [blame] | 206 | u8 ht_cap; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 207 | u8 valid_phy_ratecnt[WLAN_RC_PHY_MAX]; |
Sujith | 46d14a5 | 2008-11-18 09:08:13 +0530 | [diff] [blame] | 208 | u8 valid_phy_rateidx[WLAN_RC_PHY_MAX][RATE_TABLE_SIZE]; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 209 | u8 rate_max_phy; |
Vasanthakumar Thiagarajan | 922bac6 | 2009-07-14 20:14:13 -0400 | [diff] [blame] | 210 | u8 per[RATE_TABLE_SIZE]; |
Sujith | 256b7759 | 2008-11-18 09:03:12 +0530 | [diff] [blame] | 211 | u32 probe_time; |
| 212 | u32 per_down_time; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 213 | u32 probe_interval; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 214 | struct ath_rateset neg_rates; |
Sujith | 5701ed8 | 2008-08-26 08:11:26 +0530 | [diff] [blame] | 215 | struct ath_rateset neg_ht_rates; |
Felix Fietkau | 772d551 | 2010-10-13 16:43:26 +0200 | [diff] [blame] | 216 | const struct ath_rate_table *rate_table; |
| 217 | |
| 218 | struct dentry *debugfs_rcstats; |
| 219 | struct ath_rc_stats rcstats[RATE_TABLE_SIZE]; |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 220 | }; |
| 221 | |
Felix Fietkau | 6e5c2b4 | 2010-09-20 13:45:40 +0200 | [diff] [blame] | 222 | #ifdef CONFIG_ATH9K_RATE_CONTROL |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 223 | int ath_rate_control_register(void); |
| 224 | void ath_rate_control_unregister(void); |
Felix Fietkau | 6e5c2b4 | 2010-09-20 13:45:40 +0200 | [diff] [blame] | 225 | #else |
| 226 | static inline int ath_rate_control_register(void) |
| 227 | { |
| 228 | return 0; |
| 229 | } |
| 230 | |
| 231 | static inline void ath_rate_control_unregister(void) |
| 232 | { |
| 233 | } |
| 234 | #endif |
Luis R. Rodriguez | f078f20 | 2008-08-04 00:16:41 -0700 | [diff] [blame] | 235 | |
| 236 | #endif /* RC_H */ |