aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-01-06 06:09:08 -0500
committerJohn W. Linville <linville@tuxdriver.com>2010-01-12 13:50:11 -0500
commit37eb0b164cf9fa9f70c8500926f5cde7c652f48e (patch)
tree9260e7045f32268c8c4ded718677711d371cd5ed /include
parente00cfce0cb2a397859607bf515c6de9ce064b64a (diff)
cfg80211/mac80211: Use more generic bitrate mask for rate control
Extend struct cfg80211_bitrate_mask to actually use a bitfield mask instead of just a single fixed or maximum rate index. This change itself does not modify the behavior (except for debugfs files), but it prepares cfg80211 and mac80211 for a new nl80211 command for setting which rates can be used in TX rate control. Since frames are now going through the rate control algorithm unconditionally, the internal IEEE80211_TX_INTFL_RCALGO flag can now be removed. The RC implementations can use the rate_idx_mask value to optimize their behavior if only a single rate is enabled. The old max_rate_idx in struct ieee80211_tx_rate_control is maintained (but commented as deprecated) for backwards compatibility with existing RC implementations. Once these implementations have been updated to use the more generic rate_idx_mask, the max_rate_idx value can be removed. Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'include')
-rw-r--r--include/net/cfg80211.h13
-rw-r--r--include/net/mac80211.h8
2 files changed, 6 insertions, 15 deletions
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index a8d5d04314b9..22e062afb5a1 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -857,20 +857,11 @@ enum tx_power_setting {
857 * cfg80211_bitrate_mask - masks for bitrate control 857 * cfg80211_bitrate_mask - masks for bitrate control
858 */ 858 */
859struct cfg80211_bitrate_mask { 859struct cfg80211_bitrate_mask {
860/*
861 * As discussed in Berlin, this struct really
862 * should look like this:
863
864 struct { 860 struct {
865 u32 legacy; 861 u32 legacy;
866 u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; 862 /* TODO: add support for masking MCS rates; e.g.: */
863 /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
867 } control[IEEE80211_NUM_BANDS]; 864 } control[IEEE80211_NUM_BANDS];
868
869 * Since we can always fix in-kernel users, let's keep
870 * it simpler for now:
871 */
872 u32 fixed; /* fixed bitrate, 0 == not fixed */
873 u32 maxrate; /* in kbps, 0 == no limit */
874}; 865};
875/** 866/**
876 * struct cfg80211_pmksa - PMK Security Association 867 * struct cfg80211_pmksa - PMK Security Association
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 39c516c352be..7e5af6d90b93 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -255,9 +255,6 @@ struct ieee80211_bss_conf {
255 * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be 255 * @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be
256 * set by rate control algorithms to indicate probe rate, will 256 * set by rate control algorithms to indicate probe rate, will
257 * be cleared for fragmented frames (except on the last fragment) 257 * be cleared for fragmented frames (except on the last fragment)
258 * @IEEE80211_TX_INTFL_RCALGO: mac80211 internal flag, do not test or
259 * set this flag in the driver; indicates that the rate control
260 * algorithm was used and should be notified of TX status
261 * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211, 258 * @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211,
262 * used to indicate that a pending frame requires TX processing before 259 * used to indicate that a pending frame requires TX processing before
263 * it can be sent out. 260 * it can be sent out.
@@ -287,7 +284,6 @@ enum mac80211_tx_control_flags {
287 IEEE80211_TX_STAT_AMPDU = BIT(10), 284 IEEE80211_TX_STAT_AMPDU = BIT(10),
288 IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11), 285 IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11),
289 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12), 286 IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12),
290 IEEE80211_TX_INTFL_RCALGO = BIT(13),
291 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14), 287 IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14),
292 IEEE80211_TX_INTFL_RETRIED = BIT(15), 288 IEEE80211_TX_INTFL_RETRIED = BIT(15),
293 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16), 289 IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16),
@@ -2297,6 +2293,9 @@ enum rate_control_changed {
2297 * @short_preamble: whether mac80211 will request short-preamble transmission 2293 * @short_preamble: whether mac80211 will request short-preamble transmission
2298 * if the selected rate supports it 2294 * if the selected rate supports it
2299 * @max_rate_idx: user-requested maximum rate (not MCS for now) 2295 * @max_rate_idx: user-requested maximum rate (not MCS for now)
2296 * (deprecated; this will be removed once drivers get updated to use
2297 * rate_idx_mask)
2298 * @rate_idx_mask: user-requested rate mask (not MCS for now)
2300 * @skb: the skb that will be transmitted, the control information in it needs 2299 * @skb: the skb that will be transmitted, the control information in it needs
2301 * to be filled in 2300 * to be filled in
2302 * @ap: whether this frame is sent out in AP mode 2301 * @ap: whether this frame is sent out in AP mode
@@ -2309,6 +2308,7 @@ struct ieee80211_tx_rate_control {
2309 struct ieee80211_tx_rate reported_rate; 2308 struct ieee80211_tx_rate reported_rate;
2310 bool rts, short_preamble; 2309 bool rts, short_preamble;
2311 u8 max_rate_idx; 2310 u8 max_rate_idx;
2311 u32 rate_idx_mask;
2312 bool ap; 2312 bool ap;
2313}; 2313};
2314 2314