/*
*************************************************************************
* Ralink Tech Inc.
* 5F., No.36, Taiyuan St., Jhubei City,
* Hsinchu County 302,
* Taiwan, R.O.C.
*
* (c) Copyright 2002-2007, Ralink Technology, Inc.
*
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* 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., *
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
* *
*************************************************************************
Module Name:
mlme.h
Abstract:
Miniport generic portion header file
Revision History:
Who When What
-------- ---------- ----------------------------------------------
John Chang 2003-08-28 Created
John Chang 2004-09-06 modified for RT2600
*/
#ifndef __MLME_H__
#define __MLME_H__
#include "rtmp_dot11.h"
#ifdef CONFIG_STA_SUPPORT
#endif // CONFIG_STA_SUPPORT //
// maximum supported capability information -
// ESS, IBSS, Privacy, Short Preamble, Spectrum mgmt, Short Slot
#define SUPPORTED_CAPABILITY_INFO 0x0533
#define END_OF_ARGS -1
#define LFSR_MASK 0x80000057
#define MLME_TASK_EXEC_INTV 100/*200*/ //
#define LEAD_TIME 5
#define MLME_TASK_EXEC_MULTIPLE 10 /*5*/ // MLME_TASK_EXEC_MULTIPLE * MLME_TASK_EXEC_INTV = 1 sec
#define REORDER_EXEC_INTV 100 // 0.1 sec
//#define TBTT_PRELOAD_TIME 384 // usec. LomgPreamble + 24-byte at 1Mbps
// The definition of Radar detection duration region
#define CE 0
#define FCC 1
#define JAP 2
#define JAP_W53 3
#define JAP_W56 4
#define MAX_RD_REGION 5
#define BEACON_LOST_TIME 4 * OS_HZ // 2048 msec = 2 sec
#define DLS_TIMEOUT 1200 // unit: msec
#define AUTH_TIMEOUT 300 // unit: msec
#define ASSOC_TIMEOUT 300 // unit: msec
#define JOIN_TIMEOUT 2000 // unit: msec
#define SHORT_CHANNEL_TIME 90 // unit: msec
#define MIN_CHANNEL_TIME 110 // unit: msec, for dual band scan
#define MAX_CHANNEL_TIME 140 // unit: msec, for single band scan
#define FAST_ACTIVE_SCAN_TIME 30 // Active scan waiting for probe response time
#define CW_MIN_IN_BITS 4 // actual CwMin = 2^CW_MIN_IN_BITS - 1
#define LINK_DOWN_TIMEOUT 20000 // unit: msec
#define AUTO_WAKEUP_TIMEOUT 70 //unit: msec
#ifdef CONFIG_STA_SUPPORT
#define CW_MAX_IN_BITS 10 // actual CwMax = 2^CW_MAX_IN_BITS - 1
#endif // CONFIG_STA_SUPPORT //
#ifdef CONFIG_APSTA_MIXED_SUPPORT
extern UINT32 CW_MAX_IN_BITS;
#endif // CONFIG_APSTA_MIXED_SUPPORT //
// Note: RSSI_TO_DBM_OFFSET has been changed to variable for new RF (2004-0720).
// SHould not refer to this constant anymore
//#define RSSI_TO_DBM_OFFSET 120 // for RT2530 RSSI-115 = dBm
#define RSSI_FOR_MID_TX_POWER -55 // -55 db is considered mid-distance
#define RSSI_FOR_LOW_TX_POWER -45 // -45 db is considered very short distance and
// eligible to use a lower TX power
#define RSSI_FOR_LOWEST_TX_POWER -30
//#define MID_TX_POWER_DELTA 0 // 0 db from full TX power upon mid-distance to AP
#define LOW_TX_POWER_DELTA 6 // -3 db from full TX power upon very short distance. 1 grade is 0.5 db
#define LOWEST_TX_POWER_DELTA 16 // -8 db from full TX power upon shortest distance. 1 grade is 0.5 db
#define RSSI_TRIGGERED_UPON_BELOW_THRESHOLD 0
#define RSSI_TRIGGERED_UPON_EXCCEED_THRESHOLD 1
#define RSSI_THRESHOLD_FOR_ROAMING 25
#define RSSI_DELTA 5
// Channel Quality Indication
#define CQI_IS_GOOD(cqi) ((cqi) >= 50)
//#define CQI_IS_FAIR(cqi) (((cqi) >= 20) && ((cqi) < 50))
#define CQI_IS_POOR(cqi) (cqi < 50) //(((cqi) >= 5) && ((cqi) < 20))
#define CQI_IS_BAD(cqi) (cqi < 5)
#define CQI_IS_DEAD(cqi) (cqi == 0)
// weighting factor to calculate Channel quality, total should be 100%
#define RSSI_WEIGHTING 50
#define TX_WEIGHTING 30
#define RX_WEIGHTING 20
//#define PEER_KEY_NOT_USED 0
//#define PEER_KEY_64_BIT 64
//#define PEER_KEY_128_BIT 128
//#define PEER_KEY_64BIT_LEN 8
//#define PEER_KEY_128BIT_LEN 16
#define BSS_NOT_FOUND 0xFFFFFFFF
#ifdef CONFIG_STA_SUPPORT
#define MAX_LEN_OF_MLME_QUEUE 40 //10
#endif // CONFIG_STA_SUPPORT //
#define SCAN_PASSIVE 18 // scan with no probe request, only wait beacon and probe response
#define SCAN_ACTIVE 19 // scan with probe request, and wait beacon and probe response
#define SCAN_CISCO_PASSIVE 20 // Single channel passive scan
#define SCAN_CISCO_ACTIVE 21 // Single channel active scan
#define SCAN_CISCO_NOISE 22 // Single channel passive scan for noise histogram collection
#define SCAN_CISCO_CHANNEL_LOAD 23 // Single channel passive scan for channel load collection
#define FAST_SCAN_ACTIVE 24 // scan with probe request, and wait beacon and probe response
#ifdef DOT11N_DRAFT3
#define SCAN_2040_BSS_COEXIST 26
#endif // DOT11N_DRAFT3 //
//#define BSS_TABLE_EMPTY(x)