[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hostap
Subject:    Converting signal and noise values to dBm
From:       Varga_Dávid <varga.david () duvinet ! hu>
Date:       2007-04-26 13:19:02
Message-ID: 000801c78805$75d0f130$b700a8c0 () duvibook
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello!

I'd like to convert the rx_stats->signal and rx_stats->noise values in the
hostap_80211_rx.c to dBm.

At the moment I use printk(KERN_DEBUG "%d %d", rx_stats->signal,
rx_stats->noise); 

and it gives me back signal rates 180.230 and noise rates 160.170.

I tried using printk(KERN_DEBUG "%d %d",
HFA384X_LEVEL_TO_dBm(rx_stats->signal),
HFA384X_LEVEL_TO_dBm(rx_stats->noise));

but it still doesn't give me the negative dBm values that iwconfig does.

Could anyone help with this?

Thanks;

David


[Attachment #5 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-2">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
span.E-mailStlus17
	{mso-style-type:personal-compose;
	font-family:Arial;
	color:windowtext;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=HU link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Hello!<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>I&#8217;d like to convert the rx_stats-&gt;signal and
rx_stats-&gt;noise values in the hostap_80211_rx.c to \
dBm.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>At the moment I use <i><span \
style='font-style:italic'>printk(KERN_DEBUG &#8220;%d %d&#8221;, rx_stats-&gt;signal, \
rx_stats-&gt;noise);</span></i> <o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>and it gives me back signal rates 18</span></font><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>0&#8230;230
and noise rates 160&#8230;170.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I tried using </span></font><i><font size=2 face=Arial><span
lang=EN-US style='font-size:10.0pt;font-family:Arial;font-style:italic'>printk(KERN_DEBUG
 &#8220;%d %d&#8221;, </span></font></i><i><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial;font-style:italic'>HFA384X_LEVEL_TO_dBm(</span></font></i><i><font
 size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:Arial;
font-style:italic'>rx_stats-&gt;signal), </span></font></i><i><font size=2
face=Arial><span style='font-size:10.0pt;font-family:Arial;font-style:italic'>HFA384X_LEVEL_TO_dBm(</span></font></i><i><font
 size=2 face=Arial><span lang=EN-US style='font-size:10.0pt;font-family:Arial;
font-style:italic'>rx_stats-&gt;noise));</span></font></i><font size=2
face=Arial><span lang=EN-US \
style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>but it still doesn&#8217;t give me the negative dBm
values that iwconfig does.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Could anyone help with this?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>Thanks;<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span lang=EN-US style='font-size:
10.0pt;font-family:Arial'>David</span></font><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></p>

</div>

</body>

</html>



_______________________________________________
HostAP mailing list
HostAP@shmoo.com
http://lists.shmoo.com/mailman/listinfo/hostap


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic