aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/wireless/rt2x00/rt2500pci.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.c6
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00queue.h5
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00reg.h10
-rw-r--r--drivers/net/wireless/rt2x00/rt61pci.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt73usb.c2
7 files changed, 22 insertions, 7 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2500pci.c b/drivers/net/wireless/rt2x00/rt2500pci.c
index fb86e2c55248..ebcc49770922 100644
--- a/drivers/net/wireless/rt2x00/rt2500pci.c
+++ b/drivers/net/wireless/rt2x00/rt2500pci.c
@@ -1233,7 +1233,7 @@ static void rt2500pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1233 rt2x00_set_field32(&word, TXD_W0_TIMESTAMP, 1233 rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
1234 test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags)); 1234 test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags));
1235 rt2x00_set_field32(&word, TXD_W0_OFDM, 1235 rt2x00_set_field32(&word, TXD_W0_OFDM,
1236 test_bit(ENTRY_TXD_OFDM_RATE, &txdesc->flags)); 1236 (txdesc->rate_mode == RATE_MODE_OFDM));
1237 rt2x00_set_field32(&word, TXD_W0_CIPHER_OWNER, 1); 1237 rt2x00_set_field32(&word, TXD_W0_CIPHER_OWNER, 1);
1238 rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); 1238 rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
1239 rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, 1239 rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index 7b97160e2b5a..e992bad64644 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -1217,7 +1217,7 @@ static void rt2500usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1217 rt2x00_set_field32(&word, TXD_W0_TIMESTAMP, 1217 rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
1218 test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags)); 1218 test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags));
1219 rt2x00_set_field32(&word, TXD_W0_OFDM, 1219 rt2x00_set_field32(&word, TXD_W0_OFDM,
1220 test_bit(ENTRY_TXD_OFDM_RATE, &txdesc->flags)); 1220 (txdesc->rate_mode == RATE_MODE_OFDM));
1221 rt2x00_set_field32(&word, TXD_W0_NEW_SEQ, 1221 rt2x00_set_field32(&word, TXD_W0_NEW_SEQ,
1222 test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags)); 1222 test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags));
1223 rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); 1223 rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index f4a951338f8f..67140e75608d 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -314,9 +314,13 @@ static void rt2x00queue_create_tx_descriptor(struct queue_entry *entry,
314 } else 314 } else
315 txdesc->ifs = IFS_SIFS; 315 txdesc->ifs = IFS_SIFS;
316 316
317 /*
318 * Determine rate modulation.
319 */
317 hwrate = rt2x00_get_rate(rate->hw_value); 320 hwrate = rt2x00_get_rate(rate->hw_value);
321 txdesc->rate_mode = RATE_MODE_CCK;
318 if (hwrate->flags & DEV_RATE_OFDM) 322 if (hwrate->flags & DEV_RATE_OFDM)
319 __set_bit(ENTRY_TXD_OFDM_RATE, &txdesc->flags); 323 txdesc->rate_mode = RATE_MODE_OFDM;
320 324
321 /* 325 /*
322 * Apply TX descriptor handling by components 326 * Apply TX descriptor handling by components
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h
index 282937153408..5a9d2c3d1bb0 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.h
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.h
@@ -222,7 +222,6 @@ struct txdone_entry_desc {
222 * 222 *
223 * @ENTRY_TXD_RTS_FRAME: This frame is a RTS frame. 223 * @ENTRY_TXD_RTS_FRAME: This frame is a RTS frame.
224 * @ENTRY_TXD_CTS_FRAME: This frame is a CTS-to-self frame. 224 * @ENTRY_TXD_CTS_FRAME: This frame is a CTS-to-self frame.
225 * @ENTRY_TXD_OFDM_RATE: This frame is send out with an OFDM rate.
226 * @ENTRY_TXD_GENERATE_SEQ: This frame requires sequence counter. 225 * @ENTRY_TXD_GENERATE_SEQ: This frame requires sequence counter.
227 * @ENTRY_TXD_FIRST_FRAGMENT: This is the first frame. 226 * @ENTRY_TXD_FIRST_FRAGMENT: This is the first frame.
228 * @ENTRY_TXD_MORE_FRAG: This frame is followed by another fragment. 227 * @ENTRY_TXD_MORE_FRAG: This frame is followed by another fragment.
@@ -238,7 +237,6 @@ struct txdone_entry_desc {
238enum txentry_desc_flags { 237enum txentry_desc_flags {
239 ENTRY_TXD_RTS_FRAME, 238 ENTRY_TXD_RTS_FRAME,
240 ENTRY_TXD_CTS_FRAME, 239 ENTRY_TXD_CTS_FRAME,
241 ENTRY_TXD_OFDM_RATE,
242 ENTRY_TXD_GENERATE_SEQ, 240 ENTRY_TXD_GENERATE_SEQ,
243 ENTRY_TXD_FIRST_FRAGMENT, 241 ENTRY_TXD_FIRST_FRAGMENT,
244 ENTRY_TXD_MORE_FRAG, 242 ENTRY_TXD_MORE_FRAG,
@@ -263,6 +261,7 @@ enum txentry_desc_flags {
263 * @length_low: PLCP length low word. 261 * @length_low: PLCP length low word.
264 * @signal: PLCP signal. 262 * @signal: PLCP signal.
265 * @service: PLCP service. 263 * @service: PLCP service.
264 * @rate_mode: Rate mode (See @enum rate_modulation).
266 * @retry_limit: Max number of retries. 265 * @retry_limit: Max number of retries.
267 * @aifs: AIFS value. 266 * @aifs: AIFS value.
268 * @ifs: IFS value. 267 * @ifs: IFS value.
@@ -282,6 +281,8 @@ struct txentry_desc {
282 u16 signal; 281 u16 signal;
283 u16 service; 282 u16 service;
284 283
284 u16 rate_mode;
285
285 short retry_limit; 286 short retry_limit;
286 short aifs; 287 short aifs;
287 short ifs; 288 short ifs;
diff --git a/drivers/net/wireless/rt2x00/rt2x00reg.h b/drivers/net/wireless/rt2x00/rt2x00reg.h
index c2fba7c9f05c..93f8427055cf 100644
--- a/drivers/net/wireless/rt2x00/rt2x00reg.h
+++ b/drivers/net/wireless/rt2x00/rt2x00reg.h
@@ -125,6 +125,16 @@ enum cipher {
125}; 125};
126 126
127/* 127/*
128 * Rate modulations
129 */
130enum rate_modulation {
131 RATE_MODE_CCK = 0,
132 RATE_MODE_OFDM = 1,
133 RATE_MODE_HT_MIX = 2,
134 RATE_MODE_HT_GREENFIELD = 3,
135};
136
137/*
128 * Register handlers. 138 * Register handlers.
129 * We store the position of a register field inside a field structure, 139 * We store the position of a register field inside a field structure,
130 * This will simplify the process of setting and reading a certain field 140 * This will simplify the process of setting and reading a certain field
diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c
index 875bcdcf6bc8..82d35a5a4aa7 100644
--- a/drivers/net/wireless/rt2x00/rt61pci.c
+++ b/drivers/net/wireless/rt2x00/rt61pci.c
@@ -1847,7 +1847,7 @@ static void rt61pci_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1847 rt2x00_set_field32(&word, TXD_W0_TIMESTAMP, 1847 rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
1848 test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags)); 1848 test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags));
1849 rt2x00_set_field32(&word, TXD_W0_OFDM, 1849 rt2x00_set_field32(&word, TXD_W0_OFDM,
1850 test_bit(ENTRY_TXD_OFDM_RATE, &txdesc->flags)); 1850 (txdesc->rate_mode == RATE_MODE_OFDM));
1851 rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); 1851 rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
1852 rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, 1852 rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
1853 test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); 1853 test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags));
diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c
index c2658108d9c3..2b70c01b55e9 100644
--- a/drivers/net/wireless/rt2x00/rt73usb.c
+++ b/drivers/net/wireless/rt2x00/rt73usb.c
@@ -1498,7 +1498,7 @@ static void rt73usb_write_tx_desc(struct rt2x00_dev *rt2x00dev,
1498 rt2x00_set_field32(&word, TXD_W0_TIMESTAMP, 1498 rt2x00_set_field32(&word, TXD_W0_TIMESTAMP,
1499 test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags)); 1499 test_bit(ENTRY_TXD_REQ_TIMESTAMP, &txdesc->flags));
1500 rt2x00_set_field32(&word, TXD_W0_OFDM, 1500 rt2x00_set_field32(&word, TXD_W0_OFDM,
1501 test_bit(ENTRY_TXD_OFDM_RATE, &txdesc->flags)); 1501 (txdesc->rate_mode == RATE_MODE_OFDM));
1502 rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs); 1502 rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
1503 rt2x00_set_field32(&word, TXD_W0_RETRY_MODE, 1503 rt2x00_set_field32(&word, TXD_W0_RETRY_MODE,
1504 test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags)); 1504 test_bit(ENTRY_TXD_RETRY_MODE, &txdesc->flags));