📄 i2220mgmt.h
字号:
/*-----------------2002/10/1 10:33------------------ * this wlan box will be an AP * --------------------------------------------------*/ ap_info_t ap; SduQueue_t bcQ; UINT8 sta_sleeping; /* number of STAs in sleeping */ UINT8 sta_nonERP; /* number of NonERP STAs */ UINT8 sta_LngPreamble;/* number of only long preamble STAs */ UINT8 sta_LngSlotTime;/* number of only long slot time STAs */ UINT8 bss_nonERP; /* number of neighbor nonERP BSS */ UINT8 curChannel; /* real current channel including scanning */ UINT8 chnl_min; /* minimum available channel # */ UINT8 chnl_max; /* maximum available channel # */ UINT8 protectMode; /* 0: auto, 1: always, 2: none */ UINT8 preambleMode; /* 0:auto, 1:long, 2:short */ UINT8 x_hide_ssid; /* hide SSID: 0 disable, others enable */ UINT8 x_CfbBurst; /* burst mode: 0 disable, others enable */ int cfbCount; /* avoid blocking medium when too many packets */ mgmt_timer_t scan_timer; /* scan interval of each channel */ chnl_info_t *chnl_info_p; /* scan results for each channel */ UINT32 rekey_eol; /* for a gaurd time to avoid rx */ /* micFailure when rekey */#if SUPPORT_ED_ADJUST /* adaptive for adjacent channel interference */ int state_noise; /* 0: low noise, 1: high noise */ UINT8 initAGC_OPMODE; UINT16 cur_EDThreshold; UINT32 hysteresisCount; UINT32 rxRfbRxOkCounter; int tbttCount; /* The following variables for new ED mechanism */ INT16 ED_adjust_dir; INT16 ED_target_offset; int previous_fa_count_ed; UINT8 ED_ThresholdForceDown_flag; UINT8 ED_floatLevel;#endif INT32 currentRssi; int do_checkHang; BOOLEAN chk_txTimout; /* TRUE: tx_timeout timer is enabled */ mgmt_timer_t tx_timer; /* tx timeout to reset MAC */ UINT32 timeTick; /* in unit of SDL_TIMER_INTERVAL */ int macResetCount; /* for debug, how many times to reset MAC/BB */ int macResetBcnCount; int macResetUFIFOCount; int macResetAbnormalCount; int macResetRxEmpty; UINT8 rftest_burst; /* rftest send burst packets */ UINT8 stop_accept_station; /* TRUE: disable AP function */ UINT8 param_keyid_index; /* just for configuration */#if SUPPORT_MSSID UINT8 param_ssid_index; /* just for configuration to indicate which ssid*/#endif UINT8 rxQ_empty; /* true: rxQ is empty */ UINT8 relay_mode; /* refer to param_relayMode_t*/ /* The current WEP statistics for the 802.11 interface to be queried */// wep_counters_t current80211WepStatistics;// UINT rxRfbRxWepKeyDisabledErrCounter;// UINT rxRfbRxWepIcvErrCounter;// UINT rxRfbRxTkipKeyDisabledErrCounter;// UINT rxRfbRxTkipIcvErrCounter;// UINT rxRfbRxCcmpKeyDisabledErrCounter;// UINT rxRfbRxCcmpIcvErrCounter; UINT8 authMode; /* Current auth mode */ UCHAR BCcipherSuite; UCHAR DefaultKeyID; ULONG seed; UCHAR directPskValue; UINT8 rsnBlockingTraffic; /* If the sta have 2 MIC error within 60 sec */ UCHAR TSC[6]; /* 48-bit counter, for 802.11i Draft 2.3 */ eWPA_t wpaIE_p[1];#if SUPPORT_TKIP & SUPPORT_SW_TKIP_MIC USHORT HWMICthreshold;#endif#if SUPPORT_IPNRSN kal_net_device_t *dev_1x; /* ptr to linux 1x netdevice */ /* TKIP sequence counter, TSC */ mgmt_timer_t sm_timer; UINT32 MIC_block_timer;/* The AP can't accept any associate in 60 sec, timer*/ BOOLEAN WPA_PSK; /* The AP use PSK or 1X, WPA_PSK = 0 for 1x, 1 for PSK */ UCHAR Counter[8]; /* The replay Counter for WPA */ UINT GNoStations; /* The counter record how many sta connect with wpa */ UCHAR GNonce[32]; UCHAR GMK[32]; UCHAR GTK[64]; INT GKRekeyTimer; INT GroupKeyUpdateTimer; BOOLEAN GroupKeyUpdate;#endif nic_op_mode_t iw_mode; /* operating mode (IW_MODE_*) */#if WLAN_INCLUDE_WDS /* WDS Links information */ wdslink_info_t *wds; int wds_connections; /* Used to set maxum tx failure allowance for remote AP. */ int wds_tx_failure_limit; int wds_disable_limit;#endif beacon_frame_t beacon; /* Beacon content */#if SUPPORT_LOOPBACK struct { unsigned char enable; unsigned char times; unsigned short length; unsigned char value; } loop;#endif};/************************************************************************* M A C R O S**************************************************************************/ /******************************************************************* * Generator for Queue sorts *******************************************************************//* The Queue generator is derived from the String0 generator *//* to create Queues of any sort. Queues operators are: *//* Qfirst(queue,item) adds item as the first queue element *//* Qlast(queue,item) adds item as the last queue element *//* and the String0 operators Length, //, First, Last, Head, Tail *//* Because operators can only return a single value, removing an *//* element from a queue is a 2-step process: *//* dequeue first: item:=First(queue); queue:=Tail(queue); *//* dequeue last: item:=Last(queue); queue:=Head(queue); */#define linuxQ_peek_item(q,list_dir,item) peek_chain_member(q,FragSdu_t,list_dir,item)#define linuxQ_dequeue_item(q,list_dir,item) get_chain_member(q,FragSdu_t,list_dir,item)#define linuxQ_add_item(q,item,list_action) add_chain_member(q,FragSdu_t,item,list_action)#define sdlQ_Length(q) /* Queue -> Integer; number of items on queue */ \ (q)->num_elem#define sdlQ_First(q,item) /* Queue-> Item; first item on queue */ \ linuxQ_peek_item(q,next,item)#define sdlQ_Last(q,item) /* Queue -> Item; last item on queue */ \ linuxQ_peek_item(q,prev,item)#define sdlQ_emptyQ(q) init_chain_list(q)#define sdlQ_Qfirst(q,item) /* Queue,Item -> Queue; add item as first on queue */ \ linuxQ_add_item(q,item,list_add)#define sdlQ_Qlast(q,item) do { /* Queue,Item -> Queue; add item as last on queue */ \ KDBG_LOG_SDL(KDBG_DEBUG,"item[0x%08lx] queue to %s[%d]\n", \ (unsigned long)item, #q, sdlQ_Length(q)); \ linuxQ_add_item(q,item,list_add_tail); \} while (0)#define sdlQ_dequeue_first(q,item) /* item:=First(queue); queue:=Tail(queue); */ do { \ linuxQ_dequeue_item(q,next,item); \ KDBG_LOG_SDL(KDBG_DEBUG,"item[0x%08lx] removed from queue %s[%d]\n", \ (unsigned long)item, #q, sdlQ_Length(q)); \} while (0)#define sdlQ_dequeue_last(q,item) /* item:=Last(queue); queue:=Head(queue); */ do { \ linuxQ_dequue_item(q,prev,item); \ KDBG_LOG_SDL(KDBG_DEBUG,"item[0x%08lx] removed from queue %s[%d]\n", \ (unsigned long)item, #q, sdlQ_Length(q)); \} while (0)#define sdlQ_Qfirst_limit(q,item,limit) do { \ FragSdu_t *age_fsdu; \ if (sdlQ_Length(q) >= limit) { \ /* throw off the last one */ \ sdlQ_dequeue_last(q, age_fsdu); \ sdlu_release_fsdu(age_fsdu); \ } \ sdlQ_Qfirst(q,item); \} while (0)/* Hold old packets to avoid order problem 4/15/2004. * If the first packet is throw off, the following packets * will be meaningless?? */#if 0#define sdlQ_Qlast_limit(q,item,limit) do { \ FragSdu_t *age_fsdu; \ if (sdlQ_Length(q) >= limit) { \ /* throw off the first one */ \ sdlQ_dequeue_first(q, age_fsdu); \ sdlu_release_fsdu(age_fsdu); \ } \ sdlQ_Qlast(q,item); \} while (0)#else#define sdlQ_Qlast_limit(q,item,limit) do { \ if (sdlQ_Length(q) >= limit) { \ /* throw off the new one */ \ sdlu_release_fsdu(item); \ break; \ } \ sdlQ_Qlast(q,item); \} while (0)#endif#define sdlQ_dequeue(q,item) del_chain_member(q,FragSdu_t,item)#define sdlQ_rm_in_loop(q,lst) rm_chain_member_in_loop(q,FragSdu_t,lst)#define sdlQ_empty(q) (chain_num_elem(q) == 0)#define sdlQ_Tail(q) /* Queue -> Queue; all but first item on queue */#define sdlQ_Head(q) /* Queue -> Queue; all but last item on queue */#define sdlQ_cat(q1,q2) /* Queue, Queue -> Queue; "//" concatenation */#define sdlQ_Extract(q,i) /* Queue,Integer -> Item; copy item from queue */#define sdlQ_Modify(q,i,item) /* Queue,Integer,Item -> Queue; modify item in queue */#define sdlQ_SubQ(q,i,j) /* Queue,Integer,Integer -> Queue; SubQ(q,i,j) queue of length j starting from queue(i) */#define waitQ_toTDMAChannel(q,item,tdmaChannel) \ while (sdlQ_Length(q) != 0) { \ sdlQ_First(q, item); \ if (check_timeout(item->eol)) { \ sdlQ_dequeue(q, item); \ sdlu_release_fsdu(item); \ continue; \ } \ if (!tx_check_TDMA(&priv_p->tfcb_chain, item->fTot, item->fTot)) { \ break; \ } \ sdlQ_dequeue(q, item); \ sdlu_tx_FragSdu(priv_p, item, tdmaChannel, FALSE); \ }#if SUPPORT_TKIP#define waitQ_toTDMA_SecChannel(q,item,tdmaChannel) \ while (sdlQ_Length(q) != 0) { \ sdlQ_First(q, item); \ if (check_timeout(item->eol)) { \ sdlQ_dequeue(q, item); \ sdlu_release_fsdu(item); \ continue; \ } \ if (!tx_check_TDMA(&priv_p->sec_tfcb_chain, 1, \ TKIP_HW_MIC_TBB_NUM_PER_TFCB)) { \ break; \ } \ sdlQ_dequeue(q, item); \ tkipHwGenMic(priv_p, item, tdmaChannel, FALSE); \ }#endif/************************************************************************* F U N C T I O N D E C L A R A T I O N S**************************************************************************//************************************************************************* I N L I N E F U N C T I O N D E F I N I T I O N S**************************************************************************/#endif /* _IPN2220MGMT_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -