Parcourir la source

qcacld-3.0: Remove IBSS specific code from WMA

Remove IBSS specific code from WMA.

Change-Id: Iacdace8435fd8e6c167df24167db23a14efe4f15
CRs-Fixed: 2687016
gaurank kathpalia il y a 4 ans
Parent
commit
86a93dbbde

+ 0 - 10
components/mlme/dispatcher/inc/wlan_mlme_api.h

@@ -2060,16 +2060,6 @@ wlan_mlme_set_11h_enabled(struct wlan_objmgr_psoc *psoc, bool value);
 QDF_STATUS
 wlan_mlme_is_11d_enabled(struct wlan_objmgr_psoc *psoc, bool *value);
 
-/**
- * wlan_mlme_ibss_power_save_setup() - Set IBSS power save params
- * @psoc: pointer to psoc object
- * @vdev_id: IBSS Vdev ID
- *
- * Return: QDF Status
- */
-QDF_STATUS wlan_mlme_ibss_power_save_setup(struct wlan_objmgr_psoc *psoc,
-					   uint32_t vdev_id);
-
 /**
  * wlan_mlme_set_11d_enabled() - Set the 11h flag
  * @psoc: psoc context

+ 0 - 14
components/mlme/dispatcher/inc/wlan_mlme_ucfg_api.h

@@ -2840,20 +2840,6 @@ QDF_STATUS ucfg_mlme_get_ibss_cfg(struct wlan_objmgr_psoc *psoc,
 QDF_STATUS ucfg_mlme_set_ibss_auto_bssid(struct wlan_objmgr_psoc *psoc,
 					 uint32_t auto_bssid);
 
-/**
- * ucfg_mlme_ibss_power_save_setup() - Set IBSS power save params
- * @psoc: pointer to psoc object
- * @vdev_id: IBSS Vdev ID
- *
- * Return: QDF Status
- */
-static inline
-QDF_STATUS ucfg_mlme_ibss_power_save_setup(struct wlan_objmgr_psoc *psoc,
-					   uint32_t vdev_id)
-{
-	return wlan_mlme_ibss_power_save_setup(psoc, vdev_id);
-}
-
 /**
  * ucfg_mlme_get_tl_delayed_trgr_frm_int() - Get delay interval(in ms)
  * of UAPSD auto trigger.

+ 0 - 87
components/mlme/dispatcher/src/wlan_mlme_api.c

@@ -3421,93 +3421,6 @@ wlan_mlme_get_self_gen_frm_pwr(struct wlan_objmgr_psoc *psoc,
 	return QDF_STATUS_SUCCESS;
 }
 
-QDF_STATUS wlan_mlme_ibss_power_save_setup(struct wlan_objmgr_psoc *psoc,
-					   uint32_t vdev_id)
-{
-	struct wlan_mlme_ibss_cfg *ibss_cfg;
-	int ret;
-	struct wlan_mlme_psoc_ext_obj *mlme_obj = mlme_get_psoc_ext_obj(psoc);
-
-	if (!mlme_obj)
-		return QDF_STATUS_E_FAILURE;
-
-	ibss_cfg = &mlme_obj->cfg.ibss;
-
-	ret = wma_cli_set_command(vdev_id,
-				  WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE,
-				  ibss_cfg->atim_win_size,
-				  VDEV_CMD);
-	if (ret) {
-		mlme_legacy_err("atim window set failed: %d", ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_cli_set_command(vdev_id,
-				  WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED,
-				  ibss_cfg->power_save_allow,
-				  VDEV_CMD);
-	if (ret) {
-		mlme_legacy_err("power save allow failed %d", ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_cli_set_command(vdev_id,
-				  WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED,
-				  ibss_cfg->power_collapse_allow,
-				  VDEV_CMD);
-	if (ret) {
-		mlme_legacy_err("power collapse allow failed %d", ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_cli_set_command(vdev_id,
-				  WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX,
-				  ibss_cfg->awake_on_tx_rx,
-				  VDEV_CMD);
-	if (ret) {
-		mlme_legacy_err("set awake on tx/rx failed %d", ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_cli_set_command(vdev_id,
-				  WMA_VDEV_IBSS_SET_INACTIVITY_TIME,
-				  ibss_cfg->inactivity_bcon_count,
-				  VDEV_CMD);
-	if (ret) {
-		mlme_legacy_err("set inactivity time failed %d", ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_cli_set_command(vdev_id,
-				  WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME,
-				  ibss_cfg->txsp_end_timeout,
-				  VDEV_CMD);
-	if (ret) {
-		mlme_legacy_err("set txsp end failed %d", ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_cli_set_command(vdev_id,
-				  WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS,
-				  ibss_cfg->ps_warm_up_time,
-				  VDEV_CMD);
-	if (ret) {
-		mlme_legacy_err("set ps warmup failed %d", ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_cli_set_command(vdev_id,
-				  WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW,
-				  ibss_cfg->ps_1rx_chain_atim_win,
-				  VDEV_CMD);
-	if (ret) {
-		mlme_legacy_err("set 1rx chain atim failed %d", ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	return QDF_STATUS_SUCCESS;
-}
-
 QDF_STATUS
 wlan_mlme_get_4way_hs_offload(struct wlan_objmgr_psoc *psoc, bool *value)
 {

+ 0 - 5
core/mac/src/pe/include/lim_global.h

@@ -398,11 +398,6 @@ struct tLimIbssPeerNode {
 	tDot11fIEVHTCaps VHTCaps;
 	uint8_t vhtSupportedChannelWidthSet;
 	uint8_t vhtBeamFormerCapable;
-	/*
-	 * Peer Atim Info
-	 */
-	uint8_t atimIePresent;
-	uint32_t peerAtimWindowLength;
 };
 
 /* Enums used for channel switching. */

