Home | History | Annotate | Download | only in inc
      1 /****************************************************************************
      2 **+-----------------------------------------------------------------------+**
      3 **|                                                                       |**
      4 **| Copyright(c) 1998 - 2008 Texas Instruments. All rights reserved.      |**
      5 **| All rights reserved.                                                  |**
      6 **|                                                                       |**
      7 **| Redistribution and use in source and binary forms, with or without    |**
      8 **| modification, are permitted provided that the following conditions    |**
      9 **| are met:                                                              |**
     10 **|                                                                       |**
     11 **|  * Redistributions of source code must retain the above copyright     |**
     12 **|    notice, this list of conditions and the following disclaimer.      |**
     13 **|  * Redistributions in binary form must reproduce the above copyright  |**
     14 **|    notice, this list of conditions and the following disclaimer in    |**
     15 **|    the documentation and/or other materials provided with the         |**
     16 **|    distribution.                                                      |**
     17 **|  * Neither the name Texas Instruments nor the names of its            |**
     18 **|    contributors may be used to endorse or promote products derived    |**
     19 **|    from this software without specific prior written permission.      |**
     20 **|                                                                       |**
     21 **| THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS   |**
     22 **| "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT     |**
     23 **| LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |**
     24 **| A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT  |**
     25 **| OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |**
     26 **| SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT      |**
     27 **| LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |**
     28 **| DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |**
     29 **| THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT   |**
     30 **| (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |**
     31 **| OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.  |**
     32 **|                                                                       |**
     33 **+-----------------------------------------------------------------------+**
     34 ****************************************************************************/
     35 
     36 #ifndef __TIIOCTL_H__
     37 #define __TIIOCTL_H__
     38 
     39 /* OID Mode*/
     40 #define IOCTRL_SET    0
     41 #define IOCTRL_GET    1
     42 #define IOCTRL_SET_GET 2
     43 
     44 #ifndef FILE_DEVICE_UNKNOWN
     45 
     46 /**/
     47 /* Macro definition for defining IOCTL and FSCTL function control codes.  Note*/
     48 /* that function codes 0-2047 are reserved for Microsoft Corporation, and*/
     49 /* 2048-4095 are reserved for customers.*/
     50 /**/
     51 
     52 #define CTL_CODE( DeviceType, Function, Method, Access ) (                 \
     53     ((DeviceType) << 16) | ((Access) << 14) | ((Function) << 2) | (Method) \
     54 )
     55 
     56 #define FILE_DEVICE_UNKNOWN     0x00000022
     57 #define METHOD_BUFFERED         0
     58 #define FILE_ANY_ACCESS         0
     59 
     60 #endif     /* FILE_DEVICE_UNKNOWN */
     61 
     62 /* IOCTL info, needs to be visible for application. Should be in a custom range (0x800..)*/
     63 #define SHELLDRV_IOCTL_INDEX  0x00800
     64 
     65 /* Offsets for IOTCLS bases*/
     66 #define D11BASIC_IOCTLS_OFFSET          0x0
     67 #define D11PACKET_PARAMS_IOCTLS_OFFSET  0x100
     68 #define RATES_IOCTLS_OFFSET             0x200
     69 #define CHANNEL_IOCTLS_OFFSET           0x300
     70 #define POWER_IOCTLS_OFFSET             0x400
     71 #define SECURITY_IOCTLS_OFFSET          0x500
     72 #define MISC_IOCTLS_OFFSET              0x600
     73 #define DEBUG_IOCTLS_OFFSET             0x700
     74 #define SCAN_IOCTLS_OFFSET              0x800
     75 #define VOICE_QOS_IOCTLS_OFFSET         0x900
     76 #define ROAMING_IOCTLS_OFFSET           0xa00
     77 #define MEASUREMENT_IOCTLS_OFFSET       0xa80
     78 #define PLT_IOCTLS_OFFSET               0xb00
     79 
     80 #ifdef _WINDOWS // Windows Mobile specific IOCTL's
     81 #endif /* ifdef _WINDOWS */
     82 /********************************************/
     83 
     84 typedef struct tagDeviceInfo
     85 {
     86 char csKeyName[260];
     87 char csDriverKey[260];
     88 char csDescription[260];
     89 } TIWLNDEVINFO, *PTIWLNDEVINFO;
     90 
     91 
     92 /**********************  Basic dot11 Functionality ****************************************/
     93 
     94 #define TIWLN_802_11_BSSID_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
     95                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 1, \
     96                             METHOD_BUFFERED,          \
     97                             FILE_ANY_ACCESS)
     98 
     99 #define TIWLN_802_11_BSSID_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    100                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 2, \
    101                             METHOD_BUFFERED,          \
    102                             FILE_ANY_ACCESS)
    103 
    104 #define TIWLN_802_11_BSSID_LIST CTL_CODE(FILE_DEVICE_UNKNOWN, \
    105                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 3, \
    106                             METHOD_BUFFERED,          \
    107                             FILE_ANY_ACCESS)
    108 
    109 #define TIWLN_802_11_SSID_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    110                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 4, \
    111                             METHOD_BUFFERED,          \
    112                             FILE_ANY_ACCESS)
    113 
    114 #define TIWLN_802_11_SSID_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    115                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 5, \
    116                             METHOD_BUFFERED,          \
    117                             FILE_ANY_ACCESS)
    118 
    119 #define TIWLN_802_11_DESIRED_SSID_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    120                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 6, \
    121                             METHOD_BUFFERED,          \
    122                             FILE_ANY_ACCESS)
    123 
    124 #define TIWLN_802_11_DISASSOCIATE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    125                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 7, \
    126                             METHOD_BUFFERED,          \
    127                             FILE_ANY_ACCESS)
    128 
    129 #define TIWLN_802_11_ASSOCIATION_INFORMATION CTL_CODE(FILE_DEVICE_UNKNOWN, \
    130                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 8, \
    131                             METHOD_BUFFERED,          \
    132                             FILE_ANY_ACCESS)
    133 
    134 #define TIWLN_802_11_NETWORK_TYPES_SUPPORTED CTL_CODE(FILE_DEVICE_UNKNOWN, \
    135                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 9, \
    136                             METHOD_BUFFERED,          \
    137                             FILE_ANY_ACCESS)
    138 
    139 #define TIWLN_802_11_NETWORK_TYPE_IN_USE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    140                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 10, \
    141                             METHOD_BUFFERED,          \
    142                             FILE_ANY_ACCESS)
    143 
    144 #define TIWLN_802_11_NETWORK_TYPE_IN_USE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    145                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 11, \
    146                             METHOD_BUFFERED,          \
    147                             FILE_ANY_ACCESS)
    148 
    149 #define TIWLN_802_11_INFRASTRUCTURE_MODE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    150                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 12, \
    151                             METHOD_BUFFERED,          \
    152                             FILE_ANY_ACCESS)
    153 
    154 #define TIWLN_802_11_INFRASTRUCTURE_MODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    155                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 13, \
    156                             METHOD_BUFFERED,          \
    157                             FILE_ANY_ACCESS)
    158 
    159 #define TIWLN_802_11_DESIRED_INFRASTRUCTURE_MODE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    160                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 14, \
    161                             METHOD_BUFFERED,          \
    162                             FILE_ANY_ACCESS)
    163 
    164 #define TIWLN_802_11_AUTHENTICATION_MODE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    165                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 15, \
    166                             METHOD_BUFFERED,          \
    167                             FILE_ANY_ACCESS)
    168 
    169 #define TIWLN_802_11_AUTHENTICATION_MODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    170                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 16, \
    171                             METHOD_BUFFERED,          \
    172                             FILE_ANY_ACCESS)
    173 
    174 #define TIWLN_802_11_CONFIGURATION_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    175                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 17, \
    176                             METHOD_BUFFERED,          \
    177                             FILE_ANY_ACCESS)
    178 
    179 #define TIWLN_802_11_CONFIGURATION_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    180                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 18, \
    181                             METHOD_BUFFERED,          \
    182                             FILE_ANY_ACCESS)
    183 
    184 #define TIWLN_802_11_FULL_BSSID_LIST  CTL_CODE(FILE_DEVICE_UNKNOWN, \
    185                             SHELLDRV_IOCTL_INDEX + D11BASIC_IOCTLS_OFFSET + 19, \
    186                             METHOD_BUFFERED,          \
    187                             FILE_ANY_ACCESS)
    188 
    189 
    190 /**********************  Rates Functionality  ****************************************/
    191 
    192 #define TIWLN_802_11_SUPPORTED_RATES CTL_CODE(FILE_DEVICE_UNKNOWN, \
    193                             SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 1, \
    194                             METHOD_BUFFERED,          \
    195                             FILE_ANY_ACCESS)
    196 
    197 #define TIWLN_802_11_DESIRED_RATES_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    198                             SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 2, \
    199                             METHOD_BUFFERED,          \
    200                             FILE_ANY_ACCESS)
    201 
    202 #define TIWLN_802_11_SUPPORTED_RATES_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    203                             SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 3, \
    204                             METHOD_BUFFERED,          \
    205                             FILE_ANY_ACCESS)
    206 
    207 #define TIWLN_802_11_CURRENT_RATES_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    208                             SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 4, \
    209                             METHOD_BUFFERED,          \
    210                             FILE_ANY_ACCESS)
    211 
    212 #define TIWLN_EXT_RATES_IE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    213                             SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 5, \
    214                             METHOD_BUFFERED,          \
    215                             FILE_ANY_ACCESS)
    216 
    217 #define TIWLN_EXT_RATES_IE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    218                             SHELLDRV_IOCTL_INDEX + RATES_IOCTLS_OFFSET + 6, \
    219                             METHOD_BUFFERED,          \
    220                             FILE_ANY_ACCESS)
    221 
    222 
    223 /**********************  Channel Functionality  ****************************************/
    224 
    225 #define TIWLN_802_11_DESIRED_CHANNEL_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    226                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 1, \
    227                             METHOD_BUFFERED,          \
    228                             FILE_ANY_ACCESS)
    229 
    230 #define TIWLN_802_11_DESIRED_CHANNEL_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    231                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 2, \
    232                             METHOD_BUFFERED,          \
    233                             FILE_ANY_ACCESS)
    234 
    235 #define TIWLN_802_11_CHANNEL_GET   CTL_CODE(FILE_DEVICE_UNKNOWN, \
    236                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 3, \
    237                             METHOD_BUFFERED,          \
    238                             FILE_ANY_ACCESS)
    239 
    240 #define TIWLN_CURRENT_REGDOMAIN_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    241                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 4, \
    242                             METHOD_BUFFERED,          \
    243                             FILE_ANY_ACCESS)
    244 
    245 #define TIWLN_CURRENT_REGDOMAIN_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    246                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 5, \
    247                             METHOD_BUFFERED,          \
    248                             FILE_ANY_ACCESS)
    249 
    250 #define TIWLN_REGDOMAIN_TABLE   CTL_CODE(FILE_DEVICE_UNKNOWN, \
    251                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 6, \
    252                             METHOD_BUFFERED,          \
    253                             FILE_ANY_ACCESS)
    254 
    255 #define TIWLN_ROAM_PROFILE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    256                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 7, \
    257                             METHOD_BUFFERED,          \
    258                             FILE_ANY_ACCESS)
    259 
    260 #define TIWLN_ROAM_PROFILE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    261                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 8, \
    262                             METHOD_BUFFERED,          \
    263                             FILE_ANY_ACCESS)
    264 
    265 #define TIWLN_REG_DOMAIN_ENABLE_DISABLE_802_11D CTL_CODE(FILE_DEVICE_UNKNOWN, \
    266                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 9, \
    267                             METHOD_BUFFERED,          \
    268                             FILE_ANY_ACCESS)
    269 
    270 #define TIWLN_REG_DOMAIN_ENABLE_DISABLE_802_11H CTL_CODE(FILE_DEVICE_UNKNOWN, \
    271                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 10, \
    272                             METHOD_BUFFERED,          \
    273                             FILE_ANY_ACCESS)
    274 
    275 #define TIWLN_REG_DOMAIN_GET_802_11D CTL_CODE(FILE_DEVICE_UNKNOWN, \
    276                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 11, \
    277                             METHOD_BUFFERED,          \
    278                             FILE_ANY_ACCESS)
    279 
    280 #define TIWLN_REG_DOMAIN_GET_802_11H CTL_CODE(FILE_DEVICE_UNKNOWN, \
    281                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 12, \
    282                             METHOD_BUFFERED,          \
    283                             FILE_ANY_ACCESS)
    284 
    285 #define TIWLN_REG_DOMAIN_GET_COUNTRY_2_4 CTL_CODE(FILE_DEVICE_UNKNOWN, \
    286                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 13, \
    287                             METHOD_BUFFERED,          \
    288                             FILE_ANY_ACCESS)
    289 
    290 #define TIWLN_REG_DOMAIN_SET_COUNTRY_2_4 CTL_CODE(FILE_DEVICE_UNKNOWN, \
    291                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 14, \
    292                             METHOD_BUFFERED,          \
    293                             FILE_ANY_ACCESS)
    294 
    295 #define TIWLN_REG_DOMAIN_GET_COUNTRY_5 CTL_CODE(FILE_DEVICE_UNKNOWN, \
    296                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 15, \
    297                             METHOD_BUFFERED,          \
    298                             FILE_ANY_ACCESS)
    299 
    300 #define TIWLN_REG_DOMAIN_SET_COUNTRY_5 CTL_CODE(FILE_DEVICE_UNKNOWN, \
    301                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 16, \
    302                             METHOD_BUFFERED,          \
    303                             FILE_ANY_ACCESS)
    304 
    305 #define TIWLN_REG_DOMAIN_SET_DFS_RANGE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    306                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 17, \
    307                             METHOD_BUFFERED,          \
    308                             FILE_ANY_ACCESS)
    309 
    310 #define TIWLN_REG_DOMAIN_GET_DFS_RANGE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    311                             SHELLDRV_IOCTL_INDEX + CHANNEL_IOCTLS_OFFSET + 18, \
    312                             METHOD_BUFFERED,          \
    313                             FILE_ANY_ACCESS)
    314 
    315 /**********************  Power Functionality  ****************************************/
    316 
    317 #define TIWLN_802_11_POWER_MODE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    318                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 1, \
    319                             METHOD_BUFFERED,          \
    320                             FILE_ANY_ACCESS)
    321 
    322 #define TIWLN_802_11_POWER_MODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    323                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 2, \
    324                             METHOD_BUFFERED,          \
    325                             FILE_ANY_ACCESS)
    326 
    327 #define TIWLN_802_11_TX_POWER_LEVEL_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    328                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 3, \
    329                             METHOD_BUFFERED,          \
    330                             FILE_ANY_ACCESS)
    331 
    332 #define TIWLN_802_11_TX_POWER_DBM_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    333                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 4, \
    334                             METHOD_BUFFERED,          \
    335                             FILE_ANY_ACCESS)
    336 
    337 #define TIWLN_802_11_NUMBER_OF_ANTENNAS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    338                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 5, \
    339                             METHOD_BUFFERED,          \
    340                             FILE_ANY_ACCESS)
    341 
    342 #define TIWLN_802_11_RX_ANTENNA_SELECTED_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    343                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 6, \
    344                             METHOD_BUFFERED,          \
    345                             FILE_ANY_ACCESS)
    346 
    347 #define TIWLN_802_11_RX_ANTENNA_SELECTED_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    348                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 7, \
    349                             METHOD_BUFFERED,          \
    350                             FILE_ANY_ACCESS)
    351 
    352 #define TIWLN_802_11_TX_ANTENNA_SELECTED_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    353                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 8, \
    354                             METHOD_BUFFERED,          \
    355                             FILE_ANY_ACCESS)
    356 
    357 #define TIWLN_802_11_TX_ANTENNA_SELECTED_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    358                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 9, \
    359                             METHOD_BUFFERED,          \
    360                             FILE_ANY_ACCESS)
    361 
    362 #define TIWLAN_802_11_ANTENNA_DIVERSITY_PARAM_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    363                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 10, \
    364                             METHOD_BUFFERED,          \
    365                             FILE_ANY_ACCESS)
    366 
    367 #define TIWLN_802_11_RSSI CTL_CODE(FILE_DEVICE_UNKNOWN, \
    368                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 11, \
    369                             METHOD_BUFFERED,          \
    370                             FILE_ANY_ACCESS)
    371 
    372 #define TIWLN_802_11_RSSI_TRIGGER_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    373                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 12, \
    374                             METHOD_BUFFERED,          \
    375                             FILE_ANY_ACCESS)
    376 
    377 #define TIWLN_802_11_RSSI_TRIGGER_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    378                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 13, \
    379                             METHOD_BUFFERED,          \
    380                             FILE_ANY_ACCESS)
    381 
    382 #define TIWLN_SLEEP_CMD CTL_CODE(FILE_DEVICE_UNKNOWN, \
    383                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 14, \
    384                             METHOD_BUFFERED,          \
    385                             FILE_ANY_ACCESS)
    386 
    387 #define TIWLN_802_11_TX_POWER_DBM_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    388                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 15, \
    389                             METHOD_BUFFERED,          \
    390                             FILE_ANY_ACCESS)
    391 
    392 #define TIWLN_802_11_POWER_MGR_PROFILE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    393                                        SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 16, \
    394                                        METHOD_BUFFERED,          \
    395                                        FILE_ANY_ACCESS)
    396 
    397 #define TIWLN_802_11_POWER_LEVEL_BOUNDARY CTL_CODE(FILE_DEVICE_UNKNOWN, \
    398                                        SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 17, \
    399                                        METHOD_BUFFERED,          \
    400                                        FILE_ANY_ACCESS)
    401 
    402 
    403 #define TIWLN_802_11_PERODIC_WAKEUP_MODE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    404                                        SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 18, \
    405                                        METHOD_BUFFERED,          \
    406                                        FILE_ANY_ACCESS)
    407 
    408 #define TIWLN_802_11_PERODIC_WAKEUP_TIMEOUT CTL_CODE(FILE_DEVICE_UNKNOWN, \
    409                                        SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 19, \
    410                                        METHOD_BUFFERED,          \
    411                                        FILE_ANY_ACCESS)
    412 
    413 #define TIWLN_802_11_POWER_LEVEL_DEFAULT_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    414                                        SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 20, \
    415                                        METHOD_BUFFERED,          \
    416                                        FILE_ANY_ACCESS)
    417 
    418 #define TIWLN_802_11_POWER_LEVEL_DEFAULT_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    419                                        SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 21, \
    420                                        METHOD_BUFFERED,          \
    421                                        FILE_ANY_ACCESS)
    422 
    423 #define TIWLN_802_11_POWER_LEVEL_PS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    424                                        SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 22, \
    425                                        METHOD_BUFFERED,          \
    426                                        FILE_ANY_ACCESS)
    427 
    428 #define TIWLN_802_11_POWER_LEVEL_PS_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    429                                        SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 23, \
    430                                        METHOD_BUFFERED,          \
    431                                        FILE_ANY_ACCESS)
    432 
    433 #define TIWLN_802_11_BEACON_FILTER_DESIRED_STATE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    434                                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 24, \
    435                                             METHOD_BUFFERED,          \
    436                                             FILE_ANY_ACCESS)
    437 
    438 
    439 
    440 #define TIWLN_802_11_SNR CTL_CODE(FILE_DEVICE_UNKNOWN, \
    441                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 25, \
    442                             METHOD_BUFFERED,          \
    443                             FILE_ANY_ACCESS)
    444 
    445 #define TIWLN_802_11_BEACON_FILTER_DESIRED_STATE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    446                                             SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 26, \
    447                                             METHOD_BUFFERED,          \
    448                                             FILE_ANY_ACCESS)
    449 
    450 #define TIWLN_802_11_POWER_LEVEL_DOZE_MODE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    451                                        SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 27, \
    452                                        METHOD_BUFFERED,          \
    453                                        FILE_ANY_ACCESS)
    454 
    455 #define TIWLN_802_11_POWER_LEVEL_DOZE_MODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    456                                        SHELLDRV_IOCTL_INDEX + POWER_IOCTLS_OFFSET + 28, \
    457                                        METHOD_BUFFERED,          \
    458                                        FILE_ANY_ACCESS)
    459 
    460 
    461 /**********************  dot11 Network Packet Parameters ****************************************/
    462 
    463 #define TIWLN_802_11_FRAGMENTATION_THRESHOLD_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    464                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 1, \
    465                             METHOD_BUFFERED,          \
    466                             FILE_ANY_ACCESS)
    467 
    468 #define TIWLN_802_11_FRAGMENTATION_THRESHOLD_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    469                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 2, \
    470                             METHOD_BUFFERED,          \
    471                             FILE_ANY_ACCESS)
    472 
    473 #define TIWLN_802_11_RTS_THRESHOLD_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    474                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 3, \
    475                             METHOD_BUFFERED,          \
    476                             FILE_ANY_ACCESS)
    477 
    478 #define TIWLN_802_11_RTS_THRESHOLD_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    479                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 4, \
    480                             METHOD_BUFFERED,          \
    481                             FILE_ANY_ACCESS)
    482 
    483 #define TIWLN_802_11_SHORT_PREAMBLE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    484                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 5, \
    485                             METHOD_BUFFERED,          \
    486                             FILE_ANY_ACCESS)
    487 
    488 #define TIWLN_802_11_SHORT_PREAMBLE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    489                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 6, \
    490                             METHOD_BUFFERED,          \
    491                             FILE_ANY_ACCESS)
    492 
    493 #define TIWLN_802_11_SHORT_RETRY_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    494                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 7, \
    495                             METHOD_BUFFERED,          \
    496                             FILE_ANY_ACCESS)
    497 
    498 #define TIWLN_802_11_SHORT_RETRY_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    499                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 8, \
    500                             METHOD_BUFFERED,          \
    501                             FILE_ANY_ACCESS)
    502 
    503 #define TIWLN_802_11_LONG_RETRY_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    504                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 9, \
    505                             METHOD_BUFFERED,          \
    506                             FILE_ANY_ACCESS)
    507 
    508 #define TIWLN_802_11_LONG_RETRY_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    509                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 11, \
    510                             METHOD_BUFFERED,          \
    511                             FILE_ANY_ACCESS)
    512 
    513 #define TIWLN_SHORT_SLOT_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    514                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 12, \
    515                             METHOD_BUFFERED,          \
    516                             FILE_ANY_ACCESS)
    517 
    518 #define TIWLN_SHORT_SLOT_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    519                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 13, \
    520                             METHOD_BUFFERED,          \
    521                             FILE_ANY_ACCESS)
    522 
    523 #define TIWLN_IBSS_PROTECTION_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    524                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 14, \
    525                             METHOD_BUFFERED,          \
    526                             FILE_ANY_ACCESS)
    527 
    528 #define TIWLN_IBSS_PROTECTION_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    529                             SHELLDRV_IOCTL_INDEX + D11PACKET_PARAMS_IOCTLS_OFFSET + 15, \
    530                             METHOD_BUFFERED,          \
    531                             FILE_ANY_ACCESS)
    532 
    533 
    534 /************************** Security **************************************/
    535 
    536 #define TIWLN_802_11_ADD_WEP CTL_CODE(FILE_DEVICE_UNKNOWN, \
    537                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 1, \
    538                             METHOD_BUFFERED,          \
    539                             FILE_ANY_ACCESS)
    540 
    541 #define TIWLN_802_11_REMOVE_WEP CTL_CODE(FILE_DEVICE_UNKNOWN, \
    542                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 2, \
    543                             METHOD_BUFFERED,          \
    544                             FILE_ANY_ACCESS)
    545 
    546 #define TIWLN_802_11_WEP_STATUS_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    547                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 3, \
    548                             METHOD_BUFFERED,          \
    549                             FILE_ANY_ACCESS)
    550 
    551 #define TIWLN_802_11_WEP_STATUS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    552                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 4, \
    553                             METHOD_BUFFERED,          \
    554                             FILE_ANY_ACCESS)
    555 
    556 #define TIWLN_802_11_PRIVACY_FILTER_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    557                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 5, \
    558                             METHOD_BUFFERED,          \
    559                             FILE_ANY_ACCESS)
    560 
    561 #define TIWLN_802_11_PRIVACY_FILTER_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    562                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 6, \
    563                             METHOD_BUFFERED,          \
    564                             FILE_ANY_ACCESS)
    565 
    566 
    567 #define TIWLN_802_11_ADD_KEY CTL_CODE(FILE_DEVICE_UNKNOWN, \
    568                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 13, \
    569                             METHOD_BUFFERED,          \
    570                             FILE_ANY_ACCESS)
    571 
    572 #define TIWLN_802_11_REMOVE_KEY CTL_CODE(FILE_DEVICE_UNKNOWN, \
    573                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 14, \
    574                             METHOD_BUFFERED,          \
    575                             FILE_ANY_ACCESS)
    576 
    577 #define TIWLN_OPEN_EAPOL_INTERFACE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    578                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 15, \
    579                             METHOD_BUFFERED,          \
    580                             FILE_ANY_ACCESS)
    581 
    582 #define TIWLN_CLOSE_EAPOL_INTERFACE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    583                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 16, \
    584                             METHOD_BUFFERED,          \
    585                             FILE_ANY_ACCESS)
    586 
    587 #define TIWLN_SEND_EAPOL_PACKET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    588                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 17, \
    589                             METHOD_BUFFERED,          \
    590                             FILE_ANY_ACCESS)
    591 
    592 #define TIWLN_802_11_MIXED_MODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN,   \
    593                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 18, \
    594                             METHOD_BUFFERED,          \
    595                             FILE_ANY_ACCESS)
    596 
    597 #define TIWLN_802_11_MIXED_MODE_GET  CTL_CODE(FILE_DEVICE_UNKNOWN,  \
    598                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 19, \
    599                             METHOD_BUFFERED,          \
    600                             FILE_ANY_ACCESS)
    601 
    602 #define TIWLN_802_11_EXC_SECURITY_TYPE_SET  CTL_CODE(FILE_DEVICE_UNKNOWN,   \
    603                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 20, \
    604                             METHOD_BUFFERED,          \
    605                             FILE_ANY_ACCESS)
    606 
    607 #define TIWLN_802_11_EXC_SECURITY_TYPE_GET  CTL_CODE(FILE_DEVICE_UNKNOWN,   \
    608                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 21, \
    609                             METHOD_BUFFERED,          \
    610                             FILE_ANY_ACCESS)
    611 
    612 /* Supplicant use only*/
    613 #define TIWLN_SUPPL_INIT CTL_CODE(FILE_DEVICE_UNKNOWN, \
    614                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 22, \
    615                             METHOD_BUFFERED,          \
    616                             FILE_ANY_ACCESS)
    617 /* Supplicant use only*/
    618 #define TIWLN_SUPPL_TERMINATE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    619                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 23, \
    620                             METHOD_BUFFERED,          \
    621                             FILE_ANY_ACCESS)
    622 /* Supplicant use only*/
    623 #define TIWLN_802_11_PSK_SET         CTL_CODE(FILE_DEVICE_UNKNOWN, \
    624                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 24, \
    625                             METHOD_BUFFERED,          \
    626                             FILE_ANY_ACCESS)
    627 /* Supplicant use only*/
    628 #define TIWLN_802_11_EAP_TYPE_SET      CTL_CODE(FILE_DEVICE_UNKNOWN, \
    629                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 25, \
    630                             METHOD_BUFFERED,          \
    631                             FILE_ANY_ACCESS)
    632 /* Supplicant use only*/
    633 #define TIWLN_802_11_USER_ID_SET        CTL_CODE(FILE_DEVICE_UNKNOWN, \
    634                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 26, \
    635                             METHOD_BUFFERED,          \
    636                             FILE_ANY_ACCESS)
    637 /* Supplicant use only*/
    638 #define TIWLN_802_11_USER_PASSWORD_SET        CTL_CODE(FILE_DEVICE_UNKNOWN, \
    639                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 27, \
    640                             METHOD_BUFFERED,          \
    641                             FILE_ANY_ACCESS)
    642 /* Supplicant use only*/
    643 #define TIWLN_802_11_CERT_PARAMS_SHA1_SET    CTL_CODE(FILE_DEVICE_UNKNOWN, \
    644                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 28, \
    645                             METHOD_BUFFERED,          \
    646                             FILE_ANY_ACCESS)
    647 
    648 #define TIWLN_802_11_EXC_ROGUE_AP_DETECTED    CTL_CODE(FILE_DEVICE_UNKNOWN, \
    649                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 29, \
    650                             METHOD_BUFFERED,          \
    651                             FILE_ANY_ACCESS)
    652 
    653 #define TIWLN_802_11_EXC_REPORT_ROGUE_APS    CTL_CODE(FILE_DEVICE_UNKNOWN, \
    654                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 30, \
    655                             METHOD_BUFFERED,          \
    656                             FILE_ANY_ACCESS)
    657 
    658 #define TIWLN_802_11_EXC_CCKM_REQUEST    CTL_CODE(FILE_DEVICE_UNKNOWN, \
    659                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 31, \
    660                             METHOD_BUFFERED,          \
    661                             FILE_ANY_ACCESS)
    662 
    663 #define TIWLN_802_11_EXC_CCKM_RESULT    CTL_CODE(FILE_DEVICE_UNKNOWN, \
    664                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 32, \
    665                             METHOD_BUFFERED,          \
    666                             FILE_ANY_ACCESS)
    667 
    668 #define TIWLN_802_11_PMKID_GET    CTL_CODE(FILE_DEVICE_UNKNOWN, \
    669                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 33, \
    670                             METHOD_BUFFERED,          \
    671                             FILE_ANY_ACCESS)
    672 /* Supplicant use only*/
    673 #define TIWLN_802_11_KEY_TYPE_SET    CTL_CODE(FILE_DEVICE_UNKNOWN, \
    674                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 34, \
    675                             METHOD_BUFFERED,          \
    676                             FILE_ANY_ACCESS)
    677 
    678 #define TIWLN_802_11_EXC_CONFIGURATION_SET   CTL_CODE(FILE_DEVICE_UNKNOWN, \
    679                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 35, \
    680                             METHOD_BUFFERED,          \
    681                             FILE_ANY_ACCESS)
    682 
    683 #define TIWLN_802_11_EXC_CONFIGURATION_GET   CTL_CODE(FILE_DEVICE_UNKNOWN, \
    684                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 36, \
    685                             METHOD_BUFFERED,          \
    686                             FILE_ANY_ACCESS)
    687 
    688 #define TIWLN_802_11_EXC_NETWORK_EAP_SET   CTL_CODE(FILE_DEVICE_UNKNOWN, \
    689                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 37, \
    690                             METHOD_BUFFERED,          \
    691                             FILE_ANY_ACCESS)
    692 
    693 #define TIWLN_802_11_EXC_NETWORK_EAP_GET   CTL_CODE(FILE_DEVICE_UNKNOWN, \
    694                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 38, \
    695                             METHOD_BUFFERED,          \
    696                             FILE_ANY_ACCESS)
    697 /* Supplicant use only*/
    698 #define TIWLN_802_11_CERT_PARAMS_FILE_NAME_SET   CTL_CODE(FILE_DEVICE_UNKNOWN, \
    699                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 39, \
    700                             METHOD_BUFFERED,          \
    701                             FILE_ANY_ACCESS)
    702 
    703 #define TIWLN_802_11_EXC_AUTH_SUCCESS        CTL_CODE(FILE_DEVICE_UNKNOWN, \
    704                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 40, \
    705                             METHOD_BUFFERED,          \
    706                             FILE_ANY_ACCESS)
    707 
    708 #define TIWLN_802_11_PMKID_SET    CTL_CODE(FILE_DEVICE_UNKNOWN, \
    709                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 41, \
    710                             METHOD_BUFFERED,          \
    711                             FILE_ANY_ACCESS)
    712 
    713 #define TIWLN_802_11_WPA_OPTIONS_GET            CTL_CODE(FILE_DEVICE_UNKNOWN, \
    714                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 42, \
    715                             METHOD_BUFFERED,          \
    716                             FILE_ANY_ACCESS)
    717 
    718 #define TIWLN_802_11_WPA_OPTIONS_SET            CTL_CODE(FILE_DEVICE_UNKNOWN, \
    719                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 43, \
    720                             METHOD_BUFFERED,          \
    721                             FILE_ANY_ACCESS)
    722 
    723 #define TIWLN_802_11_CAPABILITY_GET            CTL_CODE(FILE_DEVICE_UNKNOWN, \
    724                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 44, \
    725                             METHOD_BUFFERED,          \
    726                             FILE_ANY_ACCESS)
    727 
    728 #define TIWLN_802_11_AVAILABLE_OPTIONS_GET            CTL_CODE(FILE_DEVICE_UNKNOWN, \
    729                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 45, \
    730                             METHOD_BUFFERED,          \
    731                             FILE_ANY_ACCESS)
    732 
    733 
    734 #define TIWLN_802_11_EAP_TYPE_GET      CTL_CODE(FILE_DEVICE_UNKNOWN, \
    735                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 46, \
    736                             METHOD_BUFFERED,          \
    737                             FILE_ANY_ACCESS)
    738 
    739 #define TIWLN_802_11_EAP_TYPE_DRIVER_SET      CTL_CODE(FILE_DEVICE_UNKNOWN, \
    740                             SHELLDRV_IOCTL_INDEX + SECURITY_IOCTLS_OFFSET + 47, \
    741                             METHOD_BUFFERED,          \
    742                             FILE_ANY_ACCESS)
    743 
    744 /************************** Misc **************************************/
    745 
    746 #define TIWLN_IOCTL_OID_QUERY_INFORMATION CTL_CODE(FILE_DEVICE_UNKNOWN, \
    747                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 1, \
    748                             METHOD_BUFFERED,          \
    749                             FILE_ANY_ACCESS)
    750 
    751 #define TIWLN_IOCTL_OID_SET_INFORMATION CTL_CODE(FILE_DEVICE_UNKNOWN, \
    752                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 2, \
    753                             METHOD_BUFFERED,          \
    754                             FILE_ANY_ACCESS)
    755 
    756 #define TIWLN_MEDIUMUSAGE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    757                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 3, \
    758                             METHOD_BUFFERED,          \
    759                             FILE_ANY_ACCESS)
    760 
    761 #define TIWLN_802_11_STATISTICS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    762                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 4, \
    763                             METHOD_BUFFERED,          \
    764                             FILE_ANY_ACCESS)
    765 
    766 #define TIWLN_802_11_RELOAD_DEFAULTS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    767                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 5, \
    768                             METHOD_BUFFERED,          \
    769                             FILE_ANY_ACCESS)
    770 
    771 #define TIWLN_DRIVER_STATUS_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    772                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 6, \
    773                             METHOD_BUFFERED,          \
    774                             FILE_ANY_ACCESS)
    775 
    776 #define TIWLN_DRIVER_STATUS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    777                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 7, \
    778                             METHOD_BUFFERED,          \
    779                             FILE_ANY_ACCESS)
    780 
    781 #define TIWLN_HW_READ_REGISTER CTL_CODE(FILE_DEVICE_UNKNOWN, \
    782                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 8, \
    783                             METHOD_BUFFERED,          \
    784                             FILE_ANY_ACCESS)
    785 
    786 #define TIWLN_HW_WRITE_REGISTER CTL_CODE(FILE_DEVICE_UNKNOWN, \
    787                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 9, \
    788                             METHOD_BUFFERED,          \
    789                             FILE_ANY_ACCESS)
    790 
    791 #define TIWLN_HW_RESET_HW CTL_CODE(FILE_DEVICE_UNKNOWN, \
    792                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 10, \
    793                             METHOD_BUFFERED,          \
    794                             FILE_ANY_ACCESS)
    795 
    796 #define TIWLN_802_11_ENABLE_EVENT CTL_CODE(FILE_DEVICE_UNKNOWN, \
    797                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 11, \
    798                             METHOD_BUFFERED,          \
    799                             FILE_ANY_ACCESS)
    800 
    801 #define TIWLN_802_11_DISABLE_EVENT CTL_CODE(FILE_DEVICE_UNKNOWN, \
    802                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 12, \
    803                             METHOD_BUFFERED,          \
    804                             FILE_ANY_ACCESS)
    805 
    806 #define TIWLN_SET_INIT_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, \
    807                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 13, \
    808                             METHOD_BUFFERED,          \
    809                             FILE_ANY_ACCESS)
    810 
    811 #define TIWLN_802_3_CURRENT_ADDRESS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    812                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 14, \
    813                             METHOD_BUFFERED,          \
    814                             FILE_ANY_ACCESS)
    815 
    816 #define TIWLN_APIP_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    817                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 15, \
    818                             METHOD_BUFFERED,          \
    819                             FILE_ANY_ACCESS)
    820 
    821 #define TIWLN_4XACTIVESTATE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    822                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 16, \
    823                             METHOD_BUFFERED,          \
    824                             FILE_ANY_ACCESS)
    825 
    826 #define TIWLN_GET_SW_VERSION CTL_CODE(FILE_DEVICE_UNKNOWN, \
    827                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 17, \
    828                             METHOD_BUFFERED,          \
    829                             FILE_ANY_ACCESS)
    830 
    831 #define TIWLN_GET_EVENT_DATA CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    832                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 18, \
    833                             METHOD_BUFFERED,          \
    834                             FILE_ANY_ACCESS)
    835 
    836 #define TIWLN_DRIVER_SUSPEND CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    837                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 19, \
    838                             METHOD_BUFFERED,          \
    839                             FILE_ANY_ACCESS)
    840 
    841 #define SET_IPC_EVENT_HANDLE CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    842                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 20, \
    843                             METHOD_BUFFERED,          \
    844                             FILE_ANY_ACCESS)
    845 
    846 #define DESTROY_IPC_EVENT_HANDLE CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    847                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 21, \
    848                             METHOD_BUFFERED,          \
    849                             FILE_ANY_ACCESS)
    850 
    851 #define TIWLN_802_11_CONFIG_EVENTS_RSSI     CTL_CODE(FILE_DEVICE_UNKNOWN, \
    852                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 22, \
    853                                        METHOD_BUFFERED,          \
    854                                        FILE_ANY_ACCESS)
    855 
    856 #define TIWLN_802_11_GET_DRIVERS_CAPABILITIES     CTL_CODE(FILE_DEVICE_UNKNOWN, \
    857                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 23, \
    858                                        METHOD_BUFFERED,          \
    859                                        FILE_ANY_ACCESS)
    860 
    861 #define TIWLN_802_11_GET_SELECTED_BSSID_INFO     CTL_CODE(FILE_DEVICE_UNKNOWN, \
    862                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 24, \
    863                                        METHOD_BUFFERED,          \
    864                                        FILE_ANY_ACCESS)
    865 
    866 #define TIWLN_802_11_GET_DRIVER_STATE CTL_CODE(FILE_DEVICE_UNKNOWN, \
    867                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 25, \
    868                                        METHOD_BUFFERED,          \
    869                                        FILE_ANY_ACCESS)
    870 
    871 #define BT_COEXSISTANCE_SET_ENABLE CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    872                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 26, \
    873                             METHOD_BUFFERED,          \
    874                             FILE_ANY_ACCESS)
    875 
    876 #define BT_COEXSISTANCE_SET_RATE   CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    877                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 27, \
    878                             METHOD_BUFFERED,          \
    879                             FILE_ANY_ACCESS)
    880 
    881 #define BT_COEXSISTANCE_SET_CONFIG CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    882                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 28, \
    883                             METHOD_BUFFERED,          \
    884                             FILE_ANY_ACCESS)
    885 
    886 #define BT_COEXSISTANCE_GET_STATUS CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    887                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 29, \
    888                             METHOD_BUFFERED,          \
    889                             FILE_ANY_ACCESS)
    890 
    891 
    892 #define TIWLN_802_11_TX_STATISTICS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    893                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 30, \
    894                             METHOD_BUFFERED,          \
    895                             FILE_ANY_ACCESS)
    896 
    897 #define GWSI_DISPATCH_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    898                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 31, \
    899                             METHOD_BUFFERED,          \
    900                             FILE_ANY_ACCESS)
    901 
    902 #define GWSI_GET_INIT_TABLE_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    903                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 32, \
    904                             METHOD_BUFFERED,          \
    905                             FILE_ANY_ACCESS)
    906 
    907 #define GWSI_INITIALIZE_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    908                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 33, \
    909                             METHOD_BUFFERED,          \
    910                             FILE_ANY_ACCESS)
    911 
    912 #define GWSI_CONFIGURE_TABLE_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    913                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 34, \
    914                             METHOD_BUFFERED,          \
    915                             FILE_ANY_ACCESS)
    916 
    917 #define GWSI_RELEASE_COMMAND CTL_CODE(FILE_DEVICE_UNKNOWN,    \
    918                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 36, \
    919                             METHOD_BUFFERED,          \
    920                             FILE_ANY_ACCESS)
    921 
    922 #define GWSI_DISPATCH_GET_CMD_LEN(_p_cmd)   (*((tiUINT16 *)_p_cmd + 1))
    923 
    924 #define TIWLN_802_11_SET_TRAFFIC_INTENSITY_THRESHOLDS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    925                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 37, \
    926                             METHOD_BUFFERED,          \
    927                             FILE_ANY_ACCESS)
    928 
    929 #define TIWLN_802_11_GET_TRAFFIC_INTENSITY_THRESHOLDS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    930                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 38, \
    931                             METHOD_BUFFERED,          \
    932                             FILE_ANY_ACCESS)
    933 
    934 #define TIWLN_802_11_TOGGLE_TRAFFIC_INTENSITY_EVENTS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    935                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 39, \
    936                             METHOD_BUFFERED,          \
    937                             FILE_ANY_ACCESS)
    938 
    939 #define TIWLN_802_11_GET_PRIMARY_BSSID_INFO CTL_CODE(FILE_DEVICE_UNKNOWN, \
    940                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 40, \
    941                             METHOD_BUFFERED,          \
    942                             FILE_ANY_ACCESS)
    943 
    944 #define TIWLN_EARLY_WAKEUP_IE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    945                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 41, \
    946                             METHOD_BUFFERED,          \
    947                             FILE_ANY_ACCESS)
    948 
    949 #define TIWLN_EARLY_WAKEUP_IE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
    950                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 42, \
    951                             METHOD_BUFFERED,          \
    952                             FILE_ANY_ACCESS)
    953 
    954 #define TIWLN_ENABLE_DISABLE_RX_DATA_FILTERS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    955                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 43, \
    956                             METHOD_BUFFERED,          \
    957                             FILE_ANY_ACCESS)
    958 
    959 #define TIWLN_ADD_RX_DATA_FILTER CTL_CODE(FILE_DEVICE_UNKNOWN, \
    960                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 44, \
    961                             METHOD_BUFFERED,          \
    962                             FILE_ANY_ACCESS)
    963 
    964 #define TIWLN_REMOVE_RX_DATA_FILTER CTL_CODE(FILE_DEVICE_UNKNOWN, \
    965                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 45, \
    966                             METHOD_BUFFERED,          \
    967                             FILE_ANY_ACCESS)
    968 
    969 #define TIWLN_GET_RX_DATA_FILTERS_STATISTICS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    970                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 46, \
    971                             METHOD_BUFFERED,          \
    972                             FILE_ANY_ACCESS)
    973 
    974 #define TIWLN_GET_POWER_CONSUMPTION_STATISTICS CTL_CODE(FILE_DEVICE_UNKNOWN, \
    975                             SHELLDRV_IOCTL_INDEX + MISC_IOCTLS_OFFSET + 47, \
    976                             METHOD_BUFFERED,          \
    977                             FILE_ANY_ACCESS)
    978 
    979 
    980 /************************** Debug **************************************/
    981 
    982 #ifdef TI_DBG
    983 
    984 
    985 #define TIWLN_GET_DBG_BUFFER CTL_CODE(FILE_DEVICE_UNKNOWN,   \
    986                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 2, \
    987                             METHOD_BUFFERED,          \
    988                             FILE_ANY_ACCESS)
    989 
    990 #define TIWLN_SET_MODULE CTL_CODE(FILE_DEVICE_UNKNOWN,  \
    991                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 3, \
    992                             METHOD_BUFFERED,          \
    993                             FILE_ANY_ACCESS)
    994 
    995 #define TIWLN_GET_MODULE CTL_CODE(FILE_DEVICE_UNKNOWN,  \
    996                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 4, \
    997                             METHOD_BUFFERED,          \
    998                             FILE_ANY_ACCESS)
    999 
   1000 #define TIWLN_SET_DEBUG_FLAG CTL_CODE(FILE_DEVICE_UNKNOWN,  \
   1001                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 5, \
   1002                             METHOD_BUFFERED,          \
   1003                             FILE_ANY_ACCESS)
   1004 
   1005 #define TIWLN_GET_DEBUG_FLAG CTL_CODE(FILE_DEVICE_UNKNOWN,  \
   1006                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 6, \
   1007                             METHOD_BUFFERED,          \
   1008                             FILE_ANY_ACCESS)
   1009 
   1010 #define TIWLN_DISPLAY_STATS CTL_CODE(FILE_DEVICE_UNKNOWN,   \
   1011                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 7, \
   1012                             METHOD_BUFFERED,          \
   1013                             FILE_ANY_ACCESS)
   1014 
   1015 #define TIWLN_SET_SEVERITY CTL_CODE(FILE_DEVICE_UNKNOWN,    \
   1016                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 8, \
   1017                             METHOD_BUFFERED,          \
   1018                             FILE_ANY_ACCESS)
   1019 
   1020 #define TIWLN_GET_SEVERITY CTL_CODE(FILE_DEVICE_UNKNOWN,    \
   1021                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 9, \
   1022                             METHOD_BUFFERED,          \
   1023                             FILE_ANY_ACCESS)
   1024 
   1025 #define TIWLN_REPORT_MODULE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1026                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 10, \
   1027                             METHOD_BUFFERED,          \
   1028                             FILE_ANY_ACCESS)
   1029 
   1030 #define TIWLN_REPORT_MODULE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1031                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 11, \
   1032                             METHOD_BUFFERED,          \
   1033                             FILE_ANY_ACCESS)
   1034 
   1035 #define TIWLN_REPORT_SEVERITY_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1036                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 12, \
   1037                             METHOD_BUFFERED,          \
   1038                             FILE_ANY_ACCESS)
   1039 
   1040 #define TIWLN_REPORT_SEVERITY_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1041                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 13, \
   1042                             METHOD_BUFFERED,          \
   1043                             FILE_ANY_ACCESS)
   1044 #define TIWLN_DRIVER_DEBUG_PRINT CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1045                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 14, \
   1046                             METHOD_BUFFERED,          \
   1047                             FILE_ANY_ACCESS)
   1048 
   1049 #define TIWLN_REPORT_PPMODE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1050                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 15, \
   1051                             METHOD_BUFFERED,          \
   1052                             FILE_ANY_ACCESS)
   1053 
   1054 #define TIWLN_OS_DBG_STATE_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1055                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 16, \
   1056                             METHOD_BUFFERED,          \
   1057                             FILE_ANY_ACCESS)
   1058 
   1059 #define TIWLN_OS_DBG_STATE_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1060                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 17, \
   1061                             METHOD_BUFFERED,          \
   1062                             FILE_ANY_ACCESS)
   1063 
   1064 #ifdef DRIVER_PROFILING
   1065 
   1066 #define TIWLAN_PROFILING_REPORT CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1067                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 18, \
   1068                             METHOD_BUFFERED,          \
   1069                             FILE_ANY_ACCESS)
   1070 
   1071 #define TIWLAN_PROFILING_CPU_ESTIMATOR_CMD CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1072                             SHELLDRV_IOCTL_INDEX + DEBUG_IOCTLS_OFFSET + 19, \
   1073                             METHOD_BUFFERED,          \
   1074                             FILE_ANY_ACCESS)
   1075 
   1076 #define TIWLAN_PROFILING_CPU_ESTIMATOR_CMD_START    0x01
   1077 #define TIWLAN_PROFILING_CPU_ESTIMATOR_CMD_STOP     0x02
   1078 #define TIWLAN_PROFILING_CPU_ESTIMATOR_CMD_RESET    0x03
   1079 
   1080 #endif /* DRIVER_PROFILING */
   1081 
   1082 #endif  /* TI_DBG*/
   1083 
   1084 
   1085 /************************************** Scan ********************************************/
   1086 
   1087 #define TIWLN_802_11_START_APP_SCAN_SET     CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1088                             SHELLDRV_IOCTL_INDEX + SCAN_IOCTLS_OFFSET + 1,\
   1089                             METHOD_BUFFERED,                              \
   1090                             FILE_ANY_ACCESS)
   1091 
   1092 #define TIWLN_802_11_STOP_APP_SCAN_SET     CTL_CODE(FILE_DEVICE_UNKNOWN,  \
   1093                             SHELLDRV_IOCTL_INDEX + SCAN_IOCTLS_OFFSET + 2,\
   1094                             METHOD_BUFFERED,                              \
   1095                             FILE_ANY_ACCESS)
   1096 
   1097 #define TIWLN_802_11_SCAN_POLICY_PARAM_SET  CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1098                             SHELLDRV_IOCTL_INDEX + SCAN_IOCTLS_OFFSET + 3,\
   1099                             METHOD_BUFFERED,                              \
   1100                             FILE_ANY_ACCESS)
   1101 
   1102 #define TIWLN_802_11_SCAN_BSS_LIST_GET      CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1103                             SHELLDRV_IOCTL_INDEX + SCAN_IOCTLS_OFFSET + 4,\
   1104                             METHOD_BUFFERED,                              \
   1105                             FILE_ANY_ACCESS)
   1106 
   1107 /*************************************** Voice & QOS ********************************************/
   1108 
   1109 #define TIWLN_802_11_SET_QOS_PARAMS     CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1110                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 2, \
   1111                                         METHOD_BUFFERED,          \
   1112                                         FILE_ANY_ACCESS)
   1113 
   1114 #define TIWLN_802_11_POLL_AP_PACKETS   CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1115                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 3, \
   1116                                        METHOD_BUFFERED,          \
   1117                                        FILE_ANY_ACCESS)
   1118 
   1119 #define TIWLN_802_11_CONFIG_TX_CLASS   CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1120                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 4, \
   1121                                        METHOD_BUFFERED,          \
   1122                                        FILE_ANY_ACCESS)
   1123 
   1124 #define TIWLN_802_11_REMOVE_CLSFR_ENTRY   CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1125                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 5, \
   1126                                        METHOD_BUFFERED,          \
   1127                                        FILE_ANY_ACCESS)
   1128 
   1129 #define TIWLN_802_11_GET_CLSFR_TYPE CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1130                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 6, \
   1131                                        METHOD_BUFFERED,          \
   1132                                        FILE_ANY_ACCESS)
   1133 
   1134 #define TIWLN_802_11_GET_AP_QOS_PARAMS CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1135                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 7, \
   1136                                        METHOD_BUFFERED,          \
   1137                                        FILE_ANY_ACCESS)
   1138 
   1139 #define TIWLN_802_11_GET_AP_QOS_CAPABILITIES CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1140                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 8, \
   1141                                        METHOD_BUFFERED,          \
   1142                                        FILE_ANY_ACCESS)
   1143 
   1144 #define TIWLN_802_11_ADD_TSPEC CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1145                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 9, \
   1146                                        METHOD_BUFFERED,          \
   1147                                        FILE_ANY_ACCESS)
   1148 
   1149 #define TIWLN_802_11_GET_TSPEC_PARAMS CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1150                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 10, \
   1151                                        METHOD_BUFFERED,          \
   1152                                        FILE_ANY_ACCESS)
   1153 
   1154 #define TIWLN_802_11_DELETE_TSPEC CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1155                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 11, \
   1156                             METHOD_BUFFERED,          \
   1157                             FILE_ANY_ACCESS)
   1158 
   1159 #define TIWLN_802_11_GET_CURRENT_AC_STATUS CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1160                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 12, \
   1161                             METHOD_BUFFERED,          \
   1162                             FILE_ANY_ACCESS)
   1163 
   1164 #define TIWLN_802_11_SET_MEDIUM_USAGE_THRESHOLD CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1165                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 13, \
   1166                             METHOD_BUFFERED,          \
   1167                             FILE_ANY_ACCESS)
   1168 
   1169 #define TIWLN_802_11_SET_PHY_RATE_THRESHOLD CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1170                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 14, \
   1171                             METHOD_BUFFERED,          \
   1172                             FILE_ANY_ACCESS)
   1173 
   1174 #define TIWLN_802_11_GET_MEDIUM_USAGE_THRESHOLD CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1175                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 15, \
   1176                             METHOD_BUFFERED,          \
   1177                             FILE_ANY_ACCESS)
   1178 
   1179 #define TIWLN_802_11_GET_PHY_RATE_THRESHOLD CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1180                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 16, \
   1181                             METHOD_BUFFERED,          \
   1182                             FILE_ANY_ACCESS)
   1183 
   1184 
   1185 #define TIWLN_802_11_GET_USER_PRIORITY_OF_STREAM CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1186                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 17, \
   1187                             METHOD_BUFFERED,          \
   1188                             FILE_ANY_ACCESS)
   1189 
   1190 #define TIWLN_802_11_POLL_AP_PACKETS_FROM_AC   CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1191                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 18, \
   1192                                        METHOD_BUFFERED,          \
   1193                                        FILE_ANY_ACCESS)
   1194 
   1195 #define TIWLN_802_11_GET_DESIRED_PS_MODE CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1196                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 19, \
   1197                             METHOD_BUFFERED,          \
   1198                             FILE_ANY_ACCESS)
   1199 
   1200 #define TIWLN_802_11_SET_RX_TIMEOUT     CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1201                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 20, \
   1202                                         METHOD_BUFFERED,          \
   1203                                         FILE_ANY_ACCESS)
   1204 
   1205 #define TIWLN_802_11_SET_DTAG_TO_AC_MAPPING_TABLE     CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1206                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 21, \
   1207                                         METHOD_BUFFERED,          \
   1208                                         FILE_ANY_ACCESS)
   1209 
   1210 #define TIWLN_802_11_SET_VAD     CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1211                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 22, \
   1212                                         METHOD_BUFFERED,          \
   1213                                         FILE_ANY_ACCESS)
   1214 
   1215 #define TIWLN_802_11_GET_VAD     CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1216                             SHELLDRV_IOCTL_INDEX + VOICE_QOS_IOCTLS_OFFSET + 23, \
   1217                                         METHOD_BUFFERED,          \
   1218                                         FILE_ANY_ACCESS)
   1219 
   1220 /*****************************************************************************************************/
   1221 /***  Roaming Manager Configuration Parameters  ***/
   1222 
   1223 #define TIWLN_802_11_ROAMING_CONFIG_PARAMS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1224                             SHELLDRV_IOCTL_INDEX + ROAMING_IOCTLS_OFFSET + 1, \
   1225                                        METHOD_BUFFERED,          \
   1226                                        FILE_ANY_ACCESS)
   1227 
   1228 #define TIWLN_802_11_ROAMING_CONFIG_PARAMS_GET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1229                             SHELLDRV_IOCTL_INDEX + ROAMING_IOCTLS_OFFSET + 2, \
   1230                                        METHOD_BUFFERED,          \
   1231                                        FILE_ANY_ACCESS)
   1232 
   1233 
   1234 /*****************************************************************************************************/
   1235 /***  measurement Manager Configuration Parameters  ***/
   1236 
   1237 #define TIWLN_802_11_MEASUREMENT_ENABLE_DISABLE_PARAMS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1238                             SHELLDRV_IOCTL_INDEX + MEASUREMENT_IOCTLS_OFFSET + 1, \
   1239                                        METHOD_BUFFERED,          \
   1240                                        FILE_ANY_ACCESS)
   1241 
   1242 
   1243 #define TIWLN_802_11_MEASUREMENT_MAX_DURATION_PARAMS_SET CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1244                             SHELLDRV_IOCTL_INDEX + MEASUREMENT_IOCTLS_OFFSET + 2, \
   1245                                        METHOD_BUFFERED,          \
   1246                                        FILE_ANY_ACCESS)
   1247 
   1248 
   1249 
   1250 
   1251 
   1252 /*************************************** PLT ********************************************/
   1253 
   1254 #define TIWLN_PLT_WRITE_REGISTER CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1255                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 1, \
   1256                                        METHOD_BUFFERED,          \
   1257                                        FILE_ANY_ACCESS)
   1258 
   1259 #define TIWLN_PLT_READ_REGISTER CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1260                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 2, \
   1261                                        METHOD_BUFFERED,          \
   1262                                        FILE_ANY_ACCESS)
   1263 
   1264 #define TIWLN_PLT_RX_PER_START CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1265                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 3, \
   1266                                        METHOD_BUFFERED,          \
   1267                                        FILE_ANY_ACCESS)
   1268 
   1269 #define TIWLN_PLT_RX_PER_STOP CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1270                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 4, \
   1271                                        METHOD_BUFFERED,          \
   1272                                        FILE_ANY_ACCESS)
   1273 
   1274 #define TIWLN_PLT_RX_PER_CLEAR CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1275                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 5, \
   1276                                        METHOD_BUFFERED,          \
   1277                                        FILE_ANY_ACCESS)
   1278 
   1279 #define TIWLN_PLT_RX_PER_GET_RESULTS CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1280                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 6, \
   1281                                        METHOD_BUFFERED,          \
   1282                                        FILE_ANY_ACCESS)
   1283 
   1284 #define TIWLN_PLT_TX_CW CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1285                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 7, \
   1286                                        METHOD_BUFFERED,          \
   1287                                        FILE_ANY_ACCESS)
   1288 
   1289 #define TIWLN_PLT_TX_CONTINUES CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1290                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 8, \
   1291                                        METHOD_BUFFERED,          \
   1292                                        FILE_ANY_ACCESS)
   1293 
   1294 #define TIWLN_PLT_TX_STOP CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1295                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 9, \
   1296                                        METHOD_BUFFERED,          \
   1297                                        FILE_ANY_ACCESS)
   1298 
   1299 #define TIWLN_PLT_MIB_WRITE CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1300                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 10, \
   1301                                        METHOD_BUFFERED,          \
   1302                                        FILE_ANY_ACCESS)
   1303 
   1304 #define TIWLN_PLT_MIB_READ CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1305                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 11, \
   1306                                        METHOD_BUFFERED,          \
   1307                                        FILE_ANY_ACCESS)
   1308 
   1309 #define TIWLN_PLT_RX_TX_CAL CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1310                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 12, \
   1311                                        METHOD_BUFFERED,          \
   1312                                        FILE_ANY_ACCESS)
   1313 
   1314 #define TIWLN_PLT_RX_CAL CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1315                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 13, \
   1316                                        METHOD_BUFFERED,          \
   1317                                        FILE_ANY_ACCESS)
   1318 
   1319 #define TIWLN_PLT_RX_CAL_RESULT CTL_CODE(FILE_DEVICE_UNKNOWN, \
   1320                             SHELLDRV_IOCTL_INDEX + PLT_IOCTLS_OFFSET + 14, \
   1321                                        METHOD_BUFFERED,          \
   1322                                        FILE_ANY_ACCESS)
   1323 
   1324 #ifdef _WINDOWS
   1325 #endif /* ifdef _WINDOWS */
   1326 
   1327 #endif
   1328 
   1329 
   1330 
   1331 
   1332