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

(-)a/src/wifi/model/mac-low.cc (+10 lines)
 Lines 2957-2962    Link Here 
2957
  newPacket = packet->Copy ();
2957
  newPacket = packet->Copy ();
2958
  Ptr<Packet> currentAggregatedPacket;
2958
  Ptr<Packet> currentAggregatedPacket;
2959
  CtrlBAckRequestHeader blockAckReq;
2959
  CtrlBAckRequestHeader blockAckReq;
2960
  
2961
  if (hdr.IsBlockAckReq () && !m_stationManager->HasPsmpSupported ())
2962
    {
2963
      //An A-MPDU in non-PSMP frame exchanges aggregates MPDUs from one TID. Since BlockAckReq is
2964
      //not present in A-MPDU if any QoS data frames for that TID are present, this means here we
2965
      //should send a BlockAckReq frame that is not part of an A-MPDU (and thus stop MPDU aggregation).
2966
      return newPacket;
2967
    }
2968
  
2960
  //missing hdr.IsAck() since we have no means of knowing the Tid of the Ack yet
2969
  //missing hdr.IsAck() since we have no means of knowing the Tid of the Ack yet
2961
  if (hdr.IsQosData () || hdr.IsBlockAck ()|| hdr.IsBlockAckReq ())
2970
  if (hdr.IsQosData () || hdr.IsBlockAck ()|| hdr.IsBlockAckReq ())
2962
    {
2971
    {
 Lines 3015-3020    Link Here 
3015
                  packet->PeekHeader (blockAckReq);
3024
                  packet->PeekHeader (blockAckReq);
3016
                  startingSequenceNumber = blockAckReq.GetStartingSequence ();
3025
                  startingSequenceNumber = blockAckReq.GetStartingSequence ();
3017
                }
3026
                }
3027
              /// \todo We should also handle Ack and BlockAck
3018
              aggregated = false;
3028
              aggregated = false;
3019
              bool retry = false;
3029
              bool retry = false;
3020
              //looks for other packets to the same destination with the same Tid need to extend that to include MSDUs
3030
              //looks for other packets to the same destination with the same Tid need to extend that to include MSDUs
(-)a/src/wifi/model/regular-wifi-mac.cc (+21 lines)
 Lines 124-129    Link Here 
124
  m_stationManager = stationManager;
124
  m_stationManager = stationManager;
125
  m_stationManager->SetHtSupported (GetHtSupported ());
125
  m_stationManager->SetHtSupported (GetHtSupported ());
126
  m_stationManager->SetVhtSupported (GetVhtSupported ());
126
  m_stationManager->SetVhtSupported (GetVhtSupported ());
127
  m_stationManager->SetPsmpSupported (GetPsmpSupported ());
127
  m_low->SetWifiRemoteStationManager (stationManager);
128
  m_low->SetWifiRemoteStationManager (stationManager);
128
129
129
  m_dca->SetWifiRemoteStationManager (stationManager);
130
  m_dca->SetWifiRemoteStationManager (stationManager);
 Lines 538-543    Link Here 
538
  return m_low->GetCtsToSelfSupported ();
539
  return m_low->GetCtsToSelfSupported ();
539
}
540
}
540
541
542
bool
543
RegularWifiMac::GetPsmpSupported () const
544
{
545
  return m_psmpSupported;
546
}
547
548
void
549
RegularWifiMac::SetPsmpSupported (bool enable)
550
{
551
  NS_LOG_FUNCTION (this << enable);
552
  m_psmpSupported = enable;
553
  NS_ASSERT_MSG (m_psmpSupported == false, "PSMP not yet supported");
554
}
555
541
void
556
void
542
RegularWifiMac::SetSlot (Time slotTime)
557
RegularWifiMac::SetSlot (Time slotTime)
543
{
558
{
 Lines 941-946    Link Here 
941
                   MakeBooleanAccessor (&RegularWifiMac::SetCtsToSelfSupported,
956
                   MakeBooleanAccessor (&RegularWifiMac::SetCtsToSelfSupported,
942
                                        &RegularWifiMac::GetCtsToSelfSupported),
957
                                        &RegularWifiMac::GetCtsToSelfSupported),
943
                   MakeBooleanChecker ())
958
                   MakeBooleanChecker ())
959
    .AddAttribute ("PowerSaveMultiPollSupported",
960
                   "This Boolean attribute is set to enable 802.11n/ac PSMP operation at this STA.",
961
                   BooleanValue (false),
962
                   MakeBooleanAccessor (&RegularWifiMac::SetPsmpSupported,
963
                                        &RegularWifiMac::GetPsmpSupported),
964
                   MakeBooleanChecker ())
