diff -r 85f40b38d57c src/devices/wimax/simple-ofdm-wimax-channel.cc --- a/src/devices/wimax/simple-ofdm-wimax-channel.cc Wed Apr 07 22:31:55 2010 -0700 +++ b/src/devices/wimax/simple-ofdm-wimax-channel.cc Wed Apr 07 22:39:09 2010 -0700 @@ -145,20 +145,14 @@ double rxPowerDbm = 0; Ptr senderMobility = 0; Ptr receiverMobility = 0; - if (phy->GetMobility ()) - { - senderMobility = phy->GetMobility ()->GetObject (); - } + senderMobility = phy->GetDevice ()->GetNode ()->GetObject (); for (std::list >::iterator iter = m_phyList.begin (); iter != m_phyList.end (); ++iter) { double delay = 0; if (phy != *iter) { - if ((*iter)->GetMobility ()) - { - receiverMobility = (*iter)->GetMobility ()->GetObject (); - } + receiverMobility = (*iter)->GetDevice ()->GetNode ()->GetObject (); if (receiverMobility != 0 && senderMobility != 0 && m_loss != 0) { delay = (senderMobility->GetDistanceFrom (receiverMobility)) / 300000000LL;