/******************************************************************************
*
* Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
*
*
******************************************************************************/
#define _RTW_MLME_EXT_C_
#include <osdep_service.h>
#include <drv_types.h>
#include <wifi.h>
#include <rtw_mlme_ext.h>
#include <wlan_bssdef.h>
#include <mlme_osdep.h>
#include <recv_osdep.h>
static struct mlme_handler mlme_sta_tbl[] = {
{WIFI_ASSOCREQ, "OnAssocReq", &OnAssocReq},
{WIFI_ASSOCRSP, "OnAssocRsp", &OnAssocRsp},
{WIFI_REASSOCREQ, "OnReAssocReq", &OnAssocReq},
{WIFI_REASSOCRSP, "OnReAssocRsp", &OnAssocRsp},
{WIFI_PROBEREQ, "OnProbeReq", &OnProbeReq},
{WIFI_PROBERSP, "OnProbeRsp", &OnProbeRsp},
/*----------------------------------------------------------
below 2 are reserved
-----------------------------------------------------------*/
{0, "DoReserved", &DoReserved},
{0, "DoReserved", &DoReserved},
{WIFI_BEACON, "OnBeacon", &OnBeacon},
{WIFI_ATIM, "OnATIM", &OnAtim},
{WIFI_DISASSOC, "OnDisassoc", &OnDisassoc},
{WIFI_AUTH, "OnAuth", &OnAuthClient},
{WIFI_DEAUTH, "OnDeAuth", &OnDeAuth},
{WIFI_ACTION, "OnAction", &OnAction},
};
static struct action_handler OnAction_tbl[] = {
{RTW_WLAN_CATEGORY_SPECTRUM_MGMT, "ACTION_SPECTRUM_MGMT", on_action_spct},
{RTW_WLAN_CATEGORY_QOS, "ACTION_QOS", &OnAction_qos},
{RTW_WLAN_CATEGORY_DLS, "ACTION_DLS", &OnAction_dls},
{RTW_WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction_back},
{RTW_WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public},
{RTW_WLAN_CATEGORY_RADIO_MEASUREMENT, "ACTION_RADIO_MEASUREMENT", &DoReserved},
{RTW_WLAN_CATEGORY_FT, "ACTION_FT", &DoReserved},
{RTW_WLAN_CATEGORY_HT, "ACTION_HT", &OnAction_ht},
{RTW_WLAN_CATEGORY_SA_QUERY, "ACTION_SA_QUERY", &DoReserved},
{RTW_WLAN_CATEGORY_WMM, "ACTION_WMM", &OnAction_wmm},
{RTW_WLAN_CATEGORY_P2P, "ACTION_P2P", &OnAction_p2p},
};
static u8 null_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
/**************************************************
OUI definitions for the vendor specific IE
***************************************************/
unsigned char RTW_WPA_OUI[] = {0x00, 0x50, 0xf2, 0x01};
unsigned char WMM_OUI[] = {0x00, 0x50, 0xf2, 0x02};
unsigned char WPS_OUI[] = {0x00, 0x50, 0xf2, 0x04};
unsigned char P2P_OUI[] = {0x50, 0x6F, 0x9A, 0x09};
unsigned char WFD_OUI[] = {0x50, 0x6F, 0x9A, 0x0A};
unsigned char WMM_INFO_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01};
unsigned char WMM_PARA_OUI[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};
unsigned char WPA_TKIP_CIPHER[4] = {0x00, 0x50, 0xf2, 0x02};
unsigned char RSN_TKIP_CIPHER[4] = {0x00, 0x0f, 0xac, 0x02};
extern unsigned char REALTEK_96B_IE[];
/********************************************************
MCS rate definitions
*********************************************************/
unsigned char MCS_rate_2R[16] = {0xff, 0xff, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
unsigned char MCS_rate_1R[16] = {0xff, 0x00, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
/********************************************************
ChannelPlan definitions
*********************************************************/
static struct rt_channel_plan_2g RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = {
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}, /* 0x00, RT_CHANNEL_DOMAIN_2G_WORLD , Passive scan CH 12, 13 */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13}, /* 0x01, RT_CHANNEL_DOMAIN_2G_ETSI1 */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11}, /* 0x02, RT_CHANNEL_DOMAIN_2G_FCC1 */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14}, /* 0x03, RT_CHANNEL_DOMAIN_2G_MIKK1 */
{{10, 11, 12, 13}, 4}, /* 0x04, RT_CHANNEL_DOMAIN_2G_ETSI2 */
{{}, 0}, /* 0x05, RT_CHANNEL_DOMAIN_2G_NULL */
};
static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
/* 0x00 ~ 0x1F , Old Define ===== */
{0x02}, /* 0x00, RT_CHANNEL_DOMAIN_FCC */
{0x02}, /* 0x01, RT_CHANNEL_DOMAIN_IC */
{0x01}, /* 0x02, RT_CHANNEL_DOMAIN_ETSI */
{0x01}, /* 0x03, RT_CHANNEL_DOMAIN_SPAIN */
{0x01}, /* 0x04, RT_CHANNEL_DOMAIN_FRANCE */
{0x03}, /* 0x05, RT_CHANNEL_DOMAIN_MKK */
{0x03}, /* 0x06, RT_CHANNEL_DOMAIN_MKK1 */
{0x01}, /* 0x07, RT_CHANNEL_DOMAIN_ISRAEL */
{0x03}, /* 0x08, RT_CHANNEL_DOMAIN_TELEC */
{0x03}, /* 0x09, RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN */
{0x00}, /* 0x0A, RT_CHANNEL_DOMAIN_WORLD_WIDE_13 */
{0x02}, /* 0x0B, RT_CHANNEL_DOMAIN_TAIWAN */
{0x01}, /* 0x0C, RT_CHANNEL_DOMAIN_CHINA */
{0x02}, /* 0x0D, RT_CHANNEL_DOMAIN_SINGAPORE_INDIA_MEXICO */
{0x02}, /* 0x0E, RT_CHANNEL_DOMAIN_KOREA */
{0x02}, /* 0x0F, RT_CHANNEL_DOMAIN_TURKEY */
{0x01}, /* 0x10, RT_CHANNEL_DOMAIN_JAPAN */
{0x02}, /* 0x11, RT_CHANNEL_DOMAIN_FCC_NO_DFS */
{0x01}, /* 0x12, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */
{0x00}, /* 0x13, RT_CHANNEL_DOMAIN_WORLD_WIDE_5G */
{0x02}, /* 0x14, RT_CHANNEL_DOMAIN_TAIWAN_NO_DFS */
{0x00}, /* 0x15, RT_CHANNEL_DOMAIN_ETSI_NO_DFS */
{0x00}, /* 0x16, RT_CHANNEL_DOMAIN_KOREA_NO_DFS */
{0x03}, /* 0x17, RT_CHANNEL_DOMAIN_JAPAN_NO_DFS */
{0x05}, /* 0x18, RT_CHANNEL_DOMAIN_PAKISTAN_NO_DFS */
{0x02}, /* 0x19, RT_CHANNEL_DOMAIN_TAIWAN2_NO_DFS */
{0x00}, /* 0x1A, */
{0x00}, /* 0x1B, */
{0x00}, /* 0x1C, */
{0x00}, /* 0x1D, */
{0x00}, /* 0x1E, */
{0x05}, /* 0x1F, RT_CHANNEL_DOMAIN_WORLD_WIDE_ONLY_5G */
/* 0x20 ~ 0x7F , New Define ===== */
{0x00}, /* 0x20, RT_CHANNEL_DOMAIN_WORLD_NULL */
{0x01}, /* 0x21, RT_CHANNEL_DOMAIN_ETSI1_NULL */
{0x02}, /* 0x22, RT_CHANNEL_DOMAIN_FCC1_NULL */
{0x03}, /* 0x23, RT_CHANNEL_DOMAIN_MKK1_NULL */
{0x04}, /* 0x24, RT_CHANNEL_DOMAIN_ETSI2_NULL */
{0x02}, /* 0x25, RT_CHANNEL_DOMAIN_FCC1_FCC1 */
{0x00}, /* 0x26, RT_CHANNEL_DOMAIN_WORLD_ETSI1 */
{0x03}, /* 0x27, RT_CHANNEL_DOMAIN_MKK1_MKK1 */
{0x00}, /* 0x28, RT_CHANNEL_DOMAIN_WORLD_KCC1 */
{0x00}, /* 0x29, RT_CHANNEL_DOMAIN_WORLD_FCC2 */
{0x00}, /* 0x2A, */
{0x00}, /* 0x2B, */
{0x00}, /* 0x2C, */
{0x00}, /* 0x2D, */
{0x00}, /* 0x2E, */
{0x00}, /* 0x2F, */
{0x00}, /* 0x30, RT_CHANNEL_DOMAIN_WORLD_FCC3 */
{0x00}, /* 0x31, RT_CHANNEL_DOMAIN_WORLD_FCC4 */
{0x00}, /* 0x32, RT_CHANNEL_DOMAIN_WORLD_FCC5 */
{0x00}, /* 0x33, RT_CHANNEL_DOMAIN_WORLD_FCC6 */
{0x02}, /* 0x34, RT_CHANNEL_DOMAIN_FCC1_FCC7 */
{0x00}, /* 0x35, RT_CHANNEL_DOMAIN_WORLD_ETSI2 */
{0x00}, /* 0x36, RT_CHANNEL_DOMAIN_WORLD_ETSI3 */
{0x03}, /* 0x37, RT_CHANNEL_DOMAIN_MKK1_MKK2 */
{0x03}, /* 0x38, RT_CHANNEL_DOMAIN_MKK1_MKK3 */
{0x02}, /* 0x39, RT_CHANNEL_DOMAIN_FCC1_NCC1 */
{0x00}, /* 0x3A, */
{0x00}, /* 0x3B, */
{0x00}, /* 0x3C, */
{0x00}, /* 0x3D, */
{0x00}, /* 0x3E, */
{0x00}, /* 0x3F, */
{0x02}, /* 0x40, RT_CHANNEL_DOMAIN_FCC1_NCC2 */
{0x03}, /* 0x41, RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN_2G */
};
static struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03}; /* use the conbination for max channel numbers */
/*
* Search the @param channel_num in given @param channel_set
* @ch_set: the given channel set
* @ch: the given channel number
*
* return the index of channel_num in channel_set, -1 if not found
*/
int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch)
{
int i;
for (i = 0; ch_set[i].ChannelNum != 0; i++) {
if (ch == ch_set[i].ChannelNum)
break;
}
if (i >= ch_set[i].ChannelNum)
return -1;
ret
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
realtek 8188eu usb无线网卡驱动 (636个子文件)
hostapd_cli.1 2KB
hostapd.8 1KB
hostapd.accept 276B
rtl8188eufw.bin 14KB
rtw_mlme_ext.c 253KB
ioctl_linux.c 234KB
driver_nl80211.c 169KB
p2p.c 90KB
driver_test.c 87KB
driver_ndis.c 86KB
wps_registrar.c 86KB
odm.c 76KB
libtommath.c 76KB
wpa_auth.c 75KB
rtw_mlme.c 73KB
tls_openssl.c 73KB
wpa.c 71KB
rtl8188e_hal_init.c 70KB
usb_halinit.c 68KB
rtw_recv.c 66KB
rtw_xmit.c 64KB
rtw_p2p.c 64KB
driver_wext.c 61KB
eap.c 59KB
rtw_security.c 58KB
ieee802_1x.c 58KB
rtw_cmd.c 57KB
config_file.c 57KB
tdls.c 56KB
rtw_ap.c 55KB
HalPhyRf_8188e.c 54KB
ieee802_11.c 53KB
eap_ttls.c 52KB
eapol_supp_sm.c 50KB
rtw_led.c 50KB
driver_madwifi.c 49KB
x509v3.c 49KB
wps_er.c 48KB
driver_rtw.c 47KB
wps_validate.c 47KB
wpa_auth_ft.c 47KB
rtw_wlan_util.c 46KB
eap_fast.c 45KB
rtw_ieee80211.c 43KB
eap_server_fast.c 42KB
driver_hostap.c 41KB
aes-internal.c 40KB
driver_bsd.c 40KB
rtw_mp_ioctl.c 39KB
radius_client.c 39KB
rtw_ioctl_set.c 39KB
radius_server.c 38KB
eap_server_ttls.c 38KB
driver_ralink.c 38KB
rtw_br_ext.c 37KB
eap_aka.c 37KB
os_intfs.c 37KB
rtl8188e_phycfg.c 37KB
driver_atheros.c 36KB
wps_hostapd.c 36KB
eap_peap.c 36KB
wps_upnp.c 36KB
eap_sim_db.c 36KB
tls_gnutls.c 36KB
wps_enrollee.c 35KB
eap_server_peap.c 35KB
wps_upnp_web.c 35KB
eap_server.c 35KB
peerkey.c 34KB
eap_server_aka.c 33KB
pcsc_funcs.c 33KB
ikev2.c 32KB
eap_sim_common.c 32KB
p2p_go_neg.c 32KB
tncc.c 32KB
radius.c 31KB
eap_sim.c 30KB
ikev2.c 30KB
eap_tls_common.c 30KB
tncs.c 29KB
rtl8188e_mp.c 29KB
tlsv1_server_read.c 29KB
eapol_auth_sm.c 28KB
ctrl_iface.c 27KB
wpa_ft.c 27KB
rtw_debug.c 27KB
rtw_mp.c 26KB
tlsv1_client_read.c 25KB
wps_upnp_ssdp.c 25KB
dh_groups.c 25KB
eap_mschapv2.c 25KB
hostapd_cli.c 25KB
wpa_common.c 24KB
Hal8188ERateAdaptive.c 24KB
hostapd.c 23KB
usb_intf.c 23KB
p2p_sd.c 23KB
httpread.c 23KB
rtl8188e_cmd.c 22KB
wpa_auth_ie.c 22KB
共 636 条
- 1
- 2
- 3
- 4
- 5
- 6
- 7
资源评论
- yunfwe2015-05-25很好 成功编译出模块
- qq_216046252015-08-31怎么说呢,还可以
- phantomh2021-03-23不错,这个是好东西
geckoster
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功