diff --git a/Kbuild b/Kbuild index dbd2d962e911..b6775d260c6d 100644 --- a/Kbuild +++ b/Kbuild @@ -469,10 +469,6 @@ MAC_LIM_OBJS := $(MAC_SRC_DIR)/pe/lim/lim_aid_mgmt.o \ $(MAC_SRC_DIR)/pe/lim/lim_trace.o \ $(MAC_SRC_DIR)/pe/lim/lim_utils.o -ifeq ($(CONFIG_QCA_IBSS_SUPPORT), y) -MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/lim_ibss_peer_mgmt.o -endif - ifeq ($(CONFIG_QCOM_TDLS), y) MAC_LIM_OBJS += $(MAC_SRC_DIR)/pe/lim/lim_process_tdls.o endif @@ -2654,10 +2650,6 @@ cppflags-$(CONFIG_FEATURE_STATS_EXT) += -DWLAN_FEATURE_STATS_EXT cppflags-$(CONFIG_QCACLD_FEATURE_NAN) += -DWLAN_FEATURE_NAN cppflags-$(CONFIG_NDP_SAP_CONCURRENCY_ENABLE) += -DNDP_SAP_CONCURRENCY_ENABLE -ifeq ($(CONFIG_QCA_IBSS_SUPPORT), y) -cppflags-$(CONFIG_QCA_IBSS_SUPPORT) += -DQCA_IBSS_SUPPORT -endif - ifeq ($(CONFIG_DFS_FCC_TYPE4_DURATION_CHECK), y) cppflags-$(CONFIG_DFS_FCC_TYPE4_DURATION_CHECK) += -DDFS_FCC_TYPE4_DURATION_CHECK endif diff --git a/components/pmo/core/inc/wlan_pmo_suspend_resume.h b/components/pmo/core/inc/wlan_pmo_suspend_resume.h index 33e2a7c48388..f965e624f353 100644 --- a/components/pmo/core/inc/wlan_pmo_suspend_resume.h +++ b/components/pmo/core/inc/wlan_pmo_suspend_resume.h @@ -260,33 +260,6 @@ bool pmo_is_vdev_in_ap_mode(struct wlan_objmgr_vdev *vdev) return (mode == QDF_SAP_MODE || mode == QDF_P2P_GO_MODE) == 1 ? 1 : 0; } -#ifdef QCA_IBSS_SUPPORT -/** - * pmo_is_vdev_in_ibss_mode() - check that vdev is in ibss mode or not - * @vdev: objmgr vdev handle - * @vdev_id: vdev id - * - * Helper function to know whether given vdev id - * is in IBSS mode or not. - * - * Return: True/False - */ -static inline -bool pmo_is_vdev_in_ibss_mode(struct wlan_objmgr_vdev *vdev) -{ - enum QDF_OPMODE mode; - - mode = pmo_get_vdev_opmode(vdev); - - return (mode == QDF_IBSS_MODE) ? true : false; -} -#else -static inline bool pmo_is_vdev_in_ibss_mode(struct wlan_objmgr_vdev *vdev) -{ - return false; -} -#endif /* QCA_IBSS_SUPPORT */ - /** * pmo_handle_initial_wake_up() - handle initial wake up * @cb_ctx: callback context diff --git a/configs/genoa.common b/configs/genoa.common index 9f725b512ee2..e12ba417d264 100644 --- a/configs/genoa.common +++ b/configs/genoa.common @@ -253,11 +253,9 @@ CONFIG_FEATURE_WLAN_STA_4ADDR_SCHEME := y CONFIG_MDM_PLATFORM := y CONFIG_FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE := y CONFIG_FEATURE_AP_MCC_CH_AVOIDANCE := y -CONFIG_QCA_IBSS_SUPPORT := n CONFIG_WLAN_OPEN_P2P_INTERFACE := n CONFIG_WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY := n else -CONFIG_QCA_IBSS_SUPPORT := y CONFIG_WLAN_OPEN_P2P_INTERFACE := y CONFIG_WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY := y endif diff --git a/configs/qca6390_defconfig b/configs/qca6390_defconfig index 51fff6e9a47c..1c79ba7707c9 100644 --- a/configs/qca6390_defconfig +++ b/configs/qca6390_defconfig @@ -455,7 +455,6 @@ CONFIG_FEATURE_WLAN_STA_AP_MODE_DFS_DISABLE := y CONFIG_FEATURE_AP_MCC_CH_AVOIDANCE := y else CONFIG_QCOM_ESE := y -CONFIG_QCA_IBSS_SUPPORT := y CONFIG_WLAN_OPEN_P2P_INTERFACE := y CONFIG_WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY := y endif diff --git a/configs/qcs40x.snoc.perf_defconfig b/configs/qcs40x.snoc.perf_defconfig index 0dd909d814c0..45ff7a59da94 100644 --- a/configs/qcs40x.snoc.perf_defconfig +++ b/configs/qcs40x.snoc.perf_defconfig @@ -15,7 +15,6 @@ CONFIG_POWER_MANAGEMENT_OFFLOAD := y CONFIG_LFR_SUBNET_DETECTION := y CONFIG_MCC_TO_SCC_SWITCH := y CONFIG_QCOM_ESE := y -CONFIG_QCA_IBSS_SUPPORT := n CONFIG_WLAN_OPEN_P2P_INTERFACE := y CONFIG_WLAN_ENABLE_SOCIAL_CHANNELS_5G_ONLY := y CONFIG_WLAN_DFS_MASTER_ENABLE := y diff --git a/core/mac/inc/ani_global.h b/core/mac/inc/ani_global.h index 84b8de5be830..98bfa8d39e80 100644 --- a/core/mac/inc/ani_global.h +++ b/core/mac/inc/ani_global.h @@ -234,12 +234,6 @@ typedef void (*CHANGE_CHANNEL_CALLBACK)(struct mac_context *mac, QDF_STATUS stat uint32_t *data, struct pe_session *pe_session); -/* / LIM global definitions */ -struct lim_ibss_info { - void *mac_hdr; - void *beacon; -}; - typedef struct sDialogueToken { /* bytes 0-3 */ uint16_t assocId; @@ -338,20 +332,6 @@ typedef struct sAniSirLim { /* //////////////////////////////////////// BSS RELATED END /////////////////////////////////////////// */ - /* //////////////////////////////////////// IBSS RELATED START /////////////////////////////////////////// */ - /* This indicates whether this STA coalesced and adapter to peer's capabilities or not. */ - uint8_t gLimIbssCoalescingHappened; - - /* / Definition for storing IBSS peers BSS description */ - tLimIbssPeerNode *gLimIbssPeerList; - uint32_t gLimNumIbssPeers; - uint32_t ibss_retry_cnt; - - /* ibss info - params for which ibss to join while coalescing */ - struct lim_ibss_info ibss_info; - - /* //////////////////////////////////////// IBSS RELATED END /////////////////////////////////////////// */ - /* //////////////////////////////////////// STATS/COUNTER RELATED START /////////////////////////////////////////// */ uint16_t maxStation; @@ -728,8 +708,6 @@ struct vdev_type_nss { * struct mgmt_beacon_probe_filter * @num_sta_sessions: Number of active PE STA sessions * @sta_bssid: Array of PE STA session's peer BSSIDs - * @num_ibss_sessions: Number of active PE IBSS sessions - * @ibss_ssid: Array of PE IBSS session's SSID * @num_sap_session: Number of active PE SAP sessions * @sap_channel: Array of PE SAP session's channels * @@ -739,8 +717,6 @@ struct vdev_type_nss { struct mgmt_beacon_probe_filter { uint8_t num_sta_sessions; tSirMacAddr sta_bssid[WLAN_MAX_VDEVS]; - uint8_t num_ibss_sessions; - tSirMacSSid ibss_ssid[WLAN_MAX_VDEVS]; uint8_t num_sap_sessions; uint8_t sap_channel[WLAN_MAX_VDEVS]; }; diff --git a/core/mac/inc/sir_api.h b/core/mac/inc/sir_api.h index 8eeb03a94c63..b8976118e48f 100644 --- a/core/mac/inc/sir_api.h +++ b/core/mac/inc/sir_api.h @@ -464,7 +464,6 @@ struct sir_set_antenna_mode { * * @eSIR_INFRASTRUCTURE_MODE: Infrastructure station * @eSIR_INFRA_AP_MODE: softAP mode - * @eSIR_IBSS_MODE: IBSS mode * @eSIR_AUTO_MODE: Auto role * @eSIR_MONITOR_MODE: Monitor mode * @eSIR_NDI_MODE: NAN datapath mode @@ -472,7 +471,6 @@ struct sir_set_antenna_mode { enum bss_type { eSIR_INFRASTRUCTURE_MODE, eSIR_INFRA_AP_MODE, - eSIR_IBSS_MODE, eSIR_AUTO_MODE, eSIR_MONITOR_MODE, eSIR_NDI_MODE, @@ -1163,10 +1161,6 @@ typedef enum eSirSmeStatusChangeCode { eSIR_SME_DISASSOC_FROM_PEER, eSIR_SME_LOST_LINK_WITH_PEER, eSIR_SME_CHANNEL_SWITCH, - eSIR_SME_JOINED_NEW_BSS, - eSIR_SME_LEAVING_BSS, - eSIR_SME_IBSS_ACTIVE, - eSIR_SME_IBSS_INACTIVE, eSIR_SME_RADAR_DETECTED, eSIR_SME_AP_CAPS_CHANGED, } tSirSmeStatusChangeCode; @@ -1194,13 +1188,6 @@ struct ap_new_caps { * eSIR_SME_DISASSOC_FROM_PEER Reason code received in DISASSOC frame * eSIR_SME_LOST_LINK_WITH_PEER None * eSIR_SME_CHANNEL_SWITCH New channel number - * eSIR_SME_JOINED_NEW_BSS BSSID, SSID and channel number - * eSIR_SME_LEAVING_BSS None - * eSIR_SME_IBSS_ACTIVE Indicates that another STA joined - * IBSS apart from this STA that - * started IBSS - * eSIR_SME_IBSS_INACTIVE Indicates that only this STA is left - * in IBSS * eSIR_SME_RADAR_DETECTED Indicates that radar is detected * eSIR_SME_AP_CAPS_CHANGED Indicates that capabilities of the AP * that STA is currently associated with @@ -1222,11 +1209,6 @@ struct wm_status_change_ntf { /* none for eSIR_SME_LOST_LINK_WITH_PEER */ /* eSIR_SME_CHANNEL_SWITCH */ uint32_t new_freq; - /* eSIR_SME_JOINED_NEW_BSS */ - struct new_bss_info newBssInfo; - /* none for eSIR_SME_LEAVING_BSS */ - /* none for eSIR_SME_IBSS_ACTIVE */ - /* none for eSIR_SME_IBSS_INACTIVE */ /* none for eSIR_SME_RADAR_DETECTED */ /* eSIR_SME_AP_CAPS_CHANGED */ struct ap_new_caps apNewCaps; @@ -1605,11 +1587,6 @@ typedef struct sSmeIbssPeerInd { /* Beacon will be appended for new Peer indication. */ } tSmeIbssPeerInd, *tpSmeIbssPeerInd; -struct ibss_peer_inactivity_ind { - uint8_t bss_idx; - struct qdf_mac_addr peer_addr; -}; - /** * struct lim_channel_status * @channelfreq: Channel freq diff --git a/core/mac/inc/wni_api.h b/core/mac/inc/wni_api.h index d348744cf227..53e9200994c3 100644 --- a/core/mac/inc/wni_api.h +++ b/core/mac/inc/wni_api.h @@ -53,8 +53,6 @@ enum eWniMsgTypes { eWNI_SME_DEAUTH_IND = SIR_SME_MSG_TYPES_BEGIN + 14, eWNI_SME_DISCONNECT_DONE_IND = SIR_SME_MSG_TYPES_BEGIN + 15, eWNI_SME_WM_STATUS_CHANGE_NTF = SIR_SME_MSG_TYPES_BEGIN + 16, - eWNI_SME_IBSS_NEW_PEER_IND = SIR_SME_MSG_TYPES_BEGIN + 17, - eWNI_SME_IBSS_PEER_DEPARTED_IND = SIR_SME_MSG_TYPES_BEGIN + 18, eWNI_SME_START_BSS_REQ = SIR_SME_MSG_TYPES_BEGIN + 19, eWNI_SME_START_BSS_RSP = SIR_SME_MSG_TYPES_BEGIN + 20, eWNI_SME_ASSOC_IND = SIR_SME_MSG_TYPES_BEGIN + 21, diff --git a/core/mac/src/include/parser_api.h b/core/mac/src/include/parser_api.h index 5db01c520d1f..a9914feb3432 100644 --- a/core/mac/src/include/parser_api.h +++ b/core/mac/src/include/parser_api.h @@ -779,9 +779,6 @@ QDF_STATUS populate_dot11f_ht_info(struct mac_context *mac, tDot11fIEHTInfo *pDot11f, struct pe_session *pe_session); -void populate_dot11f_ibss_params(struct mac_context *mac, - tDot11fIEIBSSParams *pDot11f, - struct pe_session *pe_session); #ifdef ANI_SUPPORT_11H QDF_STATUS diff --git a/core/mac/src/include/sir_params.h b/core/mac/src/include/sir_params.h index a6a48d35a548..547bb1eb8aaf 100644 --- a/core/mac/src/include/sir_params.h +++ b/core/mac/src/include/sir_params.h @@ -367,7 +367,6 @@ struct sir_cfg_action_frm_tb_ppdu { #define SIR_HAL_RX_SCAN_EVENT (SIR_HAL_ITC_MSG_TYPES_BEGIN + 147) #define SIR_HAL_DHCP_START_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 148) #define SIR_HAL_DHCP_STOP_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 149) -#define SIR_HAL_IBSS_PEER_INACTIVITY_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 150) #define SIR_HAL_LPHB_CONF_IND (SIR_HAL_ITC_MSG_TYPES_BEGIN + 151) diff --git a/core/mac/src/pe/include/lim_api.h b/core/mac/src/pe/include/lim_api.h index b7daccc4dec8..4c1cafd55c04 100644 --- a/core/mac/src/pe/include/lim_api.h +++ b/core/mac/src/pe/include/lim_api.h @@ -50,7 +50,6 @@ #define GET_LIM_SYSTEM_ROLE(pe_session) (pe_session->limSystemRole) #define LIM_IS_AP_ROLE(pe_session) (GET_LIM_SYSTEM_ROLE(pe_session) == eLIM_AP_ROLE) #define LIM_IS_STA_ROLE(pe_session) (GET_LIM_SYSTEM_ROLE(pe_session) == eLIM_STA_ROLE) -#define LIM_IS_IBSS_ROLE(pe_session) (GET_LIM_SYSTEM_ROLE(pe_session) == eLIM_STA_IN_IBSS_ROLE) #define LIM_IS_UNKNOWN_ROLE(pe_session) (GET_LIM_SYSTEM_ROLE(pe_session) == eLIM_UNKNOWN_ROLE) #define LIM_IS_P2P_DEVICE_ROLE(pe_session) (GET_LIM_SYSTEM_ROLE(pe_session) == eLIM_P2P_DEVICE_ROLE) #define LIM_IS_P2P_DEVICE_GO(pe_session) (GET_LIM_SYSTEM_ROLE(pe_session) == eLIM_P2P_DEVICE_GO) @@ -189,46 +188,6 @@ QDF_STATUS lim_post_msg_high_priority(struct mac_context *mac, */ void lim_message_processor(struct mac_context *, struct scheduler_msg *); -#ifdef QCA_IBSS_SUPPORT -/** - * lim_handle_ibss_coalescing() - Function to handle IBSS coalescing. - * @param mac - Pointer to Global MAC structure - * @param pBeacon - Parsed Beacon Frame structure - * @param pRxPacketInfo - Pointer to RX packet info structure - * @pe_session - pointer to pe session - * - * This function is called upon receiving Beacon/Probe Response - * while operating in IBSS mode. - * - * @return Status whether to process or ignore received Beacon Frame - */ -QDF_STATUS -lim_handle_ibss_coalescing(struct mac_context *mac, - tpSchBeaconStruct pBeacon, - uint8_t *pRxPacketInfo, - struct pe_session *pe_session); -#else -/** - * lim_handle_ibss_coalescing() - Function to handle IBSS coalescing. - * @param mac - Pointer to Global MAC structure - * @param pBeacon - Parsed Beacon Frame structure - * @param pRxPacketInfo - Pointer to RX packet info structure - * @pe_session - pointer to pe session - * - * This function is dummy - * - * @return Status whether to process or ignore received Beacon Frame - */ -static inline QDF_STATUS -lim_handle_ibss_coalescing(struct mac_context *mac, - tpSchBeaconStruct pBeacon, - uint8_t *pRxPacketInfo, - struct pe_session *pe_session) -{ - return QDF_STATUS_SUCCESS; -} -#endif - /* / Function used by other Sirius modules to read global SME state */ static inline tLimSmeStates lim_get_sme_state(struct mac_context *mac) { diff --git a/core/mac/src/pe/include/lim_global.h b/core/mac/src/pe/include/lim_global.h index 3b6e092744db..3dcad2e5aec8 100644 --- a/core/mac/src/pe/include/lim_global.h +++ b/core/mac/src/pe/include/lim_global.h @@ -57,7 +57,6 @@ typedef enum eLimSystemRole { eLIM_UNKNOWN_ROLE, eLIM_AP_ROLE, - eLIM_STA_IN_IBSS_ROLE, eLIM_STA_ROLE, eLIM_P2P_DEVICE_ROLE, eLIM_P2P_DEVICE_GO, @@ -330,76 +329,6 @@ typedef struct sLimNoShortSlotParams { tCacheParams staNoShortSlotCache[LIM_PROT_STA_CACHE_SIZE]; } tLimNoShortSlotParams, *tpLimNoShortSlotParams; -typedef struct tLimIbssPeerNode tLimIbssPeerNode; -struct tLimIbssPeerNode { - tLimIbssPeerNode *next; - tSirMacAddr peerMacAddr; - uint8_t extendedRatesPresent:1; - uint8_t edcaPresent:1; - uint8_t wmeEdcaPresent:1; - uint8_t wmeInfoPresent:1; - uint8_t htCapable:1; - uint8_t vhtCapable:1; - uint8_t rsvd:2; - uint8_t htSecondaryChannelOffset; - tSirMacCapabilityInfo capabilityInfo; - tSirMacRateSet supportedRates; - tSirMacRateSet extendedRates; - uint8_t supportedMCSSet[SIZE_OF_SUPPORTED_MCS_SET]; - tSirMacEdcaParamSetIE edcaParams; - uint8_t erpIePresent; - - /* HT Capabilities of IBSS Peer */ - uint8_t htGreenfield; - uint8_t htShortGI40Mhz; - uint8_t htShortGI20Mhz; - - /* DSSS/CCK at 40 MHz: Enabled 1 or Disabled */ - uint8_t htDsssCckRate40MHzSupport; - - /* MIMO Power Save */ - tSirMacHTMIMOPowerSaveState htMIMOPSState; - - /* */ - /* A-MPDU Density */ - /* 000 - No restriction */ - /* 001 - 1/8 usec */ - /* 010 - 1/4 usec */ - /* 011 - 1/2 usec */ - /* 100 - 1 usec */ - /* 101 - 2 usec */ - /* 110 - 4 usec */ - /* 111 - 8 usec */ - /* */ - uint8_t htAMpduDensity; - - /* Maximum Rx A-MPDU factor */ - uint8_t htMaxRxAMpduFactor; - - /* Set to 0 for 3839 octets */ - /* Set to 1 for 7935 octets */ - uint8_t htMaxAmsduLength; - - /* */ - /* Recommended Tx Width Set */ - /* 0 - use 20 MHz channel (control channel) */ - /* 1 - use 40 Mhz channel */ - /* */ - uint8_t htSupportedChannelWidthSet; - - uint8_t htLdpcCapable; - - uint8_t beaconHBCount; - uint8_t heartbeatFailure; - - uint8_t *beacon; /* Hold beacon to be sent to HDD/CSR */ - uint16_t beaconLen; - - tDot11fIEVHTCaps VHTCaps; - uint8_t vhtSupportedChannelWidthSet; - uint8_t vhtBeamFormerCapable; -}; - /* Enums used for channel switching. */ typedef enum eLimChannelSwitchState { eLIM_CHANNEL_SWITCH_IDLE, diff --git a/core/mac/src/pe/include/lim_session.h b/core/mac/src/pe/include/lim_session.h index 99d66ac11406..626abd88c8ea 100644 --- a/core/mac/src/pe/include/lim_session.h +++ b/core/mac/src/pe/include/lim_session.h @@ -180,7 +180,6 @@ struct pe_session { /* Identifies the 40 MHz extension channel */ ePhyChanBondState htSecondaryChannelOffset; enum reg_wifi_band limRFBand; - uint8_t limIbssActive; /* TO SUPPORT CONCURRENCY */ /* These global varibales moved to session Table to support BT-AMP : Oct 9th review */ tAniAuthType limCurrentAuthType; @@ -736,7 +735,6 @@ void pe_delete_fils_info(struct pe_session *session); * * @mac_ctx: pointer to global mac context * @session: pointer to the PE session - * @ibss_ssid: SSID of the session for IBSS sessions * @sap_channel: Operating Channel of the session for SAP sessions * * Sets the beacon/probe filter in the global mac context to filter @@ -746,7 +744,6 @@ void pe_delete_fils_info(struct pe_session *session); */ void lim_set_bcn_probe_filter(struct mac_context *mac_ctx, struct pe_session *session, - tSirMacSSid *ibss_ssid, uint8_t sap_channel); /** diff --git a/core/mac/src/pe/lim/lim_aid_mgmt.c b/core/mac/src/pe/lim/lim_aid_mgmt.c index e1cde3be6a57..4d2f5dcf421a 100644 --- a/core/mac/src/pe/lim/lim_aid_mgmt.c +++ b/core/mac/src/pe/lim/lim_aid_mgmt.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2011-2016, 2018-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2011-2016, 2018-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -45,9 +45,7 @@ * @pe_session: session entry * * This function is called while starting a BSS at AP - * to initialize AID pool. This may also be called while - * starting/joining an IBSS if 'Association' is allowed - * in IBSS. + * to initialize AID pool. * * Return: None */ @@ -69,11 +67,6 @@ void lim_init_peer_idxpool(struct mac_context *mac, struct pe_session *pe_sessio if (LIM_IS_STA_ROLE(pe_session)) { pe_session->freePeerIdxHead = DPH_STA_HASH_INDEX_PEER + 1; } else -#endif -#ifdef QCA_IBSS_SUPPORT - if (LIM_IS_IBSS_ROLE(pe_session)) { - pe_session->freePeerIdxHead = LIM_START_PEER_IDX; - } else #endif { pe_session->freePeerIdxHead = LIM_START_PEER_IDX; @@ -141,7 +134,7 @@ uint16_t lim_assign_peer_idx(struct mac_context *mac, struct pe_session *pe_sess * ***FUNCTION: * This function is called when a STA context is removed - * at AP (or at a STA in IBSS mode or TDLS) to return peer Index + * at AP (or TDLS) to return peer Index * to free pool. * ***LOGIC: diff --git a/core/mac/src/pe/lim/lim_api.c b/core/mac/src/pe/lim/lim_api.c index 5f4ac7a52f4e..5ea518261796 100644 --- a/core/mac/src/pe/lim/lim_api.c +++ b/core/mac/src/pe/lim/lim_api.c @@ -42,7 +42,6 @@ #include "lim_assoc_utils.h" #include "lim_prop_exts_utils.h" #include "lim_ser_des_utils.h" -#include "lim_ibss_peer_mgmt.h" #include "lim_admit_control.h" #include "lim_send_sme_rsp_messages.h" #include "lim_security_utils.h" @@ -403,7 +402,6 @@ QDF_STATUS lim_initialize(struct mac_context *mac) mac->lim.tdls_frm_session_id = NO_SESSION; mac->lim.deferredMsgCnt = 0; mac->lim.retry_packet_cnt = 0; - mac->lim.ibss_retry_cnt = 0; mac->lim.deauthMsgCnt = 0; mac->lim.disassocMsgCnt = 0; @@ -414,9 +412,6 @@ QDF_STATUS lim_initialize(struct mac_context *mac) __lim_init_bss_vars(mac); __lim_init_ht_vars(mac); - /* Initializations for maintaining peers in IBSS */ - lim_ibss_init(mac); - rrm_initialize(mac); if (QDF_IS_STATUS_ERROR(qdf_mutex_create( @@ -1116,12 +1111,7 @@ static bool pe_filter_bcn_probe_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info) { uint8_t session_id; - uint8_t *body; - const uint8_t *ssid_ie; - uint16_t frame_len; struct mgmt_beacon_probe_filter *filter; - tpSirMacCapabilityInfo bcn_caps; - tSirMacSSid bcn_ssid; if (pe_is_ext_scan_bcn_probe_rsp(hdr, rx_pkt_info)) return true; @@ -1142,44 +1132,6 @@ static bool pe_filter_bcn_probe_frame(struct mac_context *mac_ctx, } } - /* - * If any IBSS session exists and beacon is has IBSS capability set - * and SSID matches the IBSS SSID, allow the frame - */ - if (filter->num_ibss_sessions) { - body = WMA_GET_RX_MPDU_DATA(rx_pkt_info); - frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info); - if (frame_len < SIR_MAC_B_PR_SSID_OFFSET) - return false; - - bcn_caps = (tpSirMacCapabilityInfo) - (body + SIR_MAC_B_PR_CAPAB_OFFSET); - if (!bcn_caps->ibss) - return false; - - ssid_ie = wlan_get_ie_ptr_from_eid(WLAN_ELEMID_SSID, - body + SIR_MAC_B_PR_SSID_OFFSET, - frame_len); - - if (!ssid_ie) - return false; - - bcn_ssid.length = ssid_ie[1]; - qdf_mem_copy(&bcn_ssid.ssId, - &ssid_ie[2], - bcn_ssid.length); - - for (session_id = 0; session_id < WLAN_MAX_VDEVS; - session_id++) { - if (filter->ibss_ssid[session_id].length == - bcn_ssid.length && - (!qdf_mem_cmp(filter->ibss_ssid[session_id].ssId, - bcn_ssid.ssId, bcn_ssid.length))) { - return true; - } - } - } - return false; } @@ -1440,90 +1392,6 @@ lim_update_overlap_sta_param(struct mac_context *mac, tSirMacAddr bssId, } } -#ifdef QCA_IBSS_SUPPORT -/** - * lim_ibss_enc_type_matched() - API to check enc type match - * @param pBeacon - Parsed Beacon Frame structure - * @param pSession - Pointer to the PE session - * - * This function compares the encryption type of the peer with self - * while operating in IBSS mode and detects mismatch. - * - * @return true if encryption type is matched; false otherwise - */ -static bool lim_ibss_enc_type_matched(tpSchBeaconStruct pBeacon, - struct pe_session *pSession) -{ - if (!pBeacon || !pSession) - return false; - - /* Open case */ - if (pBeacon->capabilityInfo.privacy == 0 - && pSession->encryptType == eSIR_ED_NONE) - return true; - - /* WEP case */ - if (pBeacon->capabilityInfo.privacy == 1 && pBeacon->wpaPresent == 0 - && pBeacon->rsnPresent == 0 - && (pSession->encryptType == eSIR_ED_WEP40 - || pSession->encryptType == eSIR_ED_WEP104)) - return true; - - /* WPA-None case */ - if (pBeacon->capabilityInfo.privacy == 1 && pBeacon->wpaPresent == 1 - && pBeacon->rsnPresent == 0 - && ((pSession->encryptType == eSIR_ED_CCMP) || - (pSession->encryptType == eSIR_ED_GCMP) || - (pSession->encryptType == eSIR_ED_GCMP_256) || - (pSession->encryptType == eSIR_ED_TKIP))) - return true; - - return false; -} - -QDF_STATUS -lim_handle_ibss_coalescing(struct mac_context *mac, - tpSchBeaconStruct pBeacon, - uint8_t *pRxPacketInfo, struct pe_session *pe_session) -{ - tpSirMacMgmtHdr pHdr; - QDF_STATUS retCode; - - pHdr = WMA_GET_RX_MAC_HEADER(pRxPacketInfo); - - /* Ignore the beacon when any of the conditions below is met: - 1. The beacon claims no IBSS network - 2. SSID in the beacon does not match SSID of self station - 3. Operational channel in the beacon does not match self station - 4. Encyption type in the beacon does not match with self station - */ - if ((!pBeacon->capabilityInfo.ibss) || - lim_cmp_ssid(&pBeacon->ssId, pe_session) || - (pe_session->curr_op_freq != pBeacon->chan_freq)) - retCode = QDF_STATUS_E_INVAL; - else if (lim_ibss_enc_type_matched(pBeacon, pe_session) != true) { - pe_debug("peer privacy: %d peer wpa: %d peer rsn: %d self encType: %d", - pBeacon->capabilityInfo.privacy, - pBeacon->wpaPresent, pBeacon->rsnPresent, - pe_session->encryptType); - retCode = QDF_STATUS_E_INVAL; - } else { - uint32_t ieLen; - uint16_t tsfLater; - uint8_t *pIEs; - - ieLen = WMA_GET_RX_PAYLOAD_LEN(pRxPacketInfo); - tsfLater = WMA_GET_RX_TSF_LATER(pRxPacketInfo); - pIEs = WMA_GET_RX_MPDU_DATA(pRxPacketInfo); - pe_debug("BEFORE Coalescing tsfLater val: %d", tsfLater); - retCode = - lim_ibss_coalesce(mac, pHdr, pBeacon, pIEs, ieLen, tsfLater, - pe_session); - } - return retCode; -} /*** end lim_handle_ibs_scoalescing() ***/ -#endif - /** * lim_enc_type_matched() - matches security type of incoming beracon with * current @@ -2578,7 +2446,7 @@ pe_roam_synch_callback(struct mac_context *mac_ctx, return status; } /* Update the beacon/probe filter in mac_ctx */ - lim_set_bcn_probe_filter(mac_ctx, ft_session_ptr, NULL, 0); + lim_set_bcn_probe_filter(mac_ctx, ft_session_ptr, 0); sir_copy_mac_addr(ft_session_ptr->self_mac_addr, session_ptr->self_mac_addr); @@ -2748,8 +2616,6 @@ static bool lim_is_beacon_miss_scenario(struct mac_context *mac, - In Scan State, drop the frames which are not marked as scan frames - In non-Scan state, drop the frames which are marked as scan frames. - - Drop INFRA Beacons and Probe Responses in IBSS Mode - - Drop the Probe Request in IBSS mode, if STA did not send out the last beacon \param mac - global mac structure \return - none @@ -2802,19 +2668,6 @@ tMgmtFrmDropReason lim_is_pkt_candidate_for_drop(struct mac_context *mac, if (capabilityInfo.ess) return eMGMT_DROP_INFRA_BCN_IN_IBSS; - } else if ((subType == SIR_MAC_MGMT_PROBE_REQ) && - (!WMA_GET_RX_BEACON_SENT(pRxPacketInfo))) { - pHdr = WMA_GET_RX_MAC_HEADER(pRxPacketInfo); - pe_session = pe_find_session_by_bssid(mac, - pHdr->bssId, - &sessionId); - if ((pe_session && !LIM_IS_IBSS_ROLE(pe_session)) || - (!pe_session)) - return eMGMT_DROP_NO_DROP; - - /* Drop the Probe Request in IBSS mode, if STA did not send out the last beacon */ - /* In IBSS, the node which sends out the beacon, is supposed to respond to ProbeReq */ - return eMGMT_DROP_NOT_LAST_IBSS_BCN; } else if (subType == SIR_MAC_MGMT_AUTH) { uint16_t curr_seq_num = 0; struct tLimPreAuthNode *auth_node; diff --git a/core/mac/src/pe/lim/lim_assoc_utils.c b/core/mac/src/pe/lim/lim_assoc_utils.c index 0b4973553352..b7b99785d009 100644 --- a/core/mac/src/pe/lim/lim_assoc_utils.c +++ b/core/mac/src/pe/lim/lim_assoc_utils.c @@ -44,7 +44,6 @@ #include "lim_ser_des_utils.h" #include "lim_admit_control.h" #include "lim_send_messages.h" -#include "lim_ibss_peer_mgmt.h" #include "lim_ft_defs.h" #include "lim_session.h" #include "lim_process_fils.h" @@ -1804,7 +1803,6 @@ QDF_STATUS lim_populate_peer_rate_set(struct mac_context *mac, * processing on AP and while adding peer's context * in IBSS role to process the CFG rate sets and * the rate sets received in the Assoc request on AP - * or Beacon/Probe Response from peer in IBSS. * * 1. It makes the intersection between our own rate Sat * and extemcded rate set and the ones received in the @@ -2149,8 +2147,7 @@ lim_add_sta(struct mac_context *mac_ctx, if (!add_sta_params) return QDF_STATUS_E_NOMEM; - if (LIM_IS_AP_ROLE(session_entry) || LIM_IS_IBSS_ROLE(session_entry) || - LIM_IS_NDI_ROLE(session_entry)) + if (LIM_IS_AP_ROLE(session_entry) || LIM_IS_NDI_ROLE(session_entry)) sta_Addr = &sta_ds->staAddr; #ifdef FEATURE_WLAN_TDLS /* SystemRole shouldn't be matter if staType is TDLS peer */ @@ -2201,8 +2198,7 @@ lim_add_sta(struct mac_context *mac_ctx, add_sta_params->status = QDF_STATUS_SUCCESS; /* Update VHT/HT Capability */ - if (LIM_IS_AP_ROLE(session_entry) || - LIM_IS_IBSS_ROLE(session_entry)) { + if (LIM_IS_AP_ROLE(session_entry)) { add_sta_params->htCapable = sta_ds->mlmStaContext.htCapability; add_sta_params->vhtCapable = sta_ds->mlmStaContext.vhtCapability; @@ -2918,7 +2914,7 @@ lim_delete_dph_hash_entry(struct mac_context *mac_ctx, tSirMacAddr sta_addr, */ lim_util_count_sta_del(mac_ctx, sta_ds, session_entry); - if (LIM_IS_AP_ROLE(session_entry) || LIM_IS_IBSS_ROLE(session_entry)) { + if (LIM_IS_AP_ROLE(session_entry)) { if (LIM_IS_AP_ROLE(session_entry)) { if (session_entry->gLimProtectionControl != MLME_FORCE_POLICY_PROTECTION_DISABLE) @@ -2937,10 +2933,6 @@ lim_delete_dph_hash_entry(struct mac_context *mac_ctx, tSirMacAddr sta_addr, } } - if (LIM_IS_IBSS_ROLE(session_entry)) - lim_ibss_decide_protection_on_delete(mac_ctx, sta_ds, - &beacon_params, session_entry); - lim_decide_short_preamble(mac_ctx, sta_ds, &beacon_params, session_entry); lim_decide_short_slot(mac_ctx, sta_ds, &beacon_params, diff --git a/core/mac/src/pe/lim/lim_ft_preauth.c b/core/mac/src/pe/lim/lim_ft_preauth.c index 8a2c00586bdf..ce6907eb2688 100644 --- a/core/mac/src/pe/lim/lim_ft_preauth.c +++ b/core/mac/src/pe/lim/lim_ft_preauth.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -456,9 +456,7 @@ void lim_handle_ft_pre_auth_rsp(struct mac_context *mac, QDF_STATUS status, pbssDescription->bssId); /* Update the beacon/probe filter in mac_ctx */ - lim_set_bcn_probe_filter(mac, - ft_session, - NULL, 0); + lim_set_bcn_probe_filter(mac, ft_session, 0); if (ft_session->bssType == eSIR_INFRASTRUCTURE_MODE) ft_session->limSystemRole = eLIM_STA_ROLE; diff --git a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c deleted file mode 100644 index fd062e980b6b..000000000000 --- a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.c +++ /dev/null @@ -1,1597 +0,0 @@ -/* - * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. - * - * Permission to use, copy, modify, and/or distribute this software for - * any purpose with or without fee is hereby granted, provided that the - * above copyright notice and this permission notice appear in all - * copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -#include "cds_api.h" -#include "ani_global.h" -#include "sir_common.h" -#include "wni_cfg.h" -#include "lim_utils.h" -#include "lim_assoc_utils.h" -#include "sch_api.h" /* sch_set_fixed_beacon_fields for IBSS coalesce */ -#include "lim_security_utils.h" -#include "lim_send_messages.h" -#include "lim_ft_defs.h" -#include "lim_session.h" -#include "lim_ibss_peer_mgmt.h" -#include "lim_types.h" -#include "wlan_mlme_api.h" -#include "cfg_ucfg_api.h" - -/** - * ibss_peer_find - * - ***FUNCTION: - * This function is called while adding a context at - * DPH & Polaris for a peer in IBSS. - * If peer is found in the list, capabilities from the - * returned BSS description are used at DPH node & Polaris. - * - ***LOGIC: - * - ***ASSUMPTIONS: - * - ***NOTE: - * - * @param macAddr - MAC address of the peer - * - * @return Pointer to peer node if found, else NULL - */ - -static tLimIbssPeerNode *ibss_peer_find(struct mac_context *mac, - tSirMacAddr macAddr) -{ - tLimIbssPeerNode *pTempNode = mac->lim.gLimIbssPeerList; - - while (pTempNode) { - if (!qdf_mem_cmp((uint8_t *) macAddr, - (uint8_t *) &pTempNode->peerMacAddr, - sizeof(tSirMacAddr))) - break; - pTempNode = pTempNode->next; - } - return pTempNode; -} /*** end ibss_peer_find() ***/ - -/** - * ibss_peer_add - * - ***FUNCTION: - * This is called on a STA in IBSS upon receiving Beacon/ - * Probe Response from a peer. - * - ***LOGIC: - * Node is always added to the front of the list - * - ***ASSUMPTIONS: - * - ***NOTE: - * - * @param mac - Pointer to Global MAC structure - * @param pPeerNode - Pointer to peer node to be added to the list. - * - * @return None - */ - -static QDF_STATUS -ibss_peer_add(struct mac_context *mac, tLimIbssPeerNode *pPeerNode) -{ -#ifdef ANI_SIR_IBSS_PEER_CACHING - uint32_t numIbssPeers = (2 * mac->lim.maxStation); - - if (mac->lim.gLimNumIbssPeers >= numIbssPeers) { - /** - * Reached max number of peers to be maintained. - * Delete last entry & add new entry at the beginning. - */ - tLimIbssPeerNode *pTemp, *pPrev; - - pTemp = pPrev = mac->lim.gLimIbssPeerList; - while (pTemp->next) { - pPrev = pTemp; - pTemp = pTemp->next; - } - if (pTemp->beacon) { - qdf_mem_free(pTemp->beacon); - } - - qdf_mem_free(pTemp); - pPrev->next = NULL; - } else -#endif - mac->lim.gLimNumIbssPeers++; - - pPeerNode->next = mac->lim.gLimIbssPeerList; - mac->lim.gLimIbssPeerList = pPeerNode; - - return QDF_STATUS_SUCCESS; - -} /*** end limAddIbssPeerToList() ***/ - -/** - * ibss_peer_collect - * - ***FUNCTION: - * This is called to collect IBSS peer information - * from received Beacon/Probe Response frame from it. - * - ***LOGIC: - * - ***ASSUMPTIONS: - * - ***NOTE: - * - * @param mac - Pointer to Global MAC structure - * @param pBeacon - Parsed Beacon Frame structure - * @param pBD - Pointer to received BD - * @param peer - Pointer to IBSS peer node - * - * @return None - */ - -static void -ibss_peer_collect(struct mac_context *mac, - tpSchBeaconStruct pBeacon, - tpSirMacMgmtHdr pHdr, - tLimIbssPeerNode *peer, struct pe_session *pe_session) -{ - qdf_mem_copy(peer->peerMacAddr, pHdr->sa, sizeof(tSirMacAddr)); - - peer->capabilityInfo = pBeacon->capabilityInfo; - peer->extendedRatesPresent = pBeacon->extendedRatesPresent; - peer->edcaPresent = pBeacon->edcaPresent; - peer->wmeEdcaPresent = pBeacon->wmeEdcaPresent; - peer->wmeInfoPresent = pBeacon->wmeInfoPresent; - - if (IS_DOT11_MODE_HT(pe_session->dot11mode) && - (pBeacon->HTCaps.present)) { - peer->htCapable = pBeacon->HTCaps.present; - qdf_mem_copy((uint8_t *) peer->supportedMCSSet, - (uint8_t *) pBeacon->HTCaps.supportedMCSSet, - sizeof(peer->supportedMCSSet)); - peer->htGreenfield = (uint8_t) pBeacon->HTCaps.greenField; - peer->htSupportedChannelWidthSet = - (uint8_t) pBeacon->HTCaps.supportedChannelWidthSet; - peer->htMIMOPSState = - (tSirMacHTMIMOPowerSaveState) pBeacon->HTCaps.mimoPowerSave; - peer->htMaxAmsduLength = - (uint8_t) pBeacon->HTCaps.maximalAMSDUsize; - peer->htAMpduDensity = pBeacon->HTCaps.mpduDensity; - peer->htDsssCckRate40MHzSupport = - (uint8_t) pBeacon->HTCaps.dsssCckMode40MHz; - peer->htShortGI20Mhz = (uint8_t) pBeacon->HTCaps.shortGI20MHz; - peer->htShortGI40Mhz = (uint8_t) pBeacon->HTCaps.shortGI40MHz; - peer->htMaxRxAMpduFactor = pBeacon->HTCaps.maxRxAMPDUFactor; - peer->htSecondaryChannelOffset = - pBeacon->HTInfo.secondaryChannelOffset; - peer->htLdpcCapable = (uint8_t) pBeacon->HTCaps.advCodingCap; - } - - /* Collect peer VHT capabilities based on the received beacon from the peer */ - if (pBeacon->VHTCaps.present) { - peer->vhtSupportedChannelWidthSet = - pBeacon->VHTOperation.chanWidth; - peer->vhtCapable = pBeacon->VHTCaps.present; - - /* Collect VHT capabilities from beacon */ - qdf_mem_copy((uint8_t *) &peer->VHTCaps, - (uint8_t *) &pBeacon->VHTCaps, - sizeof(tDot11fIEVHTCaps)); - } - peer->erpIePresent = pBeacon->erpPresent; - - qdf_mem_copy((uint8_t *) &peer->supportedRates, - (uint8_t *) &pBeacon->supportedRates, - pBeacon->supportedRates.numRates + 1); - if (peer->extendedRatesPresent) - qdf_mem_copy((uint8_t *) &peer->extendedRates, - (uint8_t *) &pBeacon->extendedRates, - pBeacon->extendedRates.numRates + 1); - else - peer->extendedRates.numRates = 0; - - peer->next = NULL; -} /*** end ibss_peer_collect() ***/ - -/* handle change in peer qos/wme capabilities */ -static void -ibss_sta_caps_update(struct mac_context *mac, - tLimIbssPeerNode *pPeerNode, struct pe_session *pe_session) -{ - uint16_t peerIdx; - tpDphHashNode sta; - - pPeerNode->beaconHBCount++; /* Update beacon count. */ - - /* if the peer node exists, update its qos capabilities */ - sta = dph_lookup_hash_entry(mac, pPeerNode->peerMacAddr, &peerIdx, - &pe_session->dph.dphHashTable); - if (!sta) - return; - - /* Update HT Capabilities */ - if (IS_DOT11_MODE_HT(pe_session->dot11mode)) { - sta->mlmStaContext.htCapability = pPeerNode->htCapable; - if (pPeerNode->htCapable) { - sta->htGreenfield = pPeerNode->htGreenfield; - sta->htSupportedChannelWidthSet = - pPeerNode->htSupportedChannelWidthSet; - sta->htSecondaryChannelOffset = - pPeerNode->htSecondaryChannelOffset; - sta->htMIMOPSState = pPeerNode->htMIMOPSState; - sta->htMaxAmsduLength = pPeerNode->htMaxAmsduLength; - sta->htAMpduDensity = pPeerNode->htAMpduDensity; - sta->htDsssCckRate40MHzSupport = - pPeerNode->htDsssCckRate40MHzSupport; - sta->htShortGI20Mhz = pPeerNode->htShortGI20Mhz; - sta->htShortGI40Mhz = pPeerNode->htShortGI40Mhz; - sta->htMaxRxAMpduFactor = - pPeerNode->htMaxRxAMpduFactor; - sta->htLdpcCapable = pPeerNode->htLdpcCapable; - } - } - if (IS_DOT11_MODE_VHT(pe_session->dot11mode)) { - sta->mlmStaContext.vhtCapability = pPeerNode->vhtCapable; - if (pPeerNode->vhtCapable) { - sta->vhtSupportedChannelWidthSet = - pPeerNode->vhtSupportedChannelWidthSet; - - /* If in 11AC mode and if session requires 11AC mode, consider peer's */ - /* max AMPDU length factor */ - sta->htMaxRxAMpduFactor = - pPeerNode->VHTCaps.maxAMPDULenExp; - sta->vhtLdpcCapable = - (uint8_t) pPeerNode->VHTCaps.ldpcCodingCap; - } - } - /* peer is 11e capable but is not 11e enabled yet */ - /* some STA's when joining Airgo IBSS, assert qos capability even when */ - /* they don't support qos. however, they do not include the edca parameter */ - /* set. so let's check for edcaParam in addition to the qos capability */ - if (pPeerNode->capabilityInfo.qos && (pe_session->limQosEnabled) - && pPeerNode->edcaPresent) { - sta->qosMode = 1; - sta->wmeEnabled = 0; - if (!sta->lleEnabled) { - sta->lleEnabled = 1; - /* dphSetACM(mac, sta); */ - } - return; - } - /* peer is not 11e capable now but was 11e enabled earlier */ - else if (sta->lleEnabled) { - sta->qosMode = 0; - sta->lleEnabled = 0; - } - /* peer is wme capable but is not wme enabled yet */ - if (pPeerNode->wmeInfoPresent && pe_session->limWmeEnabled) { - sta->qosMode = 1; - sta->lleEnabled = 0; - if (!sta->wmeEnabled) { - sta->wmeEnabled = 1; - } - return; - } - /* When the peer device supports EDCA parameters, then we were not - considering. Added this code when we saw that one of the Peer Device - was advertising WMM param where we were not honouring that. CR# 210756 - */ - if (pPeerNode->wmeEdcaPresent && pe_session->limWmeEnabled) { - sta->qosMode = 1; - sta->lleEnabled = 0; - if (!sta->wmeEnabled) { - sta->wmeEnabled = 1; - } - return; - } - /* peer is not wme capable now but was wme enabled earlier */ - else if (sta->wmeEnabled) { - sta->qosMode = 0; - sta->wmeEnabled = 0; - } - -} - -static void -ibss_sta_rates_update(struct mac_context *mac, - tpDphHashNode sta, - tLimIbssPeerNode *peer, struct pe_session *pe_session) -{ - lim_populate_matching_rate_set(mac, sta, &peer->supportedRates, - &peer->extendedRates, - peer->supportedMCSSet, pe_session, - &peer->VHTCaps, NULL); - sta->mlmStaContext.capabilityInfo = peer->capabilityInfo; -} /*** end ibss_sta_info_update() ***/ - -/** - * ibss_sta_info_update - * - ***FUNCTION: - * This is called to program both SW & Polaris context - * for peer in IBSS. - * - ***LOGIC: - * - ***ASSUMPTIONS: - * - ***NOTE: - * - * @param mac - Pointer to Global MAC structure - * @param sta - Pointer to DPH node - * @param peer - Pointer to IBSS peer node - * - * @return None - */ - -static void -ibss_sta_info_update(struct mac_context *mac, - tpDphHashNode sta, - tLimIbssPeerNode *peer, struct pe_session *pe_session) -{ - sta->staType = STA_ENTRY_PEER; - ibss_sta_caps_update(mac, peer, pe_session); - ibss_sta_rates_update(mac, sta, peer, pe_session); -} /*** end ibss_sta_info_update() ***/ - -static void ibss_coalesce_free(struct mac_context *mac) -{ - qdf_mem_free(mac->lim.ibss_info.mac_hdr); - mac->lim.ibss_info.mac_hdr = NULL; - qdf_mem_free(mac->lim.ibss_info.beacon); - mac->lim.ibss_info.beacon = NULL; -} - -static QDF_STATUS lim_ibss_add_bss( - struct mac_context *mac, - struct pe_session *session, - tLimMlmStartReq mlmStartReq) -{ - return wlan_vdev_mlme_sm_deliver_evt( - session->vdev, - WLAN_VDEV_SM_EV_START, - sizeof(mlmStartReq), &mlmStartReq); -} - -void lim_ibss_delete(struct mac_context *mac, struct pe_session *session) -{ - ibss_coalesce_free(mac); -} - -/* - * tries to add a new entry to dph hash node - * if necessary, an existing entry is eliminated - */ -static QDF_STATUS -ibss_dph_entry_add(struct mac_context *mac, - tSirMacAddr peerAddr, - tpDphHashNode *ppSta, struct pe_session *pe_session) -{ - uint16_t peerIdx; - tpDphHashNode sta; - - *ppSta = NULL; - - sta = - dph_lookup_hash_entry(mac, peerAddr, &peerIdx, - &pe_session->dph.dphHashTable); - if (sta) { - /* Trying to add context for already existing STA in IBSS */ - pe_err("STA exists already"); - lim_print_mac_addr(mac, peerAddr, LOGE); - return QDF_STATUS_E_FAILURE; - } - - /** - * Assign an AID, delete context existing with that - * AID and then add an entry to hash table maintained - * by DPH module. - */ - peerIdx = lim_assign_peer_idx(mac, pe_session); - - sta = - dph_get_hash_entry(mac, peerIdx, &pe_session->dph.dphHashTable); - if (sta) { - (void)lim_del_sta(mac, sta, false /*asynchronous */, - pe_session); - lim_delete_dph_hash_entry(mac, sta->staAddr, peerIdx, - pe_session); - } - - sta = - dph_add_hash_entry(mac, peerAddr, peerIdx, - &pe_session->dph.dphHashTable); - if (!sta) { - /* Could not add hash table entry */ - pe_err("could not add hash entry at DPH for peerIdx/aid: %d MACaddr:", - peerIdx); - lim_print_mac_addr(mac, peerAddr, LOGE); - return QDF_STATUS_E_FAILURE; - } - - *ppSta = sta; - return QDF_STATUS_SUCCESS; -} - -/* send a status change notification */ -static void -ibss_status_chg_notify(struct mac_context *mac, tSirMacAddr peerAddr, - uint16_t status, uint8_t sessionId) -{ - - tLimIbssPeerNode *peerNode; - uint8_t *beacon = NULL; - uint16_t bcnLen = 0; - - peerNode = ibss_peer_find(mac, peerAddr); - if (peerNode) { - if (!peerNode->beacon) - peerNode->beaconLen = 0; - beacon = peerNode->beacon; - bcnLen = peerNode->beaconLen; - peerNode->beacon = NULL; - peerNode->beaconLen = 0; - } - - lim_send_sme_ibss_peer_ind(mac, peerAddr, - beacon, bcnLen, status, sessionId); - - if (beacon) { - qdf_mem_free(beacon); - } -} - -void ibss_bss_add(struct mac_context *mac, struct pe_session *pe_session) -{ - tLimMlmStartReq mlmStartReq; - uint32_t cfg; - tpSirMacMgmtHdr pHdr = mac->lim.ibss_info.mac_hdr; - tpSchBeaconStruct pBeacon = mac->lim.ibss_info.beacon; - qdf_size_t num_ext_rates = 0; - QDF_STATUS status; - - if ((!pHdr) || (!pBeacon)) { - pe_err("Unable to add BSS (no cached BSS info)"); - return; - } - - qdf_mem_copy(pe_session->bssId, pHdr->bssId, sizeof(tSirMacAddr)); - - sir_copy_mac_addr(pHdr->bssId, pe_session->bssId); - - /* Copy beacon interval from sessionTable */ - cfg = pe_session->beaconParams.beaconInterval; - if (cfg != pBeacon->beaconInterval) - pe_session->beaconParams.beaconInterval = - pBeacon->beaconInterval; - - /* This function ibss_bss_add (and hence the below code) is only called during ibss coalescing. We need to - * adapt to peer's capability with respect to short slot time. Changes have been made to lim_apply_configuration() - * so that the IBSS doesn't blindly start with short slot = 1. If IBSS start is part of coalescing then it will adapt - * to peer's short slot using code below. - */ - /* If cfg is already set to current peer's capability then no need to set it again */ - if (pe_session->shortSlotTimeSupported != - pBeacon->capabilityInfo.shortSlotTime) { - pe_session->shortSlotTimeSupported = - pBeacon->capabilityInfo.shortSlotTime; - } - qdf_mem_copy((uint8_t *) &pe_session->pLimStartBssReq-> - operationalRateSet, (uint8_t *) &pBeacon->supportedRates, - pBeacon->supportedRates.numRates); - - /** - * WNI_CFG_EXTENDED_OPERATIONAL_RATE_SET CFG needs to be reset, when - * there is no extended rate IE present in beacon. This is especially important when - * supportedRateSet IE contains all the extended rates as well and STA decides to coalesce. - * In this IBSS coalescing scenario LIM will tear down the BSS and Add a new one. So LIM needs to - * reset this CFG, just in case CSR originally had set this CFG when IBSS was started from the local profile. - * If IBSS was started by CSR from the BssDescription, then it would reset this CFG before StartBss is issued. - * The idea is that the count of OpRateSet and ExtendedOpRateSet rates should not be more than 12. - */ - - if (pBeacon->extendedRatesPresent) - num_ext_rates = pBeacon->extendedRates.numRates; - if (wlan_mlme_set_cfg_str( - (uint8_t *)&pBeacon->extendedRates.rate, - &mac->mlme_cfg->rates.ext_opr_rate_set, - num_ext_rates) != QDF_STATUS_SUCCESS) { - pe_err("could not update ExtendedOperRateset at CFG"); - return; - } - - /* - * Each IBSS node will advertise its own HT Capabilities instead of adapting to the Peer's capabilities - * If we don't do this then IBSS may not go back to full capabilities when the STA with lower capabilities - * leaves the IBSS. e.g. when non-CB STA joins an IBSS and then leaves, the IBSS will be stuck at non-CB mode - * even though all the nodes are capable of doing CB. - * so it is decided to leave the self HT capabilties intact. This may change if some issues are found in interop. - */ - qdf_mem_zero((void *)&mlmStartReq, sizeof(mlmStartReq)); - - qdf_mem_copy(mlmStartReq.bssId, pHdr->bssId, sizeof(tSirMacAddr)); - mlmStartReq.rateSet.numRates = - pe_session->pLimStartBssReq->operationalRateSet.numRates; - qdf_mem_copy(&mlmStartReq.rateSet.rate[0], - &pe_session->pLimStartBssReq->operationalRateSet. - rate[0], mlmStartReq.rateSet.numRates); - mlmStartReq.bssType = eSIR_IBSS_MODE; - mlmStartReq.beaconPeriod = pBeacon->beaconInterval; - mlmStartReq.nwType = pe_session->pLimStartBssReq->nwType; /* pe_session->nwType is also OK???? */ - mlmStartReq.htCapable = pe_session->htCapability; - mlmStartReq.htOperMode = mac->lim.gHTOperMode; - mlmStartReq.dualCTSProtection = mac->lim.gHTDualCTSProtection; - mlmStartReq.txChannelWidthSet = pe_session->htRecommendedTxWidthSet; - - /* reading the channel num from session Table */ - mlmStartReq.oper_ch_freq = pe_session->curr_op_freq; - - mlmStartReq.cbMode = pe_session->pLimStartBssReq->cbMode; - - /* Copy the SSID for RxP filtering based on SSID. */ - qdf_mem_copy((uint8_t *) &mlmStartReq.ssId, - (uint8_t *) &pe_session->pLimStartBssReq->ssId, - pe_session->pLimStartBssReq->ssId.length + 1); - - pe_debug("invoking ADD_BSS as part of coalescing!"); - - status = lim_ibss_add_bss(mac, pe_session, mlmStartReq); - if (QDF_IS_STATUS_ERROR(status)) { - pe_err("AddBss failure"); - return; - } - /* Update fields in Beacon */ - if (sch_set_fixed_beacon_fields(mac, pe_session) != QDF_STATUS_SUCCESS) { - pe_err("Unable to set fixed Beacon fields"); - return; - } - -} - -void ibss_bss_delete(struct mac_context *mac_ctx, struct pe_session *session) -{ - QDF_STATUS status; - - pe_debug("Initiating IBSS Delete BSS"); - if (session->limMlmState != eLIM_MLM_BSS_STARTED_STATE) { - pe_warn("Incorrect LIM MLM state for delBss: %d", - session->limMlmState); - return; - } - status = lim_del_bss(mac_ctx, NULL, session->vdev_id, session); - if (QDF_IS_STATUS_ERROR(status)) - pe_err("delBss failed for bss: %d", session->vdev_id); -} - -/** - * lim_ibss_init - * - ***FUNCTION: - * This function is called while starting an IBSS - * to initialize list used to maintain IBSS peers. - * - ***LOGIC: - * - ***ASSUMPTIONS: - * - ***NOTE: - * - * @param mac - Pointer to Global MAC structure - * @return None - */ - -void lim_ibss_init(struct mac_context *mac) -{ - mac->lim.gLimIbssCoalescingHappened = 0; - mac->lim.gLimIbssPeerList = NULL; - mac->lim.gLimNumIbssPeers = 0; - - /* ibss info - params for which ibss to join while coalescing */ - qdf_mem_zero(&mac->lim.ibss_info, sizeof(mac->lim.ibss_info)); -} /*** end lim_ibss_init() ***/ - -/** - * lim_ibss_delete_all_peers - * - ***FUNCTION: - * This function is called to delete all peers. - * - ***LOGIC: - * - ***ASSUMPTIONS: - * - ***NOTE: - * - * @param mac - Pointer to Global MAC structure - * @return None - */ -void lim_ibss_delete_all_peers(struct mac_context *mac, - struct pe_session *pe_session) -{ - tLimIbssPeerNode *pCurrNode, *pTempNode; - tpDphHashNode sta; - uint16_t peerIdx; - - pCurrNode = pTempNode = mac->lim.gLimIbssPeerList; - - while (pCurrNode) { - if (!mac->lim.gLimNumIbssPeers) { - pe_err("Number of peers in the list is zero and node present"); - return; - } - /* Delete the dph entry for the station - * Since it is called to remove all peers, just delete from dph, - * no need to do any beacon related params i.e., dont call lim_delete_dph_hash_entry - */ - sta = - dph_lookup_hash_entry(mac, pCurrNode->peerMacAddr, &peerIdx, - &pe_session->dph.dphHashTable); - if (sta) { - - ibss_status_chg_notify(mac, pCurrNode->peerMacAddr, - eWNI_SME_IBSS_PEER_DEPARTED_IND, - pe_session->smeSessionId); - lim_del_sta(mac, sta, false, pe_session); - lim_release_peer_idx(mac, peerIdx, pe_session); - dph_delete_hash_entry(mac, sta->staAddr, peerIdx, - &pe_session->dph.dphHashTable); - } - - pTempNode = pCurrNode->next; - - /* TODO :Sessionize this code */ - /* Fix CR 227642: PeerList should point to the next node since the current node is being - * freed in the next line. In ibss_peerfind in ibss_status_chg_notify above, we use this - * peer list to find the next peer. So this list needs to be updated with the no of peers left - * after each iteration in this while loop since one by one peers are deleted (freed) in this - * loop causing the lim.gLimIbssPeerList to point to some freed memory. - */ - mac->lim.gLimIbssPeerList = pTempNode; - - if (pCurrNode->beacon) { - qdf_mem_free(pCurrNode->beacon); - } - qdf_mem_free(pCurrNode); - if (mac->lim.gLimNumIbssPeers > 0) /* be paranoid */ - mac->lim.gLimNumIbssPeers--; - pCurrNode = pTempNode; - } - - if (mac->lim.gLimNumIbssPeers) - pe_err("Number of peers: %d in the list is non-zero", - mac->lim.gLimNumIbssPeers); - - mac->lim.gLimNumIbssPeers = 0; - mac->lim.gLimIbssPeerList = NULL; - lim_disconnect_complete(pe_session, false); -} - -/** ------------------------------------------------------------- - \fn lim_ibss_set_protection - \brief Decides all the protection related information. - \ - \param struct mac_context * mac - \param tSirMacAddr peerMacAddr - \param tpUpdateBeaconParams pBeaconParams - \return None - -------------------------------------------------------------*/ -static void -lim_ibss_set_protection(struct mac_context *mac, uint8_t enable, - tpUpdateBeaconParams pBeaconParams, - struct pe_session *pe_session) -{ - - if (!mac->lim.cfgProtection.fromllb) { - pe_err("protection from 11b is disabled"); - return; - } - - if (enable) { - pe_session->gLim11bParams.protectionEnabled = true; - if (false == - pe_session->beaconParams. - llbCoexist /*mac->lim.llbCoexist */) { - pe_debug("=> IBSS: Enable Protection"); - pBeaconParams->llbCoexist = - pe_session->beaconParams.llbCoexist = true; - pBeaconParams->paramChangeBitmap |= - PARAM_llBCOEXIST_CHANGED; - } - } else if (true == - pe_session->beaconParams. - llbCoexist /*mac->lim.llbCoexist */) { - pe_session->gLim11bParams.protectionEnabled = false; - pe_debug("===> IBSS: Disable protection"); - pBeaconParams->llbCoexist = - pe_session->beaconParams.llbCoexist = false; - pBeaconParams->paramChangeBitmap |= PARAM_llBCOEXIST_CHANGED; - } - return; -} - -/** ------------------------------------------------------------- - \fn lim_ibss_update_protection_params - \brief Decides all the protection related information. - \ - \param struct mac_context * mac - \param tSirMacAddr peerMacAddr - \param tpUpdateBeaconParams pBeaconParams - \return None - -------------------------------------------------------------*/ -static void -lim_ibss_update_protection_params(struct mac_context *mac, - tSirMacAddr peerMacAddr, - tLimProtStaCacheType protStaCacheType, - struct pe_session *pe_session) -{ - uint32_t i; - - pe_debug("STA is associated Addr :"); - lim_print_mac_addr(mac, peerMacAddr, LOGD); - - for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { - if (mac->lim.protStaCache[i].active) { - pe_debug("Addr:"); - lim_print_mac_addr - (mac, mac->lim.protStaCache[i].addr, LOGD); - - if (!qdf_mem_cmp(mac->lim.protStaCache[i].addr, - peerMacAddr, - sizeof(tSirMacAddr))) { - pe_debug("matching cache entry at: %d already active", - i); - return; - } - } - } - - for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { - if (!mac->lim.protStaCache[i].active) - break; - } - - if (i >= LIM_PROT_STA_CACHE_SIZE) { - pe_err("No space in ProtStaCache"); - return; - } - - qdf_mem_copy(mac->lim.protStaCache[i].addr, - peerMacAddr, sizeof(tSirMacAddr)); - - mac->lim.protStaCache[i].protStaCacheType = protStaCacheType; - mac->lim.protStaCache[i].active = true; - if (eLIM_PROT_STA_CACHE_TYPE_llB == protStaCacheType) { - pe_session->gLim11bParams.numSta++; - } else if (eLIM_PROT_STA_CACHE_TYPE_llG == protStaCacheType) { - pe_session->gLim11gParams.numSta++; - } -} - -/** ------------------------------------------------------------- - \fn lim_ibss_decide_protection - \brief Decides all the protection related information. - \ - \param struct mac_context * mac - \param tSirMacAddr peerMacAddr - \param tpUpdateBeaconParams pBeaconParams - \return None - -------------------------------------------------------------*/ -static void -lim_ibss_decide_protection(struct mac_context *mac, tpDphHashNode sta, - tpUpdateBeaconParams pBeaconParams, - struct pe_session *pe_session) -{ - enum reg_wifi_band rfBand = REG_BAND_UNKNOWN; - uint32_t phyMode; - tLimProtStaCacheType protStaCacheType = - eLIM_PROT_STA_CACHE_TYPE_INVALID; - - pBeaconParams->paramChangeBitmap = 0; - - if (!sta) { - pe_err("sta is NULL"); - return; - } - - lim_get_rf_band_new(mac, &rfBand, pe_session); - if (REG_BAND_2G == rfBand) { - lim_get_phy_mode(mac, &phyMode, pe_session); - - /* We are 11G or 11n. Check if we need protection from 11b Stations. */ - if ((phyMode == WNI_CFG_PHY_MODE_11G) - || (pe_session->htCapability)) { - /* As we found in the past, it is possible that a 11n STA sends - * Beacon with HT IE but not ERP IE. So the absence of ERP IE - * in the Beacon is not enough to conclude that STA is 11b. - */ - if ((sta->erpEnabled == eHAL_CLEAR) && - (!sta->mlmStaContext.htCapability)) { - protStaCacheType = eLIM_PROT_STA_CACHE_TYPE_llB; - pe_err("Enable protection from 11B"); - lim_ibss_set_protection(mac, true, - pBeaconParams, - pe_session); - } - } - } - lim_ibss_update_protection_params(mac, sta->staAddr, protStaCacheType, - pe_session); - return; -} - -tLimIbssPeerNode *lim_ibss_peer_find(struct mac_context *mac, tSirMacAddr macAddr) -{ - return ibss_peer_find(mac, macAddr); -} - -QDF_STATUS -lim_ibss_sta_add(struct mac_context *mac, void *pBody, struct pe_session *pe_session) -{ - QDF_STATUS retCode = QDF_STATUS_SUCCESS; - tpDphHashNode sta; - tLimIbssPeerNode *pPeerNode; - tLimMlmStates prevState; - tSirMacAddr *pPeerAddr = (tSirMacAddr *) pBody; - tUpdateBeaconParams beaconParams; - - qdf_mem_zero((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams)); - - if (pBody == 0) { - pe_err("Invalid IBSS AddSta"); - return QDF_STATUS_E_FAILURE; - } - - pe_debug("Rx Add-Ibss-Sta for MAC:"); - lim_print_mac_addr(mac, *pPeerAddr, LOGD); - - pPeerNode = ibss_peer_find(mac, *pPeerAddr); - if (pPeerNode) { - retCode = - ibss_dph_entry_add(mac, *pPeerAddr, &sta, - pe_session); - if (QDF_STATUS_SUCCESS == retCode) { - prevState = sta->mlmStaContext.mlmState; - sta->erpEnabled = pPeerNode->erpIePresent; - - ibss_sta_info_update(mac, sta, pPeerNode, - pe_session); - pe_debug("initiating ADD STA for the IBSS peer"); - retCode = - lim_add_sta(mac, sta, false, pe_session); - if (retCode != QDF_STATUS_SUCCESS) { - pe_err("ibss-sta-add failed (reason %x)", - retCode); - lim_print_mac_addr(mac, *pPeerAddr, LOGE); - sta->mlmStaContext.mlmState = prevState; - dph_delete_hash_entry(mac, sta->staAddr, - sta->assocId, - &pe_session->dph. - dphHashTable); - } else { - if (mac->lim.gLimProtectionControl != - MLME_FORCE_POLICY_PROTECTION_DISABLE) - lim_ibss_decide_protection(mac, sta, - &beaconParams, - pe_session); - - if (beaconParams.paramChangeBitmap) { - pe_debug("---> Update Beacon Params"); - sch_set_fixed_beacon_fields(mac, - pe_session); - beaconParams.bss_idx = - pe_session->vdev_id; - lim_send_beacon_params(mac, &beaconParams, - pe_session); - } - } - } else { - pe_err("hashTblAdd failed reason: %x", retCode); - lim_print_mac_addr(mac, *pPeerAddr, LOGE); - } - } else { - retCode = QDF_STATUS_E_FAILURE; - } - - return retCode; -} - -/** - * lim_ibss_search_and_delete_peer()- to cleanup the IBSS - * peer from lim ibss peer list - * - * @mac_ptr: Pointer to Global MAC structure - * @session_entry: Session entry - * @mac_addr: Mac Address of the IBSS peer - * - * This function is called to cleanup the IBSS peer from - * lim ibss peer list - * - * Return: None - * - */ -static void -lim_ibss_search_and_delete_peer(struct mac_context *mac_ctx, - struct pe_session *session_entry, tSirMacAddr mac_addr) -{ - tLimIbssPeerNode *temp_node, *prev_node; - tLimIbssPeerNode *temp_next_node = NULL; - - prev_node = temp_node = mac_ctx->lim.gLimIbssPeerList; - - pe_debug(" PEER ADDR :" QDF_MAC_ADDR_STR, - QDF_MAC_ADDR_ARRAY(mac_addr)); - - /** Compare Peer */ - while (temp_node) { - temp_next_node = temp_node->next; - - /* Delete the STA with MAC address */ - if (!qdf_mem_cmp((uint8_t *) mac_addr, - (uint8_t *) &temp_node->peerMacAddr, - sizeof(tSirMacAddr))) { - if (temp_node == - mac_ctx->lim.gLimIbssPeerList) { - mac_ctx->lim.gLimIbssPeerList = - temp_node->next; - prev_node = - mac_ctx->lim.gLimIbssPeerList; - } else - prev_node->next = temp_node->next; - if (temp_node->beacon) - qdf_mem_free(temp_node->beacon); - - qdf_mem_free(temp_node); - mac_ctx->lim.gLimNumIbssPeers--; - - temp_node = temp_next_node; - break; - } - prev_node = temp_node; - temp_node = temp_next_node; - } - /* - * if it is the last peer walking out, we better - * we set IBSS state to inactive. - */ - if (0 == mac_ctx->lim.gLimNumIbssPeers) { - pe_debug("Last STA from IBSS walked out"); - session_entry->limIbssActive = false; - } -} - -/** - * lim_ibss_delete_peer()- to delete IBSS peer - * - * @mac_ptr: Pointer to Global MAC structure - * @session_entry: Session entry - * @mac_addr: Mac Address of the IBSS peer - * @del_sta: del sta sent to firmware if true - * - * This function is called delete IBSS peer. - * - * Return: None - * - */ -static void -lim_ibss_delete_peer(struct mac_context *mac_ctx, - struct pe_session *session_entry, tSirMacAddr mac_addr, - bool del_sta) -{ - tpDphHashNode sta = NULL; - uint16_t peer_idx = 0; - - pe_debug("Delete peer :" QDF_MAC_ADDR_STR, - QDF_MAC_ADDR_ARRAY(mac_addr)); - - sta = dph_lookup_hash_entry(mac_ctx, mac_addr, - &peer_idx, - &session_entry->dph. - dphHashTable); - - if (!sta) { - pe_err("DPH Entry for STA %pM is missing", - mac_addr); - return; - } - - if (del_sta) { - lim_del_sta(mac_ctx, sta, - true, session_entry); - } else { - /* - * This mean ADD STA failed, thus remove the sta from - * from database and no need to send del sta to firmware - * and peer departed indication to upper layer. - */ - lim_delete_dph_hash_entry(mac_ctx, sta->staAddr, - peer_idx, session_entry); - lim_release_peer_idx(mac_ctx, - peer_idx, session_entry); - lim_ibss_search_and_delete_peer(mac_ctx, - session_entry, mac_addr); - } - -} - -void lim_process_ibss_del_sta_rsp(struct mac_context *mac_ctx, - struct scheduler_msg *lim_msg, - struct pe_session *pe_session) -{ - tpDphHashNode sta_ds = NULL; - tpDeleteStaParams del_sta_params = (tpDeleteStaParams) lim_msg->bodyptr; - tSirResultCodes status = eSIR_SME_SUCCESS; - - if (!del_sta_params) { - pe_err("del_sta_params is NULL"); - return; - } - if (!LIM_IS_IBSS_ROLE(pe_session)) { - pe_err("Session %d is not IBSS role", del_sta_params->assocId); - status = eSIR_SME_REFUSED; - goto skip_event; - } - - sta_ds = dph_get_hash_entry(mac_ctx, del_sta_params->assocId, - &pe_session->dph.dphHashTable); - if (!sta_ds) { - pe_err("DPH Entry for STA %X is missing", - del_sta_params->assocId); - status = eSIR_SME_REFUSED; - goto skip_event; - } - - if (QDF_STATUS_SUCCESS != del_sta_params->status) { - pe_err("DEL STA failed!"); - status = eSIR_SME_REFUSED; - goto skip_event; - } - pe_debug("Deleted STA associd %d MAC " QDF_MAC_ADDR_STR, - sta_ds->assocId, - QDF_MAC_ADDR_ARRAY(sta_ds->staAddr)); - - lim_delete_dph_hash_entry(mac_ctx, sta_ds->staAddr, - del_sta_params->assocId, pe_session); - lim_release_peer_idx(mac_ctx, - del_sta_params->assocId, pe_session); - - ibss_status_chg_notify(mac_ctx, - del_sta_params->staMac, - eWNI_SME_IBSS_PEER_DEPARTED_IND, - pe_session->smeSessionId); - - lim_ibss_search_and_delete_peer(mac_ctx, - pe_session, del_sta_params->staMac); - -skip_event: - qdf_mem_free(del_sta_params); - lim_msg->bodyptr = NULL; -} - -/* handle the response from HAL for an ADD STA request */ -QDF_STATUS -lim_ibss_add_sta_rsp(struct mac_context *mac, void *msg, struct pe_session *pe_session) -{ - tpDphHashNode sta; - uint16_t peerIdx; - tpAddStaParams pAddStaParams = (tpAddStaParams) msg; - - SET_LIM_PROCESS_DEFD_MESGS(mac, true); - if (!pAddStaParams) { - pe_err("IBSS: ADD_STA_RSP with no body!"); - return QDF_STATUS_E_FAILURE; - } - - sta = - dph_lookup_hash_entry(mac, pAddStaParams->staMac, &peerIdx, - &pe_session->dph.dphHashTable); - if (!sta) { - pe_err("IBSS: ADD_STA_RSP for unknown MAC addr: "QDF_MAC_ADDR_STR, - QDF_MAC_ADDR_ARRAY(pAddStaParams->staMac)); - qdf_mem_free(pAddStaParams); - return QDF_STATUS_E_FAILURE; - } - - if (pAddStaParams->status != QDF_STATUS_SUCCESS) { - pe_err("IBSS: ADD_STA_RSP error: %x for MAC:"QDF_MAC_ADDR_STR, - pAddStaParams->status, - QDF_MAC_ADDR_ARRAY(pAddStaParams->staMac)); - lim_ibss_delete_peer(mac, - pe_session, pAddStaParams->staMac, false); - qdf_mem_free(pAddStaParams); - return QDF_STATUS_E_FAILURE; - } - - sta->valid = 1; - sta->mlmStaContext.mlmState = eLIM_MLM_LINK_ESTABLISHED_STATE; - - pe_debug("IBSS: sending IBSS_NEW_PEER msg to SME!"); - - ibss_status_chg_notify(mac, pAddStaParams->staMac, - eWNI_SME_IBSS_NEW_PEER_IND, - pe_session->smeSessionId); - - qdf_mem_free(pAddStaParams); - - return QDF_STATUS_SUCCESS; -} - -void lim_ibss_del_bss_rsp_when_coalescing(struct mac_context *mac, - struct del_bss_resp *vdev_stop_rsp, - struct pe_session *pe_session) -{ - pe_debug("IBSS: DEL_BSS_RSP Rcvd during coalescing!"); - - if (!vdev_stop_rsp) { - pe_err("IBSS: DEL_BSS_RSP(coalesce) with no body!"); - return; - } - - if (vdev_stop_rsp->status != QDF_STATUS_SUCCESS) { - pe_err("IBSS: DEL_BSS_RSP(coalesce) error: %x", - vdev_stop_rsp->status); - return; - } - - /* Delete peer entries. */ - /* add the new bss */ - ibss_bss_add(mac, pe_session); -} - -void lim_ibss_add_bss_rsp_when_coalescing(struct mac_context *mac, - uint32_t op_chan_freq, - struct pe_session *pe_session) -{ - uint8_t infoLen; - struct new_bss_info newBssInfo; - tpSirMacMgmtHdr pHdr = mac->lim.ibss_info.mac_hdr; - tpSchBeaconStruct pBeacon = mac->lim.ibss_info.beacon; - - if ((!pHdr) || (!pBeacon)) { - pe_err("Unable to handle AddBssRspWhenCoalescing (no cached BSS info)"); - goto end; - } - /* Inform Host of IBSS coalescing */ - infoLen = sizeof(tSirMacAddr) + sizeof(tSirMacChanNum) + - sizeof(uint8_t) + pBeacon->ssId.length + 1; - - qdf_mem_zero((void *)&newBssInfo, sizeof(newBssInfo)); - qdf_mem_copy(newBssInfo.bssId.bytes, pHdr->bssId, QDF_MAC_ADDR_SIZE); - newBssInfo.freq = op_chan_freq; - qdf_mem_copy((uint8_t *) &newBssInfo.ssId, - (uint8_t *) &pBeacon->ssId, pBeacon->ssId.length + 1); - - pe_debug("Sending JOINED_NEW_BSS notification to SME"); - - lim_send_sme_wm_status_change_ntf(mac, eSIR_SME_JOINED_NEW_BSS, - (uint32_t *) &newBssInfo, - infoLen, pe_session->smeSessionId); - { - /* Configure beacon and send beacons to HAL */ - lim_send_beacon(mac, pe_session); - } - -end: - ibss_coalesce_free(mac); -} - -void lim_ibss_del_bss_rsp(struct mac_context *mac, - struct del_bss_resp *vdev_stop_rsp, - struct pe_session *pe_session) -{ - tSirResultCodes rc = eSIR_SME_SUCCESS; - - SET_LIM_PROCESS_DEFD_MESGS(mac, true); - if (!vdev_stop_rsp) { - pe_err("IBSS: DEL_BSS_RSP with no body!"); - rc = eSIR_SME_REFUSED; - goto end; - } - - pe_session = pe_find_session_by_vdev_id(mac, vdev_stop_rsp->vdev_id); - if (!pe_session) { - pe_err("Session Does not exist for given sessionID"); - goto end; - } - - /* - * If delBss was issued as part of IBSS Coalescing, gLimIbssCoalescingHappened flag will be true. - * BSS has to be added again in this scenario, so this case needs to be handled separately. - * If delBss was issued as a result of trigger from SME_STOP_BSS Request, then limSme state changes to - * 'IDLE' and gLimIbssCoalescingHappened flag will be false. In this case STOP BSS RSP has to be sent to SME. - */ - if (true == mac->lim.gLimIbssCoalescingHappened) { - lim_ibss_del_bss_rsp_when_coalescing(mac, vdev_stop_rsp, - pe_session); - return; - } - - if (vdev_stop_rsp->status != QDF_STATUS_SUCCESS) { - pe_err("IBSS: DEL_BSS_RSP error: %x", vdev_stop_rsp->status); - rc = eSIR_SME_STOP_BSS_FAILURE; - goto end; - } - - lim_ibss_delete(mac, pe_session); - - dph_hash_table_init(mac, &pe_session->dph.dphHashTable); - lim_delete_pre_auth_list(mac); - - pe_session->limMlmState = eLIM_MLM_IDLE_STATE; - - MTRACE(mac_trace - (mac, TRACE_CODE_MLM_STATE, pe_session->peSessionId, - pe_session->limMlmState)); - - pe_session->limSystemRole = eLIM_STA_ROLE; - - /* Change the short slot operating mode to Default (which is 1 for now) so that when IBSS starts next time with Libra - * as originator, it picks up the default. This enables us to remove hard coding of short slot = 1 from lim_apply_configuration - */ - pe_session->shortSlotTimeSupported = - cfg_default(CFG_SHORT_SLOT_TIME_ENABLED); - -end: - /* Delete PE session once BSS is deleted */ - if (pe_session) { - lim_send_sme_rsp(mac, eWNI_SME_STOP_BSS_RSP, rc, - pe_session->smeSessionId); - pe_delete_session(mac, pe_session); - pe_session = NULL; - } -} - -QDF_STATUS -lim_ibss_coalesce(struct mac_context *mac, - tpSirMacMgmtHdr pHdr, - tpSchBeaconStruct pBeacon, - uint8_t *pIEs, - uint32_t ieLen, uint16_t fTsfLater, struct pe_session *pe_session) -{ - uint16_t peerIdx; - tSirMacAddr currentBssId; - tLimIbssPeerNode *pPeerNode; - tpDphHashNode sta; - tUpdateBeaconParams beaconParams; - - qdf_mem_zero((uint8_t *) &beaconParams, sizeof(tUpdateBeaconParams)); - - sir_copy_mac_addr(currentBssId, pe_session->bssId); - - pe_debug("Current BSSID :" QDF_MAC_ADDR_STR " Received BSSID :" - QDF_MAC_ADDR_STR, QDF_MAC_ADDR_ARRAY(currentBssId), - QDF_MAC_ADDR_ARRAY(pHdr->bssId)); - - /* STA in IBSS mode and SSID matches with ours */ - pPeerNode = ibss_peer_find(mac, pHdr->sa); - if (!pPeerNode) { - /* Peer not in the list - Collect BSS description & add to the list */ - uint32_t frameLen; - QDF_STATUS retCode; - - /* - * Limit the Max number of IBSS Peers allowed as the max - * number of STA's allowed - * mac->lim.gLimNumIbssPeers will be increamented after exiting - * this function. so we will add additional 1 to compare against - * mac->lim.gLimIbssStaLimit - */ - if ((mac->lim.gLimNumIbssPeers + 1) >= - mac->lim.gLimIbssStaLimit) { - /*Print every 100th time */ - if (mac->lim.ibss_retry_cnt % 100 == 0) { - pe_debug("**** MAX STA LIMIT HAS REACHED ****"); - } - mac->lim.ibss_retry_cnt++; - return QDF_STATUS_E_NOSPC; - } - pe_debug("IBSS Peer node does not exist, adding it"); - frameLen = - sizeof(tLimIbssPeerNode) + ieLen - sizeof(uint32_t); - - pPeerNode = qdf_mem_malloc((uint16_t) frameLen); - if (!pPeerNode) - return QDF_STATUS_E_NOMEM; - - pPeerNode->beacon = NULL; - pPeerNode->beaconLen = 0; - - ibss_peer_collect(mac, pBeacon, pHdr, pPeerNode, - pe_session); - pPeerNode->beacon = qdf_mem_malloc(ieLen); - if (pPeerNode->beacon) { - qdf_mem_copy(pPeerNode->beacon, pIEs, ieLen); - pPeerNode->beaconLen = (uint16_t) ieLen; - } - ibss_peer_add(mac, pPeerNode); - - sta = - dph_lookup_hash_entry(mac, pPeerNode->peerMacAddr, &peerIdx, - &pe_session->dph.dphHashTable); - if (sta) { - /* / DPH node already exists for the peer */ - pe_warn("DPH Node present for just learned peer"); - lim_print_mac_addr(mac, pPeerNode->peerMacAddr, LOGD); - ibss_sta_info_update(mac, sta, pPeerNode, - pe_session); - return QDF_STATUS_SUCCESS; - } - retCode = - lim_ibss_sta_add(mac, pPeerNode->peerMacAddr, pe_session); - if (retCode != QDF_STATUS_SUCCESS) { - pe_err("lim-ibss-sta-add failed reason: %x", retCode); - lim_print_mac_addr(mac, pPeerNode->peerMacAddr, LOGE); - return retCode; - } - /* Decide protection mode */ - sta = - dph_lookup_hash_entry(mac, pPeerNode->peerMacAddr, &peerIdx, - &pe_session->dph.dphHashTable); - if (mac->lim.gLimProtectionControl != - MLME_FORCE_POLICY_PROTECTION_DISABLE) - lim_ibss_decide_protection(mac, sta, &beaconParams, - pe_session); - - if (beaconParams.paramChangeBitmap) { - pe_err("beaconParams.paramChangeBitmap=1 ---> Update Beacon Params"); - sch_set_fixed_beacon_fields(mac, pe_session); - beaconParams.bss_idx = pe_session->vdev_id; - lim_send_beacon_params(mac, &beaconParams, pe_session); - } - } else - ibss_sta_caps_update(mac, pPeerNode, pe_session); - - if (pe_session->limSmeState != eLIM_SME_NORMAL_STATE) - return QDF_STATUS_SUCCESS; - - /* Received Beacon from same IBSS we're */ - /* currently part of. Inform Roaming algorithm */ - /* if not already that IBSS is active. */ - if (pe_session->limIbssActive == false) { - limResetHBPktCount(pe_session); - pe_warn("Partner joined our IBSS, Sending IBSS_ACTIVE Notification to SME"); - pe_session->limIbssActive = true; - lim_send_sme_wm_status_change_ntf(mac, eSIR_SME_IBSS_ACTIVE, NULL, 0, - pe_session->smeSessionId); - } - - return QDF_STATUS_SUCCESS; -} /*** end lim_handle_ibs_scoalescing() ***/ - -void lim_ibss_heart_beat_handle(struct mac_context *mac_ctx, struct pe_session *session) -{ - tLimIbssPeerNode *tempnode, *prevnode; - tLimIbssPeerNode *temp_next = NULL; - uint16_t peer_idx = 0; - tpDphHashNode stads = 0; - uint32_t threshold = 0; - - /* - * MLM BSS is started and if PE in scanmode then MLM state will be - * waiting for probe resp. If Heart beat timeout triggers during this - * corner case then we need to reactivate HeartBeat timer. - */ - if (session->limMlmState != eLIM_MLM_BSS_STARTED_STATE) - return; - - /* If LinkMonitor is Disabled */ - if (!mac_ctx->sys.gSysEnableLinkMonitorMode) - return; - - prevnode = tempnode = mac_ctx->lim.gLimIbssPeerList; - threshold = (mac_ctx->lim.gLimNumIbssPeers / 4) + 1; - - /* Monitor the HeartBeat with the Individual PEERS in the IBSS */ - while (tempnode) { - temp_next = tempnode->next; - if (tempnode->beaconHBCount) { - /* There was a beacon for this peer during heart beat */ - tempnode->beaconHBCount = 0; - tempnode->heartbeatFailure = 0; - prevnode = tempnode; - tempnode = temp_next; - continue; - } - - /* There wasnt any beacon received during heartbeat timer. */ - tempnode->heartbeatFailure++; - pe_err("Heartbeat fail: %d thres: %d", - tempnode->heartbeatFailure, mac_ctx->lim.gLimNumIbssPeers); - if (tempnode->heartbeatFailure >= threshold) { - /* Remove this entry from the list. */ - stads = dph_lookup_hash_entry(mac_ctx, - tempnode->peerMacAddr, &peer_idx, - &session->dph.dphHashTable); - if (stads) { - (void)lim_del_sta(mac_ctx, stads, false, - session); - lim_delete_dph_hash_entry(mac_ctx, - stads->staAddr, peer_idx, session); - lim_release_peer_idx(mac_ctx, peer_idx, - session); - /* Send indication. */ - ibss_status_chg_notify(mac_ctx, - tempnode->peerMacAddr, - eWNI_SME_IBSS_PEER_DEPARTED_IND, - session->smeSessionId); - } - if (tempnode == mac_ctx->lim.gLimIbssPeerList) { - mac_ctx->lim.gLimIbssPeerList = tempnode->next; - prevnode = mac_ctx->lim.gLimIbssPeerList; - } else { - prevnode->next = tempnode->next; - } - - if (tempnode->beacon) - qdf_mem_free(tempnode->beacon); - qdf_mem_free(tempnode); - mac_ctx->lim.gLimNumIbssPeers--; - - /* we deleted current node, so prevNode remains same. */ - tempnode = temp_next; - continue; - } - prevnode = tempnode; - tempnode = temp_next; - } - - /* - * General IBSS Activity Monitor, - * check if in IBSS Mode we are received any Beacons - */ - if (mac_ctx->lim.gLimNumIbssPeers) { - if (session->LimRxedBeaconCntDuringHB < - MAX_NO_BEACONS_PER_HEART_BEAT_INTERVAL) - mac_ctx->lim.gLimHeartBeatBeaconStats[ - session->LimRxedBeaconCntDuringHB]++; - else - mac_ctx->lim.gLimHeartBeatBeaconStats[0]++; - - /* Reset number of beacons received */ - limResetHBPktCount(session); - return; - } else { - pe_warn("Heartbeat Failure"); - mac_ctx->lim.gLimHBfailureCntInLinkEstState++; - - if (session->limIbssActive == true) { - /* - * We don't receive Beacon frames from any - * other STA in IBSS. Announce IBSS inactive - * to Roaming algorithm - */ - pe_warn("Alone in IBSS"); - session->limIbssActive = false; - - lim_send_sme_wm_status_change_ntf(mac_ctx, - eSIR_SME_IBSS_INACTIVE, NULL, 0, - session->smeSessionId); - } - } -} - -void lim_ibss_decide_protection_on_delete(struct mac_context *mac_ctx, - tpDphHashNode stads, - tpUpdateBeaconParams bcn_param, - struct pe_session *session) -{ - uint32_t phymode; - tHalBitVal erpenabled = eHAL_CLEAR; - enum reg_wifi_band rfband = REG_BAND_UNKNOWN; - uint32_t i; - - if (!stads) - return; - - lim_get_rf_band_new(mac_ctx, &rfband, session); - if (REG_BAND_2G != rfband) - return; - - lim_get_phy_mode(mac_ctx, &phymode, session); - erpenabled = stads->erpEnabled; - /* we are HT or 11G and 11B station is getting deleted. */ - if (((phymode == WNI_CFG_PHY_MODE_11G) || - session->htCapability) && (erpenabled == eHAL_CLEAR)) { - pe_err("%d A legacy STA is disassociated Addr is", - session->gLim11bParams.numSta); - lim_print_mac_addr(mac_ctx, stads->staAddr, LOGE); - if (session->gLim11bParams.numSta == 0) { - pe_err("No 11B STA exists. Disable protection"); - lim_ibss_set_protection(mac_ctx, false, - bcn_param, session); - } - - for (i = 0; i < LIM_PROT_STA_CACHE_SIZE; i++) { - if (!mac_ctx->lim.protStaCache[i].active) - continue; - if (!qdf_mem_cmp(mac_ctx->lim.protStaCache[i].addr, - stads->staAddr, sizeof(tSirMacAddr))) { - session->gLim11bParams.numSta--; - mac_ctx->lim.protStaCache[i].active = false; - break; - } - } - - } -} - -/** - * __lim_ibss_peer_inactivity_handler() - Handle inactive IBSS peer - * @mac: Global MAC context - * @pe_session: PE session - * @ind: IBSS peer inactivity indication - * - * Internal function. Deletes FW indicated peer which is inactive - * - * Return: None - */ -static void -__lim_ibss_peer_inactivity_handler(struct mac_context *mac, - struct pe_session *pe_session, - struct ibss_peer_inactivity_ind *ind) -{ - if (pe_session->limMlmState != eLIM_MLM_BSS_STARTED_STATE) { - return; - } - - /* delete the peer for which heartbeat is observed */ - lim_ibss_delete_peer(mac, pe_session, ind->peer_addr.bytes, true); -} - -/** ------------------------------------------------------------- - \fn lim_process_ibss_peer_inactivity - \brief Peer inactivity message handler - \ - \param struct mac_context * mac - \param void* buf - \return None - -------------------------------------------------------------*/ -void lim_process_ibss_peer_inactivity(struct mac_context *mac, void *buf) -{ - /* - * --------------- HEARTBEAT OFFLOAD CASE ------------------ - * This message handler is executed when the firmware identifies - * inactivity from one or more peer devices. We will come here - * for every inactive peer device - */ - uint8_t i; - - struct ibss_peer_inactivity_ind *peerInactivityInd = buf; - - /* - * If IBSS is not started or heartbeat offload is not enabled - * we should not handle this request - */ - if (eLIM_STA_IN_IBSS_ROLE != mac->lim.gLimSystemRole && - !IS_IBSS_HEARTBEAT_OFFLOAD_FEATURE_ENABLE) { - return; - } - - /** If LinkMonitor is Disabled */ - if (!mac->sys.gSysEnableLinkMonitorMode) { - return; - } - - for (i = 0; i < mac->lim.maxBssId; i++) { - if (true == mac->lim.gpSession[i].valid && - eSIR_IBSS_MODE == mac->lim.gpSession[i].bssType) { - __lim_ibss_peer_inactivity_handler(mac, - &mac->lim.gpSession[i], - peerInactivityInd); - break; - } - } -} diff --git a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.h b/core/mac/src/pe/lim/lim_ibss_peer_mgmt.h deleted file mode 100644 index ec092b2c40b4..000000000000 --- a/core/mac/src/pe/lim/lim_ibss_peer_mgmt.h +++ /dev/null @@ -1,471 +0,0 @@ -/* - * Copyright (c) 2011-2012, 2014-2019 The Linux Foundation. All rights reserved. - * - * Permission to use, copy, modify, and/or distribute this software for - * any purpose with or without fee is hereby granted, provided that the - * above copyright notice and this permission notice appear in all - * copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL - * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE - * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL - * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR - * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * - * This file lim_ibss_peer_mgmt.h contains prototypes for - * the utility functions LIM uses to maintain peers in IBSS. - * Author: Chandra Modumudi - * Date: 03/12/04 - * History:- - * Date Modified by Modification Information - * -------------------------------------------------------------------- - */ - -#include "sir_common.h" -#include "lim_utils.h" - -#ifdef QCA_IBSS_SUPPORT -/** - * ibss_bss_add()- add the ibss - * @mac_ctx: Pointer to Global MAC structure - * @session: pe session - * - * Return: None - */ -void ibss_bss_add(struct mac_context *mac_ctx, struct pe_session *session); - -/** - * ibss_bss_delete()- delete the current BSS - * @mac_ctx: Pointer to Global MAC structure - * @session: pe session - * - * Return: None - */ -void ibss_bss_delete(struct mac_context *mac_ctx, struct pe_session *session); - -/** - * lim_ibss_delete_all_peers() - delete all IBSS peers. - * @mac_ctx: Pointer to Global MAC structure - * @session: pe session - * - * Return: None - */ -void lim_ibss_delete_all_peers(struct mac_context *mac_ctx, struct pe_session *session); - -/** - * lim_ibss_init() - API to init IBSS - * @mac_ctx: Pointer to Global MAC structure - * - * Return: None - */ -void lim_ibss_init(struct mac_context *); - -/** - * lim_ibss_delete() - Delete ibss while tearing down an IBSS - * - * @mac: Pointer to Global MAC structure - * @session: Pointer to session entry - * - * Return: none - */ -void lim_ibss_delete(struct mac_context *, struct pe_session *pe_session); - -/** - * lim_ibss_coalesce() - API to process IBSS Beacon/Probe Response - * @param mac - Pointer to Global MAC structure - * @param pBeacon - Parsed Beacon Frame structure - * @param pBD - Pointer to received BD - * - * This function is called upon receiving Beacon/Probe Response - * while operating in IBSS mode. - * - * @return Status whether to process or ignore received Beacon Frame - */ -QDF_STATUS lim_ibss_coalesce(struct mac_context *, tpSirMacMgmtHdr, - tpSchBeaconStruct, uint8_t *, uint32_t, uint16_t, - struct pe_session *); - -/** - * lim_ibss_sta_add() - API to add an STA context in IBSS role - * @param mac Pointer to Global MAC structure - * @param peerAdddr MAC address of the peer being added - * - * This function is called to add an STA context in IBSS role - * whenever a data frame is received from/for a STA that failed - * hash lookup at DPH. - * - * @return retCode Indicates success or failure return code - */ -QDF_STATUS lim_ibss_sta_add(struct mac_context *, void *, struct pe_session *); - -/** - * lim_ibss_add_sta_rsp() - API to process STA add response in IBSS role - * @param mac Pointer to Global MAC structure - * @param peerAdddr MAC address of the peer being added - * - * This function is called to add an STA context in IBSS role - * whenever a data frame is received from/for a STA that failed - * hash lookup at DPH. - * - * @return retCode Indicates success or failure return code - */ -QDF_STATUS lim_ibss_add_sta_rsp(struct mac_context *, void *, struct pe_session *); - -/** - * lim_process_ibss_del_sta_rsp()- Handle ibss delete - * peer resp from firmware - * @mac_ptr: Pointer to Global MAC structure - * @lim_msg: delete sta response - * @pe_session: pe session - * - * Return: None - * - */ -void lim_process_ibss_del_sta_rsp(struct mac_context *mac_ctx, - struct scheduler_msg *lim_msg, - struct pe_session *pe_session); - -/** - * lim_ibss_peer_find() - API to find IBSS peer - * @mac: pointer to mac context - * @param macAddr - MAC address of the peer - * - * This function is called while adding a context at - * DPH & Polaris for a peer in IBSS. - * If peer is found in the list, capabilities from the - * returned BSS description are used at DPH node & Polaris. - * - * @return Pointer to peer node if found, else NULL - */ -tLimIbssPeerNode *lim_ibss_peer_find(struct mac_context *mac, tSirMacAddr macAddr); - -/** - * lim_ibss_del_bss_rsp() - Handle ibss delete - * response - * @mac: Pointer to Global MAC structure - * @vdev_stop_rsp: pointer to del bss response - * @pe_session: pointer to pe session - * - * Return: None - * - */ -void lim_ibss_del_bss_rsp(struct mac_context *mac, - struct del_bss_resp *vdev_stop_rsp, - struct pe_session *pe_session); - -/** - * lim_ibss_del_bss_rsp_when_coalescing() - Handle ibss delete - * response when coalescing - * @mac: Pointer to Global MAC structure - * @vdev_stop_rsp: pointer to del bss response - * @pe_session: pointer to pe session - * - * Return: None - * - */ -void lim_ibss_del_bss_rsp_when_coalescing(struct mac_context *mac, - struct del_bss_resp *vdev_stop_rsp, - struct pe_session *pe_session); - -/** - * lim_ibss_add_bss_rsp_when_coalescing()- Handle ADD BSS rsp of IBSS coalescing - * @mac_ptr: Pointer to Global MAC structure - * @op_chan_freq: operating chan freq - * @pe_session: PE session pointer - * - * Return: None - */ -void lim_ibss_add_bss_rsp_when_coalescing(struct mac_context *mac, - uint32_t op_chan_freq, - struct pe_session *pe_session); - -/** - * lim_ibss_decide_protection_on_delete() - decides protection related info. - * @mac_ctx: global mac context - * @stads: station hash node - * @bcn_param: beacon parameters - * @session: PE session entry - * - * Decides all the protection related information. - * - * Return: None - */ -void lim_ibss_decide_protection_on_delete(struct mac_context *mac, tpDphHashNode sta, - tpUpdateBeaconParams pBeaconParams, - struct pe_session *pe_session); - -/** - * lim_ibss_heart_beat_handle() - handle IBSS hearbeat failure - * @mac_ctx: global mac context - * @session: PE session entry - * - * Hanlde IBSS hearbeat failure. - * - * Return: None. - */ -void lim_ibss_heart_beat_handle(struct mac_context *mac, struct pe_session *pe_session); - -/** - * lim_process_ibss_peer_inactivity() - Handle inactive IBSS peer - * @mac: Global MAC context - * @buf: pointer to buffer - * - * Internal function. Deletes FW indicated peer which is inactive - * - * Return: None - */ -void lim_process_ibss_peer_inactivity(struct mac_context *mac, void *buf); -#else -/** - * ibss_bss_add()- api to add ibss - * @mac_ctx: Pointer to Global MAC structure - * @session: pe session - * - * Return: None - */ -static inline -void ibss_bss_add(struct mac_context *mac_ctx, struct pe_session *session) -{ -} - -/** - * ibss_bss_delete()- delete the current BSS - * @mac_ctx: Pointer to Global MAC structure - * @session: pe session - * - * Return: None - */ -static inline -void ibss_bss_delete(struct mac_context *mac_ctx, struct pe_session *session) -{ -} - -/** - * lim_ibss_delete_all_peers: delete all IBSS peers. - * @mac_ctx: Pointer to Global MAC structure - * @session: pe session - * - * Return: None - */ -static inline -void lim_ibss_delete_all_peers(struct mac_context *mac_ctx, - struct pe_session *session) -{ -} - -/** - * lim_ibss_init() - API to init IBSS - * @mac_ctx: Pointer to Global MAC structure - * - * This function is dummy. - * - * Return: None - */ -static inline -void lim_ibss_init(struct mac_context *mac) -{ -} - -/** - * lim_ibss_delete() - Delete ibss while tearing down an IBSS - * @mac: Pointer to Global MAC structure - * @session: Pointer to session entry - * - * Return: none - */ -static inline -void lim_ibss_delete(struct mac_context *mac, struct pe_session *session) -{ -} - -/** - * lim_ibss_coalesce() - API to process IBSS Beacon/Probe Response - * @param mac - Pointer to Global MAC structure - * @param pBeacon - Parsed Beacon Frame structure - * @param pBD - Pointer to received BD - * - * This function is dummy. - * - * @return Status whether to process or ignore received Beacon Frame - */ -static inline -QDF_STATUS lim_ibss_coalesce(struct mac_context *mac, - tpSirMacMgmtHdr pHdr, - tpSchBeaconStruct pBeacon, - uint8_t *pIEs, - uint32_t ieLen, uint16_t fTsfLater, - struct pe_session *pe_session) -{ - return QDF_STATUS_SUCCESS; -} - -/** - * lim_ibss_sta_add() - API to add an STA context in IBSS role - * @param mac Pointer to Global MAC structure - * @param peerAdddr MAC address of the peer being added - * - * This function is dummy. - * - * @return retCode Indicates success or failure return code - */ -static inline -QDF_STATUS lim_ibss_sta_add(struct mac_context *mac, void *pBody, - struct pe_session *pe_session) -{ - return QDF_STATUS_SUCCESS; -} - -/** - * lim_ibss_add_sta_rsp() - API to process STA add response in IBSS role - * @param mac Pointer to Global MAC structure - * @param peerAdddr MAC address of the peer being added - * - * This function is funny. - * - * @return retCode Indicates success or failure return code - */ -static inline -QDF_STATUS lim_ibss_add_sta_rsp(struct mac_context *mac, - void *msg, struct pe_session *pe_session) -{ - return QDF_STATUS_SUCCESS; -} - -/** - * lim_process_ibss_del_sta_rsp()- Handle ibss delete - * peer resp from firmware - * @mac_ptr: Pointer to Global MAC structure - * @lim_msg: delete sta response - * @pe_session: pe session - * - * This function is dymmy. - * - * Return: None - */ -static inline -void lim_process_ibss_del_sta_rsp(struct mac_context *mac_ctx, - struct scheduler_msg *lim_msg, - struct pe_session *pe_session) -{ -} - -/** - * lim_ibss_peer_find() - API to find IBSS peer - * @mac: pointer to mac context - * @param macAddr - MAC address of the peer - * - * This function is dymmy. - * - * @return Pointer to peer node if found, else NULL - */ -static inline -tLimIbssPeerNode *lim_ibss_peer_find(struct mac_context *mac, - tSirMacAddr macAddr) -{ - return NULL; -} - -/** - * lim_ibss_del_bss_rsp() - Handle ibss delete - * response - * @mac: Pointer to Global MAC structure - * @vdev_stop_rsp: pointer to del bss response - * @pe_session: pointer to pe session - * - * This function is dymmy. - * - * Return: None - */ -static inline -void lim_ibss_del_bss_rsp(struct mac_context *mac, - struct del_bss_resp *vdev_stop_rsp, - struct pe_session *pe_session) -{ -} - -/** - * lim_ibss_del_bss_rsp_when_coalescing() - Handle ibss delete - * response when coalescing - * @mac: Pointer to Global MAC structure - * @vdev_stop_rsp: pointer to del bss response - * @pe_session: pointer to pe session - * - * Return: None - * - */ -static inline -void lim_ibss_del_bss_rsp_when_coalescing(struct mac_context *mac, - struct del_bss_resp *vdev_stop_rsp, - struct pe_session *pe_session) -{ -} - -/** - * lim_ibss_add_bss_rsp_when_coalescing()- Handle ADD BSS rsp of IBSS coalescing - * @mac_ptr: Pointer to Global MAC structure - * @op_chan_freq: operating chan freq - * @pe_session: PE session pointer - * - * Return: None - */ -static inline -void lim_ibss_add_bss_rsp_when_coalescing(struct mac_context *mac, - uint32_t op_chan_freq, - struct pe_session *pe_session) -{ -} - -/** - * lim_ibss_decide_protection_on_delete() - decides protection related info. - * @mac_ctx: global mac context - * @stads: station hash node - * @bcn_param: beacon parameters - * @session: PE session entry - * - * This function is dummy. - * - * Return: None - */ -static inline -void lim_ibss_decide_protection_on_delete(struct mac_context *mac, - tpDphHashNode sta, - tpUpdateBeaconParams pBeaconParams, - struct pe_session *pe_session) -{ -} - -/** - * lim_ibss_heart_beat_handle() - handle IBSS hearbeat failure - * @mac_ctx: global mac context - * @session: PE session entry - * - * This function is dummy. - * - * Return: None. - */ -static inline -void lim_ibss_heart_beat_handle(struct mac_context *mac, - struct pe_session *pe_session) -{ -} - -/** - * lim_process_ibss_peer_inactivity() - Handle inactive IBSS peer - * @mac: Global MAC context - * @buf: pointer to buffer - * - * This function is dummy. - * - * Return: None - */ -static inline -void lim_process_ibss_peer_inactivity(struct mac_context *mac, void *buf) -{ -} -#endif diff --git a/core/mac/src/pe/lim/lim_link_monitoring_algo.c b/core/mac/src/pe/lim/lim_link_monitoring_algo.c index 1e4dedd9a2dc..12b1de31f61a 100644 --- a/core/mac/src/pe/lim/lim_link_monitoring_algo.c +++ b/core/mac/src/pe/lim/lim_link_monitoring_algo.c @@ -63,10 +63,6 @@ static void lim_delete_sta_util(struct mac_context *mac_ctx, tpDeleteStaContext pe_debug("Deleting station: reasonCode: %d", msg->reasonCode); - if (LIM_IS_IBSS_ROLE(session_entry)) { - return; - } - stads = dph_lookup_hash_entry(mac_ctx, msg->addr2, &msg->assocId, &session_entry->dph.dphHashTable); diff --git a/core/mac/src/pe/lim/lim_process_auth_frame.c b/core/mac/src/pe/lim/lim_process_auth_frame.c index 4771b48e4bc4..68c443b5b361 100644 --- a/core/mac/src/pe/lim/lim_process_auth_frame.c +++ b/core/mac/src/pe/lim/lim_process_auth_frame.c @@ -944,8 +944,7 @@ static void lim_process_auth_frame_type3(struct mac_context *mac_ctx, return; } - if (LIM_IS_AP_ROLE(pe_session) || - LIM_IS_IBSS_ROLE(pe_session)) { + if (LIM_IS_AP_ROLE(pe_session)) { /* * Check if wep bit was set in FC. If not set, * reject with Authentication frame4 with diff --git a/core/mac/src/pe/lim/lim_process_cfg_updates.c b/core/mac/src/pe/lim/lim_process_cfg_updates.c index a975af7fdb9d..deae75b32f2b 100644 --- a/core/mac/src/pe/lim/lim_process_cfg_updates.c +++ b/core/mac/src/pe/lim/lim_process_cfg_updates.c @@ -172,8 +172,7 @@ void lim_apply_configuration(struct mac_context *mac, struct pe_session *pe_sess lim_set_cfg_protection(mac, pe_session); /* Added for BT - AMP Support */ - if (LIM_IS_AP_ROLE(pe_session) || - LIM_IS_IBSS_ROLE(pe_session)) { + if (LIM_IS_AP_ROLE(pe_session)) { /* This check is required to ensure the beacon generation is not done as a part of join request for a BT-AMP station */ @@ -209,8 +208,7 @@ static void lim_update_config(struct mac_context *mac, struct pe_session *pe_ses mac->mlme_cfg->ht_caps.short_preamble; /* In STA case this parameter is filled during the join request */ - if (LIM_IS_AP_ROLE(pe_session) || - LIM_IS_IBSS_ROLE(pe_session)) { + if (LIM_IS_AP_ROLE(pe_session)) { enabled = mac->mlme_cfg->wmm_params.wme_enabled; pe_session->limWmeEnabled = enabled; } @@ -222,7 +220,7 @@ static void lim_update_config(struct mac_context *mac, struct pe_session *pe_ses pe_session->limWsmEnabled = 0; } /* In STA , this parameter is filled during the join request */ - if (LIM_IS_AP_ROLE(pe_session) || LIM_IS_IBSS_ROLE(pe_session)) { + if (LIM_IS_AP_ROLE(pe_session)) { enabled = mac->mlme_cfg->wmm_params.qos_enabled; pe_session->limQosEnabled = enabled; } diff --git a/core/mac/src/pe/lim/lim_process_deauth_frame.c b/core/mac/src/pe/lim/lim_process_deauth_frame.c index 7acb48c8d7f6..ac07a2e41990 100644 --- a/core/mac/src/pe/lim/lim_process_deauth_frame.c +++ b/core/mac/src/pe/lim/lim_process_deauth_frame.c @@ -202,8 +202,7 @@ lim_process_deauth_frame(struct mac_context *mac, uint8_t *pRxPacketInfo, break; } } else { - /* Received Deauth frame in either IBSS */ - /* or un-known role. Log and ignore it */ + /* Received Deauth frame un-known role. Log and ignore it */ pe_err("received Deauth frame with reasonCode %d in role %d from " QDF_MAC_ADDR_STR, reasonCode, GET_LIM_SYSTEM_ROLE(pe_session), @@ -483,9 +482,6 @@ void lim_perform_deauth(struct mac_context *mac_ctx, struct pe_session *pe_sessi } break; - case eLIM_STA_IN_IBSS_ROLE: - break; - case eLIM_AP_ROLE: break; diff --git a/core/mac/src/pe/lim/lim_process_disassoc_frame.c b/core/mac/src/pe/lim/lim_process_disassoc_frame.c index 5c9869b9b048..b5ddf9372e73 100644 --- a/core/mac/src/pe/lim/lim_process_disassoc_frame.c +++ b/core/mac/src/pe/lim/lim_process_disassoc_frame.c @@ -262,8 +262,7 @@ lim_process_disassoc_frame(struct mac_context *mac, uint8_t *pRxPacketInfo, break; } } else { - /* Received Disassociation frame in either IBSS */ - /* or un-known role. Log and ignore it */ + /* Received Disassoc in un-known role. Log and ignore it */ pe_err("received Disassoc frame with invalid reasonCode: %d in role:" "%d in sme state: %d from " QDF_MAC_ADDR_STR, reasonCode, GET_LIM_SYSTEM_ROLE(pe_session), pe_session->limSmeState, diff --git a/core/mac/src/pe/lim/lim_process_message_queue.c b/core/mac/src/pe/lim/lim_process_message_queue.c index a27a2406b37b..05438444302c 100644 --- a/core/mac/src/pe/lim/lim_process_message_queue.c +++ b/core/mac/src/pe/lim/lim_process_message_queue.c @@ -39,7 +39,6 @@ #include "lim_prop_exts_utils.h" #include "lim_admit_control.h" -#include "lim_ibss_peer_mgmt.h" #include "sch_api.h" #include "lim_ft_defs.h" #include "lim_session.h" @@ -1931,11 +1930,6 @@ static void lim_process_messages(struct mac_context *mac_ctx, case WMA_RX_CHN_STATUS_EVENT: lim_process_rx_channel_status_event(mac_ctx, msg->bodyptr); break; - case WMA_IBSS_PEER_INACTIVITY_IND: - lim_process_ibss_peer_inactivity(mac_ctx, msg->bodyptr); - qdf_mem_free((void *)(msg->bodyptr)); - msg->bodyptr = NULL; - break; case WMA_DFS_BEACON_TX_SUCCESS_IND: lim_process_beacon_tx_success_ind(mac_ctx, msg->type, (void *)msg->bodyptr); diff --git a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c index be59fbb5801e..5d22c8f8aba8 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_req_messages.c @@ -490,8 +490,7 @@ static bool lim_is_auth_req_expected(struct mac_context *mac_ctx, /* * Expect Auth request only when: * 1. STA joined/associated with a BSS or - * 2. STA is in IBSS mode - * and STA is going to authenticate with a unicast + * 2. STA is going to authenticate with a unicast * address and requested authentication algorithm is * supported. */ @@ -499,10 +498,7 @@ static bool lim_is_auth_req_expected(struct mac_context *mac_ctx, flag = (((LIM_IS_STA_ROLE(session) && ((session->limMlmState == eLIM_MLM_JOINED_STATE) || (session->limMlmState == - eLIM_MLM_LINK_ESTABLISHED_STATE))) || - (LIM_IS_IBSS_ROLE(session) && - (session->limMlmState == - eLIM_MLM_BSS_STARTED_STATE))) && + eLIM_MLM_LINK_ESTABLISHED_STATE)))) && (!IEEE80211_IS_MULTICAST( mac_ctx->lim.gpLimMlmAuthReq->peerMacAddr)) && lim_is_auth_algo_supported(mac_ctx, @@ -976,8 +972,6 @@ lim_process_mlm_disassoc_req_ntf(struct mac_context *mac_ctx, } break; - case eLIM_STA_IN_IBSS_ROLE: - break; case eLIM_AP_ROLE: case eLIM_P2P_DEVICE_GO: if (true == @@ -1347,10 +1341,6 @@ lim_process_mlm_deauth_req_ntf(struct mac_context *mac_ctx, goto end; } break; - case eLIM_STA_IN_IBSS_ROLE: - pe_err("received MLM_DEAUTH_REQ IBSS Mode"); - mlm_deauth_cnf.resultCode = eSIR_SME_INVALID_PARAMETERS; - goto end; case eLIM_AP_ROLE: case eLIM_P2P_DEVICE_GO: if (true == @@ -1805,7 +1795,7 @@ lim_process_auth_rsp_timeout(struct mac_context *mac_ctx, uint32_t auth_idx) session, 0, AUTH_RESPONSE_TIMEOUT); #endif - if (LIM_IS_AP_ROLE(session) || LIM_IS_IBSS_ROLE(session)) { + if (LIM_IS_AP_ROLE(session)) { if (auth_node->mlmState != eLIM_MLM_WT_AUTH_FRAME3_STATE) { pe_err("received AUTH rsp timeout in unexpected " "state for MAC address: " QDF_MAC_ADDR_STR, diff --git a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c index e1b8953bb0d8..bbccfaa0054b 100644 --- a/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_process_mlm_rsp_messages.c @@ -29,7 +29,6 @@ #include "lim_send_messages.h" #include "lim_admit_control.h" #include "lim_send_messages.h" -#include "lim_ibss_peer_mgmt.h" #include "lim_ft.h" #include "lim_ft_defs.h" #include "lim_session.h" @@ -224,9 +223,8 @@ void lim_process_mlm_start_cnf(struct mac_context *mac, uint32_t *msg_buf) pe_session->ch_center_freq_seg1, BIT(band)); - if (!(LIM_IS_IBSS_ROLE(pe_session) || - (LIM_IS_AP_ROLE(pe_session)))) - return; + if (!LIM_IS_AP_ROLE(pe_session)) + return; if (pe_session->ch_width == CH_WIDTH_160MHZ) { send_bcon_ind = false; } else if (pe_session->ch_width == CH_WIDTH_80P80MHZ) { @@ -844,8 +842,6 @@ void lim_process_mlm_disassoc_ind(struct mac_context *mac, uint32_t *msg_buf) return; } switch (GET_LIM_SYSTEM_ROLE(pe_session)) { - case eLIM_STA_IN_IBSS_ROLE: - break; case eLIM_STA_ROLE: pe_session->limSmeState = eLIM_SME_WT_DISASSOC_STATE; MTRACE(mac_trace @@ -1093,8 +1089,6 @@ void lim_process_mlm_purge_sta_ind(struct mac_context *mac, uint32_t *msg_buf) /* Purge STA indication from MLM */ resultCode = (tSirResultCodes) pMlmPurgeStaInd->reasonCode; switch (GET_LIM_SYSTEM_ROLE(pe_session)) { - case eLIM_STA_IN_IBSS_ROLE: - break; case eLIM_STA_ROLE: default: /* eLIM_AP_ROLE */ if (LIM_IS_STA_ROLE(pe_session) && @@ -1730,11 +1724,6 @@ void lim_process_mlm_del_sta_rsp(struct mac_context *mac_ctx, session_entry); return; } - if (LIM_IS_IBSS_ROLE(session_entry)) { - lim_process_ibss_del_sta_rsp(mac_ctx, msg, - session_entry); - return; - } if (LIM_IS_NDI_ROLE(session_entry)) { lim_process_ndi_del_sta_rsp(mac_ctx, msg, session_entry); return; @@ -1985,22 +1974,8 @@ static void lim_process_ap_mlm_add_bss_rsp(struct mac_context *mac, MTRACE(mac_trace (mac, TRACE_CODE_MLM_STATE, pe_session->peSessionId, pe_session->limMlmState)); - if (eSIR_IBSS_MODE == pe_session->bssType) { - /** IBSS is 'active' when we receive - * Beacon frames from other STAs that are part of same IBSS. - * Mark internal state as inactive until then. - */ - pe_session->limIbssActive = false; - pe_session->statypeForBss = STA_ENTRY_PEER; /* to know session created for self/peer */ - limResetHBPktCount(pe_session); - } + pe_session->limSystemRole = eLIM_AP_ROLE; - pe_session->limSystemRole = eLIM_STA_IN_IBSS_ROLE; - - if (eSIR_INFRA_AP_MODE == pe_session->bssType) - pe_session->limSystemRole = eLIM_AP_ROLE; - else - pe_session->limSystemRole = eLIM_STA_IN_IBSS_ROLE; sch_edca_profile_update(mac, pe_session); lim_init_pre_auth_list(mac); /* Check the SAP security configuration.If configured to @@ -2050,76 +2025,6 @@ static void lim_process_ap_mlm_add_bss_rsp(struct mac_context *mac, lim_send_start_bss_confirm(mac, &mlmStartCnf); } -#ifdef QCA_IBSS_SUPPORT -/* - * lim_process_ibss_mlm_add_bss_rsp: API to process add bss response - * in IBSS role - * @session_entry: pe session entry - * @auth_mode: auth mode needs to be updated - * - * Return: None - */ -static void -lim_process_ibss_mlm_add_bss_rsp(struct mac_context *mac, - struct add_bss_rsp *add_bss_rsp, - struct pe_session *pe_session) -{ - tLimMlmStartCnf mlmStartCnf; - - if (!add_bss_rsp) { - pe_err("add_bss_rsp is NULL"); - return; - } - if (QDF_IS_STATUS_SUCCESS(add_bss_rsp->status)) { - pe_debug("WMA_ADD_BSS_RSP returned with QDF_STATUS_SUCCESS"); - - /* Set MLME state */ - pe_session->limMlmState = eLIM_MLM_BSS_STARTED_STATE; - MTRACE(mac_trace - (mac, TRACE_CODE_MLM_STATE, pe_session->peSessionId, - pe_session->limMlmState)); - /** IBSS is 'active' when we receive - * Beacon frames from other STAs that are part of same IBSS. - * Mark internal state as inactive until then. - */ - pe_session->limIbssActive = false; - limResetHBPktCount(pe_session); - pe_session->limSystemRole = eLIM_STA_IN_IBSS_ROLE; - pe_session->statypeForBss = STA_ENTRY_SELF; - sch_edca_profile_update(mac, pe_session); - if (0 == pe_session->freePeerIdxHead) - lim_init_peer_idxpool(mac, pe_session); - - /* Apply previously set configuration at HW */ - lim_apply_configuration(mac, pe_session); - mlmStartCnf.resultCode = eSIR_SME_SUCCESS; - /* If ADD BSS was issued as part of IBSS coalescing, don't send the message to SME, as that is internal to LIM */ - if (true == mac->lim.gLimIbssCoalescingHappened) { - lim_ibss_add_bss_rsp_when_coalescing(mac, - pe_session->curr_op_freq, - pe_session); - return; - } - } else { - pe_err("WMA_ADD_BSS_REQ failed with status %d", - add_bss_rsp->status); - mlmStartCnf.resultCode = eSIR_SME_HAL_SEND_MESSAGE_FAIL; - } - /* Send this message to SME, when ADD_BSS is initiated by SME */ - /* If ADD_BSS is done as part of coalescing, this won't happen. */ - /* Update PE session Id */ - mlmStartCnf.sessionId = pe_session->peSessionId; - lim_send_start_bss_confirm(mac, &mlmStartCnf); -} -#else -static inline void -lim_process_ibss_mlm_add_bss_rsp(struct mac_context *mac, - struct add_bss_rsp *add_bss_rsp, - struct pe_session *pe_session) -{ -} -#endif - #ifdef WLAN_FEATURE_FILS_SK /* * lim_update_fils_auth_mode: API to update Auth mode in case of fils session @@ -2349,10 +2254,7 @@ void lim_handle_add_bss_rsp(struct mac_context *mac_ctx, bss_type = session_entry->bssType; /* update PE session Id */ mlm_start_cnf.sessionId = session_entry->peSessionId; - if (eSIR_IBSS_MODE == bss_type) { - lim_process_ibss_mlm_add_bss_rsp(mac_ctx, add_bss_rsp, - session_entry); - } else if (eSIR_NDI_MODE == session_entry->bssType) { + if (eSIR_NDI_MODE == session_entry->bssType) { lim_process_ndi_mlm_add_bss_rsp(mac_ctx, add_bss_rsp, session_entry); } else { diff --git a/core/mac/src/pe/lim/lim_process_probe_req_frame.c b/core/mac/src/pe/lim/lim_process_probe_req_frame.c index 8d73ae0e3e7c..4618b1e350f5 100644 --- a/core/mac/src/pe/lim/lim_process_probe_req_frame.c +++ b/core/mac/src/pe/lim/lim_process_probe_req_frame.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -255,9 +255,7 @@ lim_process_probe_req_frame(struct mac_context *mac_ctx, uint8_t *rx_pkt_info, tAniSSID ssid; mac_hdr = WMA_GET_RX_MAC_HEADER(rx_pkt_info); - if (LIM_IS_AP_ROLE(session) || - (LIM_IS_IBSS_ROLE(session) && - (WMA_GET_RX_BEACON_SENT(rx_pkt_info)))) { + if (LIM_IS_AP_ROLE(session)) { frame_len = WMA_GET_RX_PAYLOAD_LEN(rx_pkt_info); pe_debug("Received Probe Request: %d bytes from", @@ -490,8 +488,7 @@ lim_process_probe_req_frame_multiple_bss(struct mac_context *mac_ctx, if (LIM_IS_AP_ROLE(session)) lim_indicate_probe_req_to_hdd(mac_ctx, buf_descr, session); - if (LIM_IS_AP_ROLE(session) || - LIM_IS_IBSS_ROLE(session)) + if (LIM_IS_AP_ROLE(session)) lim_process_probe_req_frame(mac_ctx, buf_descr, session); } diff --git a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c index 9db6e23a27d1..af19fb2b373c 100644 --- a/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c +++ b/core/mac/src/pe/lim/lim_process_probe_rsp_frame.c @@ -262,12 +262,6 @@ lim_process_probe_rsp_frame(struct mac_context *mac_ctx, uint8_t *rx_Packet_info lim_detect_change_in_ap_capabilities( mac_ctx, probe_rsp, session_entry); } - } else { - if (LIM_IS_IBSS_ROLE(session_entry) && - (session_entry->limMlmState == - eLIM_MLM_BSS_STARTED_STATE)) - lim_handle_ibss_coalescing(mac_ctx, probe_rsp, - rx_Packet_info, session_entry); } qdf_mem_free(probe_rsp); diff --git a/core/mac/src/pe/lim/lim_process_sme_req_messages.c b/core/mac/src/pe/lim/lim_process_sme_req_messages.c index 89288a9a4cff..09eb5968c461 100644 --- a/core/mac/src/pe/lim/lim_process_sme_req_messages.c +++ b/core/mac/src/pe/lim/lim_process_sme_req_messages.c @@ -39,7 +39,6 @@ #include "lim_security_utils.h" #include "lim_ser_des_utils.h" #include "lim_sme_req_utils.h" -#include "lim_ibss_peer_mgmt.h" #include "lim_admit_control.h" #include "dph_hash_table.h" #include "lim_send_messages.h" @@ -84,10 +83,6 @@ static void lim_update_add_ie_buffer(struct mac_context *mac, uint8_t **pDstData_buff, uint16_t *pDstDataLen, uint8_t *pSrcData_buff, uint16_t srcDataLen); -static bool lim_update_ibss_prop_add_ies(struct mac_context *mac, - uint8_t **pDstData_buff, - uint16_t *pDstDataLen, - tSirModifyIE *pModifyIE); static void lim_process_modify_add_ies(struct mac_context *mac, uint32_t *pMsg); static void lim_process_update_add_ies(struct mac_context *mac, uint32_t *pMsg); @@ -540,8 +535,6 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu tLimMlmStartReq *mlm_start_req = NULL; struct start_bss_req *sme_start_bss_req = NULL; tSirResultCodes ret_code = eSIR_SME_SUCCESS; - /* Flag Used in case of IBSS to Auto generate BSSID. */ - uint32_t auto_gen_bssid = false; uint8_t session_id; struct pe_session *session = NULL; uint8_t vdev_id = 0xFF; @@ -604,7 +597,6 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu /* Update the beacon/probe filter in mac_ctx */ lim_set_bcn_probe_filter(mac_ctx, session, - &sme_start_bss_req->ssId, channel_number); } @@ -713,20 +705,6 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu else session->vdev_nss = vdev_type_nss->p2p_go; break; - case eSIR_IBSS_MODE: - session->limSystemRole = eLIM_STA_IN_IBSS_ROLE; - lim_get_short_slot_from_phy_mode(mac_ctx, session, - session->gLimPhyMode, - &session->shortSlotTimeSupported); - - /* - * initialize to "OPEN". - * will be updated upon key installation - */ - session->encryptType = eSIR_ED_NONE; - session->vdev_nss = vdev_type_nss->ibss; - - break; case eSIR_NDI_MODE: session->limSystemRole = eLIM_NDI_ROLE; break; @@ -800,9 +778,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu lim_set_rs_nie_wp_aiefrom_sme_start_bss_req_message(mac_ctx, &sme_start_bss_req->rsnIE, session); - if (LIM_IS_AP_ROLE(session) || - LIM_IS_IBSS_ROLE(session) || - LIM_IS_NDI_ROLE(session)) { + if (LIM_IS_AP_ROLE(session) || LIM_IS_NDI_ROLE(session)) { session->gLimProtectionControl = sme_start_bss_req->protEnabled; /* @@ -836,51 +812,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu /* Fill PE session Id from the session Table */ mlm_start_req->sessionId = session->peSessionId; - if (mlm_start_req->bssType == eSIR_INFRA_AP_MODE || - mlm_start_req->bssType == eSIR_NDI_MODE) { - /* - * Copy the BSSId from sessionTable to - * mlmStartReq struct - */ - sir_copy_mac_addr(mlm_start_req->bssId, session->bssId); - } else { - /* ibss mode */ - mac_ctx->lim.gLimIbssCoalescingHappened = false; - auto_gen_bssid = mac_ctx->mlme_cfg->ibss.auto_bssid; - - if (!auto_gen_bssid) { - /* - * We're not auto generating BSSID. - * Instead, get it from session entry - */ - sir_copy_mac_addr(mlm_start_req->bssId, - session->bssId); - /* - * Start IBSS group BSSID - * Auto Generating BSSID. - */ - auto_gen_bssid = ((mlm_start_req->bssId[0] & - 0x01) ? true : false); - } - - if (auto_gen_bssid) { - /* - * if BSSID is not any uc id. - * then use locally generated BSSID. - * Autogenerate the BSSID - */ - lim_get_random_bssid(mac_ctx, - mlm_start_req->bssId); - mlm_start_req->bssId[0] = 0x02; - - /* - * Copy randomly generated BSSID - * to the session Table - */ - sir_copy_mac_addr(session->bssId, - mlm_start_req->bssId); - } - } + sir_copy_mac_addr(mlm_start_req->bssId, session->bssId); /* store the channel num in mlmstart req structure */ mlm_start_req->oper_ch_freq = session->curr_op_freq; mlm_start_req->cbMode = sme_start_bss_req->cbMode; @@ -931,8 +863,7 @@ __lim_handle_sme_start_bss_request(struct mac_context *mac_ctx, uint32_t *msg_bu /* Initialize 11h Enable Flag */ session->lim11hEnable = 0; - if (mlm_start_req->bssType != eSIR_IBSS_MODE && - (CHAN_HOP_ALL_BANDS_ENABLE || + if ((CHAN_HOP_ALL_BANDS_ENABLE || REG_BAND_5G == session->limRFBand)) { session->lim11hEnable = mac_ctx->mlme_cfg->gen.enabled_11h; @@ -1313,7 +1244,6 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf) } /* Update the beacon/probe filter in mac_ctx */ lim_set_bcn_probe_filter(mac_ctx, session, - &sme_join_req->ssId, bss_chan_id); } session->max_amsdu_num = sme_join_req->max_amsdu_num; @@ -1580,11 +1510,6 @@ __lim_process_sme_join_req(struct mac_context *mac_ctx, void *msg_buf) mac_ctx->mlme_cfg->gen.enabled_11h; else session->lim11hEnable = 0; - /* - * To care of the scenario when STA transitions from - * IBSS to Infrastructure mode. - */ - mac_ctx->lim.gLimIbssCoalescingHappened = false; session->limPrevSmeState = session->limSmeState; session->limSmeState = eLIM_SME_WT_JOIN_STATE; @@ -2133,7 +2058,6 @@ static void __lim_process_sme_disassoc_req(struct mac_context *mac, /* Fall through */ break; - case eLIM_STA_IN_IBSS_ROLE: default: /* eLIM_UNKNOWN_ROLE */ pe_err("received unexpected SME_DISASSOC_REQ for role %d", @@ -2270,8 +2194,6 @@ void __lim_process_sme_disassoc_cnf(struct mac_context *mac, uint32_t *msg_buf) case eLIM_AP_ROLE: /* Fall through */ break; - - case eLIM_STA_IN_IBSS_ROLE: default: /* eLIM_UNKNOWN_ROLE */ pe_err("received unexpected SME_DISASSOC_CNF role %d", GET_LIM_SYSTEM_ROLE(pe_session)); @@ -2466,16 +2388,6 @@ static void __lim_process_sme_deauth_req(struct mac_context *mac_ctx, return; } break; - - case eLIM_STA_IN_IBSS_ROLE: - pe_err("Deauth not allowed in IBSS"); - if (mac_ctx->lim.gLimRspReqd) { - mac_ctx->lim.gLimRspReqd = false; - ret_code = eSIR_SME_INVALID_PARAMETERS; - deauth_trigger = eLIM_HOST_DEAUTH; - goto send_deauth; - } - return; case eLIM_AP_ROLE: break; default: @@ -2579,8 +2491,7 @@ void lim_delete_all_peers(struct pe_session *session) tSirMacAddr bc_addr = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}; /* IBSS and NDI doesn't send Disassoc frame */ - if (!LIM_IS_IBSS_ROLE(session) && - !LIM_IS_NDI_ROLE(session)) { + if (!LIM_IS_NDI_ROLE(session)) { pe_debug("stop_bss_reason: %d", session->stop_bss_reason); if (session->stop_bss_reason == eSIR_SME_MIC_COUNTER_MEASURES) __lim_counter_measures(mac_ctx, session); @@ -2752,12 +2663,6 @@ __lim_handle_sme_stop_bss_request(struct mac_context *mac, uint32_t *msg_buf) qdf_mem_free(pe_session->add_ie_params.probeRespBCNData_buff); pe_session->add_ie_params.probeRespBCNDataLen = 0; pe_session->add_ie_params.probeRespBCNData_buff = NULL; - - /* - * lim_del_bss is also called as part of coalescing, - * when we send DEL BSS followed by Add Bss msg. - */ - mac->lim.gLimIbssCoalescingHappened = false; } lim_delete_peers_and_send_vdev_stop(pe_session); @@ -2789,7 +2694,6 @@ void lim_process_sme_del_bss_rsp(struct mac_context *mac, struct pe_session *pe_session) { SET_LIM_PROCESS_DEFD_MESGS(mac, true); - lim_ibss_delete(mac, pe_session); dph_hash_table_init(mac, &pe_session->dph.dphHashTable); lim_delete_pre_auth_list(mac); lim_send_sme_rsp(mac, eWNI_SME_STOP_BSS_RSP, eSIR_SME_SUCCESS, @@ -5046,85 +4950,6 @@ lim_update_add_ie_buffer(struct mac_context *mac, } -#ifdef QCA_IBSS_SUPPORT -/** - * lim_update_ibss_prop_add_ies() - update IBSS prop IE - * @mac : Pointer to Global MAC structure - * @pDstData_buff : A pointer to pointer of dst buffer - * @pDstDataLen : A pointer to pointer of dst buffer length - * @pModifyIE : A pointer to tSirModifyIE - * - * This function replaces previous ibss prop_ie with new ibss prop_ie. - * - * Return: - * True or false depending upon whether IE is updated or not - */ -static bool -lim_update_ibss_prop_add_ies(struct mac_context *mac, uint8_t **pDstData_buff, - uint16_t *pDstDataLen, tSirModifyIE *pModifyIE) -{ - int32_t oui_length; - uint8_t *ibss_ie = NULL; - uint8_t *vendor_ie; -#define MAC_VENDOR_OUI "\x00\x16\x32" -#define MAC_VENDOR_SIZE 3 - - ibss_ie = pModifyIE->pIEBuffer; - oui_length = pModifyIE->oui_length; - - if ((0 == oui_length) || (!ibss_ie)) { - pe_err("Invalid set IBSS vendor IE command length %d", - oui_length); - return false; - } - - /* - * Why replace only beacon OUI data here: - * 1. other ie (such as wpa) shall not be overwritten here. - * 2. per spec, beacon oui ie might be set twice and original one - * shall be updated. - */ - vendor_ie = (uint8_t *)wlan_get_vendor_ie_ptr_from_oui(MAC_VENDOR_OUI, - MAC_VENDOR_SIZE, *pDstData_buff, *pDstDataLen); - if (vendor_ie) { - QDF_ASSERT((vendor_ie[1] + 2) == pModifyIE->ieBufferlength); - qdf_mem_copy(vendor_ie, pModifyIE->pIEBuffer, - pModifyIE->ieBufferlength); - } else { - uint16_t new_length; - uint8_t *new_ptr; - - /* - * check for uint16 overflow before using sum of two numbers as - * length of size to malloc - */ - if (USHRT_MAX - pModifyIE->ieBufferlength < *pDstDataLen) { - pe_err("U16 overflow due to %d + %d", - pModifyIE->ieBufferlength, *pDstDataLen); - return false; - } - - new_length = pModifyIE->ieBufferlength + *pDstDataLen; - new_ptr = qdf_mem_malloc(new_length); - if (!new_ptr) - return false; - qdf_mem_copy(new_ptr, *pDstData_buff, *pDstDataLen); - qdf_mem_copy(&new_ptr[*pDstDataLen], pModifyIE->pIEBuffer, - pModifyIE->ieBufferlength); - qdf_mem_free(*pDstData_buff); - *pDstDataLen = new_length; - *pDstData_buff = new_ptr; - } - return true; -} -#else -static bool -lim_update_ibss_prop_add_ies(struct mac_context *mac, uint8_t **pDstData_buff, - uint16_t *pDstDataLen, tSirModifyIE *pModifyIE) -{ - return false; -} -#endif /* * lim_process_modify_add_ies() - process modify additional IE req. * @@ -5175,12 +5000,6 @@ static void lim_process_modify_add_ies(struct mac_context *mac_ctx, switch (modify_add_ies->updateType) { case eUPDATE_IE_PROBE_RESP: /* Probe resp */ - if (LIM_IS_IBSS_ROLE(session_entry)) { - lim_update_ibss_prop_add_ies(mac_ctx, - &add_ie_params->probeRespData_buff, - &add_ie_params->probeRespDataLen, - &modify_add_ies->modifyIE); - } break; case eUPDATE_IE_ASSOC_RESP: /* assoc resp IE */ @@ -5194,12 +5013,6 @@ static void lim_process_modify_add_ies(struct mac_context *mac_ctx, break; case eUPDATE_IE_PROBE_BCN: /*probe beacon IE */ - if (LIM_IS_IBSS_ROLE(session_entry)) { - ret = lim_update_ibss_prop_add_ies(mac_ctx, - &add_ie_params->probeRespBCNData_buff, - &add_ie_params->probeRespBCNDataLen, - &modify_add_ies->modifyIE); - } if (ret == true && modify_add_ies->modifyIE.notify) { lim_handle_param_update(mac_ctx, modify_add_ies->updateType); diff --git a/core/mac/src/pe/lim/lim_reassoc_utils.c b/core/mac/src/pe/lim/lim_reassoc_utils.c index e57a2fa2ccb6..1be2732e7e53 100644 --- a/core/mac/src/pe/lim/lim_reassoc_utils.c +++ b/core/mac/src/pe/lim/lim_reassoc_utils.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2016-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -37,7 +37,6 @@ #include "lim_ser_des_utils.h" #include "lim_admit_control.h" #include "lim_send_messages.h" -#include "lim_ibss_peer_mgmt.h" #include "lim_ft_defs.h" #include "lim_session.h" #include "lim_process_fils.h" diff --git a/core/mac/src/pe/lim/lim_send_management_frames.c b/core/mac/src/pe/lim/lim_send_management_frames.c index 39d60b43578d..2c0fe22a8bd4 100644 --- a/core/mac/src/pe/lim/lim_send_management_frames.c +++ b/core/mac/src/pe/lim/lim_send_management_frames.c @@ -646,7 +646,6 @@ lim_send_probe_rsp_mgmt_frame(struct mac_context *mac_ctx, mac_ctx, &frm->DSParams, wlan_reg_freq_to_chan(mac_ctx->pdev, pe_session->curr_op_freq)); - populate_dot11f_ibss_params(mac_ctx, &frm->IBSSParams, pe_session); if (LIM_IS_AP_ROLE(pe_session)) { if (pe_session->wps_state != SAP_WPS_DISABLED) diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c index 11dbba620539..09de50a53e54 100644 --- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c +++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.c @@ -41,7 +41,6 @@ #include "lim_security_utils.h" #include "lim_ser_des_utils.h" #include "lim_send_sme_rsp_messages.h" -#include "lim_ibss_peer_mgmt.h" #include "lim_session_utils.h" #include "lim_types.h" #include "sir_api.h" @@ -1168,9 +1167,6 @@ lim_send_sme_wm_status_change_ntf(struct mac_context *mac_ctx, case eSIR_SME_AP_CAPS_CHANGED: max_info_len = sizeof(struct ap_new_caps); break; - case eSIR_SME_JOINED_NEW_BSS: - max_info_len = sizeof(struct new_bss_info); - break; default: max_info_len = sizeof(wm_status_change_ntf->statusChangeInfo); break; @@ -1414,40 +1410,6 @@ void lim_send_sme_pe_ese_tsm_rsp(struct mac_context *mac, #endif /* FEATURE_WLAN_ESE */ -#ifdef QCA_IBSS_SUPPORT -void -lim_send_sme_ibss_peer_ind(struct mac_context *mac, - tSirMacAddr peerMacAddr, - uint8_t *beacon, - uint16_t beaconLen, uint16_t msgType, uint8_t sessionId) -{ - struct scheduler_msg mmhMsg = {0}; - tSmeIbssPeerInd *pNewPeerInd; - - pNewPeerInd = qdf_mem_malloc(sizeof(tSmeIbssPeerInd) + beaconLen); - if (!pNewPeerInd) - return; - - qdf_mem_copy((uint8_t *) pNewPeerInd->peer_addr.bytes, - peerMacAddr, QDF_MAC_ADDR_SIZE); - pNewPeerInd->mesgLen = sizeof(tSmeIbssPeerInd) + beaconLen; - pNewPeerInd->mesgType = msgType; - pNewPeerInd->sessionId = sessionId; - - if (beacon) { - qdf_mem_copy((void *)((uint8_t *) pNewPeerInd + - sizeof(tSmeIbssPeerInd)), (void *)beacon, - beaconLen); - } - - mmhMsg.type = msgType; - mmhMsg.bodyptr = pNewPeerInd; - MTRACE(mac_trace(mac, TRACE_CODE_TX_SME_MSG, sessionId, mmhMsg.type)); - lim_sys_process_mmh_msg_api(mac, &mmhMsg); - -} -#endif - /** * lim_process_csa_wbw_ie() - Process CSA Wide BW IE * @mac_ctx: pointer to global adapter context @@ -1890,9 +1852,7 @@ void lim_handle_delete_bss_rsp(struct mac_context *mac, * not take the HO_FAIL path */ pe_session->process_ho_fail = false; - if (LIM_IS_IBSS_ROLE(pe_session)) - lim_ibss_del_bss_rsp(mac, del_bss_rsp, pe_session); - else if (LIM_IS_UNKNOWN_ROLE(pe_session)) + if (LIM_IS_UNKNOWN_ROLE(pe_session)) lim_process_sme_del_bss_rsp(mac, pe_session); else if (LIM_IS_NDI_ROLE(pe_session)) lim_ndi_del_bss_rsp(mac, del_bss_rsp, pe_session); diff --git a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h index 0c7255483394..cf0fb485cf54 100644 --- a/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h +++ b/core/mac/src/pe/lim/lim_send_sme_rsp_messages.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012-2019 The Linux Foundation. All rights reserved. + * Copyright (c) 2012-2020 The Linux Foundation. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for * any purpose with or without fee is hereby granted, provided that the @@ -226,36 +226,6 @@ void lim_send_sme_delts_ind(struct mac_context *mac, void lim_send_sme_pe_ese_tsm_rsp(struct mac_context *mac, tAniGetTsmStatsRsp *pStats); #endif -#ifdef QCA_IBSS_SUPPORT -/* - * lim_send_sme_ibss_peer_ind() - API to send ibss peer ind to sme - * @mac_ctx: Global mac_ctx - * @peerMacAddr: peer mac address - * @staIndex: sta index - * @beacon: pionter to beacon - * @beaconLen: length of beacon buffer - * @msg_type: msg_type - * @sessionId: session id - * - * - * Return: none - */ -void lim_send_sme_ibss_peer_ind(struct mac_context *mac, tSirMacAddr peerMacAddr, - uint8_t *beacon, - uint16_t beaconLen, uint16_t msgType, - uint8_t sessionId); -#else -static inline void -lim_send_sme_ibss_peer_ind(struct mac_context *mac, - tSirMacAddr peerMacAddr, - uint16_t staIndex, - uint8_t *beacon, - uint16_t beaconLen, uint16_t msgType, - uint8_t sessionId) -{ -} -#endif - void lim_send_sme_max_assoc_exceeded_ntf(struct mac_context *mac, tSirMacAddr peerMacAddr, uint8_t smesessionId); diff --git a/core/mac/src/pe/lim/lim_session.c b/core/mac/src/pe/lim/lim_session.c index abc8b87b1b60..d6044cdcc74d 100644 --- a/core/mac/src/pe/lim/lim_session.c +++ b/core/mac/src/pe/lim/lim_session.c @@ -384,7 +384,6 @@ lim_get_peer_idxpool_size(uint16_t num_sta, enum bss_type bss_type) void lim_set_bcn_probe_filter(struct mac_context *mac_ctx, struct pe_session *session, - tSirMacSSid *ibss_ssid, uint8_t sap_channel) { struct mgmt_beacon_probe_filter *filter; @@ -414,18 +413,6 @@ void lim_set_bcn_probe_filter(struct mac_context *mac_ctx, sir_copy_mac_addr(filter->sta_bssid[session_id], *bssid); pe_debug("Set filter for STA Session %d bssid "QDF_MAC_ADDR_STR, session_id, QDF_MAC_ADDR_ARRAY(*bssid)); - } else if (eSIR_IBSS_MODE == bss_type) { - if (!ibss_ssid) { - pe_err("IBSS Type with NULL SSID"); - goto done; - } - filter->num_ibss_sessions++; - filter->ibss_ssid[session_id].length = ibss_ssid->length; - qdf_mem_copy(&filter->ibss_ssid[session_id].ssId, - ibss_ssid->ssId, - ibss_ssid->length); - pe_debug("Set filter for IBSS session %d ssid %s", - session_id, ibss_ssid->ssId); } else if (eSIR_INFRA_AP_MODE == bss_type) { if (!sap_channel) { pe_err("SAP Type with invalid channel"); @@ -438,9 +425,8 @@ void lim_set_bcn_probe_filter(struct mac_context *mac_ctx, } done: - pe_debug("sta %d ibss %d sap %d", - filter->num_sta_sessions, filter->num_ibss_sessions, - filter->num_sap_sessions); + pe_debug("sta %d sap %d", filter->num_sta_sessions, + filter->num_sap_sessions); } void lim_reset_bcn_probe_filter(struct mac_context *mac_ctx, @@ -472,13 +458,6 @@ void lim_reset_bcn_probe_filter(struct mac_context *mac_ctx, qdf_mem_zero(&filter->sta_bssid[session_id], sizeof(tSirMacAddr)); pe_debug("Cleared STA Filter for session %d", session_id); - } else if (eSIR_IBSS_MODE == bss_type) { - if (filter->num_ibss_sessions) - filter->num_ibss_sessions--; - filter->ibss_ssid[session_id].length = 0; - qdf_mem_zero(&filter->ibss_ssid[session_id].ssId, - WLAN_SSID_MAX_LEN); - pe_debug("Cleared IBSS Filter for session %d", session_id); } else if (eSIR_INFRA_AP_MODE == bss_type) { if (filter->num_sap_sessions) filter->num_sap_sessions--; @@ -486,9 +465,8 @@ void lim_reset_bcn_probe_filter(struct mac_context *mac_ctx, pe_debug("Cleared SAP Filter for session %d", session_id); } - pe_debug("sta %d ibss %d sap %d", - filter->num_sta_sessions, filter->num_ibss_sessions, - filter->num_sap_sessions); + pe_debug("sta %d sap %d", filter->num_sta_sessions, + filter->num_sap_sessions); } void lim_update_bcn_probe_filter(struct mac_context *mac_ctx, @@ -524,9 +502,8 @@ void lim_update_bcn_probe_filter(struct mac_context *mac_ctx, bss_type, session_id); } - pe_debug("sta %d ibss %d sap %d", - filter->num_sta_sessions, filter->num_ibss_sessions, - filter->num_sap_sessions); + pe_debug("sta %d sap %d", filter->num_sta_sessions, + filter->num_sap_sessions); } struct pe_session *pe_create_session(struct mac_context *mac, @@ -614,7 +591,7 @@ struct pe_session *pe_create_session(struct mac_context *mac, *sessionId, opmode, vdev_id, QDF_MAC_ADDR_ARRAY(bssid), numSta); - if (eSIR_INFRA_AP_MODE == bssType || eSIR_IBSS_MODE == bssType) { + if (bssType == eSIR_INFRA_AP_MODE) { session_ptr->pSchProbeRspTemplate = qdf_mem_malloc(SIR_MAX_PROBE_RESP_SIZE); session_ptr->pSchBeaconFrameBegin = diff --git a/core/mac/src/pe/lim/lim_sme_req_utils.c b/core/mac/src/pe/lim/lim_sme_req_utils.c index c682624cf7ac..e6cc8bca603f 100644 --- a/core/mac/src/pe/lim/lim_sme_req_utils.c +++ b/core/mac/src/pe/lim/lim_sme_req_utils.c @@ -368,8 +368,6 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx, start_bss_req->bssType); return false; break; - case eSIR_IBSS_MODE: - break; case eSIR_INFRA_AP_MODE: break; case eSIR_NDI_MODE: @@ -384,13 +382,6 @@ bool lim_is_sme_start_bss_req_valid(struct mac_context *mac_ctx, return false; } - if (start_bss_req->bssType == eSIR_IBSS_MODE - && (!start_bss_req->ssId.length - || start_bss_req->ssId.length > WLAN_SSID_MAX_LEN)) { - pe_warn("Invalid SSID length in eWNI_SME_START_BSS_REQ"); - return false; - } - if (!lim_is_rsn_ie_valid_in_sme_req_message(mac_ctx, &start_bss_req->rsnIE)) return false; diff --git a/core/mac/src/pe/lim/lim_utils.c b/core/mac/src/pe/lim/lim_utils.c index 733697b27686..47ca5c29e57d 100644 --- a/core/mac/src/pe/lim/lim_utils.c +++ b/core/mac/src/pe/lim/lim_utils.c @@ -42,7 +42,6 @@ #ifdef FEATURE_WLAN_DIAG_SUPPORT #include "host_diag_core_event.h" #endif /* FEATURE_WLAN_DIAG_SUPPORT */ -#include "lim_ibss_peer_mgmt.h" #include "lim_session_utils.h" #include "lim_ft_defs.h" #include "lim_session.h" @@ -1925,10 +1924,8 @@ void lim_disconnect_complete(struct pe_session *session, bool del_bss) wlan_vdev_mlme_sm_deliver_evt(session->vdev, WLAN_VDEV_SM_EV_DISCONNECT_COMPLETE, sizeof(*session), session); - if (!mac->lim.gLimIbssCoalescingHappened && - QDF_IS_STATUS_ERROR(status)) { + if (QDF_IS_STATUS_ERROR(status)) lim_send_stop_bss_failure_resp(mac, session); - } } void lim_process_channel_switch(struct mac_context *mac_ctx, uint8_t vdev_id) @@ -3804,10 +3801,6 @@ void lim_update_sta_run_time_ht_switch_chnl_params(struct mac_context *mac, lim_delete_tdls_peers(mac, pe_session); lim_ht_switch_chnl_req(pe_session); - - /* In case of IBSS, if STA should update HT Info IE in its beacons. */ - if (LIM_IS_IBSS_ROLE(pe_session)) - sch_set_fixed_beacon_fields(mac, pe_session); } } /* End limUpdateStaRunTimeHTParams. */ @@ -4437,10 +4430,7 @@ void lim_set_tspec_uapsd_mask_per_session(struct mac_context *mac, void lim_handle_heart_beat_timeout_for_session(struct mac_context *mac_ctx, struct pe_session *psession_entry) { - if (psession_entry->valid == true) { - if (psession_entry->bssType == eSIR_IBSS_MODE) - lim_ibss_heart_beat_handle(mac_ctx, psession_entry); - + if (psession_entry->valid) { if ((psession_entry->bssType == eSIR_INFRASTRUCTURE_MODE) && (LIM_IS_STA_ROLE(psession_entry))) lim_handle_heart_beat_failure(mac_ctx, psession_entry); @@ -4487,9 +4477,7 @@ void lim_process_add_sta_rsp(struct mac_context *mac_ctx, return; } session->csaOffloadEnable = add_sta_params->csaOffloadEnable; - if (LIM_IS_IBSS_ROLE(session)) - (void)lim_ibss_add_sta_rsp(mac_ctx, msg->bodyptr, session); - else if (LIM_IS_NDI_ROLE(session)) + if (LIM_IS_NDI_ROLE(session)) lim_ndp_add_sta_rsp(mac_ctx, session, msg->bodyptr); #ifdef FEATURE_WLAN_TDLS else if (add_sta_params->staType == STA_ENTRY_TDLS_PEER) @@ -4515,9 +4503,7 @@ void lim_update_beacon(struct mac_context *mac_ctx) for (i = 0; i < mac_ctx->lim.maxBssId; i++) { if (mac_ctx->lim.gpSession[i].valid != true) continue; - if (((mac_ctx->lim.gpSession[i].limSystemRole == eLIM_AP_ROLE) - || (mac_ctx->lim.gpSession[i].limSystemRole == - eLIM_STA_IN_IBSS_ROLE)) + if ((mac_ctx->lim.gpSession[i].limSystemRole == eLIM_AP_ROLE) && (eLIM_SME_NORMAL_STATE == mac_ctx->lim.gpSession[i].limSmeState)) { @@ -4608,25 +4594,6 @@ void lim_handle_heart_beat_failure_timeout(struct mac_context *mac_ctx) */ } -#ifdef QCA_IBSS_SUPPORT -/* - * This function assumes there will not be more than one IBSS session active at any time. - */ -struct pe_session *lim_is_ibss_session_active(struct mac_context *mac) -{ - uint8_t i; - - for (i = 0; i < mac->lim.maxBssId; i++) { - if ((mac->lim.gpSession[i].valid) && - (mac->lim.gpSession[i].limSystemRole == - eLIM_STA_IN_IBSS_ROLE)) - return &mac->lim.gpSession[i]; - } - - return NULL; -} -#endif - struct pe_session *lim_is_ap_session_active(struct mac_context *mac) { uint8_t i; @@ -6118,7 +6085,6 @@ const char *lim_bss_type_to_string(const uint16_t bss_type) switch (bss_type) { CASE_RETURN_STRING(eSIR_INFRASTRUCTURE_MODE); CASE_RETURN_STRING(eSIR_INFRA_AP_MODE); - CASE_RETURN_STRING(eSIR_IBSS_MODE); CASE_RETURN_STRING(eSIR_AUTO_MODE); CASE_RETURN_STRING(eSIR_NDI_MODE); default: @@ -7041,7 +7007,7 @@ void lim_update_sta_he_capable(struct mac_context *mac, tpAddStaParams add_sta_params, tpDphHashNode sta_ds, struct pe_session *session_entry) { - if (LIM_IS_AP_ROLE(session_entry) || LIM_IS_IBSS_ROLE(session_entry)) + if (LIM_IS_AP_ROLE(session_entry)) add_sta_params->he_capable = sta_ds->mlmStaContext.he_capable && session_entry->he_capable; #ifdef FEATURE_WLAN_TDLS @@ -8003,7 +7969,6 @@ QDF_STATUS lim_ap_mlme_vdev_start_send(struct vdev_mlme_obj *vdev_mlme, uint16_t data_len, void *data) { struct pe_session *session; - tSirResultCodes ret; tpLimMlmStartReq start_req = (tLimMlmStartReq *)data; struct mac_context *mac_ctx; @@ -8025,17 +7990,7 @@ QDF_STATUS lim_ap_mlme_vdev_start_send(struct vdev_mlme_obj *vdev_mlme, return QDF_STATUS_E_INVAL; } - if (LIM_IS_IBSS_ROLE(session) && - session->mac_ctx->lim.gLimIbssCoalescingHappened) { - ibss_bss_add(session->mac_ctx, session); - ret = lim_mlm_add_bss(session->mac_ctx, start_req, session); - if (ret != eSIR_SME_SUCCESS) { - pe_err("AddBss failure"); - return QDF_STATUS_E_INVAL; - } - } else { - lim_process_mlm_start_req(session->mac_ctx, start_req); - } + lim_process_mlm_start_req(session->mac_ctx, start_req); return QDF_STATUS_SUCCESS; } @@ -8114,10 +8069,7 @@ QDF_STATUS lim_ap_mlme_vdev_disconnect_peers(struct vdev_mlme_obj *vdev_mlme, return QDF_STATUS_E_INVAL; } - if (LIM_IS_IBSS_ROLE(session)) - lim_ibss_delete_all_peers(session->mac_ctx, session); - else - lim_delete_all_peers(session); + lim_delete_all_peers(session); return QDF_STATUS_SUCCESS; } @@ -8133,11 +8085,7 @@ QDF_STATUS lim_ap_mlme_vdev_stop_send(struct vdev_mlme_obj *vdev_mlme, return QDF_STATUS_E_INVAL; } - if (LIM_IS_IBSS_ROLE(session) && - session->mac_ctx->lim.gLimIbssCoalescingHappened) - ibss_bss_delete(session->mac_ctx, session); - else - status = lim_send_vdev_stop(session); + status = lim_send_vdev_stop(session); return status; } @@ -8232,9 +8180,7 @@ QDF_STATUS lim_get_capability_info(struct mac_context *mac, uint16_t *pcap, *pcap = 0; pcap_info = (tpSirMacCapabilityInfo)pcap; - if (LIM_IS_IBSS_ROLE(pe_session)) - pcap_info->ibss = 1; /* IBSS bit */ - else if (LIM_IS_AP_ROLE(pe_session) || + if (LIM_IS_AP_ROLE(pe_session) || LIM_IS_STA_ROLE(pe_session)) pcap_info->ess = 1; /* ESS bit */ else if (LIM_IS_P2P_DEVICE_ROLE(pe_session) || @@ -8292,7 +8238,7 @@ QDF_STATUS lim_get_capability_info(struct mac_context *mac, uint16_t *pcap, } /* Spectrum Management bit */ - if (!LIM_IS_IBSS_ROLE(pe_session) && pe_session->lim11hEnable) { + if (pe_session->lim11hEnable) { if (mac->mlme_cfg->gen.enabled_11h) pcap_info->spectrumMgt = 1; } diff --git a/core/mac/src/pe/lim/lim_utils.h b/core/mac/src/pe/lim/lim_utils.h index 2c2e3fd0c7c7..96401d1f1224 100644 --- a/core/mac/src/pe/lim/lim_utils.h +++ b/core/mac/src/pe/lim/lim_utils.h @@ -603,30 +603,6 @@ void lim_process_ap_mlm_del_sta_rsp(struct mac_context *mac, struct scheduler_msg *limMsgQ, struct pe_session *pe_session); -#ifdef QCA_IBSS_SUPPORT -/** - * lim_is_ibss_session_active() - API to check IBSS session active - * @mac: Pointer to Global MAC structure - * - * Return: Pointer to active IBSS pe_session else NULL - */ -struct pe_session *lim_is_ibss_session_active(struct mac_context *mac); -#else -/** - * lim_is_ibss_session_active() - API to check IBSS session active - * @mac: Pointer to Global MAC structure - * - * This function is dummy. - * - * Return: NULL - */ -static inline -struct pe_session *lim_is_ibss_session_active(struct mac_context *mac) -{ - return NULL; -} -#endif - /** * ch_width_in_mhz() - API to get channel space in MHz * diff --git a/core/mac/src/pe/sch/sch_api.c b/core/mac/src/pe/sch/sch_api.c index 10075c7deab0..ba59d9b08917 100644 --- a/core/mac/src/pe/sch/sch_api.c +++ b/core/mac/src/pe/sch/sch_api.c @@ -80,16 +80,11 @@ QDF_STATUS sch_send_beacon_req(struct mac_context *mac, uint8_t *beaconPayload, qdf_mem_copy(beaconParams->bssId, pe_session->bssId, sizeof(pe_session->bssId)); - if (LIM_IS_IBSS_ROLE(pe_session)) { - beaconParams->timIeOffset = 0; - } else { - beaconParams->timIeOffset = pe_session->schBeaconOffsetBegin; - if (pe_session->dfsIncludeChanSwIe) { - beaconParams->csa_count_offset = - mac->sch.csa_count_offset; - beaconParams->ecsa_count_offset = - mac->sch.ecsa_count_offset; - } + + beaconParams->timIeOffset = pe_session->schBeaconOffsetBegin; + if (pe_session->dfsIncludeChanSwIe) { + beaconParams->csa_count_offset = mac->sch.csa_count_offset; + beaconParams->ecsa_count_offset = mac->sch.ecsa_count_offset; } beaconParams->vdev_id = pe_session->smeSessionId; diff --git a/core/mac/src/pe/sch/sch_beacon_gen.c b/core/mac/src/pe/sch/sch_beacon_gen.c index 4806e948df37..7e30bf7b7f47 100644 --- a/core/mac/src/pe/sch/sch_beacon_gen.c +++ b/core/mac/src/pe/sch/sch_beacon_gen.c @@ -306,7 +306,6 @@ sch_set_fixed_beacon_fields(struct mac_context *mac_ctx, struct pe_session *sess populate_dot11f_ds_params(mac_ctx, &bcn_1->DSParams, wlan_reg_freq_to_chan( mac_ctx->pdev, session->curr_op_freq)); - populate_dot11f_ibss_params(mac_ctx, &bcn_1->IBSSParams, session); offset = sizeof(tAniBeaconStruct); ptr = session->pSchBeaconFrameBegin + offset; @@ -485,9 +484,9 @@ sch_set_fixed_beacon_fields(struct mac_context *mac_ctx, struct pe_session *sess &bcn_2->bss_color_change); } - if (session->limSystemRole != eLIM_STA_IN_IBSS_ROLE) - populate_dot11f_ext_cap(mac_ctx, is_vht_enabled, &bcn_2->ExtCap, - session); + + populate_dot11f_ext_cap(mac_ctx, is_vht_enabled, &bcn_2->ExtCap, + session); populate_dot11f_ext_supp_rates(mac_ctx, POPULATE_DOT11F_RATES_OPERATIONAL, @@ -590,8 +589,7 @@ sch_set_fixed_beacon_fields(struct mac_context *mac_ctx, struct pe_session *sess pe_debug("extcap not extracted"); } /* merge extcap IE */ - if (extcap_present && - session->limSystemRole != eLIM_STA_IN_IBSS_ROLE) + if (extcap_present) lim_merge_extcap_struct(&bcn_2->ExtCap, &extracted_extcap, true); @@ -727,7 +725,6 @@ lim_update_probe_rsp_template_ie_bitmap_beacon1(struct mac_context *mac, } - /* IBSS params will not be present in the Beacons transmitted by AP */ return QDF_STATUS_SUCCESS; } @@ -736,8 +733,7 @@ void lim_update_probe_rsp_template_ie_bitmap_beacon2(struct mac_context *mac, uint32_t *DefProbeRspIeBitmap, tDot11fProbeResponse *prb_rsp) { - /* IBSS parameter set - will not be present in probe response tx by AP */ - /* country */ + if (beacon2->Country.present) { set_probe_rsp_ie_bitmap(DefProbeRspIeBitmap, WLAN_ELEMID_COUNTRY); qdf_mem_copy((void *)&prb_rsp->Country, @@ -1074,18 +1070,6 @@ QDF_STATUS sch_process_pre_beacon_ind(struct mac_context *mac, } switch (GET_LIM_SYSTEM_ROLE(pe_session)) { - - case eLIM_STA_IN_IBSS_ROLE: - /* generate IBSS parameter set */ - if (pe_session->statypeForBss == STA_ENTRY_SELF) - status = - write_beacon_to_memory(mac, (uint16_t) beaconSize, - (uint16_t) beaconSize, - pe_session, reason); - else - pe_err("can not send beacon for PEER session entry"); - break; - case eLIM_AP_ROLE: { uint8_t *ptr = &pe_session->pSchBeaconFrameBegin[pe_session-> diff --git a/core/mac/src/pe/sch/sch_beacon_process.c b/core/mac/src/pe/sch/sch_beacon_process.c index 2568ddd702fb..caed6f9a6524 100644 --- a/core/mac/src/pe/sch/sch_beacon_process.c +++ b/core/mac/src/pe/sch/sch_beacon_process.c @@ -237,52 +237,6 @@ ap_beacon_process(struct mac_context *mac_ctx, uint8_t *rx_pkt_info, /* -------------------------------------------------------------------- */ -/** - * __sch_beacon_process_no_session - * - * FUNCTION: - * Process the received beacon frame when - * -- Station is not scanning - * -- No corresponding session is found - * - * LOGIC: - * Following scenarios exist when Session Does not exist: - * * IBSS Beacons, when IBSS session already exists with same SSID, - * but from STA which has not yet joined and has a different BSSID. - * - invoke lim_handle_ibs_scoalescing with the session context of existing IBSS session. - * - * * IBSS Beacons when IBSS session does not exist, only Infra or BT-AMP session exists, - * then save the beacon in the scan results and throw it away. - * - * * Infra Beacons - * - beacons received when no session active - * should not come here, it should be handled as part of scanning, - * else they should not be getting received, should update scan results and drop it if that happens. - * - beacons received when IBSS session active: - * update scan results and drop it. - * - beacons received when Infra session(STA) is active: - * update scan results and drop it - * - beacons received when BT-STA session is active: - * update scan results and drop it. - * - beacons received when Infra/BT-STA or Infra/IBSS is active. - * update scan results and drop it. - * - - */ -static void __sch_beacon_process_no_session(struct mac_context *mac, - tpSchBeaconStruct pBeacon, - uint8_t *pRxPacketInfo) -{ - struct pe_session *pe_session = NULL; - - pe_session = lim_is_ibss_session_active(mac); - if (pe_session) { - lim_handle_ibss_coalescing(mac, pBeacon, pRxPacketInfo, - pe_session); - } - return; -} - /** * get_operating_channel_width() - Get operating channel width * @stads - station entry. @@ -684,28 +638,13 @@ sch_bcn_update_opmode_change(struct mac_context *mac_ctx, tpDphHashNode sta_ds, } } -/* - * sch_bcn_process_sta_ibss() - Process the received beacon frame - * for sta and ibss - * @mac_ctx: mac_ctx - * @bcn: beacon struct - * @rx_pkt_info: received packet info - * @session: pe session pointer - * @beaconParams: update beacon params - * @sendProbeReq: out flag to indicate if probe rsp is to be sent - * @pMh: mac header - * - * Process the received beacon frame for sta and ibss - * - * Return: void - */ static void -sch_bcn_process_sta_ibss(struct mac_context *mac_ctx, - tpSchBeaconStruct bcn, - uint8_t *rx_pkt_info, - struct pe_session *session, - tUpdateBeaconParams *beaconParams, - uint8_t *sendProbeReq, tpSirMacMgmtHdr pMh) +sch_bcn_process_sta_opmode(struct mac_context *mac_ctx, + tpSchBeaconStruct bcn, + uint8_t *rx_pkt_info, + struct pe_session *session, + tUpdateBeaconParams *beaconParams, + uint8_t *sendProbeReq, tpSirMacMgmtHdr pMh) { tpDphHashNode sta = NULL; uint16_t aid; @@ -755,45 +694,6 @@ static void get_local_power_constraint_beacon( } #endif -/* - * __sch_beacon_process_for_session() - Process the received beacon frame when - * station is not scanning and corresponding session is found - * - * - * @mac_ctx: mac_ctx - * @bcn: beacon struct - * @rx_pkt_info: received packet info - * @session: pe session pointer - * - * Following scenarios exist when Session exists - * IBSS STA receiving beacons from IBSS Peers, who are part of IBSS. - * - call lim_handle_ibs_scoalescing with that session context. - * Infra STA receiving beacons from AP to which it is connected - * - call sch_beacon_processFromAP with that session's context. - * - call sch_beacon_processFromAP with that session's context. - * (here need to make sure BTAP creates session entry for BT STA) - * - just update the beacon count for heart beat purposes for now, - * for now, don't process the beacon. - * Infra/IBSS both active and receives IBSS beacon: - * - call lim_handle_ibs_scoalescing with that session context. - * Infra/IBSS both active and receives Infra beacon: - * - call sch_beacon_processFromAP with that session's context. - * any updates to EDCA parameters will be effective for IBSS as well, - * even though no WMM for IBSS ?? Need to figure out how to handle - * this scenario. - * Infra/BTSTA both active and receive Infra beacon. - * - change in EDCA parameters on Infra affect the BTSTA link. - * Update the same parameters on BT link - * Infra/BTSTA both active and receive BT-AP beacon. - * - update beacon cnt for heartbeat - * Infra/BTAP both active and receive Infra beacon. - * - BT-AP starts advertising BE parameters from Infra AP, if they get - * changed. - * Infra/BTAP both active and receive BTSTA beacon. - * - update beacon cnt for heartbeat - * - * Return: void - */ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, tpSchBeaconStruct bcn, uint8_t *rx_pkt_info, @@ -809,9 +709,7 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, qdf_mem_zero(&beaconParams, sizeof(tUpdateBeaconParams)); beaconParams.paramChangeBitmap = 0; - if (LIM_IS_IBSS_ROLE(session)) { - lim_handle_ibss_coalescing(mac_ctx, bcn, rx_pkt_info, session); - } else if (LIM_IS_STA_ROLE(session)) { + if (LIM_IS_STA_ROLE(session)) { if (false == sch_bcn_process_sta(mac_ctx, bcn, rx_pkt_info, session, &beaconParams, &sendProbeReq, pMh)) @@ -824,15 +722,13 @@ static void __sch_beacon_process_for_session(struct mac_context *mac_ctx, */ if (!(session->vhtCapability && (bcn->OperatingMode.present || bcn->VHTOperation.present)) && session->htCapability && - bcn->HTInfo.present && !LIM_IS_IBSS_ROLE(session)) + bcn->HTInfo.present) lim_update_sta_run_time_ht_switch_chnl_params(mac_ctx, &bcn->HTInfo, session); - if (LIM_IS_STA_ROLE(session) - || LIM_IS_IBSS_ROLE(session)) - sch_bcn_process_sta_ibss(mac_ctx, bcn, - rx_pkt_info, session, - &beaconParams, &sendProbeReq, pMh); + if (LIM_IS_STA_ROLE(session)) + sch_bcn_process_sta_opmode(mac_ctx, bcn, rx_pkt_info, session, + &beaconParams, &sendProbeReq, pMh); /* Obtain the Max Tx power for the current regulatory */ regMax = wlan_reg_get_channel_reg_power_for_freq( mac_ctx->pdev, session->curr_op_freq); @@ -1113,6 +1009,8 @@ sch_beacon_process(struct mac_context *mac_ctx, uint8_t *rx_pkt_info, { static tSchBeaconStruct bcn; + if (!session) + return; /* Convert the beacon frame into a structure */ if (sir_convert_beacon_frame2_struct(mac_ctx, (uint8_t *) rx_pkt_info, &bcn) != QDF_STATUS_SUCCESS) { @@ -1120,17 +1018,8 @@ sch_beacon_process(struct mac_context *mac_ctx, uint8_t *rx_pkt_info, return; } - /* - * Now process the beacon in the context of the BSS which is - * transmitting the beacons, if one is found - */ - if (!session) { - __sch_beacon_process_no_session(mac_ctx, &bcn, rx_pkt_info); - } else { - sch_send_beacon_report(mac_ctx, &bcn, session); - __sch_beacon_process_for_session(mac_ctx, &bcn, rx_pkt_info, - session); - } + sch_send_beacon_report(mac_ctx, &bcn, session); + __sch_beacon_process_for_session(mac_ctx, &bcn, rx_pkt_info, session); } /** diff --git a/core/mac/src/pe/sch/sch_message.c b/core/mac/src/pe/sch/sch_message.c index 98f8428dca69..be4d107d5d0e 100644 --- a/core/mac/src/pe/sch/sch_message.c +++ b/core/mac/src/pe/sch/sch_message.c @@ -495,8 +495,7 @@ get_wmm_local_params(struct mac_context *mac_ctx, */ void sch_edca_profile_update(struct mac_context *mac, struct pe_session *pe_session) { - if (LIM_IS_AP_ROLE(pe_session) || - LIM_IS_IBSS_ROLE(pe_session)) { + if (LIM_IS_AP_ROLE(pe_session)) { sch_qos_update_local(mac, pe_session); sch_qos_update_broadcast(mac, pe_session); } diff --git a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c index 56cfd83e87ee..506f9b1a21cb 100644 --- a/core/mac/src/sys/legacy/src/utils/src/mac_trace.c +++ b/core/mac/src/sys/legacy/src/utils/src/mac_trace.c @@ -228,8 +228,6 @@ uint8_t *mac_trace_get_sme_msg_string(uint16_t sme_msg) CASE_RETURN_STRING(eWNI_SME_DEAUTH_IND); CASE_RETURN_STRING(eWNI_SME_DISCONNECT_DONE_IND); CASE_RETURN_STRING(eWNI_SME_WM_STATUS_CHANGE_NTF); - CASE_RETURN_STRING(eWNI_SME_IBSS_NEW_PEER_IND); - CASE_RETURN_STRING(eWNI_SME_IBSS_PEER_DEPARTED_IND); CASE_RETURN_STRING(eWNI_SME_START_BSS_REQ); CASE_RETURN_STRING(eWNI_SME_START_BSS_RSP); CASE_RETURN_STRING(eWNI_SME_ASSOC_IND); @@ -559,7 +557,6 @@ uint8_t *mac_trace_get_wma_msg_string(uint16_t wma_msg) #endif CASE_RETURN_STRING(WMA_RX_SCAN_EVENT); CASE_RETURN_STRING(WMA_RX_CHN_STATUS_EVENT); - CASE_RETURN_STRING(WMA_IBSS_PEER_INACTIVITY_IND); CASE_RETURN_STRING(WMA_DEL_PERIODIC_TX_PTRN_IND); #ifdef FEATURE_WLAN_TDLS CASE_RETURN_STRING(WMA_TDLS_SHOULD_DISCOVER_CMD); diff --git a/core/mac/src/sys/legacy/src/utils/src/parser_api.c b/core/mac/src/sys/legacy/src/utils/src/parser_api.c index fe802ac7a14a..61832441a3ed 100644 --- a/core/mac/src/sys/legacy/src/utils/src/parser_api.c +++ b/core/mac/src/sys/legacy/src/utils/src/parser_api.c @@ -1340,17 +1340,6 @@ populate_dot11f_ht_info(struct mac_context *mac, } /* End populate_dot11f_ht_info. */ -void -populate_dot11f_ibss_params(struct mac_context *mac, - tDot11fIEIBSSParams *pDot11f, - struct pe_session *pe_session) -{ - if (LIM_IS_IBSS_ROLE(pe_session)) { - pDot11f->atim = mac->mlme_cfg->ibss.atim_win_size; - pDot11f->present = 1; - } -} /* End populate_dot11f_ibss_params. */ - #ifdef ANI_SUPPORT_11H QDF_STATUS populate_dot11f_measurement_report0(struct mac_context *mac, @@ -1833,22 +1822,10 @@ void populate_dot11f_wmm(struct mac_context *mac, tDot11fIEWMMCaps *pCaps, struct pe_session *pe_session) { if (pe_session->limWmeEnabled) { - if (LIM_IS_IBSS_ROLE(pe_session)) { - /* if ( ! sirIsPropCapabilityEnabled( mac, SIR_MAC_PROP_CAPABILITY_WME ) ) */ - { - populate_dot11f_wmm_info_ap(mac, pInfo, - pe_session); - } - } else { - { - populate_dot11f_wmm_params(mac, pParams, - pe_session); - } - - if (pe_session->limWsmEnabled) { - populate_dot11f_wmm_caps(pCaps); - } - } + populate_dot11f_wmm_params(mac, pParams, + pe_session); + if (pe_session->limWsmEnabled) + populate_dot11f_wmm_caps(pCaps); } } /* End populate_dot11f_wmm. */ @@ -1923,20 +1900,13 @@ void populate_dot11f_wmm_info_ap(struct mac_context *mac, tDot11fIEWMMInfoAp *pI { pInfo->version = SIR_MAC_OUI_VERSION_1; - /* WMM Specification 3.1.3, 3.2.3 - * An IBSS station shall always use its default WMM parameters. - */ - if (LIM_IS_IBSS_ROLE(pe_session)) { - pInfo->param_set_count = 0; - pInfo->uapsd = 0; - } else { - pInfo->param_set_count = - (0xf & pe_session->gLimEdcaParamSetCount); - if (LIM_IS_AP_ROLE(pe_session)) { - pInfo->uapsd = (0x1 & pe_session->apUapsdEnable); - } else - pInfo->uapsd = (0x1 & mac->lim.gUapsdEnable); - } + /* WMM Specification 3.1.3, 3.2.3 */ + pInfo->param_set_count = (0xf & pe_session->gLimEdcaParamSetCount); + if (LIM_IS_AP_ROLE(pe_session)) + pInfo->uapsd = (0x1 & pe_session->apUapsdEnable); + else + pInfo->uapsd = (0x1 & mac->lim.gUapsdEnable); + pInfo->present = 1; } diff --git a/core/sme/inc/csr_api.h b/core/sme/inc/csr_api.h index 6aa55f983d30..a21280924b69 100644 --- a/core/sme/inc/csr_api.h +++ b/core/sme/inc/csr_api.h @@ -116,7 +116,6 @@ typedef enum { eCSR_DOT11_MODE_11ac_ONLY = 0x0200, /* * This is for WIFI test. It is same as eWNIAPI_MAC_PROTOCOL_ALL - * except when it starts IBSS in 11B of 2.4GHz * It is for CSR internal use */ eCSR_DOT11_MODE_AUTO = 0x0400, @@ -132,7 +131,7 @@ typedef enum { * @eCSR_BSS_TYPE_INFRASTRUCTURE: Infrastructure station * @eCSR_BSS_TYPE_INFRA_AP: SoftAP * @eCSR_BSS_TYPE_NDI: NAN datapath interface - * @eCSR_BSS_TYPE_ANY: any BSS type (IBSS or Infrastructure) + * @eCSR_BSS_TYPE_ANY: any BSS type */ typedef enum { eCSR_BSS_TYPE_INFRASTRUCTURE, @@ -474,7 +473,7 @@ typedef enum { } eCsrRoamDisconnectReason; typedef enum { - /* Not associated in Infra or participating in an IBSS/Ad-hoc */ + /* Not associated in Infra or participating in an Ad-hoc */ eCSR_ASSOC_STATE_TYPE_NOT_CONNECTED, /* Associated in an Infrastructure network. */ eCSR_ASSOC_STATE_TYPE_INFRA_ASSOCIATED, diff --git a/core/sme/src/csr/csr_api_roam.c b/core/sme/src/csr/csr_api_roam.c index 0203d1a08f54..0dbe7ff44eae 100644 --- a/core/sme/src/csr/csr_api_roam.c +++ b/core/sme/src/csr/csr_api_roam.c @@ -5039,7 +5039,7 @@ QDF_STATUS csr_roam_stop_network(struct mac_context *mac, uint32_t sessionId, pBssConfig, pIes); if (csr_is_conn_state_infra(mac, sessionId)) { /* - * the new Bss is an Ibss OR we are roaming from + * we are roaming from * Infra to Infra across SSIDs * (roaming to a new SSID)... * Not worry about WDS connection for now @@ -6854,15 +6854,6 @@ static void csr_roam_process_start_bss_success(struct mac_context *mac_ctx, } session = CSR_GET_SESSION(mac_ctx, session_id); - /* - * on the StartBss Response, LIM is returning the Bss Description that - * we are beaconing. Add this Bss Description to our scan results and - * chain the Profile to this Bss Description. On a Start BSS, there was - * no detected Bss description (no partner) so we issued the Start Bss - * to start the Ibss without any Bss description. Lim was kind enough - * to return the Bss Description that we start beaconing for the newly - * started Ibss. - */ sme_debug("receives start BSS ok indication"); status = QDF_STATUS_E_FAILURE; start_bss_rsp = (struct start_bss_rsp *) context; @@ -13045,23 +13036,6 @@ csr_compute_mode_and_band(struct mac_context *mac_ctx, *dot11_mode = eCSR_CFG_DOT11_MODE_11A; } } else if (WLAN_REG_IS_24GHZ_CH_FREQ(opr_ch_freq)) { - /* - * WiFi tests require IBSS networks to start in 11b mode - * without any change to the default parameter settings - * on the adapter. We use ACU to start an IBSS through - * creation of a startIBSS profile. This startIBSS - * profile has Auto MACProtocol and the adapter property - * setting for dot11Mode is also AUTO. So in this case, - * let's start the IBSS network in 11b mode instead of - * 11g mode. So this is for Auto=profile->MacProtocol && - * Auto=Global. dot11Mode && profile->channel is < 14, - * then start the IBSS in b mode. - * - * Note: we used to have this start as for - * best performance. now to specify that the user will - * have to set the do11Mode in the property page to 11g - * to force it. - */ *dot11_mode = eCSR_CFG_DOT11_MODE_11B; *band = REG_BAND_2G; } else { diff --git a/core/wma/inc/wma_types.h b/core/wma/inc/wma_types.h index 33ee3a8609a7..f11a7bc98b56 100644 --- a/core/wma/inc/wma_types.h +++ b/core/wma/inc/wma_types.h @@ -28,8 +28,6 @@ #define IS_FEATURE_SUPPORTED_BY_FW(feat_enum_value) \ wma_get_fw_wlan_feat_caps(feat_enum_value) -#define IS_IBSS_HEARTBEAT_OFFLOAD_FEATURE_ENABLE 1 - #define DPU_FEEDBACK_UNPROTECTED_ERROR 0x0F #define WMA_GET_RX_MAC_HEADER(pRxMeta) \ @@ -263,7 +261,6 @@ #define WMA_UPDATE_CHAN_LIST_REQ SIR_HAL_UPDATE_CHAN_LIST_REQ #define WMA_RX_SCAN_EVENT SIR_HAL_RX_SCAN_EVENT #define WMA_RX_CHN_STATUS_EVENT SIR_HAL_RX_CHN_STATUS_EVENT -#define WMA_IBSS_PEER_INACTIVITY_IND SIR_HAL_IBSS_PEER_INACTIVITY_IND #define WMA_CLI_SET_CMD SIR_HAL_CLI_SET_CMD diff --git a/core/wma/src/wma_mgmt.c b/core/wma/src/wma_mgmt.c index 4ca34239e320..c1daafb10ee6 100644 --- a/core/wma/src/wma_mgmt.c +++ b/core/wma/src/wma_mgmt.c @@ -328,7 +328,6 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event, wmi_peer_sta_kickout_event_fixed_param *kickout_event = NULL; uint8_t vdev_id, macaddr[QDF_MAC_ADDR_SIZE]; tpDeleteStaContext del_sta_ctx; - struct ibss_peer_inactivity_ind *inactivity; uint8_t *addr, *bssid; struct wlan_objmgr_vdev *vdev; void *soc = cds_get_context(QDF_MODULE_ID_SOC); @@ -364,15 +363,6 @@ int wma_peer_sta_kickout_event_handler(void *handle, uint8_t *event, switch (kickout_event->reason) { case WMI_PEER_STA_KICKOUT_REASON_IBSS_DISCONNECT: - inactivity = qdf_mem_malloc(sizeof(*inactivity)); - if (!inactivity) { - WMA_LOGE("QDF MEM Alloc Failed for tSirIbssPeerInactivity"); - return -ENOMEM; - } - qdf_mem_copy(inactivity->peer_addr.bytes, macaddr, - QDF_MAC_ADDR_SIZE); - wma_send_msg(wma, WMA_IBSS_PEER_INACTIVITY_IND, - inactivity, 0); goto exit_handler; #ifdef FEATURE_WLAN_TDLS case WMI_PEER_STA_KICKOUT_REASON_TDLS_DISCONNECT: