aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-17 18:18:36 +0100
committerJohn W. Linville <linville@tuxdriver.com>2009-11-18 17:09:24 -0500
commitaf65cd96dd4ea8ea5adc6ee850e61a407cd1067a (patch)
treefcdd50d2b9121bc26110329cb0fbefdeace99858 /net/mac80211/tx.c
parentwl1251: add NVS in EEPROM support (diff)
downloadlinux-dev-af65cd96dd4ea8ea5adc6ee850e61a407cd1067a.tar.xz
linux-dev-af65cd96dd4ea8ea5adc6ee850e61a407cd1067a.zip
mac80211: make software rate control optional
Some devices implement the entire rate control in firmware in some way, like wl1271 or like iwlwifi which does some things in software but not a lot. Therefore generic software rate control is rather useless for them and just adds avoidable overhead to the transmit path. It's fairly simple to let drivers indicate that they do not need rate control, but they need to fulfil a number of conditions that we encode in WARN_ONs. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to '')
-rw-r--r--net/mac80211/tx.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3466e1f7fd12..bd916437e2fb 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1219,7 +1219,8 @@ static int invoke_tx_handlers(struct ieee80211_tx_data *tx)
CALL_TXH(ieee80211_tx_h_ps_buf);
CALL_TXH(ieee80211_tx_h_select_key);
CALL_TXH(ieee80211_tx_h_michael_mic_add);
- CALL_TXH(ieee80211_tx_h_rate_ctrl);
+ if (!(tx->local->hw.flags & IEEE80211_HW_HAS_RATE_CONTROL))
+ CALL_TXH(ieee80211_tx_h_rate_ctrl);
CALL_TXH(ieee80211_tx_h_misc);
CALL_TXH(ieee80211_tx_h_sequence);
CALL_TXH(ieee80211_tx_h_fragment);