diff --git a/core/rtw_ap.c b/core/rtw_ap.c index 91adbf6..2cabeb9 100644 --- a/core/rtw_ap.c +++ b/core/rtw_ap.c @@ -1349,8 +1349,6 @@ int rtw_acl_remove_sta(_adapter *padapter, u8 *addr) } -#ifdef CONFIG_NATIVEAP_MLME - static void update_bcn_fixed_ie(_adapter *padapter) { DBG_88E("%s\n", __func__); @@ -2253,5 +2251,4 @@ void stop_ap_mode(_adapter *padapter) } -#endif /* CONFIG_NATIVEAP_MLME */ #endif /* CONFIG_AP_MODE */ diff --git a/core/rtw_ioctl_set.c b/core/rtw_ioctl_set.c index cfa8184..023a272 100644 --- a/core/rtw_ioctl_set.c +++ b/core/rtw_ioctl_set.c @@ -427,7 +427,7 @@ _func_enter_; /* change to other mode from Ndis802_11APMode */ cur_network->join_res = -1; -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE stop_ap_mode(padapter); #endif } @@ -463,7 +463,7 @@ _func_enter_; case Ndis802_11APMode: set_fwstate(pmlmepriv, WIFI_AP_STATE); -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE start_ap_mode(padapter); #endif diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index cedc436..70fc4e4 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -122,7 +122,7 @@ static void rtw_free_mlme_ie_data(u8 **ppie, u32 *plen) void rtw_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv) { -#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +#if defined (CONFIG_AP_MODE) rtw_buf_free(&pmlmepriv->assoc_req, &pmlmepriv->assoc_req_len); rtw_buf_free(&pmlmepriv->assoc_rsp, &pmlmepriv->assoc_rsp_len); rtw_free_mlme_ie_data(&pmlmepriv->wps_beacon_ie, &pmlmepriv->wps_beacon_ie_len); @@ -1690,7 +1690,7 @@ static u8 search_max_mac_id(_adapter *padapter) struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct sta_priv *pstapriv = &padapter->stapriv; -#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +#if defined (CONFIG_AP_MODE) if (check_fwstate(pmlmepriv, WIFI_AP_STATE)){ for (aid = (pstapriv->max_num_sta); aid > 0; aid--) @@ -1698,13 +1698,6 @@ static u8 search_max_mac_id(_adapter *padapter) if (pstapriv->sta_aid[aid-1] != NULL) break; } -/* - for (mac_id = (pstapriv->max_num_sta-1); mac_id >= 0; mac_id--) - { - if (pstapriv->sta_aid[mac_id] != NULL) - break; - } -*/ mac_id = aid + 1; } else @@ -1754,7 +1747,7 @@ _func_enter_; if (rtw_access_ctrl(adapter, pstassoc->macaddr) == false) return; -#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +#if defined (CONFIG_AP_MODE) if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) { psta = rtw_get_stainfo(&adapter->stapriv, pstassoc->macaddr); diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index a21e080..39d006d 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -53,29 +53,6 @@ static struct mlme_handler mlme_sta_tbl[]={ {WIFI_ACTION, "OnAction", &OnAction}, }; -#ifdef _CONFIG_NATIVEAP_MLME_ -struct mlme_handler mlme_ap_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", &OnAuth}, - {WIFI_DEAUTH, "OnDeAuth", &OnDeAuth}, - {WIFI_ACTION, "OnAction", &OnAction}, -}; -#endif - 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}, @@ -1165,7 +1142,7 @@ unsigned int OnAuth(_adapter *padapter, union recv_frame *precv_frame) /* Now, we are going to issue_auth... */ pstat->auth_seq = seq + 1; -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE issue_auth(padapter, pstat, (unsigned short)(_STATS_SUCCESSFUL_)); #endif @@ -1184,7 +1161,7 @@ auth_fail: pstat->auth_seq = 2; _rtw_memcpy(pstat->hwaddr, sa, 6); -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE issue_auth(padapter, pstat, (unsigned short)status); #endif @@ -1803,7 +1780,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) /* now the station is qualified to join our BSS... */ if (pstat && (pstat->state & WIFI_FW_ASSOC_SUCCESS) && (_STATS_SUCCESSFUL_==status)) { -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE /* 1 bss_cap_update & sta_info_update */ bss_cap_update_on_sta_join(padapter, pstat); sta_info_update(padapter, pstat); @@ -1855,7 +1832,7 @@ unsigned int OnAssocReq(_adapter *padapter, union recv_frame *precv_frame) asoc_class2_error: -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE issue_deauth(padapter, (void *)GetAddr2Ptr(pframe), status); #endif @@ -1864,7 +1841,7 @@ asoc_class2_error: OnAssocReqFail: -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE pstat->aid = 0; if (frame_type == WIFI_ASSOCREQ) issue_asocrsp(padapter, status, pstat, WIFI_ASSOCRSP); @@ -5503,10 +5480,10 @@ void issue_beacon(_adapter *padapter, int timeout_ms) unsigned short *fctrl; unsigned int rate_len; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +#if defined (CONFIG_AP_MODE) _irqL irqL; struct mlme_priv *pmlmepriv = &(padapter->mlmepriv); -#endif /* if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) */ +#endif /* if defined (CONFIG_AP_MODE) */ struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); @@ -5523,9 +5500,9 @@ void issue_beacon(_adapter *padapter, int timeout_ms) DBG_88E("%s, alloc mgnt frame fail\n", __func__); return; } -#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +#if defined (CONFIG_AP_MODE) _enter_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); -#endif /* if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) */ +#endif /* if defined (CONFIG_AP_MODE) */ /* update attribute */ pattrib = &pmgntframe->attrib; @@ -5787,11 +5764,11 @@ void issue_beacon(_adapter *padapter, int timeout_ms) _issue_bcn: -#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +#if defined (CONFIG_AP_MODE) pmlmepriv->update_bcn = false; _exit_critical_bh(&pmlmepriv->bcn_update_lock, &irqL); -#endif /* if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) */ +#endif /* if defined (CONFIG_AP_MODE) */ if ((pattrib->pktlen + TXDESC_SIZE) > 512) { @@ -5818,11 +5795,11 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe unsigned short *fctrl; unsigned char *mac, *bssid; struct xmit_priv *pxmitpriv = &(padapter->xmitpriv); -#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +#if defined (CONFIG_AP_MODE) u8 *pwps_ie; uint wps_ielen; struct mlme_priv *pmlmepriv = &padapter->mlmepriv; -#endif /* if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) */ +#endif /* if defined (CONFIG_AP_MODE) */ struct mlme_ext_priv *pmlmeext = &(padapter->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); WLAN_BSSID_EX *cur_network = &(pmlmeinfo->network); @@ -5873,7 +5850,7 @@ void issue_probersp(_adapter *padapter, unsigned char *da, u8 is_valid_p2p_probe if (cur_network->IELength>MAX_IE_SZ) return; -#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +#if defined (CONFIG_AP_MODE) if ( (pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) { pwps_ie = rtw_get_wps_ie(cur_network->IEs+_FIXED_IE_LENGTH_, cur_network->IELength-_FIXED_IE_LENGTH_, NULL, &wps_ielen); @@ -6221,7 +6198,7 @@ void issue_auth(_adapter *padapter, struct sta_info *psta, unsigned short status if (psta)/* for AP mode */ { -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE _rtw_memcpy(pwlanhdr->addr1, psta->hwaddr, ETH_ALEN); _rtw_memcpy(pwlanhdr->addr2, myid(&(padapter->eeprompriv)), ETH_ALEN); @@ -9549,9 +9526,6 @@ u8 setopmode_hdl(_adapter *padapter, u8 *pbuf) { pmlmeinfo->state = WIFI_FW_AP_STATE; type = _HW_STATE_AP_; -#ifdef CONFIG_NATIVEAP_MLME - /* start_ap_mode(padapter); */ -#endif } else if (psetop->mode == Ndis802_11Infrastructure) { diff --git a/core/rtw_sta_mgt.c b/core/rtw_sta_mgt.c index 73af419..0c4288e 100644 --- a/core/rtw_sta_mgt.c +++ b/core/rtw_sta_mgt.c @@ -58,7 +58,7 @@ _func_enter_; psta->bpairwise_key_installed = false; -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE psta->nonerp_set = 0; psta->no_short_slot_time_set = 0; psta->no_short_preamble_set = 0; @@ -516,11 +516,6 @@ _func_enter_; #ifdef CONFIG_AP_MODE -/* - _enter_critical_bh(&pstapriv->asoc_list_lock, &irqL0); - rtw_list_delete(&psta->asoc_list); - _exit_critical_bh(&pstapriv->asoc_list_lock, &irqL0); -*/ _enter_critical_bh(&pstapriv->auth_list_lock, &irqL0); if (!rtw_is_list_empty(&psta->auth_list)) { rtw_list_delete(&psta->auth_list); @@ -541,21 +536,16 @@ _func_enter_; psta->has_legacy_ac = 0; -#ifdef CONFIG_NATIVEAP_MLME pstapriv->sta_dz_bitmap &=~BIT(psta->aid); pstapriv->tim_bitmap &=~BIT(psta->aid); - /* rtw_indicate_sta_disassoc_event(padapter, psta); */ - if ((psta->aid >0)&&(pstapriv->sta_aid[psta->aid - 1] == psta)) { pstapriv->sta_aid[psta->aid - 1] = NULL; psta->aid = 0; } -#endif /* CONFIG_NATIVEAP_MLME */ - psta->under_exist_checking = 0; #endif /* CONFIG_AP_MODE */ diff --git a/hal/hal_intf.c b/hal/hal_intf.c index fcba235..f379c78 100644 --- a/hal/hal_intf.c +++ b/hal/hal_intf.c @@ -262,7 +262,7 @@ void rtw_hal_update_ra_mask(_adapter *padapter, u32 mac_id, u8 rssi_level) { struct sta_info *psta = NULL; struct sta_priv *pstapriv = &padapter->stapriv; -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE if ((mac_id-1)>0) psta = pstapriv->sta_aid[(mac_id-1) - 1]; #endif diff --git a/include/autoconf.h b/include/autoconf.h index d01170e..77386e3 100644 --- a/include/autoconf.h +++ b/include/autoconf.h @@ -55,8 +55,6 @@ #ifdef CONFIG_INTERRUPT_BASED_TXBCN #define CONFIG_INTERRUPT_BASED_TXBCN_BCN_OK_ERR #endif - - #define CONFIG_NATIVEAP_MLME #endif #define CONFIG_P2P diff --git a/include/rtw_ap.h b/include/rtw_ap.h index aa43fdb..882fe98 100644 --- a/include/rtw_ap.h +++ b/include/rtw_ap.h @@ -46,7 +46,7 @@ void rtw_set_macaddr_acl(_adapter *padapter, int mode); int rtw_acl_add_sta(_adapter *padapter, u8 *addr); int rtw_acl_remove_sta(_adapter *padapter, u8 *addr); -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE void associated_clients_update(_adapter *padapter, u8 updated); void bss_cap_update_on_sta_join(_adapter *padapter, struct sta_info *psta); u8 bss_cap_update_on_sta_leave(_adapter *padapter, struct sta_info *psta); diff --git a/include/rtw_mlme.h b/include/rtw_mlme.h index 62eb03e..6489882 100644 --- a/include/rtw_mlme.h +++ b/include/rtw_mlme.h @@ -429,7 +429,7 @@ struct mlme_priv { u8 *wps_probe_req_ie; u32 wps_probe_req_ie_len; -#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +#if defined (CONFIG_AP_MODE) /* Number of associated Non-ERP stations (i.e., stations using 802.11b * in 802.11g BSS) */ int num_sta_non_erp; @@ -501,7 +501,7 @@ struct mlme_priv { u8 update_bcn; -#endif //#if defined (CONFIG_AP_MODE) && defined (CONFIG_NATIVEAP_MLME) +#endif //#if defined (CONFIG_AP_MODE) #if defined(CONFIG_WFD) && defined(CONFIG_IOCTL_CFG80211) diff --git a/include/sta_info.h b/include/sta_info.h index 61a55e8..d9076ab 100644 --- a/include/sta_info.h +++ b/include/sta_info.h @@ -175,7 +175,7 @@ struct sta_info { u8 bpairwise_key_installed; -#ifdef CONFIG_NATIVEAP_MLME +#ifdef CONFIG_AP_MODE u8 wpa_ie[32]; u8 nonerp_set; @@ -184,7 +184,7 @@ struct sta_info { u8 no_ht_gf_set; u8 no_ht_set; u8 ht_20mhz_set; -#endif // CONFIG_NATIVEAP_MLME +#endif // CONFIG_AP_MODE unsigned int tx_ra_bitmap; u8 qos_info;