aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rt2x00
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2012-04-04 10:15:33 -0400
committerJohn W. Linville <linville@tuxdriver.com>2012-04-11 16:23:44 -0400
commitda40f4074fdfde347974ebcef3ad57a49f7d04a7 (patch)
tree99d4bfaf5f4d5ce0a0a1c0e3b5dbeaac78060105 /drivers/net/wireless/rt2x00
parent78f9c85035101317d4189cdb31c582f96854b182 (diff)
rt2x00: configure different txdesc parameters for non HT channel
This is needed when we are concted to non 11n AP. Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00')
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h1
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c5
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c26
3 files changed, 24 insertions, 8 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 471f87cab4ab..8de9bfc4e51a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -692,6 +692,7 @@ enum rt2x00_state_flags {
692 */ 692 */
693 CONFIG_CHANNEL_HT40, 693 CONFIG_CHANNEL_HT40,
694 CONFIG_POWERSAVING, 694 CONFIG_POWERSAVING,
695 CONFIG_HT_DISABLED,
695 696
696 /* 697 /*
697 * Mark we currently are sequentially reading TX_STA_FIFO register 698 * Mark we currently are sequentially reading TX_STA_FIFO register
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index 293676bfa571..e7361d913e8e 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -217,6 +217,11 @@ void rt2x00lib_config(struct rt2x00_dev *rt2x00dev,
217 libconf.conf = conf; 217 libconf.conf = conf;
218 218
219 if (ieee80211_flags & IEEE80211_CONF_CHANGE_CHANNEL) { 219 if (ieee80211_flags & IEEE80211_CONF_CHANGE_CHANNEL) {
220 if (!conf_is_ht(conf))
221 set_bit(CONFIG_HT_DISABLED, &rt2x00dev->flags);
222 else
223 clear_bit(CONFIG_HT_DISABLED, &rt2x00dev->flags);
224
220 if (conf_is_ht40(conf)) { 225 if (conf_is_ht40(conf)) {
221 set_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags); 226 set_bit(CONFIG_CHANNEL_HT40, &rt2x00dev->flags);
222 hw_value = rt2x00ht_center_channel(rt2x00dev, conf); 227 hw_value = rt2x00ht_center_channel(rt2x00dev, conf);
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index 9b1b2b7a7807..acd013353cc7 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -320,14 +320,6 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
320 txdesc->u.ht.wcid = sta_priv->wcid; 320 txdesc->u.ht.wcid = sta_priv->wcid;
321 } 321 }
322 322
323 txdesc->u.ht.ba_size = 7; /* FIXME: What value is needed? */
324
325 /*
326 * Only one STBC stream is supported for now.
327 */
328 if (tx_info->flags & IEEE80211_TX_CTL_STBC)
329 txdesc->u.ht.stbc = 1;
330
331 /* 323 /*
332 * If IEEE80211_TX_RC_MCS is set txrate->idx just contains the 324 * If IEEE80211_TX_RC_MCS is set txrate->idx just contains the
333 * mcs rate to be used 325 * mcs rate to be used
@@ -351,6 +343,24 @@ static void rt2x00queue_create_tx_descriptor_ht(struct rt2x00_dev *rt2x00dev,
351 txdesc->u.ht.mcs |= 0x08; 343 txdesc->u.ht.mcs |= 0x08;
352 } 344 }
353 345
346 if (test_bit(CONFIG_HT_DISABLED, &rt2x00dev->flags)) {
347 if (!(tx_info->flags & IEEE80211_TX_CTL_FIRST_FRAGMENT))
348 txdesc->u.ht.txop = TXOP_SIFS;
349 else
350 txdesc->u.ht.txop = TXOP_BACKOFF;
351
352 /* Left zero on all other settings. */
353 return;
354 }
355
356 txdesc->u.ht.ba_size = 7; /* FIXME: What value is needed? */
357
358 /*
359 * Only one STBC stream is supported for now.
360 */
361 if (tx_info->flags & IEEE80211_TX_CTL_STBC)
362 txdesc->u.ht.stbc = 1;
363
354 /* 364 /*
355 * This frame is eligible for an AMPDU, however, don't aggregate 365 * This frame is eligible for an AMPDU, however, don't aggregate
356 * frames that are intended to probe a specific tx rate. 366 * frames that are intended to probe a specific tx rate.