/***************************************************************************** 函 数 名 : hmac_protection_obss_aging_ap 功能描述 : 启动OBSS老化处理定时器 输入参数 : pst_hmac_vap : hmac vap结构体指针 输出参数 : 无 返 回 值 : oal_uint32 调用函数 : 被调函数 : 修改历史 : 1.日 期 : 2015年4月28日 作 者 : w00269675 修改内容 : 新生成函数 *****************************************************************************/ oal_uint32 hmac_protection_start_timer(hmac_vap_stru *pst_hmac_vap) { mac_device_stru *pst_mac_device; pst_mac_device = mac_res_get_dev(pst_hmac_vap->st_vap_base_info.uc_device_id); if (OAL_PTR_NULL == pst_mac_device) { OAM_WARNING_LOG0(0, OAM_SF_ANY, "{hmac_protection_start_timer::pst_mac_device null.}"); return OAL_ERR_CODE_PTR_NULL; } /* 启动OBSS保护老化定时器 定时器已开启,则不用再开启 */ if (OAL_FALSE == pst_mac_device->st_obss_aging_timer.en_is_registerd) { FRW_TIMER_CREATE_TIMER(&(pst_mac_device->st_obss_aging_timer), hmac_protection_obss_update_timer, WLAN_USER_AGING_TRIGGER_TIME, /* 5000ms触发一次 */ pst_mac_device, OAL_TRUE, OAM_MODULE_ID_HMAC, pst_mac_device->ul_core_id); } return OAL_SUCC; }
oal_void hmac_data_acq_down_vap(mac_vap_stru *pst_mac_vap) { oal_uint32 ul_ret; mac_device_stru *pst_device; oal_uint8 uc_vap_idx; mac_cfg_down_vap_param_stru st_down_vap; hmac_vap_stru *pst_hmac_vap; pst_device = mac_res_get_dev(pst_mac_vap->uc_device_id); if (OAL_PTR_NULL == pst_device) { OAM_WARNING_LOG0(pst_mac_vap->uc_vap_id, OAM_SF_ANY, "{hmac_data_acq_down_vap::pst_device null.}"); return; } /* 遍历device下所有vap,设置vap 下的信道号 */ for (uc_vap_idx = 0; uc_vap_idx < pst_device->uc_vap_num; uc_vap_idx++) { pst_hmac_vap = mac_res_get_hmac_vap(pst_device->auc_vap_id[uc_vap_idx]); if (OAL_PTR_NULL == pst_hmac_vap) { OAM_WARNING_LOG0(pst_mac_vap->uc_vap_id, OAM_SF_ANY, "{hmac_data_acq_down_vap::pst_hmac_vap null.}"); continue; } st_down_vap.pst_net_dev = pst_hmac_vap->pst_net_device; ul_ret = hmac_config_down_vap(&pst_hmac_vap->st_vap_base_info, OAL_SIZEOF(mac_cfg_down_vap_param_stru), (oal_uint8 *)&st_down_vap); if (OAL_UNLIKELY(OAL_SUCC != ul_ret)) { OAM_WARNING_LOG0(pst_mac_vap->uc_vap_id, OAM_SF_ANY, "{hmac_data_acq_down_vap::hmac_config_down_vap failed.}"); } } g_uc_data_acq_used = OAL_TRUE; OAM_INFO_LOG1(pst_mac_vap->uc_vap_id, OAM_SF_ANY, "{hmac_data_acq_down_vap::g_uc_data_acq_used=%d.}", g_uc_data_acq_used); }
OAL_STATIC int32 hwifi_config_init_nvram(void) { int32 l_ret = INI_FAILED; int32 l_cfg_id; int32 aul_nvram_params[NVRAM_PARAMS_INDEX_BUTT]={0}; oal_memset(g_auc_nv_params, 0x00, sizeof(g_auc_nv_params)); l_ret = get_cust_conf_string(CUST_MODU_NVRAM, OAL_PTR_NULL, g_auc_nv_params, sizeof(g_auc_nv_params)); /* nv读取失败或者返回的参数值为零,尝试读取ini */ if(INI_FAILED == l_ret || !g_auc_nv_params[0]) { OAM_WARNING_LOG3(0, OAM_SF_ANY, "hwifi_config_init_nvram read nvram failed[ret:%d] or wrong values[first eight values:0x%x %x], read dts instead!", l_ret, *((oal_uint32*)g_auc_nv_params),*((oal_uint32*)(g_auc_nv_params+4))); /* 先尝试从ini文件中读取,读不到的话再从dts中读取 */ for (l_cfg_id = NVRAM_PARAMS_INDEX_0; l_cfg_id < NVRAM_PARAMS_INDEX_BUTT; l_cfg_id++) { l_ret = get_cust_conf_int32(INI_MODU_WIFI, g_ast_nvram_config_ini[l_cfg_id].name, &aul_nvram_params[l_cfg_id]); if(INI_FAILED == l_ret) { OAM_ERROR_LOG1(0, OAM_SF_ANY, "hwifi_config_init_nvram read %d from ini failed!", l_cfg_id); break; } } if (NVRAM_PARAMS_INDEX_BUTT == l_cfg_id) { OAM_INFO_LOG0(0, OAM_SF_ANY, "hwifi_config_init_nvram read from ini success!"); oal_memcopy(g_auc_nv_params, aul_nvram_params, sizeof(g_auc_nv_params)); return INI_SUCC; } l_ret = get_cust_conf_string(CUST_MODU_DTS, NVRAM_PARAMS_ARRAY, g_auc_nv_params, sizeof(g_auc_nv_params)); if(INI_FAILED == l_ret) { OAM_WARNING_LOG0(0, OAM_SF_ANY, "hwifi_config_init_nvram read dts failed!"); /* 读取dts也失败时将数组置零,防止下发至device */ oal_memset(g_auc_nv_params, 0x00, sizeof(g_auc_nv_params)); return INI_FAILED; } } return INI_SUCC; }
/***************************************************************************** 函 数 名 : hmac_protection_obss_aging_ap 功能描述 : OBSS老化处理, 本函数定期对device每个VAP进行保护老化处理(5000ms 执行一次) 输入参数 : p_arg : 定时器传入的指针参数 输出参数 : 无 返 回 值 : oal_uint32 调用函数 : 被调函数 : 修改历史 : 1.日 期 : 2015年4月28日 作 者 : w00269675 修改内容 : 新生成函数 *****************************************************************************/ oal_uint32 hmac_protection_obss_update_timer(void *p_arg) { mac_device_stru *pst_mac_device; oal_uint8 uc_vap_idx; mac_vap_stru *pst_mac_vap; if (OAL_PTR_NULL == p_arg) { OAM_ERROR_LOG0(0, OAM_SF_ANY, "{hmac_protection_obss_update_timer::p_arg null.}"); return OAL_ERR_CODE_PTR_NULL; } pst_mac_device = (mac_device_stru *)p_arg; /* 遍历device下对应VAP, 定时更新OBSS 保护模式 */ /* 业务vap从1开始 */ for (uc_vap_idx = 0; uc_vap_idx < pst_mac_device->uc_vap_num; uc_vap_idx++) { pst_mac_vap = mac_res_get_mac_vap(pst_mac_device->auc_vap_id[uc_vap_idx]); if (OAL_UNLIKELY(OAL_PTR_NULL == pst_mac_vap)) { OAM_WARNING_LOG0(uc_vap_idx, OAM_SF_ANY, "{hmac_protection_obss_update_timer::pst_mac_vap null.}"); return OAL_ERR_CODE_PTR_NULL; } /* OBSS老化只针对AP模式,非AP模式则跳出 */ if (WLAN_VAP_MODE_BSS_AP != pst_mac_vap->en_vap_mode) { continue; } hmac_protection_obss_aging_ap(pst_mac_vap); } return OAL_SUCC; }
int32 hwifi_config_init(int32 cus_tag) { int32 l_cfg_id; int32 l_ret = INI_FAILED; int32 l_ori_val; wlan_cfg_cmd* pgast_wifi_config; int32* pgal_params; int32 l_cfg_value = 0; int32 l_wlan_cfg_butt; switch (cus_tag) { case CUS_TAG_NV: return hwifi_config_init_nvram(); case CUS_TAG_INI: host_params_init_first(); pgast_wifi_config = g_ast_wifi_config_cmds; pgal_params = g_al_host_init_params; l_wlan_cfg_butt = WLAN_CFG_INIT_BUTT; break; case CUS_TAG_DTS: original_value_for_dts_params(); pgast_wifi_config = g_ast_wifi_config_dts; pgal_params = g_al_dts_params; l_wlan_cfg_butt = WLAN_CFG_DTS_BUTT; break; default: OAM_ERROR_LOG1(0, OAM_SF_ANY, "hisi_customize_wifi tag number[0x%x] not correct!", cus_tag); return INI_FAILED; } for(l_cfg_id=0; l_cfg_id<l_wlan_cfg_butt; ++l_cfg_id) { if(CUS_TAG_INI == cus_tag && WLAN_CFG_INIT_COUNTRY_CODE == l_cfg_id) { /* 获取ini中的国家码 */ l_ret = get_cust_conf_string(INI_MODU_WIFI, pgast_wifi_config[l_cfg_id].name, g_ac_country_code, sizeof(g_ac_country_code)); if(INI_FAILED == l_ret) { OAM_WARNING_LOG0(0, OAM_SF_ANY, "hisi_customize_wifi read country code failed, check if it exists!"); strncpy(g_ac_country_code, "99", 2); } g_ac_country_code[2] = '\0'; continue; } /* 获取ini或dts中的配置值 */ l_ret = get_cust_conf_int32(INI_MODU_WIFI, pgast_wifi_config[l_cfg_id].name, &l_cfg_value); if (INI_FAILED == l_ret) { l_ret = get_cust_conf_int32(CUST_MODU_DTS, pgast_wifi_config[l_cfg_id].name, &l_cfg_value); if(INI_FAILED == l_ret) { OAM_WARNING_LOG1(0, OAM_SF_ANY, "hisi_customize_wifi read ini or dts file failed, check if cfg_id[%d] exists!", l_cfg_id); continue; } } l_ori_val = pgal_params[l_cfg_id]; pgal_params[l_cfg_id] = l_cfg_value; OAM_WARNING_LOG3(0, OAM_SF_ANY, "hisi_customize_wifi [cfg_id:%d]value changed from [init:%d] to [config:%d]. \n", l_cfg_id, l_ori_val, pgal_params[l_cfg_id]); } return INI_SUCC; }
/***************************************************************************** 函 数 名 : dmac_device_init 功能描述 : device的初始化函数 输入参数 : 指向要进行初始化的device指针 输出参数 : 无 返 回 值 : 成功或者失败原因 调用函数 : 被调函数 : 修改历史 : 1.日 期 : 2012年10月19日 作 者 : huxiaotong 修改内容 : 新生成函数 *****************************************************************************/ OAL_STATIC oal_uint32 dmac_device_init(oal_uint8 *puc_device_id, oal_uint8 uc_chip_id, oal_uint8 uc_device_id, oal_uint32 ul_chip_ver) { oal_uint32 ul_ret; oal_uint8 uc_dev_id; mac_device_stru *pst_device; mac_data_rate_stru *pst_data_rate; oal_uint32 ul_rate_num = 0; oal_uint32 ul_idx; oal_uint32 ul_loop = 0; dmac_device_stru *pst_dmac_device; hal_cfg_rts_tx_param_stru st_hal_rts_tx_param; #ifdef _PRE_WLAN_DFT_STAT oam_stats_phy_node_idx_stru st_phy_node_idx = {{OAM_STATS_PHY_NODE_TX_CNT, OAM_STATS_PHY_NODE_RX_OK_CNT, OAM_STATS_PHY_NODE_11B_HDR_ERR_CNT, OAM_STATS_PHY_NODE_OFDM_HDR_ERR_CNT}}; #endif /*申请公共mac device结构体,修改下 名称*/ ul_ret = mac_res_alloc_dmac_dev(&uc_dev_id); if(OAL_UNLIKELY(ul_ret != OAL_SUCC)) { OAM_ERROR_LOG1(0, OAM_SF_ANY, "{dmac_device_init::mac_res_alloc_dmac_dev failed[%d].}", ul_ret); return OAL_FAIL; } pst_device = mac_res_get_dev(uc_dev_id); if (OAL_PTR_NULL == pst_device) { OAM_ERROR_LOG0(0, OAM_SF_ANY, "{dmac_device_init::pst_device null.}"); return OAL_ERR_CODE_PTR_NULL; } #if 0 pst_device->uc_chip_id = uc_chip_id; pst_device->uc_device_id = uc_dev_id; #endif /* 申请dmac device资源 */ if(OAL_UNLIKELY(dmac_res_alloc_mac_dev(uc_dev_id) != OAL_SUCC)) { OAM_ERROR_LOG0(0, OAM_SF_ANY, "{dmac_device_init::dmac_res_alloc_mac_dev failed.}"); return OAL_FAIL; } #if (_PRE_MULTI_CORE_MODE_OFFLOAD_DMAC == _PRE_MULTI_CORE_MODE) /* 初始化device级别的一些参数 */ ul_ret = mac_device_init(pst_device, ul_chip_ver, uc_chip_id, uc_dev_id); if (OAL_SUCC != ul_ret) { OAM_ERROR_LOG2(0, OAM_SF_ANY, "{dmac_device_init::mac_device_init failed[%d], chip_ver[0x%x].}", ul_ret, ul_chip_ver); dmac_res_free_mac_dev(uc_dev_id); mac_res_free_dev(uc_dev_id); return ul_ret; } #endif /* 获取hmac device,并进行相关参数赋值 */ pst_dmac_device = dmac_res_get_mac_dev(uc_dev_id); if (OAL_PTR_NULL == pst_dmac_device) { OAM_ERROR_LOG0(0, OAM_SF_ANY, "{dmac_device_init::pst_dmac_device null.}"); mac_res_free_dev(uc_dev_id); return OAL_ERR_CODE_PTR_NULL; } /* 结构体初始化 */ OAL_MEMZERO(pst_dmac_device, OAL_SIZEOF(*pst_dmac_device)); pst_dmac_device->pst_device_base_info = pst_device; #ifdef _PRE_WLAN_FEATURE_DFR pst_dmac_device->en_dfr_hw_reset_enable = OAL_FALSE; #endif //#ifdef _PRE_WLAN_FEATURE_DFR /* 硬mac结构指针只存在于DMAC中,需要针对device对象中私有部分 的内容进行初始化,用于逻辑和物理device的对应 */ ul_ret = hal_chip_get_device(uc_chip_id, uc_device_id, &pst_device->pst_device_stru); pst_device->ul_core_id = pst_device->pst_device_stru->ul_core_id; if (OAL_SUCC != ul_ret) { OAM_WARNING_LOG1(0, OAM_SF_ANY, "{dmac_device_init::hal_chip_get_device failed[%d].}", ul_ret); dmac_res_free_mac_dev(uc_dev_id); mac_res_free_dev(uc_dev_id); return ul_ret; } /* 保存mac层的device id */ pst_device->pst_device_stru->uc_mac_device_id = uc_dev_id; if(OAL_SUCC != mac_fcs_init(&pst_device->st_fcs_mgr, pst_device->uc_chip_id, pst_device->uc_device_id)) { OAM_WARNING_LOG0(0, OAM_SF_ANY, "{dmac_device_init::mac_fcs_init failed.}"); dmac_res_free_mac_dev(uc_dev_id); mac_res_free_dev(uc_dev_id); return OAL_FAIL; } /* 算法框架初始化 */ ul_ret = dmac_alg_init(pst_device); if (OAL_SUCC != ul_ret) { OAM_WARNING_LOG1(0, OAM_SF_ANY, "{dmac_device_init::dmac_alg_init failed[%d].}", ul_ret); dmac_res_free_mac_dev(uc_dev_id); mac_res_free_dev(uc_dev_id); return ul_ret; } /* 算法距离、干扰等状态初始化 */ dmac_alg_stat_init(pst_dmac_device); pst_device->us_total_mpdu_num = 0; /* 错误计数初始化 */ OAL_MEMZERO(pst_device->aul_mac_err_cnt, OAL_SIZEOF(pst_device->aul_mac_err_cnt)); /*初始化记录性能统计第一次时间戳*/ pst_device->ul_first_timestamp = 0; pst_device->ul_rx_buf_too_small_show_counter = 0; #if (_PRE_PRODUCT_ID == _PRE_PRODUCT_ID_HI1151) pst_device->ul_rx_fsm_st_timeout_show_counter = 0; pst_device->ul_tx_fsm_st_timeout_show_counter = 0; pst_device->ul_beacon_miss_show_counter = 0; pst_device->us_user_nums_max = WLAN_ASSOC_USER_MAX_NUM_SPEC; pst_device->ul_pcie_reg110_timeout_counter = 0; pst_device->ul_pcie_read_counter = 0; /* DTS2015100700205,特殊网卡兼容性问题规避方案: 会发生DataFlow Break时候会影响性能 */ pst_device->st_dataflow_brk_bypass.en_brk_limit_aggr_enable = OAL_FALSE; pst_device->st_dataflow_brk_bypass.ul_tx_dataflow_brk_cnt = 0; pst_device->st_dataflow_brk_bypass.ul_last_tx_complete_isr_cnt = 0; #endif for (ul_loop = 0; ul_loop < WLAN_WME_AC_BUTT; ul_loop++) { pst_device->aus_ac_mpdu_num[ul_loop] = 0; } for (ul_loop = 0; ul_loop < WLAN_VAP_SUPPORT_MAX_NUM_LIMIT; ul_loop++) { pst_device->aus_vap_mpdu_num[ul_loop] = 0; } for (ul_loop = WLAN_WME_AC_BE; ul_loop < WLAN_WME_AC_BUTT; ul_loop++) { pst_device->aus_ac_mpdu_num[ul_loop] = 0; } #ifdef _PRE_WLAN_DFT_STAT /* 初始化维测参数,空口环境类参数 */ OAL_MEMZERO(&(pst_device->st_dbb_env_param_ctx), OAL_SIZEOF(mac_device_dbb_env_param_ctx_stru)); #endif #ifdef _PRE_WLAN_FEATURE_PM pst_device->en_pm_enable = OAL_FALSE; mac_pm_arbiter_init(pst_device); #endif /* 初始化TXOP特性相关值 */ pst_device->en_txop_enable = OAL_FALSE; pst_device->uc_tx_ba_num = 0; /* 从eeprom或flash获得MAC地址 */ hal_get_hw_addr(pst_device->pst_device_stru, pst_device->auc_hw_addr); /* 初始化DEVICE下的速率集 */ hal_get_rate_80211g_table(pst_device->pst_device_stru, (oal_void *)&pst_data_rate); hal_get_rate_80211g_num(pst_device->pst_device_stru, &ul_rate_num); for (ul_idx = 0; ul_idx < ul_rate_num; ul_idx++) { oal_memcopy(&(pst_device->st_mac_rates_11g[ul_idx]),&pst_data_rate[ul_idx],OAL_SIZEOF(mac_data_rate_stru)); } /* 初始化2.4G和5G的RTS速率, RTS[0~2]设为24Mbps, RTS[3]在2.4G设为1Mbps、5G设为24Mbps*/ st_hal_rts_tx_param.auc_protocol_mode[0] = WLAN_LEGACY_OFDM_PHY_PROTOCOL_MODE; st_hal_rts_tx_param.auc_rate[0] = WLAN_LEGACY_OFDM_24M_BPS; st_hal_rts_tx_param.auc_protocol_mode[1] = WLAN_LEGACY_OFDM_PHY_PROTOCOL_MODE; st_hal_rts_tx_param.auc_rate[1] = WLAN_LEGACY_OFDM_24M_BPS; st_hal_rts_tx_param.auc_protocol_mode[2] = WLAN_LEGACY_OFDM_PHY_PROTOCOL_MODE; st_hal_rts_tx_param.auc_rate[2] = WLAN_LEGACY_OFDM_24M_BPS; st_hal_rts_tx_param.en_band = WLAN_BAND_2G; st_hal_rts_tx_param.auc_protocol_mode[3] = WLAN_11B_PHY_PROTOCOL_MODE; st_hal_rts_tx_param.auc_rate[3] = WLAN_LONG_11b_1_M_BPS; hal_set_rts_rate_params(pst_device->pst_device_stru, &st_hal_rts_tx_param); st_hal_rts_tx_param.en_band = WLAN_BAND_5G; st_hal_rts_tx_param.auc_protocol_mode[3] = WLAN_LEGACY_OFDM_PHY_PROTOCOL_MODE; st_hal_rts_tx_param.auc_rate[3] = WLAN_LEGACY_OFDM_24M_BPS; hal_set_rts_rate_params(pst_device->pst_device_stru, &st_hal_rts_tx_param); #if (_PRE_OS_VERSION_LINUX == _PRE_OS_VERSION)||(_PRE_OS_VERSION_RAW == _PRE_OS_VERSION) /* TBD */ /* hal_enable_radar_det(pst_device->pst_device_stru, OAL_TRUE); */ pst_device->us_dfs_timeout = 0; #endif /* 初始化DMAC SCANNER */ dmac_scan_init(pst_device); #ifdef _PRE_SUPPORT_ACS /* 初始化ACS结构体 */ dmac_acs_init(pst_device); #endif #ifdef _PRE_WLAN_DFT_REG /* 初始化寄存器读取定时器 */ FRW_TIMER_CREATE_TIMER(&pst_device->st_reg_prd_timer, dmac_reg_timeout, OAM_REGSTER_REFRESH_TIME_MS, pst_device->pst_device_stru, OAL_TRUE, OAM_MODULE_ID_DMAC, pst_device->ul_core_id); #endif /* 出参赋值,CHIP中需要保存该device id */ *puc_device_id = uc_dev_id; #ifdef _PRE_WLAN_FEATURE_AMPDU #ifdef _PRE_DEBUG_MODE //#if ((_PRE_TARGET_PRODUCT_TYPE_5610DMB != _PRE_CONFIG_TARGET_PRODUCT) ) //OAL_MEMZERO(g_ast_tx_ba_track[pst_device->uc_device_id], OAL_SIZEOF(dmac_tx_ba_track_stru) * HAL_MAX_AMPDU_LUT_SIZE); //#endif #endif #endif #ifdef _PRE_DEBUG_MODE OAL_MEMZERO(&(pst_device->st_exception_report_timer), OAL_SIZEOF(frw_timeout_stru)); FRW_TIMER_CREATE_TIMER(&(pst_device->st_exception_report_timer), dmac_device_exception_report_timeout_fn, MAC_EXCEPTION_TIME_OUT, pst_device->pst_device_stru, OAL_TRUE, OAM_MODULE_ID_MAC, pst_device->ul_core_id); #endif #ifdef _PRE_WLAN_DFT_STAT /* 初始化phy统计节点 */ dmac_dft_set_phy_stat_node(pst_device, &st_phy_node_idx); #endif ul_ret = dmac_cfg_vap_init(pst_device); if(OAL_UNLIKELY(ul_ret != OAL_SUCC)) { OAM_ERROR_LOG1(0, OAM_SF_ANY, "{hmac_chip_init::hmac_cfg_vap_init failed[%d].}", ul_ret); return OAL_FAIL; } return OAL_SUCC; }
oal_uint32 dmac_11w_rx_filter(dmac_vap_stru *pst_dmac_vap, oal_netbuf_stru *pst_netbuf) { oal_uint32 ul_relt = OAL_SUCC; oal_uint8 *puc_da; dmac_rx_ctl_stru *pst_rx_ctl; mac_ieee80211_frame_stru *pst_frame_hdr; mac_user_stru *pst_user; oal_uint16 us_ta_user_idx; wlan_ciper_protocol_type_enum_uint8 en_cipher_protocol_type; pst_frame_hdr = (mac_ieee80211_frame_stru *)OAL_NETBUF_HEADER(pst_netbuf); puc_da = pst_frame_hdr->auc_address1; pst_rx_ctl = (dmac_rx_ctl_stru *)oal_netbuf_cb(pst_netbuf); en_cipher_protocol_type = hal_ctype_to_cipher_suite(pst_rx_ctl->st_rx_status.bit_cipher_protocol_type); #if (_PRE_MULTI_CORE_MODE_OFFLOAD_DMAC == _PRE_MULTI_CORE_MODE) us_ta_user_idx = pst_rx_ctl->st_rx_info.bit_ta_user_idx; #else us_ta_user_idx = pst_rx_ctl->st_rx_info.us_ta_user_idx; #endif pst_user = (mac_user_stru *)mac_res_get_dmac_user(us_ta_user_idx); if (OAL_PTR_NULL == pst_user) { return OAL_SUCC; } if ((OAL_TRUE != pst_user->st_cap_info.bit_pmf_active) || (OAL_TRUE != dmac_11w_robust_frame(pst_netbuf) )) { return OAL_SUCC; } /* 广播Robust帧过滤 */ if (OAL_TRUE == ETHER_IS_MULTICAST(puc_da)) { ul_relt = OAL_SUCC; #if(_PRE_WLAN_FEATURE_PMF == _PRE_PMF_HW_CCMP_BIP) if (WLAN_80211_CIPHER_SUITE_BIP != en_cipher_protocol_type) { OAM_WARNING_LOG1(pst_dmac_vap->st_vap_base_info.uc_vap_id, OAM_SF_PMF, "{dmac_11w_rx_filter::PMF is open,but is Robust muti frame chipertype is[%d].}", en_cipher_protocol_type); return OAL_ERR_CODE_PMF_NO_PROTECTED_ERROR; } #else /* 11w组播管理帧解密 */ ul_relt = dmac_bip_decrypto(pst_dmac_vap, pst_netbuf); if (OAL_SUCC != ul_relt) { /* 组播解密失败,不上报管理帧 */ OAM_WARNING_LOG1(pst_dmac_vap->st_vap_base_info.uc_vap_id, OAM_SF_PMF, "{dmac_11w_rx_filter::dmac_bip_decrypto failed[%d].}", ul_relt); } #endif return ul_relt; } /* pmf使能,对硬件不能过滤的未加密帧进行过滤 */ if (WLAN_80211_CIPHER_SUITE_NO_ENCRYP == en_cipher_protocol_type) { OAM_WARNING_LOG0(pst_dmac_vap->st_vap_base_info.uc_vap_id, OAM_SF_PMF, "{dmac_11w_rx_filter::PMF is open,but the Robust frame is CIPHER_SUITE_NO_ENCRYP.}"); return OAL_ERR_CODE_PMF_NO_PROTECTED_ERROR; } /* PMF单播管理帧校验 */ if ((OAL_FALSE == pst_frame_hdr->st_frame_control.bit_protected_frame)|| (WLAN_80211_CIPHER_SUITE_CCMP != en_cipher_protocol_type)) { OAM_WARNING_LOG2(pst_dmac_vap->st_vap_base_info.uc_vap_id, OAM_SF_PMF, "{dmac_11w_rx_filter::robust_action protecter incorect. bit_protected_frame[%d], cipher_type[%d].}", pst_frame_hdr->st_frame_control.bit_protected_frame, en_cipher_protocol_type); return OAL_ERR_CODE_PMF_NO_PROTECTED_ERROR; } return OAL_SUCC; }