2013-05-08 21:45:39 +00:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
|
2014-12-19 06:59:46 +00:00
|
|
|
*
|
2013-05-08 21:45:39 +00:00
|
|
|
* This program is free software; you can redistribute it and/or modify it
|
|
|
|
* under the terms of version 2 of the GNU General Public License as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
|
|
* more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along with
|
|
|
|
* this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
|
|
|
|
*
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
#ifndef _RTW_IOCTL_H_
|
|
|
|
#define _RTW_IOCTL_H_
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
#include <drv_conf.h>
|
2013-05-08 21:45:39 +00:00
|
|
|
#include <osdep_service.h>
|
|
|
|
#include <drv_types.h>
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
#ifndef OID_802_11_CAPABILITY
|
2014-12-11 21:15:04 +00:00
|
|
|
#define OID_802_11_CAPABILITY 0x0d010122
|
2013-05-08 21:45:39 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef OID_802_11_PMKID
|
2014-12-11 21:15:04 +00:00
|
|
|
#define OID_802_11_PMKID 0x0d010123
|
2013-05-08 21:45:39 +00:00
|
|
|
#endif
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* For DDK-defined OIDs */
|
2013-05-08 21:45:39 +00:00
|
|
|
#define OID_NDIS_SEG1 0x00010100
|
|
|
|
#define OID_NDIS_SEG2 0x00010200
|
|
|
|
#define OID_NDIS_SEG3 0x00020100
|
|
|
|
#define OID_NDIS_SEG4 0x01010100
|
|
|
|
#define OID_NDIS_SEG5 0x01020100
|
|
|
|
#define OID_NDIS_SEG6 0x01020200
|
|
|
|
#define OID_NDIS_SEG7 0xFD010100
|
|
|
|
#define OID_NDIS_SEG8 0x0D010100
|
|
|
|
#define OID_NDIS_SEG9 0x0D010200
|
|
|
|
#define OID_NDIS_SEG10 0x0D020200
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
#define SZ_OID_NDIS_SEG1 23
|
|
|
|
#define SZ_OID_NDIS_SEG2 3
|
|
|
|
#define SZ_OID_NDIS_SEG3 6
|
|
|
|
#define SZ_OID_NDIS_SEG4 6
|
|
|
|
#define SZ_OID_NDIS_SEG5 4
|
|
|
|
#define SZ_OID_NDIS_SEG6 8
|
|
|
|
#define SZ_OID_NDIS_SEG7 7
|
|
|
|
#define SZ_OID_NDIS_SEG8 36
|
|
|
|
#define SZ_OID_NDIS_SEG9 24
|
|
|
|
#define SZ_OID_NDIS_SEG10 19
|
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
/* For Realtek-defined OIDs */
|
2013-05-08 21:45:39 +00:00
|
|
|
#define OID_MP_SEG1 0xFF871100
|
|
|
|
#define OID_MP_SEG2 0xFF818000
|
|
|
|
|
|
|
|
#define OID_MP_SEG3 0xFF818700
|
|
|
|
#define OID_MP_SEG4 0xFF011100
|
|
|
|
|
2014-12-19 06:59:46 +00:00
|
|
|
#define DEBUG_OID(dbg, str) \
|
|
|
|
if((!dbg)) \
|
|
|
|
{ \
|
2014-12-11 21:15:04 +00:00
|
|
|
RT_TRACE(_module_rtl871x_ioctl_c_,_drv_info_,("%s(%d): %s", __FUNCTION__, __LINE__, str)); \
|
2014-12-19 06:59:46 +00:00
|
|
|
}
|
2014-12-11 21:15:04 +00:00
|
|
|
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
enum oid_type
|
|
|
|
{
|
2013-05-08 21:45:39 +00:00
|
|
|
QUERY_OID,
|
|
|
|
SET_OID
|
|
|
|
};
|
|
|
|
|
|
|
|
struct oid_funs_node {
|
2015-03-16 14:43:53 +00:00
|
|
|
unsigned int oid_start; /* the starting number for OID */
|
|
|
|
unsigned int oid_end; /* the ending number for OID */
|
2014-12-19 06:59:46 +00:00
|
|
|
struct oid_obj_priv *node_array;
|
2015-03-16 14:43:53 +00:00
|
|
|
unsigned int array_sz; /* the size of node_array */
|
|
|
|
int query_counter; /* count the number of query hits for this segment */
|
|
|
|
int set_counter; /* count the number of set hits for this segment */
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
struct oid_par_priv
|
|
|
|
{
|
2013-05-08 21:45:39 +00:00
|
|
|
void *adapter_context;
|
|
|
|
NDIS_OID oid;
|
|
|
|
void *information_buf;
|
|
|
|
u32 information_buf_len;
|
|
|
|
u32 *bytes_rw;
|
|
|
|
u32 *bytes_needed;
|
|
|
|
enum oid_type type_of_oid;
|
|
|
|
u32 dbg;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct oid_obj_priv {
|
2015-03-16 14:43:53 +00:00
|
|
|
unsigned char dbg; /* 0: without OID debug message 1: with OID debug message */
|
2014-12-19 06:59:46 +00:00
|
|
|
NDIS_STATUS (*oidfuns)(struct oid_par_priv *poid_par_priv);
|
2013-05-08 21:45:39 +00:00
|
|
|
};
|
|
|
|
|
2014-12-16 00:29:43 +00:00
|
|
|
#if defined(CONFIG_WIRELESS_EXT)
|
2013-05-08 21:45:39 +00:00
|
|
|
extern struct iw_handler_def rtw_handlers_def;
|
2014-12-11 21:15:04 +00:00
|
|
|
#endif
|
2013-05-08 21:45:39 +00:00
|
|
|
|
2014-12-11 21:15:04 +00:00
|
|
|
extern NDIS_STATUS drv_query_info(
|
2015-03-16 13:54:18 +00:00
|
|
|
struct net_device * MiniportAdapterContext,
|
2015-03-13 17:06:38 +00:00
|
|
|
NDIS_OID Oid,
|
|
|
|
void * InformationBuffer,
|
|
|
|
u32 InformationBufferLength,
|
|
|
|
u32* BytesWritten,
|
|
|
|
u32* BytesNeeded
|
2014-12-11 21:15:04 +00:00
|
|
|
);
|
2013-08-14 02:01:38 +00:00
|
|
|
|
2014-12-19 06:59:46 +00:00
|
|
|
extern NDIS_STATUS drv_set_info(
|
2015-03-16 13:54:18 +00:00
|
|
|
struct net_device * MiniportAdapterContext,
|
2015-03-13 17:06:38 +00:00
|
|
|
NDIS_OID Oid,
|
|
|
|
void * InformationBuffer,
|
|
|
|
u32 InformationBufferLength,
|
|
|
|
u32* BytesRead,
|
|
|
|
u32* BytesNeeded
|
2014-12-11 21:15:04 +00:00
|
|
|
);
|
2013-07-18 15:12:28 +00:00
|
|
|
|
2015-03-16 14:43:53 +00:00
|
|
|
#endif /* #ifndef __INC_CEINFO_ */
|