summaryrefslogtreecommitdiff
path: root/libopie2/opienet/onetwork.cpp
authormickeyl <mickeyl>2004-05-01 16:13:43 (UTC)
committer mickeyl <mickeyl>2004-05-01 16:13:43 (UTC)
commitd5abd7878f553f5ac0a41966b27f4c09389d3cfd (patch) (side-by-side diff)
tree3140d1d1fe012c03c6c26bc587faeea5501f0b28 /libopie2/opienet/onetwork.cpp
parent5a64ec5a21bb254c0e6a57e379cd1afc25259f19 (diff)
downloadopie-d5abd7878f553f5ac0a41966b27f4c09389d3cfd.zip
opie-d5abd7878f553f5ac0a41966b27f4c09389d3cfd.tar.gz
opie-d5abd7878f553f5ac0a41966b27f4c09389d3cfd.tar.bz2
- fix off-by-one bug in OChannelHopper
- fix bug in OPacket which broke everything using it - expose both wireless extension versions (runtime + compile time) through API
Diffstat (limited to 'libopie2/opienet/onetwork.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opienet/onetwork.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/libopie2/opienet/onetwork.cpp b/libopie2/opienet/onetwork.cpp
index b6c9876..e141097 100644
--- a/libopie2/opienet/onetwork.cpp
+++ b/libopie2/opienet/onetwork.cpp
@@ -119,7 +119,7 @@ void ONetwork::synchronize()
}
-short ONetwork::wirelessExtensionVersion()
+short ONetwork::wirelessExtensionCompileVersion()
{
return WIRELESS_EXT;
}
@@ -382,7 +382,7 @@ OChannelHopper::OChannelHopper( OWirelessNetworkInterface* iface )
:QObject( 0, "Mickey's funky hopper" ),
_iface( iface ), _interval( 0 ), _tid( 0 )
{
- int _maxChannel = iface->channels()+1;
+ int _maxChannel = iface->channels();
// generate fancy hopping sequence honoring the device capabilities
if ( _maxChannel >= 1 ) _channels.append( 1 );
if ( _maxChannel >= 7 ) _channels.append( 7 );
@@ -399,7 +399,6 @@ OChannelHopper::OChannelHopper( OWirelessNetworkInterface* iface )
if ( _maxChannel >= 6 ) _channels.append( 6 );
if ( _maxChannel >= 12 ) _channels.append( 12 );
_channel = _channels.begin();
-
}
@@ -561,6 +560,7 @@ void OWirelessNetworkInterface::buildInformation()
for ( int i = 0; i < range.num_frequency; ++i )
{
int freq = (int) ( double( range.freq[i].m ) * pow( 10.0, range.freq[i].e ) / 1000000.0 );
+ odebug << "OWirelessNetworkInterface::buildInformation: Adding frequency " << freq << " as channel " << i+1 << oendl;
_channels.insert( freq, i+1 );
}
}
@@ -571,6 +571,12 @@ void OWirelessNetworkInterface::buildInformation()
}
+short OWirelessNetworkInterface::wirelessExtensionDriverVersion() const
+{
+ return _range.we_version_compiled;
+}
+
+
void OWirelessNetworkInterface::buildPrivateList()
{
odebug << "OWirelessNetworkInterface::buildPrivateList()" << oendl;