aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJouni Malinen <jouni.malinen@atheros.com>2010-01-06 13:09:08 +0200
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 a8d5d04314b..22e062afb5a 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -857,20 +857,11 @@ enum tx_power_setting {
* cfg80211_bitrate_mask - masks for bitrate control
*/
struct cfg80211_bitrate_mask {
-/*
- * As discussed in Berlin, this struct really
- * should look like this:
-
struct {
u32 legacy;
- u8 mcs[IEEE80211_HT_MCS_MASK_LEN];
+ /* TODO: add support for masking MCS rates; e.g.: */
+ /* u8 mcs[IEEE80211_HT_MCS_MASK_LEN]; */
} control[IEEE80211_NUM_BANDS];
-
- * Since we can always fix in-kernel users, let's keep
- * it simpler for now:
- */
- u32 fixed; /* fixed bitrate, 0 == not fixed */
- u32 maxrate; /* in kbps, 0 == no limit */
};
/**
* struct cfg80211_pmksa - PMK Security Association
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 39c516c352b..7e5af6d90b9 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -255,9 +255,6 @@ struct ieee80211_bss_conf {
* @IEEE80211_TX_CTL_RATE_CTRL_PROBE: internal to mac80211, can be
* set by rate control algorithms to indicate probe rate, will
* be cleared for fragmented frames (except on the last fragment)
- * @IEEE80211_TX_INTFL_RCALGO: mac80211 internal flag, do not test or
- * set this flag in the driver; indicates that the rate control
- * algorithm was used and should be notified of TX status
* @IEEE80211_TX_INTFL_NEED_TXPROCESSING: completely internal to mac80211,
* used to indicate that a pending frame requires TX processing before
* it can be sent out.
@@ -287,7 +284,6 @@ enum mac80211_tx_control_flags {
IEEE80211_TX_STAT_AMPDU = BIT(10),
IEEE80211_TX_STAT_AMPDU_NO_BACK = BIT(11),
IEEE80211_TX_CTL_RATE_CTRL_PROBE = BIT(12),
- IEEE80211_TX_INTFL_RCALGO = BIT(13),
IEEE80211_TX_INTFL_NEED_TXPROCESSING = BIT(14),
IEEE80211_TX_INTFL_RETRIED = BIT(15),
IEEE80211_TX_INTFL_DONT_ENCRYPT = BIT(16),
@@ -2297,6 +2293,9 @@ enum rate_control_changed {
* @short_preamble: whether mac80211 will request short-preamble transmission
* if the selected rate supports it
* @max_rate_idx: user-requested maximum rate (not MCS for now)
+ * (deprecated; this will be removed once drivers get updated to use
+ * rate_idx_mask)
+ * @rate_idx_mask: user-requested rate mask (not MCS for now)
* @skb: the skb that will be transmitted, the control information in it needs
* to be filled in
* @ap: whether this frame is sent out in AP mode
@@ -2309,6 +2308,7 @@ struct ieee80211_tx_rate_control {
struct ieee80211_tx_rate reported_rate;
bool rts, short_preamble;
u8 max_rate_idx;
+ u32 rate_idx_mask;
bool ap;
};