/******************************************************************************
*
* 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.
*
******************************************************************************/
#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>
#include <linux/ieee80211.h>
#include <rtl8723a_hal.h>
static int OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnAssocRsp23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnProbeReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnProbeRsp23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int DoReserved23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnBeacon23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnAtim23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnDisassoc23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnAuth23aClient23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnDeAuth23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnAction23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int on_action_spct23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnAction23a_qos(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnAction23a_dls(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnAction23a_back23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int on_action_public23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnAction23a_ht(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnAction23a_wmm(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static int OnAction23a_p2p(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static void issue_assocreq(struct rtw_adapter *padapter);
static void issue_probereq(struct rtw_adapter *padapter,
struct cfg80211_ssid *pssid, u8 *da);
static int issue_probereq_ex(struct rtw_adapter *padapter,
struct cfg80211_ssid *pssid,
u8 *da, int try_cnt, int wait_ms);
static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da,
u8 is_valid_p2p_probereq);
static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta,
unsigned short status);
static int issue_deauth_ex(struct rtw_adapter *padapter, u8 *da,
unsigned short reason, int try_cnt, int wait_ms);
static void start_clnt_assoc(struct rtw_adapter *padapter);
static void start_clnt_auth(struct rtw_adapter *padapter);
static void start_clnt_join(struct rtw_adapter *padapter);
static void start_create_ibss(struct rtw_adapter *padapter);
static struct wlan_bssid_ex *collect_bss_info(struct rtw_adapter *padapter,
struct recv_frame *precv_frame);
#ifdef CONFIG_8723AU_AP_MODE
static int OnAuth23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
struct sta_info *pstat, u16 pkt_type);
#endif
static struct mlme_handler mlme_sta_tbl[]={
{"OnAssocReq23a", &OnAssocReq23a},
{"OnAssocRsp23a", &OnAssocRsp23a},
{"OnReAssocReq", &OnAssocReq23a},
{"OnReAssocRsp", &OnAssocRsp23a},
{"OnProbeReq23a", &OnProbeReq23a},
{"OnProbeRsp23a", &OnProbeRsp23a},
/*----------------------------------------------------------
below 2 are reserved
-----------------------------------------------------------*/
{"DoReserved23a", &DoReserved23a},
{"DoReserved23a", &DoReserved23a},
{"OnBeacon23a", &OnBeacon23a},
{"OnATIM", &OnAtim23a},
{"OnDisassoc23a", &OnDisassoc23a},
{"OnAuth23a", &OnAuth23aClient23a},
{"OnDeAuth23a", &OnDeAuth23a},
{"OnAction23a", &OnAction23a},
};
static struct action_handler OnAction23a_tbl[]={
{WLAN_CATEGORY_SPECTRUM_MGMT, "ACTION_SPECTRUM_MGMT", on_action_spct23a},
{WLAN_CATEGORY_QOS, "ACTION_QOS", &OnAction23a_qos},
{WLAN_CATEGORY_DLS, "ACTION_DLS", &OnAction23a_dls},
{WLAN_CATEGORY_BACK, "ACTION_BACK", &OnAction23a_back23a},
{WLAN_CATEGORY_PUBLIC, "ACTION_PUBLIC", on_action_public23a},
{WLAN_CATEGORY_HT, "ACTION_HT", &OnAction23a_ht},
{WLAN_CATEGORY_SA_QUERY, "ACTION_SA_QUERY", &DoReserved23a},
{WLAN_CATEGORY_WMM, "ACTION_WMM", &OnAction23a_wmm},
{WLAN_CATEGORY_VENDOR_SPECIFIC, "ACTION_P2P", &OnAction23a_p2p},
};
static u8 null_addr[ETH_ALEN]= {0, 0, 0, 0, 0, 0};
/**************************************************
OUI definitions for the vendor specific IE
***************************************************/
unsigned char WMM_OUI23A[] = {0x00, 0x50, 0xf2, 0x02};
unsigned char WPS_OUI23A[] = {0x00, 0x50, 0xf2, 0x04};
unsigned char P2P_OUI23A[] = {0x50, 0x6F, 0x9A, 0x09};
unsigned char WFD_OUI23A[] = {0x50, 0x6F, 0x9A, 0x0A};
unsigned char WMM_INFO_OUI23A[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01};
unsigned char WMM_PARA_OUI23A[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};
static unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};
/********************************************************
MCS rate definitions
*********************************************************/
unsigned char MCS_rate_2R23A[16] = {
0xff, 0xff, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
unsigned char MCS_rate_1R23A[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] = {
/* 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, 12, 13}, 13},
/* 0x02, RT_CHANNEL_DOMAIN_2G_FCC1 */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11},
/* 0x03, RT_CHANNEL_DOMAIN_2G_MIKK1 */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14},
/* 0x04, RT_CHANNEL_DOMAIN_2G_ETSI2 */
{{10, 11, 12, 13}, 4},
/* 0x05, RT_CHANNEL_DOMAIN_2G_NULL */
{{}, 0},
};
static struct rt_channel_plan_5g RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = {
/* 0x00, RT_CHANNEL_DOMAIN_5G_NULL */
{{}, 0},
/* 0x01, RT_CHANNEL_DOMAIN_5G_ETSI1 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
116, 120, 124, 128, 132, 136, 140}, 19},
/* 0x02, RT_CHANNEL_DOMAIN_5G_ETSI2 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165}, 24},
/* 0x03, RT_CHANNEL_DOMAIN_5G_ETSI3 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
116, 120, 124, 128, 132, 149, 153, 157, 161, 165}, 22},
/* 0x04, RT_CHANNEL_DOMAIN_5G_FCC1 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165}, 24},
/* 0x05, RT_CHANNEL_DOMAIN_5G_FCC2 */
{{36, 40, 44, 48, 149, 153, 157, 161, 165}, 9},
/* 0x06, RT_CHANNEL_DOMAIN_5G_FCC3 */
{{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 13},
/* 0x07, RT_CHANNEL_DOMAIN_5G_FCC4 */
{{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161}, 12},
/* 0x08, RT_CHANNEL_DOMAIN_5G_FCC5 *
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
rtw_mlme_ext.rar (2个子文件)
rtw_mlme_ext.c 174KB
rtw_mlme_ext.h 23KB
共 2 条
- 1
资源评论
邓凌佳
- 粉丝: 76
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- Python深度强化学习方法动态规划无人机基站轨迹源码
- 峰会报告自动化生成基础教程
- 算法竞赛中的离散化 概念总结和基本操作全解
- 算法竞赛位运算(简单易懂)
- 常用一维二维 前缀和与差分算法模板总结
- SAR成像算法+后向投影(BP)算法+星载平台实测数据
- 横向循环焦点轮播图横向循环焦点轮播图横向循环焦点轮播图横向循环焦点轮播图横向循环焦点轮播图横向循环焦点轮播图横向循环焦点轮播图横向循环焦点轮播图横向循环焦点轮播图横向循环焦点轮播图横向循环焦点轮播图横
- 基于Java和HTML的留言墙、验证码、计算器基础项目设计源码
- 基于JAVA C/C++的嵌入式设备组网平台物联网框架设计源码
- 基于Java开发的高性能全文检索工具包jsearch设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功