author | Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
Fri, 14 Aug 2009 12:21:39 +0200 | |
changeset 4720 | 15221757964f |
parent 4408 | 76a169b3db3d |
child 5747 | a171e73c4dae |
permissions | -rw-r--r-- |
4408 | 1 |
/* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil; -*- */ |
2 |
/* |
|
3 |
* Copyright (c) 2006, 2009 INRIA |
|
4 |
* Copyright (c) 2009 MIRKO BANCHI |
|
5 |
* |
|
6 |
* This program is free software; you can redistribute it and/or modify |
|
7 |
* it under the terms of the GNU General Public License version 2 as |
|
8 |
* published by the Free Software Foundation; |
|
9 |
* |
|
10 |
* This program is distributed in the hope that it will be useful, |
|
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
14 |
* |
|
15 |
* You should have received a copy of the GNU General Public License |
|
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
18 |
* |
|
19 |
* Author: Mathieu Lacage <mathieu.lacage@sophia.inria.fr> |
|
20 |
* Author: Mirko Banchi <mk.banchi@gmail.com> |
|
21 |
*/ |
|
22 |
#include "ns3/pointer.h" |
|
23 |
#include "ns3/log.h" |
|
24 |
#include "ns3/string.h" |
|
25 |
||
26 |
#include "qos-tag.h" |
|
27 |
#include "edca-txop-n.h" |
|
28 |
#include "qadhoc-wifi-mac.h" |
|
29 |
#include "mac-low.h" |
|
30 |
#include "dcf-manager.h" |
|
31 |
#include "mac-rx-middle.h" |
|
32 |
#include "mac-tx-middle.h" |
|
33 |
#include "wifi-mac-header.h" |
|
34 |
#include "msdu-aggregator.h" |
|
35 |
#include "amsdu-subframe-header.h" |
|
36 |
#include "mgt-headers.h" |
|
37 |
||
38 |
NS_LOG_COMPONENT_DEFINE ("QadhocWifiMac"); |
|
39 |
||
40 |
namespace ns3 { |
|
41 |
||
42 |
NS_OBJECT_ENSURE_REGISTERED (QadhocWifiMac); |
|
43 |
||
44 |
TypeId |
|
45 |
QadhocWifiMac::GetTypeId (void) |
|
46 |
{ |
|
47 |
static TypeId tid = TypeId ("ns3::QadhocWifiMac") |
|
48 |
.SetParent<WifiMac> () |
|
49 |
.AddConstructor<QadhocWifiMac> () |
|
50 |
.AddAttribute ("VO_EdcaTxopN", |
|
51 |
"Queue that manages packets belonging to AC_VO access class", |
|
52 |
PointerValue (), |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
53 |
MakePointerAccessor(&QadhocWifiMac::GetVOQueue), |
4408 | 54 |
MakePointerChecker<EdcaTxopN> ()) |
55 |
.AddAttribute ("VI_EdcaTxopN", |
|
56 |
"Queue that manages packets belonging to AC_VI access class", |
|
57 |
PointerValue (), |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
58 |
MakePointerAccessor(&QadhocWifiMac::GetVIQueue), |
4408 | 59 |
MakePointerChecker<EdcaTxopN> ()) |
60 |
.AddAttribute ("BE_EdcaTxopN", |
|
61 |
"Queue that manages packets belonging to AC_BE access class", |
|
62 |
PointerValue (), |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
63 |
MakePointerAccessor(&QadhocWifiMac::GetBEQueue), |
4408 | 64 |
MakePointerChecker<EdcaTxopN> ()) |
65 |
.AddAttribute ("BK_EdcaTxopN", |
|
66 |
"Queue that manages packets belonging to AC_BK access class", |
|
67 |
PointerValue (), |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
68 |
MakePointerAccessor(&QadhocWifiMac::GetBKQueue), |
4408 | 69 |
MakePointerChecker<EdcaTxopN> ()) |
70 |
; |
|
71 |
return tid; |
|
72 |
} |
|
73 |
||
74 |
QadhocWifiMac::QadhocWifiMac () |
|
75 |
{ |
|
76 |
NS_LOG_FUNCTION (this); |
|
77 |
m_rxMiddle = new MacRxMiddle (); |
|
78 |
m_rxMiddle->SetForwardCallback (MakeCallback (&QadhocWifiMac::Receive, this)); |
|
79 |
||
80 |
m_txMiddle = new MacTxMiddle (); |
|
81 |
||
82 |
m_low = CreateObject<MacLow> (); |
|
83 |
m_low->SetRxCallback (MakeCallback (&MacRxMiddle::Receive, m_rxMiddle)); |
|
84 |
||
85 |
m_dcfManager = new DcfManager (); |
|
86 |
m_dcfManager->SetupLowListener (m_low); |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
87 |
|
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
88 |
SetQueue (AC_VO); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
89 |
SetQueue (AC_VI); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
90 |
SetQueue (AC_BE); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
91 |
SetQueue (AC_BK); |
4408 | 92 |
} |
93 |
||
94 |
QadhocWifiMac::~QadhocWifiMac () |
|
95 |
{ |
|
96 |
NS_LOG_FUNCTION (this); |
|
97 |
} |
|
98 |
||
99 |
void |
|
100 |
QadhocWifiMac::DoDispose (void) |
|
101 |
{ |
|
102 |
NS_LOG_FUNCTION (this); |
|
103 |
delete m_rxMiddle; |
|
104 |
m_rxMiddle = 0; |
|
105 |
delete m_txMiddle; |
|
106 |
m_txMiddle = 0; |
|
107 |
delete m_dcfManager; |
|
108 |
m_dcfManager = 0; |
|
109 |
m_low = 0; |
|
110 |
m_phy = 0; |
|
111 |
m_voEdca = 0; |
|
112 |
m_viEdca = 0; |
|
113 |
m_beEdca = 0; |
|
114 |
m_bkEdca = 0; |
|
115 |
m_stationManager = 0; |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
116 |
for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i) |
4408 | 117 |
{ |
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
118 |
(*i).second = 0; |
4408 | 119 |
} |
120 |
WifiMac::DoDispose (); |
|
121 |
} |
|
122 |
||
123 |
void |
|
124 |
QadhocWifiMac::SetSlot (Time slotTime) |
|
125 |
{ |
|
126 |
m_dcfManager->SetSlot (slotTime); |
|
127 |
m_low->SetSlotTime (slotTime); |
|
128 |
} |
|
129 |
||
130 |
void |
|
131 |
QadhocWifiMac::SetSifs (Time sifs) |
|
132 |
{ |
|
133 |
m_dcfManager->SetSifs (sifs); |
|
134 |
m_low->SetSifs (sifs); |
|
135 |
} |
|
136 |
||
137 |
void |
|
138 |
QadhocWifiMac::SetEifsNoDifs (Time eifsNoDifs) |
|
139 |
{ |
|
140 |
m_dcfManager->SetEifsNoDifs (eifsNoDifs); |
|
141 |
m_eifsNoDifs = eifsNoDifs; |
|
142 |
} |
|
143 |
||
144 |
void |
|
145 |
QadhocWifiMac::SetAckTimeout (Time ackTimeout) |
|
146 |
{ |
|
147 |
m_low->SetAckTimeout (ackTimeout); |
|
148 |
} |
|
149 |
||
150 |
void |
|
151 |
QadhocWifiMac::SetCtsTimeout (Time ctsTimeout) |
|
152 |
{ |
|
153 |
m_low->SetCtsTimeout (ctsTimeout); |
|
154 |
} |
|
155 |
||
156 |
void |
|
157 |
QadhocWifiMac::SetPifs (Time pifs) |
|
158 |
{ |
|
159 |
m_low->SetPifs (pifs); |
|
160 |
} |
|
161 |
||
162 |
Time |
|
163 |
QadhocWifiMac::GetSlot (void) const |
|
164 |
{ |
|
165 |
return m_low->GetSlotTime (); |
|
166 |
} |
|
167 |
||
168 |
Time |
|
169 |
QadhocWifiMac::GetSifs (void) const |
|
170 |
{ |
|
171 |
return m_low->GetSifs (); |
|
172 |
} |
|
173 |
||
174 |
Time |
|
175 |
QadhocWifiMac::GetEifsNoDifs (void) const |
|
176 |
{ |
|
177 |
return m_eifsNoDifs; |
|
178 |
} |
|
179 |
||
180 |
Time |
|
181 |
QadhocWifiMac::GetAckTimeout (void) const |
|
182 |
{ |
|
183 |
return m_low->GetAckTimeout (); |
|
184 |
} |
|
185 |
||
186 |
Time |
|
187 |
QadhocWifiMac::GetCtsTimeout (void) const |
|
188 |
{ |
|
189 |
return m_low->GetCtsTimeout (); |
|
190 |
} |
|
191 |
||
192 |
Time |
|
193 |
QadhocWifiMac::GetPifs (void) const |
|
194 |
{ |
|
195 |
return m_low->GetPifs (); |
|
196 |
} |
|
197 |
||
198 |
void |
|
199 |
QadhocWifiMac::SetWifiPhy (Ptr<WifiPhy> phy) |
|
200 |
{ |
|
201 |
m_phy = phy; |
|
202 |
m_dcfManager->SetupPhyListener (phy); |
|
203 |
m_low->SetPhy (phy); |
|
204 |
} |
|
205 |
||
206 |
void |
|
207 |
QadhocWifiMac::SetWifiRemoteStationManager (Ptr<WifiRemoteStationManager> stationManager) |
|
208 |
{ |
|
209 |
NS_LOG_FUNCTION (this << stationManager); |
|
210 |
m_stationManager = stationManager; |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
211 |
for (Queues::iterator i = m_queues.begin (); i != m_queues.end (); ++i) |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
212 |
{ |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
213 |
(*i).second->SetWifiRemoteStationManager (stationManager); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
214 |
} |
4408 | 215 |
m_low->SetWifiRemoteStationManager (stationManager); |
216 |
} |
|
217 |
||
218 |
void |
|
219 |
QadhocWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to, Mac48Address from) |
|
220 |
{ |
|
221 |
NS_FATAL_ERROR ("Adhoc does not support a from != m_low->GetAddress ()"); |
|
222 |
} |
|
223 |
||
224 |
void |
|
225 |
QadhocWifiMac::Enqueue (Ptr<const Packet> packet, Mac48Address to) |
|
226 |
{ |
|
227 |
/* For now Qos adhoc stations sends only Qos frame. In the future they |
|
228 |
* should be able to send frames also to Non-Qos Stas. |
|
229 |
*/ |
|
230 |
NS_LOG_FUNCTION (packet->GetSize () << to); |
|
231 |
WifiMacHeader hdr; |
|
232 |
hdr.SetType (WIFI_MAC_QOSDATA); |
|
233 |
hdr.SetQosAckPolicy (WifiMacHeader::NORMAL_ACK); |
|
234 |
hdr.SetQosNoEosp (); |
|
235 |
hdr.SetQosNoAmsdu (); |
|
236 |
/* Transmission of multiple frames in the same |
|
237 |
Txop is not supported for now */ |
|
238 |
hdr.SetQosTxopLimit (0); |
|
239 |
||
240 |
hdr.SetAddr1 (to); |
|
241 |
hdr.SetAddr2 (m_low->GetAddress ()); |
|
242 |
hdr.SetAddr3 (GetBssid ()); |
|
243 |
hdr.SetDsNotFrom (); |
|
244 |
hdr.SetDsNotTo (); |
|
245 |
||
246 |
WifiRemoteStation *destination = m_stationManager->Lookup (to); |
|
247 |
if (destination->IsBrandNew ()) |
|
248 |
{ |
|
249 |
// in adhoc mode, we assume that every destination |
|
250 |
// supports all the rates we support. |
|
251 |
for (uint32_t i = 0; i < m_phy->GetNModes (); i++) |
|
252 |
{ |
|
253 |
destination->AddSupportedMode (m_phy->GetMode (i)); |
|
254 |
} |
|
255 |
destination->RecordDisassociated (); |
|
256 |
} |
|
257 |
||
258 |
uint8_t tid = QosUtilsGetTidForPacket (packet); |
|
259 |
if (tid < 8) |
|
260 |
{ |
|
261 |
hdr.SetQosTid (tid); |
|
262 |
AccessClass ac = QosUtilsMapTidToAc (tid); |
|
263 |
m_queues[ac]->Queue (packet, hdr); |
|
264 |
} |
|
265 |
else |
|
266 |
{ |
|
267 |
//packet is considerated belonging to BestEffort AC |
|
268 |
hdr.SetQosTid (0); |
|
269 |
m_queues[AC_BE]->Queue (packet, hdr); |
|
270 |
} |
|
271 |
} |
|
272 |
||
273 |
bool |
|
274 |
QadhocWifiMac::SupportsSendFrom (void) const |
|
275 |
{ |
|
276 |
return false; |
|
277 |
} |
|
278 |
||
279 |
void |
|
280 |
QadhocWifiMac::SetForwardUpCallback (Callback<void,Ptr<Packet>, Mac48Address, Mac48Address> upCallback) |
|
281 |
{ |
|
282 |
m_forwardUp = upCallback; |
|
283 |
} |
|
284 |
||
285 |
void |
|
286 |
QadhocWifiMac::SetLinkUpCallback (Callback<void> linkUp) |
|
287 |
{ |
|
288 |
// an Adhoc network is always UP. |
|
289 |
linkUp (); |
|
290 |
} |
|
291 |
||
292 |
void |
|
293 |
QadhocWifiMac::SetLinkDownCallback (Callback<void> linkDown) |
|
294 |
{} |
|
295 |
||
296 |
Mac48Address |
|
297 |
QadhocWifiMac::GetAddress (void) const |
|
298 |
{ |
|
299 |
return m_low->GetAddress (); |
|
300 |
} |
|
301 |
||
302 |
Ssid |
|
303 |
QadhocWifiMac::GetSsid (void) const |
|
304 |
{ |
|
305 |
return m_ssid; |
|
306 |
} |
|
307 |
||
308 |
void |
|
309 |
QadhocWifiMac::SetAddress (Mac48Address address) |
|
310 |
{ |
|
311 |
m_low->SetAddress (address); |
|
312 |
m_low->SetBssid (address); |
|
313 |
} |
|
314 |
||
315 |
void |
|
316 |
QadhocWifiMac::SetSsid (Ssid ssid) |
|
317 |
{ |
|
318 |
NS_LOG_FUNCTION (this << ssid); |
|
319 |
// XXX: here, we should start a special adhoc network |
|
320 |
m_ssid = ssid; |
|
321 |
} |
|
322 |
||
323 |
Mac48Address |
|
324 |
QadhocWifiMac::GetBssid (void) const |
|
325 |
{ |
|
326 |
return m_low->GetBssid (); |
|
327 |
} |
|
328 |
||
329 |
void |
|
330 |
QadhocWifiMac::ForwardUp (Ptr<Packet> packet, Mac48Address from, Mac48Address to) |
|
331 |
{ |
|
332 |
NS_LOG_FUNCTION (this << packet << from); |
|
333 |
m_forwardUp (packet, from, to); |
|
334 |
} |
|
335 |
||
336 |
void |
|
337 |
QadhocWifiMac::Receive (Ptr<Packet> packet, WifiMacHeader const *hdr) |
|
338 |
{ |
|
339 |
NS_LOG_FUNCTION (this << packet << hdr); |
|
340 |
NS_ASSERT (!hdr->IsCtl ()); |
|
341 |
Mac48Address from = hdr->GetAddr2 (); |
|
342 |
Mac48Address to = hdr->GetAddr1 (); |
|
343 |
if (hdr->IsData ()) |
|
344 |
{ |
|
345 |
if (hdr->IsQosData () && hdr->IsQosAmsdu ()) |
|
346 |
{ |
|
347 |
NS_LOG_DEBUG ("Received A-MSDU from"<<from); |
|
348 |
DeaggregateAmsduAndForward (packet, hdr); |
|
349 |
} |
|
350 |
else |
|
351 |
{ |
|
352 |
ForwardUp (packet, from, to); |
|
353 |
} |
|
354 |
} |
|
355 |
else if (hdr->IsMgt ()) |
|
356 |
{ |
|
357 |
//Handling action frames |
|
358 |
} |
|
359 |
} |
|
360 |
||
361 |
void |
|
362 |
QadhocWifiMac::DeaggregateAmsduAndForward (Ptr<Packet> aggregatedPacket, |
|
363 |
WifiMacHeader const *hdr) |
|
364 |
{ |
|
365 |
DeaggregatedMsdus packets = MsduAggregator::Deaggregate (aggregatedPacket); |
|
366 |
for (DeaggregatedMsdusCI i = packets.begin (); i != packets.end (); ++i) |
|
367 |
{ |
|
368 |
ForwardUp ((*i).first, (*i).second.GetSourceAddr (), |
|
369 |
(*i).second.GetDestinationAddr ()); |
|
370 |
} |
|
371 |
} |
|
372 |
||
373 |
Ptr<EdcaTxopN> |
|
374 |
QadhocWifiMac::GetVOQueue (void) const |
|
375 |
{ |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
376 |
return m_queues.find (AC_VO)->second; |
4408 | 377 |
} |
378 |
||
379 |
Ptr<EdcaTxopN> |
|
380 |
QadhocWifiMac::GetVIQueue (void) const |
|
381 |
{ |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
382 |
return m_queues.find (AC_VI)->second; |
4408 | 383 |
} |
384 |
||
385 |
Ptr<EdcaTxopN> |
|
386 |
QadhocWifiMac::GetBEQueue (void) const |
|
387 |
{ |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
388 |
return m_queues.find (AC_BE)->second; |
4408 | 389 |
} |
390 |
||
391 |
Ptr<EdcaTxopN> |
|
392 |
QadhocWifiMac::GetBKQueue (void) const |
|
393 |
{ |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
394 |
return m_queues.find (AC_BK)->second; |
4408 | 395 |
} |
396 |
||
397 |
void |
|
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
398 |
QadhocWifiMac::SetQueue (enum AccessClass ac) |
4408 | 399 |
{ |
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
400 |
Ptr<EdcaTxopN> edca = CreateObject<EdcaTxopN> (); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
401 |
edca->SetLow (m_low); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
402 |
edca->SetManager (m_dcfManager); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
403 |
edca->SetTypeOfStation (ADHOC_STA); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
404 |
edca->SetTxMiddle (m_txMiddle); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
405 |
m_queues.insert (std::make_pair(ac, edca)); |
4408 | 406 |
} |
407 |
||
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
408 |
void |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
409 |
QadhocWifiMac::FinishConfigureStandard (enum WifiPhyStandard standard) |
4408 | 410 |
{ |
4720
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
411 |
switch (standard) |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
412 |
{ |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
413 |
case WIFI_PHY_STANDARD_holland: |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
414 |
// fall through |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
415 |
case WIFI_PHY_STANDARD_80211a: |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
416 |
// fall through |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
417 |
case WIFI_PHY_STANDARD_80211_10Mhz: |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
418 |
// fall through |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
419 |
case WIFI_PHY_STANDARD_80211_5Mhz: |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
420 |
ConfigureDcf (m_queues[AC_BK], 15, 1023, AC_BK); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
421 |
ConfigureDcf (m_queues[AC_BE], 15, 1023, AC_BE); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
422 |
ConfigureDcf (m_queues[AC_VI], 15, 1023, AC_VI); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
423 |
ConfigureDcf (m_queues[AC_VO], 15, 1023, AC_VO); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
424 |
break; |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
425 |
case WIFI_PHY_STANDARD_80211b: |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
426 |
ConfigureDcf (m_queues[AC_BK], 31, 1023, AC_BK); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
427 |
ConfigureDcf (m_queues[AC_BE], 31, 1023, AC_BE); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
428 |
ConfigureDcf (m_queues[AC_VI], 31, 1023, AC_VI); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
429 |
ConfigureDcf (m_queues[AC_VO], 31, 1023, AC_VO); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
430 |
break; |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
431 |
default: |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
432 |
NS_ASSERT (false); |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
433 |
break; |
15221757964f
bug 641: CwMin setting for 802.11b
Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
parents:
4408
diff
changeset
|
434 |
} |
4408 | 435 |
} |
436 |
||
437 |
} //namespace ns3 |