Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../usr/include/linux
File: wimax.h
/*
[0] Fix | Delete
* Linux WiMax
[1] Fix | Delete
* API for user space
[2] Fix | Delete
*
[3] Fix | Delete
*
[4] Fix | Delete
* Copyright (C) 2007-2008 Intel Corporation. All rights reserved.
[5] Fix | Delete
*
[6] Fix | Delete
* Redistribution and use in source and binary forms, with or without
[7] Fix | Delete
* modification, are permitted provided that the following conditions
[8] Fix | Delete
* are met:
[9] Fix | Delete
*
[10] Fix | Delete
* * Redistributions of source code must retain the above copyright
[11] Fix | Delete
* notice, this list of conditions and the following disclaimer.
[12] Fix | Delete
* * Redistributions in binary form must reproduce the above copyright
[13] Fix | Delete
* notice, this list of conditions and the following disclaimer in
[14] Fix | Delete
* the documentation and/or other materials provided with the
[15] Fix | Delete
* distribution.
[16] Fix | Delete
* * Neither the name of Intel Corporation nor the names of its
[17] Fix | Delete
* contributors may be used to endorse or promote products derived
[18] Fix | Delete
* from this software without specific prior written permission.
[19] Fix | Delete
*
[20] Fix | Delete
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
[21] Fix | Delete
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
[22] Fix | Delete
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
[23] Fix | Delete
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
[24] Fix | Delete
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
[25] Fix | Delete
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
[26] Fix | Delete
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
[27] Fix | Delete
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
[28] Fix | Delete
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
[29] Fix | Delete
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
[30] Fix | Delete
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
[31] Fix | Delete
*
[32] Fix | Delete
*
[33] Fix | Delete
* Intel Corporation <linux-wimax@intel.com>
[34] Fix | Delete
* Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
[35] Fix | Delete
* - Initial implementation
[36] Fix | Delete
*
[37] Fix | Delete
*
[38] Fix | Delete
* This file declares the user/kernel protocol that is spoken over
[39] Fix | Delete
* Generic Netlink, as well as any type declaration that is to be used
[40] Fix | Delete
* by kernel and user space.
[41] Fix | Delete
*
[42] Fix | Delete
* It is intended for user space to clone it verbatim to use it as a
[43] Fix | Delete
* primary reference for definitions.
[44] Fix | Delete
*
[45] Fix | Delete
* Stuff intended for kernel usage as well as full protocol and stack
[46] Fix | Delete
* documentation is rooted in include/net/wimax.h.
[47] Fix | Delete
*/
[48] Fix | Delete
[49] Fix | Delete
#ifndef __LINUX__WIMAX_H__
[50] Fix | Delete
#define __LINUX__WIMAX_H__
[51] Fix | Delete
[52] Fix | Delete
#include <linux/types.h>
[53] Fix | Delete
[54] Fix | Delete
enum {
[55] Fix | Delete
/**
[56] Fix | Delete
* Version of the interface (unsigned decimal, MMm, max 25.5)
[57] Fix | Delete
* M - Major: change if removing or modifying an existing call.
[58] Fix | Delete
* m - minor: change when adding a new call
[59] Fix | Delete
*/
[60] Fix | Delete
WIMAX_GNL_VERSION = 01,
[61] Fix | Delete
/* Generic NetLink attributes */
[62] Fix | Delete
WIMAX_GNL_ATTR_INVALID = 0x00,
[63] Fix | Delete
WIMAX_GNL_ATTR_MAX = 10,
[64] Fix | Delete
};
[65] Fix | Delete
[66] Fix | Delete
[67] Fix | Delete
/*
[68] Fix | Delete
* Generic NetLink operations
[69] Fix | Delete
*
[70] Fix | Delete
* Most of these map to an API call; _OP_ stands for operation, _RP_
[71] Fix | Delete
* for reply and _RE_ for report (aka: signal).
[72] Fix | Delete
*/
[73] Fix | Delete
enum {
[74] Fix | Delete
WIMAX_GNL_OP_MSG_FROM_USER, /* User to kernel message */
[75] Fix | Delete
WIMAX_GNL_OP_MSG_TO_USER, /* Kernel to user message */
[76] Fix | Delete
WIMAX_GNL_OP_RFKILL, /* Run wimax_rfkill() */
[77] Fix | Delete
WIMAX_GNL_OP_RESET, /* Run wimax_rfkill() */
[78] Fix | Delete
WIMAX_GNL_RE_STATE_CHANGE, /* Report: status change */
[79] Fix | Delete
WIMAX_GNL_OP_STATE_GET, /* Request for current state */
[80] Fix | Delete
};
[81] Fix | Delete
[82] Fix | Delete
[83] Fix | Delete
/* Message from user / to user */
[84] Fix | Delete
enum {
[85] Fix | Delete
WIMAX_GNL_MSG_IFIDX = 1,
[86] Fix | Delete
WIMAX_GNL_MSG_PIPE_NAME,
[87] Fix | Delete
WIMAX_GNL_MSG_DATA,
[88] Fix | Delete
};
[89] Fix | Delete
[90] Fix | Delete
[91] Fix | Delete
/*
[92] Fix | Delete
* wimax_rfkill()
[93] Fix | Delete
*
[94] Fix | Delete
* The state of the radio (ON/OFF) is mapped to the rfkill subsystem's
[95] Fix | Delete
* switch state (DISABLED/ENABLED).
[96] Fix | Delete
*/
[97] Fix | Delete
enum wimax_rf_state {
[98] Fix | Delete
WIMAX_RF_OFF = 0, /* Radio is off, rfkill on/enabled */
[99] Fix | Delete
WIMAX_RF_ON = 1, /* Radio is on, rfkill off/disabled */
[100] Fix | Delete
WIMAX_RF_QUERY = 2,
[101] Fix | Delete
};
[102] Fix | Delete
[103] Fix | Delete
/* Attributes */
[104] Fix | Delete
enum {
[105] Fix | Delete
WIMAX_GNL_RFKILL_IFIDX = 1,
[106] Fix | Delete
WIMAX_GNL_RFKILL_STATE,
[107] Fix | Delete
};
[108] Fix | Delete
[109] Fix | Delete
[110] Fix | Delete
/* Attributes for wimax_reset() */
[111] Fix | Delete
enum {
[112] Fix | Delete
WIMAX_GNL_RESET_IFIDX = 1,
[113] Fix | Delete
};
[114] Fix | Delete
[115] Fix | Delete
/* Attributes for wimax_state_get() */
[116] Fix | Delete
enum {
[117] Fix | Delete
WIMAX_GNL_STGET_IFIDX = 1,
[118] Fix | Delete
};
[119] Fix | Delete
[120] Fix | Delete
/*
[121] Fix | Delete
* Attributes for the Report State Change
[122] Fix | Delete
*
[123] Fix | Delete
* For now we just have the old and new states; new attributes might
[124] Fix | Delete
* be added later on.
[125] Fix | Delete
*/
[126] Fix | Delete
enum {
[127] Fix | Delete
WIMAX_GNL_STCH_IFIDX = 1,
[128] Fix | Delete
WIMAX_GNL_STCH_STATE_OLD,
[129] Fix | Delete
WIMAX_GNL_STCH_STATE_NEW,
[130] Fix | Delete
};
[131] Fix | Delete
[132] Fix | Delete
[133] Fix | Delete
/**
[134] Fix | Delete
* enum wimax_st - The different states of a WiMAX device
[135] Fix | Delete
* @__WIMAX_ST_NULL: The device structure has been allocated and zeroed,
[136] Fix | Delete
* but still wimax_dev_add() hasn't been called. There is no state.
[137] Fix | Delete
*
[138] Fix | Delete
* @WIMAX_ST_DOWN: The device has been registered with the WiMAX and
[139] Fix | Delete
* networking stacks, but it is not initialized (normally that is
[140] Fix | Delete
* done with 'ifconfig DEV up' [or equivalent], which can upload
[141] Fix | Delete
* firmware and enable communications with the device).
[142] Fix | Delete
* In this state, the device is powered down and using as less
[143] Fix | Delete
* power as possible.
[144] Fix | Delete
* This state is the default after a call to wimax_dev_add(). It
[145] Fix | Delete
* is ok to have drivers move directly to %WIMAX_ST_UNINITIALIZED
[146] Fix | Delete
* or %WIMAX_ST_RADIO_OFF in _probe() after the call to
[147] Fix | Delete
* wimax_dev_add().
[148] Fix | Delete
* It is recommended that the driver leaves this state when
[149] Fix | Delete
* calling 'ifconfig DEV up' and enters it back on 'ifconfig DEV
[150] Fix | Delete
* down'.
[151] Fix | Delete
*
[152] Fix | Delete
* @__WIMAX_ST_QUIESCING: The device is being torn down, so no API
[153] Fix | Delete
* operations are allowed to proceed except the ones needed to
[154] Fix | Delete
* complete the device clean up process.
[155] Fix | Delete
*
[156] Fix | Delete
* @WIMAX_ST_UNINITIALIZED: [optional] Communication with the device
[157] Fix | Delete
* is setup, but the device still requires some configuration
[158] Fix | Delete
* before being operational.
[159] Fix | Delete
* Some WiMAX API calls might work.
[160] Fix | Delete
*
[161] Fix | Delete
* @WIMAX_ST_RADIO_OFF: The device is fully up; radio is off (wether
[162] Fix | Delete
* by hardware or software switches).
[163] Fix | Delete
* It is recommended to always leave the device in this state
[164] Fix | Delete
* after initialization.
[165] Fix | Delete
*
[166] Fix | Delete
* @WIMAX_ST_READY: The device is fully up and radio is on.
[167] Fix | Delete
*
[168] Fix | Delete
* @WIMAX_ST_SCANNING: [optional] The device has been instructed to
[169] Fix | Delete
* scan. In this state, the device cannot be actively connected to
[170] Fix | Delete
* a network.
[171] Fix | Delete
*
[172] Fix | Delete
* @WIMAX_ST_CONNECTING: The device is connecting to a network. This
[173] Fix | Delete
* state exists because in some devices, the connect process can
[174] Fix | Delete
* include a number of negotiations between user space, kernel
[175] Fix | Delete
* space and the device. User space needs to know what the device
[176] Fix | Delete
* is doing. If the connect sequence in a device is atomic and
[177] Fix | Delete
* fast, the device can transition directly to CONNECTED
[178] Fix | Delete
*
[179] Fix | Delete
* @WIMAX_ST_CONNECTED: The device is connected to a network.
[180] Fix | Delete
*
[181] Fix | Delete
* @__WIMAX_ST_INVALID: This is an invalid state used to mark the
[182] Fix | Delete
* maximum numeric value of states.
[183] Fix | Delete
*
[184] Fix | Delete
* Description:
[185] Fix | Delete
*
[186] Fix | Delete
* Transitions from one state to another one are atomic and can only
[187] Fix | Delete
* be caused in kernel space with wimax_state_change(). To read the
[188] Fix | Delete
* state, use wimax_state_get().
[189] Fix | Delete
*
[190] Fix | Delete
* States starting with __ are internal and shall not be used or
[191] Fix | Delete
* referred to by drivers or userspace. They look ugly, but that's the
[192] Fix | Delete
* point -- if any use is made non-internal to the stack, it is easier
[193] Fix | Delete
* to catch on review.
[194] Fix | Delete
*
[195] Fix | Delete
* All API operations [with well defined exceptions] will take the
[196] Fix | Delete
* device mutex before starting and then check the state. If the state
[197] Fix | Delete
* is %__WIMAX_ST_NULL, %WIMAX_ST_DOWN, %WIMAX_ST_UNINITIALIZED or
[198] Fix | Delete
* %__WIMAX_ST_QUIESCING, it will drop the lock and quit with
[199] Fix | Delete
* -%EINVAL, -%ENOMEDIUM, -%ENOTCONN or -%ESHUTDOWN.
[200] Fix | Delete
*
[201] Fix | Delete
* The order of the definitions is important, so we can do numerical
[202] Fix | Delete
* comparisons (eg: < %WIMAX_ST_RADIO_OFF means the device is not ready
[203] Fix | Delete
* to operate).
[204] Fix | Delete
*/
[205] Fix | Delete
/*
[206] Fix | Delete
* The allowed state transitions are described in the table below
[207] Fix | Delete
* (states in rows can go to states in columns where there is an X):
[208] Fix | Delete
*
[209] Fix | Delete
* UNINI RADIO READY SCAN CONNEC CONNEC
[210] Fix | Delete
* NULL DOWN QUIESCING TIALIZED OFF NING TING TED
[211] Fix | Delete
* NULL - x
[212] Fix | Delete
* DOWN - x x x
[213] Fix | Delete
* QUIESCING x -
[214] Fix | Delete
* UNINITIALIZED x - x
[215] Fix | Delete
* RADIO_OFF x - x
[216] Fix | Delete
* READY x x - x x x
[217] Fix | Delete
* SCANNING x x x - x x
[218] Fix | Delete
* CONNECTING x x x x - x
[219] Fix | Delete
* CONNECTED x x x -
[220] Fix | Delete
*
[221] Fix | Delete
* This table not available in kernel-doc because the formatting messes it up.
[222] Fix | Delete
*/
[223] Fix | Delete
enum wimax_st {
[224] Fix | Delete
__WIMAX_ST_NULL = 0,
[225] Fix | Delete
WIMAX_ST_DOWN,
[226] Fix | Delete
__WIMAX_ST_QUIESCING,
[227] Fix | Delete
WIMAX_ST_UNINITIALIZED,
[228] Fix | Delete
WIMAX_ST_RADIO_OFF,
[229] Fix | Delete
WIMAX_ST_READY,
[230] Fix | Delete
WIMAX_ST_SCANNING,
[231] Fix | Delete
WIMAX_ST_CONNECTING,
[232] Fix | Delete
WIMAX_ST_CONNECTED,
[233] Fix | Delete
__WIMAX_ST_INVALID /* Always keep last */
[234] Fix | Delete
};
[235] Fix | Delete
[236] Fix | Delete
[237] Fix | Delete
#endif /* #ifndef __LINUX__WIMAX_H__ */
[238] Fix | Delete
[239] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function