diff options
Diffstat (limited to 'net/mac80211/rate.h')
| -rw-r--r-- | net/mac80211/rate.h | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/net/mac80211/rate.h b/net/mac80211/rate.h index 5b45f33cb766..a29148dcca99 100644 --- a/net/mac80211/rate.h +++ b/net/mac80211/rate.h | |||
| @@ -19,14 +19,15 @@ | |||
| 19 | #include "ieee80211_i.h" | 19 | #include "ieee80211_i.h" |
| 20 | #include "sta_info.h" | 20 | #include "sta_info.h" |
| 21 | 21 | ||
| 22 | /* TODO: kdoc */ | 22 | /** |
| 23 | * struct rate_selection - rate selection for rate control algos | ||
| 24 | * @rate: selected transmission rate index | ||
| 25 | * @nonerp: Non-ERP rate to use instead if ERP cannot be used | ||
| 26 | * @probe: rate for probing (or -1) | ||
| 27 | * | ||
| 28 | */ | ||
| 23 | struct rate_selection { | 29 | struct rate_selection { |
| 24 | /* Selected transmission rate */ | 30 | s8 rate_idx, nonerp_idx, probe_idx; |
| 25 | struct ieee80211_rate *rate; | ||
| 26 | /* Non-ERP rate to use if mac80211 decides it cannot use an ERP rate */ | ||
| 27 | struct ieee80211_rate *nonerp; | ||
| 28 | /* probe with this rate, or NULL for no probing */ | ||
| 29 | struct ieee80211_rate *probe; | ||
| 30 | }; | 31 | }; |
| 31 | 32 | ||
| 32 | struct rate_control_ops { | 33 | struct rate_control_ops { |
| @@ -138,7 +139,7 @@ static inline int rate_supported(struct sta_info *sta, | |||
| 138 | return (sta == NULL || sta->supp_rates[band] & BIT(index)); | 139 | return (sta == NULL || sta->supp_rates[band] & BIT(index)); |
| 139 | } | 140 | } |
| 140 | 141 | ||
| 141 | static inline int | 142 | static inline s8 |
| 142 | rate_lowest_index(struct ieee80211_local *local, | 143 | rate_lowest_index(struct ieee80211_local *local, |
| 143 | struct ieee80211_supported_band *sband, | 144 | struct ieee80211_supported_band *sband, |
| 144 | struct sta_info *sta) | 145 | struct sta_info *sta) |
| @@ -155,14 +156,6 @@ rate_lowest_index(struct ieee80211_local *local, | |||
| 155 | return 0; | 156 | return 0; |
| 156 | } | 157 | } |
| 157 | 158 | ||
| 158 | static inline struct ieee80211_rate * | ||
| 159 | rate_lowest(struct ieee80211_local *local, | ||
| 160 | struct ieee80211_supported_band *sband, | ||
| 161 | struct sta_info *sta) | ||
| 162 | { | ||
| 163 | return &sband->bitrates[rate_lowest_index(local, sband, sta)]; | ||
| 164 | } | ||
| 165 | |||
| 166 | 159 | ||
| 167 | /* functions for rate control related to a device */ | 160 | /* functions for rate control related to a device */ |
| 168 | int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local, | 161 | int ieee80211_init_rate_ctrl_alg(struct ieee80211_local *local, |
