summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/networksetup/wlan/wextensions.cpp3
-rw-r--r--noncore/settings/networksettings/wlan/wextensions.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/noncore/net/networksetup/wlan/wextensions.cpp b/noncore/net/networksetup/wlan/wextensions.cpp
index 16654bb..827d075 100644
--- a/noncore/net/networksetup/wlan/wextensions.cpp
+++ b/noncore/net/networksetup/wlan/wextensions.cpp
@@ -100,6 +100,9 @@ int WExtensions::channel(){
return 0;
if ( 0 != ioctl( fd, SIOCGIWFREQ, &iwr ))
return 0;
+
+ // http://www.elanix.com/pdf/an137e.pdf
+
double num = (double( iwr.u.freq.m ) * pow( 10, iwr.u.freq.e ) / 1000000000);
double left = 2.401;
double right = 2.416;
diff --git a/noncore/settings/networksettings/wlan/wextensions.cpp b/noncore/settings/networksettings/wlan/wextensions.cpp
index 16654bb..827d075 100644
--- a/noncore/settings/networksettings/wlan/wextensions.cpp
+++ b/noncore/settings/networksettings/wlan/wextensions.cpp
@@ -100,6 +100,9 @@ int WExtensions::channel(){
return 0;
if ( 0 != ioctl( fd, SIOCGIWFREQ, &iwr ))
return 0;
+
+ // http://www.elanix.com/pdf/an137e.pdf
+
double num = (double( iwr.u.freq.m ) * pow( 10, iwr.u.freq.e ) / 1000000000);
double left = 2.401;
double right = 2.416;