aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00/rt2x00mac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2x00mac.c')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index f519d7396848..4a6a0bd01ff1 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -365,6 +365,40 @@ int rt2x00mac_get_tx_stats(struct ieee80211_hw *hw,
365} 365}
366EXPORT_SYMBOL_GPL(rt2x00mac_get_tx_stats); 366EXPORT_SYMBOL_GPL(rt2x00mac_get_tx_stats);
367 367
368void rt2x00mac_erp_ie_changed(struct ieee80211_hw *hw, u8 changes,
369 int cts_protection, int preamble)
370{
371 struct rt2x00_dev *rt2x00dev = hw->priv;
372 int short_preamble;
373 int ack_timeout;
374 int ack_consume_time;
375 int difs;
376
377 /*
378 * We only support changing preamble mode.
379 */
380 if (!(changes & IEEE80211_ERP_CHANGE_PREAMBLE))
381 return;
382
383 short_preamble = !preamble;
384 preamble = !!(preamble) ? PREAMBLE : SHORT_PREAMBLE;
385
386 difs = (hw->conf.flags & IEEE80211_CONF_SHORT_SLOT_TIME) ?
387 SHORT_DIFS : DIFS;
388 ack_timeout = difs + PLCP + preamble + get_duration(ACK_SIZE, 10);
389
390 ack_consume_time = SIFS + PLCP + preamble + get_duration(ACK_SIZE, 10);
391
392 if (short_preamble)
393 __set_bit(CONFIG_SHORT_PREAMBLE, &rt2x00dev->flags);
394 else
395 __clear_bit(CONFIG_SHORT_PREAMBLE, &rt2x00dev->flags);
396
397 rt2x00dev->ops->lib->config_preamble(rt2x00dev, short_preamble,
398 ack_timeout, ack_consume_time);
399}
400EXPORT_SYMBOL_GPL(rt2x00mac_erp_ie_changed);
401
368int rt2x00mac_conf_tx(struct ieee80211_hw *hw, int queue, 402int rt2x00mac_conf_tx(struct ieee80211_hw *hw, int queue,
369 const struct ieee80211_tx_queue_params *params) 403 const struct ieee80211_tx_queue_params *params)
370{ 404{