From 1da4e67332c87ca90e88beed3a592baf9a3a8ca3 Mon Sep 17 00:00:00 2001 From: Bastian Bloessl Date: Tue, 14 Apr 2015 17:41:11 +0200 Subject: [PATCH] mac: crc is already removed --- lib/ofdm_mac.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/ofdm_mac.cc b/lib/ofdm_mac.cc index 527de37..57d69f3 100644 --- a/lib/ofdm_mac.cc +++ b/lib/ofdm_mac.cc @@ -69,10 +69,12 @@ void phy_in (pmt::pmt_t msg) { if (!pmt::is_blob(pmt::cdr(msg))) throw std::runtime_error("PMT must be blob"); - // strip MAC header and CRC + // strip MAC header + // TODO: check for frame type to determine header size pmt::pmt_t blob(pmt::cdr(msg)); const char *mpdu = reinterpret_cast(pmt::blob_data(blob)); - pmt::pmt_t msdu = pmt::make_blob(mpdu + 24, pmt::blob_length(blob) - 24 - 4); + std::cout << "pdu len " << pmt::blob_length(blob) << std::endl; + pmt::pmt_t msdu = pmt::make_blob(mpdu + 24, pmt::blob_length(blob) - 24); message_port_pub(pmt::mp("app out"), pmt::cons(pmt::car(msg), msdu)); }