/*
* Linux cfg80211 driver
*
* Copyright (C) 1999-2019, Broadcom.
*
* Unless you and Broadcom execute a separate written software license
* agreement governing use of this software, this software is licensed to you
* under the terms of the GNU General Public License version 2 (the "GPL"),
* available at http://www.broadcom.com/licenses/GPLv2.php, with the
* following added to such license:
*
* As a special exception, the copyright holders of this software give you
* permission to link this software with independent modules, and to copy and
* distribute the resulting executable under terms of your choice, provided that
* you also meet, for each linked independent module, the terms and conditions
* of the license of that module. An independent module is a module which is
* not derived from this software. The special exception does not apply to any
* modifications of the software.
*
* Notwithstanding the above, under no circumstances may you combine this
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
*
* <<Broadcom-WL-IPTag/Open:>>
*
* $Id: wl_cfg80211.c 826086 2019-06-18 19:23:59Z $
*/
/* */
#include <typedefs.h>
#include <linuxver.h>
#include <linux/kernel.h>
#ifdef CONFIG_AP6XXX_WIFI6_HDF
#include "hdf_mac80211_sta_event.h"
#endif
#include <bcmutils.h>
#include <bcmstdlib_s.h>
#include <bcmwifi_channels.h>
#include <bcmendian.h>
#include <ethernet.h>
#ifdef WL_WPS_SYNC
#include <dhd_eapol.h>
#endif /* WL_WPS_SYNC */
#include <802.11.h>
#include <bcmiov.h>
#include <linux/if_arp.h>
#include <asm/uaccess.h>
#include <ethernet.h>
#include <linux/kernel.h>
#include <linux/kthread.h>
#include <linux/netdevice.h>
#include <linux/sched.h>
#include <linux/etherdevice.h>
#include <linux/wireless.h>
#include <linux/ieee80211.h>
#include <linux/wait.h>
#include <net/cfg80211.h>
#include <net/rtnetlink.h>
#include <wlioctl.h>
#include <bcmevent.h>
#include <wldev_common.h>
#include <wl_cfg80211.h>
#include <wl_cfgp2p.h>
#include <wl_cfgscan.h>
#include <bcmdevs.h>
#ifdef WL_FILS
#include <fils.h>
#include <frag.h>
#endif /* WL_FILS */
#include <wl_ohos.h>
#include <dngl_stats.h>
#include <dhd.h>
#include <dhd_linux.h>
#include <dhd_linux_pktdump.h>
#include <dhd_debug.h>
#include <dhdioctl.h>
#include <wlioctl.h>
#include <dhd_cfg80211.h>
#include <dhd_bus.h>
#ifdef PNO_SUPPORT
#include <dhd_pno.h>
#endif /* PNO_SUPPORT */
#include <wl_cfgvendor.h>
#if !defined(WL_VENDOR_EXT_SUPPORT)
#undef GSCAN_SUPPORT
#endif
#include <dhd_config.h>
#ifdef WL_NAN
#include <wl_cfgnan.h>
#endif /* WL_NAN */
#ifdef PROP_TXSTATUS
#include <dhd_wlfc.h>
#endif // endif
#ifdef BCMPCIE
#include <dhd_flowring.h>
#endif // endif
#ifdef RTT_SUPPORT
#include <dhd_rtt.h>
#endif /* RTT_SUPPORT */
#define BRCM_SAE_VENDOR_EVENT_BUF_LEN 500
#ifdef DNGL_AXI_ERROR_LOGGING
#include <bcmtlv.h>
#endif /* DNGL_AXI_ERROR_LOGGING */
#if defined(CONFIG_WLAN_BEYONDX) || defined(CONFIG_SEC_5GMODEL)
#include <linux/dev_ril_bridge.h>
#include <linux/notifier.h>
#endif /* CONFIG_WLAN_BEYONDX || defined(CONFIG_SEC_5GMODEL) */
#ifdef BCMWAPI_WPI
/* these items should evetually go into wireless.h of the linux system headfile
* dir */
#ifndef IW_ENCODE_ALG_SM4
#define IW_ENCODE_ALG_SM4 0x20
#endif // endif
#ifndef IW_AUTH_WAPI_ENABLED
#define IW_AUTH_WAPI_ENABLED 0x20
#endif // endif
#ifndef IW_AUTH_WAPI_VERSION_1
#define IW_AUTH_WAPI_VERSION_1 0x00000008
#endif // endif
#ifndef IW_AUTH_CIPHER_SMS4
#define IW_AUTH_CIPHER_SMS4 0x00000020
#endif // endif
#ifndef IW_AUTH_KEY_MGMT_WAPI_PSK
#define IW_AUTH_KEY_MGMT_WAPI_PSK 4
#endif // endif
#ifndef IW_AUTH_KEY_MGMT_WAPI_CERT
#define IW_AUTH_KEY_MGMT_WAPI_CERT 8
#endif // endif
#endif /* BCMWAPI_WPI */
#ifdef BCMWAPI_WPI
#define IW_WSEC_ENABLED(wsec) \
((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED | SMS4_ENABLED))
#else /* BCMWAPI_WPI */
#define IW_WSEC_ENABLED(wsec) \
((wsec) & (WEP_ENABLED | TKIP_ENABLED | AES_ENABLED))
#endif /* BCMWAPI_WPI */
#if (defined(WL_FW_OCE_AP_SELECT) || \
defined(BCMFW_ROAM_ENABLE) && \
((LINUX_VERSION_CODE >= KERNEL_VERSION(3, 2, 0)) || \
defined(WL_COMPAT_WIRELESS)))
uint fw_ap_select = true;
#else
uint fw_ap_select = false;
#endif /* WL_FW_OCE_AP_SELECT && (ROAM_ENABLE || BCMFW_ROAM_ENABLE) */
module_param(fw_ap_select, uint, 0660);
static struct device *cfg80211_parent_dev = NULL;
static struct bcm_cfg80211 *g_bcmcfg = NULL;
u32 wl_dbg_level = 0xff;
// u32 wl_dbg_level = WL_DBG_ERR; // | WL_DBG_P2P_ACTION | WL_DBG_INFO;
#define MAX_VIF_OFFSET 15
#define MAX_WAIT_TIME 1500
#ifdef WLAIBSS_MCHAN
#define IBSS_IF_NAME "ibss%d"
#endif /* WLAIBSS_MCHAN */
#ifdef VSDB
/* sleep time to keep STA's connecting or connection for continuous af tx or
* finding a peer */
#define DEFAULT_SLEEP_TIME_VSDB 120
#define OFF_CHAN_TIME_THRESHOLD_MS 200
#define AF_RETRY_DELAY_TIME 40
/* if sta is connected or connecting, sleep for a while before retry af tx or
* finding a peer */
#define WL_AF_TX_KEEP_PRI_CONNECTION_VSDB(cfg) \
do { \
if (wl_get_drv_status(cfg, CONNECTED, bcmcfg_to_prmry_ndev(cfg)) || \
wl_get_drv_status(cfg, CONNECTING, bcmcfg_to_prmry_ndev(cfg))) { \
OSL_SLEEP(DEFAULT_SLEEP_TIME_VSDB); \
} \
} while (0)
#else /* VSDB */
/* if not VSDB, do nothing */
#define WL_AF_TX_KEEP_PRI_CONNECTION_VSDB(cfg)
#endif /* VSDB */
#define DNGL_FUNC(func, parameters) func parameters
#define COEX_DHCP
#define WLAN_EID_SSID 0
#define CH_MIN_5G_CHANNEL 34
#ifdef WL_RELMCAST
enum rmc_event_type { RMC_EVENT_NONE, RMC_EVENT_LEADER_CHECK_FAIL };
#endif /* WL_RELMCAST */
#ifdef CONFIG_AP6XXX_WIFI6_HDF
#include "hdf_wl_interface.h"
#include "net_device.h"
int32_t HdfWifiEventMgmtTxStatus(const struct NetDevice *netDev,
const uint8_t *buf, size_t len, uint8_t ack);
int32_t HdfWifiEventRxMgmt(const struct NetDevice *netDev, int32_t freq,
int32_t sigMbm, const uint8_t *buf, size_t len);
int32_t HdfWifiEventCsaChannelSwitch(const struct NetDevice *netDev,
int32_t freq);
int32_t HdfWifiEventRemainOnChannel(const struct NetDevice *netDev,
uint32_t freq, uint32_t duration);
struct NetDevice *GetHdfNetDeviceByLinuxInf(struct net_device *dev);
int ChangNewSta(struct net_device *dev, const uint8_t *macAddr, uint8_t addrLen,
const struct station_info *info);
int ChangDelSta(struct net_device *dev, const uint8_t *macAddr,
uint8_t addrLen);
extern void HdfInformBssFrameEventCallback(struct net_device *ndev,
struct ieee80211_channel *channel,
int32_t signal, int16_t freq,
struct ieee80211_mgmt *mgmt,
uint32_t mgmtLen);
extern int32_t HdfConnectResultEventCallback(struct net_device *ndev,
uint8_t *bssid, uint8_t *reqIe,
uint8_t *rspIe, uint32_t reqIeLen,
uint32_t rspIeLen,
uint16_t connectStatus,
uint16_t freq);
extern int g_event_ifidx;
extern struct hdf_inf_map g_hdf_infmap[HDF_INF_MAX];
struct NetDevice *get_hdf_netdev(int ifidx);
extern int g_mgmt_tx_event_ifi
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
开源鸿蒙 4.0 RK3566开发板配置 https://mysoft.blog.csdn.net/article/details/136779805
资源推荐
资源详情
资源评论






























收起资源包目录





































































































共 444 条
- 1
- 2
- 3
- 4
- 5
资源评论

- wuhaogs2024-09-15资源有很好的参考价值,总算找到了自己需要的资源啦。

caimouse
- 粉丝: 1w+
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助


最新资源
- 信息系统管理中的网络安全风险评估.pptx
- 图书管理系统数据库分析与设计实例.doc
- 企业科研项目管理信息化建设路径探究.docx
- 通信施工总体计划.docx
- 精选ppt模板高科技大数据智能时代工作汇报.pptx
- 大学计算机信息技术教程-课后习题.doc
- 软件测试培训教程终极.ppt
- 基于单片机的语音录放系统设计.doc
- “万礼豪程”项目管理架设酒店产学研互通桥梁.doc
- 【精选】ppt模板粉紫色人工智能说明PPT模板.pptx
- 南通中专电子商务专业人才培养实施方案.doc
- 常用测绘C程序设计.doc
- 计算机组成原理清华1.ppt
- 互联网+时代中学英语口语教学探索.docx
- C语言学生成绩管理[].doc
- 计算机网络原理第4章习题课.ppt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈



安全验证
文档复制为VIP权益,开通VIP直接复制