+ 1 - 40
core/mac/src/pe/lim/lim_assoc_utils.c

@@ -2133,7 +2133,6 @@ lim_add_sta(struct mac_context *mac_ctx,
 	tSirMacAddr sta_mac, *sta_Addr;
 	tpSirAssocReq assoc_req;
 	uint8_t i, nw_type_11b = 0;
-	tLimIbssPeerNode *peer_node; /* for IBSS mode */
 	const uint8_t *p2p_ie = NULL;
 	tDot11fIEVHTCaps vht_caps;
 	struct mlme_vht_capabilities_info *vht_cap_info;
@@ -2372,46 +2371,8 @@ lim_add_sta(struct mac_context *mac_ctx,
 		lim_add_he_cap(mac_ctx, session_entry,
 			       add_sta_params, assoc_req);
 
-	} else if (LIM_IS_IBSS_ROLE(session_entry)) {
-
-		/*
-		 * in IBSS mode, use peer node as the source of ht_caps
-		 * and vht_caps
-		 */
-		peer_node = lim_ibss_peer_find(mac_ctx, *sta_Addr);
-		if (!peer_node) {
-			pe_err("Can't find IBSS peer node for ADD_STA");
-			return QDF_STATUS_E_NOENT;
-		}
-
-		if (peer_node->atimIePresent) {
-			add_sta_params->atimIePresent =
-				 peer_node->atimIePresent;
-			add_sta_params->peerAtimWindowLength =
-				peer_node->peerAtimWindowLength;
-		}
-
-		add_sta_params->ht_caps =
-			(peer_node->htSupportedChannelWidthSet <<
-			 SIR_MAC_HT_CAP_CHWIDTH40_S) |
-			(peer_node->htGreenfield <<
-			 SIR_MAC_HT_CAP_GREENFIELD_S) |
-			(peer_node->htShortGI20Mhz <<
-			 SIR_MAC_HT_CAP_SHORTGI20MHZ_S) |
-			(peer_node->htShortGI40Mhz <<
-			 SIR_MAC_HT_CAP_SHORTGI40MHZ_S) |
-			(SIR_MAC_TXSTBC <<
-			 SIR_MAC_HT_CAP_TXSTBC_S) |
-			(SIR_MAC_RXSTBC <<
-			 SIR_MAC_HT_CAP_RXSTBC_S) |
-			(peer_node->htMaxAmsduLength <<
-			 SIR_MAC_HT_CAP_MAXAMSDUSIZE_S) |
-			(peer_node->htDsssCckRate40MHzSupport <<
-			 SIR_MAC_HT_CAP_DSSSCCK40_S);
-
-		add_sta_params->vht_caps =
-			 lim_populate_vht_caps(peer_node->VHTCaps);
 	}
+
 #ifdef FEATURE_WLAN_TDLS
 	if (STA_ENTRY_TDLS_PEER == sta_ds->staType) {
 		add_sta_params->ht_caps = sta_ds->ht_caps;

+ 0 - 5
core/mac/src/pe/lim/lim_ibss_peer_mgmt.c

@@ -157,11 +157,6 @@ ibss_peer_collect(struct mac_context *mac,
 	peer->wmeEdcaPresent = pBeacon->wmeEdcaPresent;
 	peer->wmeInfoPresent = pBeacon->wmeInfoPresent;
 
-	if (pBeacon->IBSSParams.present) {
-		peer->atimIePresent = pBeacon->IBSSParams.present;
-		peer->peerAtimWindowLength = pBeacon->IBSSParams.atim;
-	}
-
 	if (IS_DOT11_MODE_HT(pe_session->dot11mode) &&
 	    (pBeacon->HTCaps.present)) {
 		peer->htCapable = pBeacon->HTCaps.present;

+ 0 - 44
core/wma/inc/wma.h

@@ -759,28 +759,6 @@ struct wma_txrx_node {
 	uint8_t invalid_peer_idx;
 };
 
-/**
- * struct ibss_power_save_params - IBSS power save parameters
- * @atimWindowLength: ATIM window length
- * @isPowerSaveAllowed: is power save allowed
- * @isPowerCollapseAllowed: is power collapsed allowed
- * @isAwakeonTxRxEnabled: is awake on tx/rx enabled
- * @inactivityCount: inactivity count
- * @txSPEndInactivityTime: tx SP end inactivity time
- * @ibssPsWarmupTime: IBSS power save warm up time
- * @ibssPs1RxChainInAtimEnable: IBSS power save rx chain in ATIM enable
- */
-typedef struct {
-	uint32_t atimWindowLength;
-	uint32_t isPowerSaveAllowed;
-	uint32_t isPowerCollapseAllowed;
-	uint32_t isAwakeonTxRxEnabled;
-	uint32_t inactivityCount;
-	uint32_t txSPEndInactivityTime;
-	uint32_t ibssPsWarmupTime;
-	uint32_t ibssPs1RxChainInAtimEnable;
-} ibss_power_save_params;
-
 /**
  * struct mac_ss_bw_info - hw_mode_list PHY/MAC params for each MAC
  * @mac_tx_stream: Max TX stream
@@ -875,8 +853,6 @@ struct wma_wlm_stats_data {
  * @peer_macaddr: When @get_one_peer_info is true, the peer's mac address
  * @thermal_mgmt_info: Thermal mitigation related info
  * @enable_mc_list: To Check if Multicast list filtering is enabled in FW
- * @ibss_started: is IBSS started or not
- * @ibsskey_info: IBSS key info
  * @hddTxFailCb: tx fail indication callback
  * @extscan_wake_lock: extscan wake lock
  * @wow_wake_lock: wow wake lock
@@ -892,7 +868,6 @@ struct wma_wlm_stats_data {
  * @suitable_ap_hb_failure: better ap found
  * @suitable_ap_hb_failure_rssi: RSSI when suitable_ap_hb_failure
  *   triggered for later usage to report RSSI at beacon miss scenario
- * @wma_ibss_power_save_params: IBSS Power Save config Parameters
  * @IsRArateLimitEnabled: RA rate limiti s enabled or not
  * @RArateLimitInterval: RA rate limit interval
  * @is_lpass_enabled: Flag to indicate if LPASS feature is enabled or not
@@ -1002,8 +977,6 @@ typedef struct {
 	struct qdf_mac_addr peer_macaddr;
 	t_thermal_mgmt thermal_mgmt_info;
 	bool enable_mc_list;
-	uint8_t ibss_started;
-	tSetBssKeyParams ibsskey_info;
 #ifdef FEATURE_WLAN_EXTSCAN
 	qdf_wake_lock_t extscan_wake_lock;
 #endif
@@ -1020,7 +993,6 @@ typedef struct {
 	qdf_atomic_t is_wow_bus_suspended;
 	bool suitable_ap_hb_failure;
 	uint32_t suitable_ap_hb_failure_rssi;
-	ibss_power_save_params wma_ibss_power_save_params;
 #ifdef WLAN_FEATURE_LPSS
 	bool is_lpass_enabled;
 #endif
@@ -1209,14 +1181,6 @@ typedef struct {
  * @WMA_VDEV_TXRX_FWSTATS_RESET_CMDID: txrx firmware stats reset command
  * @WMA_VDEV_MCC_SET_TIME_LATENCY: set MCC latency time
  * @WMA_VDEV_MCC_SET_TIME_QUOTA: set MCC time quota
- * @WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE: set IBSS ATIM window size
- * @WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED: set IBSS enable power save
- * @WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED: set IBSS power collapse enable
- * @WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX: awake IBSS on TX/RX
- * @WMA_VDEV_IBSS_SET_INACTIVITY_TIME: set IBSS inactivity time
- * @WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME: set IBSS TXSP
- * @WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS: set IBSS power save warmup time
- * @WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW: set IBSS power save ATIM
  * @WMA_VDEV_TXRX_GET_IPA_UC_FW_STATS_CMDID: get IPA microcontroller fw stats
  * @WMA_VDEV_TXRX_GET_IPA_UC_SHARING_STATS_CMDID: get IPA uC wifi-sharing stats
  * @WMA_VDEV_TXRX_SET_IPA_UC_QUOTA_CMDID: set IPA uC quota limit
@@ -1229,14 +1193,6 @@ enum wma_cfg_cmd_id {
 	WMA_VDEV_TXRX_FWSTATS_RESET_CMDID,
 	WMA_VDEV_MCC_SET_TIME_LATENCY,
 	WMA_VDEV_MCC_SET_TIME_QUOTA,
-	WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE,
-	WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED,
-	WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED,
-	WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX,
-	WMA_VDEV_IBSS_SET_INACTIVITY_TIME,
-	WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME,
-	WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS,
-	WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW,
 	WMA_VDEV_TXRX_GET_IPA_UC_FW_STATS_CMDID,
 	WMA_VDEV_TXRX_GET_IPA_UC_SHARING_STATS_CMDID,
 	WMA_VDEV_TXRX_SET_IPA_UC_QUOTA_CMDID,

+ 0 - 4
core/wma/inc/wma_if.h

@@ -164,8 +164,6 @@ struct sAniProbeRspStruct {
  * @vht_caps: VHT vapabalities
  * @nwType: NW Type
  * @maxTxPower: max tx power
- * @atimIePresent: Peer Atim Info
- * @peerAtimWindowLength: peer ATIM Window length
  * @nss: Return the number of spatial streams supported
  * @stbc_capable: stbc capable
  * @no_ptk_4_way: Do not need 4-way handshake
@@ -235,8 +233,6 @@ typedef struct {
 	uint32_t vht_caps;
 	tSirNwType nwType;
 	int8_t maxTxPower;
-	uint8_t atimIePresent;
-	uint32_t peerAtimWindowLength;
 	uint8_t nonRoamReassoc;
 	uint32_t nss;
 #ifdef WLAN_FEATURE_11AX

+ 0 - 83
core/wma/inc/wma_internal.h

@@ -645,89 +645,6 @@ QDF_STATUS wma_find_vdev_id_by_addr(tp_wma_handle wma, uint8_t *addr,
 
 bool wma_is_vdev_in_ap_mode(tp_wma_handle wma, uint8_t vdev_id);
 
-#ifdef QCA_IBSS_SUPPORT
-/**
- * wma_is_vdev_in_ibss_mode() - check that vdev is in ibss mode or not
- * @wma: wma handle
- * @vdev_id: vdev id
- *
- * Helper function to know whether given vdev id
- * is in IBSS mode or not.
- *
- * Return: True/False
- */
-bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id);
-
-/**
- * wma_adjust_ibss_heart_beat_timer() - set ibss heart beat timer in fw.
- * @wma: wma handle
- * @vdev_id: vdev id
- * @peer_num_delta: peer number delta value
- *
- * Return: none
- */
-void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma,
-				      uint8_t vdev_id,
-				      int8_t peer_num_delta);
-
-/**
- * wma_set_ibss_pwrsave_params() - set ibss power save parameter to fw
- * @wma: wma handle
- * @vdev_id: vdev id
- *
- * Return: 0 for success or error code.
- */
-QDF_STATUS
-wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id);
-
-#else
-/**
- * wma_is_vdev_in_ibss_mode(): dummy function
- * @wma: wma handle
- * @vdev_id: vdev id
- *
- * Return false since no vdev can be in ibss mode without ibss support
- */
-static inline
-bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id)
-{
-	return false;
-}
-
-/**
- * wma_adjust_ibss_heart_beat_timer() - set ibss heart beat timer in fw.
- * @wma: wma handle
- * @vdev_id: vdev id
- * @peer_num_delta: peer number delta value
- *
- * This function is dummy
- *
- * Return: none
- */
-static inline void
-wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma,
-				 uint8_t vdev_id,
-				 int8_t peer_num_delta)
-{
-}
-
-
-/**
- * wma_set_ibss_pwrsave_params() - set ibss power save parameter to fw
- * @wma: wma handle
- * @vdev_id: vdev id
- *
- * This function is dummy
- *
- * Return: 0 for success or error code.
- */
-static inline QDF_STATUS
-wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id)
-{
-	return QDF_STATUS_SUCCESS;
-}
-#endif /* QCA_IBSS_SUPPORT */
-
 /**
  * wma_get_vdev_bssid() - Get BSSID from mlme_obj
  * @vdev - pointer to vdev

+ 9 - 144
core/wma/src/wma_dev_if.c

@@ -142,64 +142,6 @@ bool wma_is_vdev_in_ap_mode(tp_wma_handle wma, uint8_t vdev_id)
 	return false;
 }
 
-#ifdef QCA_IBSS_SUPPORT
-bool wma_is_vdev_in_ibss_mode(tp_wma_handle wma, uint8_t vdev_id)
-{
-	struct wma_txrx_node *intf = wma->interfaces;
-
-	if (vdev_id >= wma->max_bssid) {
-		WMA_LOGE("%s: Invalid vdev_id %hu", __func__, vdev_id);
-		QDF_ASSERT(0);
-		return false;
-	}
-
-	if (intf[vdev_id].type == WMI_VDEV_TYPE_IBSS)
-		return true;
-
-	return false;
-}
-
-/**
- * wma_send_peer_atim_window_len() - send peer atim window length
- * @wma: wma handle
- * @add_sta: add sta  parameters
- *
- * This API sends the peer Atim Window length if IBSS
- * power save is enabled by the firmware.
- *
- * Return: none
- */
-static void
-wma_send_peer_atim_window_len(tp_wma_handle wma, tpAddStaParams add_sta)
-{
-	if (wma_is_vdev_in_ibss_mode(wma, add_sta->smesessionId) &&
-	    wmi_service_enabled(wma->wmi_handle,
-				wmi_service_ibss_pwrsave)) {
-		/*
-		 * If ATIM Window is present in the peer
-		 * beacon then send it to firmware else
-		 * configure Zero ATIM Window length to
-		 * firmware.
-		 */
-		if (add_sta->atimIePresent) {
-			wma_set_peer_param(wma, add_sta->staMac,
-					   WMI_PEER_IBSS_ATIM_WINDOW_LENGTH,
-					   add_sta->peerAtimWindowLength,
-					   add_sta->smesessionId);
-		} else {
-			wma_set_peer_param(wma, add_sta->staMac,
-					   WMI_PEER_IBSS_ATIM_WINDOW_LENGTH,
-					   0, add_sta->smesessionId);
-		}
-	}
-}
-#else
-static inline void
-wma_send_peer_atim_window_len(tp_wma_handle wma, tpAddStaParams add_sta)
-{
-}
-#endif /* QCA_IBSS_SUPPORT */
-
 uint8_t *wma_get_vdev_bssid(struct wlan_objmgr_vdev *vdev)
 {
 	struct vdev_mlme_obj *mlme_obj;
@@ -838,20 +780,10 @@ static void wma_vdev_start_rsp(tp_wma_handle wma, struct wlan_objmgr_vdev *vdev,
 	add_bss_rsp->chain_mask = rsp->chain_mask;
 	add_bss_rsp->smps_mode  = host_map_smps_mode(rsp->smps_mode);
 
-#ifdef QCA_IBSS_SUPPORT
-	WMA_LOGD("%s: vdev start response received for %s mode", __func__,
-		 opmode == QDF_IBSS_MODE ? "IBSS" : "non-IBSS");
-#endif /* QCA_IBSS_SUPPORT */
-
 	if (rsp->status)
 		goto send_fail_resp;
 
-	if ((opmode == QDF_P2P_GO_MODE) ||
-	    (opmode == QDF_SAP_MODE)
-#ifdef QCA_IBSS_SUPPORT
-	    || (opmode == QDF_IBSS_MODE)
-#endif /* QCA_IBSS_SUPPORT */
-	    ) {
+	if (opmode == QDF_P2P_GO_MODE || opmode == QDF_SAP_MODE) {
 		wma->interfaces[rsp->vdev_id].beacon =
 			qdf_mem_malloc(sizeof(struct beacon_info));
 
@@ -1940,24 +1872,6 @@ QDF_STATUS wma_create_peer(tp_wma_handle wma,
 		return QDF_STATUS_E_FAULT;
 	}
 
-	/* for each remote ibss peer, clear its keys */
-	if (wma_is_vdev_in_ibss_mode(wma, vdev_id) &&
-	    qdf_mem_cmp(peer_addr, mac_addr_raw, QDF_MAC_ADDR_SIZE)) {
-		tpSetStaKeyParams key_info;
-
-		key_info = qdf_mem_malloc(sizeof(*key_info));
-		if (!key_info) {
-			return QDF_STATUS_E_NOMEM;
-		}
-		WMA_LOGD("%s: remote ibss peer %pM key clearing\n", __func__,
-			 peer_addr);
-		qdf_mem_zero(key_info, sizeof(*key_info));
-		key_info->vdev_id = vdev_id;
-		qdf_mem_copy(key_info->peer_macaddr.bytes, peer_addr,
-				QDF_MAC_ADDR_SIZE);
-		key_info->sendRsp = false;
-	}
-
 	return QDF_STATUS_SUCCESS;
 err:
 	wma->interfaces[vdev_id].peer_count--;
@@ -1971,7 +1885,7 @@ err:
  * @vdev_stop_resp: pointer to Delete BSS response
  *
  * This function is called on receiving vdev stop response from FW or
- * vdev stop response timeout. In case of IBSS/NDI, use vdev's self MAC
+ * vdev stop response timeout. In case of NDI, use vdev's self MAC
  * for removing the peer. In case of STA/SAP use bssid passed as part of
  * delete STA parameter.
  *
@@ -1988,8 +1902,7 @@ static int wma_remove_bss_peer(tp_wma_handle wma, uint32_t vdev_id,
 	QDF_STATUS qdf_status;
 	struct qdf_mac_addr bssid;
 
-	if (wma_is_vdev_in_ibss_mode(wma, vdev_id) ||
-	    WMA_IS_VDEV_IN_NDI_MODE(wma->interfaces, vdev_id)) {
+	if (WMA_IS_VDEV_IN_NDI_MODE(wma->interfaces, vdev_id)) {
 		mac_addr = cdp_get_vdev_mac_addr(soc, vdev_id);
 		if (!mac_addr) {
 			WMA_LOGE(FL("mac_addr is NULL for vdev_id = %d"),
@@ -2859,7 +2772,7 @@ QDF_STATUS wma_vdev_pre_start(uint8_t vdev_id, bool restart)
 	/*
 	 * If the channel has DFS set, flip on radar reporting.
 	 *
-	 * It may be that this should only be done for IBSS/hostap operation
+	 * It may be that this should only be done for hostap operation
 	 * as this flag may be interpreted (at some point in the future)
 	 * by the firmware as "oh, and please do radar DETECTION."
 	 *
@@ -3494,24 +3407,6 @@ QDF_STATUS wma_pre_vdev_start_setup(uint8_t vdev_id,
 	if (add_bss->rmfEnabled)
 		wma_set_mgmt_frame_protection(wma);
 
-	if (wlan_vdev_mlme_get_opmode(iface->vdev) == QDF_IBSS_MODE) {
-		tSetBssKeyParams key_info;
-		/* clear leftover ibss keys on bss peer */
-		wma_debug("ibss bss key clearing");
-		qdf_mem_zero(&key_info, sizeof(key_info));
-		key_info.vdev_id = vdev_id;
-		key_info.numKeys = SIR_MAC_MAX_NUM_OF_DEFAULT_KEYS;
-		qdf_mem_copy(&wma->ibsskey_info, &key_info,
-			     sizeof(tSetBssKeyParams));
-		/*
-		 * If IBSS Power Save is supported by firmware
-		 * set the IBSS power save params to firmware.
-		 */
-		if (wmi_service_enabled(wma->wmi_handle,
-					wmi_service_ibss_pwrsave)) {
-			status = wma_set_ibss_pwrsave_params(wma, vdev_id);
-		}
-	}
 	return status;
 }
 
@@ -4061,7 +3956,6 @@ static void wma_add_sta_req_ap_mode(tp_wma_handle wma, tpAddStaParams add_sta)
 		goto send_rsp;
 	}
 
-	wma_send_peer_atim_window_len(wma, add_sta);
 	if (add_sta->rmfEnabled)
 		wma_set_peer_pmf_status(wma, add_sta->staMac, true);
 
@@ -4687,8 +4581,6 @@ void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
 
 	if (wma_is_vdev_in_ap_mode(wma, add_sta->smesessionId))
 		oper_mode = BSS_OPERATIONAL_MODE_AP;
-	else if (wma_is_vdev_in_ibss_mode(wma, add_sta->smesessionId))
-		oper_mode = BSS_OPERATIONAL_MODE_IBSS;
 
 	if (WMA_IS_VDEV_IN_NDI_MODE(wma->interfaces, add_sta->smesessionId))
 		oper_mode = BSS_OPERATIONAL_MODE_NDI;
@@ -4697,8 +4589,6 @@ void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
 		wma_add_sta_req_sta_mode(wma, add_sta);
 		break;
 
-	/* IBSS should share the same code as AP mode */
-	case BSS_OPERATIONAL_MODE_IBSS:
 	case BSS_OPERATIONAL_MODE_AP:
 		wma_add_sta_req_ap_mode(wma, add_sta);
 		break;
@@ -4707,20 +4597,13 @@ void wma_add_sta(tp_wma_handle wma, tpAddStaParams add_sta)
 		break;
 	}
 
-	/* handle wow for sap, ibss and nan with 1 or more peer in same way */
-	if (BSS_OPERATIONAL_MODE_IBSS == oper_mode ||
-	    BSS_OPERATIONAL_MODE_AP == oper_mode ||
+	/* handle wow for sap and nan with 1 or more peer in same way */
+	if (BSS_OPERATIONAL_MODE_AP == oper_mode ||
 	    BSS_OPERATIONAL_MODE_NDI == oper_mode) {
 		wma_debug("disable runtime pm and vote for link up");
 		htc_vote_link_up(htc_handle);
 		wma_sap_prevent_runtime_pm(wma);
 	}
-
-	/* adjust heart beat thresold timer value for detecting ibss peer
-	 * departure
-	 */
-	if (oper_mode == BSS_OPERATIONAL_MODE_IBSS)
-		wma_adjust_ibss_heart_beat_timer(wma, add_sta->smesessionId, 1);
 }
 
 void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
@@ -4738,10 +4621,6 @@ void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
 
 	if (wma_is_vdev_in_ap_mode(wma, smesession_id))
 		oper_mode = BSS_OPERATIONAL_MODE_AP;
-	if (wma_is_vdev_in_ibss_mode(wma, smesession_id)) {
-		oper_mode = BSS_OPERATIONAL_MODE_IBSS;
-		WMA_LOGD("%s: to delete sta for IBSS mode", __func__);
-	}
 	if (del_sta->staType == STA_ENTRY_NDI_PEER)
 		oper_mode = BSS_OPERATIONAL_MODE_NDI;
 
@@ -4763,7 +4642,6 @@ void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
 		}
 		break;
 
-	case BSS_OPERATIONAL_MODE_IBSS: /* IBSS shares AP code */
 	case BSS_OPERATIONAL_MODE_AP:
 		wma_delete_sta_req_ap_mode(wma, del_sta);
 		/* free the memory here only if sync feature is not enabled */
@@ -4788,20 +4666,12 @@ void wma_delete_sta(tp_wma_handle wma, tpDeleteStaParams del_sta)
 		qdf_mem_free(del_sta);
 	}
 
-	/* handle wow for sap, ibss and nan with 1 or more peer in same way */
-	if (BSS_OPERATIONAL_MODE_IBSS == oper_mode ||
-	    BSS_OPERATIONAL_MODE_AP == oper_mode ||
+	if (BSS_OPERATIONAL_MODE_AP == oper_mode ||
 	    BSS_OPERATIONAL_MODE_NDI == oper_mode) {
 		wma_debug("allow runtime pm and vote for link down");
 		htc_vote_link_down(htc_handle);
 		wma_sap_allow_runtime_pm(wma);
 	}
-
-	/* adjust heart beat thresold timer value for
-	 * detecting ibss peer departure
-	 */
-	if (oper_mode == BSS_OPERATIONAL_MODE_IBSS)
-		wma_adjust_ibss_heart_beat_timer(wma, smesession_id, -1);
 }
 
 void wma_delete_bss_ho_fail(tp_wma_handle wma, uint8_t vdev_id)
@@ -4965,10 +4835,8 @@ void wma_delete_bss(tp_wma_handle wma, uint8_t vdev_id)
 			 __func__, vdev_id);
 		goto out;
 	}
-	if (wma_is_vdev_in_ibss_mode(wma, vdev_id))
-		/* in rome ibss case, self mac is used to create the bss peer */
-		peer_exist = wma_cdp_find_peer_by_addr(addr);
-	else if (WMA_IS_VDEV_IN_NDI_MODE(wma->interfaces,
+
+	if (WMA_IS_VDEV_IN_NDI_MODE(wma->interfaces,
 			vdev_id))
 		/* In ndi case, self mac is used to create the self peer */
 		peer_exist = wma_cdp_find_peer_by_addr(addr);
@@ -5012,9 +4880,6 @@ void wma_delete_bss(tp_wma_handle wma, uint8_t vdev_id)
 		qdf_mem_free(roam_scan_stats_req);
 	}
 
-	if (wlan_op_mode_ibss == cdp_get_opmode(soc, vdev_id))
-		wma->ibss_started = 0;
-
 	if (wma_is_roam_synch_in_progress(wma, vdev_id)) {
 		roam_synch_in_progress = true;
 		WMA_LOGD("LFR3:%s: Setting vdev_up to FALSE for session %d",

+ 0 - 73
core/wma/src/wma_main.c

@@ -774,79 +774,6 @@ static int32_t wma_set_priv_cfg(tp_wma_handle wma_handle,
 						     adapter_1_quota,
 						     adapter_2_chan_number);
 	}
-		break;
-	case WMA_VDEV_IBSS_SET_ATIM_WINDOW_SIZE:
-	{
-		wma_handle->wma_ibss_power_save_params.atimWindowLength =
-							privcmd->param_value;
-		WMA_LOGD("%s: IBSS power save ATIM Window = %d",
-			 __func__, wma_handle->wma_ibss_power_save_params.
-			 atimWindowLength);
-	}
-		break;
-	case WMA_VDEV_IBSS_SET_POWER_SAVE_ALLOWED:
-	{
-		wma_handle->wma_ibss_power_save_params.isPowerSaveAllowed =
-							privcmd->param_value;
-		WMA_LOGD("%s: IBSS is Power Save Allowed = %d",
-			 __func__, wma_handle->wma_ibss_power_save_params.
-			 isPowerSaveAllowed);
-	}
-		break;
-	case WMA_VDEV_IBSS_SET_POWER_COLLAPSE_ALLOWED:
-	{
-		wma_handle->wma_ibss_power_save_params.	isPowerCollapseAllowed =
-							 privcmd->param_value;
-		WMA_LOGD("%s: IBSS is Power Collapse Allowed = %d",
-			 __func__, wma_handle->wma_ibss_power_save_params.
-			 isPowerCollapseAllowed);
-	}
-		break;
-	case WMA_VDEV_IBSS_SET_AWAKE_ON_TX_RX:
-	{
-		wma_handle->wma_ibss_power_save_params.isAwakeonTxRxEnabled =
-							 privcmd->param_value;
-		WMA_LOGD("%s: IBSS Power Save Awake on Tx/Rx Enabled = %d",
-			__func__, wma_handle->wma_ibss_power_save_params.
-			isAwakeonTxRxEnabled);
-	}
-		break;
-	case WMA_VDEV_IBSS_SET_INACTIVITY_TIME:
-	{
-		wma_handle->wma_ibss_power_save_params.inactivityCount =
-							privcmd->param_value;
-		WMA_LOGD("%s: IBSS Power Save Data Inactivity Count = %d",
-			__func__, wma_handle->wma_ibss_power_save_params.
-			inactivityCount);
-	}
-		break;
-	case WMA_VDEV_IBSS_SET_TXSP_END_INACTIVITY_TIME:
-	{
-		wma_handle->wma_ibss_power_save_params.txSPEndInactivityTime =
-							 privcmd->param_value;
-		WMA_LOGD("%s: IBSS Power Save Transmit EOSP inactivity time out = %d",
-			__func__, wma_handle->wma_ibss_power_save_params.
-			txSPEndInactivityTime);
-	}
-		break;
-	case WMA_VDEV_IBSS_PS_SET_WARMUP_TIME_SECS:
-	{
-		wma_handle->wma_ibss_power_save_params.ibssPsWarmupTime =
-							privcmd->param_value;
-		WMA_LOGD("%s: IBSS Power Save Warm Up Time in Seconds = %d",
-			__func__, wma_handle->wma_ibss_power_save_params.
-			ibssPsWarmupTime);
-	}
-		break;
-	case WMA_VDEV_IBSS_PS_SET_1RX_CHAIN_IN_ATIM_WINDOW:
-	{
-		wma_handle->wma_ibss_power_save_params.ibssPs1RxChainInAtimEnable
-							 = privcmd->param_value;
-		WMA_LOGD("%s: IBSS Power Save single RX Chain Enable In ATIM  = %d",
-			__func__, wma_handle->wma_ibss_power_save_params.
-			ibssPs1RxChainInAtimEnable);
-	}
-		break;
 
 	default:
 		WMA_LOGE("Invalid wma config command id:%d", privcmd->param_id);

+ 2 - 90
core/wma/src/wma_mgmt.c

@@ -19,7 +19,7 @@
 /**
  *  DOC:  wma_mgmt.c
  *
- *  This file contains STA/SAP/IBSS and protocol related functions.
+ *  This file contains STA/SAP and protocol related functions.
  */
 
 /* Header files */
@@ -1389,12 +1389,11 @@ QDF_STATUS wma_send_peer_assoc(tp_wma_handle wma,
 			     peer_ht_rates.num_rates);
 	}
 
-	/* in ap/ibss mode and for tdls peer, use mac address of the peer in
+	/* in ap mode and for tdls peer, use mac address of the peer in
 	 * the other end as the new peer address; in sta mode, use bss id to
 	 * be the new peer address
 	 */
 	if ((wma_is_vdev_in_ap_mode(wma, params->smesessionId))
-	    || (wma_is_vdev_in_ibss_mode(wma, params->smesessionId))
 #ifdef FEATURE_WLAN_TDLS
 	    || (STA_ENTRY_TDLS_PEER == params->staType)
 #endif /* FEATURE_WLAN_TDLS */
@@ -1895,93 +1894,6 @@ static inline void wma_fill_in_wapi_key_params(
 #endif
 #endif
 
-#ifdef QCA_IBSS_SUPPORT
-/**
- * wma_calc_ibss_heart_beat_timer() - calculate IBSS heart beat timer
- * @peer_num: number of peers
- *
- * Return: heart beat timer value
- */
-static uint16_t wma_calc_ibss_heart_beat_timer(int16_t peer_num)
-{
-	/* heart beat timer value look-up table */
-	/* entry index : (the number of currently connected peers) - 1
-	 * entry value : the heart time threshold value in seconds for
-	 * detecting ibss peer departure
-	 */
-	static const uint16_t heart_beat_timer[MAX_PEERS] = {
-		4, 4, 4, 4, 4, 4, 4, 4,
-		8, 8, 8, 8, 8, 8, 8, 8,
-		12, 12, 12, 12, 12, 12, 12, 12,
-		16, 16, 16, 16, 16, 16, 16, 16
-	};
-
-	if (peer_num < 1 || peer_num > MAX_PEERS)
-		return 0;
-
-	return heart_beat_timer[peer_num - 1];
-}
-
-void wma_adjust_ibss_heart_beat_timer(tp_wma_handle wma,
-				      uint8_t vdev_id,
-				      int8_t peer_num_delta)
-{
-	int16_t new_peer_num;
-	uint16_t new_timer_value_sec;
-	uint32_t new_timer_value_ms;
-	QDF_STATUS status;
-	void *soc = cds_get_context(QDF_MODULE_ID_SOC);
-
-	if (peer_num_delta != 1 && peer_num_delta != -1) {
-		WMA_LOGE("Invalid peer_num_delta value %d", peer_num_delta);
-		return;
-	}
-
-	/* adjust peer numbers */
-	new_peer_num = cdp_peer_update_ibss_add_peer_num_of_vdev(
-								soc, vdev_id,
-								peer_num_delta);
-	if (OL_TXRX_INVALID_NUM_PEERS == new_peer_num) {
-		WMA_LOGE("new peer num %d out of valid boundary", new_peer_num);
-		return;
-	}
-
-	/* reset timer value if all peers departed */
-	if (new_peer_num == 0) {
-		cdp_set_ibss_vdev_heart_beat_timer(soc, vdev_id, 0);
-		return;
-	}
-
-	/* calculate new timer value */
-	new_timer_value_sec = wma_calc_ibss_heart_beat_timer(new_peer_num);
-	if (new_timer_value_sec == 0) {
-		WMA_LOGE("timer value %d is invalid for peer number %d",
-			 new_timer_value_sec, new_peer_num);
-		return;
-	}
-	if (new_timer_value_sec ==
-	    cdp_set_ibss_vdev_heart_beat_timer(soc, vdev_id,
-					       new_timer_value_sec)) {
-		wma_nofl_debug("timer value %d stays same, no need to notify target",
-			       new_timer_value_sec);
-		return;
-	}
-
-	new_timer_value_ms = ((uint32_t)new_timer_value_sec) * 1000;
-
-	status = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-				    WMI_VDEV_PARAM_IBSS_MAX_BCN_LOST_MS,
-				    new_timer_value_ms);
-	if (QDF_IS_STATUS_ERROR(status)) {
-		WMA_LOGE("Failed to set IBSS link monitoring timer value");
-		return;
-	}
-
-	wma_nofl_debug("Set IBSS link monitor timer: peer_num = %d timer_value = %d",
-		       new_peer_num, new_timer_value_ms);
-}
-#endif /* QCA_IBSS_SUPPORT */
-
 /**
  * wma_process_update_edca_param_req() - update EDCA params
  * @handle: wma handle

+ 0 - 82
core/wma/src/wma_power.c

@@ -125,88 +125,6 @@ QDF_STATUS wma_unified_set_sta_ps_param(wmi_unified_t wmi_handle,
 	return status;
 }
 
-#ifdef QCA_IBSS_SUPPORT
-QDF_STATUS
-wma_set_ibss_pwrsave_params(tp_wma_handle wma, uint8_t vdev_id)
-{
-	QDF_STATUS ret;
-
-	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH,
-			wma->wma_ibss_power_save_params.atimWindowLength);
-	if (QDF_IS_STATUS_ERROR(ret)) {
-		WMA_LOGE("Failed to set WMI_VDEV_PARAM_ATIM_WINDOW_LENGTH ret = %d",
-			ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED,
-			wma->wma_ibss_power_save_params.isPowerSaveAllowed);
-	if (QDF_IS_STATUS_ERROR(ret)) {
-		WMA_LOGE("Failed, set WMI_VDEV_PARAM_IS_IBSS_POWER_SAVE_ALLOWED ret=%d",
-			ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED,
-			wma->wma_ibss_power_save_params.isPowerCollapseAllowed);
-	if (QDF_IS_STATUS_ERROR(ret)) {
-		WMA_LOGE("Failed, set WMI_VDEV_PARAM_IS_POWER_COLLAPSE_ALLOWED ret=%d",
-			ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			 WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED,
-			 wma->wma_ibss_power_save_params.isAwakeonTxRxEnabled);
-	if (QDF_IS_STATUS_ERROR(ret)) {
-		WMA_LOGE("Failed, set WMI_VDEV_PARAM_IS_AWAKE_ON_TXRX_ENABLED ret=%d",
-			ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			WMI_VDEV_PARAM_INACTIVITY_CNT,
-			wma->wma_ibss_power_save_params.inactivityCount);
-	if (QDF_IS_STATUS_ERROR(ret)) {
-		WMA_LOGE("Failed, set WMI_VDEV_PARAM_INACTIVITY_CNT ret=%d",
-			 ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS,
-			wma->wma_ibss_power_save_params.txSPEndInactivityTime);
-	if (QDF_IS_STATUS_ERROR(ret)) {
-		WMA_LOGE("Failed, set WMI_VDEV_PARAM_TXSP_END_INACTIVITY_TIME_MS ret=%d",
-			ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS,
-			wma->wma_ibss_power_save_params.ibssPsWarmupTime);
-	if (QDF_IS_STATUS_ERROR(ret)) {
-		WMA_LOGE("Failed, set WMI_VDEV_PARAM_IBSS_PS_WARMUP_TIME_SECS ret=%d",
-			ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	ret = wma_vdev_set_param(wma->wmi_handle, vdev_id,
-			WMI_VDEV_PARAM_IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE,
-			wma->wma_ibss_power_save_params.ibssPs1RxChainInAtimEnable);
-	if (QDF_IS_STATUS_ERROR(ret)) {
-		WMA_LOGE("Failed to set IBSS_PS_1RX_CHAIN_IN_ATIM_WINDOW_ENABLE ret=%d",
-			ret);
-		return QDF_STATUS_E_FAILURE;
-	}
-
-	return QDF_STATUS_SUCCESS;
-}
-#endif /* QCA_IBSS_SUPPORT */
-
 /**
  * wma_set_ap_peer_uapsd() - set powersave parameters in ap mode to fw
  * @wma: wma handle