qcacmn: Identify WIN/MCC specific features
Identify the WIN/MCC specific features. Move the features under feature
specific flags. Get rid of WIN/MCC specific code.
Change-Id: Iaf4e5befd7d574a20bea5c078201adbeac3b762c
diff --git a/dp/inc/cdp_txrx_cmn.h b/dp/inc/cdp_txrx_cmn.h
index ca034b3..cb2662f 100644
--- a/dp/inc/cdp_txrx_cmn.h
+++ b/dp/inc/cdp_txrx_cmn.h
@@ -146,7 +146,8 @@
return soc->ops->cmn_drv_ops->txrx_vdev_attach(pdev,
vdev_mac_addr, vdev_id, op_mode);
}
-#ifndef CONFIG_WIN
+
+#ifdef CONFIG_MCL
/**
* cdp_flow_pool_map() - Create flow pool for vdev
* @soc - data path soc handle
diff --git a/dp/inc/cdp_txrx_cmn_struct.h b/dp/inc/cdp_txrx_cmn_struct.h
index 576f645..1104398 100644
--- a/dp/inc/cdp_txrx_cmn_struct.h
+++ b/dp/inc/cdp_txrx_cmn_struct.h
@@ -34,9 +34,9 @@
#include "qdf_types.h"
#include "qdf_nbuf.h"
#include "qdf_atomic.h"
-#ifndef CONFIG_WIN
+#ifdef CONFIG_MCL
#include <cdp_txrx_mob_def.h>
-#endif /* CONFIG_WIN */
+#endif
#include <cdp_txrx_handle.h>
#include <cdp_txrx_stats_struct.h>
#ifdef WLAN_RX_PKT_CAPTURE_ENH
diff --git a/dp/inc/cdp_txrx_ops.h b/dp/inc/cdp_txrx_ops.h
index 62025ad..c81cf67 100644
--- a/dp/inc/cdp_txrx_ops.h
+++ b/dp/inc/cdp_txrx_ops.h
@@ -850,12 +850,12 @@
struct cdp_raw_ast *raw_ast);
};
-#ifdef CONFIG_WIN
+#ifdef PEER_FLOW_CONTROL
struct cdp_pflow_ops {
uint32_t(*pflow_update_pdev_params)(void *,
enum _ol_ath_param_t, uint32_t, void *);
};
-#endif /* CONFIG_WIN */
+#endif /* PEER_FLOW_CONTROL */
#define LRO_IPV4_SEED_ARR_SZ 5
#define LRO_IPV6_SEED_ARR_SZ 11
@@ -917,10 +917,10 @@
struct cdp_lro_hash_config *rx_offld_hash);
void (*update_dp_stats)(void *soc, void *stats, uint16_t id,
uint8_t type);
-#ifdef CONFIG_WIN
- uint8_t (*rx_invalid_peer)(void *ctrl_pdev, void *msg);
-#else
+#ifdef CONFIG_MCL
uint8_t (*rx_invalid_peer)(uint8_t vdev_id, void *wh);
+#else
+ uint8_t (*rx_invalid_peer)(void *ctrl_pdev, void *msg);
#endif
int (*peer_map_event)(void *ol_soc_handle, uint16_t peer_id, uint16_t hw_peer_id,
uint8_t vdev_id, uint8_t *peer_mac_addr,
@@ -968,7 +968,7 @@
/* TODO: Add any other control path calls required to OL_IF/WMA layer */
};
-#ifndef CONFIG_WIN
+#ifdef CONFIG_MCL
/* From here MCL specific OPs */
/**
* struct cdp_misc_ops - mcl ops not classified
@@ -1317,7 +1317,7 @@
void (*clear_stats)(uint16_t bitmap);
int (*stats)(uint8_t vdev_id, char *buffer, unsigned buf_len);
};
-#endif /* CONFIG_WIN */
+#endif /* CONFIG_MCL */
#ifdef RECEIVE_OFFLOAD
/**
@@ -1340,7 +1340,7 @@
struct cdp_wds_ops *wds_ops;
struct cdp_raw_ops *raw_ops;
struct cdp_pflow_ops *pflow_ops;
-#ifndef CONFIG_WIN
+#ifdef CONFIG_MCL
struct cdp_misc_ops *misc_ops;
struct cdp_cfg_ops *cfg_ops;
struct cdp_flowctl_ops *flowctl_ops;
@@ -1358,6 +1358,6 @@
struct cdp_mob_stats_ops *mob_stats_ops;
struct cdp_tx_delay_ops *delay_ops;
struct cdp_pmf_ops *pmf_ops;
-#endif /* CONFIG_WIN */
+#endif
};
#endif
diff --git a/dp/inc/cdp_txrx_stats_struct.h b/dp/inc/cdp_txrx_stats_struct.h
index 4cef163..21549e1 100644
--- a/dp/inc/cdp_txrx_stats_struct.h
+++ b/dp/inc/cdp_txrx_stats_struct.h
@@ -23,7 +23,7 @@
*/
#ifndef _CDP_TXRX_STATS_STRUCT_H_
#define _CDP_TXRX_STATS_STRUCT_H_
-#ifndef CONFIG_WIN
+#ifdef CONFIG_MCL
#include <wlan_defs.h>
#endif
#define TXRX_STATS_LEVEL_OFF 0
diff --git a/dp/wifi3.0/dp_htt.c b/dp/wifi3.0/dp_htt.c
index 1001bbb..be9fd11 100644
--- a/dp/wifi3.0/dp_htt.c
+++ b/dp/wifi3.0/dp_htt.c
@@ -1514,7 +1514,7 @@
return QDF_STATUS_E_FAILURE;
}
-#if defined(CONFIG_WIN) && WDI_EVENT_ENABLE
+#if defined(HTT_STATS_ENABLE)
static inline QDF_STATUS dp_send_htt_stat_resp(struct htt_stats_context *htt_stats,
struct dp_soc *soc, qdf_nbuf_t htt_msg)
@@ -1546,13 +1546,13 @@
return QDF_STATUS_SUCCESS;
}
#else
-static inline QDF_STATUS dp_send_htt_stat_resp(struct htt_stats_context *htt_stats,
- struct dp_soc *soc, qdf_nbuf_t htt_msg)
+static inline QDF_STATUS
+dp_send_htt_stat_resp(struct htt_stats_context *htt_stats,
+ struct dp_soc *soc, qdf_nbuf_t htt_msg)
{
return QDF_STATUS_E_NOSUPPORT;
}
#endif
-
/**
* dp_process_htt_stat_msg(): Process the list of buffers of HTT EXT stats
* @htt_stats: htt stats info
diff --git a/dp/wifi3.0/dp_peer.c b/dp/wifi3.0/dp_peer.c
index bd9fb4d..b3a5010 100644
--- a/dp/wifi3.0/dp_peer.c
+++ b/dp/wifi3.0/dp_peer.c
@@ -2793,7 +2793,7 @@
dp_peer_unref_del_find_by_id(peer);
}
-#ifndef CONFIG_WIN
+#ifdef CONFIG_MCL
/**
* dp_register_peer() - Register peer into physical device
* @pdev - data path device instance
diff --git a/dp/wifi3.0/dp_rx.c b/dp/wifi3.0/dp_rx.c
index c30b9bf..ac35620 100644
--- a/dp/wifi3.0/dp_rx.c
+++ b/dp/wifi3.0/dp_rx.c
@@ -30,12 +30,7 @@
#include "dp_rx_mon.h"
#include "dp_ipa.h"
-#ifdef CONFIG_WIN
-static inline bool dp_rx_check_ap_bridge(struct dp_vdev *vdev)
-{
- return vdev->ap_bridge_enabled;
-}
-#else
+#ifdef CONFIG_MCL
static inline bool dp_rx_check_ap_bridge(struct dp_vdev *vdev)
{
if (vdev->opmode != wlan_op_mode_sta)
@@ -43,6 +38,11 @@
else
return false;
}
+#else
+static inline bool dp_rx_check_ap_bridge(struct dp_vdev *vdev)
+{
+ return vdev->ap_bridge_enabled;
+}
#endif
#ifdef ATH_RX_PRI_SAVE
@@ -691,7 +691,7 @@
#endif
-#ifdef CONFIG_WIN
+#ifdef FEATURE_NAC_RSSI
/**
* dp_rx_nac_filter(): Function to perform filtering of non-associated
* clients
diff --git a/dp/wifi3.0/dp_stats.c b/dp/wifi3.0/dp_stats.c
index cc0717b..bbebf6d 100644
--- a/dp/wifi3.0/dp_stats.c
+++ b/dp/wifi3.0/dp_stats.c
@@ -626,7 +626,6 @@
qdf_mem_free(tid_name);
}
-#ifdef CONFIG_WIN
/*
* dp_print_tx_tid_stats_v1_tlv: display htt_tx_tid_stats_v1_tlv
* @tag_buf: buffer containing the tlv htt_tx_tid_stats_v1_tlv
@@ -682,7 +681,6 @@
dp_stats_buf->tid_tx_airtime);
qdf_mem_free(tid_name);
}
-#endif
/*
* dp_print_rx_tid_stats_tlv: display htt_rx_tid_stats_tlv
@@ -3951,8 +3949,6 @@
if (dest_ptr)
qdf_mem_copy(dest_ptr, tag_buf, size);
}
-
-#if defined(CONFIG_WIN) && WDI_EVENT_ENABLE
QDF_STATUS dp_peer_stats_notify(struct dp_peer *peer)
{
struct dp_pdev *dp_pdev;
@@ -3987,7 +3983,6 @@
return QDF_STATUS_SUCCESS;
}
-#endif
#ifdef CONFIG_WIN
/**
diff --git a/dp/wifi3.0/dp_tx.c b/dp/wifi3.0/dp_tx.c
index f0ae737..10a9682 100644
--- a/dp/wifi3.0/dp_tx.c
+++ b/dp/wifi3.0/dp_tx.c
@@ -1844,78 +1844,6 @@
#endif
-#ifdef DP_FEATURE_NAWDS_TX
-/**
- * dp_tx_prepare_nawds(): Tramit NAWDS frames
- * @vdev: dp_vdev handle
- * @nbuf: skb
- * @tid: TID from HLOS for overriding default DSCP-TID mapping
- * @tx_q: Tx queue to be used for this Tx frame
- * @meta_data: Meta date for mesh
- * @peer_id: peer_id of the peer in case of NAWDS frames
- *
- * return: NULL on success nbuf on failure
- */
-static qdf_nbuf_t dp_tx_prepare_nawds(struct dp_vdev *vdev, qdf_nbuf_t nbuf,
- struct dp_tx_msdu_info_s *msdu_info)
-{
- struct dp_peer *peer = NULL;
- struct dp_soc *soc = vdev->pdev->soc;
- struct dp_ast_entry *ast_entry = NULL;
- qdf_ether_header_t *eh = (qdf_ether_header_t *)qdf_nbuf_data(nbuf);
- uint16_t peer_id = HTT_INVALID_PEER;
-
- struct dp_peer *sa_peer = NULL;
- qdf_nbuf_t nbuf_copy;
-
- qdf_spin_lock_bh(&(soc->ast_lock));
- ast_entry = dp_peer_ast_hash_find_by_pdevid
- (soc,
- (uint8_t *)(eh->ether_shost),
- vdev->pdev->pdev_id);
-
- if (ast_entry)
- sa_peer = ast_entry->peer;
-
- qdf_spin_unlock_bh(&(soc->ast_lock));
-
- TAILQ_FOREACH(peer, &vdev->peer_list, peer_list_elem) {
- if ((peer->peer_ids[0] != HTT_INVALID_PEER) &&
- (peer->nawds_enabled)) {
- if (sa_peer == peer) {
- QDF_TRACE(QDF_MODULE_ID_DP,
- QDF_TRACE_LEVEL_DEBUG,
- " %s: broadcast multicast packet",
- __func__);
- DP_STATS_INC(peer, tx.nawds_mcast_drop, 1);
- continue;
- }
-
- nbuf_copy = qdf_nbuf_copy(nbuf);
- if (!nbuf_copy) {
- QDF_TRACE(QDF_MODULE_ID_DP,
- QDF_TRACE_LEVEL_ERROR,
- "nbuf copy failed");
- }
-
- peer_id = peer->peer_ids[0];
- nbuf_copy = dp_tx_send_msdu_single(vdev, nbuf_copy,
- msdu_info, peer_id, NULL);
- if (nbuf_copy) {
- qdf_nbuf_free(nbuf_copy);
- continue;
- }
- DP_STATS_INC_PKT(peer, tx.nawds_mcast,
- 1, qdf_nbuf_len(nbuf));
- }
- }
- if (peer_id == HTT_INVALID_PEER)
- return nbuf;
-
- return NULL;
-}
-#endif
-
/**
* dp_check_exc_metadata() - Checks if parameters are valid
* @tx_exc - holds all exception path parameters
diff --git a/dp/wifi3.0/dp_types.h b/dp/wifi3.0/dp_types.h
index 61ff9da..6253022 100644
--- a/dp/wifi3.0/dp_types.h
+++ b/dp/wifi3.0/dp_types.h
@@ -32,9 +32,6 @@
#include <cdp_txrx_cmn.h>
#ifdef CONFIG_MCL
#include <cds_ieee80211_common.h>
-#endif
-
-#ifndef CONFIG_WIN
#include <wdi_event_api.h> /* WDI subscriber event list */
#endif
@@ -1910,7 +1907,6 @@
#endif
};
-#ifdef CONFIG_WIN
/*
* dp_invalid_peer_msg
* @nbuf: data buffer
@@ -1922,7 +1918,6 @@
struct ieee80211_frame *wh;
uint8_t vdev_id;
};
-#endif
/*
* dp_tx_me_buf_t: ME buffer