944
    .AddAttribute ("VO_MaxAmsduSize",
965
    .AddAttribute ("VO_MaxAmsduSize",
945
                   "Maximum length in bytes of an A-MSDU for AC_VO access class.",
966
                   "Maximum length in bytes of an A-MSDU for AC_VO access class.",
946
                   UintegerValue (0),
967
                   UintegerValue (0),
(-)a/src/wifi/model/regular-wifi-mac.h (+18 lines)
 Lines 509-514    Link Here 
509
   * \return true if ERP is supported, false otherwise
509
   * \return true if ERP is supported, false otherwise
510
   */
510
   */
511
  bool GetErpSupported () const;
511
  bool GetErpSupported () const;
512
  
513
  /**
514
   * This Boolean is set \c true iff this WifiMac supports
515
   * Power Save Multi-Poll (PSMP). It is exposed through the attribute system.
516
   */
517
  bool m_psmpSupported;
518
  /**
519
   * Enable or disable PSMP support for the device.
520
   *
521
   * \param enable whether PSMP is supported
522
   */
523
  void SetPsmpSupported (bool enable);
524
  /**
525
   * Return whether the device supports PSMP.
526
   *
527
   * \return true if PSMP is supported, false otherwise
528
   */
529
  bool GetPsmpSupported () const;
512
530
513
531
514
private:
532
private:
(-)a/src/wifi/model/wifi-remote-station-manager.cc (-1 / +14 lines)
 Lines 362-368    Link Here 
362
    m_vhtSupported (false),
362
    m_vhtSupported (false),
363
    m_useNonErpProtection (false),
363
    m_useNonErpProtection (false),
364
    m_shortPreambleEnabled (false),
364
    m_shortPreambleEnabled (false),
365
    m_shortSlotTimeEnabled (false)
365
    m_shortSlotTimeEnabled (false),
366
    m_psmpSupported (false)
366
{
367
{
367
}
368
}
368
369
 Lines 495-500    Link Here 
495
  return m_vhtSupported;
496
  return m_vhtSupported;
496
}
497
}
497
498
499
void
500
WifiRemoteStationManager::SetPsmpSupported (bool enable)
501
{
502
  m_psmpSupported = enable;
503
}
504
505
bool
506
WifiRemoteStationManager::HasPsmpSupported (void) const
507
{
508
  return m_psmpSupported;
509
}
510
498
uint32_t
511
uint32_t
499
WifiRemoteStationManager::GetMaxSsrc (void) const
512
WifiRemoteStationManager::GetMaxSsrc (void) const
500
{
513
{
(-)a/src/wifi/model/wifi-remote-station-manager.h (+13 lines)
 Lines 257-262    Link Here 
257
   *         false otherwise
257
   *         false otherwise
258
   */
258
   */
259
  bool GetShortSlotTimeEnabled (void) const;
259
  bool GetShortSlotTimeEnabled (void) const;
260
  /**
261
   * Enable or disable PSMP capability support.
262
   *
263
   * \param enable enable or disable PSMP capability support
264
   */
265
  void SetPsmpSupported (bool enable);
266
  /**
267
   * Return whether the device has PSMP capability support enabled.
268
   *
269
   * \return true if PSMP capability support is enabled, false otherwise
270
   */
271
  bool HasPsmpSupported (void) const;
260
272
261
  /**
273
  /**
262
   * Reset the station, invoked in a STA upon dis-association or in an AP upon reboot.
274
   * Reset the station, invoked in a STA upon dis-association or in an AP upon reboot.
 Lines 1234-1239    Link Here 
1234
  bool m_shortPreambleEnabled; //!< flag if short PLCP preamble is enabled
1246
  bool m_shortPreambleEnabled; //!< flag if short PLCP preamble is enabled
1235
  bool m_shortSlotTimeEnabled; //!< flag if short slot time is enabled
1247
  bool m_shortSlotTimeEnabled; //!< flag if short slot time is enabled
1236
  ProtectionMode m_protectionMode; //!< Protection mode for ERP stations when non-ERP stations are detected
1248
  ProtectionMode m_protectionMode; //!< Protection mode for ERP stations when non-ERP stations are detected
1249
  bool m_psmpSupported;            //!< Flag if Power Save Multi-Poll (PSMP) capability is supported
1237
1250
1238
  /**
1251
  /**
1239
   * The trace source fired when the transmission of a single RTS has failed
1252
   * The trace source fired when the transmission of a single RTS has failed

Return to bug 2379