OLD | NEW |
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ | 1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
2 /* | 2 /* |
3 * Copyright (c) 2009 MIRKO BANCHI | 3 * Copyright (c) 2009 MIRKO BANCHI |
4 * | 4 * |
5 * This program is free software; you can redistribute it and/or modify | 5 * This program is free software; you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 2 as | 6 * it under the terms of the GNU General Public License version 2 as |
7 * published by the Free Software Foundation; | 7 * published by the Free Software Foundation; |
8 * | 8 * |
9 * This program is distributed in the hope that it will be useful, | 9 * This program is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 NS_FATAL_ERROR ("Multi-tid block ack is not supported."); | 667 NS_FATAL_ERROR ("Multi-tid block ack is not supported."); |
668 } | 668 } |
669 else | 669 else |
670 { | 670 { |
671 NS_FATAL_ERROR ("Reserved configuration."); | 671 NS_FATAL_ERROR ("Reserved configuration."); |
672 } | 672 } |
673 } | 673 } |
674 return false; | 674 return false; |
675 } | 675 } |
676 | 676 |
677 uint8_t | 677 uint16_t |
678 CtrlBAckResponseHeader::IndexInBitmap (uint16_t seq) const | 678 CtrlBAckResponseHeader::IndexInBitmap (uint16_t seq) const |
679 { | 679 { |
680 uint8_t index; | 680 uint16_t index; |
681 if (seq >= m_startingSeq) | 681 if (seq >= m_startingSeq) |
682 { | 682 { |
683 index = seq - m_startingSeq; | 683 index = seq - m_startingSeq; |
684 } | 684 } |
685 else | 685 else |
686 { | 686 { |
687 index = 4096 - m_startingSeq + seq; | 687 index = 4096 - m_startingSeq + seq; |
688 } | 688 } |
689 NS_ASSERT (index <= 63); | 689 NS_ASSERT (index <= 63); |
690 return index; | 690 return index; |
(...skipping 17 matching lines...) Expand all Loading... |
708 return bitmap.m_compressedBitmap; | 708 return bitmap.m_compressedBitmap; |
709 } | 709 } |
710 | 710 |
711 void | 711 void |
712 CtrlBAckResponseHeader::ResetBitmap (void) | 712 CtrlBAckResponseHeader::ResetBitmap (void) |
713 { | 713 { |
714 memset (&bitmap, 0, sizeof (bitmap)); | 714 memset (&bitmap, 0, sizeof (bitmap)); |
715 } | 715 } |
716 | 716 |
717 } //namespace ns3 | 717 } //namespace ns3 |
OLD | NEW |