View | Details | Raw Unified | Return to bug 2877
Collapse All | Expand All

(-)a/src/wifi/model/edca-parameter-set.cc (-16 / +16 lines)
 Lines 77-90    Link Here 
77
}
77
}
78
78
79
void
79
void
80
EdcaParameterSet::SetBeCWmin (uint8_t cwMin)
80
EdcaParameterSet::SetBeCWmin (uint32_t cwMin)
81
{
81
{
82
  uint8_t ECWmin = log2 (cwMin + 1);
82
  uint8_t ECWmin = log2 (cwMin + 1);
83
  m_acBE |= (ECWmin & 0x0f) << 8;
83
  m_acBE |= (ECWmin & 0x0f) << 8;
84
}
84
}
85
85
86
void
86
void
87
EdcaParameterSet::SetBeCWmax (uint8_t cwMax)
87
EdcaParameterSet::SetBeCWmax (uint32_t cwMax)
88
{
88
{
89
  uint8_t ECWmax = log2 (cwMax + 1);
89
  uint8_t ECWmax = log2 (cwMax + 1);
90
  m_acBE |= (ECWmax & 0x0f) << 12;
90
  m_acBE |= (ECWmax & 0x0f) << 12;
 Lines 115-128    Link Here 
115
}
115
}
116
116
117
void
117
void
118
EdcaParameterSet::SetBkCWmin (uint8_t cwMin)
118
EdcaParameterSet::SetBkCWmin (uint32_t cwMin)
119
{
119
{
120
  uint8_t ECWmin = log2 (cwMin + 1);
120
  uint8_t ECWmin = log2 (cwMin + 1);
121
  m_acBK |= (ECWmin & 0x0f) << 8;
121
  m_acBK |= (ECWmin & 0x0f) << 8;
122
}
122
}
123
123
124
void
124
void
125
EdcaParameterSet::SetBkCWmax (uint8_t cwMax)
125
EdcaParameterSet::SetBkCWmax (uint32_t cwMax)
126
{
126
{
127
  uint8_t ECWmax = log2 (cwMax + 1);
127
  uint8_t ECWmax = log2 (cwMax + 1);
128
  m_acBK |= (ECWmax & 0x0f) << 12;
128
  m_acBK |= (ECWmax & 0x0f) << 12;
 Lines 153-166    Link Here 
153
}
153
}
154
154
155
void
155
void
156
EdcaParameterSet::SetViCWmin (uint8_t cwMin)
156
EdcaParameterSet::SetViCWmin (uint32_t cwMin)
157
{
157
{
158
  uint8_t ECWmin = log2 (cwMin + 1);
158
  uint8_t ECWmin = log2 (cwMin + 1);
159
  m_acVI |= (ECWmin & 0x0f) << 8;
159
  m_acVI |= (ECWmin & 0x0f) << 8;
160
}
160
}
161
161
162
void
162
void
163
EdcaParameterSet::SetViCWmax (uint8_t cwMax)
163
EdcaParameterSet::SetViCWmax (uint32_t cwMax)
164
{
164
{
165
  uint8_t ECWmax = log2 (cwMax + 1);
165
  uint8_t ECWmax = log2 (cwMax + 1);
166
  m_acVI |= (ECWmax & 0x0f) << 12;
166
  m_acVI |= (ECWmax & 0x0f) << 12;
 Lines 191-204    Link Here 
191
}
191
}
192
192
193
void
193
void
194
EdcaParameterSet::SetVoCWmin (uint8_t cwMin)
194
EdcaParameterSet::SetVoCWmin (uint32_t cwMin)
195
{
195
{
196
  uint8_t ECWmin = log2 (cwMin + 1);
196
  uint8_t ECWmin = log2 (cwMin + 1);
197
  m_acVO |= (ECWmin & 0x0f) << 8;
197
  m_acVO |= (ECWmin & 0x0f) << 8;
198
}
198
}
199
199
200
void
200
void
201
EdcaParameterSet::SetVoCWmax (uint8_t cwMax)
201
EdcaParameterSet::SetVoCWmax (uint32_t cwMax)
202
{
202
{
203
  uint8_t ECWmax = log2 (cwMax + 1);
203
  uint8_t ECWmax = log2 (cwMax + 1);
204
  m_acVO |= (ECWmax & 0x0f) << 12;
204
  m_acVO |= (ECWmax & 0x0f) << 12;
 Lines 234-247    Link Here 
234
  return ((m_acBE >> 5) & 0x03);
234
  return ((m_acBE >> 5) & 0x03);
235
}
235
}
236
236
237
uint8_t
237
uint32_t
238
EdcaParameterSet::GetBeCWmin (void) const
238
EdcaParameterSet::GetBeCWmin (void) const
239
{
239
{
240
  uint8_t ECWmin = ((m_acBE >> 8) & 0x0f);
240
  uint8_t ECWmin = ((m_acBE >> 8) & 0x0f);
241
  return (exp2 (ECWmin) - 1);
241
  return (exp2 (ECWmin) - 1);
242
}
242
}
243
243
244
uint8_t
244
uint32_t
245
EdcaParameterSet::GetBeCWmax (void) const
245
EdcaParameterSet::GetBeCWmax (void) const
246
{
246
{
247
  uint8_t ECWmax = ((m_acBE >> 12) & 0x0f);
247
  uint8_t ECWmax = ((m_acBE >> 12) & 0x0f);
 Lines 272-285    Link Here 
272
  return ((m_acBK >> 5) & 0x03);
272
  return ((m_acBK >> 5) & 0x03);
273
}
273
}
274
274
275
uint8_t
275
uint32_t
276
EdcaParameterSet::GetBkCWmin (void) const
276
EdcaParameterSet::GetBkCWmin (void) const
277
{
277
{
278
  uint8_t ECWmin = ((m_acBK >> 8) & 0x0f);
278
  uint8_t ECWmin = ((m_acBK >> 8) & 0x0f);
279
  return (exp2 (ECWmin) - 1);
279
  return (exp2 (ECWmin) - 1);
280
}
280
}
281
281
282
uint8_t
282
uint32_t
283
EdcaParameterSet::GetBkCWmax (void) const
283
EdcaParameterSet::GetBkCWmax (void) const
284
{
284
{
285
  uint8_t ECWmax = ((m_acBK >> 12) & 0x0f);
285
  uint8_t ECWmax = ((m_acBK >> 12) & 0x0f);
 Lines 310-323    Link Here 
310
  return ((m_acVI >> 5) & 0x03);
310
  return ((m_acVI >> 5) & 0x03);
311
}
311
}
312
312
313
uint8_t
313
uint32_t
314
EdcaParameterSet::GetViCWmin (void) const
314
EdcaParameterSet::GetViCWmin (void) const
315
{
315
{
316
  uint8_t ECWmin = ((m_acVI >> 8) & 0x0f);
316
  uint8_t ECWmin = ((m_acVI >> 8) & 0x0f);
317
  return (exp2 (ECWmin) - 1);
317
  return (exp2 (ECWmin) - 1);
318
}
318
}
319
319
320
uint8_t
320
uint32_t
321
EdcaParameterSet::GetViCWmax (void) const
321
EdcaParameterSet::GetViCWmax (void) const
322
{
322
{
323
  uint8_t ECWmax = ((m_acVI >> 12) & 0x0f);
323
  uint8_t ECWmax = ((m_acVI >> 12) & 0x0f);
 Lines 348-361    Link Here 
348
  return ((m_acVO >> 5) & 0x03);
348
  return ((m_acVO >> 5) & 0x03);
349
}
349
}
350
350
351
uint8_t
351
uint32_t
352
EdcaParameterSet::GetVoCWmin (void) const
352
EdcaParameterSet::GetVoCWmin (void) const
353
{
353
{
354
  uint8_t ECWmin = ((m_acVO >> 8) & 0x0f);
354
  uint8_t ECWmin = ((m_acVO >> 8) & 0x0f);
355
  return (exp2 (ECWmin) - 1);
355
  return (exp2 (ECWmin) - 1);
356
}
356
}
357
357
358
uint8_t
358
uint32_t
359
EdcaParameterSet::GetVoCWmax (void) const
359
EdcaParameterSet::GetVoCWmax (void) const
360
{
360
{
361
  uint8_t ECWmax = ((m_acVO >> 12) & 0x0f);
361
  uint8_t ECWmax = ((m_acVO >> 12) & 0x0f);
(-)a/src/wifi/model/edca-parameter-set.h (-16 / +16 lines)
 Lines 75-87    Link Here 
75
   *
75
   *
76
   * \param cwMin the AC_BE CWmin field in the EdcaParameterSet information element
76
   * \param cwMin the AC_BE CWmin field in the EdcaParameterSet information element
77
   */
77
   */
78
  void SetBeCWmin (uint8_t cwMin);
78
  void SetBeCWmin (uint32_t cwMin);
79
  /**
79
  /**
80
   * Set the AC_BE CWmax field in the EdcaParameterSet information element.
80
   * Set the AC_BE CWmax field in the EdcaParameterSet information element.
81
   *
81
   *
82
   * \param cwMax the AC_BE CWmax field in the EdcaParameterSet information element
82
   * \param cwMax the AC_BE CWmax field in the EdcaParameterSet information element
83
   */
83
   */
84
  void SetBeCWmax (uint8_t cwMax);
84
  void SetBeCWmax (uint32_t cwMax);
85
  /**
85
  /**
86
   * Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
86
   * Set the AC_BE TXOP Limit field in the EdcaParameterSet information element.
87
   *
87
   *
 Lines 111-123    Link Here 
111
   *
111
   *
112
   * \param cwMin the AC_BK CWmin field in the EdcaParameterSet information element
112
   * \param cwMin the AC_BK CWmin field in the EdcaParameterSet information element
113
   */
113
   */
114
  void SetBkCWmin (uint8_t cwMin);
114
  void SetBkCWmin (uint32_t cwMin);
115
  /**
115
  /**
116
   * Set the AC_BK CWmax field in the EdcaParameterSet information element.
116
   * Set the AC_BK CWmax field in the EdcaParameterSet information element.
117
   *
117
   *
118
   * \param cwMax the AC_BK CWmax field in the EdcaParameterSet information element
118
   * \param cwMax the AC_BK CWmax field in the EdcaParameterSet information element
119
   */
119
   */
120
  void SetBkCWmax (uint8_t cwMax);
120
  void SetBkCWmax (uint32_t cwMax);
121
  /**
121
  /**
122
   * Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
122
   * Set the AC_BK TXOP Limit field in the EdcaParameterSet information element.
123
   *
123
   *
 Lines 147-159    Link Here 
147
   *
147
   *
148
   * \param cwMin the AC_VI CWmin field in the EdcaParameterSet information element
148
   * \param cwMin the AC_VI CWmin field in the EdcaParameterSet information element
149
   */
149
   */
150
  void SetViCWmin (uint8_t cwMin);
150
  void SetViCWmin (uint32_t cwMin);
151
  /**
151
  /**
152
   * Set the AC_VI CWmax field in the EdcaParameterSet information element.
152
   * Set the AC_VI CWmax field in the EdcaParameterSet information element.
153
   *
153
   *
154
   * \param cwMax the AC_VI CWmax field in the EdcaParameterSet information element
154
   * \param cwMax the AC_VI CWmax field in the EdcaParameterSet information element
155
   */
155
   */
156
  void SetViCWmax (uint8_t cwMax);
156
  void SetViCWmax (uint32_t cwMax);
157
  /**
157
  /**
158
   * Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
158
   * Set the AC_VI TXOP Limit field in the EdcaParameterSet information element.
159
   *
159
   *
 Lines 183-195    Link Here 
183
   *
183
   *
184
   * \param cwMin the AC_VO CWmin field in the EdcaParameterSet information element
184
   * \param cwMin the AC_VO CWmin field in the EdcaParameterSet information element
185
   */
185
   */
186
  void SetVoCWmin (uint8_t cwMin);
186
  void SetVoCWmin (uint32_t cwMin);
187
  /**
187
  /**
188
   * Set the AC_VO CWmax field in the EdcaParameterSet information element.
188
   * Set the AC_VO CWmax field in the EdcaParameterSet information element.
189
   *
189
   *
190
   * \param cwMax the AC_VO CWmax field in the EdcaParameterSet information element
190
   * \param cwMax the AC_VO CWmax field in the EdcaParameterSet information element
191
   */
191
   */
192
  void SetVoCWmax (uint8_t cwMax);
192
  void SetVoCWmax (uint32_t cwMax);
193
  /**
193
  /**
194
   * Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
194
   * Set the AC_VO TXOP Limit field in the EdcaParameterSet information element.
195
   *
195
   *
 Lines 226-238    Link Here 
226
   *
226
   *
227
   * \return the AC_BE CWmin field in the EdcaParameterSet information element
227
   * \return the AC_BE CWmin field in the EdcaParameterSet information element
228
   */
228
   */
229
  uint8_t GetBeCWmin (void) const;
229
  uint32_t GetBeCWmin (void) const;
230
  /**
230
  /**
231
   * Return the AC_BE CWmax field in the EdcaParameterSet information element.
231
   * Return the AC_BE CWmax field in the EdcaParameterSet information element.
232
   *
232
   *
233
   * \return the AC_BE CWmax field in the EdcaParameterSet information element
233
   * \return the AC_BE CWmax field in the EdcaParameterSet information element
234
   */
234
   */
235
  uint8_t GetBeCWmax (void) const;
235
  uint32_t GetBeCWmax (void) const;
236
  /**
236
  /**
237
   * Return the AC_BE TXOP Limit field in the EdcaParameterSet information element.
237
   * Return the AC_BE TXOP Limit field in the EdcaParameterSet information element.
238
   *
238
   *
 Lines 262-274    Link Here 
262
   *
262
   *
263
   * \return the AC_BK CWmin field in the EdcaParameterSet information element
263
   * \return the AC_BK CWmin field in the EdcaParameterSet information element
264
   */
264
   */
265
  uint8_t GetBkCWmin (void) const;
265
  uint32_t GetBkCWmin (void) const;
266
  /**
266
  /**
267
   * Return the AC_BK CWmax field in the EdcaParameterSet information element.
267
   * Return the AC_BK CWmax field in the EdcaParameterSet information element.
268
   *
268
   *
269
   * \return the AC_BK CWmax field in the EdcaParameterSet information element
269
   * \return the AC_BK CWmax field in the EdcaParameterSet information element
270
   */
270
   */
271
  uint8_t GetBkCWmax (void) const;
271
  uint32_t GetBkCWmax (void) const;
272
  /**
272
  /**
273
   * Return the AC_BK TXOP Limit field in the EdcaParameterSet information element.
273
   * Return the AC_BK TXOP Limit field in the EdcaParameterSet information element.
274
   *
274
   *
 Lines 298-310    Link Here 
298
   *
298
   *
299
   * \return the AC_VI CWmin field in the EdcaParameterSet information element
299
   * \return the AC_VI CWmin field in the EdcaParameterSet information element
300
   */
300
   */
301
  uint8_t GetViCWmin (void) const;
301
  uint32_t GetViCWmin (void) const;
302
  /**
302
  /**
303
   * Return the AC_VI CWmax field in the EdcaParameterSet information element.
303
   * Return the AC_VI CWmax field in the EdcaParameterSet information element.
304
   *
304
   *
305
   * \return the AC_VI CWmax field in the EdcaParameterSet information element
305
   * \return the AC_VI CWmax field in the EdcaParameterSet information element
306
   */
306
   */
307
  uint8_t GetViCWmax (void) const;
307
  uint32_t GetViCWmax (void) const;
308
  /**
308
  /**
309
   * Return the AC_VI TXOP Limit field in the EdcaParameterSet information element.
309
   * Return the AC_VI TXOP Limit field in the EdcaParameterSet information element.
310
   *
310
   *
 Lines 334-346    Link Here 
334
   *
334
   *
335
   * \return the AC_VO CWmin field in the EdcaParameterSet information element
335
   * \return the AC_VO CWmin field in the EdcaParameterSet information element
336
   */
336
   */
337
  uint8_t GetVoCWmin (void) const;
337
  uint32_t GetVoCWmin (void) const;
338
  /**
338
  /**
339
   * Return the AC_VO CWmax field in the EdcaParameterSet information element.
339
   * Return the AC_VO CWmax field in the EdcaParameterSet information element.
340
   *
340
   *
341
   * \return the AC_VO CWmax field in the EdcaParameterSet information element
341
   * \return the AC_VO CWmax field in the EdcaParameterSet information element
342
   */
342
   */
343
  uint8_t GetVoCWmax (void) const;
343
  uint32_t GetVoCWmax (void) const;
344
  /**
344
  /**
345
   * Return the AC_VO TXOP Limit field in the EdcaParameterSet information element.
345
   * Return the AC_VO TXOP Limit field in the EdcaParameterSet information element.
346
   *
346
   *
(-)a/src/wifi/model/sta-wifi-mac.cc (-1 / +1 lines)
 Lines 929-935    Link Here 
929
}
929
}
930
930
931
void
931
void
932
StaWifiMac::SetEdcaParameters (AcIndex ac, uint8_t cwMin, uint8_t cwMax, uint8_t aifsn, Time txopLimit)
932
StaWifiMac::SetEdcaParameters (AcIndex ac, uint32_t cwMin, uint32_t cwMax, uint8_t aifsn, Time txopLimit)
933
{
933
{
934
  Ptr<EdcaTxopN> edca = m_edca.find (ac)->second;
934
  Ptr<EdcaTxopN> edca = m_edca.find (ac)->second;
935
  edca->SetMinCw (cwMin);
935
  edca->SetMinCw (cwMin);
(-)a/src/wifi/model/sta-wifi-mac.h (-1 / +1 lines)
 Lines 156-162    Link Here 
156
   * \param aifsn the number of slots that make up an AIFS
156
   * \param aifsn the number of slots that make up an AIFS
157
   * \param txopLimit the TXOP limit
157
   * \param txopLimit the TXOP limit
158
   */
158
   */
159
  void SetEdcaParameters (AcIndex ac, uint8_t cwMin, uint8_t cwMax, uint8_t aifsn, Time txopLimit);
159
  void SetEdcaParameters (AcIndex ac, uint32_t cwMin, uint32_t cwMax, uint8_t aifsn, Time txopLimit);
160
  /**
160
  /**
161
   * Return the Capability information of the current STA.
161
   * Return the Capability information of the current STA.
162
   *
162
   *

Return to bug 2877