summaryrefslogtreecommitdiff
path: root/libopie2/opienet
Unidiff
Diffstat (limited to 'libopie2/opienet') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp11
-rw-r--r--libopie2/opienet/ostation.cpp8
2 files changed, 11 insertions, 8 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index e141097..67718ba 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -584,52 +584,55 @@ void OWirelessNetworkInterface::buildPrivateList()
584 struct iw_priv_args priv[IW_MAX_PRIV_DEF]; 584 struct iw_priv_args priv[IW_MAX_PRIV_DEF];
585 585
586 _iwr.u.data.pointer = (char*) &priv; 586 _iwr.u.data.pointer = (char*) &priv;
587 _iwr.u.data.length = IW_MAX_PRIV_DEF; // length in terms of number of (sizeof iw_priv_args), not (sizeof iw_priv_args) itself 587 _iwr.u.data.length = IW_MAX_PRIV_DEF; // length in terms of number of (sizeof iw_priv_args), not (sizeof iw_priv_args) itself
588 _iwr.u.data.flags = 0; 588 _iwr.u.data.flags = 0;
589 589
590 if ( !wioctl( SIOCGIWPRIV ) ) 590 if ( !wioctl( SIOCGIWPRIV ) )
591 { 591 {
592 owarn << "OWirelessNetworkInterface::buildPrivateList(): Can't get private ioctl information." << oendl; 592 owarn << "OWirelessNetworkInterface::buildPrivateList(): Can't get private ioctl information." << oendl;
593 return; 593 return;
594 } 594 }
595 595
596 for ( int i = 0; i < _iwr.u.data.length; ++i ) 596 for ( int i = 0; i < _iwr.u.data.length; ++i )
597 { 597 {
598 new OPrivateIOCTL( this, priv[i].name, priv[i].cmd, priv[i].get_args, priv[i].set_args ); 598 new OPrivateIOCTL( this, priv[i].name, priv[i].cmd, priv[i].get_args, priv[i].set_args );
599 } 599 }
600 odebug << "OWirelessNetworkInterface::buildPrivateList(): Private ioctl list constructed." << oendl; 600 odebug << "OWirelessNetworkInterface::buildPrivateList(): Private ioctl list constructed." << oendl;
601} 601}
602 602
603 603
604void OWirelessNetworkInterface::dumpInformation() const 604void OWirelessNetworkInterface::dumpInformation() const
605{ 605{
606 odebug << "OWirelessNetworkInterface::() -------------- dumping information block ----------------" << oendl; 606 odebug << "OWirelessNetworkInterface::() -------------- dumping information block ----------------" << oendl;
607 607
608 qDebug( " - driver's idea of maximum throughput is %d bps = %d byte/s = %d Kb/s = %f.2 Mb/s", 608 odebug << " - driver's idea of maximum throughput is " << _range.throughput
609 _range.throughput, _range.throughput / 8, _range.throughput / 8 / 1024, float( _range.throughput ) / 8.0 / 1024.0 / 1024.0 ); 609 << " bps = " << ( _range.throughput / 8 ) << " byte/s = " << ( _range.throughput / 8 / 1024 )
610 qDebug( " - driver for '%s' (V%d) has been compiled against WE V%d", 610 << " Kb/s = " << QString().sprintf("%f.2", float( _range.throughput ) / 8.0 / 1024.0 / 1024.0 )
611 name(), _range.we_version_source, _range.we_version_compiled ); 611 << " Mb/s" << oendl;
612
613 odebug << " - driver for '" << name() << "' (V" << _range.we_version_source
614 << ") has been compiled against WE V" << _range.we_version_compiled << oendl;
612 615
613 if ( _range.we_version_compiled != WIRELESS_EXT ) 616 if ( _range.we_version_compiled != WIRELESS_EXT )
614 { 617 {
615 owarn << "Version mismatch! WE_DRIVER = " << _range.we_version_compiled << " and WE_OPIENET = " << WIRELESS_EXT << oendl; 618 owarn << "Version mismatch! WE_DRIVER = " << _range.we_version_compiled << " and WE_OPIENET = " << WIRELESS_EXT << oendl;
616 } 619 }
617 620
618 odebug << "OWirelessNetworkInterface::() ---------------------------------------------------------" << oendl; 621 odebug << "OWirelessNetworkInterface::() ---------------------------------------------------------" << oendl;
619} 622}
620 623
621 624
622int OWirelessNetworkInterface::channel() const 625int OWirelessNetworkInterface::channel() const
623{ 626{
624 //FIXME: When monitoring enabled, then use it 627 //FIXME: When monitoring enabled, then use it
625 //FIXME: to gather the current RF channel 628 //FIXME: to gather the current RF channel
626 //FIXME: Until then, get active channel from hopper. 629 //FIXME: Until then, get active channel from hopper.
627 if ( _hopper && _hopper->isActive() ) 630 if ( _hopper && _hopper->isActive() )
628 return _hopper->channel(); 631 return _hopper->channel();
629 632
630 if ( !wioctl( SIOCGIWFREQ ) ) 633 if ( !wioctl( SIOCGIWFREQ ) )
631 { 634 {
632 return -1; 635 return -1;
633 } 636 }
634 else 637 else
635 { 638 {
diff --git a/libopie2/opienet/ostation.cpp b/libopie2/opienet/ostation.cpp
index ce0995b..b5ac325 100644
--- a/libopie2/opienet/ostation.cpp
+++ b/libopie2/opienet/ostation.cpp
@@ -41,32 +41,32 @@ namespace Net {
41 *======================================================================================*/ 41 *======================================================================================*/
42 42
43OStation::OStation() 43OStation::OStation()
44{ 44{
45 odebug << "OStation::OStation()" << oendl; 45 odebug << "OStation::OStation()" << oendl;
46 46
47 type = "<unknown>"; 47 type = "<unknown>";
48 macAddress = OMacAddress::unknown; 48 macAddress = OMacAddress::unknown;
49 ssid = "<unknown>"; 49 ssid = "<unknown>";
50 channel = 0; 50 channel = 0;
51 apAddress = OMacAddress::unknown; 51 apAddress = OMacAddress::unknown;
52 52
53} 53}
54 54
55 55
56OStation::~OStation() 56OStation::~OStation()
57{ 57{
58 odebug << "OStation::~OStation()" << oendl; 58 odebug << "OStation::~OStation()" << oendl;
59} 59}
60 60
61 61
62void OStation::dump() 62void OStation::dump()
63{ 63{
64 odebug << "------- OStation::dump() ------------" << oendl; 64 odebug << "------- OStation::dump() ------------" << oendl;
65 qDebug( "type: %s", (const char*) type ); 65 odebug << "type: " << type << "" << oendl;
66 qDebug( "mac: %s", (const char*) macAddress.toString() ); 66 odebug << "mac: " << macAddress.toString() << "" << oendl;
67 qDebug( "ap: %s", (const char*) apAddress.toString() ); 67 odebug << "ap: " << apAddress.toString() << "" << oendl;
68 qDebug( "ip: %s", (const char*) ipAddress.toString() ); 68 odebug << "ip: " << ipAddress.toString() << "" << oendl;
69} 69}
70 70
71} 71}
72} 72}