<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
Hi, is supported power saving mode? I found this function in main.c but I dont' understand<span id="result_box" lang="en"><span title="Fai clic per visualizzare le traduzioni alternative" class="hps"></span><span title="Fai clic per visualizzare le traduzioni alternative" class="hps"></span> <span title="Fai clic per visualizzare le traduzioni alternative" class="hps">if</span> <span title="Fai clic per visualizzare le traduzioni alternative" class="hps">this</span> <span title="Fai clic per visualizzare le traduzioni alternative" class="hps">means that the power saving is</span> <span title="Fai clic per visualizzare le traduzioni alternative" class="hps">implemented</span></span> : <br>void b43_power_saving_ctl_bits(struct b43_wldev *dev, unsigned int ps_flags)<br>{<br>&nbsp;&nbsp;&nbsp; u32 macctl;<br>&nbsp;&nbsp;&nbsp; u16 ucstat;<br>&nbsp;&nbsp;&nbsp; bool hwps;<br>&nbsp;&nbsp;&nbsp; bool awake;<br>&nbsp;&nbsp;&nbsp; int i;<br><br>&nbsp;&nbsp;&nbsp; B43_WARN_ON((ps_flags &amp; B43_PS_ENABLED) &amp;&amp;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (ps_flags &amp; B43_PS_DISABLED));<br>&nbsp;&nbsp;&nbsp; B43_WARN_ON((ps_flags &amp; B43_PS_AWAKE) &amp;&amp; (ps_flags &amp; B43_PS_ASLEEP));<br><br>&nbsp;&nbsp;&nbsp; if (ps_flags &amp; B43_PS_ENABLED) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; hwps = 1;<br>&nbsp;&nbsp;&nbsp; } else if (ps_flags &amp; B43_PS_DISABLED) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; hwps = 0;<br>&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //TODO: If powersave is not off and FIXME is not set and we are not in adhoc<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; and thus is not an AP and we are associated, set bit 25<br>&nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; if (ps_flags &amp; B43_PS_AWAKE) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; awake = 1;<br>&nbsp;&nbsp;&nbsp; } else if (ps_flags &amp; B43_PS_ASLEEP) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; awake = 0;<br>&nbsp;&nbsp;&nbsp; } else {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //TODO: If the device is awake or this is an AP, or we are scanning, or FIXME,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; or we are associated, or FIXME, or the latest PS-Poll packet sent was<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; successful, set bit26<br>&nbsp;&nbsp;&nbsp; }<br><br>/* FIXME: For now we force awake-on and hwps-off */<br>&nbsp;&nbsp;&nbsp; hwps = 0;<br>&nbsp;&nbsp;&nbsp; awake = 1;<br><br>&nbsp;&nbsp;&nbsp; macctl = b43_read32(dev, B43_MMIO_MACCTL);<br>&nbsp;&nbsp;&nbsp; if (hwps)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; macctl |= B43_MACCTL_HWPS;<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; macctl &amp;= ~B43_MACCTL_HWPS;<br>&nbsp;&nbsp;&nbsp; if (awake)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; macctl |= B43_MACCTL_AWAKE;<br>&nbsp;&nbsp;&nbsp; else<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; macctl &amp;= ~B43_MACCTL_AWAKE;<br>&nbsp;&nbsp;&nbsp; b43_write32(dev, B43_MMIO_MACCTL, macctl);<br>&nbsp;&nbsp;&nbsp; /* Commit write */<br>&nbsp;&nbsp;&nbsp; b43_read32(dev, B43_MMIO_MACCTL);<br>&nbsp;&nbsp;&nbsp; if (awake &amp;&amp; dev-&gt;dev-&gt;id.revision &gt;= 5) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; /* Wait for the microcode to wake up. */<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for (i = 0; i &lt; 100; i++) {<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; ucstat = b43_shm_read16(dev, B43_SHM_SHARED,<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; B43_SHM_SH_UCODESTAT);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if (ucstat != B43_SHM_SH_UCODESTAT_SLEEP)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; udelay(10);<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>&nbsp;&nbsp;&nbsp; }<br>}<br>This function can only be responsible for this mode of operation ? I'm studying this mode of operation (in b43) for my university, is very important for me, thanks.&nbsp; &nbsp; <br><br><div></div>
<div></div><font color="#cc0000" face="Lucida Handwriting, Cursive" size="6"><span style="color:rgb(0, 0, 0)"><span style="font-family:Verdana,Geneva,Arial,Sans-serif"></span></span></font><br><br>                                               </body>
</html>