2 *************************************************************************
4 * 5F., No.36, Taiyuan St., Jhubei City,
8 * (c) Copyright 2002-2007, Ralink Technology, Inc.
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
25 *************************************************************************
31 Miniport generic portion header file
35 -------- ---------- ----------------------------------------------
36 Fonchi 02-13-2007 created
42 #define WDS_ENTRY_RETRY_INTERVAL (100 * OS_HZ / 1000)
45 static inline BOOLEAN WDS_IF_UP_CHECK(
49 if ((pAd->flg_wds_init != TRUE) ||
50 (ifidx >= MAX_WDS_ENTRY))
53 // if (pAd->WdsTab.WdsEntry[ifidx].dev->flags & IFF_UP)
54 // Patch for wds ,when dirver call apmlmeperiod => APMlmeDynamicTxRateSwitching check if wds device ready
55 if ((pAd->WdsTab.WdsEntry[ifidx].dev != NULL) && (pAd->WdsTab.WdsEntry[ifidx].dev->flags & IFF_UP))
69 MAC_TABLE_ENTRY *MacTableInsertWDSEntry(
74 BOOLEAN MacTableDeleteWDSEntry(
80 BOOLEAN ApWdsAllowToSendPacket(
82 IN PNDIS_PACKET pPacket,
85 MAC_TABLE_ENTRY *WdsTableLookupByWcid(
89 IN BOOLEAN bResetIdelCount);
91 MAC_TABLE_ENTRY *WdsTableLookup(
94 IN BOOLEAN bResetIdelCount);
96 MAC_TABLE_ENTRY *FindWdsEntry(
102 VOID WdsTableMaintenance(
103 IN PRTMP_ADAPTER pAd);
105 VOID RT28xx_WDS_Init(
106 IN PRTMP_ADAPTER pAd,
107 IN PNET_DEV net_dev);
109 VOID RT28xx_WDS_Close(
110 IN PRTMP_ADAPTER pAd);
112 VOID RT28xx_WDS_Remove(
113 IN PRTMP_ADAPTER pAd);
116 IN PRTMP_ADAPTER pAd);
118 VOID AsicUpdateWdsRxWCIDTable(
119 IN PRTMP_ADAPTER pAd);
121 VOID AsicUpdateWdsEncryption(
122 IN PRTMP_ADAPTER pAd,
125 VOID WdsPeerBeaconProc(
126 IN PRTMP_ADAPTER pAd,
127 IN PMAC_TABLE_ENTRY pEntry,
128 IN USHORT CapabilityInfo,
129 IN UCHAR MaxSupportedRateIn500Kbps,
130 IN UCHAR MaxSupportedRateLen,
131 IN BOOLEAN bWmmCapable,
132 IN ULONG ClientRalinkIe,
133 IN HT_CAPABILITY_IE *pHtCapability,
134 IN UCHAR HtCapabilityLen);
136 VOID APWdsInitialize(
137 IN PRTMP_ADAPTER pAd);
139 INT Show_WdsTable_Proc(
140 IN PRTMP_ADAPTER pAd,
143 VOID rtmp_read_wds_from_file(
144 IN PRTMP_ADAPTER pAd,
148 VOID WdsPrepareWepKeyFromMainBss(
149 IN PRTMP_ADAPTER pAd);
151 INT WdsVirtualIFSendPackets(
152 IN PNDIS_PACKET pSkb,
155 INT WdsVirtualIF_open(
158 INT WdsVirtualIF_close(
161 INT WdsVirtualIF_ioctl(
163 IN OUT struct ifreq *rq,
167 ==========================================================================
169 Check the WDS Entry is valid or not.
170 ==========================================================================
172 static inline BOOLEAN ValidWdsEntry(
173 IN PRTMP_ADAPTER pAd,
177 PMAC_TABLE_ENTRY pMacEntry;
181 if (WdsIndex >= MAX_WDS_ENTRY)
187 if (pAd->WdsTab.WdsEntry[WdsIndex].Valid != TRUE)
193 if ((pAd->WdsTab.WdsEntry[WdsIndex].MacTabMatchWCID==0)
194 || (pAd->WdsTab.WdsEntry[WdsIndex].MacTabMatchWCID >= MAX_LEN_OF_MAC_TABLE))
200 pMacEntry = &pAd->MacTab.Content[pAd->WdsTab.WdsEntry[WdsIndex].MacTabMatchWCID];
201 if (pMacEntry->ValidAsWDS != TRUE)
212 #endif // _AP_WDS_H_ //