Sophie

Sophie

distrib > CentOS > 6 > i386 > by-pkgid > 2c51d8eb79f8810ada971ee8c30ce1e5 > files > 3014

kernel-doc-2.6.32-71.14.1.el6.noarch.rpm

<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968" /><title>enum wimax_st</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="Linux Networking and Network Devices APIs" /><link rel="up" href="ch01s06.html" title="WiMAX" /><link rel="prev" href="re194.html" title="struct wimax_dev" /><link rel="next" href="ch02.html" title="Chapter&#160;2.&#160;Network device support" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>enum wimax_st</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re194.html">Prev</a>&#160;</td><th width="60%" align="center">WiMAX</th><td width="20%" align="right">&#160;<a accesskey="n" href="ch02.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="enum wimax_st"><a id="API-enum-wimax-st"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>enum wimax_st &#8212; 
  The different states of a WiMAX device
 </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><pre class="programlisting">
enum wimax_st {
  __WIMAX_ST_NULL,
  WIMAX_ST_DOWN,
  __WIMAX_ST_QUIESCING,
  WIMAX_ST_UNINITIALIZED,
  WIMAX_ST_RADIO_OFF,
  WIMAX_ST_READY,
  WIMAX_ST_SCANNING,
  WIMAX_ST_CONNECTING,
  WIMAX_ST_CONNECTED,
  __WIMAX_ST_INVALID
};  </pre></div><div class="refsect1" title="Constants"><a id="id2748598"></a><h2>Constants</h2><div class="variablelist"><dl><dt><span class="term">__WIMAX_ST_NULL</span></dt><dd><p>
The device structure has been allocated and zeroed,
but still <code class="function">wimax_dev_add</code> hasn't been called. There is no state.
      </p></dd><dt><span class="term">WIMAX_ST_DOWN</span></dt><dd><p>
The device has been registered with the WiMAX and
networking stacks, but it is not initialized (normally that is
done with 'ifconfig DEV up' [or equivalent], which can upload
firmware and enable communications with the device).
In this state, the device is powered down and using as less
power as possible.
This state is the default after a call to <code class="function">wimax_dev_add</code>. It
is ok to have drivers move directly to <code class="constant">WIMAX_ST_UNINITIALIZED</code>
or <code class="constant">WIMAX_ST_RADIO_OFF</code> in <code class="function">_probe</code> after the call to
<code class="function">wimax_dev_add</code>.
It is recommended that the driver leaves this state when
calling 'ifconfig DEV up' and enters it back on 'ifconfig DEV
down'.
      </p></dd><dt><span class="term">__WIMAX_ST_QUIESCING</span></dt><dd><p>
The device is being torn down, so no API
operations are allowed to proceed except the ones needed to
complete the device clean up process.
      </p></dd><dt><span class="term">WIMAX_ST_UNINITIALIZED</span></dt><dd><p>
[optional] Communication with the device
is setup, but the device still requires some configuration
before being operational.
Some WiMAX API calls might work.
      </p></dd><dt><span class="term">WIMAX_ST_RADIO_OFF</span></dt><dd><p>
The device is fully up; radio is off (wether
by hardware or software switches).
It is recommended to always leave the device in this state
after initialization.
      </p></dd><dt><span class="term">WIMAX_ST_READY</span></dt><dd><p>
The device is fully up and radio is on.
      </p></dd><dt><span class="term">WIMAX_ST_SCANNING</span></dt><dd><p>
[optional] The device has been instructed to
scan. In this state, the device cannot be actively connected to
a network.
      </p></dd><dt><span class="term">WIMAX_ST_CONNECTING</span></dt><dd><p>
The device is connecting to a network. This
state exists because in some devices, the connect process can
include a number of negotiations between user space, kernel
space and the device. User space needs to know what the device
is doing. If the connect sequence in a device is atomic and
fast, the device can transition directly to CONNECTED
      </p></dd><dt><span class="term">WIMAX_ST_CONNECTED</span></dt><dd><p>
The device is connected to a network.
      </p></dd><dt><span class="term">__WIMAX_ST_INVALID</span></dt><dd><p>
This is an invalid state used to mark the
maximum numeric value of states.
      </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2748787"></a><h2>Description</h2><p>
   </p><p>

   Transitions from one state to another one are atomic and can only
   be caused in kernel space with <code class="function">wimax_state_change</code>. To read the
   state, use <code class="function">wimax_state_get</code>.
   </p><p>

   States starting with __ are internal and shall not be used or
   referred to by drivers or userspace. They look ugly, but that's the
   point -- if any use is made non-internal to the stack, it is easier
   to catch on review.
   </p><p>

   All API operations [with well defined exceptions] will take the
   device mutex before starting and then check the state. If the state
   is <code class="constant">__WIMAX_ST_NULL</code>, <code class="constant">WIMAX_ST_DOWN</code>, <code class="constant">WIMAX_ST_UNINITIALIZED</code> or
   <code class="constant">__WIMAX_ST_QUIESCING</code>, it will drop the lock and quit with
   -<code class="constant">EINVAL</code>, -<code class="constant">ENOMEDIUM</code>, -<code class="constant">ENOTCONN</code> or -<code class="constant">ESHUTDOWN</code>.
   </p><p>

   The order of the definitions is important, so we can do numerical
   comparisons (eg: &lt; <code class="constant">WIMAX_ST_RADIO_OFF</code> means the device is not ready
   to operate).
</p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re194.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch01s06.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="ch02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>struct wimax_dev</span>&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;2.&#160;Network device support</td></tr></table></div></body></html>