Merge "qca-wifi: error copying memory"
diff --git a/configs/wlan_cfg/ap_wlan_cfg.config b/configs/wlan_cfg/ap_wlan_cfg.config
index 5f75ae4..544f18d 100644
--- a/configs/wlan_cfg/ap_wlan_cfg.config
+++ b/configs/wlan_cfg/ap_wlan_cfg.config
@@ -33,6 +33,10 @@
#128 bytes of RX_PKT_HEADER_TLV.
EXTRA_CFLAGS += -DRX_DATA_BUFFER_SIZE=1792
EXTRA_CFLAGS += -DRX_DATA_BUFFER_ALIGNMENT=0
+ifeq ($(strip ${QCA_LOWMEM_CONFIG}),1)
+EXTRA_CFLAGS += -DRX_MONITOR_BUFFER_SIZE=1792
+EXTRA_CFLAGS += -DRX_MONITOR_BUFFER_ALIGNMENT=0
+endif
endif
EXTRA_CFLAGS += -DWLAN_PSOC_MAX_VDEVS=60
diff --git a/dp/wifi3.0/dp_full_mon.c b/dp/wifi3.0/dp_full_mon.c
index eda94b7..3dac1e9 100644
--- a/dp/wifi3.0/dp_full_mon.c
+++ b/dp/wifi3.0/dp_full_mon.c
@@ -125,30 +125,24 @@
{
struct dp_pdev *pdev = dp_get_pdev_for_lmac_id(soc, mac_id);
uint8_t status_buf_count;
- uint32_t work_done;
+ uint32_t work_done = 0;
status_buf_count = desc_info->status_buf_count;
- qdf_mem_copy(&pdev->mon_desc, desc_info,
- sizeof(struct hal_rx_mon_desc_info));
-
- work_done = dp_rx_mon_status_process(soc, mac_id, status_buf_count);
+status_reap:
+ work_done += dp_rx_mon_status_process(soc, mac_id, status_buf_count);
if (desc_info->ppdu_id != pdev->ppdu_info.com_info.ppdu_id) {
- qdf_err("DEBUG: count: %d quota: %d", status_buf_count, quota);
- dp_print_ring_stats(pdev);
- qdf_assert_always(0);
- }
+ pdev->rx_mon_stats.ppdu_id_mismatch++;
- /* DEBUG */
- if (work_done != status_buf_count) {
- qdf_err("Reaped status ring buffers are not equal to "
- "status buf count from destination ring work_done:"
- " %d status_buf_count: %d",
- work_done, status_buf_count);
+ qdf_err("count: %d quota: %d work_done: %d status_ppdu_id: %d"
+ "dest_ppdu_id: %d ", status_buf_count, quota,
+ work_done,
+ pdev->ppdu_info.com_info.ppdu_id,
+ desc_info->ppdu_id);
- dp_print_ring_stats(pdev);
- qdf_assert_always(0);
+ if (desc_info->ppdu_id > pdev->ppdu_info.com_info.ppdu_id)
+ goto status_reap;
}
return work_done;
@@ -339,12 +333,11 @@
mac_id,
HAL_BM_ACTION_PUT_IN_IDLE_LIST)
!= QDF_STATUS_SUCCESS) {
- dp_print_ring_stats(pdev);
- qdf_assert_always(0);
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
"dp_rx_monitor_link_desc_return failed");
}
}
+ pdev->rx_mon_stats.dest_mpdu_done++;
if (last_msdu)
qdf_nbuf_set_next(last_msdu, NULL);
@@ -384,7 +377,7 @@
QDF_STATUS status;
if (qdf_unlikely(!dp_soc_is_full_mon_enable(pdev)))
- return quota;
+ return dp_rx_mon_status_process(soc, mac_id, quota);
mon_dest_srng = dp_rxdma_get_mon_dst_ring(pdev, mac_for_pdev);
@@ -427,8 +420,7 @@
* are zero.
*/
if (qdf_unlikely(!desc_info->end_of_ppdu && !rx_bufs_reaped)) {
- dp_print_ring_stats(pdev);
- qdf_assert_always(0);
+ qdf_err("end_of_ppdu and rx_bufs_reaped are zero");
}
rx_mon_stats->mon_rx_bufs_reaped_dest += rx_bufs_reaped;
@@ -468,6 +460,7 @@
if (!head_msdu) {
ring_desc = hal_srng_dst_get_next(hal_soc,
mon_dest_srng);
+
continue;
}
@@ -508,9 +501,11 @@
*/
rx_mon_stats->dest_ppdu_done++;
+#if 0
if (pdev->ppdu_info.com_info.ppdu_id !=
pdev->mon_desc->ppdu_id) {
pdev->rx_mon_stats.ppdu_id_mismatch++;
+
qdf_err("PPDU id mismatch, status_ppdu_id: %d"
"dest_ppdu_id: %d status_ppdu_done: %d "
"dest_ppdu_done: %d ppdu_id_mismatch_cnt: %u"
@@ -562,7 +557,10 @@
ring_desc);
goto done2;
}
+#endif
+ quota -= dp_rx_mon_reap_status_ring(soc, mac_id,
+ quota, desc_info);
/* Deliver all MPDUs for a PPDU */
dp_rx_monitor_deliver_ppdu(soc, mac_id);
@@ -570,7 +568,6 @@
break;
}
-done2:
hal_srng_access_end(hal_soc, mon_dest_srng);
done1:
diff --git a/dp/wifi3.0/dp_tx_capture.c b/dp/wifi3.0/dp_tx_capture.c
index f7567c7..cda155b 100644
--- a/dp/wifi3.0/dp_tx_capture.c
+++ b/dp/wifi3.0/dp_tx_capture.c
@@ -100,14 +100,132 @@
/* Schedule id counter mask in ppdu_id */
#define SCH_ID_MASK 0xFF
+#define IEEE80211_IS_ZERO(_a) \
+ ((_a)[0] == 0x00 && \
+ (_a)[1] == 0x00 && \
+ (_a)[2] == 0x00 && \
+ (_a)[3] == 0x00 && \
+ (_a)[4] == 0x00 && \
+ (_a)[5] == 0x00)
+/* Maximum number of retries */
+#define MAX_RETRY_Q_COUNT 20
+
#ifdef WLAN_TX_PKT_CAPTURE_ENH
+/* stats counter */
+#ifdef WLAN_TX_PKT_CAPTURE_ENH_DEBUG
+/**
+ * dp_tx_cap_stats_msdu_update() - update msdu level stats counter per peer
+ * @peer: DP PEER object
+ * @msdu_desc: msdu desc index
+ * @count: count to update
+ *
+ * Return: void
+ */
+static inline
+void dp_tx_cap_stats_msdu_update(struct dp_peer *peer,
+ uint8_t msdu_desc, uint32_t count)
+{
+ struct dp_peer_tx_capture_stats *stats;
+
+ stats = &peer->tx_capture.stats;
+
+ stats->msdu[msdu_desc] += count;
+}
+
+/**
+ * dp_tx_cap_stats_mpdu_update() - update mpdu level stats counter per peer
+ * @peer: DP PEER object
+ * @mpdu_desc: mpdu desc index
+ * @count: count to update
+ *
+ * Return: void
+ */
+static inline
+void dp_tx_cap_stats_mpdu_update(struct dp_peer *peer,
+ uint8_t mpdu_desc, uint32_t count)
+{
+ struct dp_peer_tx_capture_stats *stats;
+
+ stats = &peer->tx_capture.stats;
+
+ stats->mpdu[mpdu_desc] += count;
+}
+
+/**
+ * dp_tx_capture_print_stats() - print stats counter per peer
+ * @peer: DP PEER object
+ *
+ * Return: void
+ */
+static inline
+void dp_tx_capture_print_stats(struct dp_peer *peer)
+{
+ struct dp_peer_tx_capture_stats *stats;
+
+ stats = &peer->tx_capture.stats;
+ DP_PRINT_STATS(" peer_id[%d] MSDU[S:%u E:%u D:%u F:%u DP:%u X:%u] MPDU[T:%u S:%u R:%u A:%u C:%u ST:%u]",
+ peer->peer_ids[0],
+ stats->msdu[PEER_MSDU_SUCC],
+ stats->msdu[PEER_MSDU_ENQ],
+ stats->msdu[PEER_MSDU_DEQ],
+ stats->msdu[PEER_MSDU_FLUSH],
+ stats->msdu[PEER_MSDU_DROP],
+ stats->msdu[PEER_MSDU_XRETRY],
+ stats->mpdu[PEER_MPDU_TRI],
+ stats->mpdu[PEER_MPDU_SUCC],
+ stats->mpdu[PEER_MPDU_RESTITCH],
+ stats->mpdu[PEER_MPDU_ARR],
+ stats->mpdu[PEER_MPDU_CLONE],
+ stats->mpdu[PEER_MPDU_TO_STACK]);
+}
+#else
+/**
+ * dp_tx_cap_stats_msdu_update() - update msdu level stats counter per peer
+ * @peer: DP PEER object
+ * @msdu_desc: msdu desc index
+ * @count: count to update
+ *
+ * Return: void
+ */
+static inline
+void dp_tx_cap_stats_msdu_update(struct dp_peer *peer,
+ uint8_t msdu_desc, uint32_t count)
+{
+}
+
+/**
+ * dp_tx_cap_stats_mpdu_update() - update mpdu level stats counter per peer
+ * @peer: DP PEER object
+ * @mpdu_desc: mpdu desc index
+ * @count: count to update
+ *
+ * Return: void
+ */
+static inline
+void dp_tx_cap_stats_mpdu_update(struct dp_peer *peer,
+ uint8_t mpdu_desc, uint32_t count)
+{
+}
+
+/**
+ * dp_tx_capture_print_stats() - print stats counter per peer
+ * @peer: DP PEER object
+ *
+ * Return: void
+ */
+static inline
+void dp_tx_capture_print_stats(struct dp_peer *peer)
+{
+}
+#endif
+
/**
* dp_tx_cap_peer_find_by_id() - Returns peer object given the peer id
* if delete_in_progress in not set for peer
*
- * @soc : core DP soc context
- * @peer_id : peer id from peer object can be retrieved
+ * @soc: core DP soc context
+ * @peer_id: peer id from peer object can be retrieved
*
* Return: struct dp_peer*: Pointer to DP peer object
*/
@@ -158,15 +276,18 @@
pdev->tx_capture.htt_frame_type[htt_frame_type]++;
}
+/*
+ * dp_iterate_print_tid_qlen_per_peer()- API to print peer tid msdu queue
+ * @pdev_handle: DP_PDEV handle
+ *
+ * Return: void
+ */
void dp_print_tid_qlen_per_peer(void *pdev_hdl)
{
struct dp_pdev *pdev = (struct dp_pdev *)pdev_hdl;
struct dp_soc *soc = pdev->soc;
struct dp_vdev *vdev = NULL;
struct dp_peer *peer = NULL;
- struct dp_pdev_tx_capture *ptr_tx_cap;
-
- ptr_tx_cap = &(pdev->tx_capture);
DP_PRINT_STATS("pending peer msdu and ppdu:");
qdf_spin_lock_bh(&soc->peer_ref_mutex);
@@ -177,28 +298,71 @@
int tid;
struct dp_tx_tid *tx_tid;
uint32_t msdu_len;
+ uint32_t tasklet_msdu_len;
uint32_t ppdu_len;
-
for (tid = 0; tid < DP_MAX_TIDS; tid++) {
tx_tid = &peer->tx_capture.tx_tid[tid];
msdu_len =
+ qdf_nbuf_queue_len(&tx_tid->defer_msdu_q);
+ tasklet_msdu_len =
qdf_nbuf_queue_len(&tx_tid->msdu_comp_q);
ppdu_len =
qdf_nbuf_queue_len(&tx_tid->pending_ppdu_q);
-
- if (!msdu_len && !ppdu_len)
+ if (!msdu_len && !ppdu_len && !tasklet_msdu_len)
continue;
-
- DP_PRINT_STATS(" peer_id[%d] tid[%d] msdu_comp_q[%d] pending_ppdu_q[%d]",
+ DP_PRINT_STATS(" peer_id[%d] tid[%d] msdu_comp_q[%d] defer_msdu_q[%d] pending_ppdu_q[%d]",
peer->peer_ids[0], tid,
+ tasklet_msdu_len,
msdu_len, ppdu_len);
}
+ dp_tx_capture_print_stats(peer);
}
}
+
qdf_spin_unlock_bh(&pdev->vdev_list_lock);
qdf_spin_unlock_bh(&soc->peer_ref_mutex);
}
+static void
+dp_ppdu_queue_free(qdf_nbuf_t ppdu_nbuf, uint8_t usr_idx)
+{
+ int i;
+ struct cdp_tx_completion_ppdu *ppdu_desc = NULL;
+ struct cdp_tx_completion_ppdu_user *user;
+ qdf_nbuf_t mpdu_nbuf = NULL;
+
+ if (!ppdu_nbuf)
+ return;
+
+ ppdu_desc = (struct cdp_tx_completion_ppdu *)qdf_nbuf_data(ppdu_nbuf);
+ if (!ppdu_desc)
+ return;
+
+ user = &ppdu_desc->user[usr_idx];
+
+ if (!user->mpdus)
+ goto free_ppdu_desc_mpdu_q;
+
+ for (i = 0; i < user->ba_size &&
+ i < CDP_BA_256_BIT_MAP_SIZE_DWORDS; i++) {
+ mpdu_nbuf = user->mpdus[i];
+ if (mpdu_nbuf) {
+ qdf_nbuf_free(mpdu_nbuf);
+ user->mpdus[i] = NULL;
+ }
+ }
+
+free_ppdu_desc_mpdu_q:
+
+ if (!qdf_nbuf_is_queue_empty(&user->mpdu_q))
+ qdf_nbuf_queue_free(&user->mpdu_q);
+
+ if (user->mpdus)
+ qdf_mem_free(user->mpdus);
+
+ user->mpdus = NULL;
+}
+
/*
* dp_tx_cature_stats: print tx capture stats
* @pdev: DP PDEV handle
@@ -213,6 +377,12 @@
ptr_tx_cap = &(pdev->tx_capture);
DP_PRINT_STATS("tx capture stats:");
+ DP_PRINT_STATS(" pending ppdu dropped: %u",
+ ptr_tx_cap->pend_ppdu_dropped);
+ DP_PRINT_STATS(" ppdu stats queue depth: %u",
+ ptr_tx_cap->ppdu_stats_queue_depth);
+ DP_PRINT_STATS(" ppdu stats defer queue depth: %u",
+ ptr_tx_cap->ppdu_stats_defer_queue_depth);
DP_PRINT_STATS(" mgmt control enqueue stats:");
for (i = 0; i < TXCAP_MAX_TYPE; i++) {
for (j = 0; j < TXCAP_MAX_SUBTYPE; j++) {
@@ -231,14 +401,14 @@
}
}
- dp_print_tid_qlen_per_peer(pdev);
-
for (i = 0; i < TX_CAP_HTT_MAX_FTYPE; i++) {
if (!ptr_tx_cap->htt_frame_type[i])
continue;
DP_PRINT_STATS(" sgen htt frame type[%d] = %d",
i, ptr_tx_cap->htt_frame_type[i]);
}
+
+ dp_print_tid_qlen_per_peer(pdev);
}
/**
@@ -271,6 +441,56 @@
}
/*
+ * dp_tx_find_usr_idx_from_peer_id()- find user index based on peer_id
+ * @ppdu_desc: pointer to ppdu_desc structure
+ * @peer_id: peer id
+ *
+ * Return: user index
+ */
+static uint8_t
+dp_tx_find_usr_idx_from_peer_id(struct cdp_tx_completion_ppdu *ppdu_desc,
+ uint16_t peer_id)
+{
+ uint8_t usr_idx = 0;
+ bool found = false;
+
+ for (usr_idx = 0; usr_idx < ppdu_desc->num_users; usr_idx++) {
+ if (ppdu_desc->user[usr_idx].peer_id == peer_id) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_FATAL,
+ "%s: %d peer_id: %d, ppdu_desc[%p][num_users: %d]\n",
+ __func__, __LINE__, peer_id, ppdu_desc,
+ ppdu_desc->num_users);
+ qdf_assert_always(0);
+ }
+
+ return usr_idx;
+}
+
+/*
+ * dp_peer_tid_peer_id_update() – update peer_id to tid structure
+ * @peer: Datapath peer
+ * @peer_id: peer_id
+ *
+ */
+void dp_peer_tid_peer_id_update(struct dp_peer *peer, uint16_t peer_id)
+{
+ int tid;
+ struct dp_tx_tid *tx_tid;
+
+ for (tid = 0; tid < DP_MAX_TIDS; tid++) {
+ tx_tid = &peer->tx_capture.tx_tid[tid];
+ tx_tid->peer_id = peer_id;
+ }
+}
+
+/*
* dp_peer_tid_queue_init() – Initialize ppdu stats queue per TID
* @peer: Datapath peer
*
@@ -283,15 +503,23 @@
for (tid = 0; tid < DP_MAX_TIDS; tid++) {
tx_tid = &peer->tx_capture.tx_tid[tid];
tx_tid->tid = tid;
+ qdf_nbuf_queue_init(&tx_tid->defer_msdu_q);
qdf_nbuf_queue_init(&tx_tid->msdu_comp_q);
qdf_nbuf_queue_init(&tx_tid->pending_ppdu_q);
tx_tid->max_ppdu_id = 0;
/* spinlock create */
qdf_spinlock_create(&tx_tid->tid_lock);
+ qdf_spinlock_create(&tx_tid->tasklet_tid_lock);
}
}
+/*
+ * dp_peer_tx_cap_tid_queue_flush() – flush peer tx cap per TID
+ * @peer: Datapath peer
+ *
+ * return: void
+ */
static
void dp_peer_tx_cap_tid_queue_flush(struct dp_peer *peer)
{
@@ -302,9 +530,13 @@
tx_tid = &peer->tx_capture.tx_tid[tid];
qdf_spin_lock_bh(&tx_tid->tid_lock);
- qdf_nbuf_queue_free(&tx_tid->msdu_comp_q);
+ qdf_nbuf_queue_free(&tx_tid->defer_msdu_q);
qdf_spin_unlock_bh(&tx_tid->tid_lock);
+ qdf_spin_lock_bh(&tx_tid->tasklet_tid_lock);
+ qdf_nbuf_queue_free(&tx_tid->msdu_comp_q);
+ qdf_spin_unlock_bh(&tx_tid->tasklet_tid_lock);
+
tx_tid->max_ppdu_id = 0;
}
}
@@ -316,18 +548,56 @@
*/
void dp_peer_tid_queue_cleanup(struct dp_peer *peer)
{
- int tid;
struct dp_tx_tid *tx_tid;
+ struct cdp_tx_completion_ppdu *xretry_ppdu;
+ struct cdp_tx_completion_ppdu_user *xretry_user;
+ struct cdp_tx_completion_ppdu *ppdu_desc;
+ struct cdp_tx_completion_ppdu_user *user;
+ qdf_nbuf_t ppdu_nbuf = NULL;
+ int tid;
+ uint16_t peer_id;
for (tid = 0; tid < DP_MAX_TIDS; tid++) {
tx_tid = &peer->tx_capture.tx_tid[tid];
+ xretry_ppdu = &tx_tid->xretry_ppdu;
+ xretry_user = &xretry_ppdu->user[0];
qdf_spin_lock_bh(&tx_tid->tid_lock);
- qdf_nbuf_queue_free(&tx_tid->msdu_comp_q);
+ qdf_nbuf_queue_free(&tx_tid->defer_msdu_q);
qdf_spin_unlock_bh(&tx_tid->tid_lock);
+ qdf_spin_lock_bh(&tx_tid->tasklet_tid_lock);
+ qdf_nbuf_queue_free(&tx_tid->msdu_comp_q);
+ qdf_spin_unlock_bh(&tx_tid->tasklet_tid_lock);
+
/* spinlock destroy */
qdf_spinlock_destroy(&tx_tid->tid_lock);
+ qdf_spinlock_destroy(&tx_tid->tasklet_tid_lock);
+
+ peer_id = tx_tid->peer_id;
+
+ /* free pending ppdu_q and xretry mpdu_q */
+ while ((ppdu_nbuf = qdf_nbuf_queue_remove(
+ &tx_tid->pending_ppdu_q))) {
+ uint8_t usr_idx;
+
+ ppdu_desc = (struct cdp_tx_completion_ppdu *)
+ qdf_nbuf_data(ppdu_nbuf);
+
+ /*
+ * check if peer id is matching
+ * the user peer_id
+ */
+ usr_idx = dp_tx_find_usr_idx_from_peer_id(ppdu_desc,
+ peer_id);
+ user = &ppdu_desc->user[usr_idx];
+
+ /* free all the mpdu_q and mpdus for usr_idx */
+ dp_ppdu_queue_free(ppdu_nbuf, usr_idx);
+ qdf_nbuf_free(ppdu_nbuf);
+ }
+ qdf_nbuf_queue_free(&xretry_user->mpdu_q);
+
tx_tid->max_ppdu_id = 0;
}
}
@@ -408,19 +678,26 @@
return;
}
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_DEBUG,
+ "dlvr mgmt frm(%d 0x%08x): fc 0x%x %x, dur 0x%x%x tsf:%u",
+ ptr_mgmt_hdr->ppdu_id,
+ ptr_mgmt_hdr->ppdu_id,
+ wh->i_fc[1], wh->i_fc[0],
+ wh->i_dur[1], wh->i_dur[0], ptr_mgmt_hdr->tx_tsf);
+
+ QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_DEBUG,
+ qdf_nbuf_data(nbuf), 64);
+
qdf_spin_lock_bh(
&pdev->tx_capture.ctl_mgmt_lock[type][subtype]);
qdf_nbuf_queue_add(&pdev->tx_capture.ctl_mgmt_q[type][subtype],
nbuf);
qdf_spin_unlock_bh(
&pdev->tx_capture.ctl_mgmt_lock[type][subtype]);
- QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_DEBUG,
- "dlvr mgmt frm(0x%08x): fc 0x%x %x, dur 0x%x%x\n",
- ptr_mgmt_hdr->ppdu_id, wh->i_fc[1], wh->i_fc[0],
- wh->i_dur[1], wh->i_dur[0]);
} else {
- qdf_nbuf_free(nbuf);
- return;
+ if (!pdev->bpr_enable)
+ qdf_nbuf_free(nbuf);
}
}
@@ -619,7 +896,7 @@
bool found = false;
found = dp_peer_tx_cap_search(pdev, peer_id, mac_addr);
- QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_INFO_HIGH,
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_INFO_LOW,
"%s: %d peer_id[%d] mac_addr[%pM] found[%d]!",
__func__, __LINE__, peer_id, mac_addr, found);
@@ -638,8 +915,8 @@
struct dp_pdev_tx_capture *tx_capture;
int i, j;
+ pdev->tx_capture.tx_cap_mode_flag = true;
tx_capture = &pdev->tx_capture;
- tx_capture->tx_cap_mode_flag = true;
/* Work queue setup for HTT stats and tx capture handling */
qdf_create_work(0, &pdev->tx_capture.ppdu_stats_work,
dp_tx_ppdu_stats_process,
@@ -649,6 +926,7 @@
STAILQ_INIT(&pdev->tx_capture.ppdu_stats_queue);
STAILQ_INIT(&pdev->tx_capture.ppdu_stats_defer_queue);
qdf_spinlock_create(&pdev->tx_capture.ppdu_stats_lock);
+ qdf_spinlock_create(&pdev->tx_capture.config_lock);
pdev->tx_capture.ppdu_stats_queue_depth = 0;
pdev->tx_capture.ppdu_stats_next_sched = 0;
pdev->tx_capture.ppdu_stats_defer_queue_depth = 0;
@@ -690,6 +968,7 @@
qdf_flush_workqueue(0, pdev->tx_capture.ppdu_stats_workqueue);
qdf_destroy_workqueue(0, pdev->tx_capture.ppdu_stats_workqueue);
+ qdf_spinlock_destroy(&pdev->tx_capture.config_lock);
qdf_spinlock_destroy(&pdev->tx_capture.ppdu_stats_lock);
STAILQ_FOREACH_SAFE(ppdu_info,
@@ -711,6 +990,8 @@
}
for (i = 0; i < TXCAP_MAX_TYPE; i++) {
for (j = 0; j < TXCAP_MAX_SUBTYPE; j++) {
+ qdf_nbuf_queue_t *retries_q;
+
qdf_spin_lock_bh(
&pdev->tx_capture.ctl_mgmt_lock[i][j]);
qdf_nbuf_queue_free(
@@ -719,6 +1000,11 @@
&pdev->tx_capture.ctl_mgmt_lock[i][j]);
qdf_spinlock_destroy(
&pdev->tx_capture.ctl_mgmt_lock[i][j]);
+
+ retries_q = &pdev->tx_capture.retries_ctl_mgmt_q[i][j];
+
+ if (!qdf_nbuf_is_queue_empty(retries_q))
+ qdf_nbuf_queue_free(retries_q);
}
}
@@ -727,6 +1013,68 @@
#define MAX_MSDU_THRESHOLD_TSF 100000
#define MAX_MSDU_ENQUEUE_THRESHOLD 10000
+
+/**
+ * dp_drop_enq_msdu_on_thresh(): Function to drop msdu when exceed
+ * storing threshold limit
+ * @peer: dp_peer
+ * @ptr_msdu_comp_q: pointer to skb queue, it can be either tasklet or WQ msdu q
+ * @tsf: current timestamp
+ *
+ * this function must be called inside lock of corresponding msdu_q
+ * return: status
+ */
+QDF_STATUS
+dp_drop_enq_msdu_on_thresh(struct dp_peer *peer,
+ qdf_nbuf_queue_t *ptr_msdu_comp_q,
+ uint32_t tsf)
+{
+ struct msdu_completion_info *ptr_msdu_info = NULL;
+ qdf_nbuf_t nbuf;
+ qdf_nbuf_t head_msdu;
+ uint32_t tsf_delta;
+ uint32_t qlen;
+
+ while ((head_msdu = qdf_nbuf_queue_first(ptr_msdu_comp_q))) {
+ ptr_msdu_info =
+ (struct msdu_completion_info *)qdf_nbuf_data(head_msdu);
+
+ if (tsf > ptr_msdu_info->tsf)
+ tsf_delta = tsf - ptr_msdu_info->tsf;
+ else
+ tsf_delta = LOWER_32_MASK - ptr_msdu_info->tsf + tsf;
+
+ if (tsf_delta < MAX_MSDU_THRESHOLD_TSF)
+ break;
+
+ /* free head */
+ nbuf = qdf_nbuf_queue_remove(ptr_msdu_comp_q);
+ if (qdf_unlikely(!nbuf)) {
+ qdf_assert_always(0);
+ break;
+ }
+
+ qdf_nbuf_free(nbuf);
+ dp_tx_cap_stats_msdu_update(peer, PEER_MSDU_DROP, 1);
+ }
+
+ /* get queue length */
+ qlen = qdf_nbuf_queue_len(ptr_msdu_comp_q);
+ if (qlen > MAX_MSDU_ENQUEUE_THRESHOLD) {
+ /* free head */
+ nbuf = qdf_nbuf_queue_remove(ptr_msdu_comp_q);
+ if (qdf_unlikely(!nbuf)) {
+ qdf_assert_always(0);
+ return QDF_STATUS_E_ABORTED;
+ }
+
+ qdf_nbuf_free(nbuf);
+ dp_tx_cap_stats_msdu_update(peer, PEER_MSDU_DROP, 1);
+ }
+
+ return QDF_STATUS_SUCCESS;
+}
+
/**
* dp_update_msdu_to_list(): Function to queue msdu from wbm
* @pdev: dp_pdev
@@ -745,11 +1093,6 @@
{
struct dp_tx_tid *tx_tid;
struct msdu_completion_info *msdu_comp_info;
- struct msdu_completion_info *ptr_msdu_info = NULL;
- qdf_nbuf_t nbuf;
- qdf_nbuf_t head_msdu;
- uint32_t tsf_delta;
- uint32_t qlen;
if (!peer) {
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_ERROR,
@@ -773,14 +1116,14 @@
return QDF_STATUS_E_FAILURE;
}
- qdf_nbuf_unmap(soc->osdev, netbuf, QDF_DMA_TO_DEVICE);
-
if (!qdf_nbuf_push_head(netbuf, sizeof(struct msdu_completion_info))) {
QDF_TRACE(QDF_MODULE_ID_DP, QDF_TRACE_LEVEL_ERROR,
FL("No headroom"));
return QDF_STATUS_E_NOMEM;
}
+ qdf_nbuf_unmap(soc->osdev, netbuf, QDF_DMA_TO_DEVICE);
+
msdu_comp_info = (struct msdu_completion_info *)qdf_nbuf_data(netbuf);
/* copy msdu_completion_info to control buffer */
@@ -794,9 +1137,22 @@
msdu_comp_info->tsf = ts->tsf;
msdu_comp_info->status = ts->status;
+ /* lock here */
+ qdf_spin_lock_bh(&tx_tid->tasklet_tid_lock);
+ if (tx_tid->max_ppdu_id != ts->ppdu_id)
+ dp_drop_enq_msdu_on_thresh(peer, &tx_tid->msdu_comp_q,
+ ts->tsf);
+
+ /* add nbuf to tail queue per peer tid */
+ qdf_nbuf_queue_add(&tx_tid->msdu_comp_q, netbuf);
+ dp_tx_cap_stats_msdu_update(peer, PEER_MSDU_ENQ, 1);
+ /* unlock here */
+ qdf_spin_unlock_bh(&tx_tid->tasklet_tid_lock);
+
/* update max ppdu_id */
tx_tid->max_ppdu_id = ts->ppdu_id;
pdev->tx_capture.last_msdu_id = ts->ppdu_id;
+ pdev->tx_capture.last_peer_id = ts->peer_id;
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_INFO,
"msdu_completion: ppdu_id[%d] peer_id[%d] tid[%d] rel_src[%d] status[%d] tsf[%u] A[%d] CNT[%d]",
@@ -804,38 +1160,6 @@
ts->status, ts->tsf, ts->msdu_part_of_amsdu,
ts->transmit_cnt);
- /* lock here */
- qdf_spin_lock_bh(&tx_tid->tid_lock);
- while ((head_msdu = qdf_nbuf_queue_first(&tx_tid->msdu_comp_q))) {
- ptr_msdu_info =
- (struct msdu_completion_info *)qdf_nbuf_data(head_msdu);
-
- if (ts->tsf > ptr_msdu_info->tsf)
- tsf_delta = ts->tsf - ptr_msdu_info->tsf;
- else
- tsf_delta = LOWER_32_MASK - ptr_msdu_info->tsf + ts->tsf;
-
- if (tsf_delta < MAX_MSDU_THRESHOLD_TSF)
- break;
-
- /* free head */
- nbuf = qdf_nbuf_queue_remove(&tx_tid->msdu_comp_q);
- qdf_nbuf_free(nbuf);
- }
-
- /* get queue length */
- qlen = qdf_nbuf_queue_len(&tx_tid->msdu_comp_q);
- if (qlen > MAX_MSDU_ENQUEUE_THRESHOLD) {
- /* free head */
- nbuf = qdf_nbuf_queue_remove(&tx_tid->msdu_comp_q);
- qdf_nbuf_free(nbuf);
- }
-
- /* add nbuf to tail queue per peer tid */
- qdf_nbuf_queue_add(&tx_tid->msdu_comp_q, netbuf);
-
- qdf_spin_unlock_bh(&tx_tid->tid_lock);
-
return QDF_STATUS_SUCCESS;
}
@@ -843,7 +1167,7 @@
* dp_tx_add_to_comp_queue() - add completion msdu to queue
* @soc: DP Soc handle
* @tx_desc: software Tx descriptor
- * @ts : Tx completion status from HAL/HTT descriptor
+ * @ts: Tx completion status from HAL/HTT descriptor
* @peer: DP peer
*
* Return: none
@@ -861,9 +1185,15 @@
((ts->status == HAL_TX_TQM_RR_FRAME_ACKED) ||
(ts->status == HAL_TX_TQM_RR_REM_CMD_TX) ||
((ts->status == HAL_TX_TQM_RR_REM_CMD_AGED) && ts->transmit_cnt))) {
- /* skip enqueuing OFDMA frames */
- if (ts->ofdma)
+ if (qdf_unlikely(desc->pkt_offset != 0) &&
+ (qdf_nbuf_pull_head(
+ desc->nbuf, desc->pkt_offset) == NULL)) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_ERROR,
+ "netbuf %pK offset %d",
+ desc->nbuf, desc->pkt_offset);
return ret;
+ }
ret = dp_update_msdu_to_list(soc, pdev, peer, ts, desc->nbuf);
}
@@ -1025,44 +1355,9 @@
qdf_spin_lock_bh(&pdev->vdev_list_lock);
DP_PDEV_ITERATE_VDEV_LIST(pdev, vdev) {
DP_VDEV_ITERATE_PEER_LIST(vdev, peer) {
- int tid;
- struct dp_tx_tid *tx_tid;
-
/* set peer tx cap enabled to 0, when feature disable */
peer->tx_cap_enabled = 0;
- for (tid = 0; tid < DP_MAX_TIDS; tid++) {
- qdf_nbuf_t ppdu_nbuf = NULL;
- struct cdp_tx_completion_ppdu *ppdu_desc =
- NULL;
- int i;
- tx_tid = &peer->tx_capture.tx_tid[tid];
-
- /* spinlock hold */
- qdf_spin_lock_bh(&tx_tid->tid_lock);
- qdf_nbuf_queue_free(&tx_tid->msdu_comp_q);
- qdf_spin_unlock_bh(&tx_tid->tid_lock);
- while ((ppdu_nbuf = qdf_nbuf_queue_remove(
- &tx_tid->pending_ppdu_q))) {
- ppdu_desc =
- (struct cdp_tx_completion_ppdu *)
- qdf_nbuf_data(ppdu_nbuf);
- if (!ppdu_desc->mpdus) {
- qdf_nbuf_free(ppdu_nbuf);
- continue;
- }
- for (i = 0; i <
- ppdu_desc->user[0].ba_size; i++) {
- if (!ppdu_desc->mpdus[i])
- continue;
- qdf_nbuf_free(
- ppdu_desc->mpdus[i]);
- ppdu_desc->mpdus[i] = NULL;
- }
- qdf_mem_free(ppdu_desc->mpdus);
- ppdu_desc->mpdus = NULL;
- qdf_nbuf_free(ppdu_nbuf);
- }
- }
+ dp_peer_tid_queue_cleanup(peer);
}
}
qdf_spin_unlock_bh(&pdev->vdev_list_lock);
@@ -1070,6 +1365,33 @@
}
/*
+ * dp_soc_check_enh_tx_capture() - API to get tx capture set in any pdev
+ * @soc_handle: DP_SOC handle
+ *
+ * return: true
+ */
+uint8_t
+dp_soc_is_tx_capture_set_in_pdev(struct dp_soc *soc)
+{
+ struct dp_pdev *pdev;
+ uint8_t pdev_tx_capture = 0;
+ uint8_t i;
+
+ for (i = 0; i < MAX_PDEV_CNT; i++) {
+ pdev = soc->pdev_list[i];
+ if (!pdev)
+ continue;
+
+ if (!pdev->tx_capture_enabled)
+ continue;
+
+ pdev_tx_capture++;
+ }
+
+ return pdev_tx_capture;
+}
+
+/*
* dp_enh_tx_capture_disable()- API to disable enhanced tx capture
* @pdev_handle: DP_PDEV handle
*
@@ -1080,10 +1402,13 @@
{
int i, j;
- dp_soc_set_txrx_ring_map(pdev->soc);
+ if (!dp_soc_is_tx_capture_set_in_pdev(pdev->soc))
+ dp_soc_set_txrx_ring_map(pdev->soc);
+
dp_h2t_cfg_stats_msg_send(pdev,
DP_PPDU_STATS_CFG_ENH_STATS,
pdev->pdev_id);
+
dp_iterate_free_peer_msdu_q(pdev);
for (i = 0; i < TXCAP_MAX_TYPE; i++) {
for (j = 0; j < TXCAP_MAX_SUBTYPE; j++) {
@@ -1142,7 +1467,9 @@
if (pdev->tx_capture_enabled == CDP_TX_ENH_CAPTURE_ENABLE_ALL_PEERS ||
pdev->tx_capture_enabled == CDP_TX_ENH_CAPTURE_ENDIS_PER_PEER) {
- dp_soc_set_txrx_ring_map_single(pdev->soc);
+ if (dp_soc_is_tx_capture_set_in_pdev(pdev->soc) == 1)
+ dp_soc_set_txrx_ring_map_single(pdev->soc);
+
if (!pdev->pktlog_ppdu_stats)
dp_h2t_cfg_stats_msg_send(pdev,
DP_PPDU_STATS_CFG_SNIFFER,
@@ -1247,23 +1574,99 @@
return QDF_STATUS_SUCCESS;
}
-static uint32_t dp_tx_update_80211_hdr(struct dp_pdev *pdev,
- struct dp_peer *peer,
- void *data,
- qdf_nbuf_t nbuf,
- uint16_t ether_type,
- uint8_t *src_addr)
+/**
+ * dp_ppdu_desc_debug_print(): Function to print ppdu_desc
+ * @ppdu_desc: ppdu desc pointer
+ * @usr_idx: user index
+ * @func: caller function name
+ * @line: caller function line number
+ *
+ * return: void
+ */
+void dp_ppdu_desc_debug_print(struct cdp_tx_completion_ppdu *ppdu_desc,
+ uint8_t usr_idx, const char *func, uint32_t line)
+{
+ struct cdp_tx_completion_ppdu_user *user;
+ uint8_t num_users;
+
+ num_users = ppdu_desc->num_users;
+
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_INFO_MED,
+ "%s: %d PID: %d, BPID: %d SCHED: %d usr_idx: %d TLV_BITMAP[0x%x] num_users:%d",
+ func, line,
+ ppdu_desc->ppdu_id, ppdu_desc->bar_ppdu_id,
+ ppdu_desc->sched_cmdid,
+ usr_idx, ppdu_desc->tlv_bitmap, ppdu_desc->num_users);
+
+ user = &ppdu_desc->user[usr_idx];
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_INFO_MED,
+ "%s: %d P[%d] CS:%d S_SEQ: %d L_ENQ_SEQ:%d BA_SEQ:%d BA_SZ:%d M[TRI: %d, SUC: %d] ENQ[%x:%x:%x:%x] BA[%x:%x:%x:%x] F[%x:%x:%x:%x] tlv[0x%x]",
+ func, line, user->peer_id,
+ user->completion_status,
+ user->start_seq, user->last_enq_seq,
+ user->ba_seq_no, user->ba_size,
+ user->mpdu_tried_ucast + user->mpdu_tried_mcast,
+ user->mpdu_success,
+ user->enq_bitmap[0], user->enq_bitmap[1],
+ user->enq_bitmap[2], user->enq_bitmap[3],
+ user->ba_bitmap[0], user->ba_bitmap[1],
+ user->ba_bitmap[2], user->ba_bitmap[3],
+ user->failed_bitmap[0], user->failed_bitmap[1],
+ user->failed_bitmap[2], user->failed_bitmap[3],
+ user->tlv_bitmap);
+}
+
+/*
+ * dp_peer_tx_wds_addr_add() – Update WDS peer to include 4th address
+ * @peer: Datapath peer
+ * @addr4_mac_addr: Source MAC address for WDS TX
+ *
+ */
+static
+void dp_peer_tx_wds_addr_add(struct dp_peer *peer, uint8_t *addr4_mac_addr)
+{
+ struct ieee80211_frame_addr4 *ptr_wh;
+
+ if (!peer)
+ return;
+
+ ptr_wh = &peer->tx_capture.tx_wifi_addr4_hdr;
+ qdf_mem_copy(ptr_wh->i_addr4,
+ addr4_mac_addr,
+ QDF_MAC_ADDR_SIZE);
+}
+
+/*
+ * dp_peer_tx_update_80211_wds_hdr() – Update 80211 frame header to include a
+ * 4 address frame, and set QoS related information if necessary
+ * @pdev: Physical device reference
+ * @peer: Datapath peer
+ * @data: ppdu_descriptor
+ * @nbuf: 802.11 frame
+ * @ether_type: ethernet type
+ * @src_addr: ether shost address
+ * @usr_idx: user index
+ *
+ */
+static uint32_t dp_tx_update_80211_wds_hdr(struct dp_pdev *pdev,
+ struct dp_peer *peer,
+ void *data,
+ qdf_nbuf_t nbuf,
+ uint16_t ether_type,
+ uint8_t *src_addr,
+ uint8_t usr_idx)
{
struct cdp_tx_completion_ppdu *ppdu_desc;
- struct ieee80211_frame *ptr_wh;
- struct ieee80211_qoscntl *ptr_qoscntl;
- uint32_t mpdu_buf_len;
+ struct cdp_tx_completion_ppdu_user *user;
+ uint32_t mpdu_buf_len, frame_size;
uint8_t *ptr_hdr;
uint16_t eth_type = qdf_htons(ether_type);
+ struct ieee80211_qosframe_addr4 *ptr_wh;
ppdu_desc = (struct cdp_tx_completion_ppdu *)data;
- ptr_wh = &peer->tx_capture.tx_wifi_hdr;
- ptr_qoscntl = &peer->tx_capture.tx_qoscntl;
+ user = &ppdu_desc->user[usr_idx];
+
+ ptr_wh = &peer->tx_capture.tx_wifi_addr4_qos_hdr;
/*
* update framectrl only for first ppdu_id
@@ -1277,18 +1680,19 @@
ptr_wh->i_dur[1] = (ppdu_desc->tx_duration & 0xFF00) >> 8;
ptr_wh->i_dur[0] = (ppdu_desc->tx_duration & 0xFF);
- ptr_qoscntl->i_qos[1] = (ppdu_desc->user[0].qos_ctrl &
- 0xFF00) >> 8;
- ptr_qoscntl->i_qos[0] = (ppdu_desc->user[0].qos_ctrl & 0xFF);
+ ptr_wh->i_qos[1] = (user->qos_ctrl & 0xFF00) >> 8;
+ ptr_wh->i_qos[0] = (user->qos_ctrl & 0xFF);
/* Update Addr 3 (SA) with SA derived from ether packet */
qdf_mem_copy(ptr_wh->i_addr3, src_addr, QDF_MAC_ADDR_SIZE);
peer->tx_capture.tx_wifi_ppdu_id = ppdu_desc->ppdu_id;
}
- mpdu_buf_len = sizeof(struct ieee80211_frame) + LLC_SNAP_HDR_LEN;
- if (qdf_likely(ppdu_desc->user[0].tid != DP_NON_QOS_TID))
- mpdu_buf_len += sizeof(struct ieee80211_qoscntl);
+ frame_size = (user->tid != DP_NON_QOS_TID) ?
+ sizeof(struct ieee80211_qosframe_addr4) :
+ sizeof(struct ieee80211_frame_addr4);
+
+ mpdu_buf_len = frame_size + LLC_SNAP_HDR_LEN;
nbuf->protocol = qdf_htons(ETH_P_802_2);
@@ -1300,17 +1704,96 @@
}
ptr_hdr = (void *)qdf_nbuf_data(nbuf);
- qdf_mem_copy(ptr_hdr, ptr_wh, sizeof(struct ieee80211_frame));
+ qdf_mem_copy(ptr_hdr, ptr_wh, frame_size);
- ptr_hdr = ptr_hdr + (sizeof(struct ieee80211_frame));
+ ptr_hdr = ptr_hdr + frame_size;
- /* update qoscntl header */
- if (qdf_likely(ppdu_desc->user[0].tid != DP_NON_QOS_TID)) {
- qdf_mem_copy(ptr_hdr, ptr_qoscntl,
- sizeof(struct ieee80211_qoscntl));
- ptr_hdr = ptr_hdr + sizeof(struct ieee80211_qoscntl);
+ /* update LLC */
+ *ptr_hdr = LLC_SNAP_LSAP;
+ *(ptr_hdr + 1) = LLC_SNAP_LSAP;
+ *(ptr_hdr + 2) = LLC_UI;
+ *(ptr_hdr + 3) = 0x00;
+ *(ptr_hdr + 4) = 0x00;
+ *(ptr_hdr + 5) = 0x00;
+ *(ptr_hdr + 6) = (eth_type & 0xFF00) >> 8;
+ *(ptr_hdr + 7) = (eth_type & 0xFF);
+
+ qdf_nbuf_trim_tail(nbuf, qdf_nbuf_len(nbuf) - mpdu_buf_len);
+ return 0;
+}
+
+/**
+ * dp_tx_update_80211_hdr() – Update 80211 frame header to set QoS
+ * related information if necessary
+ * @pdev: Physical device reference
+ * @peer: Datapath peer
+ * @data: ppdu_descriptor
+ * @nbuf: 802.11 frame
+ * @ether_type: ethernet type
+ * @src_addr: ether shost address
+ *
+ */
+static uint32_t dp_tx_update_80211_hdr(struct dp_pdev *pdev,
+ struct dp_peer *peer,
+ void *data,
+ qdf_nbuf_t nbuf,
+ uint16_t ether_type,
+ uint8_t *src_addr,
+ uint8_t usr_idx)
+{
+ struct cdp_tx_completion_ppdu *ppdu_desc;
+ struct cdp_tx_completion_ppdu_user *user;
+ uint32_t mpdu_buf_len, frame_size;
+ uint8_t *ptr_hdr;
+ uint16_t eth_type = qdf_htons(ether_type);
+
+ struct ieee80211_qosframe *ptr_wh;
+
+ ppdu_desc = (struct cdp_tx_completion_ppdu *)data;
+ user = &ppdu_desc->user[usr_idx];
+
+ ptr_wh = &peer->tx_capture.tx_wifi_qos_hdr;
+
+ /*
+ * update framectrl only for first ppdu_id
+ * rest of mpdu will have same frame ctrl
+ * mac address and duration
+ */
+ if (ppdu_desc->ppdu_id != peer->tx_capture.tx_wifi_ppdu_id) {
+ ptr_wh->i_fc[1] = (user->frame_ctrl & 0xFF00) >> 8;
+ ptr_wh->i_fc[0] = (user->frame_ctrl & 0xFF);
+
+ ptr_wh->i_dur[1] = (ppdu_desc->tx_duration & 0xFF00) >> 8;
+ ptr_wh->i_dur[0] = (ppdu_desc->tx_duration & 0xFF);
+
+ ptr_wh->i_qos[1] = (user->qos_ctrl & 0xFF00) >> 8;
+ ptr_wh->i_qos[0] = (user->qos_ctrl & 0xFF);
+ /* Update Addr 3 (SA) with SA derived from ether packet */
+ qdf_mem_copy(ptr_wh->i_addr3, src_addr, QDF_MAC_ADDR_SIZE);
+
+ peer->tx_capture.tx_wifi_ppdu_id = ppdu_desc->ppdu_id;
}
+ frame_size = (user->tid != DP_NON_QOS_TID) ?
+ sizeof(struct ieee80211_qosframe) :
+ sizeof(struct ieee80211_frame);
+
+ mpdu_buf_len = frame_size + LLC_SNAP_HDR_LEN;
+
+ nbuf->protocol = qdf_htons(ETH_P_802_2);
+
+ /* update ieee80211_frame header */
+ if (!qdf_nbuf_push_head(nbuf, mpdu_buf_len)) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_ERROR,
+ FL("No headroom"));
+ return QDF_STATUS_E_NOMEM;
+ }
+
+ ptr_hdr = (void *)qdf_nbuf_data(nbuf);
+ qdf_mem_copy(ptr_hdr, ptr_wh, frame_size);
+
+ ptr_hdr = ptr_hdr + frame_size;
+
/* update LLC */
*ptr_hdr = LLC_SNAP_LSAP;
*(ptr_hdr + 1) = LLC_SNAP_LSAP;
@@ -1338,7 +1821,7 @@
dp_tx_mon_restitch_mpdu(struct dp_pdev *pdev, struct dp_peer *peer,
struct cdp_tx_completion_ppdu *ppdu_desc,
qdf_nbuf_queue_t *head_msdu,
- qdf_nbuf_queue_t *mpdu_q)
+ qdf_nbuf_queue_t *mpdu_q, uint8_t usr_idx)
{
qdf_nbuf_t curr_nbuf = NULL;
qdf_nbuf_t first_nbuf = NULL;
@@ -1353,6 +1836,11 @@
uint8_t first_msdu_not_seen = 1;
uint16_t ether_type = 0;
qdf_ether_header_t *eh = NULL;
+ size_t msdu_comp_info_sz;
+ size_t ether_hdr_sz;
+
+ if (qdf_nbuf_is_queue_empty(head_msdu))
+ return 0;
curr_nbuf = qdf_nbuf_queue_remove(head_msdu);
@@ -1367,25 +1855,42 @@
sizeof(struct msdu_completion_info));
ether_type = eh->ether_type;
+ msdu_comp_info_sz = sizeof(struct msdu_completion_info);
/* pull msdu_completion_info added in pre header */
- qdf_nbuf_pull_head(curr_nbuf,
- sizeof(struct msdu_completion_info));
+ if (NULL == qdf_nbuf_pull_head(curr_nbuf, msdu_comp_info_sz)) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_FATAL,
+ " No Head space to pull !!\n");
+ qdf_assert_always(0);
+ }
+
+ if ((qdf_likely((peer->vdev->tx_encap_type !=
+ htt_cmn_pkt_type_raw))) &&
+ ((ppdu_desc->frame_ctrl & IEEE80211_FC1_DIR_MASK) &&
+ (IEEE80211_FC1_DIR_TODS | IEEE80211_FC1_DIR_FROMDS)))
+ dp_peer_tx_wds_addr_add(peer, eh->ether_shost);
if (first_msdu && first_msdu_not_seen) {
first_nbuf = curr_nbuf;
frag_list_sum_len = 0;
first_msdu_not_seen = 0;
+ ether_hdr_sz = sizeof(qdf_ether_header_t);
/* pull ethernet header from first MSDU alone */
- qdf_nbuf_pull_head(curr_nbuf,
- sizeof(qdf_ether_header_t));
+ if (NULL == qdf_nbuf_pull_head(curr_nbuf,
+ ether_hdr_sz)) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_FATAL,
+ " No Head space to pull !!\n");
+ qdf_assert_always(0);
+ }
/* update first buffer to previous buffer */
prev_nbuf = curr_nbuf;
} else if (first_msdu && !first_msdu_not_seen) {
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_FATAL,
+ QDF_TRACE_LEVEL_ERROR,
"!!!!! NO LAST MSDU\n");
/*
* no last msdu in a mpdu
@@ -1399,7 +1904,7 @@
goto free_ppdu_desc_mpdu_q;
} else if (!first_msdu && first_msdu_not_seen) {
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_FATAL,
+ QDF_TRACE_LEVEL_ERROR,
"!!!!! NO FIRST MSDU\n");
/*
* no first msdu in a mpdu
@@ -1427,16 +1932,29 @@
MAX_MONITOR_HEADER,
4, FALSE);
+
if (!mpdu_nbuf) {
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_FATAL,
+ QDF_TRACE_LEVEL_ERROR,
"MPDU head allocation failed !!!");
goto free_ppdu_desc_mpdu_q;
}
- dp_tx_update_80211_hdr(pdev, peer,
- ppdu_desc, mpdu_nbuf,
- ether_type, eh->ether_shost);
+ if (((ppdu_desc->frame_ctrl & IEEE80211_FC1_DIR_MASK) &&
+ (IEEE80211_FC1_DIR_TODS |
+ IEEE80211_FC1_DIR_FROMDS))) {
+ dp_tx_update_80211_wds_hdr(pdev, peer,
+ ppdu_desc, mpdu_nbuf,
+ ether_type,
+ eh->ether_shost,
+ usr_idx);
+ } else {
+ dp_tx_update_80211_hdr(pdev, peer,
+ ppdu_desc, mpdu_nbuf,
+ ether_type,
+ eh->ether_shost,
+ usr_idx);
+ }
/*
* first nbuf will hold list of msdu
@@ -1462,7 +1980,7 @@
if (!curr_nbuf) {
/* msdu missed in list */
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_FATAL,
+ QDF_TRACE_LEVEL_ERROR,
"!!!! WAITING for msdu but list empty !!!!");
/* for incomplete list, free up the queue */
@@ -1519,7 +2037,6 @@
struct dp_tx_tid *tx_tid = NULL;
uint32_t msdu_ppdu_id;
qdf_nbuf_t curr_msdu = NULL;
- qdf_nbuf_t prev_msdu = NULL;
struct msdu_completion_info *ptr_msdu_info = NULL;
uint32_t wbm_tsf;
uint32_t matched = 0;
@@ -1540,14 +2057,21 @@
return 0;
/* lock here */
- qdf_spin_lock_bh(&tx_tid->tid_lock);
+ qdf_spin_lock_bh(&tx_tid->tasklet_tid_lock);
+ qdf_nbuf_queue_append(&tx_tid->defer_msdu_q, &tx_tid->msdu_comp_q);
+ qdf_nbuf_queue_init(&tx_tid->msdu_comp_q);
+ /* unlock here */
+ qdf_spin_unlock_bh(&tx_tid->tasklet_tid_lock);
- if (qdf_nbuf_is_queue_empty(&tx_tid->msdu_comp_q)) {
- qdf_spin_unlock_bh(&tx_tid->tid_lock);
+ /* lock here */
+ qdf_spin_lock(&tx_tid->tid_lock);
+
+ if (qdf_nbuf_is_queue_empty(&tx_tid->defer_msdu_q)) {
+ qdf_spin_unlock(&tx_tid->tid_lock);
return 0;
}
- curr_msdu = qdf_nbuf_queue_first(&tx_tid->msdu_comp_q);
+ curr_msdu = qdf_nbuf_queue_first(&tx_tid->defer_msdu_q);
while (curr_msdu) {
if (qdf_nbuf_queue_len(head) == num_msdu) {
@@ -1565,11 +2089,11 @@
if ((ptr_msdu_info->status == HAL_TX_TQM_RR_REM_CMD_TX) ||
(ptr_msdu_info->status == HAL_TX_TQM_RR_REM_CMD_AGED)) {
/* Frames removed due to excessive retries */
- qdf_nbuf_queue_remove(&tx_tid->msdu_comp_q);
+ qdf_nbuf_queue_remove(&tx_tid->defer_msdu_q);
qdf_nbuf_queue_add(head_xretries, curr_msdu);
+ dp_tx_cap_stats_msdu_update(peer, PEER_MSDU_XRETRY, 1);
curr_msdu = qdf_nbuf_queue_first(
- &tx_tid->msdu_comp_q);
- prev_msdu = NULL;
+ &tx_tid->defer_msdu_q);
continue;
}
@@ -1583,55 +2107,97 @@
if (wbm_tsf && (wbm_tsf < start_tsf)) {
/* remove the aged packet */
- qdf_nbuf_queue_remove(&tx_tid->msdu_comp_q);
+ qdf_nbuf_queue_remove(&tx_tid->defer_msdu_q);
qdf_nbuf_free(curr_msdu);
+ dp_tx_cap_stats_msdu_update(peer, PEER_MSDU_DROP, 1);
curr_msdu = qdf_nbuf_queue_first(
- &tx_tid->msdu_comp_q);
- prev_msdu = NULL;
+ &tx_tid->defer_msdu_q);
continue;
}
+
if (msdu_ppdu_id == ppdu_id) {
- if (qdf_likely(!prev_msdu)) {
- /* remove head */
- qdf_nbuf_queue_remove(&tx_tid->msdu_comp_q);
+ /* remove head */
+ qdf_nbuf_queue_remove(&tx_tid->defer_msdu_q);
- /* add msdu to head queue */
- qdf_nbuf_queue_add(head, curr_msdu);
- /* get next msdu from msdu_comp_q */
- curr_msdu = qdf_nbuf_queue_first(
- &tx_tid->msdu_comp_q);
- continue;
- } else {
- /* update prev_msdu next to current msdu next */
- prev_msdu->next = curr_msdu->next;
- /* set current msdu next as NULL */
- curr_msdu->next = NULL;
- /* decrement length */
- ((qdf_nbuf_queue_t *)(
- &tx_tid->msdu_comp_q))->qlen--;
-
- /* add msdu to head queue */
- qdf_nbuf_queue_add(head, curr_msdu);
- /* set previous msdu to current msdu */
- curr_msdu = prev_msdu->next;
- continue;
- }
+ /* add msdu to head queue */
+ qdf_nbuf_queue_add(head, curr_msdu);
+ dp_tx_cap_stats_msdu_update(peer, PEER_MSDU_DEQ,
+ 1);
+ /* get next msdu from defer_msdu_q */
+ curr_msdu = qdf_nbuf_queue_first(&tx_tid->defer_msdu_q);
+ continue;
+ } else {
+ /*
+ * at this point wbm_tsf is inbetween start_tsf and
+ * end tsf but there is a mismatch in ppdu_id
+ */
+ break;
}
- prev_msdu = curr_msdu;
- curr_msdu = prev_msdu->next;
}
- qdf_spin_unlock_bh(&tx_tid->tid_lock);
+ qdf_spin_unlock(&tx_tid->tid_lock);
return matched;
}
/**
+ * dp_tx_cap_nbuf_list_get_ref() - get nbuf_list reference
+ * @ptr_nbuf_list: dp_tx_cap_nbuf_list list
+ *
+ * Return: reference count
+ */
+static inline uint8_t
+dp_tx_cap_nbuf_list_get_ref(struct dp_tx_cap_nbuf_list *ptr_nbuf_list)
+{
+ return ptr_nbuf_list->ref_cnt;
+}
+
+/**
+ * dp_tx_cap_nbuf_list_dec_ref() - dec nbuf_list reference
+ * @ptr_nbuf_list: dp_tx_cap_nbuf_list list
+ *
+ * Return: none
+ */
+static inline
+void dp_tx_cap_nbuf_list_dec_ref(struct dp_tx_cap_nbuf_list *ptr_nbuf_list)
+{
+ ptr_nbuf_list->ref_cnt--;
+ if (!ptr_nbuf_list->ref_cnt)
+ ptr_nbuf_list->nbuf_ppdu = NULL;
+}
+
+/**
+ * dp_tx_cap_nbuf_list_inc_ref() - inc nbuf_list reference
+ * @ptr_nbuf_list: dp_tx_cap_nbuf_list list
+ *
+ * Return: none
+ */
+static inline
+void dp_tx_cap_nbuf_list_inc_ref(struct dp_tx_cap_nbuf_list *ptr_nbuf_list)
+{
+ ptr_nbuf_list->ref_cnt++;
+}
+
+/**
+ * dp_tx_cap_nbuf_list_update_ref() - update nbuf_list reference
+ * @ptr_nbuf_list: dp_tx_cap_nbuf_list list
+ * @ref_cnt: reference count
+ *
+ * Return: none
+ */
+static inline void
+dp_tx_cap_nbuf_list_update_ref(struct dp_tx_cap_nbuf_list *ptr_nbuf_list,
+ uint8_t ref_cnt)
+{
+ ptr_nbuf_list->ref_cnt = ref_cnt;
+}
+
+/**
* get_mpdu_clone_from_next_ppdu(): Function to clone missing mpdu from
* next ppdu
- * @nbuf_ppdu_desc_list: nbuf list
+ * @nbuf_ppdu_list: nbuf list
* @ppdu_desc_cnt: ppdu_desc_cnt
* @missed_seq_no:
* @ppdu_id: ppdu_id
@@ -1639,29 +2205,40 @@
*
* return: void
*/
-static
-qdf_nbuf_t get_mpdu_clone_from_next_ppdu(qdf_nbuf_t nbuf_ppdu_desc_list[],
- uint32_t ppdu_desc_cnt,
- uint16_t missed_seq_no,
- uint16_t peer_id, uint32_t ppdu_id)
+static qdf_nbuf_t
+get_mpdu_clone_from_next_ppdu(struct dp_tx_cap_nbuf_list nbuf_list[],
+ uint32_t ppdu_desc_cnt,
+ uint16_t missed_seq_no,
+ uint16_t peer_id, uint32_t ppdu_id,
+ uint8_t usr_idx)
{
+ struct cdp_tx_completion_ppdu *ppdu_desc = NULL;
+ struct cdp_tx_completion_ppdu_user *user;
+ qdf_nbuf_t mpdu = NULL;
+ struct dp_tx_cap_nbuf_list *ptr_nbuf_list;
+ qdf_nbuf_t nbuf_ppdu;
uint32_t i = 0;
uint32_t found = 0;
uint32_t seq_no = 0;
- struct cdp_tx_completion_ppdu *ppdu_desc = NULL;
- qdf_nbuf_t mpdu = NULL;
+ uint32_t mpdu_q_len;
for (i = 1; i < ppdu_desc_cnt; i++) {
+ ptr_nbuf_list = &nbuf_list[i];
+ nbuf_ppdu = ptr_nbuf_list->nbuf_ppdu;
ppdu_desc = (struct cdp_tx_completion_ppdu *)
- qdf_nbuf_data(nbuf_ppdu_desc_list[i]);
+ qdf_nbuf_data(nbuf_ppdu);
+ user = &ppdu_desc->user[usr_idx];
+
+ if (user->skip == 1)
+ continue;
/* check if seq number is between the range */
- if ((peer_id == ppdu_desc->user[0].peer_id) &&
- ((missed_seq_no >= ppdu_desc->user[0].start_seq) &&
- (missed_seq_no <= ppdu_desc->user[0].last_enq_seq))) {
- seq_no = ppdu_desc->user[0].start_seq;
- if (SEQ_BIT(ppdu_desc->user[0].failed_bitmap,
- (missed_seq_no - seq_no))) {
+ if ((peer_id == user->peer_id) &&
+ ((missed_seq_no >= user->start_seq) &&
+ (missed_seq_no <= user->last_enq_seq))) {
+ seq_no = user->start_seq;
+ if (SEQ_BIT(user->failed_bitmap,
+ (missed_seq_no - seq_no))) {
found = 1;
break;
}
@@ -1671,18 +2248,20 @@
if (found == 0) {
/* mpdu not found in sched cmd id */
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_DEBUG,
- "%s: missed seq_no[%d] ppdu_id[%d] [%d] not found!!!",
- __func__, missed_seq_no, ppdu_id, ppdu_desc_cnt);
+ "%s: peer_id[%d] missed seq_no[%d] ppdu_id[%d] [%d] not found!!!",
+ __func__, peer_id,
+ missed_seq_no, ppdu_id, ppdu_desc_cnt);
return NULL;
}
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_DEBUG,
- "%s: seq_no[%d] missed ppdu_id[%d] m[%d] found in ppdu_id[%d]!!",
- __func__,
+ "%s: peer_id[%d] seq_no[%d] missed ppdu_id[%d] m[%d] found in ppdu_id[%d]!!",
+ __func__, peer_id,
missed_seq_no, ppdu_id,
(missed_seq_no - seq_no), ppdu_desc->ppdu_id);
- mpdu = qdf_nbuf_queue_first(&ppdu_desc->mpdu_q);
+ mpdu = qdf_nbuf_queue_first(&ppdu_desc->user[usr_idx].mpdu_q);
+ mpdu_q_len = qdf_nbuf_queue_len(&ppdu_desc->user[usr_idx].mpdu_q);
if (!mpdu) {
/* bitmap shows it found sequence number, but
* MPDU not found in PPDU
@@ -1690,6 +2269,9 @@
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE, QDF_TRACE_LEVEL_ERROR,
"%s: missed seq_no[%d] ppdu_id[%d] [%d] found but queue empty!!!",
__func__, missed_seq_no, ppdu_id, ppdu_desc_cnt);
+ if (mpdu_q_len)
+ qdf_assert_always(0);
+
return NULL;
}
@@ -1706,6 +2288,9 @@
}
}
+ if (!mpdu)
+ return NULL;
+
return qdf_nbuf_copy_expand_fraglist(mpdu, MAX_MONITOR_HEADER, 0);
}
@@ -1785,7 +2370,6 @@
IEEE80211_FC0_TYPE_CTL);
break;
case HTT_STATS_FTYPE_SGEN_BRP:
- case HTT_STATS_FTYPE_SGEN_MU_BRP:
ppdu_desc->frame_ctrl = (IEEE80211_FC0_SUBTYPE_BRPOLL |
IEEE80211_FC0_TYPE_CTL);
break;
@@ -1803,11 +2387,12 @@
IEEE80211_FC0_TYPE_CTL);
break;
case HTT_STATS_FTYPE_SGEN_MU_TRIG:
+ case HTT_STATS_FTYPE_SGEN_MU_BAR:
+ case HTT_STATS_FTYPE_SGEN_MU_BRP:
ppdu_desc->frame_ctrl = (IEEE80211_FC0_SUBTYPE_TRIGGER |
IEEE80211_FC0_TYPE_CTL);
break;
case HTT_STATS_FTYPE_SGEN_BAR:
- case HTT_STATS_FTYPE_SGEN_MU_BAR:
ppdu_desc->frame_ctrl = (IEEE80211_FC0_SUBTYPE_BAR |
IEEE80211_FC0_TYPE_CTL);
break;
@@ -1819,17 +2404,18 @@
* to upper layer if complete
* @pdev: DP pdev handle
* @desc: cdp tx completion ppdu desc
+ * @usr_idx: user index
*
* return: status
*/
static inline
QDF_STATUS dp_send_dummy_mpdu_info_to_stack(struct dp_pdev *pdev,
- void *desc)
+ void *desc, uint8_t usr_idx)
{
struct dp_peer *peer;
struct dp_vdev *vdev = NULL;
struct cdp_tx_completion_ppdu *ppdu_desc = desc;
- struct cdp_tx_completion_ppdu_user *user = &ppdu_desc->user[0];
+ struct cdp_tx_completion_ppdu_user *user = &ppdu_desc->user[usr_idx];
struct ieee80211_ctlframe_addr2 *wh_min;
uint16_t frame_ctrl_le, duration_le;
struct cdp_tx_indication_info tx_capture_info;
@@ -1858,7 +2444,7 @@
/* update cdp_tx_indication_mpdu_info */
dp_tx_update_user_mpdu_info(ppdu_desc->bar_ppdu_id,
&tx_capture_info.mpdu_info,
- &ppdu_desc->user[0]);
+ user);
tx_capture_info.ppdu_desc = ppdu_desc;
mpdu_info->ppdu_id = ppdu_desc->ppdu_id;
@@ -1958,7 +2544,8 @@
*/
static
void dp_send_dummy_rts_cts_frame(struct dp_pdev *pdev,
- struct cdp_tx_completion_ppdu *cur_ppdu_desc)
+ struct cdp_tx_completion_ppdu *cur_ppdu_desc,
+ uint8_t usr_idx)
{
struct cdp_tx_completion_ppdu *ppdu_desc;
struct dp_pdev_tx_capture *ptr_tx_cap;
@@ -1999,7 +2586,7 @@
&cur_ppdu_desc->user[0].mac_addr,
QDF_MAC_ADDR_SIZE);
- dp_send_dummy_mpdu_info_to_stack(pdev, ppdu_desc);
+ dp_send_dummy_mpdu_info_to_stack(pdev, ppdu_desc, usr_idx);
}
if ((rts_send && cur_ppdu_desc->rts_success) ||
@@ -2035,7 +2622,7 @@
qdf_mem_copy(&ppdu_desc->user[0].mac_addr,
vdev->mac_addr.raw, QDF_MAC_ADDR_SIZE);
- dp_send_dummy_mpdu_info_to_stack(pdev, ppdu_desc);
+ dp_send_dummy_mpdu_info_to_stack(pdev, ppdu_desc, usr_idx);
}
}
@@ -2077,27 +2664,43 @@
dp_peer_unref_del_find_by_id(peer);
}
- dp_send_dummy_mpdu_info_to_stack(pdev, ppdu_desc);
+ dp_send_dummy_mpdu_info_to_stack(pdev, ppdu_desc, 0);
}
/**
* dp_send_data_to_stack(): Function to deliver mpdu info to stack
* to upper layer
* @pdev: DP pdev handle
- * @nbuf_ppdu_desc_list: ppdu_desc_list per sched cmd id
+ * @nbuf_ppdu_list: ppdu_desc_list per sched cmd id
* @ppdu_desc_cnt: number of ppdu_desc_cnt
*
* return: status
*/
static
void dp_send_data_to_stack(struct dp_pdev *pdev,
- struct cdp_tx_completion_ppdu *ppdu_desc)
+ struct cdp_tx_completion_ppdu *ppdu_desc,
+ uint8_t usr_idx)
{
+ struct cdp_tx_completion_ppdu_user *user = NULL;
struct cdp_tx_indication_info tx_capture_info;
struct cdp_tx_indication_mpdu_info *mpdu_info;
int i;
uint32_t seq_no, start_seq;
- uint32_t ppdu_id = ppdu_desc->ppdu_id;
+ uint32_t ppdu_id;
+ uint32_t mpdu_tried;
+ uint32_t mpdu_enq = 0;
+ struct dp_peer *peer;
+
+ if (!ppdu_desc)
+ return;
+
+ ppdu_id = ppdu_desc->ppdu_id;
+ user = &ppdu_desc->user[usr_idx];
+
+ peer = dp_tx_cap_peer_find_by_id(pdev->soc, user->peer_id);
+ if (!peer) {
+ return;
+ }
qdf_mem_set(&tx_capture_info,
sizeof(struct cdp_tx_indication_info),
@@ -2105,6 +2708,7 @@
mpdu_info = &tx_capture_info.mpdu_info;
+ mpdu_info->usr_idx = usr_idx;
mpdu_info->channel = ppdu_desc->channel;
mpdu_info->frame_type = ppdu_desc->frame_type;
mpdu_info->ppdu_start_timestamp =
@@ -2122,26 +2726,42 @@
/* update cdp_tx_indication_mpdu_info */
dp_tx_update_user_mpdu_info(ppdu_id,
&tx_capture_info.mpdu_info,
- &ppdu_desc->user[0]);
+ user);
tx_capture_info.ppdu_desc = ppdu_desc;
tx_capture_info.mpdu_info.channel_num = pdev->operating_channel.num;
if (ppdu_desc->mprot_type)
- dp_send_dummy_rts_cts_frame(pdev, ppdu_desc);
+ dp_send_dummy_rts_cts_frame(pdev, ppdu_desc, usr_idx);
- start_seq = ppdu_desc->user[0].start_seq;
- for (i = 0; i < ppdu_desc->user[0].ba_size; i++) {
- if (qdf_likely(ppdu_desc->user[0].tid !=
- DP_NON_QOS_TID) &&
- !(SEQ_BIT(ppdu_desc->user[0].enq_bitmap, i))) {
+ start_seq = user->start_seq;
+
+ if (!user->mpdus)
+ goto return_send_to_stack;
+
+ mpdu_tried = user->mpdu_tried_ucast + user->mpdu_tried_mcast;
+
+ for (i = 0; i < CDP_BA_256_BIT_MAP_SIZE_DWORDS; i++)
+ mpdu_enq += get_number_of_1s(user->enq_bitmap[i]);
+
+ if (mpdu_tried > mpdu_enq)
+ dp_ppdu_desc_debug_print(ppdu_desc, usr_idx,
+ __func__, __LINE__);
+
+ for (i = 0; i < user->ba_size && mpdu_tried; i++) {
+ if (qdf_likely(user->tid != DP_NON_QOS_TID) &&
+ !(SEQ_BIT(user->enq_bitmap, i))) {
continue;
}
+
+ mpdu_tried--;
+
seq_no = start_seq + i;
- if (!ppdu_desc->mpdus[i])
+ if (!user->mpdus[i])
continue;
- tx_capture_info.mpdu_nbuf = ppdu_desc->mpdus[i];
- ppdu_desc->mpdus[i] = NULL;
+ tx_capture_info.mpdu_nbuf = user->mpdus[i];
+ dp_tx_cap_stats_mpdu_update(peer, PEER_MPDU_TO_STACK, 1);
+ user->mpdus[i] = NULL;
mpdu_info->seq_no = seq_no;
dp_tx_update_sequence_number(tx_capture_info.mpdu_nbuf, seq_no);
/*
@@ -2159,50 +2779,111 @@
}
if (ppdu_desc->resp_type == HTT_PPDU_STATS_ACK_EXPECTED_E &&
- ppdu_desc->user[0].completion_status ==
+ ppdu_desc->user[usr_idx].completion_status ==
HTT_PPDU_STATS_USER_STATUS_OK)
dp_gen_ack_rx_frame(pdev, &tx_capture_info);
+
+return_send_to_stack:
+ dp_tx_cap_peer_unref_del(peer);
+ return;
}
-static qdf_nbuf_t dp_tx_mon_get_next_mpdu(
- struct cdp_tx_completion_ppdu *xretry_ppdu,
- qdf_nbuf_t mpdu_nbuf)
+/**
+ * dp_ppdu_desc_free(): Function to free ppdu_desc and stored queue
+ * @ptr_nbuf_list: pointer to ptr_nbuf_list
+ * @usr_idx: user index
+ *
+ * return: void
+ */
+static void dp_ppdu_desc_free(struct dp_tx_cap_nbuf_list *ptr_nbuf_list,
+ uint8_t usr_idx)
+{
+ struct cdp_tx_completion_ppdu *ppdu_desc = NULL;
+ struct cdp_tx_completion_ppdu_user *user = NULL;
+ qdf_nbuf_t tmp_nbuf;
+
+ if (!ptr_nbuf_list->nbuf_ppdu ||
+ !dp_tx_cap_nbuf_list_get_ref(ptr_nbuf_list))
+ return;
+
+ tmp_nbuf = ptr_nbuf_list->nbuf_ppdu;
+
+ if (tmp_nbuf) {
+ ppdu_desc = (struct cdp_tx_completion_ppdu *)
+ qdf_nbuf_data(tmp_nbuf);
+ user = &ppdu_desc->user[usr_idx];
+
+ dp_ppdu_queue_free(tmp_nbuf, usr_idx);
+ dp_tx_cap_nbuf_list_dec_ref(ptr_nbuf_list);
+ qdf_nbuf_free(tmp_nbuf);
+ }
+}
+
+/**
+ * dp_ppdu_desc_free_all(): Function to free all user in a ppdu_desc and
+ * its stored queue
+ * @ptr_nbuf_list: pointer to ptr_nbuf_list
+ * @max_users: maximum number of users
+ *
+ * return: void
+ */
+static void dp_ppdu_desc_free_all(struct dp_tx_cap_nbuf_list *ptr_nbuf_list,
+ uint8_t max_users)
+{
+ uint8_t i = 0;
+
+ for (i = 0; i < max_users; i++)
+ dp_ppdu_desc_free(ptr_nbuf_list, i);
+}
+
+/**
+ * dp_tx_mon_get_next_mpdu(): get next mpdu from retry queue.
+ * @xretry_user: pointer to ppdu_desc user.
+ * @mpdu_nbuf: mpdu nbuf
+ *
+ * return: qdf_nbuf_t
+ */
+static qdf_nbuf_t
+dp_tx_mon_get_next_mpdu(struct cdp_tx_completion_ppdu_user *xretry_user,
+ qdf_nbuf_t mpdu_nbuf)
{
qdf_nbuf_t next_nbuf = NULL;
qdf_nbuf_queue_t temp_xretries;
- if (mpdu_nbuf != qdf_nbuf_queue_first(&xretry_ppdu->mpdu_q)) {
+ if (mpdu_nbuf != qdf_nbuf_queue_first(&xretry_user->mpdu_q)) {
+ qdf_err(" mpdu_nbuf is not the head");
next_nbuf = qdf_nbuf_queue_next(mpdu_nbuf);
/* Initialize temp list */
qdf_nbuf_queue_init(&temp_xretries);
/* Move entries into temp list till the mpdu_nbuf is found */
- while ((qdf_nbuf_queue_first(&xretry_ppdu->mpdu_q)) &&
+ while ((qdf_nbuf_queue_first(&xretry_user->mpdu_q)) &&
(mpdu_nbuf !=
- qdf_nbuf_queue_first(&xretry_ppdu->mpdu_q))) {
+ qdf_nbuf_queue_first(&xretry_user->mpdu_q))) {
qdf_nbuf_queue_add(&temp_xretries,
- qdf_nbuf_queue_remove(&xretry_ppdu->mpdu_q));
+ qdf_nbuf_queue_remove(&xretry_user->mpdu_q));
}
- if ((qdf_nbuf_queue_first(&xretry_ppdu->mpdu_q)) &&
- (mpdu_nbuf == qdf_nbuf_queue_first(&xretry_ppdu->mpdu_q))) {
+ if ((qdf_nbuf_queue_first(&xretry_user->mpdu_q)) &&
+ (mpdu_nbuf == qdf_nbuf_queue_first(&xretry_user->mpdu_q))) {
/* Remove mpdu_nbuf from queue */
- qdf_nbuf_queue_remove(&xretry_ppdu->mpdu_q);
+ qdf_nbuf_queue_remove(&xretry_user->mpdu_q);
/* Add remaining nbufs into temp queue */
qdf_nbuf_queue_append(&temp_xretries,
- &xretry_ppdu->mpdu_q);
- /* Reinit xretry_ppdu->mpdu_q */
- qdf_nbuf_queue_init(&xretry_ppdu->mpdu_q);
+ &xretry_user->mpdu_q);
+ /* Reinit xretry_user->mpdu_q */
+ qdf_nbuf_queue_init(&xretry_user->mpdu_q);
/* append all the entries into original queue */
- qdf_nbuf_queue_append(&xretry_ppdu->mpdu_q,
+ qdf_nbuf_queue_append(&xretry_user->mpdu_q,
&temp_xretries);
} else {
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
QDF_TRACE_LEVEL_FATAL,
"%s: This is buggy scenario, did not find nbuf in queue ",
__func__);
+ qdf_assert_always(0);
}
} else {
- qdf_nbuf_queue_remove(&xretry_ppdu->mpdu_q);
- next_nbuf = qdf_nbuf_queue_first(&xretry_ppdu->mpdu_q);
+ qdf_nbuf_queue_remove(&xretry_user->mpdu_q);
+ next_nbuf = qdf_nbuf_queue_first(&xretry_user->mpdu_q);
}
return next_nbuf;
@@ -2215,44 +2896,57 @@
struct dp_tx_tid *tx_tid = &peer->tx_capture.tx_tid[tid];
struct cdp_tx_completion_ppdu *ppdu_desc;
struct cdp_tx_completion_ppdu *xretry_ppdu;
+ struct cdp_tx_completion_ppdu_user *user = NULL;
+ struct cdp_tx_completion_ppdu_user *xretry_user = NULL;
qdf_nbuf_t ppdu_nbuf;
qdf_nbuf_t mpdu_nbuf;
uint32_t mpdu_tried = 0;
int i;
uint32_t seq_no;
+ uint8_t usr_idx = 0;
xretry_ppdu = &tx_tid->xretry_ppdu;
+ xretry_user = &xretry_ppdu->user[0];
if (qdf_nbuf_is_queue_empty(&tx_tid->pending_ppdu_q)) {
- qdf_nbuf_queue_free(&xretry_ppdu->mpdu_q);
+ qdf_nbuf_queue_free(&xretry_user->mpdu_q);
return;
}
- if (qdf_nbuf_is_queue_empty(&xretry_ppdu->mpdu_q))
+ if (qdf_nbuf_is_queue_empty(&xretry_user->mpdu_q))
return;
ppdu_nbuf = qdf_nbuf_queue_first(&tx_tid->pending_ppdu_q);
+
while (ppdu_nbuf) {
struct msdu_completion_info *ptr_msdu_info = NULL;
ppdu_desc = (struct cdp_tx_completion_ppdu *)
qdf_nbuf_data(ppdu_nbuf);
- if (ppdu_desc->pending_retries) {
- uint32_t start_seq = ppdu_desc->user[0].start_seq;
- mpdu_tried = ppdu_desc->user[0].mpdu_tried_ucast +
- ppdu_desc->user[0].mpdu_tried_mcast;
- mpdu_nbuf = qdf_nbuf_queue_first(&xretry_ppdu->mpdu_q);
- for (i = 0; (i < ppdu_desc->user[0].ba_size) &&
- (mpdu_tried > 0) && (mpdu_nbuf); i++) {
- if (!(SEQ_BIT(ppdu_desc->user[0].enq_bitmap,
- i)))
+ usr_idx = dp_tx_find_usr_idx_from_peer_id(ppdu_desc,
+ peer->peer_ids[0]);
+
+ user = &ppdu_desc->user[usr_idx];
+
+ if (user->pending_retries) {
+ uint32_t start_seq = user->start_seq;
+
+ mpdu_tried = user->mpdu_tried_ucast +
+ user->mpdu_tried_mcast;
+ mpdu_nbuf = qdf_nbuf_queue_first(&xretry_user->mpdu_q);
+
+ for (i = 0;
+ (i < user->ba_size) &&
+ (mpdu_tried > 0) && mpdu_nbuf;
+ i++) {
+ if (!(SEQ_BIT(user->enq_bitmap, i)))
continue;
mpdu_tried--;
/* missed seq number */
seq_no = start_seq + i;
- if (SEQ_BIT(ppdu_desc->user[0].failed_bitmap, i))
+ if (SEQ_BIT(user->failed_bitmap, i))
continue;
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
QDF_TRACE_LEVEL_INFO,
@@ -2265,38 +2959,40 @@
(sizeof(struct msdu_completion_info) +
sizeof(qdf_ether_header_t)));
ptr_msdu_info->transmit_cnt--;
- SEQ_SEG(ppdu_desc->user[0].failed_bitmap, i) |=
- SEQ_SEG_MSK(ppdu_desc->user[0].failed_bitmap[0],
- i);
- ppdu_desc->pending_retries--;
+ SEQ_SEG(user->failed_bitmap, i) |=
+ SEQ_SEG_MSK(user->failed_bitmap[0], i);
+ user->pending_retries--;
if (ptr_msdu_info->transmit_cnt == 0) {
- ppdu_desc->mpdus[seq_no - start_seq] =
- mpdu_nbuf;
+ user->mpdus[seq_no - start_seq] =
+ mpdu_nbuf;
+ dp_tx_cap_stats_mpdu_update(peer,
+ PEER_MPDU_ARR, 1);
/*
- * This API removes mpdu_nbuf from q and
- * returns next mpdu from the queue
+ * This API removes mpdu_nbuf from q
+ * and returns next mpdu from the queue
*/
mpdu_nbuf = dp_tx_mon_get_next_mpdu(
- xretry_ppdu, mpdu_nbuf);
+ xretry_user, mpdu_nbuf);
} else {
- ppdu_desc->mpdus[seq_no - start_seq] =
+ user->mpdus[seq_no - start_seq] =
qdf_nbuf_copy_expand_fraglist(
mpdu_nbuf,
MAX_MONITOR_HEADER, 0);
+ dp_tx_cap_stats_mpdu_update(peer,
+ PEER_MPDU_CLONE, 1);
mpdu_nbuf =
qdf_nbuf_queue_next(mpdu_nbuf);
}
}
}
- if ((ppdu_desc->pending_retries == 0) && (ppdu_nbuf ==
- qdf_nbuf_queue_first(&tx_tid->pending_ppdu_q))) {
+ if ((user->pending_retries == 0) &&
+ (ppdu_nbuf ==
+ qdf_nbuf_queue_first(&tx_tid->pending_ppdu_q))) {
qdf_nbuf_queue_remove(&tx_tid->pending_ppdu_q);
/* Deliver PPDU */
- dp_send_data_to_stack(pdev, ppdu_desc);
- qdf_nbuf_queue_free(&ppdu_desc->mpdu_q);
- qdf_mem_free(ppdu_desc->mpdus);
- ppdu_desc->mpdus = NULL;
+ dp_send_data_to_stack(pdev, ppdu_desc, usr_idx);
+ dp_ppdu_queue_free(ppdu_nbuf, usr_idx);
qdf_nbuf_free(ppdu_nbuf);
ppdu_nbuf = qdf_nbuf_queue_first(
&tx_tid->pending_ppdu_q);
@@ -2304,205 +3000,360 @@
ppdu_nbuf = qdf_nbuf_queue_next(ppdu_nbuf);
}
}
- qdf_nbuf_queue_free(&xretry_ppdu->mpdu_q);
+ qdf_nbuf_queue_free(&xretry_user->mpdu_q);
+}
+
+static
+struct cdp_tx_completion_ppdu *
+check_subseq_ppdu_to_pending_q(struct dp_tx_cap_nbuf_list nbuf_ppdu_list[],
+ uint32_t ppdu_desc_cnt,
+ uint32_t *ppdu_cnt,
+ qdf_nbuf_queue_t *head_ppdu,
+ uint32_t peer_id, uint32_t cur_last_seq,
+ bool last_pend_ppdu)
+{
+ struct cdp_tx_completion_ppdu *next_ppdu = NULL;
+ struct cdp_tx_completion_ppdu_user *next_user;
+ struct dp_tx_cap_nbuf_list *ptr_nbuf_list = NULL;
+ uint8_t cur_usr_idx;
+
+ while (*ppdu_cnt < (ppdu_desc_cnt - 1)) {
+ (*ppdu_cnt)++;
+ ptr_nbuf_list = &nbuf_ppdu_list[*ppdu_cnt];
+
+ if (!ptr_nbuf_list->nbuf_ppdu ||
+ !dp_tx_cap_nbuf_list_get_ref(ptr_nbuf_list))
+ continue;
+
+ next_ppdu = (struct cdp_tx_completion_ppdu *)
+ qdf_nbuf_data(ptr_nbuf_list->nbuf_ppdu);
+
+ if (!next_ppdu)
+ continue;
+
+ cur_usr_idx = dp_tx_find_usr_idx_from_peer_id(next_ppdu,
+ peer_id);
+ next_user = &next_ppdu->user[cur_usr_idx];
+
+ if ((next_user->skip == 1) || (peer_id != next_user->peer_id))
+ continue;
+
+ if (last_pend_ppdu) {
+ qdf_nbuf_t tmp_pend_nbuf;
+ uint32_t ppdu_ref_cnt;
+
+ /*
+ * get reference count if it
+ * more than one do clone and
+ * add that to head_ppdu
+ */
+ ppdu_ref_cnt =
+ dp_tx_cap_nbuf_list_get_ref(ptr_nbuf_list);
+
+ if (ppdu_ref_cnt == 1) {
+ tmp_pend_nbuf = ptr_nbuf_list->nbuf_ppdu;
+ } else {
+ tmp_pend_nbuf = qdf_nbuf_clone(
+ ptr_nbuf_list->nbuf_ppdu);
+ if (qdf_unlikely(!tmp_pend_nbuf)) {
+ qdf_assert_always(0);
+ continue;
+ }
+ qdf_nbuf_free(ptr_nbuf_list->nbuf_ppdu);
+ }
+
+ qdf_nbuf_queue_add(head_ppdu, tmp_pend_nbuf);
+
+ /* decrement reference */
+ dp_tx_cap_nbuf_list_dec_ref(ptr_nbuf_list);
+ }
+
+ if (next_user->last_enq_seq > cur_last_seq)
+ return next_ppdu;
+ }
+ return NULL;
}
#define MAX_PENDING_PPDUS 32
static void
dp_tx_mon_proc_pending_ppdus(struct dp_pdev *pdev, struct dp_tx_tid *tx_tid,
- qdf_nbuf_t nbuf_ppdu_desc_list[], uint32_t
- ppdu_desc_cnt, qdf_nbuf_queue_t *head_ppdu,
- uint32_t peer_id)
+ struct dp_tx_cap_nbuf_list nbuf_ppdu_list[],
+ uint32_t ppdu_desc_cnt, qdf_nbuf_queue_t *head_ppdu,
+ uint32_t peer_id, uint8_t cur_usr_idx)
{
struct cdp_tx_completion_ppdu *ppdu_desc = NULL;
struct cdp_tx_completion_ppdu *cur_ppdu_desc = NULL;
+ struct cdp_tx_completion_ppdu_user *user = NULL;
+ struct cdp_tx_completion_ppdu_user *cur_user = NULL;
+ struct dp_tx_cap_nbuf_list *ptr_nbuf_list = NULL;
qdf_nbuf_t pend_ppdu;
uint32_t ppdu_cnt;
uint32_t failed_seq;
uint32_t cur_index, cur_start_seq, cur_last_seq;
int i, k;
bool last_pend_ppdu = false;
- qdf_nbuf_t tmp_nbuf;
+ uint8_t usr_idx;
pend_ppdu = qdf_nbuf_queue_first(&tx_tid->pending_ppdu_q);
if (!pend_ppdu) {
for (ppdu_cnt = 0; ppdu_cnt < ppdu_desc_cnt; ppdu_cnt++) {
- if (!nbuf_ppdu_desc_list[ppdu_cnt])
+ ptr_nbuf_list = &nbuf_ppdu_list[ppdu_cnt];
+
+ if (!dp_tx_cap_nbuf_list_get_ref(ptr_nbuf_list)) {
+ if (ptr_nbuf_list->nbuf_ppdu)
+ qdf_assert_always(0);
continue;
+ }
+
ppdu_desc = (struct cdp_tx_completion_ppdu *)
- qdf_nbuf_data(
- nbuf_ppdu_desc_list[ppdu_cnt]);
- if (!ppdu_desc || (peer_id !=
- ppdu_desc->user[0].peer_id) || (tx_tid->tid !=
- ppdu_desc->user[0].tid))
+ qdf_nbuf_data(ptr_nbuf_list->nbuf_ppdu);
+
+ if (!ppdu_desc)
continue;
- if ((ppdu_desc->pending_retries == 0) &&
+
+ user = &ppdu_desc->user[cur_usr_idx];
+
+ if ((user->skip == 1) || (peer_id != user->peer_id) ||
+ (tx_tid->tid != user->tid))
+ continue;
+ if ((user->pending_retries == 0) &&
qdf_nbuf_is_queue_empty(&tx_tid->pending_ppdu_q) &&
qdf_nbuf_is_queue_empty(head_ppdu)) {
- dp_send_data_to_stack(pdev, ppdu_desc);
- qdf_nbuf_queue_free(&ppdu_desc->mpdu_q);
- qdf_mem_free(ppdu_desc->mpdus);
- ppdu_desc->mpdus = NULL;
- tmp_nbuf = nbuf_ppdu_desc_list[ppdu_cnt];
- nbuf_ppdu_desc_list[ppdu_cnt] = NULL;
- qdf_nbuf_free(tmp_nbuf);
+ dp_send_data_to_stack(pdev, ppdu_desc,
+ cur_usr_idx);
+ /* free ppd_desc from list */
+ dp_ppdu_desc_free(ptr_nbuf_list, cur_usr_idx);
} else {
- qdf_nbuf_queue_add(head_ppdu,
- nbuf_ppdu_desc_list[ppdu_cnt]);
- nbuf_ppdu_desc_list[ppdu_cnt] = NULL;
+ qdf_nbuf_t tmp_pend_nbuf;
+ uint32_t ppdu_ref_cnt;
+
+ /*
+ * get reference count if it more than one
+ * do clone and add that to head_ppdu
+ */
+ ppdu_ref_cnt =
+ dp_tx_cap_nbuf_list_get_ref(ptr_nbuf_list);
+ if (ppdu_ref_cnt == 1) {
+ tmp_pend_nbuf =
+ ptr_nbuf_list->nbuf_ppdu;
+ } else {
+ tmp_pend_nbuf =
+ qdf_nbuf_clone(
+ ptr_nbuf_list->nbuf_ppdu);
+ if (qdf_unlikely(!tmp_pend_nbuf)) {
+ qdf_assert_always(0);
+ continue;
+ }
+ /*
+ * free ppdu_desc to
+ * decrease reference
+ */
+ qdf_nbuf_free(ptr_nbuf_list->nbuf_ppdu);
+ }
+
+ qdf_nbuf_queue_add(head_ppdu, tmp_pend_nbuf);
+ /* decrement reference */
+ dp_tx_cap_nbuf_list_dec_ref(ptr_nbuf_list);
}
}
return;
}
while (pend_ppdu) {
qdf_nbuf_t mpdu_nbuf;
+ uint32_t mpdu_tried = 0;
/* Find missing mpdus from current schedule list */
ppdu_cnt = 0;
-
- while (!nbuf_ppdu_desc_list[ppdu_cnt]) {
+ while (ppdu_cnt < ppdu_desc_cnt) {
+ ptr_nbuf_list = &nbuf_ppdu_list[ppdu_cnt];
ppdu_cnt++;
- if (ppdu_cnt < ppdu_desc_cnt)
+ if (!dp_tx_cap_nbuf_list_get_ref(ptr_nbuf_list))
continue;
+
+ cur_ppdu_desc = (struct cdp_tx_completion_ppdu *)
+ qdf_nbuf_data(ptr_nbuf_list->nbuf_ppdu);
+ if (!cur_ppdu_desc)
+ continue;
+
+ cur_usr_idx = dp_tx_find_usr_idx_from_peer_id(
+ cur_ppdu_desc, peer_id);
+
+ cur_user = &cur_ppdu_desc->user[cur_usr_idx];
+
+ if (cur_user->skip == 1)
+ continue;
+ /* to handle last ppdu case we need to decrement */
+ ppdu_cnt--;
break;
}
if (ppdu_cnt == ppdu_desc_cnt)
break;
+ if (qdf_unlikely(!cur_user))
+ break;
+
ppdu_desc = (struct cdp_tx_completion_ppdu *)qdf_nbuf_data(
pend_ppdu);
- cur_ppdu_desc = (struct cdp_tx_completion_ppdu *)qdf_nbuf_data(
- nbuf_ppdu_desc_list[ppdu_cnt]);
+ usr_idx = dp_tx_find_usr_idx_from_peer_id(ppdu_desc,
+ peer_id);
+ user = &ppdu_desc->user[usr_idx];
+
if (pend_ppdu == qdf_nbuf_queue_last(
&tx_tid->pending_ppdu_q)) {
+ qdf_nbuf_t tmp_pend_nbuf;
+ uint32_t ppdu_ref_cnt;
+
last_pend_ppdu = true;
- qdf_nbuf_queue_add(head_ppdu,
- nbuf_ppdu_desc_list[ppdu_cnt]);
- nbuf_ppdu_desc_list[ppdu_cnt] = NULL;
+ /*
+ * get reference count if it more than one
+ * do clone and add that to head_ppdu
+ */
+ ppdu_ref_cnt =
+ dp_tx_cap_nbuf_list_get_ref(ptr_nbuf_list);
+ if (ppdu_ref_cnt == 1) {
+ tmp_pend_nbuf =
+ ptr_nbuf_list->nbuf_ppdu;
+ } else {
+ tmp_pend_nbuf = qdf_nbuf_clone(
+ ptr_nbuf_list->nbuf_ppdu);
+ if (qdf_unlikely(!tmp_pend_nbuf)) {
+ qdf_assert_always(0);
+ break;
+ }
+ qdf_nbuf_free(ptr_nbuf_list->nbuf_ppdu);
+ }
+
+ qdf_nbuf_queue_add(head_ppdu, tmp_pend_nbuf);
+ /* decrement reference */
+ dp_tx_cap_nbuf_list_dec_ref(ptr_nbuf_list);
}
cur_index = 0;
- cur_start_seq = cur_ppdu_desc->user[0].start_seq;
- cur_last_seq = cur_ppdu_desc->user[0].last_enq_seq;
- if (qdf_unlikely(ppdu_desc->user[0].ba_size >
+ cur_start_seq = cur_user->start_seq;
+ cur_last_seq = cur_user->last_enq_seq;
+ if (qdf_unlikely(user->ba_size >
CDP_BA_256_BIT_MAP_SIZE_DWORDS *
- SEQ_SEG_SZ_BITS(ppdu_desc->user[0].failed_bitmap))) {
+ SEQ_SEG_SZ_BITS(user->failed_bitmap))) {
+ dp_ppdu_desc_debug_print(ppdu_desc, usr_idx,
+ __func__, __LINE__);
qdf_assert_always(0);
return;
}
- for (i = 0; (i < ppdu_desc->user[0].ba_size) && cur_ppdu_desc;
- i++) {
- if (!(i & (SEQ_SEG_SZ_BITS(
- ppdu_desc->user[0].failed_bitmap) - 1))) {
- k =
- SEQ_SEG_INDEX(ppdu_desc->user[0].failed_bitmap,
- i);
- failed_seq =
- ppdu_desc->user[0].failed_bitmap[k] ^
- ppdu_desc->user[0].enq_bitmap[k];
+ /* mpdu tried */
+ mpdu_tried = user->mpdu_tried_mcast + user->mpdu_tried_ucast;
+
+ for (i = 0; (i < user->ba_size) && cur_ppdu_desc &&
+ mpdu_tried && cur_index < cur_user->ba_size; i++) {
+ if (!(i & (SEQ_SEG_SZ_BITS(user->failed_bitmap) - 1))) {
+ k = SEQ_SEG_INDEX(user->failed_bitmap, i);
+ failed_seq = user->failed_bitmap[k] ^
+ user->enq_bitmap[k];
}
+ if (SEQ_BIT(user->enq_bitmap, i))
+ mpdu_tried--;
+
/* Skip to next bitmap segment if there are no
* more holes in current segment
*/
if (!failed_seq) {
i = ((k + 1) *
- SEQ_SEG_SZ_BITS(ppdu_desc->user[0].failed_bitmap))
- - 1;
+ SEQ_SEG_SZ_BITS(user->failed_bitmap)) - 1;
continue;
}
if (!(SEQ_SEG_BIT(failed_seq, i)))
continue;
failed_seq ^= SEQ_SEG_MSK(failed_seq, i);
- mpdu_nbuf = cur_ppdu_desc->mpdus[cur_index];
+ if (!cur_user->mpdus) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_INFO,
+ "%s: %d peer_id:%d usr_idx:%d cur_usr_idx:%d cur_usr_peer_id:%d\n",
+ __func__, __LINE__,
+ peer_id, usr_idx,
+ cur_usr_idx, cur_user->peer_id);
+ continue;
+ }
+ mpdu_nbuf = cur_user->mpdus[cur_index];
if (mpdu_nbuf) {
+ struct dp_peer *peer;
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
QDF_TRACE_LEVEL_INFO,
"%s: fill seqno %d (%d) from swretries",
__func__,
- ppdu_desc->user[0].start_seq + i,
+ user->start_seq + i,
ppdu_desc->ppdu_id);
- ppdu_desc->mpdus[i] =
+ user->mpdus[i] =
qdf_nbuf_copy_expand_fraglist(
mpdu_nbuf, MAX_MONITOR_HEADER, 0);
- ppdu_desc->user[0].failed_bitmap[k] |=
- SEQ_SEG_MSK(ppdu_desc->user[0].failed_bitmap[k],
- i);
- ppdu_desc->pending_retries--;
+
+ peer = dp_tx_cap_peer_find_by_id(pdev->soc,
+ user->peer_id);
+ if (peer) {
+ dp_tx_cap_stats_mpdu_update(peer,
+ PEER_MPDU_CLONE, 1);
+ dp_tx_cap_peer_unref_del(peer);
+ }
+ user->failed_bitmap[k] |=
+ SEQ_SEG_MSK(user->failed_bitmap[k], i);
+ user->pending_retries--;
}
cur_index++;
- if (cur_index >= cur_ppdu_desc->user[0].ba_size) {
+ if (cur_index >= cur_user->ba_size) {
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
QDF_TRACE_LEVEL_INFO,
"%s: ba_size[%d] cur_index[%d]\n",
__func__,
- cur_ppdu_desc->user[0].ba_size,
- cur_index);
+ cur_user->ba_size, cur_index);
break;
}
- /* Skip through empty slots in current PPDU */
- while (!(SEQ_BIT(cur_ppdu_desc->user[0].enq_bitmap,
- cur_index))) {
- struct cdp_tx_completion_ppdu *next_ppdu = NULL;
+ /* Skip through empty slots in current PPDU */
+ while (!(SEQ_BIT(cur_user->enq_bitmap, cur_index))) {
cur_index++;
- if (cur_index <= (cur_last_seq -
- cur_start_seq))
+ if (cur_index <= (cur_last_seq - cur_start_seq))
continue;
cur_ppdu_desc = NULL;
- /* Check if subsequent PPDUs in this schedule
+
+ /*
+ * Check if subsequent PPDUs in this schedule
* has higher sequence numbers enqueued
*/
- while (ppdu_cnt < (ppdu_desc_cnt - 1)) {
- ppdu_cnt++;
- if (!nbuf_ppdu_desc_list[ppdu_cnt])
- continue;
- next_ppdu =
- (struct cdp_tx_completion_ppdu *)
- qdf_nbuf_data(
- nbuf_ppdu_desc_list[
- ppdu_cnt]);
- if (!next_ppdu || (peer_id !=
- next_ppdu->user[0].peer_id))
- continue;
- if (last_pend_ppdu) {
- qdf_nbuf_queue_add(head_ppdu,
- nbuf_ppdu_desc_list[ppdu_cnt]);
- nbuf_ppdu_desc_list[ppdu_cnt] =
- NULL;
- }
- if (next_ppdu->user[0].last_enq_seq >
- cur_last_seq) {
- cur_ppdu_desc = next_ppdu;
- break;
- }
- }
+ cur_ppdu_desc = check_subseq_ppdu_to_pending_q(
+ nbuf_ppdu_list,
+ ppdu_desc_cnt,
+ &ppdu_cnt,
+ head_ppdu,
+ peer_id,
+ cur_last_seq,
+ last_pend_ppdu);
if (!cur_ppdu_desc)
break;
+
+ cur_usr_idx = dp_tx_find_usr_idx_from_peer_id(
+ cur_ppdu_desc, peer_id);
+
+ cur_user = &cur_ppdu_desc->user[cur_usr_idx];
+
/* Start from seq. no following cur_last_seq
* since everything before is already populated
* from previous PPDU
*/
- cur_start_seq =
- cur_ppdu_desc->user[0].start_seq;
+ cur_start_seq = cur_user->start_seq;
cur_index = (cur_last_seq >= cur_start_seq) ?
cur_last_seq - cur_start_seq + 1 : 0;
- cur_last_seq =
- cur_ppdu_desc->user[0].last_enq_seq;
+ cur_last_seq = cur_user->last_enq_seq;
}
}
if ((pend_ppdu ==
qdf_nbuf_queue_first(&tx_tid->pending_ppdu_q)) &&
- (ppdu_desc->pending_retries == 0)) {
+ (user->pending_retries == 0)) {
qdf_nbuf_queue_remove(&tx_tid->pending_ppdu_q);
- dp_send_data_to_stack(pdev, ppdu_desc);
- qdf_nbuf_queue_free(&ppdu_desc->mpdu_q);
- qdf_mem_free(ppdu_desc->mpdus);
- ppdu_desc->mpdus = NULL;
+ dp_send_data_to_stack(pdev, ppdu_desc, usr_idx);
+ dp_ppdu_queue_free(pend_ppdu, usr_idx);
qdf_nbuf_free(pend_ppdu);
pend_ppdu = qdf_nbuf_queue_first(
&tx_tid->pending_ppdu_q);
@@ -2520,6 +3371,7 @@
bool is_payload)
{
struct cdp_tx_completion_ppdu *ppdu_desc;
+ struct cdp_tx_completion_ppdu_user *user;
struct cdp_tx_indication_mpdu_info *mpdu_info;
struct ieee80211_frame *wh;
uint16_t duration_le, seq_le;
@@ -2530,9 +3382,10 @@
mpdu_info = &ptr_tx_cap_info->mpdu_info;
ppdu_desc = (struct cdp_tx_completion_ppdu *)
qdf_nbuf_data(nbuf_ppdu_desc);
+ user = &ppdu_desc->user[0];
if (ppdu_desc->mprot_type)
- dp_send_dummy_rts_cts_frame(pdev, ppdu_desc);
+ dp_send_dummy_rts_cts_frame(pdev, ppdu_desc, 0);
type = (ppdu_desc->frame_ctrl &
IEEE80211_FC0_TYPE_MASK) >>
@@ -2540,7 +3393,6 @@
subtype = (ppdu_desc->frame_ctrl &
IEEE80211_FC0_SUBTYPE_MASK) >>
IEEE80211_FC0_SUBTYPE_SHIFT;
-
if (is_payload) {
wh = (struct ieee80211_frame *)qdf_nbuf_data(mgmt_ctl_nbuf);
@@ -2548,7 +3400,7 @@
duration_le = qdf_cpu_to_le16(ppdu_desc->tx_duration);
wh->i_dur[1] = (duration_le & 0xFF00) >> 8;
wh->i_dur[0] = duration_le & 0xFF;
- seq_le = qdf_cpu_to_le16(ppdu_desc->user[0].start_seq <<
+ seq_le = qdf_cpu_to_le16(user->start_seq <<
IEEE80211_SEQ_SEQ_SHIFT);
wh->i_seq[1] = (seq_le & 0xFF00) >> 8;
wh->i_seq[0] = seq_le & 0xFF;
@@ -2601,15 +3453,18 @@
static uint32_t
dp_update_tx_cap_info(struct dp_pdev *pdev,
qdf_nbuf_t nbuf_ppdu_desc,
- void *tx_info, bool is_payload)
+ void *tx_info, bool is_payload,
+ bool bar_frm_with_data)
{
struct cdp_tx_completion_ppdu *ppdu_desc;
+ struct cdp_tx_completion_ppdu_user *user;
struct cdp_tx_indication_info *tx_capture_info =
(struct cdp_tx_indication_info *)tx_info;
struct cdp_tx_indication_mpdu_info *mpdu_info;
ppdu_desc = (struct cdp_tx_completion_ppdu *)
qdf_nbuf_data(nbuf_ppdu_desc);
+ user = &ppdu_desc->user[0];
qdf_mem_set(tx_capture_info, sizeof(struct cdp_tx_indication_info), 0);
mpdu_info = &tx_capture_info->mpdu_info;
@@ -2619,13 +3474,20 @@
mpdu_info->ppdu_start_timestamp = ppdu_desc->ppdu_start_timestamp;
mpdu_info->ppdu_end_timestamp = ppdu_desc->ppdu_end_timestamp;
mpdu_info->tx_duration = ppdu_desc->tx_duration;
- mpdu_info->seq_no = ppdu_desc->user[0].start_seq;
+ if (bar_frm_with_data) {
+ mpdu_info->ppdu_start_timestamp =
+ ppdu_desc->bar_ppdu_start_timestamp;
+ mpdu_info->ppdu_end_timestamp =
+ ppdu_desc->bar_ppdu_end_timestamp;
+ mpdu_info->tx_duration = ppdu_desc->bar_tx_duration;
+ }
+ mpdu_info->seq_no = user->start_seq;
mpdu_info->num_msdu = ppdu_desc->num_msdu;
/* update cdp_tx_indication_mpdu_info */
dp_tx_update_user_mpdu_info(ppdu_desc->ppdu_id,
&tx_capture_info->mpdu_info,
- &ppdu_desc->user[0]);
+ user);
tx_capture_info->ppdu_desc = ppdu_desc;
tx_capture_info->mpdu_info.channel_num = pdev->operating_channel.num;
@@ -2646,7 +3508,7 @@
static uint32_t
dp_check_mgmt_ctrl_ppdu(struct dp_pdev *pdev,
- qdf_nbuf_t nbuf_ppdu_desc)
+ qdf_nbuf_t nbuf_ppdu_desc, bool bar_frm_with_data)
{
struct cdp_tx_indication_info tx_capture_info;
qdf_nbuf_t mgmt_ctl_nbuf;
@@ -2656,28 +3518,53 @@
struct cdp_tx_mgmt_comp_info *ptr_comp_info;
qdf_nbuf_queue_t *retries_q;
struct cdp_tx_completion_ppdu *ppdu_desc;
+ struct cdp_tx_completion_ppdu_user *user;
uint32_t ppdu_id;
+ uint32_t desc_ppdu_id;
size_t head_size;
uint32_t status = 1;
uint32_t tsf_delta;
+ uint64_t start_tsf;
+ uint64_t end_tsf;
+ uint16_t ppdu_desc_frame_ctrl;
+ struct dp_peer *peer;
ppdu_desc = (struct cdp_tx_completion_ppdu *)
qdf_nbuf_data(nbuf_ppdu_desc);
+
+ user = &ppdu_desc->user[0];
+
+ ppdu_desc_frame_ctrl = ppdu_desc->frame_ctrl;
+ if ((ppdu_desc->htt_frame_type == HTT_STATS_FTYPE_SGEN_MU_BAR) ||
+ (ppdu_desc->htt_frame_type == HTT_STATS_FTYPE_SGEN_MU_BRP))
+ ppdu_desc_frame_ctrl = (IEEE80211_FC0_SUBTYPE_TRIGGER |
+ IEEE80211_FC0_TYPE_CTL);
+
+ if (bar_frm_with_data) {
+ desc_ppdu_id = ppdu_desc->bar_ppdu_id;
+ start_tsf = ppdu_desc->bar_ppdu_start_timestamp;
+ end_tsf = ppdu_desc->bar_ppdu_end_timestamp;
+ } else {
+ desc_ppdu_id = ppdu_desc->ppdu_id;
+ start_tsf = ppdu_desc->ppdu_start_timestamp;
+ end_tsf = ppdu_desc->ppdu_end_timestamp;
+ }
+
/*
* only for host generated frame we do have
* timestamp and retries count.
*/
head_size = sizeof(struct cdp_tx_mgmt_comp_info);
- fc_type = (ppdu_desc->frame_ctrl &
+ fc_type = (ppdu_desc_frame_ctrl &
IEEE80211_FC0_TYPE_MASK);
- fc_subtype = (ppdu_desc->frame_ctrl &
+ fc_subtype = (ppdu_desc_frame_ctrl &
IEEE80211_FC0_SUBTYPE_MASK);
- type = (ppdu_desc->frame_ctrl &
+ type = (ppdu_desc_frame_ctrl &
IEEE80211_FC0_TYPE_MASK) >>
IEEE80211_FC0_TYPE_SHIFT;
- subtype = (ppdu_desc->frame_ctrl &
+ subtype = (ppdu_desc_frame_ctrl &
IEEE80211_FC0_SUBTYPE_MASK) >>
IEEE80211_FC0_SUBTYPE_SHIFT;
@@ -2687,12 +3574,33 @@
subtype = 0;
}
- if (!dp_peer_or_pdev_tx_cap_enabled(pdev, NULL,
- ppdu_desc->user[0].mac_addr)) {
- qdf_nbuf_free(nbuf_ppdu_desc);
- status = 0;
- goto free_ppdu_desc;
+ peer = dp_tx_cap_peer_find_by_id(pdev->soc, ppdu_desc->user[0].peer_id);
+ if (peer && !peer->bss_peer) {
+ if (!dp_peer_or_pdev_tx_cap_enabled(pdev, peer,
+ ppdu_desc->user[0].mac_addr
+ )) {
+ qdf_nbuf_free(nbuf_ppdu_desc);
+ status = 0;
+ dp_tx_cap_peer_unref_del(peer);
+ goto free_ppdu_desc;
+ }
+ dp_tx_cap_peer_unref_del(peer);
+ } else {
+ if (peer)
+ dp_tx_cap_peer_unref_del(peer);
+ if (!(type == IEEE80211_FC0_TYPE_MGT &&
+ (subtype == MGMT_SUBTYPE_PROBE_RESP >> 4 ||
+ subtype == MGMT_SUBTYPE_DISASSOC >> 4))) {
+ if (!dp_peer_or_pdev_tx_cap_enabled(pdev, NULL,
+ ppdu_desc->user[0]
+ .mac_addr)) {
+ qdf_nbuf_free(nbuf_ppdu_desc);
+ status = 0;
+ goto free_ppdu_desc;
+ }
+ }
}
+
switch (ppdu_desc->htt_frame_type) {
case HTT_STATS_FTYPE_TIDQ_DATA_SU:
case HTT_STATS_FTYPE_TIDQ_DATA_MU:
@@ -2717,15 +3625,13 @@
if (mgmt_ctl_nbuf) {
qdf_nbuf_t tmp_mgmt_ctl_nbuf;
- uint32_t start_tsf;
ptr_comp_info = (struct cdp_tx_mgmt_comp_info *)
qdf_nbuf_data(mgmt_ctl_nbuf);
is_sgen_pkt = ptr_comp_info->is_sgen_pkt;
ppdu_id = ptr_comp_info->ppdu_id;
- if (!is_sgen_pkt && ptr_comp_info->tx_tsf <
- ppdu_desc->ppdu_start_timestamp) {
+ if (!is_sgen_pkt && ptr_comp_info->tx_tsf < start_tsf) {
/*
* free the older mgmt buffer from
* the queue and get new mgmt buffer
@@ -2734,29 +3640,27 @@
goto get_mgmt_pkt_from_queue;
}
- QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_INFO_HIGH,
- "ppdu_id [%d 0x%x] type_subtype[%d %d] is_sgen[%d] h_sz[%d]",
- ppdu_id, ppdu_id, type, subtype,
- is_sgen_pkt, head_size);
-
- QDF_TRACE_HEX_DUMP(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_INFO_HIGH,
- qdf_nbuf_data(mgmt_ctl_nbuf), 32);
-
/*
* for sgen frame we won't have, retries count
* and 64 bits tsf in the head.
*/
- if (ppdu_id != ppdu_desc->ppdu_id) {
+ if (ppdu_id != desc_ppdu_id) {
if (is_sgen_pkt) {
- start_tsf = (ppdu_desc->ppdu_start_timestamp &
- LOWER_32_MASK);
-
+ start_tsf = (start_tsf & LOWER_32_MASK);
if (start_tsf > ptr_comp_info->tx_tsf)
- tsf_delta = start_tsf - ptr_comp_info->tx_tsf;
+ tsf_delta = start_tsf -
+ ptr_comp_info->tx_tsf;
else
- tsf_delta = LOWER_32_MASK - ptr_comp_info->tx_tsf + start_tsf;
+ tsf_delta = LOWER_32_MASK -
+ ptr_comp_info->tx_tsf +
+ start_tsf;
+
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_INFO,
+ "%s: ppdu_id[m:%d desc:%d] start_tsf: %u mgmt_tsf:%u tsf_delta:%u bar_frm_with_data:%d",
+ __func__, ppdu_id, desc_ppdu_id,
+ start_tsf, ptr_comp_info->tx_tsf,
+ tsf_delta, bar_frm_with_data);
if (tsf_delta > MAX_MGMT_ENQ_DELAY) {
/*
@@ -2765,6 +3669,11 @@
*/
qdf_nbuf_free(mgmt_ctl_nbuf);
goto get_mgmt_pkt_from_queue;
+ } else {
+ /* drop the ppdu_desc */
+ qdf_nbuf_free(nbuf_ppdu_desc);
+ status = 0;
+ goto insert_mgmt_buf_to_queue;
}
}
@@ -2773,17 +3682,37 @@
* packets drop by firmware is not handled in this
* feature
*/
- if (ppdu_desc->user[0].completion_status ==
+ if (user->completion_status ==
HTT_PPDU_STATS_USER_STATUS_FILTERED) {
qdf_nbuf_free(nbuf_ppdu_desc);
status = 0;
goto insert_mgmt_buf_to_queue;
}
+ /* check for max retry count */
+ if (qdf_nbuf_queue_len(retries_q) >=
+ MAX_RETRY_Q_COUNT) {
+ qdf_nbuf_t nbuf_retry_ppdu;
+
+ nbuf_retry_ppdu =
+ qdf_nbuf_queue_remove(retries_q);
+ qdf_nbuf_free(nbuf_retry_ppdu);
+ }
+
/*
* add the ppdu_desc into retry queue
*/
qdf_nbuf_queue_add(retries_q, nbuf_ppdu_desc);
+
+ /* flushing retry queue since completion status is
+ * in final state. meaning that even though ppdu_id are
+ * different there is a payload already.
+ */
+ if (qdf_unlikely(ppdu_desc->user[0].completion_status ==
+ HTT_PPDU_STATS_USER_STATUS_OK)) {
+ qdf_nbuf_queue_free(retries_q);
+ }
+
status = 0;
insert_mgmt_buf_to_queue:
@@ -2803,13 +3732,21 @@
struct cdp_tx_completion_ppdu *tmp_ppdu_desc;
uint16_t frame_ctrl_le;
struct ieee80211_frame *wh;
+ uint32_t retry_len = 0;
+
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_INFO,
+ "%s: ppdu_id[m:%d desc:%d] start_tsf: %u mgmt_tsf:%u bar_frm_with_data:%d is_sgen:%d",
+ __func__, ppdu_id, desc_ppdu_id,
+ start_tsf, ptr_comp_info->tx_tsf,
+ bar_frm_with_data, is_sgen_pkt);
/*
* only for the packets send over the air are handled
* packets drop by firmware is not handled in this
* feature
*/
- if (ppdu_desc->user[0].completion_status ==
+ if (user->completion_status ==
HTT_PPDU_STATS_USER_STATUS_FILTERED) {
qdf_nbuf_free(nbuf_ppdu_desc);
qdf_nbuf_free(mgmt_ctl_nbuf);
@@ -2817,32 +3754,74 @@
goto free_ppdu_desc;
}
- while (!!qdf_nbuf_queue_len(retries_q)) {
+ /* pull head based on sgen pkt or mgmt pkt */
+ if (NULL == qdf_nbuf_pull_head(mgmt_ctl_nbuf,
+ head_size)) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_FATAL,
+ " No Head space to pull !!\n");
+ qdf_assert_always(0);
+ }
+
+ wh = (struct ieee80211_frame *)
+ (qdf_nbuf_data(mgmt_ctl_nbuf));
+
+ if (type == IEEE80211_FC0_TYPE_MGT &&
+ (subtype == MGMT_SUBTYPE_PROBE_RESP >> 4 ||
+ subtype == MGMT_SUBTYPE_DISASSOC >> 4)) {
+ if (!dp_peer_or_pdev_tx_cap_enabled(pdev,
+ NULL,
+ wh->i_addr1
+ )) {
+ qdf_nbuf_free(nbuf_ppdu_desc);
+ qdf_nbuf_free(mgmt_ctl_nbuf);
+ qdf_nbuf_queue_free(retries_q);
+ status = 0;
+ goto free_ppdu_desc;
+ }
+ }
+
+ while (qdf_nbuf_queue_len(retries_q)) {
/*
* send retried packet stored
* in queue
*/
nbuf_retry_ppdu =
qdf_nbuf_queue_remove(retries_q);
+
+ retry_len = qdf_nbuf_queue_len(retries_q);
+ if (!nbuf_retry_ppdu) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_FATAL,
+ "%s: %d retry q type[%d][%d] retry q len = %d\n",
+ __func__, __LINE__,
+ type, subtype, retry_len);
+ qdf_assert_always(0);
+ break;
+ }
+
tmp_ppdu_desc =
(struct cdp_tx_completion_ppdu *)
qdf_nbuf_data(nbuf_retry_ppdu);
tmp_mgmt_ctl_nbuf =
qdf_nbuf_copy_expand(mgmt_ctl_nbuf,
0, 0);
+ if (qdf_unlikely(!tmp_mgmt_ctl_nbuf)) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_FATAL,
+ "No memory to do copy!!");
+ qdf_assert_always(0);
+ }
dp_update_tx_cap_info(pdev, nbuf_retry_ppdu,
- &tx_capture_info, true);
+ &tx_capture_info, true,
+ bar_frm_with_data);
if (!tx_capture_info.mpdu_nbuf) {
qdf_nbuf_free(nbuf_retry_ppdu);
qdf_nbuf_free(tmp_mgmt_ctl_nbuf);
continue;
}
- /* pull head based on sgen pkt or mgmt pkt */
- qdf_nbuf_pull_head(tmp_mgmt_ctl_nbuf,
- head_size);
-
/*
* frame control from ppdu_desc has
* retry flag set
@@ -2869,19 +3848,20 @@
}
dp_update_tx_cap_info(pdev, nbuf_ppdu_desc,
- &tx_capture_info, true);
+ &tx_capture_info, true,
+ bar_frm_with_data);
if (!tx_capture_info.mpdu_nbuf) {
qdf_nbuf_free(mgmt_ctl_nbuf);
+ qdf_nbuf_free(nbuf_ppdu_desc);
+ status = 0;
goto free_ppdu_desc;
}
tx_capture_info.mpdu_info.ppdu_id =
*(uint32_t *)qdf_nbuf_data(mgmt_ctl_nbuf);
- /* pull head based on sgen pkt or mgmt pkt */
- qdf_nbuf_pull_head(mgmt_ctl_nbuf, head_size);
/* frame control from ppdu_desc has retry flag set */
- frame_ctrl_le = qdf_cpu_to_le16(ppdu_desc->frame_ctrl);
+ frame_ctrl_le = qdf_cpu_to_le16(ppdu_desc_frame_ctrl);
wh = (struct ieee80211_frame *)
(qdf_nbuf_data(mgmt_ctl_nbuf));
wh->i_fc[1] = (frame_ctrl_le & 0xFF00) >> 8;
@@ -2901,18 +3881,39 @@
* packets drop by firmware is not handled in this
* feature
*/
- if (ppdu_desc->user[0].completion_status ==
+ if (user->completion_status ==
HTT_PPDU_STATS_USER_STATUS_FILTERED) {
qdf_nbuf_free(nbuf_ppdu_desc);
status = 0;
goto free_ppdu_desc;
}
+
+ /* check for max retry count */
+ if (qdf_nbuf_queue_len(retries_q) >= MAX_RETRY_Q_COUNT) {
+ qdf_nbuf_t nbuf_retry_ppdu;
+
+ nbuf_retry_ppdu =
+ qdf_nbuf_queue_remove(retries_q);
+ qdf_nbuf_free(nbuf_retry_ppdu);
+ }
+
/*
* add the ppdu_desc into retry queue
*/
+
qdf_nbuf_queue_add(retries_q, nbuf_ppdu_desc);
+
+ /* flushing retry queue since completion status is
+ * in final state. meaning that even though ppdu_id are
+ * different there is a payload already.
+ */
+ if (qdf_unlikely(ppdu_desc->user[0].completion_status ==
+ HTT_PPDU_STATS_USER_STATUS_OK)) {
+ qdf_nbuf_queue_free(retries_q);
+ }
+
status = 0;
- } else if ((ppdu_desc->frame_ctrl &
+ } else if ((ppdu_desc_frame_ctrl &
IEEE80211_FC0_TYPE_MASK) ==
IEEE80211_FC0_TYPE_CTL) {
@@ -2921,7 +3922,7 @@
* packets drop by firmware is not handled in this
* feature
*/
- if (ppdu_desc->user[0].completion_status ==
+ if (user->completion_status ==
HTT_PPDU_STATS_USER_STATUS_FILTERED) {
qdf_nbuf_free(nbuf_ppdu_desc);
status = 0;
@@ -2929,9 +3930,13 @@
}
dp_update_tx_cap_info(pdev, nbuf_ppdu_desc,
- &tx_capture_info, false);
- if (!tx_capture_info.mpdu_nbuf)
+ &tx_capture_info, false,
+ bar_frm_with_data);
+ if (!tx_capture_info.mpdu_nbuf) {
+ qdf_nbuf_free(nbuf_ppdu_desc);
+ status = 0;
goto free_ppdu_desc;
+ }
/*
* send MPDU to osif layer
*/
@@ -2954,7 +3959,8 @@
static void
dp_peer_tx_cap_tid_queue_flush_tlv(struct dp_pdev *pdev,
struct dp_peer *peer,
- struct cdp_tx_completion_ppdu *ppdu_desc)
+ struct cdp_tx_completion_ppdu *ppdu_desc,
+ uint8_t usr_idx)
{
int tid;
struct dp_tx_tid *tx_tid;
@@ -2962,14 +3968,16 @@
qdf_nbuf_queue_t head_msdu;
uint32_t qlen = 0;
uint32_t qlen_curr = 0;
+ struct cdp_tx_completion_ppdu_user *xretry_user;
- tid = ppdu_desc->user[0].tid;
+ xretry_user = &ppdu_desc->user[usr_idx];
+ tid = xretry_user->tid;
tx_tid = &peer->tx_capture.tx_tid[tid];
qdf_nbuf_queue_init(&head_msdu);
qdf_nbuf_queue_init(&head_xretries);
- qlen = qdf_nbuf_queue_len(&tx_tid->msdu_comp_q);
+ qlen = qdf_nbuf_queue_len(&tx_tid->defer_msdu_q);
dp_tx_msdu_dequeue(peer, INVALID_PPDU_ID,
tid, ppdu_desc->num_msdu,
@@ -2977,9 +3985,14 @@
&head_xretries,
0, MAX_END_TSF);
+ dp_tx_cap_stats_msdu_update(peer, PEER_MSDU_FLUSH,
+ qdf_nbuf_queue_len(&head_msdu));
+ dp_tx_cap_stats_msdu_update(peer, PEER_MSDU_FLUSH,
+ qdf_nbuf_queue_len(&head_xretries));
if (!qdf_nbuf_is_queue_empty(&head_xretries)) {
struct cdp_tx_completion_ppdu *xretry_ppdu =
&tx_tid->xretry_ppdu;
+ uint32_t xretry_qlen;
xretry_ppdu->ppdu_id = peer->tx_capture.tx_wifi_ppdu_id;
@@ -2987,18 +4000,23 @@
dp_tx_mon_restitch_mpdu(pdev, peer,
xretry_ppdu,
&head_xretries,
- &xretry_ppdu->mpdu_q);
+ &xretry_user->mpdu_q,
+ 0);
+
+ xretry_qlen = qdf_nbuf_queue_len(&xretry_user->mpdu_q);
+ dp_tx_cap_stats_mpdu_update(peer, PEER_MPDU_RESTITCH,
+ xretry_qlen);
}
qdf_nbuf_queue_free(&head_msdu);
qdf_nbuf_queue_free(&head_xretries);
- qlen_curr = qdf_nbuf_queue_len(&tx_tid->msdu_comp_q);
+ qlen_curr = qdf_nbuf_queue_len(&tx_tid->defer_msdu_q);
dp_tx_mon_proc_xretries(pdev, peer, tid);
QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
QDF_TRACE_LEVEL_INFO_MED,
"peer_id [%d 0x%x] tid[%d] qlen[%d -> %d]",
- ppdu_desc->user[0].peer_id, peer, tid, qlen, qlen_curr);
+ ppdu_desc->user[usr_idx].peer_id, peer, tid, qlen, qlen_curr);
}
@@ -3011,52 +4029,36 @@
*/
static void
dp_tx_ppdu_stats_flush(struct dp_pdev *pdev,
- struct cdp_tx_completion_ppdu *ppdu_desc)
+ struct cdp_tx_completion_ppdu *ppdu_desc,
+ uint8_t usr_idx)
{
struct dp_peer *peer;
+ struct cdp_tx_completion_ppdu_user *user;
- peer = dp_tx_cap_peer_find_by_id(pdev->soc,
- ppdu_desc->user[0].peer_id);
+ user = &ppdu_desc->user[usr_idx];
+ peer = dp_tx_cap_peer_find_by_id(pdev->soc, user->peer_id);
if (!peer)
return;
- dp_peer_tx_cap_tid_queue_flush_tlv(pdev, peer, ppdu_desc);
+ dp_peer_tx_cap_tid_queue_flush_tlv(pdev, peer, ppdu_desc, usr_idx);
dp_tx_cap_peer_unref_del(peer);
return;
}
-static void dp_ppdu_queue_free(struct cdp_tx_completion_ppdu *ppdu_desc)
-{
- int i;
- qdf_nbuf_t mpdu_nbuf = NULL;
-
- for (i = 0; i < ppdu_desc->user[0].ba_size; i++) {
- mpdu_nbuf = ppdu_desc->mpdus[i];
- if (mpdu_nbuf)
- qdf_nbuf_free(mpdu_nbuf);
- }
-
- qdf_nbuf_queue_free(&ppdu_desc->mpdu_q);
- qdf_mem_free(ppdu_desc->mpdus);
- ppdu_desc->mpdus = NULL;
-
- return;
-}
-
/**
* dp_check_ppdu_and_deliver(): Check PPDUs for any holes and deliver
* to upper layer if complete
* @pdev: DP pdev handle
- * @nbuf_ppdu_desc_list: ppdu_desc_list per sched cmd id
+ * @nbuf_ppdu_list: ppdu_desc_list per sched cmd id
* @ppdu_desc_cnt: number of ppdu_desc_cnt
*
* return: status
*/
static void
dp_check_ppdu_and_deliver(struct dp_pdev *pdev,
- qdf_nbuf_t nbuf_ppdu_desc_list[],
+ struct dp_tx_cap_nbuf_list nbuf_ppdu_list[],
uint32_t ppdu_desc_cnt)
{
uint32_t ppdu_id;
@@ -3064,245 +4066,668 @@
qdf_nbuf_t tmp_nbuf;
struct dp_tx_tid *tx_tid = NULL;
int i;
+ uint8_t max_num_users = 0;
+ uint8_t usr_idx;
+ struct dp_tx_cap_nbuf_list *ptr_nbuf_list;
for (desc_cnt = 0; desc_cnt < ppdu_desc_cnt; desc_cnt++) {
struct cdp_tx_completion_ppdu *ppdu_desc;
+ struct cdp_tx_completion_ppdu_user *user;
uint32_t num_mpdu;
uint16_t start_seq, seq_no = 0;
int i;
qdf_nbuf_t mpdu_nbuf;
struct dp_peer *peer;
uint8_t type;
+ uint8_t subtype;
+ uint8_t usr_type;
uint32_t mpdus_tried;
+ uint8_t num_users;
+ qdf_nbuf_t nbuf_ppdu;
+ bool is_bar_frm_with_data = false;
- if (!nbuf_ppdu_desc_list[desc_cnt])
+ ptr_nbuf_list = &nbuf_ppdu_list[desc_cnt];
+
+ if (!dp_tx_cap_nbuf_list_get_ref(ptr_nbuf_list)) {
+ if (ptr_nbuf_list->nbuf_ppdu)
+ qdf_assert_always(0);
continue;
+ }
+ nbuf_ppdu = ptr_nbuf_list->nbuf_ppdu;
ppdu_desc = (struct cdp_tx_completion_ppdu *)
- qdf_nbuf_data(nbuf_ppdu_desc_list[desc_cnt]);
+ qdf_nbuf_data(nbuf_ppdu);
ppdu_id = ppdu_desc->ppdu_id;
- type = (ppdu_desc->frame_ctrl & IEEE80211_FC0_TYPE_MASK) >>
- IEEE80211_FC0_TYPE_SHIFT;
+ num_users = ppdu_desc->num_users;
if (ppdu_desc->is_flush) {
- dp_tx_ppdu_stats_flush(pdev, ppdu_desc);
- tmp_nbuf = nbuf_ppdu_desc_list[desc_cnt];
- nbuf_ppdu_desc_list[desc_cnt] = NULL;
- qdf_nbuf_free(tmp_nbuf);
+ dp_tx_ppdu_stats_flush(pdev, ppdu_desc, 0);
+ dp_ppdu_desc_free_all(ptr_nbuf_list, num_users);
continue;
}
- if ((ppdu_desc->frame_type == CDP_PPDU_FTYPE_CTRL) ||
+ if (max_num_users < ppdu_desc->num_users)
+ max_num_users = ppdu_desc->num_users;
+
+ type = (ppdu_desc->frame_ctrl & IEEE80211_FC0_TYPE_MASK);
+ subtype = (ppdu_desc->frame_ctrl &
+ IEEE80211_FC0_SUBTYPE_MASK);
+ usr_type = (ppdu_desc->user[0].frame_ctrl &
+ IEEE80211_FC0_TYPE_MASK);
+
+ /* handle management frame */
+ if ((type != IEEE80211_FC0_TYPE_DATA) ||
(ppdu_desc->htt_frame_type ==
- HTT_STATS_FTYPE_SGEN_QOS_NULL) ||
- (type != FRAME_CTRL_TYPE_DATA)) {
- qdf_nbuf_t nbuf_ppdu = nbuf_ppdu_desc_list[desc_cnt];
+ HTT_STATS_FTYPE_SGEN_MU_BAR) ||
+ (ppdu_desc->htt_frame_type ==
+ HTT_STATS_FTYPE_SGEN_QOS_NULL)) {
+ qdf_nbuf_t tmp_nbuf_ppdu;
- if (dp_check_mgmt_ctrl_ppdu(pdev, nbuf_ppdu)) {
- tmp_nbuf = nbuf_ppdu_desc_list[desc_cnt];
- nbuf_ppdu_desc_list[desc_cnt] = NULL;
- qdf_nbuf_free(tmp_nbuf);
- continue;
- }
- nbuf_ppdu_desc_list[desc_cnt] = NULL;
- continue;
- }
-
- peer = dp_tx_cap_peer_find_by_id(pdev->soc,
- ppdu_desc->user[0].peer_id);
- if (!peer) {
- tmp_nbuf = nbuf_ppdu_desc_list[desc_cnt];
- nbuf_ppdu_desc_list[desc_cnt] = NULL;
- qdf_nbuf_queue_free(&ppdu_desc->mpdu_q);
- qdf_nbuf_free(tmp_nbuf);
- continue;
- }
-
- tx_tid = &peer->tx_capture.tx_tid[ppdu_desc->user[0].tid];
-
- ppdu_id = ppdu_desc->ppdu_id;
-
- /* find mpdu tried is same as success mpdu */
-
- num_mpdu = ppdu_desc->user[0].mpdu_success;
-
- /* ba_size is updated in BA bitmap TLVs, which are not received
- * in case of non-QoS TID.
- */
- if (qdf_unlikely(ppdu_desc->user[0].tid == DP_NON_QOS_TID)) {
- ppdu_desc->user[0].ba_size = 1;
- ppdu_desc->user[0].last_enq_seq =
- ppdu_desc->user[0].start_seq;
- }
-
- if (ppdu_desc->user[0].ba_size == 0)
- ppdu_desc->user[0].ba_size = 1;
-
- /* find list of missing sequence */
- ppdu_desc->mpdus = qdf_mem_malloc(sizeof(qdf_nbuf_t) *
- ppdu_desc->user[0].ba_size);
-
- if (ppdu_desc->frame_type == CDP_PPDU_FTYPE_BAR)
- dp_send_dummy_mpdu_info_to_stack(pdev,
- ppdu_desc);
-
- if (qdf_unlikely(!ppdu_desc->mpdus)) {
- QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_FATAL,
- "%s: ppdu_desc->mpdus allocation failed",
- __func__);
- tmp_nbuf = nbuf_ppdu_desc_list[desc_cnt];
- nbuf_ppdu_desc_list[desc_cnt] = NULL;
- qdf_nbuf_queue_free(&ppdu_desc->mpdu_q);
- qdf_nbuf_free(tmp_nbuf);
- dp_tx_cap_peer_unref_del(peer);
- continue;
- }
-
- if (qdf_unlikely(ppdu_desc->user[0].ba_size >
- CDP_BA_256_BIT_MAP_SIZE_DWORDS *
- SEQ_SEG_SZ_BITS(ppdu_desc->user[0].failed_bitmap))) {
- dp_tx_cap_peer_unref_del(peer);
- qdf_assert_always(0);
- return;
- }
- /* Fill seq holes within current schedule list */
- start_seq = ppdu_desc->user[0].start_seq;
- mpdus_tried = ppdu_desc->user[0].mpdu_tried_mcast +
- ppdu_desc->user[0].mpdu_tried_ucast;
- for (i = 0; (i < ppdu_desc->user[0].ba_size) && mpdus_tried;
- i++) {
- if (qdf_likely(ppdu_desc->user[0].tid !=
- DP_NON_QOS_TID) &&
- !(SEQ_BIT(ppdu_desc->user[0].enq_bitmap, i)))
- continue;
- mpdus_tried--;
- /* missed seq number */
- seq_no = start_seq + i;
-
- /* Fill failed MPDUs in AMPDU if they're available in
- * subsequent PPDUs in current burst schedule. This
- * is not applicable for non-QoS TIDs (no AMPDUs)
+ tmp_nbuf_ppdu = nbuf_ppdu;
+ /*
+ * take reference of ppdu_desc if the htt_frame_type is
+ * HTT_STATS_FTYPE_SGEN_MU_BAR, as there will be
+ * corresponding data frame
*/
- if (qdf_likely(ppdu_desc->user[0].tid !=
- DP_NON_QOS_TID) &&
- !(SEQ_BIT(ppdu_desc->user[0].failed_bitmap, i))) {
- QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_DEBUG,
- "%s:find seq %d in next ppdu %d",
- __func__, seq_no,
- ppdu_desc_cnt);
-
- mpdu_nbuf = get_mpdu_clone_from_next_ppdu(
- nbuf_ppdu_desc_list +
- desc_cnt,
- ppdu_desc_cnt -
- desc_cnt, seq_no,
- ppdu_desc->user[0].peer_id,
- ppdu_id);
-
- /* check mpdu_nbuf NULL */
- if (!mpdu_nbuf) {
- ppdu_desc->pending_retries++;
+ if (((type == IEEE80211_FC0_TYPE_CTL) &&
+ (subtype == IEEE80211_FC0_SUBTYPE_BAR) &&
+ (usr_type == IEEE80211_FC0_TYPE_DATA)) ||
+ (ppdu_desc->htt_frame_type ==
+ HTT_STATS_FTYPE_SGEN_MU_BAR)) {
+ /*
+ * clonning ppdu_desc additional reference as
+ * handling data frame
+ */
+ tmp_nbuf_ppdu = qdf_nbuf_clone(nbuf_ppdu);
+ if (qdf_unlikely(!tmp_nbuf_ppdu)) {
+ qdf_assert_always(0);
continue;
}
- ppdu_desc->mpdus[seq_no - start_seq] =
- mpdu_nbuf;
- SEQ_SEG(ppdu_desc->user[0].failed_bitmap, i) |=
- SEQ_SEG_MSK(ppdu_desc->user[0].failed_bitmap[0],
- i);
+
+ dp_tx_cap_nbuf_list_inc_ref(ptr_nbuf_list);
+ is_bar_frm_with_data = true;
+ }
+
+ if (dp_check_mgmt_ctrl_ppdu(pdev, tmp_nbuf_ppdu,
+ is_bar_frm_with_data)) {
+ dp_tx_cap_nbuf_list_dec_ref(ptr_nbuf_list);
+ qdf_nbuf_free(tmp_nbuf_ppdu);
} else {
- /* any error case we need to handle */
- mpdu_nbuf = qdf_nbuf_queue_remove(
- &ppdu_desc->mpdu_q);
- /* check mpdu_nbuf NULL */
- if (!mpdu_nbuf)
- continue;
-
- ppdu_desc->mpdus[seq_no - start_seq] =
- mpdu_nbuf;
+ dp_tx_cap_nbuf_list_dec_ref(ptr_nbuf_list);
}
+
+ if (!is_bar_frm_with_data)
+ continue;
}
- /* It is possible that enq_bitmap received has more bits than
- * actual mpdus tried if HW was unable to send all MPDUs, and
- * last_enq_seq and ba_size should be adjusted in that case
+ /*
+ * process only data frame and other
*/
- if (i < ppdu_desc->user[0].ba_size) {
- ppdu_desc->user[0].last_enq_seq = seq_no;
- ppdu_desc->user[0].ba_size = seq_no - start_seq + 1;
- }
+ for (usr_idx = 0; usr_idx < num_users; usr_idx++) {
+ uint32_t mpdu_enq = 0;
+ uint32_t mpdu_tried = 0;
- dp_tx_cap_peer_unref_del(peer);
+ if (!ptr_nbuf_list->nbuf_ppdu ||
+ !dp_tx_cap_nbuf_list_get_ref(ptr_nbuf_list))
+ continue;
- if ((ppdu_desc->pending_retries == 0) &&
- qdf_nbuf_is_queue_empty(&tx_tid->pending_ppdu_q)) {
- dp_send_data_to_stack(pdev, ppdu_desc);
- dp_ppdu_queue_free(ppdu_desc);
- tmp_nbuf = nbuf_ppdu_desc_list[desc_cnt];
- nbuf_ppdu_desc_list[desc_cnt] = NULL;
- qdf_nbuf_free(tmp_nbuf);
- }
- }
+ nbuf_ppdu = ptr_nbuf_list->nbuf_ppdu;
- for (i = 0; i < ppdu_desc_cnt; i++) {
- uint32_t pending_ppdus;
- struct cdp_tx_completion_ppdu *cur_ppdu_desc;
- struct dp_peer *peer;
- qdf_nbuf_queue_t head_ppdu;
- uint16_t peer_id;
+ ppdu_desc = (struct cdp_tx_completion_ppdu *)
+ qdf_nbuf_data(nbuf_ppdu);
- if (!nbuf_ppdu_desc_list[i])
- continue;
- cur_ppdu_desc = (struct cdp_tx_completion_ppdu *)qdf_nbuf_data(
- nbuf_ppdu_desc_list[i]);
- if (!cur_ppdu_desc)
- continue;
+ user = &ppdu_desc->user[usr_idx];
- peer_id = cur_ppdu_desc->user[0].peer_id;
- peer = dp_tx_cap_peer_find_by_id(pdev->soc, peer_id);
- if (!peer) {
- tmp_nbuf = nbuf_ppdu_desc_list[i];
- nbuf_ppdu_desc_list[i] = NULL;
- dp_ppdu_queue_free(cur_ppdu_desc);
- qdf_nbuf_free(tmp_nbuf);
- continue;
- }
- tx_tid = &peer->tx_capture.tx_tid[cur_ppdu_desc->user[0].tid];
- qdf_nbuf_queue_init(&head_ppdu);
- dp_tx_mon_proc_pending_ppdus(pdev, tx_tid,
- nbuf_ppdu_desc_list + i,
- ppdu_desc_cnt - i, &head_ppdu,
- peer_id);
+ if (user->delayed_ba || user->skip == 1)
+ continue;
- if (qdf_nbuf_is_queue_empty(&tx_tid->pending_ppdu_q)) {
- while ((tmp_nbuf = qdf_nbuf_queue_first(&head_ppdu))) {
- cur_ppdu_desc =
- (struct cdp_tx_completion_ppdu *)
- qdf_nbuf_data(tmp_nbuf);
- if (cur_ppdu_desc->pending_retries)
- break;
- dp_send_data_to_stack(pdev, cur_ppdu_desc);
- dp_ppdu_queue_free(cur_ppdu_desc);
- qdf_nbuf_queue_remove(&head_ppdu);
- qdf_nbuf_free(tmp_nbuf);
+ peer = dp_tx_cap_peer_find_by_id(pdev->soc,
+ user->peer_id);
+ if (!peer) {
+ dp_ppdu_desc_free(ptr_nbuf_list, usr_idx);
+ continue;
}
- }
- qdf_nbuf_queue_append(&tx_tid->pending_ppdu_q, &head_ppdu);
- dp_tx_mon_proc_xretries(pdev, peer, tx_tid->tid);
+ tx_tid = &peer->tx_capture.tx_tid[user->tid];
+ ppdu_id = ppdu_desc->ppdu_id;
- dp_tx_cap_peer_unref_del(peer);
- pending_ppdus = qdf_nbuf_queue_len(&tx_tid->pending_ppdu_q);
- if (pending_ppdus > MAX_PENDING_PPDUS) {
- QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_FATAL,
- "pending ppdus (%d, %d) : %d\n",
- cur_ppdu_desc->user[0].peer_id,
- tx_tid->tid, pending_ppdus);
+ /* find mpdu tried is same as success mpdu */
+ num_mpdu = user->mpdu_success;
+
+ /*
+ * ba_size is updated in BA bitmap TLVs,
+ * which are not received
+ * in case of non-QoS TID.
+ */
+ if (qdf_unlikely(user->tid == DP_NON_QOS_TID)) {
+ user->ba_size = 1;
+ user->last_enq_seq = user->start_seq;
+ }
+
+ if (user->ba_size == 0)
+ user->ba_size = 1;
+
+ /* find list of missing sequence */
+ user->mpdus = qdf_mem_malloc(sizeof(qdf_nbuf_t) *
+ user->ba_size);
+
+ if (qdf_unlikely(!user->mpdus)) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_FATAL,
+ "%s: ppdu_desc->mpdus allocation failed",
+ __func__);
+ dp_ppdu_desc_free_all(ptr_nbuf_list, num_users);
+ dp_tx_cap_peer_unref_del(peer);
+ dp_print_pdev_tx_capture_stats(pdev);
+ qdf_assert_always(0);
+ return;
+ }
+
+ if (qdf_unlikely(user->ba_size >
+ CDP_BA_256_BIT_MAP_SIZE_DWORDS *
+ SEQ_SEG_SZ_BITS(user->failed_bitmap))) {
+ dp_tx_cap_peer_unref_del(peer);
+ qdf_assert_always(0);
+ return;
+ }
+ /* Fill seq holes within current schedule list */
+ start_seq = user->start_seq;
+ seq_no = 0;
+ mpdus_tried = user->mpdu_tried_mcast +
+ user->mpdu_tried_ucast;
+
+ for (i = 0; (i < user->ba_size) && mpdus_tried; i++) {
+ if (qdf_likely(user->tid != DP_NON_QOS_TID) &&
+ !(SEQ_BIT(user->enq_bitmap, i)))
+ continue;
+ mpdus_tried--;
+ /* missed seq number */
+ seq_no = start_seq + i;
+
+ /*
+ * Fill failed MPDUs in AMPDU if they're
+ * available in subsequent PPDUs in current
+ * burst schedule. This is not applicable
+ * for non-QoS TIDs (no AMPDUs)
+ */
+ if (qdf_likely(user->tid != DP_NON_QOS_TID) &&
+ !(SEQ_BIT(user->failed_bitmap, i))) {
+ uint8_t seq_idx;
+
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_DEBUG,
+ "%s:find seq %d in next ppdu %d",
+ __func__, seq_no,
+ ppdu_desc_cnt);
+
+ mpdu_nbuf =
+ get_mpdu_clone_from_next_ppdu(
+ nbuf_ppdu_list +
+ desc_cnt,
+ ppdu_desc_cnt -
+ desc_cnt, seq_no,
+ user->peer_id,
+ ppdu_id, usr_idx);
+
+ seq_idx = seq_no - start_seq;
+ /* check mpdu_nbuf NULL */
+ if (!mpdu_nbuf) {
+ user->mpdus[seq_idx] = NULL;
+ user->pending_retries++;
+ continue;
+ }
+
+ dp_tx_cap_stats_mpdu_update(peer,
+ PEER_MPDU_CLONE, 1);
+ user->mpdus[seq_idx] = mpdu_nbuf;
+
+ SEQ_SEG(user->failed_bitmap, i) |=
+ SEQ_SEG_MSK(user->failed_bitmap[0], i);
+ } else {
+ qdf_nbuf_queue_t *tmp_q;
+
+ tmp_q = &user->mpdu_q;
+ /* any error case we need to handle */
+ mpdu_nbuf =
+ qdf_nbuf_queue_remove(tmp_q);
+ /* check mpdu_nbuf NULL */
+ if (!mpdu_nbuf)
+ continue;
+
+ user->mpdus[seq_no - start_seq] =
+ mpdu_nbuf;
+ dp_tx_cap_stats_mpdu_update(peer,
+ PEER_MPDU_ARR, 1);
+ }
+ }
+
+ mpdu_tried = user->mpdu_tried_ucast +
+ user->mpdu_tried_mcast;
+ for (i = 0; i < CDP_BA_256_BIT_MAP_SIZE_DWORDS; i++)
+ mpdu_enq +=
+ get_number_of_1s(user->enq_bitmap[i]);
+
+ if (mpdu_tried > mpdu_enq)
+ dp_ppdu_desc_debug_print(ppdu_desc, usr_idx,
+ __func__, __LINE__);
+
+ /*
+ * It is possible that enq_bitmap received has
+ * more bits than actual mpdus tried if HW was
+ * unable to send all MPDUs, and last_enq_seq
+ * and ba_size should be adjusted in that case
+ */
+ if (i < user->ba_size) {
+ user->last_enq_seq = seq_no;
+ user->ba_size = seq_no - start_seq + 1;
+ }
+
+ dp_tx_cap_peer_unref_del(peer);
}
}
+
+ for (usr_idx = 0; usr_idx < max_num_users; usr_idx++) {
+ for (i = 0; i < ppdu_desc_cnt; i++) {
+ uint32_t pending_ppdus;
+ struct cdp_tx_completion_ppdu *cur_ppdu_desc;
+ struct cdp_tx_completion_ppdu_user *cur_user;
+ struct dp_peer *peer;
+ qdf_nbuf_queue_t head_ppdu;
+ uint16_t peer_id;
+
+ ptr_nbuf_list = &nbuf_ppdu_list[i];
+
+ if (!ptr_nbuf_list->nbuf_ppdu ||
+ !dp_tx_cap_nbuf_list_get_ref(ptr_nbuf_list))
+ continue;
+
+ cur_ppdu_desc = (struct cdp_tx_completion_ppdu *)
+ qdf_nbuf_data(ptr_nbuf_list->nbuf_ppdu);
+
+ if (!cur_ppdu_desc)
+ continue;
+
+ if (usr_idx >= cur_ppdu_desc->num_users)
+ continue;
+
+ cur_user = &cur_ppdu_desc->user[usr_idx];
+ if (cur_user->delayed_ba == 1 || cur_user->skip == 1)
+ continue;
+
+ peer_id = cur_ppdu_desc->user[usr_idx].peer_id;
+ peer = dp_tx_cap_peer_find_by_id(pdev->soc, peer_id);
+ if (!peer) {
+ dp_ppdu_desc_free(ptr_nbuf_list, usr_idx);
+ continue;
+ }
+ tx_tid = &peer->tx_capture.tx_tid[cur_user->tid];
+ qdf_nbuf_queue_init(&head_ppdu);
+ dp_tx_mon_proc_pending_ppdus(pdev, tx_tid,
+ nbuf_ppdu_list + i,
+ ppdu_desc_cnt - i,
+ &head_ppdu,
+ cur_user->peer_id,
+ usr_idx);
+
+ if (qdf_nbuf_is_queue_empty(&tx_tid->pending_ppdu_q)) {
+ while ((tmp_nbuf =
+ qdf_nbuf_queue_first(&head_ppdu))) {
+ cur_ppdu_desc =
+ (struct cdp_tx_completion_ppdu *)
+ qdf_nbuf_data(tmp_nbuf);
+ cur_user =
+ &cur_ppdu_desc->user[usr_idx];
+
+ if (cur_user->pending_retries)
+ break;
+ dp_send_data_to_stack(pdev,
+ cur_ppdu_desc,
+ usr_idx);
+ dp_ppdu_queue_free(tmp_nbuf, usr_idx);
+ qdf_nbuf_queue_remove(&head_ppdu);
+ qdf_nbuf_free(tmp_nbuf);
+ }
+ }
+ qdf_nbuf_queue_append(&tx_tid->pending_ppdu_q,
+ &head_ppdu);
+
+ dp_tx_mon_proc_xretries(pdev, peer, tx_tid->tid);
+
+ pending_ppdus =
+ qdf_nbuf_queue_len(&tx_tid->pending_ppdu_q);
+ if (pending_ppdus > MAX_PENDING_PPDUS) {
+ struct cdp_tx_completion_ppdu *tmp_ppdu_desc;
+ uint8_t tmp_usr_idx;
+ qdf_nbuf_queue_t *tmp_ppdu_q;
+
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_ERROR,
+ "pending ppdus (%d, %d) : %d\n",
+ peer_id,
+ tx_tid->tid, pending_ppdus);
+ tmp_ppdu_q = &tx_tid->pending_ppdu_q;
+ tmp_nbuf = qdf_nbuf_queue_remove(tmp_ppdu_q);
+ if (qdf_unlikely(!tmp_nbuf)) {
+ qdf_assert_always(0);
+ return;
+ }
+
+ tmp_ppdu_desc =
+ (struct cdp_tx_completion_ppdu *)
+ qdf_nbuf_data(tmp_nbuf);
+ tmp_usr_idx = dp_tx_find_usr_idx_from_peer_id(
+ tmp_ppdu_desc, peer_id);
+ dp_send_data_to_stack(pdev, tmp_ppdu_desc,
+ tmp_usr_idx);
+ dp_ppdu_queue_free(tmp_nbuf, tmp_usr_idx);
+ qdf_nbuf_free(tmp_nbuf);
+ pdev->tx_capture.pend_ppdu_dropped++;
+ }
+ dp_tx_cap_peer_unref_del(peer);
+ }
+ }
+}
+
+static uint32_t
+dp_tx_cap_proc_per_ppdu_info(struct dp_pdev *pdev, qdf_nbuf_t nbuf_ppdu,
+ struct dp_tx_cap_nbuf_list nbuf_ppdu_list[],
+ uint32_t ppdu_desc_cnt)
+{
+ struct dp_tx_cap_nbuf_list *ptr_nbuf_list;
+ struct cdp_tx_completion_ppdu *ppdu_desc = NULL;
+ struct dp_peer *peer = NULL;
+ qdf_nbuf_queue_t head_msdu;
+ qdf_nbuf_queue_t head_xretries;
+ uint32_t retries = 0;
+ uint32_t ret = 0;
+ uint32_t start_tsf = 0;
+ uint32_t end_tsf = 0;
+ uint32_t bar_start_tsf = 0;
+ uint32_t bar_end_tsf = 0;
+ uint16_t tid = 0;
+ uint32_t num_msdu = 0;
+ uint32_t qlen = 0;
+ uint16_t peer_id;
+ uint8_t type, subtype;
+ uint8_t usr_idx;
+ bool is_bar_frm_with_data = false;
+ uint8_t usr_type;
+ uint8_t usr_subtype;
+
+ qdf_nbuf_queue_init(&head_msdu);
+ qdf_nbuf_queue_init(&head_xretries);
+
+ ppdu_desc = (struct cdp_tx_completion_ppdu *)qdf_nbuf_data(nbuf_ppdu);
+ type = (ppdu_desc->frame_ctrl &
+ IEEE80211_FC0_TYPE_MASK);
+ subtype = (ppdu_desc->frame_ctrl &
+ IEEE80211_FC0_SUBTYPE_MASK);
+
+ if ((type == IEEE80211_FC0_TYPE_DATA) &&
+ (subtype == IEEE80211_FC0_SUBTYPE_QOS_NULL) &&
+ (ppdu_desc->htt_frame_type ==
+ HTT_STATS_FTYPE_TIDQ_DATA_SU)) {
+ ppdu_desc->htt_frame_type =
+ HTT_STATS_FTYPE_SGEN_QOS_NULL;
+ }
+
+ usr_type = (ppdu_desc->user[0].frame_ctrl &
+ IEEE80211_FC0_TYPE_MASK);
+ usr_subtype = (ppdu_desc->user[0].frame_ctrl &
+ IEEE80211_FC0_SUBTYPE_MASK);
+
+ if (((type == IEEE80211_FC0_TYPE_CTL) &&
+ (subtype == IEEE80211_FC0_SUBTYPE_BAR) &&
+ (usr_type == IEEE80211_FC0_TYPE_DATA)) ||
+ ppdu_desc->htt_frame_type == HTT_STATS_FTYPE_SGEN_MU_BAR)
+ is_bar_frm_with_data = true;
+
+ ptr_nbuf_list = &nbuf_ppdu_list[ppdu_desc_cnt];
+
+ /* ppdu start timestamp */
+ start_tsf = ppdu_desc->ppdu_start_timestamp;
+ end_tsf = ppdu_desc->ppdu_end_timestamp;
+ bar_start_tsf = ppdu_desc->bar_ppdu_start_timestamp;
+ bar_end_tsf = ppdu_desc->bar_ppdu_end_timestamp;
+
+ if (((ppdu_desc->frame_type == CDP_PPDU_FTYPE_DATA) &&
+ (ppdu_desc->htt_frame_type !=
+ HTT_STATS_FTYPE_SGEN_QOS_NULL)) ||
+ is_bar_frm_with_data) {
+ uint32_t mpdu_suc;
+ uint32_t mpdu_tri;
+ uint8_t ref_cnt = 0;
+ uint8_t num_users = ppdu_desc->num_users;
+ struct dp_tx_tid *tx_tid;
+ struct cdp_tx_completion_ppdu *xretry_ppdu;
+ struct cdp_tx_completion_ppdu_user *xretry_user;
+ struct cdp_tx_completion_ppdu_user *user;
+ qdf_nbuf_queue_t *mpdu_q;
+ qdf_nbuf_queue_t *x_mpdu_q;
+
+ for (usr_idx = 0; usr_idx < num_users;
+ usr_idx++) {
+ uint32_t ppdu_id;
+
+ peer = NULL;
+ user = &ppdu_desc->user[usr_idx];
+ if (usr_idx + 1 != num_users)
+ qdf_nbuf_ref(nbuf_ppdu);
+
+ if (user->delayed_ba == 1) {
+ user->skip = 1;
+ goto free_nbuf_dec_ref;
+ }
+
+ peer_id = user->peer_id;
+ peer = dp_tx_cap_peer_find_by_id(pdev->soc,
+ peer_id);
+ /**
+ * peer can be NULL
+ */
+ if (!peer) {
+ user->skip = 1;
+ goto free_nbuf_dec_ref;
+ }
+
+ /**
+ * check whether it is bss peer,
+ * if bss_peer no need to process
+ * further check whether tx_capture
+ * feature is enabled for this peer
+ * or globally for all peers
+ */
+ if (peer->bss_peer ||
+ !dp_peer_or_pdev_tx_cap_enabled(pdev,
+ NULL, peer->mac_addr.raw)) {
+ user->skip = 1;
+ goto free_nbuf_dec_ref;
+ }
+
+ /* update failed bitmap */
+ dp_process_ppdu_stats_update_failed_bitmap(
+ pdev, user, ppdu_desc->ppdu_id,
+ CDP_BA_256_BIT_MAP_SIZE_DWORDS);
+ /* print the bit map */
+ dp_tx_print_bitmap(pdev, ppdu_desc,
+ usr_idx,
+ ppdu_desc->ppdu_id);
+ if (user->tid > DP_MAX_TIDS) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_ERROR,
+ "%s: ppdu[%d] peer_id[%d] TID[%d] > NON_QOS_TID!",
+ __func__,
+ ppdu_desc->ppdu_id,
+ user->peer_id,
+ user->tid);
+
+ user->skip = 1;
+ goto free_nbuf_dec_ref;
+ }
+
+ if (is_bar_frm_with_data)
+ ppdu_id = ppdu_desc->bar_ppdu_id;
+ else
+ ppdu_id = ppdu_desc->ppdu_id;
+
+ tid = user->tid;
+ num_msdu = user->num_msdu;
+
+dequeue_msdu_again:
+ /*
+ * retrieve msdu buffer based on ppdu_id & tid
+ * based msdu queue and store it in local queue
+ * sometimes, wbm comes later than per ppdu
+ * stats. Assumption: all packets are SU,
+ * and packets comes in order
+ */
+ ret = dp_tx_msdu_dequeue(peer,
+ ppdu_id,
+ tid,
+ num_msdu,
+ &head_msdu,
+ &head_xretries,
+ start_tsf,
+ end_tsf);
+
+ if (!ret && (++retries < 2)) {
+ /* wait for wbm to complete */
+ qdf_mdelay(2);
+ goto dequeue_msdu_again;
+ }
+
+ /*
+ * restitch mpdu from xretry msdu
+ * xretry msdu queue empty check is
+ * done inside restitch function
+ */
+ tx_tid = &peer->tx_capture.tx_tid[tid];
+ xretry_ppdu = &tx_tid->xretry_ppdu;
+ xretry_user = &xretry_ppdu->user[0];
+ xretry_ppdu->ppdu_id =
+ peer->tx_capture.tx_wifi_ppdu_id;
+ x_mpdu_q = &xretry_user->mpdu_q;
+
+ /* Restitch MPDUs from xretry MSDUs */
+ dp_tx_mon_restitch_mpdu(pdev, peer,
+ xretry_ppdu,
+ &head_xretries,
+ x_mpdu_q, 0);
+
+ qlen = qdf_nbuf_queue_len(x_mpdu_q);
+ dp_tx_cap_stats_mpdu_update(peer, PEER_MPDU_RESTITCH,
+ qlen);
+
+ if (qdf_nbuf_is_queue_empty(
+ &head_msdu)) {
+ user->skip = 1;
+ goto free_nbuf_dec_ref;
+ }
+
+ mpdu_q = &user->mpdu_q;
+ /*
+ * now head_msdu hold - msdu list for
+ * that particular ppdu_id, restitch
+ * mpdu from msdu and create a mpdu
+ * queue
+ */
+ dp_tx_mon_restitch_mpdu(pdev,
+ peer,
+ ppdu_desc,
+ &head_msdu,
+ mpdu_q,
+ usr_idx);
+ /*
+ * sanity: free local head msdu queue
+ * do we need this ?
+ */
+ qdf_nbuf_queue_free(&head_msdu);
+ qlen = qdf_nbuf_queue_len(mpdu_q);
+ dp_tx_cap_stats_mpdu_update(peer, PEER_MPDU_RESTITCH,
+ qlen);
+
+ if (!qlen) {
+ dp_ppdu_queue_free(nbuf_ppdu,
+ usr_idx);
+ user->skip = 1;
+ goto free_nbuf_dec_ref;
+ }
+
+ mpdu_suc = user->mpdu_success;
+ mpdu_tri = user->mpdu_tried_ucast +
+ user->mpdu_tried_mcast;
+
+ /* print ppdu_desc info for debugging purpose */
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_INFO,
+ "%s: ppdu[%d] b_ppdu_id[%d] p_id[%d], tid[%d], n_mpdu[%d %d] n_msdu[%d] retr[%d] qlen[%d] tsf[%u - %u] b_tsf[%u - %u] dur[%u] seq[%d] ppdu_desc_cnt[%d]",
+ __func__,
+ ppdu_desc->ppdu_id,
+ ppdu_desc->bar_ppdu_id,
+ user->peer_id,
+ user->tid,
+ ppdu_desc->num_mpdu,
+ mpdu_suc,
+ ppdu_desc->num_msdu, retries,
+ qlen,
+ start_tsf, end_tsf,
+ bar_start_tsf, bar_end_tsf,
+ ppdu_desc->tx_duration,
+ user->start_seq,
+ ppdu_desc_cnt);
+
+ dp_tx_cap_stats_mpdu_update(peer, PEER_MPDU_SUCC,
+ mpdu_suc);
+ dp_tx_cap_stats_mpdu_update(peer, PEER_MPDU_TRI,
+ mpdu_tri);
+ dp_tx_cap_peer_unref_del(peer);
+ /* get reference count */
+ ref_cnt = qdf_nbuf_get_users(nbuf_ppdu);
+ continue;
+free_nbuf_dec_ref:
+ /* get reference before free */
+ ref_cnt = qdf_nbuf_get_users(nbuf_ppdu);
+ qdf_nbuf_free(nbuf_ppdu);
+ ref_cnt--;
+ if (peer)
+ dp_tx_cap_peer_unref_del(peer);
+ continue;
+ }
+
+ if (ref_cnt == 0)
+ return ppdu_desc_cnt;
+ ptr_nbuf_list->nbuf_ppdu = nbuf_ppdu;
+ dp_tx_cap_nbuf_list_update_ref(ptr_nbuf_list, ref_cnt);
+ ppdu_desc_cnt++;
+ } else {
+ /*
+ * other packet frame also added to
+ * descriptor list
+ */
+ /* print ppdu_desc info for debugging purpose */
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_INFO_HIGH,
+ "%s: ppdu[%d], p_id[%d], tid[%d], fctrl[0x%x 0x%x] ftype[%d] h_frm_t[%d] seq[%d] tsf[%u b %u] dur[%u]",
+ __func__, ppdu_desc->ppdu_id,
+ ppdu_desc->user[0].peer_id,
+ ppdu_desc->user[0].tid,
+ ppdu_desc->frame_ctrl,
+ ppdu_desc->user[0].frame_ctrl,
+ ppdu_desc->frame_type,
+ ppdu_desc->htt_frame_type,
+ ppdu_desc->user[0].start_seq,
+ ppdu_desc->ppdu_start_timestamp,
+ ppdu_desc->bar_ppdu_start_timestamp,
+ ppdu_desc->tx_duration);
+
+ ptr_nbuf_list->nbuf_ppdu = nbuf_ppdu;
+ dp_tx_cap_nbuf_list_update_ref(ptr_nbuf_list,
+ 1);
+ ppdu_desc_cnt++;
+ }
+
+ return ppdu_desc_cnt;
}
/**
@@ -3325,10 +4750,12 @@
STAILQ_HEAD(, ppdu_info) sched_ppdu_queue;
struct ppdu_info *sched_ppdu_list_last_ptr;
- qdf_nbuf_t *nbuf_ppdu_desc_list;
+ struct dp_tx_cap_nbuf_list *nbuf_ppdu_list;
+ struct dp_tx_cap_nbuf_list *ptr_nbuf_list;
qdf_nbuf_t tmp_nbuf;
+ qdf_nbuf_t nbuf_ppdu;
struct dp_pdev_tx_capture *ptr_tx_cap = &pdev->tx_capture;
- qdf_nbuf_queue_t head_xretries;
+ size_t nbuf_list_sz;
STAILQ_INIT(&sched_ppdu_queue);
/* Move the PPDU entries to defer list */
@@ -3370,14 +4797,15 @@
ptr_tx_cap->ppdu_stats_defer_queue_depth -= ppdu_cnt;
- nbuf_ppdu_desc_list =
- (qdf_nbuf_t *) qdf_mem_malloc(sizeof(qdf_nbuf_t) *
- ppdu_cnt);
+ nbuf_list_sz = sizeof(struct dp_tx_cap_nbuf_list);
+ nbuf_ppdu_list = (struct dp_tx_cap_nbuf_list *)
+ qdf_mem_malloc(nbuf_list_sz * ppdu_cnt);
+
/*
* if there is no memory allocated we need to free sched ppdu
* list, no ppdu stats will be updated.
*/
- if (!nbuf_ppdu_desc_list) {
+ if (!nbuf_ppdu_list) {
STAILQ_FOREACH_SAFE(sched_ppdu_info,
&sched_ppdu_queue,
ppdu_info_queue_elem,
@@ -3395,60 +4823,31 @@
STAILQ_FOREACH_SAFE(sched_ppdu_info,
&sched_ppdu_queue,
ppdu_info_queue_elem, tmp_ppdu_info) {
- struct cdp_tx_completion_ppdu *ppdu_desc = NULL;
- struct dp_peer *peer = NULL;
- qdf_nbuf_t nbuf;
- uint32_t retries = 0;
- uint32_t ret = 0;
- qdf_nbuf_queue_t head_msdu;
- uint32_t start_tsf = 0;
- uint32_t end_tsf = 0;
- uint16_t tid = 0;
- uint32_t num_msdu = 0;
- uint32_t qlen = 0;
- uint16_t peer_id;
- uint8_t type, subtype;
-
- qdf_nbuf_queue_init(&head_msdu);
- qdf_nbuf_queue_init(&head_xretries);
-
ppdu_info = sched_ppdu_info;
- ppdu_desc = (struct cdp_tx_completion_ppdu *)
- qdf_nbuf_data(ppdu_info->nbuf);
- pdev->tx_ppdu_proc++;
+ pdev->stats.tx_ppdu_proc++;
+ /* update ppdu desc user stats */
dp_ppdu_desc_user_stats_update(pdev, ppdu_info);
/*
* While processing/corelating Tx buffers, we should
* hold the entire PPDU list for the give sched_cmdid
* instead of freeing below.
*/
- nbuf = ppdu_info->nbuf;
+ nbuf_ppdu = ppdu_info->nbuf;
qdf_mem_free(ppdu_info);
- qdf_assert_always(nbuf);
+ qdf_assert_always(nbuf_ppdu);
- ppdu_desc = (struct cdp_tx_completion_ppdu *)
- qdf_nbuf_data(nbuf);
- type = (ppdu_desc->frame_ctrl &
- IEEE80211_FC0_TYPE_MASK);
- subtype = (ppdu_desc->frame_ctrl &
- IEEE80211_FC0_SUBTYPE_MASK);
-
- if ((type == IEEE80211_FC0_TYPE_DATA) &&
- (subtype == IEEE80211_FC0_SUBTYPE_QOS_NULL) &&
- (ppdu_desc->htt_frame_type ==
- HTT_STATS_FTYPE_TIDQ_DATA_SU)) {
- ppdu_desc->htt_frame_type =
- HTT_STATS_FTYPE_SGEN_QOS_NULL;
- }
-
- /* send WDI event */
+ /* check tx capture disable */
if (pdev->tx_capture_enabled ==
CDP_TX_ENH_CAPTURE_DISABLED) {
+ struct cdp_tx_completion_ppdu *ppdu_desc;
+
if (!pdev->tx_capture.tx_cap_mode_flag)
dp_enh_tx_capture_disable(pdev);
+ ppdu_desc = (struct cdp_tx_completion_ppdu *)
+ qdf_nbuf_data(nbuf_ppdu);
/**
* Deliver PPDU stats only for valid (acked)
* data frames if sniffer mode is not enabled.
@@ -3462,7 +4861,7 @@
dp_wdi_event_handler(
WDI_EVENT_TX_PPDU_DESC,
pdev->soc,
- nbuf,
+ nbuf_ppdu,
HTT_INVALID_PEER,
WDI_NO_VAL,
pdev->pdev_id);
@@ -3474,174 +4873,24 @@
dp_wdi_event_handler(
WDI_EVENT_TX_PPDU_DESC,
pdev->soc,
- nbuf,
+ nbuf_ppdu,
HTT_INVALID_PEER,
WDI_NO_VAL,
pdev->pdev_id);
} else {
- qdf_nbuf_free(nbuf);
+ qdf_nbuf_free(nbuf_ppdu);
}
}
continue;
- }
-
- /* Drop all type of MU frame */
- if ((ppdu_desc->htt_frame_type ==
- HTT_STATS_FTYPE_TIDQ_DATA_MU) ||
- ((ppdu_desc->htt_frame_type >=
- HTT_STATS_FTYPE_SGEN_MU_BAR) &&
- (ppdu_desc->htt_frame_type <=
- HTT_STATS_FTYPE_SGEN_MU_BSR))) {
- qdf_nbuf_free(nbuf);
- continue;
- }
-
- if (((ppdu_desc->frame_type == CDP_PPDU_FTYPE_DATA) &&
- (ppdu_desc->htt_frame_type !=
- HTT_STATS_FTYPE_SGEN_QOS_NULL)) ||
- (ppdu_desc->num_mpdu &&
- ppdu_desc->frame_type == CDP_PPDU_FTYPE_BAR)) {
- peer_id = ppdu_desc->user[0].peer_id;
- peer = dp_tx_cap_peer_find_by_id(pdev->soc,
- peer_id);
- /**
- * peer can be NULL
- */
- if (!peer) {
- qdf_nbuf_free(nbuf);
- continue;
- }
-
- /**
- * check whether it is bss peer,
- * if bss_peer no need to process further
- * check whether tx_capture feature is enabled
- * for this peer or globally for all peers
- */
- if (peer->bss_peer ||
- !dp_peer_or_pdev_tx_cap_enabled(pdev,
- peer, peer->mac_addr.raw)) {
- dp_tx_cap_peer_unref_del(peer);
- qdf_nbuf_free(nbuf);
- continue;
- }
-
- /* print the bit map */
- dp_tx_print_bitmap(pdev, ppdu_desc,
- 0, ppdu_desc->ppdu_id);
- if (ppdu_desc->user[0].tid > DP_MAX_TIDS) {
- QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_ERROR,
- "%s: ppdu[%d] peer_id[%d] TID[%d] > NON_QOS_TID!",
- __func__,
- ppdu_desc->ppdu_id,
- ppdu_desc->user[0].peer_id,
- ppdu_desc->user[0].tid);
-
- dp_tx_cap_peer_unref_del(peer);
- qdf_nbuf_free(nbuf);
- continue;
- }
-
- tid = ppdu_desc->user[0].tid;
-dequeue_msdu_again:
- num_msdu = ppdu_desc->user[0].num_msdu;
- start_tsf = ppdu_desc->ppdu_start_timestamp;
- end_tsf = ppdu_desc->ppdu_end_timestamp;
- /*
- * retrieve msdu buffer based on ppdu_id & tid
- * based msdu queue and store it in local queue
- * sometimes, wbm comes later than per ppdu
- * stats. Assumption: all packets are SU,
- * and packets comes in order
- */
- ret = dp_tx_msdu_dequeue(peer,
- ppdu_desc->ppdu_id,
- ppdu_desc->user[0].tid,
- num_msdu,
- &head_msdu,
- &head_xretries,
- start_tsf, end_tsf);
-
- if (!ret && (++retries < 2)) {
- /* wait for wbm to complete */
- qdf_mdelay(2);
- goto dequeue_msdu_again;
- }
-
- if (!qdf_nbuf_is_queue_empty(&head_xretries)) {
- struct dp_tx_tid *tx_tid =
- &peer->tx_capture.tx_tid[tid];
- struct cdp_tx_completion_ppdu
- *xretry_ppdu =
- &tx_tid->xretry_ppdu;
-
- xretry_ppdu->ppdu_id =
- peer->tx_capture.tx_wifi_ppdu_id;
- /* Restitch MPDUs from xretry MSDUs */
- dp_tx_mon_restitch_mpdu(pdev, peer,
- xretry_ppdu,
- &head_xretries,
- &xretry_ppdu->mpdu_q);
- }
- if (!qdf_nbuf_is_queue_empty(&head_msdu)) {
- /*
- * now head_msdu hold - msdu list for
- * that particular ppdu_id, restitch
- * mpdu from msdu and create a mpdu
- * queue
- */
- dp_tx_mon_restitch_mpdu(pdev, peer,
- ppdu_desc,
- &head_msdu,
- &ppdu_desc->mpdu_q);
- /*
- * sanity: free local head msdu queue
- * do we need this ?
- */
- qdf_nbuf_queue_free(&head_msdu);
- qlen =
- qdf_nbuf_queue_len(&ppdu_desc->mpdu_q);
- if (!qlen) {
- qdf_nbuf_free(nbuf);
- dp_tx_cap_peer_unref_del(peer);
- continue;
- }
- } else {
- qdf_nbuf_free(nbuf);
- dp_tx_cap_peer_unref_del(peer);
- continue;
- }
-
- nbuf_ppdu_desc_list[ppdu_desc_cnt++] = nbuf;
-
- /* print ppdu_desc info for debugging purpose */
- QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
- QDF_TRACE_LEVEL_INFO,
- "%s: ppdu[%d], p_id[%d], tid[%d], n_mpdu[%d %d] n_msdu[%d] retr[%d] qlen[%d] s_tsf[%u] dur[%u] seq[%d] [%d %d]",
- __func__, ppdu_desc->ppdu_id,
- ppdu_desc->user[0].peer_id,
- ppdu_desc->user[0].tid,
- ppdu_desc->num_mpdu,
- ppdu_desc->user[0].mpdu_success,
- ppdu_desc->num_msdu, retries,
- qlen,
- ppdu_desc->ppdu_start_timestamp,
- ppdu_desc->tx_duration,
- ppdu_desc->user[0].start_seq,
- ppdu_cnt,
- ppdu_desc_cnt);
-
- dp_tx_cap_peer_unref_del(peer);
} else {
- /*
- * other packet frame also added to
- * descriptor list
- */
- nbuf_ppdu_desc_list[ppdu_desc_cnt++] = nbuf;
+ /* process ppdu_info on tx capture turned on */
+ ppdu_desc_cnt = dp_tx_cap_proc_per_ppdu_info(
+ pdev,
+ nbuf_ppdu,
+ nbuf_ppdu_list,
+ ppdu_desc_cnt);
}
-
}
/*
@@ -3649,12 +4898,27 @@
* based on packet capture flags send mpdu info to upper stack
*/
if (ppdu_desc_cnt) {
- dp_check_ppdu_and_deliver(pdev, nbuf_ppdu_desc_list,
+ uint32_t i;
+
+ dp_check_ppdu_and_deliver(pdev, nbuf_ppdu_list,
ppdu_desc_cnt);
+
+ for (i = 0; i < ppdu_desc_cnt; i++) {
+ ptr_nbuf_list = &nbuf_ppdu_list[i];
+
+ if (dp_tx_cap_nbuf_list_get_ref(
+ ptr_nbuf_list)) {
+ QDF_TRACE(QDF_MODULE_ID_TX_CAPTURE,
+ QDF_TRACE_LEVEL_FATAL,
+ "%s: %d missing handling of ppdu_desc ref_cnt:%d ,i : %d!!!\n",
+ __func__, __LINE__,
+ ptr_nbuf_list->ref_cnt, i);
+ }
+ }
}
qdf_spin_unlock(&ptr_tx_cap->config_lock);
- qdf_mem_free(nbuf_ppdu_desc_list);
+ qdf_mem_free(nbuf_ppdu_list);
qdf_spin_lock(&pdev->tx_capture.config_lock);
if (!pdev->tx_capture.tx_cap_mode_flag)
@@ -3682,6 +4946,7 @@
ppdu_desc = (struct cdp_tx_completion_ppdu *)
qdf_nbuf_data(ppdu_info->nbuf);
+ ppdu_desc->tlv_bitmap = ppdu_info->tlv_bitmap;
qdf_spin_lock_bh(&pdev->tx_capture.ppdu_stats_lock);
@@ -3885,6 +5150,7 @@
struct dp_ast_entry *ast_entry;
uint32_t peer_id;
struct dp_peer *peer;
+ struct dp_vdev *vdev = NULL;
if (rx_user_status->ast_index >=
wlan_cfg_get_max_ast_idx(soc->wlan_cfg_ctx)) {
@@ -3915,6 +5181,21 @@
return QDF_STATUS_E_FAILURE;
}
+ if (pdev->tx_capture_enabled == CDP_TX_ENH_CAPTURE_ENABLE_ALL_PEERS) {
+ int8_t match = 0;
+
+ TAILQ_FOREACH(vdev, &pdev->vdev_list, vdev_list_elem) {
+ if (!qdf_mem_cmp(vdev->mac_addr.raw,
+ ppdu_info->rx_info.mac_addr1,
+ QDF_MAC_ADDR_SIZE)) {
+ match = 1;
+ break;
+ }
+ }
+ if (!match)
+ return QDF_STATUS_E_FAILURE;
+ }
+
set_mpdu_info(&tx_capture_info,
&ppdu_info->rx_status, rx_user_status);
tx_capture_info.mpdu_info.mcs = rx_user_status->mcs;
@@ -3992,6 +5273,9 @@
NULL, ptr_mac_addr))
return;
+ if (IEEE80211_IS_ZERO(ppdu_info->nac_info.mac_addr2))
+ return;
+
set_mpdu_info(&tx_capture_info,
rx_status, rx_user_status);
tx_capture_info.mpdu_nbuf =
@@ -4007,6 +5291,9 @@
dp_wdi_event_handler(WDI_EVENT_TX_DATA, pdev->soc,
&tx_capture_info, HTT_INVALID_PEER,
WDI_NO_VAL, pdev->pdev_id);
+
+ if (tx_capture_info.mpdu_nbuf)
+ qdf_nbuf_free(tx_capture_info.mpdu_nbuf);
return;
}
@@ -4069,6 +5356,8 @@
&tx_capture_info, HTT_INVALID_PEER,
WDI_NO_VAL, pdev->pdev_id);
+ if (tx_capture_info.mpdu_nbuf)
+ qdf_nbuf_free(tx_capture_info.mpdu_nbuf);
}
/**
* dp_send_ack_frame_to_stack(): Function to generate BA or ACK frame and
@@ -4090,6 +5379,11 @@
rx_status = &ppdu_info->rx_status;
+ if (ppdu_info->sw_frame_group_id ==
+ HAL_MPDU_SW_FRAME_GROUP_CTRL_RTS) {
+ return dp_send_cts_frame_to_stack(soc, pdev, ppdu_info);
+ }
+
if (!rx_status->rxpcu_filter_pass)
return QDF_STATUS_SUCCESS;
@@ -4104,10 +5398,6 @@
return QDF_STATUS_SUCCESS;
}
- if (ppdu_info->sw_frame_group_id ==
- HAL_MPDU_SW_FRAME_GROUP_CTRL_RTS)
- return dp_send_cts_frame_to_stack(soc, pdev, ppdu_info);
-
if (ppdu_info->sw_frame_group_id == HAL_MPDU_SW_FRAME_GROUP_CTRL_BAR)
return QDF_STATUS_SUCCESS;
diff --git a/dp/wifi3.0/dp_tx_capture.h b/dp/wifi3.0/dp_tx_capture.h
index 3988a21..dc298e4 100644
--- a/dp/wifi3.0/dp_tx_capture.h
+++ b/dp/wifi3.0/dp_tx_capture.h
@@ -40,6 +40,37 @@
#define RTS_INTERVAL 40
#define MAX_MGMT_PEER_FILTER 16
+
+/* stats */
+enum CDP_PEER_MSDU_DESC {
+ PEER_MSDU_SUCC,
+ PEER_MSDU_ENQ,
+ PEER_MSDU_DEQ,
+ PEER_MSDU_FLUSH,
+ PEER_MSDU_DROP,
+ PEER_MSDU_XRETRY,
+ PEER_MSDU_DESC_MAX,
+};
+
+enum CDP_PEER_MPDU_DESC {
+ PEER_MPDU_TRI,
+ PEER_MPDU_SUCC,
+ PEER_MPDU_RESTITCH,
+ PEER_MPDU_ARR,
+ PEER_MPDU_CLONE,
+ PEER_MPDU_TO_STACK,
+ PEER_MPDU_DESC_MAX,
+};
+
+#ifdef WLAN_TX_PKT_CAPTURE_ENH_DEBUG
+struct dp_peer_tx_capture_stats {
+ /* mpdu success and restich count */
+ uint32_t mpdu[PEER_MPDU_DESC_MAX];
+ /*msdu success and restich count */
+ uint32_t msdu[PEER_MSDU_DESC_MAX];
+};
+#endif
+
struct dp_peer_mgmt_list {
uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
uint32_t mgmt_pkt_counter;
@@ -47,6 +78,11 @@
bool avail;
};
+struct dp_tx_cap_nbuf_list {
+ qdf_nbuf_t nbuf_ppdu;
+ uint8_t ref_cnt;
+};
+
struct dp_pdev_tx_capture {
/* For deferred PPDU status processing */
qdf_spinlock_t ppdu_stats_lock;
@@ -64,8 +100,10 @@
qdf_spinlock_t msdu_comp_q_list_lock;
uint32_t missed_ppdu_id;
uint32_t last_msdu_id;
+ uint16_t last_peer_id;
qdf_event_t miss_ppdu_event;
uint32_t ppdu_dropped;
+ uint32_t pend_ppdu_dropped;
qdf_nbuf_queue_t ctl_mgmt_q[TXCAP_MAX_TYPE][TXCAP_MAX_SUBTYPE];
qdf_nbuf_queue_t retries_ctl_mgmt_q[TXCAP_MAX_TYPE][TXCAP_MAX_SUBTYPE];
qdf_spinlock_t ctl_mgmt_lock[TXCAP_MAX_TYPE][TXCAP_MAX_SUBTYPE];
@@ -80,10 +118,14 @@
struct dp_tx_tid {
/* TID */
uint8_t tid;
+ /* peer id */
+ uint16_t peer_id;
/* max ppdu_id in a tid */
uint32_t max_ppdu_id;
/* tx_tid lock */
qdf_spinlock_t tid_lock;
+ qdf_spinlock_t tasklet_tid_lock;
+ qdf_nbuf_queue_t defer_msdu_q;
qdf_nbuf_queue_t msdu_comp_q;
qdf_nbuf_queue_t pending_ppdu_q;
struct cdp_tx_completion_ppdu xretry_ppdu;
@@ -100,11 +142,28 @@
* for each ppdu, we update and used on rest of mpdu
*/
uint32_t tx_wifi_ppdu_id;
- struct ieee80211_frame tx_wifi_hdr;
- struct ieee80211_qoscntl tx_qoscntl;
+ union {
+ struct ieee80211_frame tx_wifi_hdr;
+ struct ieee80211_qosframe tx_wifi_qos_hdr;
+ };
+ union {
+ struct ieee80211_frame_addr4 tx_wifi_addr4_hdr;
+ struct ieee80211_qosframe_addr4 tx_wifi_addr4_qos_hdr;
+ };
+#ifdef WLAN_TX_PKT_CAPTURE_ENH_DEBUG
+ struct dp_peer_tx_capture_stats stats;
+#endif
};
/*
+ * dp_peer_tid_peer_id_update() – update peer_id to tid structure
+ * @peer: Datapath peer
+ * @peer_id: peer_id
+ *
+ */
+void dp_peer_tid_peer_id_update(struct dp_peer *peer, uint16_t peer_id);
+
+/*
* dp_peer_tid_queue_init() – Initialize ppdu stats queue per TID
* @peer: Datapath peer
*
diff --git a/qal/inc/qal_streamfs.h b/qal/inc/qal_streamfs.h
deleted file mode 100644
index 2fc623c..0000000
--- a/qal/inc/qal_streamfs.h
+++ /dev/null
@@ -1,154 +0,0 @@
-/*
- * Copyright (c) 2018 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.
- */
-
-/**
- * DOC: qal_streamfs
- * stream file system APIs
- */
-
-#if !defined(__QAL_STREAMFS_H)
-#define _QAL_STREAMFS_H
-
-/* Include Files */
-#include <qdf_types.h>
-
-struct qal_streamfs_chan;
-struct qal_dentry_t;
-struct qal_streamfs_chan_callbacks;
-struct qal_streamfs_chan_buf;
-
-/**
- * qal_streamfs_create_dir() - Create streamfs directory
- * @name: name of directory to create
- * @parent: dentry of parent directory, NULL for root directory
- *
- * Returns directory dentry pointer if successful, NULL otherwise.
- */
-struct qal_dentry_t *
-qal_streamfs_create_dir(const char *name, struct qal_dentry_t *parent);
-
-/**
- * qal_streamfs_create_file() - Create streamfs chan buffer file
- * @name: base name of file to create
- * @mode: filemode
- * @parent: dentry of parent directory, NULL for root directory
- * @buf: pointer to chan buffer
- *
- * Returns file dentry pointer if successful, NULL otherwise.
- */
-struct qal_dentry_t *
-qal_streamfs_create_file(const char *name, uint16_t mode,
- struct qal_dentry_t *parent,
- struct qal_streamfs_chan_buf *buf);
-
-/**
- * qal_streamfs_remove_dir_recursive() - Remove streamfs directory recursive
- * @d: dentry of the directory
- */
-void qal_streamfs_remove_dir_recursive(struct qal_dentry_t *d);
-
-/**
- * qal_streamfs_remove_dir() - Remove streamfs directory
- * @d: dentry of the directory
- */
-void qal_streamfs_remove_dir(struct qal_dentry_t *d);
-
-/**
- * qal_streamfs_remove_file() - Remove streamfs chan buffer file
- * @d: dentry of the buffer file
- */
-void qal_streamfs_remove_file(struct qal_dentry_t *d);
-
-/**
- * qal_streamfs_open() - Create streamfs channel for data trasfer
- * @base_filename: base name of files to create, %NULL for buffering only
- * @parent: dentry of parent directory, %NULL for root directory
- * @subbuf_size: size of sub-buffers
- * @n_subbufs: number of sub-buffers
- * @cb: streamfs channel callback functions
- * @private_data: user-defined data
- *
- * Returns channel pointer if successful, %NULL otherwise.
- */
-struct qal_streamfs_chan *
-qal_streamfs_open(const char *base_filename,
- struct qal_dentry_t *parent,
- size_t subbuf_size, size_t n_subbufs,
- struct qal_streamfs_chan_callbacks *cb,
- void *private_data);
-
-/**
- * qal_streamfs_close() - Closes all channel buffers and frees the channel.
- * @chan: pointer to qal_streamfs_chan.
- *
- * Returns NONE
- */
-void qal_streamfs_close(struct qal_streamfs_chan *chan);
-
-/**
- * qal_streamfs_flush() - Flushes all channel buffers.
- * @chan: pointer to qal_streamfs_chan.
- *
- * Returns NONE
- */
-void qal_streamfs_flush(struct qal_streamfs_chan *chan);
-
-/**
- * qal_streamfs_reset - reset streamfs channel
- * This erases data from all channel buffers and restarting the channel
- * in its initial state.
- * The buffers are not freed, so any mappings are still in effect.
- * @chan: pointer to qal_streamfs_chan.
- *
- * Returns NONE
- */
-void qal_streamfs_reset(struct qal_streamfs_chan *chan);
-
-/**
- * qal_streamfs_subbufs_consumed - update the buffer's sub-buffers-consumed
- * count
- * @chan: pointer to qal_streamfs_chan.
- * @cpu: the cpu associated with the channel buffer to update
- * @subbufs_consumed: number of sub-buffers to add to current buf's count
- *
- * Returns NONE
- */
-void qal_streamfs_subbufs_consumed(struct qal_streamfs_chan *chan,
- unsigned int cpu,
- size_t consumed);
-
-/**
- * qal_streamfs_write - write data into the channel
- * @chan: relay channel
- * @data: data to be written
- * @length: number of bytes to write
- *
- * Writes data into the current cpu's channel buffer.
- */
-void qal_streamfs_write(struct qal_streamfs_chan *chan, const void *data,
- size_t length);
-
-/**
- * qal_streamfs_buf_full - boolean, is the channel buffer full?
- * @buf: channel buffer
- *
- * Returns 1 if the buffer is full, 0 otherwise.
- */
-int qal_streamfs_buf_full(struct qal_streamfs_chan_buf *buf);
-
-#endif
diff --git a/qal/linux/src/qal_streamfs.c b/qal/linux/src/qal_streamfs.c
deleted file mode 100644
index 2be7ddc..0000000
--- a/qal/linux/src/qal_streamfs.c
+++ /dev/null
@@ -1,201 +0,0 @@
-/*
- * Copyright (c) 2018 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.
- */
-
-/**
- * DOC: qal_streamfs
- * This file provides OS dependent stream filesystem APIs
- */
-#include <qdf_module.h>
-#include <qal_streamfs.h>
-#include <relay.h>
-#include <debugfs.h>
-
-struct qal_dentry_t *
-qal_streamfs_create_dir(const char *name, struct qal_dentry_t *parent)
-{
- struct dentry *dir = NULL;
-
- if (!name)
- return NULL;
-
- dir = debugfs_create_dir(name, (struct dentry *)parent);
-
- return (struct qal_dentry_t *)dir;
-}
-qdf_export_symbol(qal_streamfs_create_dir);
-
-struct qal_dentry_t *
-qal_streamfs_create_file(const char *name, uint16_t mode,
- struct qal_dentry_t *parent,
- struct qal_streamfs_chan_buf *buf)
-{
- struct dentry *file = NULL;
-
- if (!name)
- return NULL;
-
- file = debugfs_create_file(name, mode, (struct dentry *)parent,
- (struct rchan_buf *)buf,
- &relay_file_operations);
-
- return (struct qal_dentry_t *)file;
-}
-qdf_export_symbol(qal_streamfs_create_file);
-
-void qal_streamfs_remove_dir_recursive(struct qal_dentry_t *d)
-{
- debugfs_remove_recursive((struct dentry *)d);
-}
-qdf_export_symbol(qal_streamfs_remove_dir_recursive);
-
-void qal_streamfs_remove_dir(struct qal_dentry_t *d)
-{
- debugfs_remove((struct dentry *)d);
-}
-qdf_export_symbol(qal_streamfs_remove_dir);
-
-void qal_streamfs_remove_file(struct qal_dentry_t *d)
-{
- debugfs_remove((struct dentry *)d);
-}
-qdf_export_symbol(qal_streamfs_remove_file);
-
-
-/**
- * qal_streamfs_open() - Create streamfs channel for data trasfer
- * @base_filename: base name of files to create, %NULL for buffering only
- * @parent: dentry of parent directory, %NULL for root directory
- * @subbuf_size: size of sub-buffers
- * @n_subbufs: number of sub-buffers
- * @cb: streamfs channel callback functions
- * @private_data: user-defined data
- *
- * Returns channel pointer if successful, %NULL otherwise.
- */
-struct qal_streamfs_chan *
-qal_streamfs_open(const char *base_filename,
- struct qal_dentry_t *parent,
- size_t subbuf_size, size_t n_subbufs,
- struct qal_streamfs_chan_callbacks *cb,
- void *private_data)
-{
- struct rchan *channel_ptr = NULL;
-
- channel_ptr = relay_open(base_filename, (struct dentry *)parent,
- subbuf_size, n_subbufs,
- (struct rchan_callbacks *)cb, private_data);
-
- return (struct qal_streamfs_chan *)channel_ptr;
-}
-
-qdf_export_symbol(qal_streamfs_open);
-
-/**
- * qal_streamfs_close() - Closes all channel buffers and frees the channel.
- * @chan: pointer to qal_streamfs_chan.
- *
- * Returns NONE
- */
-void qal_streamfs_close(struct qal_streamfs_chan *chan)
-{
- if (chan)
- relay_close((struct rchan *)chan);
-}
-
-qdf_export_symbol(qal_streamfs_close);
-
-/**
- * qal_streamfs_flush() - Flushes all channel buffers.
- * @chan: pointer to qal_streamfs_chan.
- *
- * Returns NONE
- */
-void qal_streamfs_flush(struct qal_streamfs_chan *chan)
-{
- if (chan)
- relay_flush((struct rchan *)chan);
-}
-
-qdf_export_symbol(qal_streamfs_flush);
-
-/**
- * qal_streamfs_reset - reset streamfs channel
- * This erases data from all channel buffers and restarting the channel
- * in its initial state.
- * The buffers are not freed, so any mappings are still in effect.
- * @chan: pointer to qal_streamfs_chan.
- *
- * Returns NONE
- */
-void qal_streamfs_reset(struct qal_streamfs_chan *chan)
-{
- if (chan)
- relay_reset((struct rchan *)chan);
-}
-
-qdf_export_symbol(qal_streamfs_reset);
-
-/**
- * qal_streamfs_subbufs_consumed - update the buffer's sub-buffers-consumed
- * count
- * @chan: pointer to qal_streamfs_chan.
- * @cpu: the cpu associated with the channel buffer to update
- * @subbufs_consumed: number of sub-buffers to add to current buf's count
- *
- * Returns NONE
- */
-void qal_streamfs_subbufs_consumed(struct qal_streamfs_chan *chan,
- unsigned int cpu,
- size_t consumed)
-{
- if (chan)
- relay_subbufs_consumed((struct rchan *)chan, cpu, consumed);
-}
-
-qdf_export_symbol(qal_streamfs_subbufs_consumed);
-
-/**
- * qal_streamfs_write - write data into the channel
- * @chan: relay channel
- * @data: data to be written
- * @length: number of bytes to write
- *
- * Writes data into the current cpu's channel buffer.
- */
-inline void qal_streamfs_write(struct qal_streamfs_chan *chan,
- const void *data,
- size_t length)
-{
- if (chan)
- relay_write((struct rchan *)chan, data, length);
-}
-
-qdf_export_symbol(qal_streamfs_write);
-
-/**
- * qal_streamfs_buf_full - boolean, is the channel buffer full?
- * @buf: channel buffer
- *
- * Returns 1 if the buffer is full, 0 otherwise.
- */
-int qal_streamfs_buf_full(struct qal_streamfs_chan_buf *buf)
-{
- return relay_buf_full((struct rchan_buf *)buf);
-}
-
-qdf_export_symbol(qal_streamfs_buf_full);
diff --git a/target_if/cfr/inc/target_if_cfr.h b/target_if/cfr/inc/target_if_cfr.h
deleted file mode 100644
index d1533ff..0000000
--- a/target_if/cfr/inc/target_if_cfr.h
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 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.
- */
-
-#ifndef _TARGET_IF_CFR_H_
-#define _TARGET_IF_CFR_H_
-
-#include <wlan_objmgr_cmn.h>
-#include <wlan_objmgr_psoc_obj.h>
-#include <wlan_objmgr_pdev_obj.h>
-#include <wlan_objmgr_vdev_obj.h>
-#include <wlan_objmgr_peer_obj.h>
-
-#include "wmi_unified_cfr_api.h"
-#include "wmi_unified_param.h"
-#include "wmi_unified_cfr_param.h"
-#define PEER_CFR_CAPTURE_ENABLE 1
-#define PEER_CFR_CAPTURE_DISABLE 0
-
-#define PEER_CFR_CAPTURE_EVT_STATUS_MASK 0x80000000
-#define PEER_CFR_CAPTURE_EVT_PS_STATUS_MASK 0x40000000
-#define CFR_TX_EVT_STATUS_MASK 0x00000003
-
-/* Status codes used by correlate and relay function */
-#define STATUS_STREAM_AND_RELEASE 0
-#define STATUS_HOLD 1
-#define STATUS_ERROR -1
-
-/* Module IDs using corrlation function */
-#define CORRELATE_DBR_MODULE_ID 0
-/*
- * HKV2 - Tx completion event for one-shot capture
- * Cypress - Tx completion event for one-shot capture (or) RXTLV event for RCC
- */
-#define CORRELATE_TX_EV_MODULE_ID 1
-
-/**
- * target_if_cfr_init_pdev() - Inits cfr pdev and registers necessary handlers.
- * @psoc: pointer to psoc object
- * @pdev: pointer to pdev object
- *
- * Return: Registration status for necessary handlers
- */
-int target_if_cfr_init_pdev(struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev);
-
-/**
- * target_if_cfr_deinit_pdev() - De-inits corresponding pdev and handlers.
- * @psoc: pointer to psoc object
- * @pdev: pointer to pdev object
- *
- * Return: De-registration status for necessary handlers
- */
-int target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev);
-
-/**
- * target_if_cfr_tx_ops_register() - Registers tx ops for cfr module
- * @tx_ops - pointer to tx_ops structure.
- */
-void target_if_cfr_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops);
-
-/**
- * target_if_cfr_enable_cfr_timer() - Enables cfr timer
- * @pdev: pointer to pdev object
- * @cfr_timer: Amount of time this timer has to run
- *
- * Return: status of timer
- */
-int target_if_cfr_enable_cfr_timer(struct wlan_objmgr_pdev *pdev,
- uint32_t cfr_timer);
-
-/**
- * target_if_cfr_pdev_set_param() - Function to set params for cfr config
- * @pdev: pointer to pdev object
- * @param_id: param id which has to be set
- * @param_value: value of param being set
- *
- * Return: success/failure of setting param
- */
-int target_if_cfr_pdev_set_param(struct wlan_objmgr_pdev *pdev,
- uint32_t param_id, uint32_t param_value);
-/**
- * target_if_cfr_start_capture() - Function to start cfr capture for a peer
- * @pdev: pointer to pdev object
- * @peer: pointer to peer object
- * @cfr_params: capture parameters for this peer
- *
- * Return: success/failure status of start capture
- */
-int target_if_cfr_start_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer,
- struct cfr_capture_params *cfr_params);
-/**
- * target_if_cfr_stop_capture() - Function to stop cfr capture for a peer
- * @pdev: pointer to pdev object
- * @peer: pointer to peer object
- *
- * Return: success/failure status of stop capture
- */
-int target_if_cfr_stop_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer);
-
-/**
- * target_if_cfr_get_target_type() - Function to get target type
- * @psoc: pointer to psoc object
- *
- * Return: target type of target
- */
-int target_if_cfr_get_target_type(struct wlan_objmgr_psoc *psoc);
-
-/**
- * target_if_cfr_set_cfr_support() - Function to set cfr support
- * @psoc: pointer to psoc object
- * @value: value to be set
- */
-void target_if_cfr_set_cfr_support(struct wlan_objmgr_psoc *psoc,
- uint8_t value);
-
-/**
- * target_if_cfr_info_send() - Function to send cfr info to upper layers
- * @pdev: pointer to pdev object
- * @head: pointer to cfr info head
- * @hlen: head len
- * @data: pointer to cfr info data
- * @dlen: data len
- * @tail: pointer to cfr info tail
- * @tlen: tail len
- */
-void target_if_cfr_info_send(struct wlan_objmgr_pdev *pdev, void *head,
- size_t hlen, void *data, size_t dlen, void *tail,
- size_t tlen);
-
-/**
- * cfr_wifi2_0_init_pdev() - Function to init legacy pdev
- * @psoc: pointer to psoc object
- * @pdev: pointer to pdev object
- *
- * Return: success/failure status of init
- */
-QDF_STATUS cfr_wifi2_0_init_pdev(struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev);
-
-/**
- * cfr_wifi2_0_deinit_pdev() - Function to deinit legacy pdev
- * @psoc: pointer to psoc object
- * @pdev: pointer to pdev object
- *
- * Return: success/failure status of deinit
- */
-QDF_STATUS cfr_wifi2_0_deinit_pdev(struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev);
-#endif
diff --git a/target_if/cfr/inc/target_if_cfr_6018.h b/target_if/cfr/inc/target_if_cfr_6018.h
deleted file mode 100644
index 4255f85..0000000
--- a/target_if/cfr/inc/target_if_cfr_6018.h
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- * Copyright (c) 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.
- */
-
-#ifndef _TARGET_IF_CFR_6018_H_
-#define _TARGET_IF_CFR_6018_H_
-
-#ifdef WLAN_ENH_CFR_ENABLE
-/*
- * Memory requirements :
- *
- * 1. DMA header :
- *
- * Legacy DMA header(QCA8074V2) : 2 words (length = 8 bytes)
- * Enhanced DMA header(QCA6018) : Upto 16 words depending on no. of MU users
- * in UL-MU-PPDU (Max length = 64 bytes)
- *
- * Fixed 4 words for whal_cfir_enhanced_hdr + freeze TLV
- * + uplink_user_info TLV (MAX 4)
- *
- * mu_rx_num_users -> No. of words in CFR DMA header
- * 0 -> 12 = 4 + 7(freeze TLV) + 1(for 64-bit alignment)
- * 1 -> 12 = 4 + 7(freeze TLV) + 1(user1)
- * 2 -> 14 = 4 + 7(freeze TLV) + 2(users 1,2) + 1(for 64-bit alignment)
- * 3 -> 14 = 4 + 7(freeze TLV) + 3(users 1,2,3)
- * 4 -> 16 = 4 + 7(freeze TLV) + 4(users 1,2,3,4) + 1(for 64-bit alignment)
- *
- *
- * 2. CFR data size for max BW/Nss/Nrx
- *
- * Cypress : Max BW = 80 MHz
- * NSS = 2
- * Nrx = 2
- * Size of one tone = 4 bytes
- *
- * a. RTT-H - 2048 bytes
- *
- * b. Debug-H (MIMO CFR) - 16016 bytes
- *
- * c. RTT-H + CIR - 10240 bytes = 2048(RTT-H) + 8192(CIR)
- */
-
-/* Max 4 users in MU case */
-#define CYP_CFR_MU_USERS 4
-
-#define CYP_MAX_HEADER_LENGTH_WORDS 16
-
-/* payload_len = Max(2048, 16016, 10240) = 16064 (64-bit alignment) */
-#define CYP_MAX_DATA_LENGTH_BYTES 16064
-
-/* in ms */
-#define LUT_AGE_TIMER 3000
-#define LUT_AGE_THRESHOLD 3000
-#define NUM_LUT_ENTRIES 136
-
-/* Max size :
- * 16173 = 93 bytes(csi header) + 64 bytes(cfr header) + 16016 bytes(cfr
- * payload)
- */
-#define STREAMFS_MAX_SUBBUF_CYP 16173
-
-#define STREAMFS_NUM_SUBBUF_CYP 255
-
-/*
- * @tag: ucode fills this with 0xBA
- *
- * @length: length of CFR header in words (32-bit)
- *
- * @upload_done: ucode sets this to 1 to indicate DMA completion
- *
- * @capture_type:
- *
- * 0 - None
- * 1 - RTT-H (Nss = 1, Nrx)
- * 2 - Debug-H (Nss, Nrx)
- * 3 - Reserved
- * 5 - RTT-H + CIR(Nss, Nrx)
- *
- * @preamble_type:
- *
- * 0 - Legacy
- * 1 - HT
- * 2 - VHT
- * 3 - HE
- *
- * @nss:
- *
- * 0 - 1-stream
- * 1 - 2-stream
- * .. ..
- * 7 - 8-stream
- *
- *@num_chains:
- *
- * 0 - 1-chain
- * 1 - 2-chain
- * .. ..
- * 7 - 8-chain
- *
- *@upload_bw_pkt:
- *
- * 0 - 20 MHz
- * 1 - 40 MHz
- * 2 - 80 MHz
- * 3 - 160 MHz
- *
- * @sw_peer_id_valid: Indicates whether sw_peer_id field is valid or not,
- * sent from MAC to PHY via the MACRX_FREEZE_CAPTURE_CHANNEL TLV
- *
- * @sw_peer_id: Indicates peer id based on AST search, sent from MAC to PHY
- * via the MACRX_FREEZE_CAPTURE_CHANNEL TLV
- *
- * @phy_ppdu_id: sent from PHY to MAC, copied to MACRX_FREEZE_CAPTURE_CHANNEL
- * TLV
- *
- * @total_bytes: Total size of CFR payload (FFT bins)
- *
- * @header_version:
- *
- * 1 - HKV2/Hastings
- * 2 - Cypress
- *
- * @target_id:
- *
- * 1 - Hastings
- * 2 - Cypress
- * 3 - Hastings Prime
- * 4 - Pine
- *
- * @cfr_fmt:
- *
- * 0 - raw (32-bit format)
- * 1 - compressed (24-bit format)
- *
- * @mu_rx_data_incl: Indicates whether CFR header contains UL-MU-MIMO info
- *
- * @freeze_data_incl: Indicates whether CFR header contains
- * MACRX_FREEZE_CAPTURE_CHANNEL TLV
- *
- * @decimation_factor: FFT bins decimation
- * @mu_rx_num_users: Number of users in UL-MU-PPDU
- */
-struct whal_cfir_enhanced_hdr {
- uint16_t tag : 8,
- length : 6,
- rsvd1 : 2;
-
- uint16_t upload_done : 1,
- capture_type : 3,
- preamble_type : 2,
- nss : 3,
- num_chains : 3,
- upload_pkt_bw : 3,
- sw_peer_id_valid : 1;
-
- uint16_t sw_peer_id : 16;
-
- uint16_t phy_ppdu_id : 16;
-
- uint16_t total_bytes;
-
- uint16_t header_version :4,
- target_id :4,
- cfr_fmt :1,
- rsvd2 :1,
- mu_rx_data_incl :1,
- freeze_data_incl:1,
- rsvd3 :4;
-
- uint16_t mu_rx_num_users :8,
- decimation_factor :4,
- rsvd4 :4;
-
- uint16_t rsvd5;
-};
-
-struct macrx_freeze_capture_channel {
- uint16_t freeze : 1, //[0]
- capture_reason : 3, //[3:1]
- packet_type : 2, //[5:4]
- packet_sub_type : 4, //[9:6]
- reserved : 5, //[14:10]
- sw_peer_id_valid : 1; //[15]
- uint16_t sw_peer_id : 16; //[15:0]
- uint16_t phy_ppdu_id : 16; //[15:0]
- uint16_t packet_ta_lower_16 : 16; //[15:0]
- uint16_t packet_ta_mid_16 : 16; //[15:0]
- uint16_t packet_ta_upper_16 : 16; //[15:0]
- uint16_t packet_ra_lower_16 : 16; //[15:0]
- uint16_t packet_ra_mid_16 : 16; //[15:0]
- uint16_t packet_ra_upper_16 : 16; //[15:0]
- uint16_t tsf_timestamp_15_0 : 16; //[15:0]
- uint16_t tsf_timestamp_31_16 : 16; //[15:0]
- uint16_t tsf_timestamp_47_32 : 16; //[15:0]
- uint16_t tsf_timestamp_63_48 : 16; //[15:0]
- uint16_t user_index : 6, //[5:0]
- directed : 1, //[6]
- reserved_13 : 9; //[15:7]
-};
-
-struct uplink_user_setup_info {
- uint32_t bw_info_valid : 1, //[0]
- uplink_receive_type : 2, //[2:1]
- reserved_0a : 1, //[3]
- uplink_11ax_mcs : 4, //[7:4]
- ru_width : 7, //[14:8]
- reserved_0b : 1, //[15]
- nss : 3, //[18:16]
- stream_offset : 3, //[21:19]
- sta_dcm : 1, //[22]
- sta_coding : 1, //[23]
- ru_start_index : 7, //[30:24]
- reserved_0c : 1; //[31]
-};
-
-/**
- * cfr_6018_init_pdev() - Inits cfr pdev and registers necessary handlers.
- * @psoc: pointer to psoc object
- * @pdev: pointer to pdev object
- *
- * Return: Registration status for necessary handlers
- */
-QDF_STATUS cfr_6018_init_pdev(
- struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev);
-
-/**
- * cfr_6018_deinit_pdev() - De-inits corresponding pdev and handlers.
- * @psoc: pointer to psoc object
- * @pdev: pointer to pdev object
- *
- * Return: De-registration status for necessary handlers
- */
-QDF_STATUS cfr_6018_deinit_pdev(
- struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev);
-
-/**
- * target_if_cfr_start_lut_age_timer() - Start timer to flush aged-out LUT
- * entries
- * @pdev: pointer to pdev object
- *
- * Return: None
- */
-void target_if_cfr_start_lut_age_timer(struct wlan_objmgr_pdev *pdev);
-
-/**
- * target_if_cfr_stop_lut_age_timer() - Stop timer to flush aged-out LUT
- * entries
- * @pdev: pointer to pdev object
- *
- * Return: None
- */
-void target_if_cfr_stop_lut_age_timer(struct wlan_objmgr_pdev *pdev);
-
-/**
- * target_if_cfr_dump_lut_enh() - Dump all valid LUT entries
- * @pdev: objmgr PDEV
- *
- * Return: none
- */
-void target_if_cfr_dump_lut_enh(struct wlan_objmgr_pdev *pdev);
-
-/**
- * target_if_cfr_config_rcc() - Start repetitive channel capture
- * @pdev: pointer to pdev object
- * @rcc_param: rcc configurations
- *
- * Return: Success/Failure status
- */
-QDF_STATUS target_if_cfr_config_rcc(struct wlan_objmgr_pdev *pdev,
- struct cfr_rcc_param *rcc_param);
-
-/**
- * target_if_cfr_default_ta_ra_config() - Configure default values to all
- * params(BW/NSS/TA/RA) in TA_RA mode
- * @rcc_param: rcc configurations
- * @allvalid: Indicates whether all TA_RA params are valid or not.
- * It could be either 0 or 1.
- * 1: should be sent to FW during CFR initialization
- * 0: should be set, after a successful commit session.
- * @reset_cfg: This bitmap is being used to determine which groups'
- * parameters are needed to be reset to its default state.
- */
-void target_if_cfr_default_ta_ra_config(struct cfr_rcc_param *rcc_param,
- bool allvalid, uint16_t reset_cfg);
-
-/**
- * target_if_cfr_rx_tlv_process() - Process PPDU status TLVs and store info in
- * lookup table
- * @pdev: PDEV object
- * @nbuf: ppdu info
- *
- * Return: none
- */
-void target_if_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf);
-
-/**
- * target_if_cfr_update_global_cfg() - Update global config after a successful
- * commit
- * @pdev: pointer to pdev object
- *
- * Return: None
- */
-void target_if_cfr_update_global_cfg(struct wlan_objmgr_pdev *pdev);
-#else
-static QDF_STATUS cfr_6018_init_pdev(
- struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev)
-{
- return QDF_STATUS_SUCCESS;
-}
-
-static QDF_STATUS cfr_6018_deinit_pdev(
- struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev)
-{
- return QDF_STATUS_SUCCESS;
-}
-#endif
-#endif
diff --git a/target_if/cfr/src/target_if_cfr.c b/target_if/cfr/src/target_if_cfr.c
deleted file mode 100644
index 525b212..0000000
--- a/target_if/cfr/src/target_if_cfr.c
+++ /dev/null
@@ -1,363 +0,0 @@
-/*
- * Copyright (c) 2019-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 <target_if_cfr.h>
-#include <wlan_tgt_def_config.h>
-#include <target_type.h>
-#include <hif_hw_version.h>
-#include <ol_if_athvar.h>
-#include <target_if.h>
-#include <wlan_lmac_if_def.h>
-#include <wlan_osif_priv.h>
-#include <wlan_mlme_dispatcher.h>
-#include <init_deinit_lmac.h>
-#include <wlan_cfr_utils_api.h>
-#include <wlan_objmgr_pdev_obj.h>
-#include <target_if_cfr_8074v2.h>
-#include <target_if_cfr_6018.h>
-
-int target_if_cfr_stop_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer)
-{
- struct peer_cfr *pe;
- struct peer_cfr_params param = {0};
- struct wmi_unified *pdev_wmi_handle = NULL;
- struct wlan_objmgr_vdev *vdev = {0};
- struct pdev_cfr *pdev_cfrobj;
- int retv = 0;
-
- pe = wlan_objmgr_peer_get_comp_private_obj(peer, WLAN_UMAC_COMP_CFR);
- if (pe == NULL)
- return -EINVAL;
-
- pdev_wmi_handle = lmac_get_pdev_wmi_handle(pdev);
- vdev = wlan_peer_get_vdev(peer);
-
- qdf_mem_set(¶m, sizeof(param), 0);
-
- param.request = PEER_CFR_CAPTURE_DISABLE;
- param.macaddr = wlan_peer_get_macaddr(peer);
- param.vdev_id = wlan_vdev_get_id(vdev);
-
- param.periodicity = pe->period;
- param.bandwidth = pe->bandwidth;
- param.capture_method = pe->capture_method;
-
- retv = wmi_unified_send_peer_cfr_capture_cmd(pdev_wmi_handle, ¶m);
-
- pdev_cfrobj = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- if (!pdev_cfrobj) {
- cfr_err("pdev object for CFR is null");
- return -EINVAL;
- }
- cfr_err("CFR capture stats for this capture:");
- cfr_err("DBR event count = %llu, Tx event count = %llu "
- "Release count = %llu",
- pdev_cfrobj->dbr_evt_cnt, pdev_cfrobj->tx_evt_cnt,
- pdev_cfrobj->release_cnt);
-
- pdev_cfrobj->dbr_evt_cnt = 0;
- pdev_cfrobj->tx_evt_cnt = 0;
- pdev_cfrobj->release_cnt = 0;
-
- return retv;
-}
-
-int target_if_cfr_start_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer,
- struct cfr_capture_params *cfr_params)
-{
- struct peer_cfr_params param = {0};
- struct wmi_unified *pdev_wmi_handle = NULL;
- struct wlan_objmgr_vdev *vdev;
- int retv = 0;
-
- pdev_wmi_handle = lmac_get_pdev_wmi_handle(pdev);
- vdev = wlan_peer_get_vdev(peer);
- qdf_mem_set(¶m, sizeof(param), 0);
-
- param.request = PEER_CFR_CAPTURE_ENABLE;
- param.macaddr = wlan_peer_get_macaddr(peer);
- param.vdev_id = wlan_vdev_get_id(vdev);
-
- param.periodicity = cfr_params->period;
- param.bandwidth = cfr_params->bandwidth;
- param.capture_method = cfr_params->method;
-
- retv = wmi_unified_send_peer_cfr_capture_cmd(pdev_wmi_handle, ¶m);
- return retv;
-}
-
-int target_if_cfr_pdev_set_param(struct wlan_objmgr_pdev *pdev,
- uint32_t param_id, uint32_t param_value)
-{
- struct pdev_params pparam;
- uint32_t pdev_id;
-
- pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
- if (pdev_id < 0)
- return -EINVAL;
-
- qdf_mem_set(&pparam, sizeof(pparam), 0);
- pparam.param_id = param_id;
- pparam.param_value = param_value;
-
- return wmi_unified_pdev_param_send(lmac_get_pdev_wmi_handle(pdev),
- &pparam, pdev_id);
-}
-
-int target_if_cfr_enable_cfr_timer(struct wlan_objmgr_pdev *pdev,
- uint32_t cfr_timer)
-{
- struct pdev_cfr *pa;
- int retval;
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
- if (pa == NULL)
- return QDF_STATUS_E_FAILURE;
-
- if (!cfr_timer) {
- /* disable periodic cfr capture */
- retval =
- target_if_cfr_pdev_set_param(pdev,
- wmi_pdev_param_per_peer_prd_cfr_enable,
- WMI_HOST_PEER_CFR_TIMER_DISABLE);
-
- if (retval == QDF_STATUS_SUCCESS)
- pa->cfr_timer_enable = 0;
- } else {
- /* enable periodic cfr capture (default base timer is 10ms ) */
- retval =
- target_if_cfr_pdev_set_param(pdev,
- wmi_pdev_param_per_peer_prd_cfr_enable,
- WMI_HOST_PEER_CFR_TIMER_ENABLE);
-
- if (retval == QDF_STATUS_SUCCESS)
- pa->cfr_timer_enable = 1;
- }
-
- return retval;
-}
-
-int target_if_cfr_get_target_type(struct wlan_objmgr_psoc *psoc)
-{
- uint32_t target_type = 0;
- struct wlan_lmac_if_target_tx_ops *target_type_tx_ops;
-
- target_type_tx_ops = &psoc->soc_cb.tx_ops.target_tx_ops;
-
- if (target_type_tx_ops->tgt_get_tgt_type)
- target_type = target_type_tx_ops->tgt_get_tgt_type(psoc);
-
- return target_type;
-}
-
-int target_if_cfr_init_pdev(struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev)
-{
- uint32_t target_type;
- struct pdev_cfr *pa;
- struct psoc_cfr *cfr_sc;
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
- if (pa == NULL)
- return QDF_STATUS_E_FAILURE;
-
- /* Reset unassociated entries for every init */
- qdf_mem_zero(&pa->unassoc_pool[0], MAX_CFR_ENABLED_CLIENTS *
- sizeof(struct unassoc_pool_entry));
-
- cfr_sc = wlan_objmgr_psoc_get_comp_private_obj(psoc,
- WLAN_UMAC_COMP_CFR);
-
- if (cfr_sc == NULL)
- return QDF_STATUS_E_FAILURE;
-
- target_type = target_if_cfr_get_target_type(psoc);
-
- if (target_type == TARGET_TYPE_QCA8074V2) {
- pa->is_cfr_capable = cfr_sc->is_cfr_capable;
- return cfr_8074v2_init_pdev(psoc, pdev);
- } else if ((target_type == TARGET_TYPE_IPQ4019) ||
- (target_type == TARGET_TYPE_QCA9984) ||
- (target_type == TARGET_TYPE_QCA9888)) {
-
- pa->is_cfr_capable = cfr_sc->is_cfr_capable;
-
- return cfr_wifi2_0_init_pdev(psoc, pdev);
- } else if (target_type == TARGET_TYPE_QCA6018) {
- pa->is_cfr_capable = cfr_sc->is_cfr_capable;
- return cfr_6018_init_pdev(psoc, pdev);
- } else
- return QDF_STATUS_E_NOSUPPORT;
-}
-
-int target_if_cfr_deinit_pdev(struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev)
-{
- uint32_t target_type;
-
- target_type = target_if_cfr_get_target_type(psoc);
-
- if (target_type == TARGET_TYPE_QCA8074V2) {
- return cfr_8074v2_deinit_pdev(psoc, pdev);
- } else if ((target_type == TARGET_TYPE_IPQ4019) ||
- (target_type == TARGET_TYPE_QCA9984) ||
- (target_type == TARGET_TYPE_QCA9888)) {
-
- return cfr_wifi2_0_deinit_pdev(psoc, pdev);
- } else if (target_type == TARGET_TYPE_QCA6018) {
- return cfr_6018_deinit_pdev(psoc, pdev);
- } else
- return QDF_STATUS_E_NOSUPPORT;
-}
-
-#ifdef WLAN_ENH_CFR_ENABLE
-QDF_STATUS target_if_cfr_config_rcc(struct wlan_objmgr_pdev *pdev,
- struct cfr_rcc_param *rcc_info)
-{
- QDF_STATUS status;
- struct wmi_unified *pdev_wmi_handle = NULL;
-
- pdev_wmi_handle = lmac_get_pdev_wmi_handle(pdev);
- if (!pdev_wmi_handle) {
- cfr_err("pdev_wmi_handle is null");
- return QDF_STATUS_E_NULL_VALUE;
- }
-
- rcc_info->pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
- rcc_info->num_grp_tlvs =
- count_set_bits(rcc_info->modified_in_curr_session);
-
- status = wmi_unified_send_cfr_rcc_cmd(pdev_wmi_handle, rcc_info);
- return status;
-}
-
-void target_if_cfr_default_ta_ra_config(struct cfr_rcc_param *rcc_info,
- bool allvalid, uint16_t reset_cfg)
-{
- struct ta_ra_cfr_cfg *curr_cfg = NULL;
- int grp_id;
-
- uint8_t def_mac[QDF_MAC_ADDR_SIZE] = {0xFF, 0xFF, 0xFF,
- 0xFF, 0xFF, 0xFF};
- uint8_t null_mac[QDF_MAC_ADDR_SIZE] = {0x00, 0x00, 0x00,
- 0x00, 0x00, 0x00};
-
- for (grp_id = 0; grp_id < MAX_TA_RA_ENTRIES; grp_id++) {
- if (qdf_test_bit(grp_id, (unsigned long *)&reset_cfg)) {
- curr_cfg = &rcc_info->curr[grp_id];
- qdf_mem_copy(curr_cfg->tx_addr,
- null_mac, QDF_MAC_ADDR_SIZE);
- qdf_mem_copy(curr_cfg->tx_addr_mask,
- def_mac, QDF_MAC_ADDR_SIZE);
- qdf_mem_copy(curr_cfg->rx_addr,
- null_mac, QDF_MAC_ADDR_SIZE);
- qdf_mem_copy(curr_cfg->rx_addr_mask,
- def_mac, QDF_MAC_ADDR_SIZE);
- curr_cfg->bw = 0xf;
- curr_cfg->nss = 0xff;
- curr_cfg->mgmt_subtype_filter = 0;
- curr_cfg->ctrl_subtype_filter = 0;
- curr_cfg->data_subtype_filter = 0;
- if (!allvalid) {
- curr_cfg->valid_ta = 0;
- curr_cfg->valid_ta_mask = 0;
- curr_cfg->valid_ra = 0;
- curr_cfg->valid_ra_mask = 0;
- curr_cfg->valid_bw_mask = 0;
- curr_cfg->valid_nss_mask = 0;
- curr_cfg->valid_mgmt_subtype = 0;
- curr_cfg->valid_ctrl_subtype = 0;
- curr_cfg->valid_data_subtype = 0;
- } else {
- curr_cfg->valid_ta = 1;
- curr_cfg->valid_ta_mask = 1;
- curr_cfg->valid_ra = 1;
- curr_cfg->valid_ra_mask = 1;
- curr_cfg->valid_bw_mask = 1;
- curr_cfg->valid_nss_mask = 1;
- curr_cfg->valid_mgmt_subtype = 1;
- curr_cfg->valid_ctrl_subtype = 1;
- curr_cfg->valid_data_subtype = 1;
- }
- }
- }
-}
-#endif
-
-#ifdef WLAN_ENH_CFR_ENABLE
-void target_if_enh_cfr_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
-{
- tx_ops->cfr_tx_ops.cfr_config_rcc =
- target_if_cfr_config_rcc;
- tx_ops->cfr_tx_ops.cfr_start_lut_timer =
- target_if_cfr_start_lut_age_timer;
- tx_ops->cfr_tx_ops.cfr_stop_lut_timer =
- target_if_cfr_stop_lut_age_timer;
- tx_ops->cfr_tx_ops.cfr_default_ta_ra_cfg =
- target_if_cfr_default_ta_ra_config;
- tx_ops->cfr_tx_ops.cfr_dump_lut_enh =
- target_if_cfr_dump_lut_enh;
- tx_ops->cfr_tx_ops.cfr_rx_tlv_process =
- target_if_cfr_rx_tlv_process;
- tx_ops->cfr_tx_ops.cfr_update_global_cfg =
- target_if_cfr_update_global_cfg;
-}
-#else
-void target_if_enh_cfr_tx_ops(struct wlan_lmac_if_tx_ops *tx_ops)
-{
-}
-#endif
-
-void target_if_cfr_tx_ops_register(struct wlan_lmac_if_tx_ops *tx_ops)
-{
- tx_ops->cfr_tx_ops.cfr_init_pdev =
- target_if_cfr_init_pdev;
- tx_ops->cfr_tx_ops.cfr_deinit_pdev =
- target_if_cfr_deinit_pdev;
- tx_ops->cfr_tx_ops.cfr_enable_cfr_timer =
- target_if_cfr_enable_cfr_timer;
- tx_ops->cfr_tx_ops.cfr_start_capture =
- target_if_cfr_start_capture;
- tx_ops->cfr_tx_ops.cfr_stop_capture =
- target_if_cfr_stop_capture;
- target_if_enh_cfr_tx_ops(tx_ops);
-}
-
-void target_if_cfr_set_cfr_support(struct wlan_objmgr_psoc *psoc,
- uint8_t value)
-{
- if (psoc->soc_cb.rx_ops.cfr_rx_ops.cfr_support_set)
- psoc->soc_cb.rx_ops.cfr_rx_ops.cfr_support_set(psoc, value);
-}
-
-void target_if_cfr_info_send(struct wlan_objmgr_pdev *pdev, void *head,
- size_t hlen, void *data, size_t dlen, void *tail,
- size_t tlen)
-{
- struct wlan_objmgr_psoc *psoc;
-
- psoc = wlan_pdev_get_psoc(pdev);
-
- if (psoc->soc_cb.rx_ops.cfr_rx_ops.cfr_info_send)
- psoc->soc_cb.rx_ops.cfr_rx_ops.cfr_info_send(pdev, head, hlen,
- data, dlen, tail,
- tlen);
-}
diff --git a/target_if/cfr/src/target_if_cfr_6018.c b/target_if/cfr/src/target_if_cfr_6018.c
deleted file mode 100644
index 826726a..0000000
--- a/target_if/cfr/src/target_if_cfr_6018.c
+++ /dev/null
@@ -1,1648 +0,0 @@
-/*
- * Copyright (c) 2019-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.
- */
-
-#ifdef WLAN_ENH_CFR_ENABLE
-
-#include <target_if_cfr.h>
-#include <wlan_tgt_def_config.h>
-#include <target_type.h>
-#include <hif_hw_version.h>
-#include <ol_if_athvar.h>
-#include <target_if.h>
-#include <wlan_lmac_if_def.h>
-#include <wlan_osif_priv.h>
-#include <wlan_mlme_dispatcher.h>
-#include <init_deinit_lmac.h>
-#include <wlan_cfr_utils_api.h>
-#ifdef DIRECT_BUF_RX_ENABLE
-#include <target_if_direct_buf_rx_api.h>
-#endif
-#include <target_if_cfr_6018.h>
-#include "cdp_txrx_ctrl.h"
-
-#define CMN_NOISE_FLOOR (-96)
-
-static u_int32_t end_magic = 0xBEAFDEAD;
-/**
- * get_lut_entry() - Retrieve LUT entry using cookie number
- * @pcfr: PDEV CFR object
- * @offset: cookie number
- *
- * Return: look up table entry
- */
-static struct look_up_table *get_lut_entry(struct pdev_cfr *pcfr,
- int offset)
-{
- if (offset > NUM_LUT_ENTRIES) {
- cfr_err("Invalid offset\n");
- return NULL;
- }
- return &pcfr->lut[offset];
-}
-
-/**
- * release_lut_entry_enh() - Clear all params in an LUT entry
- * @pdev: objmgr PDEV
- * @lut: pointer to LUT
- *
- * Return: status
- */
-int release_lut_entry_enh(struct wlan_objmgr_pdev *pdev,
- struct look_up_table *lut)
-{
- lut->dbr_recv = false;
- lut->tx_recv = false;
- lut->data = NULL;
- lut->data_len = 0;
- lut->dbr_ppdu_id = 0;
- lut->tx_ppdu_id = 0;
- lut->dbr_tstamp = 0;
- lut->txrx_tstamp = 0;
- lut->tx_address1 = 0;
- lut->tx_address2 = 0;
- lut->dbr_address = 0;
- qdf_mem_zero(&lut->header, sizeof(struct csi_cfr_header));
-
- return 0;
-}
-
-/**
- * target_if_cfr_dump_lut_enh() - dump all valid lut entries
- * @pdev: objmgr pdev
- *
- * return: none
- */
-void target_if_cfr_dump_lut_enh(struct wlan_objmgr_pdev *pdev)
-{
- struct pdev_cfr *pcfr;
- struct look_up_table *lut = NULL;
- int i = 0;
- uint64_t diff;
- QDF_STATUS retval = 0;
-
- retval = wlan_objmgr_pdev_try_get_ref(pdev, WLAN_CFR_ID);
- if (retval != QDF_STATUS_SUCCESS) {
- cfr_err("failed to get pdev reference");
- return;
- }
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- if (!pcfr) {
- cfr_err("pdev object for CFR is null");
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
- return;
- }
-
- qdf_spin_lock_bh(&pcfr->lut_lock);
-
- for (i = 0; i < NUM_LUT_ENTRIES; i++) {
- lut = get_lut_entry(pcfr, i);
- if (!lut)
- continue;
- if (lut->dbr_recv ^ lut->tx_recv) {
- diff = (lut->dbr_tstamp > lut->txrx_tstamp) ?
- (lut->dbr_tstamp - lut->txrx_tstamp) :
- (lut->txrx_tstamp - lut->dbr_tstamp);
- cfr_err("idx:%d dbrevnt: %d txrxevent: %d "
- "dbrppdu:0x%x txrxppdu:0x%x dbr_tstamp: %llu "
- "txrx_tstamp: %llu diff: %llu\n",
- i, lut->dbr_recv, lut->tx_recv,
- lut->dbr_ppdu_id, lut->tx_ppdu_id,
- lut->dbr_tstamp, lut->txrx_tstamp, diff);
- }
-
- }
-
- qdf_spin_unlock_bh(&pcfr->lut_lock);
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-}
-
-/**
- * cfr_free_pending_dbr_events() - Flush all pending DBR events. This is useful
- * in cases where for RXTLV drops in host monitor status ring is huge.
- * @pdev: objmgr pdev
- *
- * return: none
- */
-void cfr_free_pending_dbr_events(struct wlan_objmgr_pdev *pdev)
-{
- struct pdev_cfr *pcfr;
- struct look_up_table *lut = NULL;
- int i = 0;
- QDF_STATUS retval = 0;
-
- retval = wlan_objmgr_pdev_try_get_ref(pdev, WLAN_CFR_ID);
- if (retval != QDF_STATUS_SUCCESS) {
- cfr_err("failed to get pdev reference");
- return;
- }
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- if (!pcfr) {
- cfr_err("pdev object for CFR is null");
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
- return;
- }
-
- for (i = 0; i < NUM_LUT_ENTRIES; i++) {
- lut = get_lut_entry(pcfr, i);
- if (!lut)
- continue;
-
- if (lut->dbr_recv && !lut->tx_recv &&
- (lut->dbr_tstamp < pcfr->last_success_tstamp)) {
- target_if_dbr_buf_release(pdev, DBR_MODULE_CFR,
- lut->dbr_address,
- i, 0);
- pcfr->flush_dbr_cnt++;
- release_lut_entry_enh(pdev, lut);
- }
- }
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-}
-
-/**
- * dump_freeze_tlv() - Dump freeze TLV sent in enhanced DMA header
- * @freeze_tlv: Freeze TLV sent from MAC to PHY
- * @cookie: Index into lookup table
- *
- * Return: none
- */
-void dump_freeze_tlv(void *freeze_tlv, uint32_t cookie)
-{
- struct macrx_freeze_capture_channel *freeze =
- (struct macrx_freeze_capture_channel *)freeze_tlv;
-
- cfr_debug("<DBRCOMP><FREEZE><%u>\n"
- "freeze: %d capture_reason: %d packet_type: 0x%x\n"
- "packet_subtype: 0x%x sw_peer_id_valid: %d sw_peer_id: %d\n"
- "phy_ppdu_id: 0x%04x packet_ta_upper_16: 0x%04x\n"
- "packet_ta_mid_16: 0x%04x packet_ta_lower_16: 0x%04x\n"
- "packet_ra_upper_16: 0x%04x packet_ra_mid_16: 0x%04x\n"
- "packet_ra_lower_16: 0x%04x tsf_timestamp_63_48: 0x%04x\n"
- "tsf_timestamp_47_32: 0x%04x tsf_timestamp_31_16: 0x%04x\n"
- "tsf_timestamp_15_0: 0x%04x user_index: %d directed: %d\n",
- cookie,
- freeze->freeze,
- freeze->capture_reason,
- freeze->packet_type,
- freeze->packet_sub_type,
- freeze->sw_peer_id_valid,
- freeze->sw_peer_id,
- freeze->phy_ppdu_id,
- freeze->packet_ta_upper_16,
- freeze->packet_ta_mid_16,
- freeze->packet_ta_lower_16,
- freeze->packet_ra_upper_16,
- freeze->packet_ra_mid_16,
- freeze->packet_ra_lower_16,
- freeze->tsf_timestamp_63_48,
- freeze->tsf_timestamp_47_32,
- freeze->tsf_timestamp_31_16,
- freeze->tsf_timestamp_15_0,
- freeze->user_index,
- freeze->directed);
-}
-
-/**
- * dump_mu_rx_info() - Dump MU info in enhanced DMA header
- * @mu_rx_user_info: MU info sent by ucode
- * @mu_rx_num_users: Number of MU users in UL-MU-PPDU
- * @cookie: Index into lookup table
- *
- * Return: none
- */
-void dump_mu_rx_info(void *mu_rx_user_info, uint8_t mu_rx_num_users,
- uint32_t cookie)
-{
- uint8_t i;
- struct uplink_user_setup_info *ul_mu_user_info =
- (struct uplink_user_setup_info *) mu_rx_user_info;
-
- for (i = 0 ; i < mu_rx_num_users; i++) {
- cfr_debug("<DBRCOMP><MU><%u>\n"
- "<user_id:%d>\n"
- "bw_info_valid = %d\n"
- "uplink_receive_type = %d\n"
- "uplink_11ax_mcs = %d\n"
- "ru_width = %d\n"
- "nss = %d\n"
- "stream_offset = %d\n"
- "sta_dcm = %d\n"
- "sta_coding = %d\n"
- "ru_start_index = %d\n",
- cookie,
- i,
- ul_mu_user_info->bw_info_valid,
- ul_mu_user_info->uplink_receive_type,
- ul_mu_user_info->uplink_11ax_mcs,
- ul_mu_user_info->ru_width,
- ul_mu_user_info->nss,
- ul_mu_user_info->stream_offset,
- ul_mu_user_info->sta_dcm,
- ul_mu_user_info->sta_coding,
- ul_mu_user_info->ru_start_index);
- ul_mu_user_info += sizeof(struct uplink_user_setup_info);
- }
-}
-
-void dump_metadata(struct csi_cfr_header *header, uint32_t cookie)
-{
- uint8_t user_id, chain_id;
- struct cfr_metadata_version_3 *meta = &header->u.meta_v3;
- uint8_t *usermac = NULL;
-
- cfr_debug("<METADATA><%u>\n"
- "start_magic_num = 0x%x\n"
- "vendorid = 0x%x\n"
- "cfr_metadata_version = %d\n"
- "cfr_data_version = %d\n"
- "chip_type = %d\n"
- "platform_type = %d\n"
- "status = %d\n"
- "capture_bw = %d\n"
- "channel_bw = %d\n"
- "phy_mode = %d\n"
- "prim20_chan = %d\n"
- "center_freq1 = %d\n"
- "center_freq2 = %d\n"
- "ack_capture_mode = %d\n"
- "cfr_capture_type = %d\n"
- "sts_count = %d\n"
- "num_rx_chain = %d\n"
- "timestamp = 0x%x\n"
- "length = %d\n"
- "is_mu_ppdu = %d\n"
- "num_users = %d\n",
- cookie,
- header->start_magic_num,
- header->vendorid,
- header->cfr_metadata_version,
- header->cfr_data_version,
- header->chip_type,
- header->pltform_type,
- meta->status,
- meta->capture_bw,
- meta->channel_bw,
- meta->phy_mode,
- meta->prim20_chan,
- meta->center_freq1,
- meta->center_freq2,
- meta->capture_mode,
- meta->capture_type,
- meta->sts_count,
- meta->num_rx_chain,
- meta->timestamp,
- meta->length,
- meta->is_mu_ppdu,
- meta->num_mu_users);
-
- if (meta->is_mu_ppdu) {
- for (user_id = 0; user_id < meta->num_mu_users; user_id++) {
- usermac = meta->peer_addr.mu_peer_addr[user_id];
- cfr_debug("peermac[%d]: %s\n",
- user_id,
- ether_sprintf(usermac));
- }
- } else {
- cfr_debug("peermac: %s\n",
- ether_sprintf(meta->peer_addr.su_peer_addr));
- }
-
- for (chain_id = 0; chain_id < HOST_MAX_CHAINS; chain_id++) {
- cfr_debug("chain_rssi[%d] = %d\n",
- chain_id,
- meta->chain_rssi[chain_id]);
- }
-
- for (chain_id = 0; chain_id < HOST_MAX_CHAINS; chain_id++) {
- cfr_debug("chain_phase[%d] = %d\n",
- chain_id,
- meta->chain_phase[chain_id]);
- }
-}
-/**
- * dump_enh_dma_hdr() - Dump enhanced DMA header populated by ucode
- * @dma_hdr: pointer to enhanced DMA header
- * @freeze_tlv: pointer to MACRX_FREEZE_CAPTURE_CHANNEL TLV
- * @mu_rx_user_info: UPLINK_USER_SETUP_INFO TLV
- * @header: pointer to metadata passed to userspace
- * @error: Indicates whether it is an error
- * @cookie: Index into lookup table
- *
- * Return: none
- */
-void dump_enh_dma_hdr(struct whal_cfir_enhanced_hdr *dma_hdr,
- void *freeze_tlv,
- void *mu_rx_user_info,
- struct csi_cfr_header *header,
- int error,
- uint32_t cookie)
-{
- if (!error) {
- cfr_debug("<DBRCOMP><%u>\n"
- "Tag: 0x%02x Length: %d udone: %d\n"
- "ctype: %d preamble: %d Nss: %d\n"
- "num_chains: %d bw: %d peervalid: %d\n"
- "peer_id: %d ppdu_id: 0x%04x total_bytes: %d\n"
- "header_version: %d target_id: %d cfr_fmt: %d\n"
- "mu_rx_data_incl: %d freeze_data_incl: %d\n"
- "mu_rx_num_users: %d decimation_factor: %d\n",
- cookie,
- dma_hdr->tag,
- dma_hdr->length,
- dma_hdr->upload_done,
- dma_hdr->capture_type,
- dma_hdr->preamble_type,
- dma_hdr->nss,
- dma_hdr->num_chains,
- dma_hdr->upload_pkt_bw,
- dma_hdr->sw_peer_id_valid,
- dma_hdr->sw_peer_id,
- dma_hdr->phy_ppdu_id,
- dma_hdr->total_bytes,
- dma_hdr->header_version,
- dma_hdr->target_id,
- dma_hdr->cfr_fmt,
- dma_hdr->mu_rx_data_incl,
- dma_hdr->freeze_data_incl,
- dma_hdr->mu_rx_num_users,
- dma_hdr->decimation_factor);
-
- if (dma_hdr->freeze_data_incl)
- dump_freeze_tlv(freeze_tlv, cookie);
-
- if (dma_hdr->mu_rx_data_incl)
- dump_mu_rx_info(mu_rx_user_info,
- dma_hdr->mu_rx_num_users,
- cookie);
- } else {
- cfr_err("<DBRCOMP><%u>\n"
- "Tag: 0x%02x Length: %d udone: %d\n"
- "ctype: %d preamble: %d Nss: %d\n"
- "num_chains: %d bw: %d peervalid: %d\n"
- "peer_id: %d ppdu_id: 0x%04x total_bytes: %d\n"
- "header_version: %d target_id: %d cfr_fmt: %d\n"
- "mu_rx_data_incl: %d freeze_data_incl: %d\n"
- "mu_rx_num_users: %d decimation_factor: %d\n",
- cookie,
- dma_hdr->tag,
- dma_hdr->length,
- dma_hdr->upload_done,
- dma_hdr->capture_type,
- dma_hdr->preamble_type,
- dma_hdr->nss,
- dma_hdr->num_chains,
- dma_hdr->upload_pkt_bw,
- dma_hdr->sw_peer_id_valid,
- dma_hdr->sw_peer_id,
- dma_hdr->phy_ppdu_id,
- dma_hdr->total_bytes,
- dma_hdr->header_version,
- dma_hdr->target_id,
- dma_hdr->cfr_fmt,
- dma_hdr->mu_rx_data_incl,
- dma_hdr->freeze_data_incl,
- dma_hdr->mu_rx_num_users,
- dma_hdr->decimation_factor);
- }
-}
-
-
-/**
- * extract_peer_mac_from_freeze_tlv() - extract macaddr from freeze tlv
- * @freeze_tlv: Freeze TLV sent from MAC to PHY
- * @peermac: macaddr of the peer
- *
- * Return: none
- */
-void extract_peer_mac_from_freeze_tlv(void *freeze_tlv, uint8_t *peermac)
-{
- struct macrx_freeze_capture_channel *freeze =
- (struct macrx_freeze_capture_channel *)freeze_tlv;
-
- peermac[0] = freeze->packet_ta_lower_16 & 0x00FF;
- peermac[1] = (freeze->packet_ta_lower_16 & 0xFF00) >> 8;
- peermac[2] = freeze->packet_ta_mid_16 & 0x00FF;
- peermac[3] = (freeze->packet_ta_mid_16 & 0xFF00) >> 8;
- peermac[4] = freeze->packet_ta_upper_16 & 0x00FF;
- peermac[5] = (freeze->packet_ta_upper_16 & 0xFF00) >> 8;
-}
-
-/**
- * check_dma_length() - Sanity check DMA header and payload length
- * @dma_hdr: pointer to enhanced DMA header
- *
- * Return: QDF_STATUS
- */
-QDF_STATUS check_dma_length(struct look_up_table *lut)
-{
- if (lut->header_length <= CYP_MAX_HEADER_LENGTH_WORDS &&
- lut->payload_length <= CYP_MAX_DATA_LENGTH_BYTES) {
- return QDF_STATUS_SUCCESS;
- } else {
- return QDF_STATUS_E_FAILURE;
- }
-}
-
-/**
- * correlate_and_relay_enh() - Correlate TXRX and DBR events and stream CFR
- * data to userspace
- * @pdev: objmgr PDEV
- * @cookie: Index into lookup table
- * @lut: pointer to lookup table
- * @module_id: ID of the event received
- * 0 - DBR event
- * 1 - TXRX event
- *
- * Return:
- * - STATUS_ERROR
- * - STATUS_HOLD
- * - STATUS_STREAM_AND_RELEASE
- */
-int correlate_and_relay_enh(struct wlan_objmgr_pdev *pdev, uint32_t cookie,
- struct look_up_table *lut, uint8_t module_id)
-{
- struct pdev_cfr *pcfr;
- uint64_t diff;
- int status = STATUS_ERROR;
-
- if (module_id > 1) {
- cfr_err("Received request with invalid mod id. Investigate!!");
- QDF_ASSERT(0);
- status = STATUS_ERROR;
- goto done;
- }
-
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
-
- if (module_id == CORRELATE_TX_EV_MODULE_ID) {
- if (lut->tx_recv)
- pcfr->cfr_dma_aborts++;
- lut->tx_recv = true;
- } else if (module_id == CORRELATE_DBR_MODULE_ID) {
- pcfr->dbr_evt_cnt++;
- lut->dbr_recv = true;
- }
-
- if ((lut->dbr_recv == true) && (lut->tx_recv == true)) {
- if (lut->dbr_ppdu_id == lut->tx_ppdu_id) {
-
- pcfr->last_success_tstamp = lut->dbr_tstamp;
- if (lut->dbr_tstamp > lut->txrx_tstamp) {
- diff = lut->dbr_tstamp - lut->txrx_tstamp;
- cfr_debug("<CORRELATE><%u>: "
- "TXRX evt -> DBR evt"
- "(delay = %llu ms)\n", cookie, diff);
- } else if (lut->txrx_tstamp > lut->dbr_tstamp) {
- diff = lut->txrx_tstamp - lut->dbr_tstamp;
- cfr_debug("<CORRELATE><%u>: "
- "DBR evt -> TXRX evt"
- "(delay = %llu ms)\n", cookie, diff);
- }
-
- /*
- * Flush pending dbr events, if newer PPDU TLV is
- * received
- */
- cfr_free_pending_dbr_events(pdev);
-
- if (check_dma_length(lut) == QDF_STATUS_SUCCESS) {
- pcfr->release_cnt++;
- cfr_debug("<CORRELATE><%u>:Stream and release "
- "CFR data for "
- "ppdu_id:0x%04x\n", cookie,
- lut->tx_ppdu_id);
- status = STATUS_STREAM_AND_RELEASE;
- goto done;
- } else {
- pcfr->invalid_dma_length_cnt++;
- cfr_err("<CORRELATE><%u>:CFR buffers "
- "received with invalid length "
- "header_length_words = %d "
- "cfr_payload_length_bytes = %d "
- "ppdu_id:0x%04x\n",
- cookie,
- lut->header_length,
- lut->payload_length,
- lut->tx_ppdu_id);
- /*
- * Assert here as length exceeding the allowed
- * limit would anyway manifest as random crash
- */
- QDF_ASSERT(0);
- status = STATUS_ERROR;
- goto done;
- }
- } else {
- /*
- * When there is a ppdu id mismatch, discard the TXRX
- * event since multiple PPDUs are likely to have same
- * dma addr, due to ucode aborts
- */
- cfr_debug("Received new dbr event for same "
- "cookie %u",
- cookie);
- lut->tx_recv = false;
- lut->tx_ppdu_id = 0;
- pcfr->clear_txrx_event++;
- pcfr->cfr_dma_aborts++;
- status = STATUS_HOLD;
- }
- } else {
- status = STATUS_HOLD;
- }
-done:
- return status;
-}
-
-/**
- * target_if_cfr_rx_tlv_process() - Process PPDU status TLVs and store info in
- * lookup table
- * @pdev_obj: PDEV object
- * @nbuf: ppdu info
- *
- * Return: none
- */
-void target_if_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf)
-{
- struct cdp_rx_indication_ppdu *cdp_rx_ppdu;
- struct cdp_rx_stats_ppdu_user *rx_stats_peruser;
- struct cdp_rx_ppdu_cfr_info *cfr_info;
- qdf_dma_addr_t buf_addr = 0, buf_addr_extn = 0;
- struct pdev_cfr *pcfr;
- struct look_up_table *lut = NULL;
- struct csi_cfr_header *header = NULL;
- uint32_t cookie;
- struct wlan_objmgr_psoc *psoc;
- struct wlan_channel *bss_chan;
- enum wlan_phymode ch_phymode;
- uint16_t ch_freq;
- uint32_t ch_cfreq1;
- uint32_t ch_cfreq2;
- uint8_t rx_chainmask;
- struct wlan_objmgr_vdev *vdev = NULL;
- int i, status = 0;
- QDF_STATUS retval = 0;
- struct wlan_lmac_if_cfr_rx_ops *cfr_rx_ops = NULL;
- struct cfr_metadata_version_3 *meta = NULL;
-
- if (qdf_unlikely(!pdev)) {
- cfr_err("pdev is null\n");
- qdf_nbuf_free(nbuf);
- return;
- }
-
- retval = wlan_objmgr_pdev_try_get_ref(pdev, WLAN_CFR_ID);
- if (qdf_unlikely(retval != QDF_STATUS_SUCCESS)) {
- cfr_err("failed to get pdev reference");
- qdf_nbuf_free(nbuf);
- return;
- }
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- if (qdf_unlikely(!pcfr)) {
- cfr_err("pdev object for CFR is NULL");
- goto relref;
- }
-
- cdp_rx_ppdu = (struct cdp_rx_indication_ppdu *)qdf_nbuf_data(nbuf);
- cfr_info = &cdp_rx_ppdu->cfr_info;
-
- if (!cfr_info->bb_captured_channel)
- goto relref;
-
- psoc = wlan_pdev_get_psoc(pdev);
- if (qdf_unlikely(!psoc)) {
- cfr_err("psoc is null\n");
- goto relref;
- }
-
- cfr_rx_ops = &psoc->soc_cb.rx_ops.cfr_rx_ops;
- buf_addr_extn = cfr_info->rtt_che_buffer_pointer_high8 & 0xF;
- buf_addr = (cfr_info->rtt_che_buffer_pointer_low32 |
- ((uint64_t)buf_addr_extn << 32));
-
-
- if (target_if_dbr_cookie_lookup(pdev, DBR_MODULE_CFR, buf_addr,
- &cookie, 0)) {
- cfr_debug("Cookie lookup failure for addr: 0x%pK",
- (void *)((uintptr_t)buf_addr));
- goto relref;
- }
-
- cfr_debug("<RXTLV><%u>:buffer address: 0x%pK \n"
- "<WIFIRX_PPDU_START_E> ppdu_id: 0x%04x\n"
- "<WIFIRXPCU_PPDU_END_INFO_E> BB_CAPTURED_CHANNEL = %d\n"
- "<WIFIPHYRX_PKT_END_E> RX_LOCATION_INFO_VALID = %d\n"
- "<WIFIPHYRX_PKT_END_E> RTT_CHE_BUFFER_POINTER_LOW32 = %x\n"
- "<WIFIPHYRX_PKT_END_E> RTT_CHE_BUFFER_POINTER_HIGH8 = %x\n"
- "<WIFIPHYRX_PKT_END_E> CHAN_CAPTURE_STATUS = %d\n",
- cookie,
- (void *)((uintptr_t)buf_addr),
- cdp_rx_ppdu->ppdu_id,
- cfr_info->bb_captured_channel,
- cfr_info->rx_location_info_valid,
- cfr_info->rtt_che_buffer_pointer_low32,
- cfr_info->rtt_che_buffer_pointer_high8,
- cfr_info->chan_capture_status);
-
- qdf_spin_lock_bh(&pcfr->lut_lock);
-
- lut = get_lut_entry(pcfr, cookie);
- if (qdf_unlikely(!lut)) {
- cfr_err("lut is NULL");
- goto unlock;
- }
-
- vdev = wlan_objmgr_pdev_get_first_vdev(pdev, WLAN_CFR_ID);
- if (qdf_unlikely(!vdev)) {
- cfr_debug("vdev is null\n");
- goto unlock;
- }
-
- bss_chan = wlan_vdev_mlme_get_bss_chan(vdev);
- ch_freq = bss_chan->ch_freq;
- ch_cfreq1 = bss_chan->ch_cfreq1;
- ch_cfreq2 = bss_chan->ch_cfreq2;
- ch_phymode = bss_chan->ch_phymode;
- rx_chainmask = wlan_vdev_mlme_get_rxchainmask(vdev);
- wlan_objmgr_vdev_release_ref(vdev, WLAN_CFR_ID);
-
- pcfr->rx_tlv_evt_cnt++;
- lut->tx_ppdu_id = cdp_rx_ppdu->ppdu_id;
- lut->tx_address1 = cfr_info->rtt_che_buffer_pointer_low32;
- lut->tx_address2 = cfr_info->rtt_che_buffer_pointer_high8;
- lut->txrx_tstamp = qdf_ktime_to_ms(qdf_ktime_get());
- header = &lut->header;
- meta = &header->u.meta_v3;
-
- header->start_magic_num = 0xDEADBEAF;
- header->vendorid = 0x8cfdf0;
- header->cfr_metadata_version = CFR_META_VERSION_3;
- header->cfr_data_version = CFR_DATA_VERSION_1;
- header->chip_type = CFR_CAPTURE_RADIO_CYP;
- header->pltform_type = CFR_PLATFORM_TYPE_ARM;
- header->Reserved = 0;
-
- meta->status = 1;
- meta->capture_bw = cdp_rx_ppdu->u.bw;
- meta->phy_mode = ch_phymode;
- meta->prim20_chan = ch_freq;
- meta->center_freq1 = ch_cfreq1;
- meta->center_freq2 = ch_cfreq2;
- meta->capture_mode = 0;
- meta->num_rx_chain = rx_chainmask;
-
- meta->timestamp = cdp_rx_ppdu->timestamp;
- meta->is_mu_ppdu = (cdp_rx_ppdu->u.ppdu_type == CDP_RX_TYPE_SU) ? 0 : 1;
- meta->num_mu_users = (meta->is_mu_ppdu) ? (cdp_rx_ppdu->num_users) : 0;
-
- if (meta->num_mu_users > CYP_CFR_MU_USERS)
- meta->num_mu_users = CYP_CFR_MU_USERS;
-
- for (i = 0; i < MAX_CHAIN; i++)
- meta->chain_rssi[i] =
- cdp_rx_ppdu->per_chain_rssi[i] + CMN_NOISE_FLOOR;
-
- if (cdp_rx_ppdu->u.ppdu_type != CDP_RX_TYPE_SU) {
- for (i = 0 ; i < meta->num_mu_users; i++) {
- rx_stats_peruser = &cdp_rx_ppdu->user[i];
- qdf_mem_copy(meta->peer_addr.mu_peer_addr[i],
- rx_stats_peruser->mac_addr,
- QDF_MAC_ADDR_SIZE);
- }
- }
- status = correlate_and_relay_enh(pdev, cookie, lut,
- CORRELATE_TX_EV_MODULE_ID);
- if (status == STATUS_STREAM_AND_RELEASE) {
- if (cfr_rx_ops->cfr_info_send)
- status = cfr_rx_ops->cfr_info_send(pdev,
- &lut->header,
- sizeof(struct
- csi_cfr_header),
- lut->data,
- lut->data_len,
- &end_magic, 4);
- dump_metadata(header, cookie);
- release_lut_entry_enh(pdev, lut);
- target_if_dbr_buf_release(pdev, DBR_MODULE_CFR, buf_addr,
- cookie, 0);
- cfr_debug("Data sent to upper layers, release look up table");
- } else if (status == STATUS_HOLD) {
- cfr_debug("HOLD for buffer address: 0x%pK cookie: %u",
- (void *)((uintptr_t)buf_addr), cookie);
- } else {
- cfr_err("Correlation returned invalid status!!");
- }
-
-unlock:
- qdf_spin_unlock_bh(&pcfr->lut_lock);
-relref:
- qdf_nbuf_free(nbuf);
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-}
-
-/**
- * freeze_reason_to_capture_type() - Convert capture type enum in freeze tlv
- * to the cfr type enum shared with userspace
- * @freeze_tlv: pointer to MACRX_FREEZE_CAPTURE_CHANNEL TLV
- *
- * Return: cfr type enum
- */
-uint8_t freeze_reason_to_capture_type(void *freeze_tlv)
-{
- struct macrx_freeze_capture_channel *freeze =
- (struct macrx_freeze_capture_channel *)freeze_tlv;
-
- switch (freeze->capture_reason) {
- case FREEZE_REASON_TM:
- return CFR_TYPE_METHOD_TM;
- case FREEZE_REASON_FTM:
- return CFR_TYPE_METHOD_FTM;
- case FREEZE_REASON_TA_RA_TYPE_FILTER:
- return CFR_TYPE_METHOD_TA_RA_TYPE_FILTER;
- case FREEZE_REASON_NDPA_NDP:
- return CFR_TYPE_METHOD_NDPA_NDP;
- case FREEZE_REASON_ALL_PACKET:
- return CFR_TYPE_METHOD_ALL_PACKET;
- case FREEZE_REASON_ACK_RESP_TO_TM_FTM:
- return CFR_TYPE_METHOD_ACK_RESP_TO_TM_FTM;
- default:
- return CFR_TYPE_METHOD_AUTO;
- }
- return CFR_TYPE_METHOD_AUTO;
-}
-
-#ifdef DIRECT_BUF_RX_ENABLE
-/**
- * enh_cfr_dbr_event_handler() - Process DBR event for CFR data DMA completion
- * @pdev: PDEV object
- * @payload: pointer to CFR data
- *
- * Return: status
- */
-bool enh_cfr_dbr_event_handler(struct wlan_objmgr_pdev *pdev,
- struct direct_buf_rx_data *payload)
-{
- uint8_t *data = NULL;
- uint32_t cookie = 0;
- struct whal_cfir_enhanced_hdr dma_hdr = {0};
- int length, status = 0;
- struct wlan_objmgr_psoc *psoc;
- struct pdev_cfr *pcfr;
- struct look_up_table *lut = NULL;
- struct csi_cfr_header *header = NULL;
- void *mu_rx_user_info = NULL, *freeze_tlv = NULL;
- uint8_t capture_type;
- uint8_t *peer_macaddr = NULL;
- struct wlan_lmac_if_cfr_rx_ops *cfr_rx_ops = NULL;
- struct cfr_metadata_version_3 *meta = NULL;
-
- if ((!pdev) || (!payload)) {
- cfr_err("pdev or payload is null");
- return true;
- }
-
- psoc = wlan_pdev_get_psoc(pdev);
- if (!psoc) {
- cfr_err("psoc is null");
- return true;
- }
-
- cfr_rx_ops = &psoc->soc_cb.rx_ops.cfr_rx_ops;
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- if (!pcfr) {
- cfr_err("pdev object for CFR is null");
- return true;
- }
-
- data = payload->vaddr;
- cookie = payload->cookie;
-
- cfr_debug("<DBRCOMP><%u>:bufferaddr: 0x%pK cookie: %u\n", cookie,
- (void *)((uintptr_t)payload->paddr), cookie);
-
- qdf_mem_copy(&dma_hdr, &data[0],
- sizeof(struct whal_cfir_enhanced_hdr));
-
- if (dma_hdr.freeze_data_incl) {
- freeze_tlv = data + sizeof(struct whal_cfir_enhanced_hdr);
- capture_type = freeze_reason_to_capture_type(freeze_tlv);
- }
-
- if (dma_hdr.mu_rx_data_incl) {
- mu_rx_user_info = data +
- sizeof(struct whal_cfir_enhanced_hdr) +
- (dma_hdr.freeze_data_incl ?
- sizeof(struct macrx_freeze_capture_channel) : 0);
- }
-
-
- length = dma_hdr.length * 4;
- length += dma_hdr.total_bytes; /* size of cfr data */
-
- qdf_spin_lock_bh(&pcfr->lut_lock);
-
- lut = get_lut_entry(pcfr, cookie);
- if (!lut) {
- cfr_err("lut is NULL");
- qdf_spin_unlock_bh(&pcfr->lut_lock);
- return true;
- }
-
- lut->data = data;
- lut->data_len = length;
- lut->dbr_ppdu_id = dma_hdr.phy_ppdu_id;
- lut->dbr_address = payload->paddr;
- lut->dbr_tstamp = qdf_ktime_to_ms(qdf_ktime_get());
- lut->header_length = dma_hdr.length;
- lut->payload_length = dma_hdr.total_bytes;
- qdf_mem_copy(&lut->dma_hdr, &dma_hdr,
- sizeof(struct whal_cfir_dma_hdr));
-
- header = &lut->header;
- meta = &header->u.meta_v3;
- meta->channel_bw = dma_hdr.upload_pkt_bw;
- meta->length = length;
- /* For Tx based captures, capture type is sent from FW */
- if (capture_type != CFR_TYPE_METHOD_ACK_RESP_TO_TM_FTM) {
- meta->capture_type = capture_type;
- meta->sts_count = (dma_hdr.nss + 1);
- if (!dma_hdr.mu_rx_data_incl) {
- /* extract peer addr from freeze tlv */
- peer_macaddr =
- meta->peer_addr.su_peer_addr;
- extract_peer_mac_from_freeze_tlv(freeze_tlv,
- peer_macaddr);
- }
- }
-
- dump_enh_dma_hdr(&dma_hdr, freeze_tlv, mu_rx_user_info,
- header, 0, cookie);
- status = correlate_and_relay_enh(pdev, cookie, lut,
- CORRELATE_DBR_MODULE_ID);
- if (status == STATUS_STREAM_AND_RELEASE) {
- /*
- * Message format
- * Meta data Header + actual payload + trailer
- */
- if (cfr_rx_ops->cfr_info_send)
- status = cfr_rx_ops->cfr_info_send(pdev,
- &lut->header,
- sizeof(struct
- csi_cfr_header),
- lut->data,
- lut->data_len,
- &end_magic, 4);
- dump_metadata(header, cookie);
- release_lut_entry_enh(pdev, lut);
- cfr_debug("Data sent to upper layers, released look up table");
- status = true;
- } else if (status == STATUS_HOLD) {
- cfr_debug("TxRx event not received yet. "
- "Buffer is not released");
- status = false;
- } else {
- cfr_err("Correlation returned invalid status!!");
- status = true;
- }
-
- qdf_spin_unlock_bh(&pcfr->lut_lock);
- return status;
-}
-
-/**
- * target_if_register_to_dbr_enh() - Initialize DBR ring and register callback
- * for DBR events
- * @pdev: PDEV object
- *
- * Return: status
- */
-QDF_STATUS
-target_if_register_to_dbr_enh(struct wlan_objmgr_pdev *pdev)
-{
- struct wlan_objmgr_psoc *psoc;
- struct wlan_lmac_if_direct_buf_rx_tx_ops *dbr_tx_ops = NULL;
- struct dbr_module_config dbr_config;
-
- psoc = wlan_pdev_get_psoc(pdev);
- dbr_tx_ops = &psoc->soc_cb.tx_ops.dbr_tx_ops;
- dbr_config.num_resp_per_event = DBR_NUM_RESP_PER_EVENT_CFR;
- dbr_config.event_timeout_in_ms = DBR_EVENT_TIMEOUT_IN_MS_CFR;
- if (dbr_tx_ops->direct_buf_rx_module_register) {
- return dbr_tx_ops->direct_buf_rx_module_register
- (pdev, DBR_MODULE_CFR, &dbr_config,
- enh_cfr_dbr_event_handler);
- }
-
- return QDF_STATUS_SUCCESS;
-}
-
-/**
- * target_if_unregister_to_dbr_enh() - Unregister callback for DBR events
- * @pdev: PDEV object
- *
- * Return: status
- */
-QDF_STATUS
-target_if_unregister_to_dbr_enh(struct wlan_objmgr_pdev *pdev)
-{
- struct wlan_objmgr_psoc *psoc;
- struct wlan_lmac_if_direct_buf_rx_tx_ops *dbr_tx_ops = NULL;
-
- psoc = wlan_pdev_get_psoc(pdev);
- dbr_tx_ops = &psoc->soc_cb.tx_ops.dbr_tx_ops;
- if (dbr_tx_ops->direct_buf_rx_module_unregister) {
- return dbr_tx_ops->direct_buf_rx_module_unregister
- (pdev, DBR_MODULE_CFR);
- }
-
- return QDF_STATUS_SUCCESS;
-}
-#endif
-
-/**
- * dump_cfr_peer_tx_event_enh() - Dump TX completion event
- * @event: ptr to WMI TX completion event for QOS frames sent during
- * one-shot capture
- * @cookie: Index into lookup table
- *
- * Return: none
- */
-void dump_cfr_peer_tx_event_enh(wmi_cfr_peer_tx_event_param *event,
- uint32_t cookie)
-{
- cfr_debug("<TXCOMP><%u>CFR capture method: %d vdev_id: %d mac: %s\n",
- cookie,
- event->capture_method, event->vdev_id,
- ether_sprintf(&event->peer_mac_addr.bytes[0]));
-
- cfr_debug("<TXCOMP><%u>Chan: %d bw: %d phymode: %d cfreq1: %d cfrq2: %d "
- "nss: %d\n",
- cookie,
- event->primary_20mhz_chan, event->bandwidth,
- event->phy_mode, event->band_center_freq1,
- event->band_center_freq2, event->spatial_streams);
-
- cfr_debug("<TXCOMP><%u>Correlation_info1: 0x%08x "
- "Correlation_info2: 0x%08x\n",
- cookie,
- event->correlation_info_1, event->correlation_info_2);
-
- cfr_debug("<TXCOMP><%u>status: 0x%x ts: %d counter: %d rssi0: 0x%08x\n",
- cookie,
- event->status, event->timestamp_us, event->counter,
- event->chain_rssi[0]);
-}
-
-#ifdef DIRECT_BUF_RX_ENABLE
-/**
- * enh_prepare_cfr_header_txstatus() - Prepare CFR metadata for TX failures
- * @tx_evt_param: ptr to WMI TX completion event
- * @header: pointer to metadata
- *
- * Return: none
- */
-static void enh_prepare_cfr_header_txstatus(wmi_cfr_peer_tx_event_param
- *tx_evt_param,
- struct csi_cfr_header *header)
-{
- header->start_magic_num = 0xDEADBEAF;
- header->vendorid = 0x8cfdf0;
- header->cfr_metadata_version = CFR_META_VERSION_3;
- header->cfr_data_version = CFR_DATA_VERSION_1;
- header->chip_type = CFR_CAPTURE_RADIO_CYP;
- header->pltform_type = CFR_PLATFORM_TYPE_ARM;
- header->Reserved = 0;
- header->u.meta_v3.status = 0; /* failure */
- header->u.meta_v3.length = 0;
-
- qdf_mem_copy(&header->u.meta_v2.peer_addr[0],
- &tx_evt_param->peer_mac_addr.bytes[0], QDF_MAC_ADDR_SIZE);
-
-}
-
-/**
- * target_if_peer_capture_event() - WMI TX completion event for one-shot
- * capture
- * @sc: pointer to offload soc object
- * @data: WMI TX completion event buffer
- * @datalen: WMI Tx completion event buffer length
- *
- * Return: status
- */
-static int
-target_if_peer_capture_event(ol_scn_t sc, uint8_t *data, uint32_t datalen)
-{
- QDF_STATUS retval = 0;
- ol_ath_soc_softc_t *scn = (ol_ath_soc_softc_t *)sc;
- struct wmi_unified *wmi_handle;
- struct wlan_objmgr_psoc *psoc;
- struct wlan_objmgr_pdev *pdev;
- struct wlan_objmgr_vdev *vdev;
- uint32_t cookie;
- struct pdev_cfr *pcfr;
- struct look_up_table *lut = NULL;
- struct csi_cfr_header *header = NULL;
- struct csi_cfr_header header_error = {0};
- wmi_cfr_peer_tx_event_param tx_evt_param = {0};
- qdf_dma_addr_t buf_addr = 0, buf_addr_temp = 0;
- int status;
- struct wlan_channel *bss_chan;
- struct wlan_lmac_if_cfr_rx_ops *cfr_rx_ops = NULL;
-
- psoc = scn->psoc_obj;
- if (!psoc) {
- cfr_err("psoc is null");
- return -EINVAL;
- }
-
- cfr_rx_ops = &psoc->soc_cb.rx_ops.cfr_rx_ops;
-
- retval = wlan_objmgr_psoc_try_get_ref(psoc, WLAN_CFR_ID);
- if (QDF_IS_STATUS_ERROR(retval)) {
- cfr_err("unable to get psoc reference");
- return -EINVAL;
- }
-
- wmi_handle = GET_WMI_HDL_FROM_PSOC(psoc);
- if (!wmi_handle) {
- cfr_err("wmi_handle is null");
- wlan_objmgr_psoc_release_ref(psoc, WLAN_CFR_ID);
- return -EINVAL;
- }
-
-
- retval = wmi_extract_cfr_peer_tx_event_param(wmi_handle, data,
- &tx_evt_param);
-
- if (retval != QDF_STATUS_SUCCESS) {
- cfr_err("Failed to extract cfr tx event param");
- wlan_objmgr_psoc_release_ref(psoc, WLAN_CFR_ID);
- return -EINVAL;
- }
-
-
- vdev = wlan_objmgr_get_vdev_by_id_from_psoc(psoc, tx_evt_param.vdev_id,
- WLAN_CFR_ID);
- if (!vdev) {
- cfr_err("vdev is null");
- wlan_objmgr_psoc_release_ref(psoc, WLAN_CFR_ID);
- return -EINVAL;
- }
-
- pdev = wlan_vdev_get_pdev(vdev);
- if (!pdev) {
- cfr_err("pdev is null");
- wlan_objmgr_psoc_release_ref(psoc, WLAN_CFR_ID);
- wlan_objmgr_vdev_release_ref(vdev, WLAN_CFR_ID);
- return -EINVAL;
- }
-
- retval = wlan_objmgr_pdev_try_get_ref(pdev, WLAN_CFR_ID);
- if (retval != QDF_STATUS_SUCCESS) {
- cfr_err("failed to get pdev reference");
- wlan_objmgr_psoc_release_ref(psoc, WLAN_CFR_ID);
- wlan_objmgr_vdev_release_ref(vdev, WLAN_CFR_ID);
- return -EINVAL;
- }
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- if (!pcfr) {
- cfr_err("pdev object for CFR is NULL");
- retval = -EINVAL;
- goto relref;
- }
-
- if ((tx_evt_param.status & PEER_CFR_CAPTURE_EVT_PS_STATUS_MASK) == 1) {
- cfr_err("CFR capture failed as peer is in powersave : %s",
- ether_sprintf(&tx_evt_param.peer_mac_addr.bytes[0]));
-
- enh_prepare_cfr_header_txstatus(&tx_evt_param, &header_error);
- if (cfr_rx_ops->cfr_info_send)
- cfr_rx_ops->cfr_info_send(pdev,
- &header_error,
- sizeof(struct
- csi_cfr_header),
- NULL, 0, &end_magic, 4);
-
- retval = -EINVAL;
- goto relref;
- }
-
- if ((tx_evt_param.status & PEER_CFR_CAPTURE_EVT_STATUS_MASK) == 0) {
- cfr_debug("CFR capture failed for peer : %s",
- ether_sprintf(&tx_evt_param.peer_mac_addr.bytes[0]));
- retval = -EINVAL;
- goto relref;
- }
-
- if (tx_evt_param.status & CFR_TX_EVT_STATUS_MASK) {
- cfr_debug("TX packet returned status %d for peer: %s",
- tx_evt_param.status & CFR_TX_EVT_STATUS_MASK,
- ether_sprintf(&tx_evt_param.peer_mac_addr.bytes[0]));
- retval = -EINVAL;
- goto relref;
- }
-
- buf_addr_temp = (tx_evt_param.correlation_info_2 & 0x0f);
- buf_addr = (tx_evt_param.correlation_info_1 |
- ((uint64_t)buf_addr_temp << 32));
-
- if (target_if_dbr_cookie_lookup(pdev, DBR_MODULE_CFR, buf_addr,
- &cookie, 0)) {
- cfr_debug("Cookie lookup failure for addr: 0x%pK status: 0x%x",
- (void *)((uintptr_t)buf_addr), tx_evt_param.status);
- retval = -EINVAL;
- goto relref;
- }
-
- cfr_debug("buffer address: 0x%pK cookie: %u",
- (void *)((uintptr_t)buf_addr), cookie);
-
- dump_cfr_peer_tx_event_enh(&tx_evt_param, cookie);
-
- qdf_spin_lock_bh(&pcfr->lut_lock);
-
- lut = get_lut_entry(pcfr, cookie);
- if (!lut) {
- cfr_err("lut is NULL\n");
- retval = -EINVAL;
- goto unlock;
- }
-
- pcfr->tx_evt_cnt++;
- pcfr->total_tx_evt_cnt++;
-
- lut->tx_ppdu_id = (tx_evt_param.correlation_info_2 >> 16);
- lut->tx_address1 = tx_evt_param.correlation_info_1;
- lut->tx_address2 = tx_evt_param.correlation_info_2;
- lut->txrx_tstamp = qdf_ktime_to_ms(qdf_ktime_get());
-
- header = &lut->header;
- header->start_magic_num = 0xDEADBEAF;
- header->vendorid = 0x8cfdf0;
- header->cfr_metadata_version = CFR_META_VERSION_3;
- header->cfr_data_version = CFR_DATA_VERSION_1;
- header->chip_type = CFR_CAPTURE_RADIO_CYP;
- header->pltform_type = CFR_PLATFORM_TYPE_ARM;
- header->Reserved = 0;
- header->u.meta_v3.status = (tx_evt_param.status &
- PEER_CFR_CAPTURE_EVT_STATUS_MASK) ?
- 1 : 0;
- header->u.meta_v3.capture_bw = tx_evt_param.bandwidth;
-
- bss_chan = wlan_vdev_mlme_get_bss_chan(vdev);
- header->u.meta_v3.phy_mode = bss_chan->ch_phymode;
-
- header->u.meta_v3.prim20_chan = tx_evt_param.primary_20mhz_chan;
- header->u.meta_v3.center_freq1 = tx_evt_param.band_center_freq1;
- header->u.meta_v3.center_freq2 = tx_evt_param.band_center_freq2;
-
- /* Currently CFR data is captured on ACK of a Qos NULL frame.
- * For 20 MHz, ACK is Legacy and for 40/80/160, ACK is DUP Legacy.
- */
- header->u.meta_v3.capture_mode = tx_evt_param.bandwidth ?
- CFR_DUP_LEGACY_ACK : CFR_LEGACY_ACK;
- header->u.meta_v3.capture_type = tx_evt_param.capture_method;
- header->u.meta_v3.num_rx_chain = wlan_vdev_mlme_get_rxchainmask(vdev);
- header->u.meta_v3.sts_count = tx_evt_param.spatial_streams;
- header->u.meta_v3.timestamp = tx_evt_param.timestamp_us;
-
- qdf_mem_copy(&header->u.meta_v3.peer_addr.su_peer_addr[0],
- &tx_evt_param.peer_mac_addr.bytes[0], QDF_MAC_ADDR_SIZE);
- qdf_mem_copy(&header->u.meta_v3.chain_rssi[0],
- &tx_evt_param.chain_rssi[0],
- HOST_MAX_CHAINS * sizeof(tx_evt_param.chain_rssi[0]));
- qdf_mem_copy(&header->u.meta_v3.chain_phase[0],
- &tx_evt_param.chain_phase[0],
- HOST_MAX_CHAINS * sizeof(tx_evt_param.chain_phase[0]));
-
- status = correlate_and_relay_enh(pdev, cookie, lut,
- CORRELATE_TX_EV_MODULE_ID);
- if (status == STATUS_STREAM_AND_RELEASE) {
- if (cfr_rx_ops->cfr_info_send)
- status = cfr_rx_ops->cfr_info_send(pdev,
- &lut->header,
- sizeof(
- struct
- csi_cfr_header),
- lut->data,
- lut->data_len,
- &end_magic, 4);
- dump_metadata(header, cookie);
- release_lut_entry_enh(pdev, lut);
- target_if_dbr_buf_release(pdev, DBR_MODULE_CFR, buf_addr,
- cookie, 0);
- cfr_debug("Data sent to upper layers, "
- "releasing look up table");
- } else if (status == STATUS_HOLD) {
- cfr_debug("HOLD for buffer address: 0x%pK cookie: %u",
- (void *)((uintptr_t)buf_addr), cookie);
- } else {
- cfr_err("Correlation returned invalid status!!");
- retval = -EINVAL;
- }
-
-unlock:
- qdf_spin_unlock_bh(&pcfr->lut_lock);
-relref:
-
- wlan_objmgr_psoc_release_ref(psoc, WLAN_CFR_ID);
- wlan_objmgr_vdev_release_ref(vdev, WLAN_CFR_ID);
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return retval;
-}
-#else
-static int
-target_if_peer_capture_event(ol_scn_t sc, uint8_t *data, uint32_t datalen)
-{
- return 0;
-}
-#endif
-
-/**
- * target_if_register_tx_completion_enh_event_handler() - Register callback for
- * WMI TX completion event
- * @psoc: PSOC object
- *
- * Return: Success/Failure status
- */
-int
-target_if_register_tx_completion_enh_event_handler(struct wlan_objmgr_psoc
- *psoc)
-{
- /* Register completion handler here */
- wmi_unified_t wmi_hdl;
- int ret = 0;
-
- wmi_hdl = get_wmi_unified_hdl_from_psoc(psoc);
- if (!wmi_hdl) {
- cfr_err("Unable to get wmi handle");
- return -EINVAL;
- }
-
- ret = wmi_unified_register_event_handler(wmi_hdl,
- wmi_peer_cfr_capture_event_id,
- target_if_peer_capture_event,
- WMI_RX_UMAC_CTX);
- /*
- * Event registration is called per pdev
- * Ignore erorr if event is alreday registred.
- */
- if (ret == QDF_STATUS_E_FAILURE)
- ret = QDF_STATUS_SUCCESS;
-
- return ret;
-}
-
-/**
- * target_if_unregister_tx_completion_enh_event_handler() - Unregister callback
- * for WMI TX completion event
- * @psoc: PSOC object
- *
- * Return: Success/Failure status
- */
-int
-target_if_unregister_tx_completion_enh_event_handler(struct wlan_objmgr_psoc
- *psoc)
-{
- /* Unregister completion handler here */
- wmi_unified_t wmi_hdl;
- int status = 0;
-
- wmi_hdl = get_wmi_unified_hdl_from_psoc(psoc);
- if (!wmi_hdl) {
- cfr_err("Unable to get wmi handle");
- return -EINVAL;
- }
-
- status = wmi_unified_unregister_event(wmi_hdl,
- wmi_peer_cfr_capture_event_id);
- return status;
-}
-
-/**
- * lut_ageout_timer_task() - Timer to flush pending TXRX/DBR events
- *
- * Return: none
- */
-static os_timer_func(lut_ageout_timer_task)
-{
- int i = 0;
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- struct look_up_table *lut = NULL;
- uint64_t diff, cur_tstamp;
-
- OS_GET_TIMER_ARG(pcfr, struct pdev_cfr*);
-
- if (!pcfr) {
- cfr_err("pdev object for CFR is null");
- return;
- }
-
- pdev = pcfr->pdev_obj;
- if (!pdev) {
- cfr_err("pdev is null");
- return;
- }
-
- if (wlan_objmgr_pdev_try_get_ref(pdev, WLAN_CFR_ID)
- != QDF_STATUS_SUCCESS) {
- cfr_err("failed to get pdev reference");
- return;
- }
-
- cur_tstamp = qdf_ktime_to_ms(qdf_ktime_get());
-
- qdf_spin_lock_bh(&pcfr->lut_lock);
-
- for (i = 0; i < NUM_LUT_ENTRIES; i++) {
- lut = get_lut_entry(pcfr, i);
- if (!lut)
- continue;
-
- if (lut->dbr_recv && !lut->tx_recv) {
- diff = cur_tstamp - lut->dbr_tstamp;
- if (diff > LUT_AGE_THRESHOLD) {
- cfr_debug("<%d>TXRX event not received for "
- "%llu ms, release lut entry : "
- "dma_addr = 0x%pK\n", i, diff,
- (void *)((uintptr_t)lut->dbr_address));
- target_if_dbr_buf_release(pdev, DBR_MODULE_CFR,
- lut->dbr_address,
- i, 0);
- pcfr->flush_timeout_dbr_cnt++;
- release_lut_entry_enh(pdev, lut);
- }
- }
- }
-
- qdf_spin_unlock_bh(&pcfr->lut_lock);
-
- if (pcfr->lut_timer_init)
- qdf_timer_mod(&pcfr->lut_age_timer, LUT_AGE_TIMER);
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-}
-
-/**
- * target_if_cfr_start_lut_age_timer() - Start timer to flush aged-out LUT
- * entries
- * @pdev: pointer to pdev object
- *
- * Return: None
- */
-void target_if_cfr_start_lut_age_timer(struct wlan_objmgr_pdev *pdev)
-{
- struct pdev_cfr *pcfr;
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- if (pcfr->lut_timer_init)
- qdf_timer_mod(&pcfr->lut_age_timer, LUT_AGE_TIMER);
-}
-
-/**
- * target_if_cfr_stop_lut_age_timer() - Stop timer to flush aged-out LUT
- * entries
- * @pdev: pointer to pdev object
- *
- * Return: None
- */
-void target_if_cfr_stop_lut_age_timer(struct wlan_objmgr_pdev *pdev)
-{
- struct pdev_cfr *pcfr;
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- if (pcfr->lut_timer_init)
- qdf_timer_stop(&pcfr->lut_age_timer);
-}
-
-/**
- * target_if_cfr_update_global_cfg() - Update global config after a successful
- * commit
- * @pdev: pointer to pdev object
- *
- * Return: None
- */
-void target_if_cfr_update_global_cfg(struct wlan_objmgr_pdev *pdev)
-{
- int grp_id;
- struct pdev_cfr *pcfr;
- struct ta_ra_cfr_cfg *curr_cfg = NULL;
- struct ta_ra_cfr_cfg *glbl_cfg = NULL;
- unsigned long *modified_in_this_session;
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- modified_in_this_session =
- (unsigned long *)&pcfr->rcc_param.modified_in_curr_session;
-
- for (grp_id = 0; grp_id < MAX_TA_RA_ENTRIES; grp_id++) {
- if (qdf_test_bit(grp_id, modified_in_this_session)) {
- /* Populating global config based on user's input */
- glbl_cfg = &pcfr->global[grp_id];
- curr_cfg = &pcfr->rcc_param.curr[grp_id];
-
- if (curr_cfg->valid_ta)
- qdf_mem_copy(glbl_cfg->tx_addr,
- curr_cfg->tx_addr,
- QDF_MAC_ADDR_SIZE);
-
- if (curr_cfg->valid_ra)
- qdf_mem_copy(glbl_cfg->rx_addr,
- curr_cfg->rx_addr,
- QDF_MAC_ADDR_SIZE);
-
- if (curr_cfg->valid_ta_mask)
- qdf_mem_copy(glbl_cfg->tx_addr_mask,
- curr_cfg->tx_addr_mask,
- QDF_MAC_ADDR_SIZE);
-
- if (curr_cfg->valid_ra_mask)
- qdf_mem_copy(glbl_cfg->rx_addr_mask,
- curr_cfg->rx_addr_mask,
- QDF_MAC_ADDR_SIZE);
-
- if (curr_cfg->valid_bw_mask)
- glbl_cfg->bw = curr_cfg->bw;
-
- if (curr_cfg->valid_nss_mask)
- glbl_cfg->nss = curr_cfg->nss;
-
- if (curr_cfg->valid_mgmt_subtype)
- glbl_cfg->mgmt_subtype_filter =
- curr_cfg->mgmt_subtype_filter;
-
- if (curr_cfg->valid_ctrl_subtype)
- glbl_cfg->ctrl_subtype_filter =
- curr_cfg->ctrl_subtype_filter;
-
- if (curr_cfg->valid_data_subtype)
- glbl_cfg->data_subtype_filter =
- curr_cfg->data_subtype_filter;
- }
- }
-}
-
-/**
- * cfr_6018_init_pdev() - Inits cfr pdev and registers necessary handlers.
- * @psoc: pointer to psoc object
- * @pdev: pointer to pdev object
- *
- * Return: Registration status for necessary handlers
- */
-QDF_STATUS cfr_6018_init_pdev(struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev)
-{
- QDF_STATUS status = QDF_STATUS_SUCCESS;
- struct pdev_cfr *pcfr;
-
- if (!pdev) {
- cfr_err("PDEV is NULL!");
- return QDF_STATUS_E_NULL_VALUE;
- }
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- if (!pcfr) {
- cfr_err("pcfr is NULL!");
- return QDF_STATUS_E_NULL_VALUE;
- }
-
-#if DIRECT_BUF_RX_ENABLE
- status = target_if_register_to_dbr_enh(pdev);
- if (status != QDF_STATUS_SUCCESS) {
- cfr_err("Failed to register with dbr");
- return status;
- }
-#endif
-
- status = target_if_register_tx_completion_enh_event_handler(psoc);
- if (status != QDF_STATUS_SUCCESS) {
- cfr_err("Failed to register with tx event handler");
- return status;
- }
-
- pcfr->is_cfr_rcc_capable = 1;
- pcfr->rcc_param.pdev_id = wlan_objmgr_pdev_get_pdev_id(pdev);
- pcfr->rcc_param.modified_in_curr_session = MAX_RESET_CFG_ENTRY;
- pcfr->rcc_param.num_grp_tlvs = MAX_TA_RA_ENTRIES;
-
- target_if_cfr_default_ta_ra_config(&pcfr->rcc_param,
- true, MAX_RESET_CFG_ENTRY);
-
- status = target_if_cfr_config_rcc(pdev, &pcfr->rcc_param);
- if (status == QDF_STATUS_SUCCESS) {
- /* Update global configuration */
- target_if_cfr_update_global_cfg(pdev);
- } else {
- cfr_err("Sending WMI to configure default has failed\n");
- return status;
- }
-
- pcfr->rcc_param.modified_in_curr_session = 0;
-
- pcfr->cfr_max_sta_count = MAX_CFR_ENABLED_CLIENTS;
- pcfr->subbuf_size = STREAMFS_MAX_SUBBUF_CYP;
- pcfr->num_subbufs = STREAMFS_NUM_SUBBUF_CYP;
-
- if (!pcfr->lut_timer_init) {
- qdf_timer_init(NULL,
- &(pcfr->lut_age_timer),
- lut_ageout_timer_task, (void *)pcfr,
- QDF_TIMER_TYPE_WAKE_APPS);
- pcfr->lut_timer_init = 1;
- }
-
- qdf_spinlock_create(&pcfr->lut_lock);
-
- return status;
-}
-
-/**
- * cfr_6018_deinit_pdev() - De-inits corresponding pdev and handlers.
- * @psoc: pointer to psoc object
- * @pdev: pointer to pdev object
- *
- * Return: De-registration status for necessary handlers
- */
-QDF_STATUS cfr_6018_deinit_pdev(struct wlan_objmgr_psoc *psoc,
- struct wlan_objmgr_pdev *pdev)
-{
- int status;
- struct pdev_cfr *pcfr;
-
- pcfr = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
- if (!pcfr) {
- cfr_err("pcfr is NULL");
- return -EINVAL;
- }
-
- if (pcfr->lut_timer_init) {
- qdf_timer_stop(&pcfr->lut_age_timer);
- qdf_timer_free(&(pcfr->lut_age_timer));
- pcfr->lut_timer_init = 0;
- }
-
- pcfr->tx_evt_cnt = 0;
- pcfr->dbr_evt_cnt = 0;
- pcfr->release_cnt = 0;
- pcfr->total_tx_evt_cnt = 0;
- pcfr->rx_tlv_evt_cnt = 0;
- pcfr->flush_dbr_cnt = 0;
- pcfr->flush_timeout_dbr_cnt = 0;
- pcfr->invalid_dma_length_cnt = 0;
- pcfr->clear_txrx_event = 0;
- pcfr->cfr_dma_aborts = 0;
- qdf_mem_zero(&pcfr->rcc_param, sizeof(struct cfr_rcc_param));
- qdf_mem_zero(&pcfr->global, (sizeof(struct ta_ra_cfr_cfg) *
- MAX_TA_RA_ENTRIES));
- pcfr->cfr_timer_enable = 0;
-
-#ifdef DIRECT_BUF_RX_ENABLE
- status = target_if_unregister_to_dbr_enh(pdev);
- if (status != QDF_STATUS_SUCCESS)
- cfr_err("Failed to register with dbr");
-#endif
-
- status = target_if_unregister_tx_completion_enh_event_handler(psoc);
- if (status != QDF_STATUS_SUCCESS)
- cfr_err("Failed to register with dbr");
-
- qdf_spinlock_destroy(&pcfr->lut_lock);
-
- return status;
-}
-
-#endif /* WLAN_ENH_CFR_ENABLE */
-
diff --git a/target_if/cfr/src/target_if_cfr_wifi2_0.c b/target_if/cfr/src/target_if_cfr_wifi2_0.c
index b7993e4..cc5af11 100644
--- a/target_if/cfr/src/target_if_cfr_wifi2_0.c
+++ b/target_if/cfr/src/target_if_cfr_wifi2_0.c
@@ -100,6 +100,12 @@
return status;
}
+ if (wlan_cfr_is_feature_disabled(pdev)) {
+ cfr_err("cfr is disabled");
+ wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
+ return QDF_STATUS_E_NOSUPPORT;
+ }
+
pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
if (pa == NULL) {
cfr_err("pdev_cfr is NULL\n");
diff --git a/tools/linux/cfg80211_ven_cmd.h b/tools/linux/cfg80211_ven_cmd.h
new file mode 100644
index 0000000..e320f85
--- /dev/null
+++ b/tools/linux/cfg80211_ven_cmd.h
@@ -0,0 +1,3076 @@
+/*
+ * Copyright (c) 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.
+ */
+
+#ifndef _CFG80211_VEN_CMD_
+#define _CFG80211_VEN_CMD_
+
+#ifdef CONFIG_SUPPORT_LIBROXML
+#include <ieee80211_external_config.h>
+#endif
+
+/*
+ * vendor_commands: Structure to maintain vendor command
+ * @cmd_value: Corresponding macro for command
+ * @cmd_id: Flag to determine if command is set or get
+ * @n_args: Number of arguments this command takes
+ */
+struct vendor_commands {
+ char *cmd_name;
+ unsigned cmd_value;
+ unsigned cmd_id;
+ unsigned n_args;
+};
+
+#define SET_PARAM 74
+#define GET_PARAM 75
+
+#define OL_ATH_PARAM_SHIFT 0x1000
+#define OL_SPECIAL_PARAM_SHIFT 0x2000
+
+enum {
+ IEEE80211_PARAM_TURBO = 1, /* turbo mode */
+ IEEE80211_PARAM_MODE = 2, /* phy mode (11a, 11b, etc.) */
+ IEEE80211_PARAM_AUTHMODE = 3, /* authentication mode */
+ IEEE80211_PARAM_PROTMODE = 4, /* 802.11g protection */
+ IEEE80211_PARAM_MCASTCIPHER = 5, /* multicast/default cipher */
+ IEEE80211_PARAM_MCASTKEYLEN = 6, /* multicast key length */
+ IEEE80211_PARAM_UCASTCIPHERS = 7, /* unicast cipher suites */
+ IEEE80211_PARAM_UCASTCIPHER = 8, /* unicast cipher */
+ IEEE80211_PARAM_UCASTKEYLEN = 9, /* unicast key length */
+ IEEE80211_PARAM_WPA = 10, /* WPA mode (0,1,2) */
+ IEEE80211_PARAM_ROAMING = 12, /* roaming mode */
+ IEEE80211_PARAM_PRIVACY = 13, /* privacy invoked */
+ IEEE80211_PARAM_COUNTERMEASURES = 14, /* WPA/TKIP countermeasures */
+ IEEE80211_PARAM_DROPUNENCRYPTED = 15, /* discard unencrypted frames */
+ IEEE80211_PARAM_DRIVER_CAPS = 16, /* driver capabilities */
+ IEEE80211_PARAM_MACCMD = 17, /* MAC ACL operation */
+ IEEE80211_PARAM_WMM = 18, /* WMM mode (on, off) */
+ IEEE80211_PARAM_HIDESSID = 19, /* hide SSID mode (on, off) */
+ IEEE80211_PARAM_APBRIDGE = 20, /* AP inter-sta bridging */
+ IEEE80211_PARAM_KEYMGTALGS = 21, /* key management algorithms */
+ IEEE80211_PARAM_RSNCAPS = 22, /* RSN capabilities */
+ IEEE80211_PARAM_INACT = 23, /* station inactivity timeout */
+ IEEE80211_PARAM_INACT_AUTH = 24, /* station auth inact timeout */
+ IEEE80211_PARAM_INACT_INIT = 25, /* station init inact timeout */
+ IEEE80211_PARAM_DTIM_PERIOD = 28, /* DTIM period (beacons) */
+ IEEE80211_PARAM_BEACON_INTERVAL = 29, /* beacon interval (ms) */
+ IEEE80211_PARAM_DOTH = 30, /* 11.h is on/off */
+ IEEE80211_PARAM_PWRTARGET = 31, /* Current Channel Pwr Constraint */
+ IEEE80211_PARAM_GENREASSOC = 32, /* Generate a reassociation request */
+ IEEE80211_PARAM_COMPRESSION = 33, /* compression */
+ IEEE80211_PARAM_FF = 34, /* fast frames support */
+ IEEE80211_PARAM_XR = 35, /* XR support */
+ IEEE80211_PARAM_BURST = 36, /* burst mode */
+ IEEE80211_PARAM_PUREG = 37, /* pure 11g (no 11b stations) */
+ IEEE80211_PARAM_AR = 38, /* AR support */
+ IEEE80211_PARAM_WDS = 39, /* Enable 4 address processing */
+ IEEE80211_PARAM_BGSCAN = 40, /* bg scanning (on, off) */
+ IEEE80211_PARAM_BGSCAN_IDLE = 41, /* bg scan idle threshold */
+ IEEE80211_PARAM_BGSCAN_INTERVAL = 42, /* bg scan interval */
+ IEEE80211_PARAM_MCAST_RATE = 43, /* Multicast Tx Rate */
+ IEEE80211_PARAM_COVERAGE_CLASS = 44, /* coverage class */
+ IEEE80211_PARAM_COUNTRY_IE = 45, /* enable country IE */
+ IEEE80211_PARAM_SCANVALID = 46, /* scan cache valid threshold */
+ IEEE80211_PARAM_ROAM_RSSI_11A = 47, /* rssi threshold in 11a */
+ IEEE80211_PARAM_ROAM_RSSI_11B = 48, /* rssi threshold in 11b */
+ IEEE80211_PARAM_ROAM_RSSI_11G = 49, /* rssi threshold in 11g */
+ IEEE80211_PARAM_ROAM_RATE_11A = 50, /* tx rate threshold in 11a */
+ IEEE80211_PARAM_ROAM_RATE_11B = 51, /* tx rate threshold in 11b */
+ IEEE80211_PARAM_ROAM_RATE_11G = 52, /* tx rate threshold in 11g */
+ IEEE80211_PARAM_UAPSDINFO = 53, /* value for qos info field */
+ IEEE80211_PARAM_SLEEP = 54, /* force sleep/wake */
+ IEEE80211_PARAM_QOSNULL = 55, /* force sleep/wake */
+ IEEE80211_PARAM_PSPOLL = 56, /* force ps-poll generation (sta only) */
+ IEEE80211_PARAM_EOSPDROP = 57, /* force uapsd EOSP drop (ap only) */
+ IEEE80211_PARAM_REGCLASS = 59, /* enable regclass ids in country IE */
+ IEEE80211_PARAM_CHANBW = 60, /* set chan bandwidth preference */
+ IEEE80211_PARAM_WMM_AGGRMODE = 61, /* set WMM Aggressive Mode */
+ IEEE80211_PARAM_SHORTPREAMBLE = 62, /* enable/disable short Preamble */
+ IEEE80211_PARAM_CWM_MODE = 64, /* CWM mode */
+ IEEE80211_PARAM_CWM_EXTOFFSET = 65, /* CWM extension channel offset */
+ IEEE80211_PARAM_CWM_EXTPROTMODE = 66, /* CWM extension channel protection mode */
+ IEEE80211_PARAM_CWM_EXTPROTSPACING = 67,/* CWM extension channel protection spacing */
+ IEEE80211_PARAM_CWM_ENABLE = 68,/* CWM state machine enabled */
+ IEEE80211_PARAM_CWM_EXTBUSYTHRESHOLD = 69,/* CWM extension channel busy threshold */
+ IEEE80211_PARAM_CWM_CHWIDTH = 70, /* CWM STATE: current channel width */
+ IEEE80211_PARAM_SHORT_GI = 71, /* half GI */
+ IEEE80211_PARAM_FAST_CC = 72, /* fast channel change */
+
+ /*
+ * 11n A-MPDU, A-MSDU support
+ */
+ IEEE80211_PARAM_AMPDU = 73, /* 11n a-mpdu support */
+ IEEE80211_PARAM_AMPDU_LIMIT = 74, /* a-mpdu length limit */
+ IEEE80211_PARAM_AMPDU_DENSITY = 75, /* a-mpdu density */
+ IEEE80211_PARAM_AMPDU_SUBFRAMES = 76, /* a-mpdu subframe limit */
+ IEEE80211_PARAM_AMSDU = 77, /* a-msdu support */
+ IEEE80211_PARAM_AMSDU_LIMIT = 78, /* a-msdu length limit */
+
+ IEEE80211_PARAM_COUNTRYCODE = 79, /* Get country code */
+ IEEE80211_PARAM_TX_CHAINMASK = 80, /* Tx chain mask */
+ IEEE80211_PARAM_RX_CHAINMASK = 81, /* Rx chain mask */
+ IEEE80211_PARAM_RTSCTS_RATECODE = 82, /* RTS Rate code */
+ IEEE80211_PARAM_HT_PROTECTION = 83, /* Protect traffic in HT mode */
+ IEEE80211_PARAM_RESET_ONCE = 84, /* Force a reset */
+ IEEE80211_PARAM_SETADDBAOPER = 85, /* Set ADDBA mode */
+ IEEE80211_PARAM_TX_CHAINMASK_LEGACY = 86, /* Tx chain mask for legacy clients */
+ IEEE80211_PARAM_11N_RATE = 87, /* Set ADDBA mode */
+ IEEE80211_PARAM_11N_RETRIES = 88, /* Tx chain mask for legacy clients */
+ IEEE80211_PARAM_DBG_LVL = 89, /* Debug Level for specific VAP */
+ IEEE80211_PARAM_WDS_AUTODETECT = 90, /* Configurable Auto Detect/Delba for WDS mode */
+ IEEE80211_PARAM_ATH_RADIO = 91, /* returns the name of the radio being used */
+ IEEE80211_PARAM_IGNORE_11DBEACON = 92, /* Don't process 11d beacon (on, off) */
+ IEEE80211_PARAM_STA_FORWARD = 93, /* Enable client 3 addr forwarding */
+
+ /*
+ * Mcast Enhancement support
+ */
+ IEEE80211_PARAM_ME = 94, /* Set Mcast enhancement option: 0 disable, 1 tunneling, 2 translate 4 to disable snoop feature*/
+ IEEE80211_PARAM_PUREN = 100, /* pure 11n (no 11bg/11a stations) */
+ IEEE80211_PARAM_BASICRATES = 101, /* Change Basic Rates */
+ IEEE80211_PARAM_NO_EDGE_CH = 102, /* Avoid band edge channels */
+ IEEE80211_PARAM_WEP_TKIP_HT = 103, /* Enable HT rates with WEP/TKIP encryption */
+ IEEE80211_PARAM_RADIO = 104, /* radio on/off */
+ IEEE80211_PARAM_NETWORK_SLEEP = 105, /* set network sleep enable/disable */
+ IEEE80211_PARAM_DROPUNENC_EAPOL = 106,
+
+ /*
+ * Headline block removal
+ */
+ IEEE80211_PARAM_HBR_TIMER = 107,
+ IEEE80211_PARAM_HBR_STATE = 108,
+
+ /*
+ * Unassociated power consumpion improve
+ */
+ IEEE80211_PARAM_SLEEP_PRE_SCAN = 109,
+ IEEE80211_PARAM_SCAN_PRE_SLEEP = 110,
+
+ /* support for wapi: set auth mode and key */
+ IEEE80211_PARAM_SETWAPI = 112,
+#if WLAN_SUPPORT_GREEN_AP
+ IEEE80211_IOCTL_GREEN_AP_PS_ENABLE = 113,
+ IEEE80211_IOCTL_GREEN_AP_PS_TIMEOUT = 114,
+#endif
+ IEEE80211_PARAM_WPS = 116,
+ IEEE80211_PARAM_RX_RATE = 117,
+ IEEE80211_PARAM_CHEXTOFFSET = 118,
+ IEEE80211_PARAM_CHSCANINIT = 119,
+ IEEE80211_PARAM_MPDU_SPACING = 120,
+ IEEE80211_PARAM_HT40_INTOLERANT = 121,
+ IEEE80211_PARAM_CHWIDTH = 122,
+ IEEE80211_PARAM_EXTAP = 123, /* Enable client 3 addr forwarding */
+ IEEE80211_PARAM_COEXT_DISABLE = 124,
+ IEEE80211_PARAM_GETIQUECONFIG = 129, /*print out the iQUE config*/
+ IEEE80211_PARAM_CCMPSW_ENCDEC = 130, /* support for ccmp s/w encrypt decrypt */
+
+ /* Support for repeater placement */
+ IEEE80211_PARAM_CUSTPROTO_ENABLE = 131,
+ IEEE80211_PARAM_GPUTCALC_ENABLE = 132,
+ IEEE80211_PARAM_DEVUP = 133,
+ IEEE80211_PARAM_MACDEV = 134,
+ IEEE80211_PARAM_MACADDR1 = 135,
+ IEEE80211_PARAM_MACADDR2 = 136,
+ IEEE80211_PARAM_GPUTMODE = 137,
+ IEEE80211_PARAM_TXPROTOMSG = 138,
+ IEEE80211_PARAM_RXPROTOMSG = 139,
+ IEEE80211_PARAM_STATUS = 140,
+ IEEE80211_PARAM_ASSOC = 141,
+ IEEE80211_PARAM_NUMSTAS = 142,
+ IEEE80211_PARAM_STA1ROUTE = 143,
+ IEEE80211_PARAM_STA2ROUTE = 144,
+ IEEE80211_PARAM_STA3ROUTE = 145,
+ IEEE80211_PARAM_STA4ROUTE = 146,
+ IEEE80211_PARAM_PERIODIC_SCAN = 179,
+#if ATH_SUPPORT_AP_WDS_COMBO
+ IEEE80211_PARAM_NO_BEACON = 180, /* No beacon xmit on VAP */
+#endif
+ IEEE80211_PARAM_VAP_COUNTRY_IE = 181, /* 802.11d country ie per vap */
+ IEEE80211_PARAM_VAP_DOTH = 182, /* 802.11h per vap */
+ IEEE80211_PARAM_STA_QUICKKICKOUT = 183, /* station quick kick out */
+ IEEE80211_PARAM_AUTO_ASSOC = 184,
+ IEEE80211_PARAM_RXBUF_LIFETIME = 185, /* lifetime of reycled rx buffers */
+ IEEE80211_PARAM_2G_CSA = 186, /* 2.4 GHz CSA is on/off */
+ IEEE80211_PARAM_WAPIREKEY_USK = 187,
+ IEEE80211_PARAM_WAPIREKEY_MSK = 188,
+ IEEE80211_PARAM_WAPIREKEY_UPDATE = 189,
+#if ATH_SUPPORT_IQUE
+ IEEE80211_PARAM_RC_VIVO = 190, /* Use separate rate control algorithm for VI/VO queues */
+#endif
+ IEEE80211_PARAM_CLR_APPOPT_IE = 191, /* Clear Cached App/OptIE */
+ IEEE80211_PARAM_SW_WOW = 192, /* wow by sw */
+ IEEE80211_PARAM_QUIET_PERIOD = 193,
+ IEEE80211_PARAM_QBSS_LOAD = 194,
+ IEEE80211_PARAM_RRM_CAP = 195,
+ IEEE80211_PARAM_WNM_CAP = 196,
+ IEEE80211_PARAM_ADD_WDS_ADDR = 197, /* add wds addr */
+#ifdef QCA_PARTNER_PLATFORM
+ IEEE80211_PARAM_PLTFRM_PRIVATE = 198, /* platfrom's private ioctl*/
+#endif
+
+#if UMAC_SUPPORT_VI_DBG
+ /* Support for Video Debug */
+ IEEE80211_PARAM_DBG_CFG = 199,
+ IEEE80211_PARAM_DBG_NUM_STREAMS = 200,
+ IEEE80211_PARAM_STREAM_NUM = 201,
+ IEEE80211_PARAM_DBG_NUM_MARKERS = 202,
+ IEEE80211_PARAM_MARKER_NUM = 203,
+ IEEE80211_PARAM_MARKER_OFFSET_SIZE = 204,
+ IEEE80211_PARAM_MARKER_MATCH = 205,
+ IEEE80211_PARAM_RXSEQ_OFFSET_SIZE = 206,
+ IEEE80211_PARAM_RX_SEQ_RSHIFT = 207,
+ IEEE80211_PARAM_RX_SEQ_MAX = 208,
+ IEEE80211_PARAM_RX_SEQ_DROP = 209,
+ IEEE80211_PARAM_TIME_OFFSET_SIZE = 210,
+ IEEE80211_PARAM_RESTART = 211,
+ IEEE80211_PARAM_RXDROP_STATUS = 212,
+#endif
+#if ATH_SUPPORT_IBSS_DFS
+ IEEE80211_PARAM_IBSS_DFS_PARAM = 225,
+#endif
+#ifdef ATH_SUPPORT_TxBF
+ IEEE80211_PARAM_TXBF_AUTO_CVUPDATE = 240, /* Auto CV update enable*/
+ IEEE80211_PARAM_TXBF_CVUPDATE_PER = 241, /* per theshold to initial CV update*/
+#endif
+ IEEE80211_PARAM_MAXSTA = 242,
+ IEEE80211_PARAM_RRM_STATS = 243,
+ IEEE80211_PARAM_RRM_SLWINDOW = 244,
+ IEEE80211_PARAM_MFP_TEST = 245,
+ IEEE80211_PARAM_SCAN_BAND = 246, /* only scan channels of requested band */
+#if ATH_SUPPORT_FLOWMAC_MODULE
+ IEEE80211_PARAM_FLOWMAC = 247, /* flowmac enable/disable ath0*/
+#endif
+ IEEE80211_PARAM_STA_PWR_SET_PSPOLL = 255, /* Set ips_use_pspoll flag for STA */
+ IEEE80211_PARAM_NO_STOP_DISASSOC = 256, /* Do not send disassociation frame on stopping vap */
+ IEEE80211_PARAM_CHAN_UTIL_ENAB = 260,
+ IEEE80211_PARAM_CHAN_UTIL = 261, /* Get Channel Utilization value (scale: 0 - 255) */
+ IEEE80211_PARAM_DBG_LVL_HIGH = 262, /* Debug Level for specific VAP (upper 32 bits) */
+ IEEE80211_PARAM_PROXYARP_CAP = 263, /* Enable WNM Proxy ARP feature */
+ IEEE80211_PARAM_DGAF_DISABLE = 264, /* Hotspot 2.0 DGAF Disable feature */
+ IEEE80211_PARAM_L2TIF_CAP = 265, /* Hotspot 2.0 L2 Traffic Inspection and Filtering */
+ IEEE80211_PARAM_WEATHER_RADAR_CHANNEL = 266, /* weather radar channel selection is bypassed */
+ IEEE80211_PARAM_SEND_DEAUTH = 267,/* for sending deauth while doing interface down*/
+ IEEE80211_PARAM_WEP_KEYCACHE = 268,/* wepkeys mustbe in first fourslots in Keycache*/
+#if ATH_SUPPORT_WPA_SUPPLICANT_CHECK_TIME
+ IEEE80211_PARAM_REJOINT_ATTEMP_TIME = 269, /* Set the Rejoint time */
+#endif
+ IEEE80211_PARAM_WNM_SLEEP = 270, /* WNM-Sleep Mode */
+ IEEE80211_PARAM_WNM_BSS_CAP = 271,
+ IEEE80211_PARAM_WNM_TFS_CAP = 272,
+ IEEE80211_PARAM_WNM_TIM_CAP = 273,
+ IEEE80211_PARAM_WNM_SLEEP_CAP = 274,
+ IEEE80211_PARAM_WNM_FMS_CAP = 275,
+ IEEE80211_PARAM_RRM_DEBUG = 276, /* RRM debugging parameter */
+ IEEE80211_PARAM_SET_TXPWRADJUST = 277,
+ IEEE80211_PARAM_TXRX_DBG = 278, /* show txrx debug info */
+ IEEE80211_PARAM_VHT_MCS = 279, /* VHT MCS set */
+ IEEE80211_PARAM_TXRX_FW_STATS = 280, /* single FW stat */
+ IEEE80211_PARAM_TXRX_FW_MSTATS = 281, /* multiple FW stats */
+ IEEE80211_PARAM_NSS = 282, /* Number of Spatial Streams */
+ IEEE80211_PARAM_LDPC = 283, /* Support LDPC */
+ IEEE80211_PARAM_TX_STBC = 284, /* Support TX STBC */
+ IEEE80211_PARAM_RX_STBC = 285, /* Support RX STBC */
+ IEEE80211_PARAM_APONLY = 293,
+ IEEE80211_PARAM_TXRX_FW_STATS_RESET = 294,
+ IEEE80211_PARAM_TX_PPDU_LOG_CFG = 295, /* tx PPDU log cfg params */
+ IEEE80211_PARAM_OPMODE_NOTIFY = 296, /* Op Mode Notification */
+ IEEE80211_PARAM_NOPBN = 297, /* don't send push button notification */
+ IEEE80211_PARAM_DFS_CACTIMEOUT = 298, /* override CAC timeout */
+ IEEE80211_PARAM_ENABLE_RTSCTS = 299, /* Enable/disable RTS-CTS */
+
+ IEEE80211_PARAM_MAX_AMPDU = 300, /* Set/Get rx AMPDU exponent/shift */
+ IEEE80211_PARAM_VHT_MAX_AMPDU = 301, /* Set/Get rx VHT AMPDU exponent/shift */
+ IEEE80211_PARAM_BCAST_RATE = 302, /* Setting Bcast DATA rate */
+ IEEE80211_PARAM_PARENT_IFINDEX = 304, /* parent net_device ifindex for this VAP */
+#if WDS_VENDOR_EXTENSION
+ IEEE80211_PARAM_WDS_RX_POLICY = 305, /* Set/Get WDS rx filter policy for vendor specific WDS */
+#endif
+ IEEE80211_PARAM_ENABLE_OL_STATS = 306, /*Enables/Disables the
+ stats in the Host and in the FW */
+#if WLAN_SUPPORT_GREEN_AP
+ IEEE80211_IOCTL_GREEN_AP_ENABLE_PRINT = 307, /* Enable/Disable Green-AP debug prints */
+#endif
+ IEEE80211_PARAM_RC_NUM_RETRIES = 308,
+ IEEE80211_PARAM_GET_ACS = 309,/* to get status of acs */
+ IEEE80211_PARAM_GET_CAC = 310,/* to get status of CAC period */
+ IEEE80211_PARAM_EXT_IFACEUP_ACS = 311, /* Enable external auto channel selection entity
+ at VAP init time */
+ IEEE80211_PARAM_ONETXCHAIN = 312, /* force to tx with one chain for legacy client */
+ IEEE80211_PARAM_DFSDOMAIN = 313, /* Get DFS Domain */
+ IEEE80211_PARAM_SCAN_CHAN_EVENT = 314, /* Enable delivery of Scan Channel Events during
+ 802.11 scans (11ac offload, and IEEE80211_M_HOSTAP
+ mode only). */
+ IEEE80211_PARAM_DESIRED_CHANNEL = 315, /* Get desired channel corresponding to desired
+ PHY mode */
+ IEEE80211_PARAM_DESIRED_PHYMODE = 316, /* Get desired PHY mode */
+ IEEE80211_PARAM_SEND_ADDITIONAL_IES = 317, /* Control sending of additional IEs to host */
+ IEEE80211_PARAM_START_ACS_REPORT = 318, /* to start acs scan report */
+ IEEE80211_PARAM_MIN_DWELL_ACS_REPORT = 319, /* min dwell time for acs scan report */
+ IEEE80211_PARAM_MAX_DWELL_ACS_REPORT = 320, /* max dwell time for acs scan report */
+ IEEE80211_PARAM_ACS_CH_HOP_LONG_DUR = 321, /* channel long duration timer used in acs */
+ IEEE80211_PARAM_ACS_CH_HOP_NO_HOP_DUR = 322, /* No hopping timer used in acs */
+ IEEE80211_PARAM_ACS_CH_HOP_CNT_WIN_DUR = 323, /* counter window timer used in acs */
+ IEEE80211_PARAM_ACS_CH_HOP_NOISE_TH = 324, /* Noise threshold used in acs channel hopping */
+ IEEE80211_PARAM_ACS_CH_HOP_CNT_TH = 325, /* counter threshold used in acs channel hopping */
+ IEEE80211_PARAM_ACS_ENABLE_CH_HOP = 326, /* Enable/Disable acs channel hopping */
+ IEEE80211_PARAM_SET_CABQ_MAXDUR = 327, /* set the max tx percentage for cabq */
+ IEEE80211_PARAM_256QAM_2G = 328, /* 2.4 GHz 256 QAM support */
+ IEEE80211_PARAM_MAX_SCANENTRY = 330, /* MAX scan entry */
+ IEEE80211_PARAM_SCANENTRY_TIMEOUT = 331, /* Scan entry timeout value */
+ IEEE80211_PARAM_PURE11AC = 332, /* pure 11ac(no 11bg/11a/11n stations) */
+#if UMAC_VOW_DEBUG
+ IEEE80211_PARAM_VOW_DBG_ENABLE = 333, /*Enable VoW debug*/
+#endif
+ IEEE80211_PARAM_SCAN_MIN_DWELL = 334, /* MIN dwell time to be used during scan */
+ IEEE80211_PARAM_SCAN_MAX_DWELL = 335, /* MAX dwell time to be used during scan */
+ IEEE80211_PARAM_BANDWIDTH = 336,
+ IEEE80211_PARAM_FREQ_BAND = 337,
+ IEEE80211_PARAM_EXTCHAN = 338,
+ IEEE80211_PARAM_MCS = 339,
+ IEEE80211_PARAM_CHAN_NOISE = 340,
+ IEEE80211_PARAM_VHT_SGIMASK = 341, /* Set VHT SGI MASK */
+ IEEE80211_PARAM_VHT80_RATEMASK = 342, /* Set VHT80 Auto Rate MASK */
+#if ATH_PERF_PWR_OFFLOAD
+ IEEE80211_PARAM_VAP_TX_ENCAP_TYPE = 343,
+ IEEE80211_PARAM_VAP_RX_DECAP_TYPE = 344,
+#endif /* ATH_PERF_PWR_OFFLOAD */
+#if (HOST_SW_TSO_ENABLE || HOST_SW_TSO_SG_ENABLE)
+ IEEE80211_PARAM_TSO_STATS = 345, /* Get TSO Stats */
+ IEEE80211_PARAM_TSO_STATS_RESET = 346, /* Reset TSO Stats */
+#endif /* HOST_SW_TSO_ENABLE || HOST_SW_TSO_SG_ENABLE */
+#if HOST_SW_LRO_ENABLE
+ IEEE80211_PARAM_LRO_STATS = 347, /* Get LRO Stats */
+ IEEE80211_PARAM_LRO_STATS_RESET = 348, /* Reset LRO Stats */
+#endif /* HOST_SW_LRO_ENABLE */
+#if RX_CHECKSUM_OFFLOAD
+ IEEE80211_PARAM_RX_CKSUM_ERR_STATS = 349, /* Get RX CKSUM Err Stats */
+ IEEE80211_PARAM_RX_CKSUM_ERR_RESET = 350, /* Reset RX CKSUM Err Stats */
+#endif /* RX_CHECKSUM_OFFLOAD */
+
+ IEEE80211_PARAM_VHT_STS_CAP = 351,
+ IEEE80211_PARAM_VHT_SOUNDING_DIM = 352,
+ IEEE80211_PARAM_VHT_SUBFEE = 353, /* set VHT SU beamformee capability */
+ IEEE80211_PARAM_VHT_MUBFEE = 354, /* set VHT MU beamformee capability */
+ IEEE80211_PARAM_VHT_SUBFER = 355, /* set VHT SU beamformer capability */
+ IEEE80211_PARAM_VHT_MUBFER = 356, /* set VHT MU beamformer capability */
+ IEEE80211_PARAM_IMPLICITBF = 357,
+ IEEE80211_PARAM_SEND_WOWPKT = 358, /* Send Wake-On-Wireless packet */
+ IEEE80211_PARAM_STA_FIXED_RATE = 359, /* set/get fixed rate for associated sta on AP */
+ IEEE80211_PARAM_11NG_VHT_INTEROP = 360, /* 2.4ng Vht Interop */
+#if HOST_SW_SG_ENABLE
+ IEEE80211_PARAM_SG_STATS = 361, /* Get SG Stats */
+ IEEE80211_PARAM_SG_STATS_RESET = 362, /* Reset SG Stats */
+#endif /* HOST_SW_SG_ENABLE */
+ IEEE80211_PARAM_SPLITMAC = 363,
+ IEEE80211_PARAM_SHORT_SLOT = 364, /* Set short slot time */
+ IEEE80211_PARAM_SET_ERP = 365, /* Set ERP protection mode */
+ IEEE80211_PARAM_SESSION_TIMEOUT = 366, /* STA's session time */
+#if ATH_PERF_PWR_OFFLOAD && QCA_SUPPORT_RAWMODE_PKT_SIMULATION
+ IEEE80211_PARAM_RAWMODE_SIM_TXAGGR = 367, /* Enable/disable raw mode simulation
+ Tx A-MSDU aggregation */
+ IEEE80211_PARAM_RAWMODE_PKT_SIM_STATS = 368, /* Get Raw mode packet simulation stats. */
+ IEEE80211_PARAM_CLR_RAWMODE_PKT_SIM_STATS = 369, /* Clear Raw mode packet simulation stats. */
+ IEEE80211_PARAM_RAWMODE_SIM_DEBUG = 370, /* Enable/disable raw mode simulation debug */
+#endif /* ATH_PERF_PWR_OFFLOAD && QCA_SUPPORT_RAWMODE_PKT_SIMULATION */
+ IEEE80211_PARAM_PROXY_STA = 371, /* set/get ProxySTA */
+ IEEE80211_PARAM_BW_NSS_RATEMASK = 372, /* Set ratemask with specific Bandwidth and NSS */
+ IEEE80211_PARAM_RX_SIGNAL_DBM = 373, /*get rx signal strength in dBm*/
+ IEEE80211_PARAM_VHT_TX_MCSMAP = 374, /* Set VHT TX MCS MAP */
+ IEEE80211_PARAM_VHT_RX_MCSMAP = 375, /* Set VHT RX MCS MAP */
+ IEEE80211_PARAM_WNM_SMENTER = 376,
+ IEEE80211_PARAM_WNM_SMEXIT = 377,
+ IEEE80211_PARAM_HC_BSSLOAD = 378,
+ IEEE80211_PARAM_OSEN = 379,
+#if QCA_AIRTIME_FAIRNESS
+ IEEE80211_PARAM_ATF_OPT = 380, /* set airtime feature */
+ IEEE80211_PARAM_ATF_PER_UNIT = 381,
+#endif
+ IEEE80211_PARAM_TX_MIN_POWER = 382, /* Get min tx power */
+ IEEE80211_PARAM_TX_MAX_POWER = 383, /* Get max tx power */
+ IEEE80211_PARAM_MGMT_RATE = 384, /* Set mgmt rate, will set mcast/bcast/ucast to same rate*/
+ IEEE80211_PARAM_NO_VAP_RESET = 385, /* Disable the VAP reset in NSS */
+ IEEE80211_PARAM_STA_COUNT = 386, /* TO get number of station associated*/
+#if QCA_SUPPORT_SSID_STEERING
+ IEEE80211_PARAM_VAP_SSID_CONFIG = 387, /* Vap configuration */
+#endif
+#if ATH_SUPPORT_DSCP_OVERRIDE
+ IEEE80211_PARAM_DSCP_MAP_ID = 388,
+ IEEE80211_PARAM_DSCP_TID_MAP = 389,
+#endif
+ IEEE80211_PARAM_RX_FILTER_MONITOR = 390,
+ IEEE80211_PARAM_SECOND_CENTER_FREQ = 391,
+ IEEE80211_PARAM_STRICT_BW = 392, /* BW restriction in pure 11ac */
+ IEEE80211_PARAM_ADD_LOCAL_PEER = 393,
+ IEEE80211_PARAM_SET_MHDR = 394,
+ IEEE80211_PARAM_ALLOW_DATA = 395,
+ IEEE80211_PARAM_SET_MESHDBG = 396,
+ IEEE80211_PARAM_RTT_ENABLE = 397,
+ IEEE80211_PARAM_LCI_ENABLE = 398,
+ IEEE80211_PARAM_VAP_ENHIND = 399, /* Independent VAP mode for Repeater and AP-STA config */
+ IEEE80211_PARAM_VAP_PAUSE_SCAN = 400, /* Pause VAP mode for scanning */
+ IEEE80211_PARAM_EXT_ACS_IN_PROGRESS = 401, /* Whether external auto channel selection is in
+ progress */
+ IEEE80211_PARAM_AMPDU_DENSITY_OVERRIDE = 402, /* a-mpdu density override */
+ IEEE80211_PARAM_SMART_MESH_CONFIG = 403, /* smart MESH configuration */
+ IEEE80211_DISABLE_BCN_BW_NSS_MAP = 404, /* To set & get Bandwidth-NSS mapping in beacon as vendor specific IE*/
+ IEEE80211_DISABLE_STA_BWNSS_ADV = 405, /* To disable all Bandwidth-NSS mapping feature in STA mode*/
+ IEEE80211_PARAM_MIXED_MODE = 406, /* In case of STA, this tells whether the AP we are associated
+ to supports TKIP alongwith AES */
+ IEEE80211_PARAM_RX_FILTER_NEIGHBOUR_PEERS_MONITOR = 407, /* filter out /drop invalid peers packet to upper stack */
+#if ATH_DATA_RX_INFO_EN
+ IEEE80211_PARAM_RXINFO_PERPKT = 408, /* update rx info per pkt */
+#endif
+ IEEE80211_PARAM_WHC_APINFO_WDS = 415, /* Whether associated AP supports WDS
+ (as determined from the vendor IE) */
+ IEEE80211_PARAM_WHC_APINFO_ROOT_DIST = 416, /* Distance from the root AP (in hops);
+ only valid if the WDS flag is set
+ based on the param above */
+ IEEE80211_PARAM_ATH_SUPPORT_VLAN = 417,
+ IEEE80211_PARAM_CONFIG_ASSOC_WAR_160W = 418, /* Configure association WAR for 160 MHz width (i.e.
+ 160/80+80 MHz modes). Some STAs may have an issue
+ associating with us if we advertise 160/80+80 MHz related
+ capabilities in probe response/association response.
+ Hence this WAR suppresses 160/80+80 MHz related
+ information in probe responses, and association responses
+ for such STAs.
+ Starting from LSB
+ First bit set = Default WAR behavior (VHT_OP modified)
+ First+second bit set = (VHT_OP+ VHT_CAP modified)
+ No bit set (default) = WAR disabled
+ */
+#if DBG_LVL_MAC_FILTERING
+ IEEE80211_PARAM_DBG_LVL_MAC = 419, /* Enable/disable mac based filtering for debug logs */
+#endif
+#if QCA_AIRTIME_FAIRNESS
+ IEEE80211_PARAM_ATF_TXBUF_MAX = 420,
+ IEEE80211_PARAM_ATF_TXBUF_MIN = 421,
+ IEEE80211_PARAM_ATF_TXBUF_SHARE = 422, /* For ATF UDP */
+ IEEE80211_PARAM_ATF_MAX_CLIENT = 423, /* Support of ATF+non-ATF clients */
+ IEEE80211_PARAM_ATF_SSID_GROUP = 424, /* Support to enable/disable SSID grouping */
+#endif
+ IEEE80211_PARAM_11N_TX_AMSDU = 425, /* Enable/Disable HT Tx AMSDU only */
+ IEEE80211_PARAM_BSS_CHAN_INFO = 426,
+ IEEE80211_PARAM_LCR_ENABLE = 427,
+ IEEE80211_PARAM_WHC_APINFO_SON = 428, /* Whether associated AP supports SON mode
+ (as determined from the vendor IE) */
+ IEEE80211_PARAM_SON = 429, /* Mark/query AP as SON enabled */
+ IEEE80211_PARAM_CTSPROT_DTIM_BCN = 430, /* Enable/Disable CTS2SELF protection for DTIM Beacons */
+ IEEE80211_PARAM_RAWMODE_PKT_SIM = 431, /* Enable/Disable RAWMODE_PKT_SIM*/
+ IEEE80211_PARAM_CONFIG_RAW_DWEP_IND = 432, /* Enable/disable indication to WLAN driver that
+ dynamic WEP is being used in RAW mode. If the indication
+ is enabled and we are in RAW mode, we plumb a dummy key for
+ each of the keys corresponding to WEP cipher
+ */
+#if ATH_GEN_RANDOMNESS
+ IEEE80211_PARAM_RANDOMGEN_MODE = 433,
+#endif
+
+ IEEE80211_PARAM_CUSTOM_CHAN_LIST = 434,
+#if UMAC_SUPPORT_ACFG
+ IEEE80211_PARAM_DIAG_WARN_THRESHOLD = 435,
+ IEEE80211_PARAM_DIAG_ERR_THRESHOLD = 436,
+#endif
+ IEEE80211_PARAM_MBO = 437, /* Enable MBO */
+ IEEE80211_PARAM_MBO_CAP = 438, /* Enable MBO capability */
+ IEEE80211_PARAM_MBO_ASSOC_DISALLOW = 439, /* MBO reason code for assoc disallow attribute */
+ IEEE80211_PARAM_MBO_CELLULAR_PREFERENCE = 440, /* MBO cellular preference */
+ IEEE80211_PARAM_MBO_TRANSITION_REASON = 441, /* MBO Tansition reason */
+ IEEE80211_PARAM_MBO_ASSOC_RETRY_DELAY = 442, /* MBO assoc retry delay */
+#if ATH_SUPPORT_DSCP_OVERRIDE
+ IEEE80211_PARAM_VAP_DSCP_PRIORITY = 443, /* VAP Based DSCP - Vap priority */
+#endif
+ IEEE80211_PARAM_TXRX_VAP_STATS = 444,
+ IEEE80211_PARAM_CONFIG_REV_SIG_160W = 445, /* Enable/Disable revised signalling for 160/80+80 MHz */
+ IEEE80211_PARAM_DISABLE_SELECTIVE_HTMCS_FOR_VAP = 446, /* Enable/Disable selective HT-MCS for this vap. */
+ IEEE80211_PARAM_CONFIGURE_SELECTIVE_VHTMCS_FOR_VAP = 447, /* Enable/Disable selective VHT-MCS for this vap. */
+ IEEE80211_PARAM_RDG_ENABLE = 448,
+ IEEE80211_PARAM_DFS_SUPPORT = 449,
+ IEEE80211_PARAM_DFS_ENABLE = 450,
+ IEEE80211_PARAM_ACS_SUPPORT = 451,
+ IEEE80211_PARAM_SSID_STATUS = 452,
+ IEEE80211_PARAM_DL_QUEUE_PRIORITY_SUPPORT = 453,
+ IEEE80211_PARAM_CLEAR_MIN_MAX_RSSI = 454,
+ IEEE80211_PARAM_CLEAR_QOS = 455,
+#if QCA_AIRTIME_FAIRNESS
+ IEEE80211_PARAM_ATF_OVERRIDE_AIRTIME_TPUT = 456, /* Override the airtime estimated */
+#endif
+#if MESH_MODE_SUPPORT
+ IEEE80211_PARAM_MESH_CAPABILITIES = 457, /* For providing Mesh vap capabilities */
+#endif
+ IEEE80211_PARAM_CONFIG_ASSOC_DENIAL_NOTIFY = 458, /* Enable/disable assoc denial notification to userspace */
+ IEEE80211_PARAM_ADD_MAC_LIST_SEC = 459, /* To check if the mac address is to added in secondary ACL list */
+ IEEE80211_PARAM_GET_MAC_LIST_SEC = 460, /* To get the mac addresses from the secondary ACL list */
+ IEEE80211_PARAM_DEL_MAC_LIST_SEC = 461, /* To delete the given mac address from the secondary ACL list */
+ IEEE80211_PARAM_MACCMD_SEC = 462, /* To set/get the acl policy of the secondary ACL list */
+ IEEE80211_PARAM_UMAC_VERBOSE_LVL = 463, /* verbose level for UMAC specific debug */
+ IEEE80211_PARAM_VAP_TXRX_FW_STATS = 464, /* Get per VAP MU-MIMO stats */
+ IEEE80211_PARAM_VAP_TXRX_FW_STATS_RESET = 465, /* Reset per VAp MU-MIMO stats */
+ IEEE80211_PARAM_PEER_TX_MU_BLACKLIST_COUNT = 466, /* Get number of times a peer has been blacklisted due to sounding failures */
+ IEEE80211_PARAM_PEER_TX_COUNT = 467, /* Get count of MU MIMO tx to a peer */
+ IEEE80211_PARAM_PEER_MUMIMO_TX_COUNT_RESET = 468, /* Reset count of MU MIMO tx to a peer */
+ IEEE80211_PARAM_PEER_POSITION = 469, /* Get peer position in MU group */
+#if QCA_AIRTIME_FAIRNESS
+ IEEE80211_PARAM_ATF_SSID_SCHED_POLICY = 470, /* support to set per ssid atf sched policy, 0-fair 1-strict */
+#endif
+ IEEE80211_PARAM_CONNECTION_SM_STATE = 471, /* Get the current state of the connectionm SM */
+#if MESH_MODE_SUPPORT
+ IEEE80211_PARAM_CONFIG_MGMT_TX_FOR_MESH = 472,
+ IEEE80211_PARAM_CONFIG_RX_MESH_FILTER = 473,
+#endif
+ IEEE80211_PARAM_TRAFFIC_STATS = 474, /* Enable/disable the measurement of traffic statistics */
+ IEEE80211_PARAM_TRAFFIC_RATE = 475, /* set the traffic rate, the rate at which the received signal statistics are be measured */
+ IEEE80211_PARAM_TRAFFIC_INTERVAL = 476, /* set the traffic interval,the time till which the received signal statistics are to be measured */
+ IEEE80211_PARAM_WATERMARK_THRESHOLD = 477,
+ IEEE80211_PARAM_WATERMARK_REACHED = 478,
+ IEEE80211_PARAM_ASSOC_REACHED = 479,
+ IEEE80211_PARAM_DISABLE_SELECTIVE_LEGACY_RATE_FOR_VAP = 480, /* Enable/Disable selective Legacy Rates for this vap. */
+ IEEE80211_PARAM_RTSCTS_RATE = 481, /* Set rts and cts rate*/
+ IEEE80211_PARAM_REPT_MULTI_SPECIAL = 482,
+ IEEE80211_PARAM_VSP_ENABLE = 483, /* Video Stream Protection */
+ IEEE80211_PARAM_ENABLE_VENDOR_IE = 484, /* Enable/ disable Vendor ie advertise in Beacon/ proberesponse*/
+ IEEE80211_PARAM_WHC_APINFO_SFACTOR = 485, /* Set Scaling factor for best uplink selection algorithm */
+ IEEE80211_PARAM_WHC_APINFO_BSSID = 486, /* Get the best uplink BSSID for scan entries */
+ IEEE80211_PARAM_WHC_APINFO_RATE = 487, /* Get the current uplink data rate(estimate) */
+ IEEE80211_PARAM_CONFIG_MON_DECODER = 488, /* Monitor VAP decoder format radiotap/prism */
+ IEEE80211_PARAM_DYN_BW_RTS = 489, /* Enable/Disable the dynamic bandwidth RTS */
+ IEEE80211_PARAM_CONFIG_MU_CAP_TIMER = 490, /* Set/Get timer period in seconds(1 to 300) for de-assoc dedicated client when
+ mu-cap client joins/leaves */
+ IEEE80211_PARAM_CONFIG_MU_CAP_WAR = 491, /* Enable/Disable Mu Cap WAR function */
+#if WLAN_DFS_CHAN_HIDDEN_SSID
+ IEEE80211_PARAM_CONFIG_BSSID = 492, /* Configure hidden ssid AP's bssid */
+#endif
+ IEEE80211_PARAM_CONFIG_NSTSCAP_WAR = 493, /* Enable/Disable NSTS CAP WAR */
+ IEEE80211_PARAM_WHC_APINFO_CAP_BSSID = 494, /* get the CAP BSSID from scan entries */
+ IEEE80211_PARAM_BEACON_RATE_FOR_VAP = 495, /*Configure beacon rate to user provided rate*/
+ IEEE80211_PARAM_CHANNEL_SWITCH_MODE = 496, /* channel switch mode to be used in CSA and ECSA IE*/
+ IEEE80211_PARAM_ENABLE_ECSA_IE = 497, /* ECSA IE enable/disable*/
+ IEEE80211_PARAM_ECSA_OPCLASS = 498, /* opClass to be announced in ECSA IE */
+#if DYNAMIC_BEACON_SUPPORT
+ IEEE80211_PARAM_DBEACON_EN = 499, /* Enable/disable the dynamic beacon feature */
+ IEEE80211_PARAM_DBEACON_RSSI_THR = 500, /* Set/Get the rssi threshold */
+ IEEE80211_PARAM_DBEACON_TIMEOUT = 501, /* Set/Get the timeout of timer */
+#endif
+ IEEE80211_PARAM_TXPOW_MGMT = 502, /* set/get the tx power per vap */
+ IEEE80211_PARAM_CONFIG_TX_CAPTURE = 503, /* Configure pkt capture in Tx direction */
+#if WLAN_DFS_CHAN_HIDDEN_SSID
+ IEEE80211_PARAM_GET_CONFIG_BSSID = 504, /* get configured hidden ssid AP's bssid */
+#endif
+ IEEE80211_PARAM_OCE = 505, /* Enable OCE */
+ IEEE80211_PARAM_OCE_ASSOC_REJECT = 506, /* Enable OCE RSSI-based assoc reject */
+ IEEE80211_PARAM_OCE_ASSOC_MIN_RSSI = 507, /* Min RSSI for assoc accept */
+ IEEE80211_PARAM_OCE_ASSOC_RETRY_DELAY = 508, /* Retry delay for subsequent (re-)assoc */
+ IEEE80211_PARAM_OCE_WAN_METRICS = 509, /* Enable OCE reduced WAN metrics */
+ IEEE80211_PARAM_BACKHAUL = 510,
+ IEEE80211_PARAM_MESH_MCAST = 511,
+ IEEE80211_PARAM_HE_MCS = 512, /* Set 11ax - HE MCS */
+
+ IEEE80211_PARAM_HE_EXTENDED_RANGE = 513, /* set 11ax - HE extended range */
+ IEEE80211_PARAM_HE_DCM = 514, /* set 11ax - HE DCM */
+ IEEE80211_PARAM_HE_MU_EDCA = 515, /* Set 11ax - HE MU EDCA */
+ IEEE80211_PARAM_HE_FRAGMENTATION = 516, /* Set 11ax - HE Fragmentation */
+
+ IEEE80211_PARAM_HE_DL_MU_OFDMA = 517, /* Set 11ax - HE DL MU OFDMA */
+ IEEE80211_PARAM_HE_UL_MU_MIMO = 518, /* Set 11ax - HE UL MU MIMO */
+ IEEE80211_PARAM_HE_UL_MU_OFDMA = 519, /* Set 11ax - HE UL MU OFDMA */
+ IEEE80211_PARAM_CONFIG_CATEGORY_VERBOSE = 521, /* Configure verbose level for a category */
+ IEEE80211_PARAM_TXRX_DP_STATS = 522, /* Display stats aggregated at host */
+ IEEE80211_PARAM_RX_FILTER_SMART_MONITOR = 523, /* Get per vap smart monitor stats */
+ IEEE80211_PARAM_WHC_CAP_RSSI = 524, /* Set/Get the CAP RSSI threshold for best uplink selection */
+ IEEE80211_PARAM_WHC_CURRENT_CAP_RSSI = 525, /* Get the current CAP RSSI from scan entrie */
+ IEEE80211_PARAM_RX_SMART_MONITOR_RSSI = 526, /* Get smart monitor rssi */
+ IEEE80211_PARAM_WHC_APINFO_BEST_UPLINK_OTHERBAND_BSSID = 527, /* Get the best otherband uplink BSSID */
+ IEEE80211_PARAM_WHC_APINFO_OTHERBAND_UPLINK_BSSID = 528, /* Get the current otherband uplink BSSID from scan entry */
+ IEEE80211_PARAM_WHC_APINFO_OTHERBAND_BSSID = 529, /* Set the otherband BSSID for AP vap */
+ IEEE80211_PARAM_WHC_APINFO_UPLINK_RATE = 530, /* Get the current uplink rate */
+ IEEE80211_PARAM_HE_SU_BFEE = 531, /* Set 11ax - HE SU BFEE */
+ IEEE80211_PARAM_HE_SU_BFER = 532, /* Set 11ax - HE SU BFER */
+ IEEE80211_PARAM_HE_MU_BFEE = 533, /* Set 11ax - HE MU BFEE */
+ IEEE80211_PARAM_HE_MU_BFER = 534, /* Set 11ax - HE MU BFER */
+ IEEE80211_PARAM_EXT_NSS_SUPPORT = 535, /* EXT NSS Support */
+ IEEE80211_PARAM_QOS_ACTION_FRAME_CONFIG = 536, /* QOS Action frames config */
+ IEEE80211_PARAM_HE_LTF = 537, /* Set 11ax - HE LTF Support */
+ IEEE80211_PARAM_DFS_INFO_NOTIFY_APP = 538, /* Enable the feature to notify dfs info to app */
+ IEEE80211_PARAM_NSSOL_VAP_INSPECT_MODE = 539, /* Set Vap inspection mode */
+ IEEE80211_PARAM_HE_RTSTHRSHLD = 540, /* Set 11ax - HE Rts Threshold */
+ IEEE80211_PARAM_RATE_DROPDOWN = 541, /* Setting Rate Control Logic */
+ IEEE80211_PARAM_DISABLE_CABQ = 542, /* Disable multicast buffer when STA is PS */
+ IEEE80211_PARAM_CSL_SUPPORT = 543, /* CSL Support */
+ IEEE80211_PARAM_TIMEOUTIE = 544, /* set/get assoc comeback timeout value */
+ IEEE80211_PARAM_PMF_ASSOC = 545, /* enable/disable pmf support */
+ IEEE80211_PARAM_ENABLE_FILS = 546, /* Enable/disable FILS */
+#if ATH_ACS_DEBUG_SUPPORT
+ IEEE80211_PARAM_ACS_DEBUG_SUPPORT = 547, /* enable acs debug stub for testing */
+#endif
+#if ATH_ACL_SOFTBLOCKING
+ IEEE80211_PARAM_SOFTBLOCK_WAIT_TIME = 548, /* set/get wait time in softblcking */
+ IEEE80211_PARAM_SOFTBLOCK_ALLOW_TIME = 549, /* set/get allow time in softblocking */
+#endif
+ IEEE80211_PARAM_NR_SHARE_RADIO_FLAG = 550, /* Mask to indicate which radio the NR information shares across */
+#if QCN_IE
+ IEEE80211_PARAM_BCAST_PROBE_RESPONSE_DELAY = 551, /* set/get the delay for holding the broadcast
+ probe response (in ms) */
+ IEEE80211_PARAM_BCAST_PROBE_RESPONSE_LATENCY_COMPENSATION = 552, /* set/get latency for the RTT made by the broadcast
+ probe response(in ms) */
+ IEEE80211_PARAM_BCAST_PROBE_RESPONSE_STATS = 553, /* Get the broadcast probe response stats */
+ IEEE80211_PARAM_BCAST_PROBE_RESPONSE_ENABLE = 554, /* If set, enables the broadcast probe response feature */
+ IEEE80211_PARAM_BCAST_PROBE_RESPONSE_STATS_CLEAR = 555, /* Clear the broadcast probe response stats */
+ IEEE80211_PARAM_BEACON_LATENCY_COMPENSATION = 556, /* Set/get the beacon latency between driver and firmware */
+#endif
+ IEEE80211_PARAM_DMS_AMSDU_WAR = 557, /* Enable 11v DMS AMSDU WAR */
+ IEEE80211_PARAM_TXPOW = 558, /* set/get the control frame tx power per vap */
+ IEEE80211_PARAM_BEST_UL_HYST = 559,
+ IEEE80211_PARAM_HE_TX_MCSMAP = 560, /* set 11ax - HE TX MCSMAP */
+ IEEE80211_PARAM_HE_RX_MCSMAP = 561, /* set 11ax - HE RX MCSMAP */
+ IEEE80211_PARAM_CONFIG_M_COPY = 562, /* Enable/Disable Mirror copy mode */
+ IEEE80211_PARAM_BA_BUFFER_SIZE = 563, /* Set Block Ack Buffer Size */
+ IEEE80211_PARAM_HE_AR_GI_LTF = 564, /* Set HE Auto Rate GI LTF combinations */
+ IEEE80211_PARAM_NSSOL_VAP_READ_RXPREHDR = 565, /* Read Rx pre header content from the packet */
+ IEEE80211_PARAM_HE_SOUNDING_MODE = 566, /* Select HE/VHT, SU/MU and Trig/Nong-Trig sounding */
+ IEEE80211_PARAM_PRB_RATE = 570, /* Set/Get probe-response frame rate */
+ IEEE80211_PARAM_RSN_OVERRIDE = 571, /* enable/disable rsn override feature */
+ IEEE80211_PARAM_MAP = 572, /* multi ap enable */
+ IEEE80211_PARAM_MAP_BSS_TYPE = 573, /* Multi Ap BSS TYPES */
+ /* Enable/Disable HE HT control support */
+ IEEE80211_PARAM_HE_HT_CTRL = 574,
+ IEEE80211_PARAM_OCE_HLP = 575, /* Enable/disable OCE FILS HLP */
+ IEEE80211_PARAM_NBR_SCAN_PERIOD = 576, /* set/get neighbor AP scan period */
+ IEEE80211_PARAM_RNR = 577, /* enable/disable inclusion of RNR IE in Beacon/Probe-Rsp */
+ IEEE80211_PARAM_RNR_FD = 578, /* enable/disable inclusion of RNR IE in FILS Discovery */
+ IEEE80211_PARAM_RNR_TBTT = 579, /* enable/disable calculation TBTT in RNR IE */
+ IEEE80211_PARAM_AP_CHAN_RPT = 580, /* enable/disable inclusion of AP Channel Report IE in Beacon/Probe-Rsp */
+ IEEE80211_PARAM_MAX_SCAN_TIME_ACS_REPORT = 581, /* max scan time for acs scan report */
+ IEEE80211_PARAM_MAP_VAP_BEACONING = 582, /* multi ap vap teardown */
+ IEEE80211_PARAM_ACL_SET_BLOCK_MGMT = 583, /* block mgmt from a mac-address */
+ IEEE80211_PARAM_ACL_CLR_BLOCK_MGMT = 584, /* allow mgmt from a mac-address */
+ IEEE80211_PARAM_ACL_GET_BLOCK_MGMT = 585, /* get list of mac-addresses */
+ IEEE80211_PARAM_WIFI_DOWN_IND = 586, /* wifi down indication in 11ax MbSSID case */
+#if UMAC_SUPPORT_XBSSLOAD
+ IEEE80211_PARAM_XBSS_LOAD = 587, /* Enable/Disable 802.11ac extended BSS load */
+#endif
+ IEEE80211_PARAM_SIFS_TRIGGER_RATE = 588, /* get or set vdev sifs trigger rate */
+ IEEE80211_PARAM_LOG_FLUSH_TIMER_PERIOD = 589, /* time interval in which wlan log buffers will be pushed to user-space */
+ IEEE80211_PARAM_LOG_FLUSH_ONE_TIME = 590, /* push the logs to user space one time */
+ IEEE80211_PARAM_LOG_DUMP_AT_KERNEL_ENABLE = 591, /* enable/disable kernel print call in logging */
+ IEEE80211_PARAM_LOG_ENABLE_BSTEERING_RSSI = 592, /* enable/disable inst rssi log for son */
+ IEEE80211_PARAM_FT_ENABLE = 593, /* Enable/Disable BSS fast transition */
+ IEEE80211_PARAM_BCN_STATS_RESET = 594, /* send beacon stats reset command */
+ IEEE80211_PARAM_WLAN_SER_TEST = 595, /* Start unit testing of serialization */
+ IEEE80211_PARAM_SIFS_TRIGGER = 596, /* get/set sifs trigger interval per vdev */
+#if QCA_SUPPORT_SON
+ IEEE80211_PARAM_SON_EVENT_BCAST = 597, /* enable/disable events broadcast for son */
+#endif
+ IEEE80211_PARAM_HE_UL_SHORTGI = 598, /* Shortgi configuration in UL Trigger */
+ IEEE80211_PARAM_HE_UL_LTF = 599, /* LTF configuration in UL Trigger */
+ IEEE80211_PARAM_HE_UL_NSS = 600, /* Maximum NSS allowed in UL Trigger */
+ IEEE80211_PARAM_HE_UL_PPDU_BW = 601, /* Channel width */
+ IEEE80211_PARAM_HE_UL_LDPC = 602, /* Enable/Disable LDPC in UL Trigger */
+ IEEE80211_PARAM_HE_UL_STBC = 603, /* Enable/Disable STBC in UL Trigger */
+ IEEE80211_PARAM_HE_UL_FIXED_RATE = 604, /* Control UL fixed rate */
+#if WLAN_SER_DEBUG
+ IEEE80211_PARAM_WLAN_SER_HISTORY = 605, /* Dump serialization queues & history*/
+#endif
+ IEEE80211_PARAM_DA_WAR_ENABLE = 606, /* get/set for destination address setting for WDS */
+ /* Enable/disable the advertisement of STA-mode's maximum capabilities instead of it's operating mode in related capability related IEs */
+ IEEE80211_PARAM_STA_MAX_CH_CAP = 607,
+ IEEE80211_PARAM_RAWMODE_OPEN_WAR = 608, /* enable/disable rawmode open war */
+ IEEE80211_PARAM_EXTERNAL_AUTH_STATUS = 609, /* To indicate exterbal auth status for SAE */
+#if UMAC_SUPPORT_WPA3_STA
+ IEEE80211_PARAM_SAE_AUTH_ATTEMPTS = 610, /* To set/get sae maximum auth attempts */
+#endif
+ IEEE80211_PARAM_WHC_SKIP_HYST = 611, /* Set/Get Skip hyst for best AP*/
+ IEEE80211_PARAM_GET_FREQUENCY = 612, /* Get Frequency */
+ IEEE80211_PARAM_SON_NUM_VAP = 613, /* To get the number of SON enabled Vaps */
+ IEEE80211_PARAM_WHC_MIXEDBH_ULRATE = 614, /* Get or Set the Uplink rate for SON mixedbackhaul */
+ IEEE80211_PARAM_WHC_BACKHAUL_TYPE = 615, /* Set the SON Mode and Wifi or Ether backhaul type */
+ IEEE80211_PARAM_GET_OPMODE = 616, /* Get operation mode of VAP*/
+ IEEE80211_PARAM_HE_BSR_SUPPORT = 617, /* HE BSR Support */
+ IEEE80211_PARAM_SET_VLAN_TYPE = 618, /* enable/disable VLAN configuration on VAP in NSS offload mode */
+ IEEE80211_PARAM_DUMP_RA_TABLE = 619, /* Dump the RA table used for Multicast Enhancement 6 */
+ IEEE80211_PARAM_OBSS_NB_RU_TOLERANCE_TIME = 620, /* To set/get OBSS RU26 Intolerance time */
+ IEEE80211_PARAM_UNIFORM_RSSI = 621, /* Uniform RSSI support */
+ IEEE80211_PARAM_CSA_INTEROP_PHY = 622,
+ IEEE80211_PARAM_CSA_INTEROP_BSS = 623,
+ IEEE80211_PARAM_CSA_INTEROP_AUTH = 624,
+ IEEE80211_PARAM_HE_AMSDU_IN_AMPDU_SUPRT = 625, /* HE AMSDU in AMPDU support */
+ IEEE80211_PARAM_HE_SUBFEE_STS_SUPRT = 626, /* HE BFEE STS support */
+ IEEE80211_PARAM_HE_4XLTF_800NS_GI_RX_SUPRT = 627, /* HE 4x LTF + 0.8 us GI rx support */
+ IEEE80211_PARAM_HE_1XLTF_800NS_GI_RX_SUPRT = 628, /* HE 1x LTF + 0.8 us GI rx support */
+ IEEE80211_PARAM_HE_MAX_NC_SUPRT = 629, /* HE Max-NC support */
+ IEEE80211_PARAM_TWT_RESPONDER_SUPRT = 630, /* HE TWT responder support */
+ IEEE80211_PARAM_CONFIG_CAPTURE_LATENCY_ENABLE = 631, /* Cap tx latency */
+ IEEE80211_PARAM_GET_RU26_TOLERANCE = 632, /* Get ru 26 intolerence status */
+ IEEE80211_PARAM_WHC_APINFO_UPLINK_SNR = 633, /* Get uplink SNR */
+ IEEE80211_PARAM_DPP_VAP_MODE = 634, /* Disable/Enable the DPP mode */
+#if SM_ENG_HIST_ENABLE
+ IEEE80211_PARAM_SM_HISTORY = 635, /* Print all the VDEV SM history */
+#endif
+ IEEE80211_PARAM_RX_AMSDU = 652, /* Toggle RX AMSDU info */
+ IEEE80211_PARAM_MAX_MTU_SIZE = 653, /* set max mtu size*/
+ IEEE80211_PARAM_HE_6GHZ_BCAST_PROB_RSP = 654, /* Enable/Disable 20 TU Probe Resp */
+ IEEE80211_PARAM_VHT_MCS_10_11_SUPP = 660, /* Overall VHT MCS 10/11 Support*/
+ IEEE80211_PARAM_VHT_MCS_10_11_NQ2Q_PEER_SUPP = 661, /* Non-Q2Q Peer VHT MCS 10/11 Support*/
+ IEEE80211_PARAM_SAE_PWID = 662, /* SAE PWD ID present*/
+ IEEE80211_PARAM_MCAST_RC_STALE_PERIOD = 663, /* Multicast RC stale period */
+ IEEE80211_PARAM_HE_MULTI_TID_AGGR = 664,
+ IEEE80211_PARAM_HE_MULTI_TID_AGGR_TX = 665,
+ IEEE80211_PARAM_HE_MAX_AMPDU_LEN_EXP = 666,
+ IEEE80211_PARAM_HE_SU_PPDU_1X_LTF_800NS_GI = 667,
+ IEEE80211_PARAM_HE_SU_MU_PPDU_4X_LTF_800NS_GI = 668,
+ IEEE80211_PARAM_HE_MAX_FRAG_MSDU = 669,
+ IEEE80211_PARAM_HE_MIN_FRAG_SIZE = 670,
+ IEEE80211_PARAM_HE_OMI = 671,
+ IEEE80211_PARAM_HE_NDP_4X_LTF_3200NS_GI = 672,
+ IEEE80211_PARAM_HE_ER_SU_PPDU_1X_LTF_800NS_GI = 673,
+ IEEE80211_PARAM_HE_ER_SU_PPDU_4X_LTF_800NS_GI = 674,
+ IEEE80211_PARAM_GET_MAX_RATE = 675, /* Get Max supported BitRate on Kbps */
+ IEEE80211_PARAM_GET_SIGNAL_LEVEL = 676, /* Get Signal level on dBm */
+ IEEE80211_PARAM_DEC_BCN_LOSS = 677, /*Prioritize less beacon loss over passive scan*/
+ IEEE80211_PARAM_ENABLE_MULTI_GROUP_KEY = 678, /* Enable/Disable multiple group keys */
+ IEEE80211_PARAM_MAX_GROUP_KEYS = 679, /* Maximum number of Group keys */
+ IEEE80211_PARAM_RRM_FILTER = 680, /* Send RRM packet to application */
+ IEEE80211_PARAM_WNM_FILTER = 681, /* Send WNM packet to application */
+ IEEE80211_PARAM_VENDOR_FRAME_FWD_MASK = 682, /* subtype bitmask for mgmt frames which are forwarded to application */
+ IEEE80211_PARAM_HE_DYNAMIC_MU_EDCA = 683, /* Enable/Disable dynamic Mu edca selection */
+ IEEE80211_PARAM_HE_AR_LDPC = 684, /* Enable/Disable Auto-Rate LDPC */
+ IEEE80211_PARAM_ENABLE_MCAST_RC = 685, /* Enable Mcast RC */
+ IEEE80211_PARAM_VHT_MCS_12_13_SUPP = 686, /* Overall HE MCS 12/13 Support*/
+ IEEE80211_PARAM_RRM_CAP_IE = 687, /* Include RRM Cap IE in Assoc Request for STA mode */
+ IEEE80211_PARAM_MAP2_BSTA_VLAN_ID = 688, /* Multi Ap Primary VLAN Id for STA */
+ IEEE80211_PARAM_SET_STATS_UPDATE_PERIOD = 689, /* Set stats update period on legacy targets */
+ IEEE80211_PARAM_VDEV_PEER_PROTOCOL_COUNT = 690, /* Sets peer-prot count feature enable */
+ IEEE80211_PARAM_VDEV_PEER_PROTOCOL_DROP_MASK = 691, /* Sets peer-prot count feature dropmask */
+#if WLAN_SCHED_HISTORY_SIZE
+ IEEE80211_PARAM_WLAN_SCHED_HISTORY = 692, /* Print scheduler history*/
+#endif
+ IEEE80211_PARAM_HE_DL_MU_OFDMA_BFER = 693, /* Sets 11ax - HE DL MU OFDMA + TxBF*/
+ IEEE80211_PARAM_SEND_PROBE_REQ = 694, /* Send bcast probe request with current ssid */
+ IEEE80211_PARAM_ASSOC_MIN_RSSI = 695,
+};
+
+enum {
+ OL_SPECIAL_PARAM_COUNTRY_ID,
+ OL_SPECIAL_PARAM_ASF_AMEM_PRINT,
+ OL_SPECIAL_DBGLOG_REPORT_SIZE,
+ OL_SPECIAL_DBGLOG_TSTAMP_RESOLUTION,
+ OL_SPECIAL_DBGLOG_REPORTING_ENABLED,
+ OL_SPECIAL_DBGLOG_LOG_LEVEL,
+ OL_SPECIAL_DBGLOG_VAP_ENABLE,
+ OL_SPECIAL_DBGLOG_VAP_DISABLE,
+ OL_SPECIAL_DBGLOG_MODULE_ENABLE,
+ OL_SPECIAL_DBGLOG_MODULE_DISABLE,
+ OL_SPECIAL_PARAM_DISP_TPC,
+ OL_SPECIAL_PARAM_ENABLE_CH_144,
+ OL_SPECIAL_PARAM_REGDOMAIN,
+ OL_SPECIAL_PARAM_ENABLE_OL_STATS,
+ OL_SPECIAL_PARAM_ENABLE_MAC_REQ,
+ OL_SPECIAL_PARAM_ENABLE_SHPREAMBLE,
+ OL_SPECIAL_PARAM_ENABLE_SHSLOT,
+ OL_SPECIAL_PARAM_RADIO_MGMT_RETRY_LIMIT,
+ OL_SPECIAL_PARAM_SENS_LEVEL,
+ OL_SPECIAL_PARAM_TX_POWER_5G,
+ OL_SPECIAL_PARAM_TX_POWER_2G,
+ OL_SPECIAL_PARAM_CCA_THRESHOLD,
+ OL_SPECIAL_PARAM_WLAN_PROFILE_ID_ENABLE,
+ OL_SPECIAL_PARAM_WLAN_PROFILE_TRIGGER,
+ OL_SPECIAL_PARAM_ENABLE_CH144_EPPR_OVRD,
+ OL_SPECIAL_PARAM_ENABLE_PERPKT_TXSTATS,
+ OL_SPECIAL_PARAM_ENABLE_OL_STATSv2,
+ OL_SPECIAL_PARAM_ENABLE_OL_STATSv3,
+ OL_SPECIAL_PARAM_BSTA_FIXED_IDMASK,
+};
+
+enum _ol_ath_param_t {
+ OL_ATH_PARAM_TXCHAINMASK = 1,
+ OL_ATH_PARAM_RXCHAINMASK = 2,
+ OL_ATH_PARAM_AMPDU = 6,
+ OL_ATH_PARAM_AMPDU_LIMIT = 7,
+ OL_ATH_PARAM_AMPDU_SUBFRAMES = 8,
+ OL_ATH_PARAM_TXPOWER_LIMIT2G = 12,
+ OL_ATH_PARAM_TXPOWER_LIMIT5G = 13,
+ OL_ATH_PARAM_LDPC = 32,
+ OL_ATH_PARAM_VOW_EXT_STATS = 45,
+ OL_ATH_PARAM_DYN_TX_CHAINMASK = 73,
+ OL_ATH_PARAM_BURST_ENABLE = 77,
+ OL_ATH_PARAM_BURST_DUR = 78,
+ OL_ATH_PARAM_BCN_BURST = 80,
+ OL_ATH_PARAM_DCS = 82,
+#if UMAC_SUPPORT_PERIODIC_PERFSTATS
+ OL_ATH_PARAM_PRDPERFSTAT_THRPUT_ENAB = 83,
+ OL_ATH_PARAM_PRDPERFSTAT_THRPUT_WIN = 84,
+ OL_ATH_PARAM_PRDPERFSTAT_THRPUT = 85,
+ OL_ATH_PARAM_PRDPERFSTAT_PER_ENAB = 86,
+ OL_ATH_PARAM_PRDPERFSTAT_PER_WIN = 87,
+ OL_ATH_PARAM_PRDPERFSTAT_PER = 88,
+#endif
+ /* UMAC_SUPPORT_PERIODIC_PERFSTATS */
+ OL_ATH_PARAM_TOTAL_PER = 89,
+ /* set manual rate for rts frame */
+ OL_ATH_PARAM_RTS_CTS_RATE = 92,
+ /* co channel interference threshold level */
+ OL_ATH_PARAM_DCS_COCH_THR = 93,
+ /* transmit error threshold */
+ OL_ATH_PARAM_DCS_TXERR_THR = 94,
+ /* phy error threshold */
+ OL_ATH_PARAM_DCS_PHYERR_THR = 95,
+ /*
+ * The IOCTL number is 114, it is made 114, inorder to make the IOCTL
+ * number same as Direct-attach IOCTL.
+ * Please, don't change number. This IOCTL gets the Interface code path
+ * it should be either DIRECT-ATTACH or OFF-LOAD.
+ */
+ OL_ATH_PARAM_GET_IF_ID = 114,
+ /* Enable Acs back Ground Channel selection Scan timer in AP mode*/
+ OL_ATH_PARAM_ACS_ENABLE_BK_SCANTIMEREN = 118,
+ /* ACS scan timer value in Seconds */
+ OL_ATH_PARAM_ACS_SCANTIME = 119,
+ /* Negligence Delta RSSI between two channel */
+ OL_ATH_PARAM_ACS_RSSIVAR = 120,
+ /* Negligence Delta Channel load between two channel*/
+ OL_ATH_PARAM_ACS_CHLOADVAR = 121,
+ /* Enable Limited OBSS check */
+ OL_ATH_PARAM_ACS_LIMITEDOBSS = 122,
+ /* Acs control flag for Scan timer */
+ OL_ATH_PARAM_ACS_CTRLFLAG = 123,
+ /* Acs Run time Debug level*/
+ OL_ATH_PARAM_ACS_DEBUGTRACE = 124,
+ OL_ATH_PARAM_SET_FW_HANG_ID = 137,
+ /* Radio type 1:11ac 0:11abgn */
+ OL_ATH_PARAM_RADIO_TYPE = 138,
+ OL_ATH_PARAM_IGMPMLD_OVERRIDE, /* IGMP/MLD packet override */
+ OL_ATH_PARAM_IGMPMLD_TID, /* IGMP/MLD packet TID no */
+ OL_ATH_PARAM_ARPDHCP_AC_OVERRIDE,
+ OL_ATH_PARAM_NON_AGG_SW_RETRY_TH,
+ OL_ATH_PARAM_AGG_SW_RETRY_TH,
+ /* Dont change this number it as per sync with DA
+ Blocking certian channel from ic channel list */
+ OL_ATH_PARAM_DISABLE_DFS = 144,
+ OL_ATH_PARAM_ENABLE_AMSDU = 145,
+ OL_ATH_PARAM_ENABLE_AMPDU = 146,
+ OL_ATH_PARAM_STA_KICKOUT_TH,
+ OL_ATH_PARAM_WLAN_PROF_ENABLE,
+ OL_ATH_PARAM_LTR_ENABLE,
+ OL_ATH_PARAM_LTR_AC_LATENCY_BE = 150,
+ OL_ATH_PARAM_LTR_AC_LATENCY_BK,
+ OL_ATH_PARAM_LTR_AC_LATENCY_VI,
+ OL_ATH_PARAM_LTR_AC_LATENCY_VO,
+ OL_ATH_PARAM_LTR_AC_LATENCY_TIMEOUT,
+ OL_ATH_PARAM_LTR_TX_ACTIVITY_TIMEOUT = 155,
+ OL_ATH_PARAM_LTR_SLEEP_OVERRIDE,
+ OL_ATH_PARAM_LTR_RX_OVERRIDE,
+ OL_ATH_PARAM_L1SS_ENABLE,
+ OL_ATH_PARAM_DSLEEP_ENABLE,
+ /* radar error threshold */
+ OL_ATH_PARAM_DCS_RADAR_ERR_THR = 160,
+ /* Tx channel utilization due to AP's tx and rx */
+ OL_ATH_PARAM_DCS_USERMAX_CU_THR,
+ /* interference detection threshold */
+ OL_ATH_PARAM_DCS_INTR_DETECT_THR,
+ /* sampling window, default 10secs */
+ OL_ATH_PARAM_DCS_SAMPLE_WINDOW,
+ /* debug logs enable/disable */
+ OL_ATH_PARAM_DCS_DEBUG,
+ OL_ATH_PARAM_ANI_ENABLE = 165,
+ OL_ATH_PARAM_ANI_POLL_PERIOD,
+ OL_ATH_PARAM_ANI_LISTEN_PERIOD,
+ OL_ATH_PARAM_ANI_OFDM_LEVEL,
+ OL_ATH_PARAM_ANI_CCK_LEVEL,
+ OL_ATH_PARAM_DSCP_TID_MAP = 170,
+ OL_ATH_PARAM_TXPOWER_SCALE,
+ /* Phy error penalty */
+ OL_ATH_PARAM_DCS_PHYERR_PENALTY,
+#if ATH_SUPPORT_DSCP_OVERRIDE
+ /* set/get TID for sending HMMC packets */
+ OL_ATH_PARAM_HMMC_DSCP_TID_MAP,
+ /* set/get DSCP mapping override */
+ OL_ATH_PARAM_DSCP_OVERRIDE,
+ /* set/get HMMC-DSCP mapping override */
+ OL_ATH_PARAM_HMMC_DSCP_OVERRIDE = 175,
+#endif
+#if ATH_RX_LOOPLIMIT_TIMER
+ OL_ATH_PARAM_LOOPLIMIT_NUM,
+#endif
+ OL_ATH_PARAM_ANTENNA_GAIN_2G,
+ OL_ATH_PARAM_ANTENNA_GAIN_5G,
+ OL_ATH_PARAM_RX_FILTER,
+#if ATH_SUPPORT_HYFI_ENHANCEMENTS
+ OL_ATH_PARAM_BUFF_THRESH = 180,
+ OL_ATH_PARAM_BLK_REPORT_FLOOD,
+ OL_ATH_PARAM_DROP_STA_QUERY,
+#endif
+ OL_ATH_PARAM_QBOOST,
+ OL_ATH_PARAM_SIFS_FRMTYPE,
+ OL_ATH_PARAM_SIFS_UAPSD = 185,
+ OL_ATH_PARAM_FW_RECOVERY_ID,
+ OL_ATH_PARAM_RESET_OL_STATS,
+ OL_ATH_PARAM_AGGR_BURST,
+ /* Number of deauth sent in consecutive rx_peer_invalid */
+ OL_ATH_PARAM_DEAUTH_COUNT,
+ OL_ATH_PARAM_BLOCK_INTERBSS = 190,
+ /* Firmware reset control for Bmiss / timeout / reset */
+ OL_ATH_PARAM_FW_DISABLE_RESET,
+ OL_ATH_PARAM_MSDU_TTL,
+ OL_ATH_PARAM_PPDU_DURATION,
+ OL_ATH_PARAM_SET_TXBF_SND_PERIOD,
+ OL_ATH_PARAM_ALLOW_PROMISC = 195,
+ OL_ATH_PARAM_BURST_MODE,
+ OL_ATH_PARAM_DYN_GROUPING,
+ OL_ATH_PARAM_DPD_ENABLE,
+ OL_ATH_PARAM_DBGLOG_RATELIM,
+ /* firmware should intimate us about ps state change for node */
+ OL_ATH_PARAM_PS_STATE_CHANGE = 200,
+ OL_ATH_PARAM_MCAST_BCAST_ECHO,
+ /* OBSS RSSI threshold for 20/40 coexistence */
+ OL_ATH_PARAM_OBSS_RSSI_THRESHOLD,
+ /* Link/node RX RSSI threshold for 20/40 coexistence */
+ OL_ATH_PARAM_OBSS_RX_RSSI_THRESHOLD,
+#if ATH_CHANNEL_BLOCKING
+ OL_ATH_PARAM_ACS_BLOCK_MODE = 205,
+#endif
+ OL_ATH_PARAM_ACS_TX_POWER_OPTION,
+ /*
+ * Default Antenna Polarization MSB 8 bits (24:31) specifying
+ * enable/disable ; LSB 24 bits (0:23) antenna mask value
+ */
+ OL_ATH_PARAM_ANT_POLARIZATION,
+ /* rate limit mute type error prints */
+ OL_ATH_PARAM_PRINT_RATE_LIMIT,
+ OL_ATH_PARAM_PDEV_RESET, /* Reset FW PDEV*/
+ /* Do not crash host when target assert happened*/
+ OL_ATH_PARAM_FW_DUMP_NO_HOST_CRASH = 210,
+ /* Consider OBSS non-erp to change to long slot*/
+ OL_ATH_PARAM_CONSIDER_OBSS_NON_ERP_LONG_SLOT = 211,
+ OL_ATH_PARAM_STATS_FC,
+ OL_ATH_PARAM_QFLUSHINTERVAL,
+ OL_ATH_PARAM_TOTAL_Q_SIZE,
+ OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE0,
+ OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE1,
+ OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE2,
+ OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE3,
+ OL_ATH_PARAM_MIN_THRESHOLD,
+ OL_ATH_PARAM_MAX_Q_LIMIT,
+ OL_ATH_PARAM_MIN_Q_LIMIT,
+ OL_ATH_PARAM_CONG_CTRL_TIMER_INTV,
+ OL_ATH_PARAM_STATS_TIMER_INTV,
+ OL_ATH_PARAM_ROTTING_TIMER_INTV,
+ OL_ATH_PARAM_LATENCY_PROFILE,
+ OL_ATH_PARAM_HOSTQ_DUMP,
+ OL_ATH_PARAM_TIDQ_MAP,
+ OL_ATH_PARAM_DBG_ARP_SRC_ADDR, /* ARP DEBUG source address*/
+ OL_ATH_PARAM_DBG_ARP_DST_ADDR, /* ARP DEBUG destination address*/
+ OL_ATH_PARAM_ARP_DBG_CONF, /* ARP debug configuration */
+ OL_ATH_PARAM_DISABLE_STA_VAP_AMSDU, /* Disable AMSDU for station vap */
+#if ATH_SUPPORT_DFS && ATH_SUPPORT_STA_DFS
+ OL_ATH_PARAM_STADFS_ENABLE = 300, /* STA DFS is enabled or not */
+#endif
+#if QCA_AIRTIME_FAIRNESS
+ OL_ATH_PARAM_ATF_STRICT_SCHED = 301,
+ OL_ATH_PARAM_ATF_GROUP_POLICY = 302,
+#endif
+#if DBDC_REPEATER_SUPPORT
+ OL_ATH_PARAM_PRIMARY_RADIO = 303,
+ OL_ATH_PARAM_DBDC_ENABLE = 304,
+#endif
+ OL_ATH_PARAM_TXPOWER_DBSCALE,
+ OL_ATH_PARAM_CTL_POWER_SCALE,
+#if QCA_AIRTIME_FAIRNESS
+ OL_ATH_PARAM_ATF_OBSS_SCHED = 307,
+ OL_ATH_PARAM_ATF_OBSS_SCALE = 308,
+#endif
+ OL_ATH_PARAM_PHY_OFDM_ERR = 309,
+ OL_ATH_PARAM_PHY_CCK_ERR = 310,
+ OL_ATH_PARAM_FCS_ERR = 311,
+ OL_ATH_PARAM_CHAN_UTIL = 312,
+#if DBDC_REPEATER_SUPPORT
+ OL_ATH_PARAM_CLIENT_MCAST,
+#endif
+ OL_ATH_PARAM_EMIWAR_80P80 = 314,
+ OL_ATH_PARAM_BATCHMODE = 315,
+ OL_ATH_PARAM_PACK_AGGR_DELAY = 316,
+#if UMAC_SUPPORT_ACFG
+ OL_ATH_PARAM_DIAG_ENABLE = 317,
+#endif
+#if ATH_SUPPORT_VAP_QOS
+ OL_ATH_PARAM_VAP_QOS = 318,
+#endif
+ OL_ATH_PARAM_CHAN_STATS_TH = 319,
+ /* Passive scan is enabled or disabled */
+ OL_ATH_PARAM_PASSIVE_SCAN_ENABLE = 320,
+ OL_ATH_MIN_RSSI_ENABLE = 321,
+ OL_ATH_MIN_RSSI = 322,
+ OL_ATH_PARAM_ACS_2G_ALLCHAN = 323,
+#if DBDC_REPEATER_SUPPORT
+ OL_ATH_PARAM_DELAY_STAVAP_UP = 324,
+#endif
+ /* It is used to set the channel switch options */
+ OL_ATH_PARAM_CHANSWITCH_OPTIONS = 327,
+ OL_ATH_BTCOEX_ENABLE = 328,
+ OL_ATH_BTCOEX_WL_PRIORITY = 329,
+ OL_ATH_PARAM_TID_OVERRIDE_QUEUE_MAPPING = 330,
+ OL_ATH_PARAM_CAL_VER_CHECK = 331,
+ OL_ATH_PARAM_NO_VLAN = 332,
+ OL_ATH_PARAM_CCA_THRESHOLD = 333,
+ OL_ATH_PARAM_ATF_LOGGING = 334,
+ OL_ATH_PARAM_STRICT_DOTH = 335,
+ OL_ATH_PARAM_DISCONNECTION_TIMEOUT = 336,
+ OL_ATH_PARAM_RECONFIGURATION_TIMEOUT = 337,
+ OL_ATH_PARAM_CHANNEL_SWITCH_COUNT = 338,
+ OL_ATH_PARAM_ALWAYS_PRIMARY = 339,
+ OL_ATH_PARAM_FAST_LANE = 340,
+ OL_ATH_GET_BTCOEX_DUTY_CYCLE = 341,
+ OL_ATH_PARAM_SECONDARY_OFFSET_IE = 342,
+ OL_ATH_PARAM_WIDE_BAND_SUB_ELEMENT = 343,
+ OL_ATH_PARAM_PREFERRED_UPLINK = 344,
+ OL_ATH_PARAM_PRECAC_ENABLE = 345,
+ OL_ATH_PARAM_PRECAC_TIMEOUT = 346,
+ OL_ATH_COEX_VER_CFG = 347,
+ OL_ATH_PARAM_DUMP_TARGET = 348,
+ OL_ATH_PARAM_PDEV_TO_REO_DEST = 349,
+ OL_ATH_PARAM_DUMP_CHAINMASK_TABLES = 350,
+ OL_ATH_PARAM_DUMP_OBJECTS = 351,
+ OL_ATH_PARAM_ACS_SRLOADVAR = 352,
+ OL_ATH_PARAM_MGMT_RSSI_THRESHOLD = 353,
+ OL_ATH_PARAM_EXT_NSS_CAPABLE = 354,
+ OL_ATH_PARAM_MGMT_PDEV_STATS_TIMER = 355,
+ OL_ATH_PARAM_TXACKTIMEOUT = 356,
+ OL_ATH_PARAM_ICM_ACTIVE = 357,
+ OL_ATH_PARAM_NOMINAL_NOISEFLOOR = 358,
+ OL_ATH_PARAM_CHAN_INFO = 359,
+ OL_ATH_PARAM_ACS_RANK = 360,
+ OL_ATH_PARAM_TXCHAINSOFT = 361,
+ OL_ATH_PARAM_WIDE_BAND_SCAN = 362,
+ OL_ATH_PARAM_CCK_TX_ENABLE = 363,
+ OL_ATH_PARAM_PAPI_ENABLE = 364,
+ OL_ATH_PARAM_ISOLATION = 365,
+ OL_ATH_PARAM_MAX_CLIENTS_PER_RADIO = 366,
+#if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
+ OL_ATH_PARAM_DFS_HOST_WAIT_TIMEOUT = 367,
+#endif
+ OL_ATH_PARAM_NF_THRESH = 368,
+#ifdef OL_ATH_SMART_LOGGING
+ OL_ATH_PARAM_SMARTLOG_ENABLE = 369,
+ OL_ATH_PARAM_SMARTLOG_FATAL_EVENT = 370,
+ OL_ATH_PARAM_SMARTLOG_SKB_SZ = 371,
+ OL_ATH_PARAM_SMARTLOG_P1PINGFAIL = 372,
+#endif /* OL_ATH_SMART_LOGGING */
+#ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
+ OL_ATH_PARAM_PRECAC_INTER_CHANNEL = 373,
+ OL_ATH_PARAM_PRECAC_CHAN_STATE = 374,
+#endif
+ OL_ATH_PARAM_DBR_RING_STATUS = 375,
+#ifdef QCN_ESP_IE
+ OL_ATH_PARAM_ESP_PERIODICITY = 376,
+ OL_ATH_PARAM_ESP_AIRTIME = 377,
+ OL_ATH_PARAM_ESP_PPDU_DURATION = 378,
+ OL_ATH_PARAM_ESP_BA_WINDOW = 379,
+#endif /* QCN_ESP_IE */
+
+ OL_ATH_PARAM_CBS = 380,
+ OL_ATH_PARAM_DCS_SIM = 381,
+ OL_ATH_PARAM_CBS_DWELL_SPLIT_TIME = 382,
+ OL_ATH_PARAM_CBS_DWELL_REST_TIME = 383,
+ OL_ATH_PARAM_CBS_WAIT_TIME = 384,
+ OL_ATH_PARAM_CBS_REST_TIME = 385,
+ OL_ATH_PARAM_CBS_CSA = 386,
+ OL_ATH_PARAM_TWICE_ANTENNA_GAIN = 387,
+ OL_ATH_PARAM_ACTIVITY_FACTOR = 388,
+ OL_ATH_PARAM_CHAN_AP_RX_UTIL = 389,
+ OL_ATH_PARAM_CHAN_FREE = 390,
+ OL_ATH_PARAM_CHAN_AP_TX_UTIL = 391,
+ OL_ATH_PARAM_CHAN_OBSS_RX_UTIL = 392,
+ OL_ATH_PARAM_CHAN_NON_WIFI = 393,
+#if PEER_FLOW_CONTROL
+ OL_ATH_PARAM_VIDEO_STATS_FC = 394,
+ OL_ATH_PARAM_VIDEO_DELAY_STATS_FC = 395,
+#endif
+ OL_ATH_PARAM_ENABLE_PEER_RETRY_STATS = 396,
+ OL_ATH_PARAM_HE_UL_TRIG_INT = 397,
+ OL_ATH_PARAM_DFS_NOL_SUBCHANNEL_MARKING = 398,
+ /*
+ * Get the band that is tuned for low, high,
+ * full band freq range or it's 2g
+ */
+ OL_ATH_PARAM_BAND_INFO = 399,
+ OL_ATH_PARAM_BW_REDUCE = 400,
+ /* Enable/disable Spatial Reuse */
+ OL_ATH_PARAM_HE_SR = 401,
+ OL_ATH_PARAM_HE_UL_PPDU_DURATION = 402,
+ OL_ATH_PARAM_HE_UL_RU_ALLOCATION = 403,
+ OL_ATH_PARAM_PERIODIC_CFR_CAPTURE = 404,
+ OL_ATH_PARAM_FLUSH_PEER_RATE_STATS = 405,
+ OL_ATH_PARAM_DCS_RE_ENABLE_TIMER = 406,
+ /* Enable/disable Rx lite monitor mode */
+ OL_ATH_PARAM_RX_MON_LITE = 407,
+ /* wifi down indication used in MBSS feature */
+ OL_ATH_PARAM_WIFI_DOWN_IND = 408,
+ OL_ATH_PARAM_TX_CAPTURE = 409,
+ /* Enable fw dump collectin if wmi disconnects */
+ OL_ATH_PARAM_WMI_DIS_DUMP = 410,
+ OL_ATH_PARAM_ACS_CHAN_GRADE_ALGO = 411,
+ OL_ATH_PARAM_ACS_CHAN_EFFICIENCY_VAR = 412,
+ OL_ATH_PARAM_ACS_NEAR_RANGE_WEIGHTAGE = 413,
+ OL_ATH_PARAM_ACS_MID_RANGE_WEIGHTAGE = 414,
+ OL_ATH_PARAM_ACS_FAR_RANGE_WEIGHTAGE = 415,
+ /* Set SELF AP OBSS_PD_THRESHOLD value */
+ OL_ATH_PARAM_SET_CMD_OBSS_PD_THRESHOLD = 416,
+ /* Enable/Disable/Set MGMT_TTL in milliseconds. */
+ OL_ATH_PARAM_MGMT_TTL = 417,
+ /* Enable/Disable/Set PROBE_RESP_TTL in milliseconds */
+ OL_ATH_PARAM_PROBE_RESP_TTL = 418,
+ /* Set global MU PPDU duration for DL (usec units) */
+ OL_ATH_PARAM_MU_PPDU_DURATION = 419,
+ /* Set TBTT_CTRL_CFG */
+ OL_ATH_PARAM_TBTT_CTRL = 420,
+ /* Enable/disable AP OBSS_PD_THRESHOLD */
+ OL_ATH_PARAM_SET_CMD_OBSS_PD_THRESHOLD_ENABLE = 421,
+ /* Get baseline radio level channel width */
+ OL_ATH_PARAM_RCHWIDTH = 422,
+ /* Whether external ACS request is in progress */
+ OL_ATH_EXT_ACS_REQUEST_IN_PROGRESS = 423,
+ /* set/get hw mode */
+ OL_ATH_PARAM_HW_MODE = 424,
+#if DBDC_REPEATER_SUPPORT
+ /* same ssid feature global disable */
+ OL_ATH_PARAM_SAME_SSID_DISABLE = 425,
+#endif
+ /* get MBSS enable flag */
+ OL_ATH_PARAM_MBSS_EN = 426,
+ /* UNII-1 and UNII-2A channel coexistance */
+ OL_ATH_PARAM_CHAN_COEX = 427,
+ /* Out of Band Advertisement feature */
+ OL_ATH_PARAM_OOB_ENABLE = 428,
+ /* set/get opmode-notification timer for hw-mode switch */
+ OL_ATH_PARAM_HW_MODE_SWITCH_OMN_TIMER = 429,
+ /* enable opmode-notification when doing hw-mode switch */
+ OL_ATH_PARAM_HW_MODE_SWITCH_OMN_ENABLE = 430,
+ /* set primary interface for hw-mode switch */
+ OL_ATH_PARAM_HW_MODE_SWITCH_PRIMARY_IF = 431,
+ /* Number of vdevs configured per PSOC */
+ OL_ATH_PARAM_GET_PSOC_NUM_VDEVS = 432,
+ /* Number of peers configured per PSOC */
+ OL_ATH_PARAM_GET_PSOC_NUM_PEERS = 433,
+ /* Number of vdevs configured per PDEV */
+ OL_ATH_PARAM_GET_PDEV_NUM_VDEVS = 434,
+ /* Number of peers configured per PDEV */
+ OL_ATH_PARAM_GET_PDEV_NUM_PEERS = 435,
+ /* Number of monitor vdevs configured per PDEV */
+ OL_ATH_PARAM_GET_PDEV_NUM_MONITOR_VDEVS = 436,
+#ifdef CE_TASKLET_DEBUG_ENABLE
+ /* Enable/disable CE stats print */
+ OL_ATH_PARAM_ENABLE_CE_LATENCY_STATS = 437,
+#endif
+ /* set operating class table (MBO) value. */
+ OL_ATH_PARAM_OPCLASS_TBL = 438,
+#ifdef QCA_SUPPORT_ADFS_RCAC
+ /* enable/disable rolling cac feature */
+ OL_ATH_PARAM_ROLLING_CAC_ENABLE = 439,
+ /* configure a frequency for rolling CAC */
+ OL_ATH_PARAM_CONFIGURE_RCAC_FREQ = 440,
+#endif
+#if ATH_SUPPORT_DFS
+ /* Prioritize scan over CAC time */
+ OL_ATH_SCAN_OVER_CAC = 441,
+#endif
+
+};
+
+#ifdef CONFIG_SUPPORT_LIBROXML
+struct vendor_commands vap_vendor_cmds[] = {
+ {"turbo", IEEE80211_PARAM_TURBO, SET_PARAM, 1},
+ {"get_turbo", IEEE80211_PARAM_TURBO, GET_PARAM, 0},
+ {"authmode", IEEE80211_PARAM_AUTHMODE, SET_PARAM, 1},
+ {"get_authmode", IEEE80211_PARAM_AUTHMODE, GET_PARAM, 0},
+ {"protmode", IEEE80211_PARAM_PROTMODE, SET_PARAM, 1},
+ {"get_protmode", IEEE80211_PARAM_PROTMODE, GET_PARAM, 0},
+ {"mcastcipher", IEEE80211_PARAM_MCASTCIPHER, SET_PARAM, 1},
+ {"get_mcastcipher", IEEE80211_PARAM_MCASTCIPHER, GET_PARAM, 0},
+ {"mcastkeylen", IEEE80211_PARAM_MCASTKEYLEN, SET_PARAM, 1},
+ {"get_mcastkeylen", IEEE80211_PARAM_MCASTKEYLEN, GET_PARAM, 0},
+ {"ucastciphers", IEEE80211_PARAM_UCASTCIPHERS, SET_PARAM, 1},
+ {"get_uciphers", IEEE80211_PARAM_UCASTCIPHERS, GET_PARAM, 0},
+ {"ucastciphers", IEEE80211_PARAM_UCASTCIPHER, SET_PARAM, 1},
+ {"get_ucastcipher", IEEE80211_PARAM_UCASTCIPHER, GET_PARAM, 0},
+ {"ucastkeylen", IEEE80211_PARAM_UCASTKEYLEN, SET_PARAM, 1},
+ {"get_ucastkeylen", IEEE80211_PARAM_UCASTKEYLEN, GET_PARAM, 0},
+ {"wpa", IEEE80211_PARAM_WPA, SET_PARAM, 1},
+ {"get_wpa", IEEE80211_PARAM_WPA, GET_PARAM, 0},
+ {"privacy", IEEE80211_PARAM_PRIVACY, SET_PARAM, 1},
+ {"get_privacy", IEEE80211_PARAM_PRIVACY, GET_PARAM, 0},
+ {"countermeasures", IEEE80211_PARAM_COUNTERMEASURES, SET_PARAM, 1},
+ {"get_countermeas", IEEE80211_PARAM_COUNTERMEASURES, GET_PARAM, 0},
+ {"dropunencrypted", IEEE80211_PARAM_DROPUNENCRYPTED, SET_PARAM, 1},
+ {"get_dropunencry", IEEE80211_PARAM_DROPUNENCRYPTED, GET_PARAM, 0},
+ {"driver_caps", IEEE80211_PARAM_DRIVER_CAPS, SET_PARAM, 1},
+ {"get_driver_caps", IEEE80211_PARAM_DRIVER_CAPS, GET_PARAM, 0},
+ {"maccmd", IEEE80211_PARAM_MACCMD, SET_PARAM, 1},
+ {"get_maccmd", IEEE80211_PARAM_MACCMD, GET_PARAM, 0},
+ {"wmm", IEEE80211_PARAM_WMM, SET_PARAM, 1},
+ {"get_wmm", IEEE80211_PARAM_WMM, GET_PARAM, 0},
+ {"hide_ssid", IEEE80211_PARAM_HIDESSID, SET_PARAM, 1},
+ {"get_hide_ssid", IEEE80211_PARAM_HIDESSID, GET_PARAM, 0},
+ {"ap_bridge", IEEE80211_PARAM_APBRIDGE, SET_PARAM, 1},
+ {"get_ap_bridge", IEEE80211_PARAM_APBRIDGE, GET_PARAM, 0},
+ {"keymgtalgs", IEEE80211_PARAM_KEYMGTALGS, SET_PARAM, 1},
+ {"get_keymgtalgs", IEEE80211_PARAM_KEYMGTALGS, GET_PARAM, 0},
+ {"rsncaps", IEEE80211_PARAM_RSNCAPS, SET_PARAM, 1},
+ {"get_rsncaps", IEEE80211_PARAM_RSNCAPS, GET_PARAM, 0},
+ {"inact", IEEE80211_PARAM_INACT, SET_PARAM, 1},
+ {"get_inact", IEEE80211_PARAM_INACT, GET_PARAM, 0},
+ {"inact_auth", IEEE80211_PARAM_INACT_AUTH, SET_PARAM, 1},
+ {"get_inact_auth", IEEE80211_PARAM_INACT_AUTH, GET_PARAM, 0},
+ {"inact_init", IEEE80211_PARAM_INACT_INIT, SET_PARAM, 1},
+ {"get_inact_init", IEEE80211_PARAM_INACT_INIT, GET_PARAM, 0},
+ {"dtim_period", IEEE80211_PARAM_DTIM_PERIOD, SET_PARAM, 1},
+ {"get_dtim_period", IEEE80211_PARAM_DTIM_PERIOD, GET_PARAM, 0},
+ {"bintval", IEEE80211_PARAM_BEACON_INTERVAL, SET_PARAM, 1},
+ {"get_bintval", IEEE80211_PARAM_BEACON_INTERVAL, GET_PARAM, 0},
+ {"doth", IEEE80211_PARAM_DOTH, SET_PARAM, 1},
+ {"get_doth", IEEE80211_PARAM_DOTH, GET_PARAM, 0},
+ {"doth_pwrtgt", IEEE80211_PARAM_PWRTARGET, SET_PARAM, 1},
+ {"get_doth_pwrtgt", IEEE80211_PARAM_PWRTARGET, GET_PARAM, 0},
+ {"doth_reassoc", IEEE80211_PARAM_GENREASSOC, SET_PARAM, 1},
+ {"compression", IEEE80211_PARAM_COMPRESSION, SET_PARAM, 1},
+ {"get_compression", IEEE80211_PARAM_COMPRESSION, GET_PARAM, 0},
+ {"ff", IEEE80211_PARAM_FF, SET_PARAM, 1},
+ {"get_ff", IEEE80211_PARAM_FF, GET_PARAM, 0},
+ {"burst", IEEE80211_PARAM_BURST, SET_PARAM, 1},
+ {"get_burst", IEEE80211_PARAM_BURST, GET_PARAM, 0},
+ {"pureg", IEEE80211_PARAM_PUREG, SET_PARAM, 1},
+ {"get_pureg", IEEE80211_PARAM_PUREG, GET_PARAM, 0},
+ {"ar", IEEE80211_PARAM_AR, SET_PARAM, 1},
+ {"get_ar", IEEE80211_PARAM_AR, GET_PARAM, 0},
+ {"wds", IEEE80211_PARAM_WDS, SET_PARAM, 1},
+ {"get_wds", IEEE80211_PARAM_WDS, GET_PARAM, 0},
+ {"mcast_rate", IEEE80211_PARAM_MCAST_RATE, SET_PARAM, 1},
+ {"get_mcast_rate", IEEE80211_PARAM_MCAST_RATE, GET_PARAM, 0},
+ {"countryie", IEEE80211_PARAM_COUNTRY_IE, SET_PARAM, 1},
+ {"get_countryie", IEEE80211_PARAM_COUNTRY_IE, GET_PARAM, 0},
+ {"scanvalid", IEEE80211_PARAM_SCANVALID, SET_PARAM, 1},
+ {"get_scanvalid", IEEE80211_PARAM_SCANVALID, GET_PARAM, 0},
+ {"uapsd", IEEE80211_PARAM_UAPSDINFO, SET_PARAM, 1},
+ {"get_uapsd", IEEE80211_PARAM_UAPSDINFO, GET_PARAM, 0},
+ {"sleep", IEEE80211_PARAM_SLEEP, SET_PARAM, 1},
+ {"get_sleep", IEEE80211_PARAM_SLEEP, GET_PARAM, 0},
+ {"qosnull", IEEE80211_PARAM_QOSNULL, SET_PARAM, 1},
+ {"pspoll", IEEE80211_PARAM_PSPOLL, SET_PARAM, 1},
+ {"eospdrop", IEEE80211_PARAM_EOSPDROP, SET_PARAM, 1},
+ {"get_eospdrop", IEEE80211_PARAM_EOSPDROP, GET_PARAM, 0},
+ {"chanbw", IEEE80211_PARAM_CHANBW, SET_PARAM, 1},
+ {"get_chanbw", IEEE80211_PARAM_CHANBW, GET_PARAM, 0},
+ {"shpreamble", IEEE80211_PARAM_SHORTPREAMBLE, SET_PARAM, 1},
+ {"get_shpreamble", IEEE80211_PARAM_SHORTPREAMBLE, GET_PARAM, 0},
+ {"extprotmode", IEEE80211_PARAM_CWM_EXTPROTMODE, SET_PARAM, 1},
+ {"get_extprotmode", IEEE80211_PARAM_CWM_EXTPROTMODE, GET_PARAM, 0},
+ {"extprotspac", IEEE80211_PARAM_CWM_EXTPROTSPACING, SET_PARAM, 1},
+ {"get_extprotspac", IEEE80211_PARAM_CWM_EXTPROTSPACING, GET_PARAM, 0},
+ {"cwmenable", IEEE80211_PARAM_CWM_ENABLE, SET_PARAM, 1},
+ {"get_cwmenable", IEEE80211_PARAM_CWM_ENABLE, GET_PARAM, 0},
+ {"extbusythres", IEEE80211_PARAM_CWM_EXTBUSYTHRESHOLD, SET_PARAM, 1},
+ {"g_extbusythres", IEEE80211_PARAM_CWM_EXTBUSYTHRESHOLD, GET_PARAM, 0},
+ {"shortgi", IEEE80211_PARAM_SHORT_GI, SET_PARAM, 1},
+ {"get_shortgi", IEEE80211_PARAM_SHORT_GI, GET_PARAM, 0},
+ {"ampdu", IEEE80211_PARAM_AMPDU, SET_PARAM, 1},
+ {"get_ampdu", IEEE80211_PARAM_AMPDU, GET_PARAM, 0},
+ {"amsdu", IEEE80211_PARAM_AMSDU, SET_PARAM, 1},
+ {"get_amsdu", IEEE80211_PARAM_AMSDU, GET_PARAM, 0},
+ {"get_countrycode", IEEE80211_PARAM_COUNTRYCODE, GET_PARAM, 0},
+ {"reset", IEEE80211_PARAM_RESET_ONCE, SET_PARAM, 1},
+ {"setaddbaoper", IEEE80211_PARAM_SETADDBAOPER, SET_PARAM, 1},
+ {"set11NRates", IEEE80211_PARAM_11N_RATE, SET_PARAM, 1},
+ {"get11NRates", IEEE80211_PARAM_11N_RATE, GET_PARAM, 0},
+ {"set11NRetries", IEEE80211_PARAM_11N_RETRIES, SET_PARAM, 1},
+ {"get11NRetries", IEEE80211_PARAM_11N_RETRIES, GET_PARAM, 0},
+ {"dbgLVL", IEEE80211_PARAM_DBG_LVL, SET_PARAM, 1},
+ {"getdbgLVL", IEEE80211_PARAM_DBG_LVL, GET_PARAM, 0},
+ {"wdsdetect", IEEE80211_PARAM_WDS_AUTODETECT, SET_PARAM, 1},
+ {"get_wdsdetect", IEEE80211_PARAM_WDS_AUTODETECT, GET_PARAM, 0},
+ {"ignore11d", IEEE80211_PARAM_IGNORE_11DBEACON, SET_PARAM, 1},
+ {"get_ignore11d", IEEE80211_PARAM_IGNORE_11DBEACON, GET_PARAM, 0},
+ {"stafwd", IEEE80211_PARAM_STA_FORWARD, SET_PARAM, 1},
+ {"get_stafwd", IEEE80211_PARAM_STA_FORWARD, GET_PARAM, 0},
+ {"mcastenhance", IEEE80211_PARAM_ME, SET_PARAM, 1},
+ {"g_mcastenhance", IEEE80211_PARAM_ME, GET_PARAM, 0},
+ {"medump_dummy", 95, SET_PARAM, 1},
+ {"medump", 95, GET_PARAM, 0},
+ {"medebug", 96, SET_PARAM, 1},
+ {"get_medebug", 96, GET_PARAM, 0},
+ {"me_length", 97, SET_PARAM, 1},
+ {"get_me_length", 97, GET_PARAM, 0},
+ {"metimer", 98, SET_PARAM, 1},
+ {"get_metimer", 98, GET_PARAM, 0},
+ {"metimeout", 99, SET_PARAM, 1},
+ {"get_metimeout", 99, GET_PARAM, 0},
+ {"puren", IEEE80211_PARAM_PUREN, SET_PARAM, 1},
+ {"get_puren", IEEE80211_PARAM_PUREN, GET_PARAM, 0},
+ {"basicrates", IEEE80211_PARAM_BASICRATES, SET_PARAM, 1},
+ {"htweptkip", IEEE80211_PARAM_WEP_TKIP_HT, SET_PARAM, 1},
+ {"get_htweptkip", IEEE80211_PARAM_WEP_TKIP_HT, GET_PARAM, 0},
+ {"powersave", IEEE80211_PARAM_NETWORK_SLEEP, SET_PARAM, 1},
+ {"get_powersave", IEEE80211_PARAM_NETWORK_SLEEP, GET_PARAM, 0},
+ {"hbrtimer", IEEE80211_PARAM_HBR_TIMER, SET_PARAM, 1},
+ {"get_hbrtimer", IEEE80211_PARAM_HBR_TIMER, GET_PARAM, 0},
+ {"get_hbrstate", IEEE80211_PARAM_HBR_STATE, GET_PARAM, 0},
+ {"chextoffset", IEEE80211_PARAM_CHEXTOFFSET, SET_PARAM, 1},
+ {"get_chextoffset", IEEE80211_PARAM_CHEXTOFFSET, GET_PARAM, 0},
+ {"chscaninit", IEEE80211_PARAM_CHSCANINIT, SET_PARAM, 1},
+ {"get_chscaninit", IEEE80211_PARAM_CHSCANINIT, GET_PARAM, 0},
+ {"ht40intol", IEEE80211_PARAM_HT40_INTOLERANT, SET_PARAM, 1},
+ {"get_ht40intol", IEEE80211_PARAM_HT40_INTOLERANT, GET_PARAM, 0},
+ {"chwidth", IEEE80211_PARAM_CHWIDTH, SET_PARAM, 1},
+ {"get_chwidth", IEEE80211_PARAM_CHWIDTH, GET_PARAM, 0},
+ {"extap", IEEE80211_PARAM_EXTAP, SET_PARAM, 1},
+ {"get_extap", IEEE80211_PARAM_EXTAP, GET_PARAM, 0},
+ {"disablecoext", IEEE80211_PARAM_COEXT_DISABLE, SET_PARAM, 1},
+ {"g_disablecoext", IEEE80211_PARAM_COEXT_DISABLE, GET_PARAM, 0},
+ {"medropmcast", 125, SET_PARAM, 1},
+ {"get_medropmcast", 125, GET_PARAM, 0},
+ {"me_showdeny", 126, GET_PARAM, 0},
+ {"me_cleardeny", 127, SET_PARAM, 1},
+ {"get_iqueconfig", 129, GET_PARAM, 0},
+ {"vap_contryie", IEEE80211_PARAM_VAP_COUNTRY_IE, SET_PARAM, 1},
+ {"get_vapcontryie", IEEE80211_PARAM_VAP_COUNTRY_IE, GET_PARAM, 0},
+ {"vap_doth", IEEE80211_PARAM_VAP_DOTH, SET_PARAM, 1},
+ {"get_vap_doth", IEEE80211_PARAM_VAP_DOTH, GET_PARAM, 0},
+ {"sko", IEEE80211_PARAM_STA_QUICKKICKOUT, SET_PARAM, 1},
+ {"get_sko", IEEE80211_PARAM_STA_QUICKKICKOUT, GET_PARAM, 0},
+ {"autoassoc", IEEE80211_PARAM_AUTO_ASSOC, SET_PARAM, 1},
+ {"get_autoassoc", IEEE80211_PARAM_AUTO_ASSOC, GET_PARAM, 0},
+ {"clrappoptie", IEEE80211_PARAM_CLR_APPOPT_IE, SET_PARAM, 1},
+ {"quiet", IEEE80211_PARAM_QUIET_PERIOD, SET_PARAM, 1},
+ {"get_quiet", IEEE80211_PARAM_QUIET_PERIOD, GET_PARAM, 0},
+ {"qbssload", IEEE80211_PARAM_QBSS_LOAD, SET_PARAM, 1},
+ {"get_qbssload", IEEE80211_PARAM_QBSS_LOAD, GET_PARAM, 0},
+ {"mfptest", IEEE80211_PARAM_MFP_TEST, SET_PARAM, 1},
+ {"get_mfptest", IEEE80211_PARAM_MFP_TEST, GET_PARAM, 0},
+ {"ips_pspoll", IEEE80211_PARAM_STA_PWR_SET_PSPOLL, SET_PARAM, 1},
+ {"get_ips_pspoll", IEEE80211_PARAM_STA_PWR_SET_PSPOLL, GET_PARAM, 0},
+#if UMAC_SUPPORT_CHANUTIL_MEASUREMENT
+ {"chutil_enab", IEEE80211_PARAM_CHAN_UTIL_ENAB, SET_PARAM, 1},
+ {"get_chutil_enab", IEEE80211_PARAM_CHAN_UTIL_ENAB, GET_PARAM, 0},
+ {"get_chutil", IEEE80211_PARAM_CHAN_UTIL, GET_PARAM, 0},
+#endif
+ {"dbgLVL_high", IEEE80211_PARAM_DBG_LVL_HIGH, SET_PARAM, 1},
+ {"getdbgLVL_high", IEEE80211_PARAM_DBG_LVL_HIGH, GET_PARAM, 0},
+ {"no_wradar", IEEE80211_PARAM_WEATHER_RADAR_CHANNEL, SET_PARAM, 1},
+ {"get_no_wradar", IEEE80211_PARAM_WEATHER_RADAR_CHANNEL, GET_PARAM, 0},
+ {"wepkeycache", IEEE80211_PARAM_WEP_KEYCACHE, SET_PARAM, 1},
+ {"get_wepkeycache", IEEE80211_PARAM_WEP_KEYCACHE, GET_PARAM, 0},
+ {"wnmsleepmode", IEEE80211_PARAM_WNM_SLEEP, SET_PARAM, 1},
+ {"g_wnmsleepmode", IEEE80211_PARAM_WNM_SLEEP, GET_PARAM, 0},
+ {"maxampdu", IEEE80211_PARAM_MAX_AMPDU, SET_PARAM, 1},
+ {"get_maxampdu", IEEE80211_PARAM_MAX_AMPDU, GET_PARAM, 0},
+ {"vhtmaxampdu", IEEE80211_PARAM_VHT_MAX_AMPDU, SET_PARAM, 1},
+ {"get_vhtmaxampdu", IEEE80211_PARAM_VHT_MAX_AMPDU, GET_PARAM, 0},
+ {"get_dfsdomain", IEEE80211_PARAM_DFSDOMAIN, GET_PARAM, 0},
+ {"pure11ac", IEEE80211_PARAM_PURE11AC, SET_PARAM, 1},
+ {"get_pure11ac", IEEE80211_PARAM_PURE11AC, GET_PARAM, 0},
+ {"bandwidth", IEEE80211_PARAM_BANDWIDTH, SET_PARAM, 1},
+ {"get_bandwidth", IEEE80211_PARAM_BANDWIDTH, GET_PARAM, 0},
+ {"freq_band", IEEE80211_PARAM_FREQ_BAND, SET_PARAM, 1},
+ {"get_freq_band", IEEE80211_PARAM_FREQ_BAND, GET_PARAM, 0},
+ {"extchan", IEEE80211_PARAM_EXTCHAN, SET_PARAM, 1},
+ {"get_extchan", IEEE80211_PARAM_EXTCHAN, GET_PARAM, 0},
+ {"get_mcsmode", IEEE80211_PARAM_MCS, GET_PARAM, 0},
+ {"get_channf", IEEE80211_PARAM_CHAN_NOISE, GET_PARAM, 0},
+ {"session", IEEE80211_PARAM_SESSION_TIMEOUT, SET_PARAM, 1},
+ {"get_session", IEEE80211_PARAM_SESSION_TIMEOUT, GET_PARAM, 0},
+ {"wnmsmenter", IEEE80211_PARAM_WNM_SMENTER, SET_PARAM, 1},
+ {"wnmsmexit", IEEE80211_PARAM_WNM_SMEXIT, SET_PARAM, 1},
+ {"hcbssload", IEEE80211_PARAM_HC_BSSLOAD, SET_PARAM, 1},
+ {"get_hcbssload", IEEE80211_PARAM_HC_BSSLOAD, GET_PARAM, 0},
+ {"osen", IEEE80211_PARAM_OSEN, SET_PARAM, 1},
+ {"get_osen", IEEE80211_PARAM_OSEN, GET_PARAM, 0},
+ {"cfreq2", IEEE80211_PARAM_SECOND_CENTER_FREQ, SET_PARAM, 2},
+ {"get_cfreq2", IEEE80211_PARAM_SECOND_CENTER_FREQ, GET_PARAM, 0},
+ {"strictbw", IEEE80211_PARAM_STRICT_BW, SET_PARAM, 1},
+ {"get_strictbw", IEEE80211_PARAM_STRICT_BW, GET_PARAM, 0},
+ {"get_mixedmode", IEEE80211_PARAM_MIXED_MODE, SET_PARAM, 1},
+ {"vlan_tag", IEEE80211_PARAM_ATH_SUPPORT_VLAN, SET_PARAM, 1},
+ {"get_vlan_tag", IEEE80211_PARAM_ATH_SUPPORT_VLAN, GET_PARAM, 0},
+ {"no_HT_TxAmsdu", IEEE80211_PARAM_11N_TX_AMSDU, SET_PARAM, 1},
+ {"g_no_HT_TxAmsdu", IEEE80211_PARAM_11N_TX_AMSDU, GET_PARAM, 0},
+ {"ctsprt_dtmbcn", IEEE80211_PARAM_CTSPROT_DTIM_BCN, SET_PARAM, 1},
+ {"g_ctsprt_dtmbcn", IEEE80211_PARAM_CTSPROT_DTIM_BCN, GET_PARAM, 0},
+#if ATH_SUPPORT_DSCP_OVERRIDE
+ {"vappriority", IEEE80211_PARAM_VAP_DSCP_PRIORITY, SET_PARAM, 1},
+ {"get_vappriority", IEEE80211_PARAM_VAP_DSCP_PRIORITY, GET_PARAM, 0},
+#endif
+ {"use_custom_chan", IEEE80211_PARAM_CUSTOM_CHAN_LIST, SET_PARAM, 1},
+ {"get_custom_chan", IEEE80211_PARAM_CUSTOM_CHAN_LIST, GET_PARAM, 0},
+ {"mbo", IEEE80211_PARAM_MBO, SET_PARAM, 1},
+ {"g_mbo", IEEE80211_PARAM_MBO, GET_PARAM, 0},
+ {"mbocap", IEEE80211_PARAM_MBO_CAP, SET_PARAM, 1},
+ {"g_mbocap", IEEE80211_PARAM_MBO_CAP, GET_PARAM, 0},
+ {"mbo_asoc_dis", IEEE80211_PARAM_MBO_ASSOC_DISALLOW, SET_PARAM, 1},
+ {"g_mbo_asoc_dis", IEEE80211_PARAM_MBO_ASSOC_DISALLOW, GET_PARAM, 0},
+ {"mbo_cel_pref", IEEE80211_PARAM_MBO_CELLULAR_PREFERENCE, SET_PARAM, 1},
+ {"g_mbo_cel_pref", IEEE80211_PARAM_MBO_CELLULAR_PREFERENCE, GET_PARAM, 0},
+ {"mbo_trans_rs", IEEE80211_PARAM_MBO_TRANSITION_REASON, SET_PARAM, 1},
+ {"g_mbo_trans_rs", IEEE80211_PARAM_MBO_TRANSITION_REASON, GET_PARAM, 0},
+ {"mbo_asoc_ret", IEEE80211_PARAM_MBO_ASSOC_RETRY_DELAY, SET_PARAM, 1},
+ {"g_mbo_asoc_ret", IEEE80211_PARAM_MBO_ASSOC_RETRY_DELAY, GET_PARAM, 0},
+ {"maccmd_sec", IEEE80211_PARAM_MACCMD_SEC, SET_PARAM, 1},
+ {"get_maccmd_sec", IEEE80211_PARAM_MACCMD_SEC, GET_PARAM, 0},
+ {"vbLVL", IEEE80211_PARAM_UMAC_VERBOSE_LVL, SET_PARAM, 1},
+ {"vsp_enable", IEEE80211_PARAM_VSP_ENABLE, SET_PARAM, 1},
+ {"g_vsp_enable", IEEE80211_PARAM_VSP_ENABLE, GET_PARAM, 0},
+ {"dyn_bw_rts", IEEE80211_PARAM_DYN_BW_RTS, SET_PARAM, 1},
+ {"get_dyn_bw_rts", IEEE80211_PARAM_DYN_BW_RTS, GET_PARAM, 0},
+ {"oce", IEEE80211_PARAM_OCE, SET_PARAM, 1},
+ {"g_oce", IEEE80211_PARAM_OCE, GET_PARAM, 0},
+ {"oce_asoc_rej", IEEE80211_PARAM_OCE_ASSOC_REJECT, SET_PARAM, 1},
+ {"g_oce_asoc_rej", IEEE80211_PARAM_OCE_ASSOC_REJECT, GET_PARAM, 0},
+ {"oce_asoc_rssi", IEEE80211_PARAM_OCE_ASSOC_MIN_RSSI, SET_PARAM, 1},
+ {"g_oce_asoc_rssi", IEEE80211_PARAM_OCE_ASSOC_MIN_RSSI, GET_PARAM, 0},
+ {"oce_asoc_dly", IEEE80211_PARAM_OCE_ASSOC_RETRY_DELAY, SET_PARAM, 1},
+ {"g_oce_asoc_dly", IEEE80211_PARAM_OCE_ASSOC_RETRY_DELAY, GET_PARAM, 0},
+ {"oce_wan_mtr", IEEE80211_PARAM_OCE_WAN_METRICS, SET_PARAM, 2},
+ {"g_oce_wan_mtr", IEEE80211_PARAM_OCE_WAN_METRICS, GET_PARAM, 0},
+ {"prb_rate", IEEE80211_PARAM_PRB_RATE, SET_PARAM, 1},
+ {"g_prb_rate", IEEE80211_PARAM_PRB_RATE, GET_PARAM, 0},
+ {"oce_hlp", IEEE80211_PARAM_OCE_HLP, SET_PARAM, 1},
+ {"g_oce_hlp", IEEE80211_PARAM_OCE_HLP, GET_PARAM, 0},
+ {"nbr_scan_prd", IEEE80211_PARAM_NBR_SCAN_PERIOD, SET_PARAM, 1},
+ {"g_nbr_scan_prd", IEEE80211_PARAM_NBR_SCAN_PERIOD, GET_PARAM, 0},
+ {"rnr", IEEE80211_PARAM_RNR, SET_PARAM, 1},
+ {"g_rnr", IEEE80211_PARAM_RNR, GET_PARAM, 0},
+ {"rnr_fd", IEEE80211_PARAM_RNR_FD, SET_PARAM, 1},
+ {"g_rnr_fd", IEEE80211_PARAM_RNR_FD, GET_PARAM, 0},
+ {"rnr_tbtt", IEEE80211_PARAM_RNR_TBTT, SET_PARAM, 1},
+ {"apchanrpt", IEEE80211_PARAM_RNR_TBTT, GET_PARAM, 0},
+ {"g_apchanrpt", IEEE80211_PARAM_AP_CHAN_RPT, SET_PARAM, 1},
+ {"mgmt_rate", IEEE80211_PARAM_MGMT_RATE, SET_PARAM, 1},
+ {"g_mgmt_rate", IEEE80211_PARAM_MGMT_RATE, GET_PARAM, 0},
+ {"rrm", IEEE80211_PARAM_RRM_CAP, SET_PARAM, 1},
+ {"get_rrm", IEEE80211_PARAM_RRM_CAP, GET_PARAM, 0},
+ {"rrmstats", IEEE80211_PARAM_RRM_STATS, SET_PARAM, 1},
+ {"get_rrmstats", IEEE80211_PARAM_RRM_STATS, GET_PARAM, 0},
+ {"rrmslwin", IEEE80211_PARAM_RRM_SLWINDOW, SET_PARAM, 1},
+ {"get_rrmslwin", IEEE80211_PARAM_RRM_SLWINDOW, GET_PARAM, 0},
+ {"rrmdbg", IEEE80211_PARAM_RRM_DEBUG, SET_PARAM, 1},
+ {"get_rrmdbg", IEEE80211_PARAM_RRM_DEBUG, GET_PARAM, 0},
+ {"wnm_bss", IEEE80211_PARAM_WNM_BSS_CAP, SET_PARAM, 1},
+ {"get_wnm_bss", IEEE80211_PARAM_WNM_BSS_CAP, GET_PARAM, 0},
+ {"wnm", IEEE80211_PARAM_WNM_CAP, SET_PARAM, 1},
+ {"get_wnm", IEEE80211_PARAM_WNM_CAP, GET_PARAM, 0},
+ {"wnm_tfs", IEEE80211_PARAM_WNM_TFS_CAP, SET_PARAM, 1},
+ {"get_wnm_tfs", IEEE80211_PARAM_WNM_TFS_CAP, GET_PARAM, 0},
+ {"wnm_tim", IEEE80211_PARAM_WNM_TIM_CAP, SET_PARAM, 1},
+ {"get_wnm_tim", IEEE80211_PARAM_WNM_TIM_CAP, GET_PARAM, 0},
+ {"wnm_sleep", IEEE80211_PARAM_WNM_SLEEP_CAP, SET_PARAM, 1},
+ {"get_wnm_sleep", IEEE80211_PARAM_WNM_SLEEP_CAP, GET_PARAM, 0},
+ {"wnm_fms", IEEE80211_PARAM_WNM_FMS_CAP, SET_PARAM, 1},
+ {"get_wnm_fms", IEEE80211_PARAM_WNM_FMS_CAP, GET_PARAM, 0},
+#if WLAN_SUPPORT_GREEN_AP
+ {"ant_ps_on", IEEE80211_IOCTL_GREEN_AP_PS_ENABLE, SET_PARAM, 1},
+ {"get_ant_ps_on", IEEE80211_IOCTL_GREEN_AP_PS_ENABLE, GET_PARAM, 0},
+ {"ps_timeout", IEEE80211_IOCTL_GREEN_AP_PS_TIMEOUT, SET_PARAM, 1},
+ {"get_ps_timeout", IEEE80211_IOCTL_GREEN_AP_PS_TIMEOUT, GET_PARAM, 0},
+#endif
+ {"setwapi", IEEE80211_PARAM_SETWAPI, SET_PARAM, 1},
+ {"wps", IEEE80211_PARAM_WPS, SET_PARAM, 1},
+ {"get_wps", IEEE80211_PARAM_WPS, GET_PARAM, 0},
+ {"ccmpSwSelEn", IEEE80211_PARAM_CCMPSW_ENCDEC, SET_PARAM, 1},
+ {"get_ccmpSwSelEn", IEEE80211_PARAM_CCMPSW_ENCDEC, GET_PARAM, 0},
+ {"periodicScan", IEEE80211_PARAM_PERIODIC_SCAN, SET_PARAM, 1},
+ {"g_periodicScan", IEEE80211_PARAM_PERIODIC_SCAN, GET_PARAM, 0},
+ {"wapi_rkupkt", IEEE80211_PARAM_WAPIREKEY_USK, SET_PARAM, 1},
+ {"get_wapi_rkupkt", IEEE80211_PARAM_WAPIREKEY_USK, GET_PARAM, 0},
+ {"wapi_rkmpkt", IEEE80211_PARAM_WAPIREKEY_MSK, SET_PARAM, 1},
+ {"get_wapi_rkmpkt", IEEE80211_PARAM_WAPIREKEY_MSK, GET_PARAM, 0},
+ {"csa2g", IEEE80211_PARAM_2G_CSA, SET_PARAM, 1},
+ {"get_csa2g", IEEE80211_PARAM_2G_CSA, GET_PARAM, 0},
+ {"wapi_rkupdate", IEEE80211_PARAM_WAPIREKEY_UPDATE, SET_PARAM, 1},
+ {"wdsaddr", IEEE80211_PARAM_ADD_WDS_ADDR, SET_PARAM, 1},
+#if UMAC_SUPPORT_VI_DBG
+ {"dbgcfg", IEEE80211_PARAM_DBG_CFG, SET_PARAM, 1},
+ {"getdbgcfg", IEEE80211_PARAM_DBG_CFG, GET_PARAM, 0},
+ {"dbgrestart", IEEE80211_PARAM_DBG_NUM_STREAMS, SET_PARAM, 1},
+ {"getdbgrestart", IEEE80211_PARAM_DBG_NUM_STREAMS, GET_PARAM, 0},
+ {"rxdropstats", IEEE80211_PARAM_RXDROP_STATUS, SET_PARAM, 1},
+ {"getrxdropstats", IEEE80211_PARAM_RXDROP_STATUS, GET_PARAM, 0},
+#endif
+#if ATH_SUPPORT_IBSS_DFS
+ {"setibssdfsparam", IEEE80211_PARAM_IBSS_DFS_PARAM, SET_PARAM, 1},
+ {"getibssdfsparam", IEEE80211_PARAM_IBSS_DFS_PARAM, GET_PARAM, 0},
+#endif
+#ifdef ATH_SUPPORT_TxBF
+ {"autocvupdate", IEEE80211_PARAM_TXBF_AUTO_CVUPDATE, SET_PARAM, 1},
+ {"g_autocvupdate", IEEE80211_PARAM_TXBF_AUTO_CVUPDATE, GET_PARAM, 0},
+ {"cvupdateper", IEEE80211_PARAM_TXBF_CVUPDATE_PER, SET_PARAM, 1},
+ {"get_cvupdateper", IEEE80211_PARAM_TXBF_CVUPDATE_PER, GET_PARAM, 0},
+#endif
+ {"maxsta", IEEE80211_PARAM_MAXSTA, SET_PARAM, 1},
+ {"get_maxsta", IEEE80211_PARAM_MAXSTA, GET_PARAM, 0},
+ {"scanband", IEEE80211_PARAM_SCAN_BAND, SET_PARAM, 1},
+ {"get_scanband", IEEE80211_PARAM_SCAN_BAND, GET_PARAM, 0},
+ {"no_disassoc", IEEE80211_PARAM_NO_STOP_DISASSOC, SET_PARAM, 1},
+ {"get_no_disassoc", IEEE80211_PARAM_NO_STOP_DISASSOC, GET_PARAM, 0},
+ {"txcorrection", 258, SET_PARAM, 1},
+ {"g_txcorrection", 258, GET_PARAM, 0},
+ {"proxyarp", IEEE80211_PARAM_PROXYARP_CAP, SET_PARAM, 1},
+ {"get_proxyarp", IEEE80211_PARAM_PROXYARP_CAP, GET_PARAM, 0},
+ {"dgaf_disable", IEEE80211_PARAM_DGAF_DISABLE, SET_PARAM, 1},
+ {"g_dgaf_disable", IEEE80211_PARAM_DGAF_DISABLE, GET_PARAM, 0},
+ {"l2tif", IEEE80211_PARAM_L2TIF_CAP, SET_PARAM, 1},
+ {"get_l2tif", IEEE80211_PARAM_L2TIF_CAP, GET_PARAM, 0},
+ {"senddeauth", IEEE80211_PARAM_SEND_DEAUTH, SET_PARAM, 1},
+ {"get_senddeauth", IEEE80211_PARAM_SEND_DEAUTH, GET_PARAM, 0},
+ {"siwtxpwradjust", IEEE80211_PARAM_SET_TXPWRADJUST, SET_PARAM, 1},
+ {"txrx_dbg", IEEE80211_PARAM_TXRX_DBG, SET_PARAM, 1},
+ {"vhtmcs", IEEE80211_PARAM_VHT_MCS, SET_PARAM, 1},
+ {"get_vhtmcs", IEEE80211_PARAM_VHT_MCS, GET_PARAM, 0},
+ {"txrx_fw_stats", IEEE80211_PARAM_TXRX_FW_STATS, SET_PARAM, 1},
+ {"txrx_fw_mstats", IEEE80211_PARAM_TXRX_FW_MSTATS, SET_PARAM, 1},
+ {"nss", IEEE80211_PARAM_NSS, SET_PARAM, 1},
+ {"get_nss", IEEE80211_PARAM_NSS, GET_PARAM, 0},
+ {"ldpc", IEEE80211_PARAM_LDPC, SET_PARAM, 1},
+ {"get_ldpc", IEEE80211_PARAM_LDPC, GET_PARAM, 0},
+ {"tx_stbc", IEEE80211_PARAM_TX_STBC, SET_PARAM, 1},
+ {"get_tx_stbc", IEEE80211_PARAM_TX_STBC, GET_PARAM, 0},
+ {"rx_stbc", IEEE80211_PARAM_RX_STBC, SET_PARAM, 1},
+ {"get_rx_stbc", IEEE80211_PARAM_RX_STBC, GET_PARAM, 0},
+ {"aponly", IEEE80211_PARAM_APONLY, SET_PARAM, 1},
+ {"get_aponly", IEEE80211_PARAM_APONLY, GET_PARAM, 0},
+ {"txrx_fw_st_rst", IEEE80211_PARAM_TXRX_FW_STATS_RESET, SET_PARAM, 1},
+ {"tx_ppdu_log_cfg", IEEE80211_PARAM_TX_PPDU_LOG_CFG, SET_PARAM, 1},
+ {"opmode_notify", IEEE80211_PARAM_OPMODE_NOTIFY, SET_PARAM, 1},
+ {"g_opmod_notify", IEEE80211_PARAM_OPMODE_NOTIFY, GET_PARAM, 0},
+ {"nopbn", IEEE80211_PARAM_NOPBN, SET_PARAM, 1},
+ {"get_nopbn", IEEE80211_PARAM_NOPBN, GET_PARAM, 0},
+ {"set_cactimeout", IEEE80211_PARAM_DFS_CACTIMEOUT, SET_PARAM, 1},
+ {"get_cactimeout", IEEE80211_PARAM_DFS_CACTIMEOUT, GET_PARAM, 0},
+ {"enablertscts", IEEE80211_PARAM_ENABLE_RTSCTS, SET_PARAM, 1},
+ {"g_enablertscts", IEEE80211_PARAM_ENABLE_RTSCTS, GET_PARAM, 0},
+ {"bcast_rate", IEEE80211_PARAM_BCAST_RATE, SET_PARAM, 1},
+ {"get_bcast_rate", IEEE80211_PARAM_BCAST_RATE, GET_PARAM, 0},
+ {"get_parent", IEEE80211_PARAM_PARENT_IFINDEX, GET_PARAM, 0},
+ {"enable_ol_stats", IEEE80211_PARAM_ENABLE_OL_STATS, SET_PARAM, 1},
+#if WLAN_SUPPORT_GREEN_AP
+ {"gap_dbgprint", IEEE80211_IOCTL_GREEN_AP_ENABLE_PRINT, SET_PARAM, 1},
+ {"gap_g_dbgprint", IEEE80211_IOCTL_GREEN_AP_ENABLE_PRINT, GET_PARAM, 0},
+#endif
+ {"rc_retries", IEEE80211_PARAM_RC_NUM_RETRIES, SET_PARAM, 1},
+ {"get_rc_retries", IEEE80211_PARAM_RC_NUM_RETRIES, GET_PARAM, 0},
+ {"get_acs_state", IEEE80211_PARAM_GET_ACS, GET_PARAM, 0},
+ {"get_cac_state", IEEE80211_PARAM_GET_CAC, GET_PARAM, 0},
+ {"ext_ifu_acs", IEEE80211_PARAM_EXT_IFACEUP_ACS, SET_PARAM, 1},
+ {"get_ext_ifu_acs", IEEE80211_PARAM_EXT_IFACEUP_ACS, GET_PARAM, 0},
+ {"set_onetxchain", IEEE80211_PARAM_ONETXCHAIN, SET_PARAM, 1},
+ {"scanchevent", IEEE80211_PARAM_SCAN_CHAN_EVENT, SET_PARAM, 1},
+ {"get_scanchevent", IEEE80211_PARAM_SCAN_CHAN_EVENT, GET_PARAM, 0},
+ {"get_deschan", IEEE80211_PARAM_DESIRED_CHANNEL, GET_PARAM, 0},
+ {"get_desmode", IEEE80211_PARAM_DESIRED_PHYMODE, GET_PARAM, 0},
+ {"send_add_ies", IEEE80211_PARAM_SEND_ADDITIONAL_IES, SET_PARAM, 1},
+ {"g_send_add_ies", IEEE80211_PARAM_SEND_ADDITIONAL_IES, GET_PARAM, 0},
+ {"acsreport", IEEE80211_PARAM_START_ACS_REPORT, SET_PARAM, 1},
+ {"get_acsreport", IEEE80211_PARAM_START_ACS_REPORT, GET_PARAM, 0},
+ {"acsmindwell", IEEE80211_PARAM_MIN_DWELL_ACS_REPORT, SET_PARAM, 1},
+ {"get_acsmindwell", IEEE80211_PARAM_MIN_DWELL_ACS_REPORT, GET_PARAM, 0},
+ {"acsmaxdwell", IEEE80211_PARAM_MAX_DWELL_ACS_REPORT, SET_PARAM, 1},
+ {"get_acsmaxdwell", IEEE80211_PARAM_MAX_DWELL_ACS_REPORT, GET_PARAM, 0},
+ {"ch_long_dur", IEEE80211_PARAM_ACS_CH_HOP_LONG_DUR, SET_PARAM, 1},
+ {"get_ch_long_dur", IEEE80211_PARAM_ACS_CH_HOP_LONG_DUR, GET_PARAM, 0},
+ {"ch_nhop_dur", IEEE80211_PARAM_ACS_CH_HOP_NO_HOP_DUR, SET_PARAM, 1},
+ {"get_ch_nhop_dur", IEEE80211_PARAM_ACS_CH_HOP_NO_HOP_DUR, GET_PARAM, 0},
+ {"ch_cntwn_dur", IEEE80211_PARAM_ACS_CH_HOP_CNT_WIN_DUR, SET_PARAM, 1},
+ {"g_ch_cntwn_dur", IEEE80211_PARAM_ACS_CH_HOP_CNT_WIN_DUR, GET_PARAM, 0},
+ {"ch_noise_th", IEEE80211_PARAM_ACS_CH_HOP_NOISE_TH, SET_PARAM, 1},
+ {"get_ch_noise_th", IEEE80211_PARAM_ACS_CH_HOP_NOISE_TH, GET_PARAM, 0},
+ {"ch_cnt_th", IEEE80211_PARAM_ACS_CH_HOP_CNT_TH, SET_PARAM, 1},
+ {"get_ch_cnt_th", IEEE80211_PARAM_ACS_CH_HOP_CNT_TH, GET_PARAM, 0},
+ {"ch_hop_en", IEEE80211_PARAM_ACS_ENABLE_CH_HOP, SET_PARAM, 1},
+ {"get_ch_hop_en", IEEE80211_PARAM_ACS_ENABLE_CH_HOP, GET_PARAM, 0},
+ {"set_cabq_maxdur", IEEE80211_PARAM_SET_CABQ_MAXDUR, SET_PARAM, 1},
+ {"vht_11ng", IEEE80211_PARAM_256QAM_2G, SET_PARAM, 1},
+ {"get_vht_11ng", IEEE80211_PARAM_256QAM_2G, GET_PARAM, 0},
+ {"maxscanentry", IEEE80211_PARAM_MAX_SCANENTRY, SET_PARAM, 1},
+ {"g_maxscanentry", IEEE80211_PARAM_MAX_SCANENTRY, GET_PARAM, 0},
+ {"scanentryage", IEEE80211_PARAM_SCANENTRY_TIMEOUT, SET_PARAM, 1},
+ {"g_scanentryage", IEEE80211_PARAM_SCANENTRY_TIMEOUT, GET_PARAM, 0},
+#if UMAC_VOW_DEBUG
+ {"vow_dbg", IEEE80211_PARAM_VOW_DBG_ENABLE, SET_PARAM, 1},
+ {"get_vow_dbg", IEEE80211_PARAM_VOW_DBG_ENABLE, GET_PARAM, 0},
+#endif
+ {"scanmindwell", IEEE80211_PARAM_SCAN_MIN_DWELL, SET_PARAM, 1},
+ {"getscanmindwell", IEEE80211_PARAM_SCAN_MIN_DWELL, GET_PARAM, 0},
+ {"scanmaxdwell", IEEE80211_PARAM_SCAN_MAX_DWELL, SET_PARAM, 1},
+ {"getscanmaxdwell", IEEE80211_PARAM_SCAN_MAX_DWELL, GET_PARAM, 0},
+ {"vht_sgimask", IEEE80211_PARAM_VHT_SGIMASK, SET_PARAM, 1},
+ {"get_vht_sgimask", IEEE80211_PARAM_VHT_SGIMASK, GET_PARAM, 0},
+ {"vht80_rate", IEEE80211_PARAM_VHT80_RATEMASK, SET_PARAM, 1},
+ {"get_vht80_rate", IEEE80211_PARAM_VHT80_RATEMASK, GET_PARAM, 0},
+#if ATH_PERF_PWR_OFFLOAD
+ {"encap_type", IEEE80211_PARAM_VAP_TX_ENCAP_TYPE, SET_PARAM, 1},
+ {"get_encap_type", IEEE80211_PARAM_VAP_TX_ENCAP_TYPE, GET_PARAM, 0},
+ {"decap_type", IEEE80211_PARAM_VAP_RX_DECAP_TYPE, SET_PARAM, 1},
+ {"get_decap_type", IEEE80211_PARAM_VAP_RX_DECAP_TYPE, GET_PARAM, 0},
+#endif
+#if (HOST_SW_TSO_ENABLE || HOST_SW_TSO_SG_ENABLE)
+ {"get_tso_stats", IEEE80211_PARAM_TSO_STATS, GET_PARAM, 0},
+ {"rst_tso_stats", IEEE80211_PARAM_TSO_STATS_RESET, GET_PARAM, 0},
+#endif
+#if HOST_SW_LRO_ENABLE
+ {"get_lro_stats", IEEE80211_PARAM_LRO_STATS, GET_PARAM, 0},
+ {"rst_lro_stats", IEEE80211_PARAM_LRO_STATS_RESET, GET_PARAM, 0},
+#endif
+#if RX_CHECKSUM_OFFLOAD
+ {"get_csum_stats", IEEE80211_PARAM_RX_CKSUM_ERR_STATS, GET_PARAM, 0},
+ {"rst_csum_stats", IEEE80211_PARAM_RX_CKSUM_ERR_RESET, GET_PARAM, 0},
+#endif
+ {"vhtstscap", IEEE80211_PARAM_VHT_STS_CAP, SET_PARAM, 1},
+ {"get_vhtstscap", IEEE80211_PARAM_VHT_STS_CAP, GET_PARAM, 0},
+ {"vhtsounddim", IEEE80211_PARAM_VHT_SOUNDING_DIM, SET_PARAM, 1},
+ {"get_vhtsounddim", IEEE80211_PARAM_VHT_SOUNDING_DIM, GET_PARAM, 0},
+ {"vhtsubfee", IEEE80211_PARAM_VHT_MUBFEE, SET_PARAM, 1},
+ {"get_vhtsubfee", IEEE80211_PARAM_VHT_MUBFEE, GET_PARAM, 0},
+ {"vhtmubfee", IEEE80211_PARAM_VHT_MUBFEE, SET_PARAM, 1},
+ {"get_vhtmubfee", IEEE80211_PARAM_VHT_MUBFEE, GET_PARAM, 0},
+ {"vhtsubfer", IEEE80211_PARAM_VHT_SUBFER, SET_PARAM, 1},
+ {"get_vhtsubfer", IEEE80211_PARAM_VHT_SUBFER, GET_PARAM, 0},
+ {"vhtmubfer", IEEE80211_PARAM_VHT_MUBFER, SET_PARAM, 1},
+ {"get_vhtmubfer", IEEE80211_PARAM_VHT_MUBFER, GET_PARAM, 0},
+ {"implicitbf", IEEE80211_PARAM_IMPLICITBF, SET_PARAM, 1},
+ {"get_implicitbf", IEEE80211_PARAM_IMPLICITBF, GET_PARAM, 0},
+ {"sta_fixed_rate", IEEE80211_PARAM_STA_FIXED_RATE, SET_PARAM, 1},
+ {"11ngvhtintop", IEEE80211_PARAM_11NG_VHT_INTEROP, SET_PARAM, 1},
+ {"g_11ngvhtintop", IEEE80211_PARAM_11NG_VHT_INTEROP, GET_PARAM, 0},
+#if HOST_SW_SG_ENABLE
+ {"get_sg_stats", IEEE80211_PARAM_SG_STATS, GET_PARAM, 0},
+ {"rst_sg_stats", IEEE80211_PARAM_SG_STATS_RESET, GET_PARAM, 0},
+#endif
+ {"splitmac", IEEE80211_PARAM_SPLITMAC, SET_PARAM, 1},
+ {"get_splitmac", IEEE80211_PARAM_SPLITMAC, GET_PARAM, 0},
+#if ATH_PERF_PWR_OFFLOAD && QCA_SUPPORT_RAWMODE_PKT_SIMULATION
+ {"rawsim_txagr", IEEE80211_PARAM_RAWMODE_SIM_TXAGGR, SET_PARAM, 1},
+ {"g_rawsim_txagr", IEEE80211_PARAM_RAWMODE_SIM_TXAGGR, GET_PARAM, 0},
+ {"rawsim_stats", IEEE80211_PARAM_RAWMODE_PKT_SIM_STATS, GET_PARAM, 0},
+ {"clr_rawsim_stat", IEEE80211_PARAM_CLR_RAWMODE_PKT_SIM_STATS, SET_PARAM, 1},
+ {"rawsim_debug", IEEE80211_PARAM_RAWMODE_SIM_DEBUG, SET_PARAM, 1},
+ {"g_rawsim_debug", IEEE80211_PARAM_RAWMODE_SIM_DEBUG, GET_PARAM, 0},
+#endif
+ {"get_proxysta", IEEE80211_PARAM_PROXY_STA, GET_PARAM, 0},
+ {"bw_nss_rate", IEEE80211_PARAM_BW_NSS_RATEMASK, SET_PARAM, 1},
+ {"get_signal_dbm", IEEE80211_PARAM_RX_SIGNAL_DBM, GET_PARAM, 0},
+ {"vht_txmcsmap", IEEE80211_PARAM_VHT_TX_MCSMAP, SET_PARAM, 1},
+ {"g_vht_txmcsmap", IEEE80211_PARAM_VHT_TX_MCSMAP, GET_PARAM, 0},
+ {"vht_rxmcsmap", IEEE80211_PARAM_VHT_RX_MCSMAP, SET_PARAM, 1},
+ {"g_vht_rxmcsmap", IEEE80211_PARAM_VHT_RX_MCSMAP, GET_PARAM, 0},
+#if QCA_AIRTIME_FAIRNESS
+ {"commitatf", IEEE80211_PARAM_ATF_OPT, SET_PARAM, 1},
+ {"get_commitatf", IEEE80211_PARAM_ATF_OPT, GET_PARAM, 0},
+ {"perunit", IEEE80211_PARAM_ATF_PER_UNIT, SET_PARAM, 1},
+ {"get_perunit", IEEE80211_PARAM_ATF_PER_UNIT, GET_PARAM, 0},
+#endif
+ {"get_minpower", IEEE80211_PARAM_TX_MIN_POWER, GET_PARAM, 0},
+ {"get_maxpower", IEEE80211_PARAM_TX_MAX_POWER, GET_PARAM, 0},
+ {"novap_reset", IEEE80211_PARAM_NO_VAP_RESET, SET_PARAM, 1},
+ {"get_novap_reset", IEEE80211_PARAM_NO_VAP_RESET, GET_PARAM, 0},
+ {"get_sta_count", IEEE80211_PARAM_STA_COUNT, GET_PARAM, 0},
+#if QCA_SUPPORT_SSID_STEERING
+ {"ssid_config", IEEE80211_PARAM_VAP_SSID_CONFIG, SET_PARAM, 1},
+ {"get_ssid_config", IEEE80211_PARAM_VAP_SSID_CONFIG, GET_PARAM, 0},
+#endif
+#if ATH_SUPPORT_DSCP_OVERRIDE
+ {"set_dscp_ovride", IEEE80211_PARAM_DSCP_MAP_ID, SET_PARAM, 1},
+ {"get_dscp_ovride", IEEE80211_PARAM_DSCP_MAP_ID, GET_PARAM, 0},
+ {"s_dscp_tid_map", IEEE80211_PARAM_DSCP_TID_MAP, SET_PARAM, 2},
+ {"g_dscp_tid_map", IEEE80211_PARAM_DSCP_TID_MAP, GET_PARAM, 0},
+#endif
+ {"set_monrxfilter", IEEE80211_PARAM_RX_FILTER_MONITOR, SET_PARAM, 1},
+ {"get_monrxfilter", IEEE80211_PARAM_RX_FILTER_MONITOR, GET_PARAM, 0},
+ {"addlocalpeer", IEEE80211_PARAM_ADD_LOCAL_PEER, SET_PARAM, 2},
+ {"setmhdr", IEEE80211_PARAM_SET_MHDR, SET_PARAM, 1},
+ {"allowdata", IEEE80211_PARAM_ALLOW_DATA, SET_PARAM, 2},
+ {"meshdbg", IEEE80211_PARAM_SET_MESHDBG, SET_PARAM, 1},
+ {"enable_rtt", IEEE80211_PARAM_RTT_ENABLE, SET_PARAM, 1},
+ {"enable_lci", IEEE80211_PARAM_LCI_ENABLE, SET_PARAM, 1},
+ {"athnewind", IEEE80211_PARAM_VAP_ENHIND, SET_PARAM, 1},
+ {"get_athnewind", IEEE80211_PARAM_VAP_ENHIND, GET_PARAM, 0},
+ {"pause_scan", IEEE80211_PARAM_VAP_PAUSE_SCAN, SET_PARAM, 1},
+ {"get_pause_scan", IEEE80211_PARAM_VAP_PAUSE_SCAN, GET_PARAM, 0},
+ {"ext_acs_prg", IEEE80211_PARAM_EXT_ACS_IN_PROGRESS, SET_PARAM, 1},
+ {"get_ext_acs_prg", IEEE80211_PARAM_EXT_ACS_IN_PROGRESS, GET_PARAM, 0},
+ {"ampduden_ovrd", IEEE80211_PARAM_AMPDU_DENSITY_OVERRIDE, SET_PARAM, 1},
+ {"g_ampduden_ovrd", IEEE80211_PARAM_AMPDU_DENSITY_OVERRIDE, GET_PARAM, 0},
+ {"smesh_cfg", IEEE80211_PARAM_SMART_MESH_CONFIG, SET_PARAM, 1},
+ {"get_smesh_cfg", IEEE80211_PARAM_SMART_MESH_CONFIG, GET_PARAM, 0},
+ {"bcnbwnssmap", IEEE80211_DISABLE_BCN_BW_NSS_MAP, SET_PARAM, 1},
+ {"get_bcnbwnssmap", IEEE80211_DISABLE_BCN_BW_NSS_MAP, GET_PARAM, 0},
+ {"blbwnssmap", IEEE80211_DISABLE_STA_BWNSS_ADV, SET_PARAM, 1},
+ {"get_blbwnssmap", IEEE80211_DISABLE_STA_BWNSS_ADV, GET_PARAM, 0},
+ {"neighbourfilter", IEEE80211_PARAM_RX_FILTER_NEIGHBOUR_PEERS_MONITOR,
+ SET_PARAM, 1},
+#if ATH_DATA_RX_INFO_EN
+ {"get_whc_wds", IEEE80211_PARAM_RXINFO_PERPKT, GET_PARAM, 0},
+#endif
+ {"set_whc_dist", IEEE80211_PARAM_WHC_APINFO_ROOT_DIST, SET_PARAM, 1},
+ {"get_whc_dist", IEEE80211_PARAM_WHC_APINFO_ROOT_DIST, GET_PARAM, 0},
+ {"assocwar160", IEEE80211_PARAM_CONFIG_ASSOC_WAR_160W, SET_PARAM, 1},
+ {"get_assocwar160", IEEE80211_PARAM_CONFIG_ASSOC_WAR_160W, GET_PARAM, 0},
+#if QCA_AIRTIME_FAIRNESS
+ {"atf_max_buf", IEEE80211_PARAM_ATF_TXBUF_MAX, SET_PARAM, 1},
+ {"g_atf_max_buf", IEEE80211_PARAM_ATF_TXBUF_MAX, GET_PARAM, 0},
+ {"atf_min_buf", IEEE80211_PARAM_ATF_TXBUF_MIN, SET_PARAM, 1},
+ {"g_atf_min_buf", IEEE80211_PARAM_ATF_TXBUF_MIN, GET_PARAM, 0},
+ {"atf_shr_buf", IEEE80211_PARAM_ATF_TXBUF_SHARE, SET_PARAM, 1},
+ {"g_atf_shr_buf", IEEE80211_PARAM_ATF_TXBUF_SHARE, GET_PARAM, 0},
+ {"atfmaxclient", IEEE80211_PARAM_ATF_MAX_CLIENT, SET_PARAM, 1},
+ {"g_atfmaxclient", IEEE80211_PARAM_ATF_MAX_CLIENT, GET_PARAM, 0},
+ {"atfssidgroup", IEEE80211_PARAM_ATF_SSID_GROUP, SET_PARAM, 1},
+ {"g_atfssidgroup", IEEE80211_PARAM_ATF_SSID_GROUP, GET_PARAM, 0},
+#endif
+ {"bss_chan_info", IEEE80211_PARAM_BSS_CHAN_INFO, SET_PARAM, 1},
+ {"enable_lcr", IEEE80211_PARAM_LCR_ENABLE, SET_PARAM, 1},
+ {"get_whc_son", IEEE80211_PARAM_WHC_APINFO_SON, GET_PARAM, 0},
+ {"son", IEEE80211_PARAM_SON, SET_PARAM, 1},
+ {"get_son", IEEE80211_PARAM_SON, GET_PARAM, 0},
+ {"rmode_pktsim", IEEE80211_PARAM_RAWMODE_PKT_SIM, SET_PARAM, 1},
+ {"g_rmode_pktsim", IEEE80211_PARAM_RAWMODE_PKT_SIM, GET_PARAM, 0},
+ {"rawdwepind", IEEE80211_PARAM_CONFIG_RAW_DWEP_IND, SET_PARAM, 1},
+ {"get_rawdwepind", IEEE80211_PARAM_CONFIG_RAW_DWEP_IND, GET_PARAM, 0},
+#if UMAC_SUPPORT_ACFG
+ {"set_warn_thres", IEEE80211_PARAM_DIAG_WARN_THRESHOLD, SET_PARAM, 1},
+ {"get_warn_thres", IEEE80211_PARAM_DIAG_WARN_THRESHOLD, GET_PARAM, 0},
+ {"set_err_thres", IEEE80211_PARAM_DIAG_ERR_THRESHOLD, SET_PARAM, 1},
+ {"get_err_thres", IEEE80211_PARAM_DIAG_ERR_THRESHOLD, GET_PARAM, 0},
+#endif
+ {"txrx_vap_stats", IEEE80211_PARAM_TXRX_VAP_STATS, SET_PARAM, 1},
+ {"revsig160", IEEE80211_PARAM_CONFIG_REV_SIG_160W, SET_PARAM, 1},
+ {"get_revsig160", IEEE80211_PARAM_CONFIG_REV_SIG_160W, GET_PARAM, 0},
+ {"disable11nmcs", IEEE80211_PARAM_DISABLE_SELECTIVE_HTMCS_FOR_VAP,
+ SET_PARAM, 1},
+ {"g_disable11nmcs", IEEE80211_PARAM_DISABLE_SELECTIVE_HTMCS_FOR_VAP,
+ GET_PARAM, 0},
+ {"conf_11acmcs", IEEE80211_PARAM_CONFIGURE_SELECTIVE_VHTMCS_FOR_VAP,
+ SET_PARAM, 1},
+ {"g_conf_11acmcs", IEEE80211_PARAM_CONFIGURE_SELECTIVE_VHTMCS_FOR_VAP,
+ GET_PARAM, 0},
+ {"set_RDG_enable", IEEE80211_PARAM_RDG_ENABLE, SET_PARAM, 1},
+ {"get_RDG_enable", IEEE80211_PARAM_RDG_ENABLE, GET_PARAM, 0},
+ {"get_DFS_support", IEEE80211_PARAM_DFS_SUPPORT, GET_PARAM, 0},
+ {"get_DFS_enable", IEEE80211_PARAM_DFS_ENABLE, GET_PARAM, 0},
+ {"get_ACS_support", IEEE80211_PARAM_ACS_SUPPORT, GET_PARAM, 0},
+ {"get_SSID_status", IEEE80211_PARAM_SSID_STATUS, GET_PARAM, 0},
+ {"get_DL_prisup", IEEE80211_PARAM_DL_QUEUE_PRIORITY_SUPPORT, GET_PARAM, 0},
+ {"clear_mm_rssi", IEEE80211_PARAM_CLEAR_MIN_MAX_RSSI, GET_PARAM, 0},
+ {"clear_qos", IEEE80211_PARAM_CLEAR_QOS, SET_PARAM, 1},
+#if QCA_AIRTIME_FAIRNESS
+ {"atf_tput_at", IEEE80211_PARAM_ATF_OVERRIDE_AIRTIME_TPUT, SET_PARAM, 1},
+ {"g_atf_tput_at", IEEE80211_PARAM_ATF_OVERRIDE_AIRTIME_TPUT, GET_PARAM, 0},
+#endif
+#if MESH_MODE_SUPPORT
+ {"meshcap", IEEE80211_PARAM_MESH_CAPABILITIES, SET_PARAM, 1},
+ {"get_meshcap", IEEE80211_PARAM_MESH_CAPABILITIES, GET_PARAM, 0},
+#endif
+ {"acl_notify", IEEE80211_PARAM_CONFIG_ASSOC_DENIAL_NOTIFY, SET_PARAM, 1},
+ {"get_acl_notify", IEEE80211_PARAM_CONFIG_ASSOC_DENIAL_NOTIFY, GET_PARAM, 0},
+ {"vap_txrx_stats", IEEE80211_PARAM_VAP_TXRX_FW_STATS, SET_PARAM, 1},
+ {"vap_txrx_st_rst", IEEE80211_PARAM_VAP_TXRX_FW_STATS_RESET, SET_PARAM, 1},
+ {"mu_blklist_cnt", IEEE80211_PARAM_PEER_TX_MU_BLACKLIST_COUNT, SET_PARAM, 1},
+ {"get_mu_tx_count", IEEE80211_PARAM_PEER_TX_COUNT, GET_PARAM, 0},
+ {"rst_mu_tx_count", IEEE80211_PARAM_PEER_MUMIMO_TX_COUNT_RESET, SET_PARAM, 1},
+ {"get_mu_peer_pos", IEEE80211_PARAM_PEER_POSITION, SET_PARAM, 1},
+#if QCA_AIRTIME_FAIRNESS
+ {"atfssidsched", IEEE80211_PARAM_ATF_SSID_SCHED_POLICY, SET_PARAM, 1},
+ {"g_atfssidsched", IEEE80211_PARAM_ATF_SSID_SCHED_POLICY, GET_PARAM, 0},
+#endif
+#if MESH_MODE_SUPPORT
+ {"conf_meshtx", IEEE80211_PARAM_CONFIG_MGMT_TX_FOR_MESH, SET_PARAM, 1},
+ {"g_conf_meshtx", IEEE80211_PARAM_CONFIG_MGMT_TX_FOR_MESH, GET_PARAM, 0},
+ {"mesh_rxfilter", IEEE80211_PARAM_CONFIG_RX_MESH_FILTER, SET_PARAM, 1},
+#endif
+ {"set_traf_stat", IEEE80211_PARAM_TRAFFIC_STATS, SET_PARAM, 1},
+ {"set_traf_rate", IEEE80211_PARAM_TRAFFIC_RATE, SET_PARAM, 1},
+ {"set_traf_int", IEEE80211_PARAM_TRAFFIC_INTERVAL, SET_PARAM, 1},
+ {"set_waterm_th", IEEE80211_PARAM_WATERMARK_THRESHOLD, SET_PARAM, 1},
+ {"get_waterm_th", IEEE80211_PARAM_WATERMARK_THRESHOLD, GET_PARAM, 0},
+ {"get_th_reach", IEEE80211_PARAM_WATERMARK_REACHED, GET_PARAM, 0},
+ {"get_assoc_reach", IEEE80211_PARAM_ASSOC_REACHED, GET_PARAM, 0},
+ {"dis_legacy",
+ IEEE80211_PARAM_DISABLE_SELECTIVE_LEGACY_RATE_FOR_VAP, SET_PARAM, 1},
+ {"g_dis_legacy",
+ IEEE80211_PARAM_DISABLE_SELECTIVE_LEGACY_RATE_FOR_VAP, GET_PARAM, 0},
+ {"rept_spl", IEEE80211_PARAM_REPT_MULTI_SPECIAL, SET_PARAM, 1},
+ {"g_rept_spl", IEEE80211_PARAM_REPT_MULTI_SPECIAL, GET_PARAM, 0},
+ {"vie_ena", IEEE80211_PARAM_ENABLE_VENDOR_IE, SET_PARAM, 1},
+ {"g_vie_ena", IEEE80211_PARAM_ENABLE_VENDOR_IE, GET_PARAM, 0},
+ {"set_whc_sfactor", IEEE80211_PARAM_WHC_APINFO_SFACTOR, SET_PARAM, 1},
+ {"get_whc_sfactor", IEEE80211_PARAM_WHC_APINFO_SFACTOR, GET_PARAM, 0},
+ {"get_whc_bssid", IEEE80211_PARAM_WHC_APINFO_BSSID, GET_PARAM, 0},
+ {"get_whc_rate", IEEE80211_PARAM_WHC_APINFO_RATE, GET_PARAM, 0},
+ {"mon_decoder", IEEE80211_PARAM_CONFIG_MON_DECODER, SET_PARAM, 1},
+ {"g_mon_decoder", IEEE80211_PARAM_CONFIG_MON_DECODER, GET_PARAM, 0},
+ {"mudeasoc", IEEE80211_PARAM_CONFIG_MU_CAP_TIMER, SET_PARAM, 1},
+ {"get_mudeasoc", IEEE80211_PARAM_CONFIG_MU_CAP_TIMER, GET_PARAM, 0},
+ {"mucapwar", IEEE80211_PARAM_CONFIG_MU_CAP_WAR, SET_PARAM, 1},
+ {"get_mucapwar", IEEE80211_PARAM_CONFIG_MU_CAP_WAR, GET_PARAM, 0},
+ {"nstswar", IEEE80211_PARAM_CONFIG_NSTSCAP_WAR, SET_PARAM, 1},
+ {"get_nstswar", IEEE80211_PARAM_CONFIG_NSTSCAP_WAR, GET_PARAM, 0},
+ {"g_whc_cap_bssid", IEEE80211_PARAM_WHC_APINFO_CAP_BSSID, GET_PARAM, 0},
+ {"set_bcn_rate", IEEE80211_PARAM_BEACON_RATE_FOR_VAP, SET_PARAM, 1},
+ {"get_bcn_rate", IEEE80211_PARAM_BEACON_RATE_FOR_VAP, GET_PARAM, 0},
+ {"csmode", IEEE80211_PARAM_CHANNEL_SWITCH_MODE, SET_PARAM, 1},
+ {"g_csmode", IEEE80211_PARAM_CHANNEL_SWITCH_MODE, GET_PARAM, 0},
+ {"enable_ecsa", IEEE80211_PARAM_ENABLE_ECSA_IE, SET_PARAM, 1},
+ {"g_enable_ecsa", IEEE80211_PARAM_ENABLE_ECSA_IE, GET_PARAM, 0},
+ {"ecsa_opclass", IEEE80211_PARAM_ECSA_OPCLASS, SET_PARAM, 1},
+ {"g_ecsa_opclass", IEEE80211_PARAM_ECSA_OPCLASS, GET_PARAM, 0},
+#if DYNAMIC_BEACON_SUPPORT
+ {"dynamicbeacon", IEEE80211_PARAM_DBEACON_EN, SET_PARAM, 1},
+ {"g_dynamicbeacon", IEEE80211_PARAM_DBEACON_EN, GET_PARAM, 0},
+ {"db_rssi_thr", IEEE80211_PARAM_DBEACON_RSSI_THR, SET_PARAM, 1},
+ {"g_db_rssi_thr", IEEE80211_PARAM_DBEACON_RSSI_THR, GET_PARAM, 0},
+ {"db_timeout", IEEE80211_PARAM_DBEACON_TIMEOUT, SET_PARAM, 1},
+ {"g_db_timeout", IEEE80211_PARAM_DBEACON_TIMEOUT, GET_PARAM, 0},
+#endif
+ {"s_txpow_mgmt", IEEE80211_PARAM_TXPOW_MGMT, SET_PARAM, 2},
+ {"g_txpow_mgmt", IEEE80211_PARAM_TXPOW_MGMT, GET_PARAM, 0},
+ {"tx_capture", IEEE80211_PARAM_CONFIG_TX_CAPTURE, SET_PARAM, 1},
+ {"g_tx_capture", IEEE80211_PARAM_CONFIG_TX_CAPTURE, GET_PARAM, 0},
+ {"backhaul", IEEE80211_PARAM_BACKHAUL, SET_PARAM, 1},
+ {"get_backhaul", IEEE80211_PARAM_BACKHAUL, GET_PARAM, 0},
+ {"set_mesh_mcast", IEEE80211_PARAM_MESH_MCAST, SET_PARAM, 1},
+ {"get_mesh_mcast", IEEE80211_PARAM_MESH_MCAST, GET_PARAM, 0},
+ {"he_mcs", IEEE80211_PARAM_HE_MCS, SET_PARAM, 1},
+ {"get_he_mcs", IEEE80211_PARAM_HE_MCS, GET_PARAM, 0},
+ {"he_extrange", IEEE80211_PARAM_HE_EXTENDED_RANGE, SET_PARAM, 1},
+ {"get_he_extrange", IEEE80211_PARAM_HE_EXTENDED_RANGE, GET_PARAM, 0},
+ {"he_dcm", IEEE80211_PARAM_HE_DCM, SET_PARAM, 1},
+ {"get_he_dcm", IEEE80211_PARAM_HE_DCM, GET_PARAM, 0},
+ {"he_mu_edca", IEEE80211_PARAM_HE_MU_EDCA, SET_PARAM, 1},
+ {"get_he_mu_edca", IEEE80211_PARAM_HE_MU_EDCA, GET_PARAM, 0},
+ {"he_frag", IEEE80211_PARAM_HE_FRAGMENTATION, SET_PARAM, 1},
+ {"get_he_frag", IEEE80211_PARAM_HE_FRAGMENTATION, GET_PARAM, 0},
+ {"he_dl_ofdma", IEEE80211_PARAM_HE_DL_MU_OFDMA, SET_PARAM, 1},
+ {"get_he_dl_ofdma", IEEE80211_PARAM_HE_DL_MU_OFDMA, GET_PARAM, 0},
+ {"he_ul_mimo", IEEE80211_PARAM_HE_UL_MU_MIMO, SET_PARAM, 1},
+ {"get_he_ul_mimo", IEEE80211_PARAM_HE_UL_MU_MIMO, GET_PARAM, 0},
+ {"he_ul_ofdma", IEEE80211_PARAM_HE_UL_MU_OFDMA, SET_PARAM, 1},
+ {"get_he_ul_ofdma", IEEE80211_PARAM_HE_UL_MU_OFDMA, GET_PARAM, 0},
+ {"qwrap_hk_war", 520, SET_PARAM, 1},
+ {"get_qwrap_hk_war", 520, GET_PARAM, 0},
+ {"qdf_cv_lvl", IEEE80211_PARAM_CONFIG_CATEGORY_VERBOSE, SET_PARAM, 1},
+ {"g_qdf_cv_lvl", IEEE80211_PARAM_CONFIG_CATEGORY_VERBOSE, GET_PARAM, 0},
+ {"txrx_stats", IEEE80211_PARAM_TXRX_DP_STATS, SET_PARAM, 1},
+ {"caprssi", IEEE80211_PARAM_WHC_CAP_RSSI, SET_PARAM, 1},
+ {"g_caprssi", IEEE80211_PARAM_WHC_CAP_RSSI, GET_PARAM, 0},
+ {"g_curr_caprssi", IEEE80211_PARAM_WHC_CURRENT_CAP_RSSI, GET_PARAM, 0},
+ {"g_best_ob_bssid",
+ IEEE80211_PARAM_WHC_APINFO_BEST_UPLINK_OTHERBAND_BSSID, GET_PARAM, 0},
+ {"g_whc_ob_bssid", IEEE80211_PARAM_WHC_APINFO_OTHERBAND_UPLINK_BSSID,
+ GET_PARAM, 0},
+ {"otherband_bssid", IEEE80211_PARAM_WHC_APINFO_OTHERBAND_BSSID, SET_PARAM, 2},
+ {"set_whc_ul_rate", IEEE80211_PARAM_WHC_APINFO_UPLINK_RATE, SET_PARAM, 1},
+ {"get_whc_ul_rate", IEEE80211_PARAM_WHC_APINFO_UPLINK_RATE, GET_PARAM, 0},
+ {"he_subfee", IEEE80211_PARAM_HE_SU_BFEE, SET_PARAM, 1},
+ {"get_he_subfee", IEEE80211_PARAM_HE_SU_BFEE, GET_PARAM, 0},
+ {"he_subfer", IEEE80211_PARAM_HE_SU_BFER, SET_PARAM, 1},
+ {"get_he_subfer", IEEE80211_PARAM_HE_SU_BFER, GET_PARAM, 0},
+ {"he_mubfee", IEEE80211_PARAM_HE_MU_BFEE, SET_PARAM, 1},
+ {"get_he_mubfee", IEEE80211_PARAM_HE_MU_BFEE, GET_PARAM, 0},
+ {"he_mubfer", IEEE80211_PARAM_HE_MU_BFER, SET_PARAM, 1},
+ {"get_he_mubfer", IEEE80211_PARAM_HE_MU_BFER, GET_PARAM, 0},
+ {"ext_nss_sup", IEEE80211_PARAM_EXT_NSS_SUPPORT, SET_PARAM, 1},
+ {"g_ext_nss_sup", IEEE80211_PARAM_EXT_NSS_SUPPORT, GET_PARAM, 0},
+ {"set_qosacn_conf", IEEE80211_PARAM_QOS_ACTION_FRAME_CONFIG, SET_PARAM, 1},
+ {"get_qosacn_conf", IEEE80211_PARAM_QOS_ACTION_FRAME_CONFIG, GET_PARAM, 0},
+ {"he_ltf", IEEE80211_PARAM_HE_LTF, SET_PARAM, 1},
+ {"get_he_ltf", IEEE80211_PARAM_HE_LTF, SET_PARAM, 1},
+ {"dfs_notify", IEEE80211_PARAM_DFS_INFO_NOTIFY_APP, SET_PARAM, 1},
+ {"g_dfs_notify", IEEE80211_PARAM_DFS_INFO_NOTIFY_APP, GET_PARAM, 0},
+ {"nssol_inspect", IEEE80211_PARAM_NSSOL_VAP_INSPECT_MODE, SET_PARAM, 1},
+ {"he_rtsthrshld", IEEE80211_PARAM_HE_RTSTHRSHLD, SET_PARAM, 1},
+ {"get_he_rtsthrshld", IEEE80211_PARAM_HE_RTSTHRSHLD, GET_PARAM, 0},
+ {"ratedrop", IEEE80211_PARAM_RATE_DROPDOWN, SET_PARAM, 1},
+ {"get_ratedrop", IEEE80211_PARAM_RATE_DROPDOWN, GET_PARAM, 0},
+ {"disable_cabq", IEEE80211_PARAM_DISABLE_CABQ, SET_PARAM, 1},
+ {"g_disable_cabq", IEEE80211_PARAM_DISABLE_CABQ, GET_PARAM, 0},
+ {"csl", IEEE80211_PARAM_CSL_SUPPORT, SET_PARAM, 1},
+ {"g_csl", IEEE80211_PARAM_CSL_SUPPORT, GET_PARAM, 0},
+ {"timeoutie", IEEE80211_PARAM_TIMEOUTIE, SET_PARAM, 1},
+ {"g_timeoutie", IEEE80211_PARAM_TIMEOUTIE, GET_PARAM, 0},
+ {"pmf_assoc", IEEE80211_PARAM_PMF_ASSOC, SET_PARAM, 1},
+ {"g_pmf_assoc", IEEE80211_PARAM_PMF_ASSOC, GET_PARAM, 0},
+ {"enable_fils", IEEE80211_PARAM_ENABLE_FILS, SET_PARAM, 2},
+ {"g_enable_fils", IEEE80211_PARAM_ENABLE_FILS, GET_PARAM, 0},
+#if ATH_ACS_DEBUG_SUPPORT
+ {"acs_debug_enable", IEEE80211_PARAM_ACS_DEBUG_SUPPORT, SET_PARAM, 1},
+#endif
+#if ATH_ACL_SOFTBLOCKING
+ {"softblock_wait", IEEE80211_PARAM_SOFTBLOCK_WAIT_TIME, SET_PARAM, 1},
+ {"g_sftblk_wait", IEEE80211_PARAM_SOFTBLOCK_WAIT_TIME, GET_PARAM, 0},
+ {"softblock_allow", IEEE80211_PARAM_SOFTBLOCK_ALLOW_TIME, SET_PARAM, 1},
+ {"g_sftblk_allow", IEEE80211_PARAM_SOFTBLOCK_ALLOW_TIME, GET_PARAM, 0},
+#endif
+ {"nrshareflag", IEEE80211_PARAM_NR_SHARE_RADIO_FLAG, SET_PARAM, 1},
+ {"get_nrshareflag", IEEE80211_PARAM_NR_SHARE_RADIO_FLAG, GET_PARAM, 0},
+#if QCN_IE
+ {"set_bpr_delay", IEEE80211_PARAM_BCAST_PROBE_RESPONSE_DELAY, SET_PARAM, 1},
+ {"get_bpr_delay", IEEE80211_PARAM_BCAST_PROBE_RESPONSE_DELAY, GET_PARAM, 0},
+ {"set_bpr_latency",
+ IEEE80211_PARAM_BCAST_PROBE_RESPONSE_LATENCY_COMPENSATION, SET_PARAM, 1},
+ {"get_bpr_latency",
+ IEEE80211_PARAM_BCAST_PROBE_RESPONSE_LATENCY_COMPENSATION, GET_PARAM, 0},
+ {"get_bpr_stats", IEEE80211_PARAM_BCAST_PROBE_RESPONSE_STATS, GET_PARAM, 0},
+ {"set_bpr_enable", IEEE80211_PARAM_BCAST_PROBE_RESPONSE_ENABLE, SET_PARAM, 1},
+ {"get_bpr_enable", IEEE80211_PARAM_BCAST_PROBE_RESPONSE_ENABLE, GET_PARAM, 0},
+ {"clr_bpr_stats", IEEE80211_PARAM_BCAST_PROBE_RESPONSE_STATS_CLEAR,
+ GET_PARAM, 0},
+ {"set_bcn_latency", IEEE80211_PARAM_BEACON_LATENCY_COMPENSATION, SET_PARAM, 1},
+ {"get_bcn_latency", IEEE80211_PARAM_BEACON_LATENCY_COMPENSATION, GET_PARAM, 0},
+#endif
+ {"enable_11v_dms", IEEE80211_PARAM_DMS_AMSDU_WAR, SET_PARAM, 1},
+ {"g_enable_11v_dms", IEEE80211_PARAM_DMS_AMSDU_WAR, GET_PARAM, 0},
+ {"s_txpow", IEEE80211_PARAM_TXPOW, SET_PARAM, 2},
+ {"g_txpow", IEEE80211_PARAM_TXPOW, GET_PARAM, 0},
+ {"ul_hyst", IEEE80211_PARAM_BEST_UL_HYST, SET_PARAM, 1},
+ {"g_ul_hyst", IEEE80211_PARAM_BEST_UL_HYST, GET_PARAM, 0},
+ {"he_txmcsmap", IEEE80211_PARAM_HE_TX_MCSMAP, SET_PARAM, 1},
+ {"get_he_txmcsmap", IEEE80211_PARAM_HE_TX_MCSMAP, GET_PARAM, 0},
+ {"he_rxmcsmap", IEEE80211_PARAM_HE_RX_MCSMAP, SET_PARAM, 1},
+ {"get_he_rxmcsmap", IEEE80211_PARAM_HE_RX_MCSMAP, GET_PARAM, 0},
+ {"m_copy", IEEE80211_PARAM_CONFIG_M_COPY, SET_PARAM, 1},
+ {"get_m_copy", IEEE80211_PARAM_CONFIG_M_COPY, GET_PARAM, 0},
+ {"ba_bufsize", IEEE80211_PARAM_BA_BUFFER_SIZE, SET_PARAM, 1},
+ {"get_ba_bufsize", IEEE80211_PARAM_BA_BUFFER_SIZE, GET_PARAM, 0},
+ {"he_ar_gi_ltf", IEEE80211_PARAM_HE_AR_GI_LTF, SET_PARAM, 1},
+ {"get_he_ar_gi_ltf", IEEE80211_PARAM_HE_AR_GI_LTF, GET_PARAM, 0},
+ {"nss_rdprehdr", IEEE80211_PARAM_NSSOL_VAP_READ_RXPREHDR, SET_PARAM, 1},
+ {"g_nss_rdprehdr", IEEE80211_PARAM_NSSOL_VAP_READ_RXPREHDR, GET_PARAM, 0},
+ {"he_sounding_mode", IEEE80211_PARAM_HE_SOUNDING_MODE, SET_PARAM, 1},
+ {"get_he_sounding_mode", IEEE80211_PARAM_HE_SOUNDING_MODE, GET_PARAM, 0},
+ {"rsn_override", IEEE80211_PARAM_RSN_OVERRIDE, SET_PARAM, 1},
+ {"g_rsn_override", IEEE80211_PARAM_RSN_OVERRIDE, GET_PARAM, 0},
+ {"map", IEEE80211_PARAM_MAP, SET_PARAM, 1},
+ {"get_map", IEEE80211_PARAM_MAP, GET_PARAM, 0},
+ {"MapBSSType", IEEE80211_PARAM_MAP_BSS_TYPE, SET_PARAM, 1},
+ {"get_MapBSSType", IEEE80211_PARAM_MAP_BSS_TYPE, GET_PARAM, 0},
+ {"he_ht_ctrl", IEEE80211_PARAM_HE_HT_CTRL, SET_PARAM, 1},
+ {"get_he_ht_ctrl", IEEE80211_PARAM_HE_HT_CTRL, GET_PARAM, 0},
+ {"acsmaxscantime", IEEE80211_PARAM_MAX_SCAN_TIME_ACS_REPORT, SET_PARAM, 1},
+ {"g_acsmaxscan_t", IEEE80211_PARAM_MAX_SCAN_TIME_ACS_REPORT, GET_PARAM, 0},
+ {"mapset_vapup", IEEE80211_PARAM_MAP_VAP_BEACONING, SET_PARAM, 1},
+ {"mapget_vapup", IEEE80211_PARAM_MAP_VAP_BEACONING, GET_PARAM, 0},
+#if UMAC_SUPPORT_XBSSLOAD
+ {"xbssload", IEEE80211_PARAM_XBSS_LOAD, SET_PARAM, 1},
+ {"get_xbssload", IEEE80211_PARAM_XBSS_LOAD, GET_PARAM, 0},
+#endif
+ {"sifs_tr_rate", IEEE80211_PARAM_SIFS_TRIGGER_RATE, SET_PARAM, 1},
+ {"g_sifs_tr_rate", IEEE80211_PARAM_SIFS_TRIGGER_RATE, GET_PARAM, 0},
+ {"log_flush_timer_period", IEEE80211_PARAM_LOG_FLUSH_TIMER_PERIOD,
+ SET_PARAM, 1},
+ {"log_flush_one_time", IEEE80211_PARAM_LOG_FLUSH_ONE_TIME, SET_PARAM, 1},
+ {"log_dump_at_kernel_enable", IEEE80211_PARAM_LOG_DUMP_AT_KERNEL_ENABLE,
+ SET_PARAM, 1},
+ {"bsteerrssi_log", IEEE80211_PARAM_LOG_ENABLE_BSTEERING_RSSI, SET_PARAM, 1},
+ {"ft", IEEE80211_PARAM_FT_ENABLE, SET_PARAM, 1},
+ {"g_ft", IEEE80211_PARAM_FT_ENABLE, GET_PARAM, 0},
+ {"bcn_stats_clr", IEEE80211_PARAM_BCN_STATS_RESET, SET_PARAM, 1},
+ {"sifs_trigger", IEEE80211_PARAM_SIFS_TRIGGER, SET_PARAM, 1},
+ {"g_sifs_trigger", IEEE80211_PARAM_SIFS_TRIGGER, GET_PARAM, 0},
+#if QCA_SUPPORT_SON
+ {"son_event_bcast", IEEE80211_PARAM_SON_EVENT_BCAST, SET_PARAM, 1},
+ {"g_son_event_bcast", IEEE80211_PARAM_SON_EVENT_BCAST, GET_PARAM, 0},
+#endif
+ {"he_ul_shortgi", IEEE80211_PARAM_HE_UL_SHORTGI, SET_PARAM, 1},
+ {"get_he_ul_shortgi", IEEE80211_PARAM_HE_UL_SHORTGI, GET_PARAM, 0},
+ {"he_ul_ltf", IEEE80211_PARAM_HE_UL_LTF, SET_PARAM, 1},
+ {"get_he_ul_ltf", IEEE80211_PARAM_HE_UL_LTF, GET_PARAM, 0},
+ {"he_ul_nss", IEEE80211_PARAM_HE_UL_NSS, SET_PARAM, 1},
+ {"get_he_ul_nss", IEEE80211_PARAM_HE_UL_NSS, GET_PARAM, 0},
+ {"he_ul_ppdu_bw", IEEE80211_PARAM_HE_UL_PPDU_BW, SET_PARAM, 1},
+ {"get_he_ul_ppdu_bw", IEEE80211_PARAM_HE_UL_PPDU_BW, GET_PARAM, 0},
+ {"he_ul_ldpc", IEEE80211_PARAM_HE_UL_LDPC, SET_PARAM, 1},
+ {"get_he_ul_ldpc", IEEE80211_PARAM_HE_UL_LDPC, GET_PARAM, 0},
+ {"he_ul_stbc", IEEE80211_PARAM_HE_UL_STBC, SET_PARAM, 1},
+ {"get_he_ul_stbc", IEEE80211_PARAM_HE_UL_STBC, SET_PARAM, 1},
+ {"he_ul_mcs", IEEE80211_PARAM_HE_UL_FIXED_RATE, SET_PARAM, 1},
+ {"get_he_ul_mcs", IEEE80211_PARAM_HE_UL_FIXED_RATE, GET_PARAM, 0},
+#if WLAN_SER_DEBUG
+ {"ser_history", IEEE80211_PARAM_WLAN_SER_HISTORY, GET_PARAM, 2},
+#endif
+ {"da_wds_war", IEEE80211_PARAM_DA_WAR_ENABLE, SET_PARAM, 1},
+ {"g_da_wds_war", IEEE80211_PARAM_DA_WAR_ENABLE, GET_PARAM, 0},
+ {"advertise_sta_maxcap", IEEE80211_PARAM_STA_MAX_CH_CAP, SET_PARAM, 1},
+ {"g_advertise_sta_maxcap", IEEE80211_PARAM_STA_MAX_CH_CAP, GET_PARAM, 0},
+ {"rawmode_open_war", IEEE80211_PARAM_RAWMODE_OPEN_WAR, SET_PARAM, 1},
+ {"g_rawmode_open_war", IEEE80211_PARAM_RAWMODE_OPEN_WAR, GET_PARAM, 0},
+ {"set_skip_hyst", IEEE80211_PARAM_WHC_SKIP_HYST, SET_PARAM, 1},
+ {"get_skip_hyst", IEEE80211_PARAM_WHC_SKIP_HYST, GET_PARAM, 0},
+ {"whc_mixedbh_ul", IEEE80211_PARAM_WHC_MIXEDBH_ULRATE, SET_PARAM, 1},
+ {"g_whc_mixedbh_ul", IEEE80211_PARAM_WHC_MIXEDBH_ULRATE, GET_PARAM, 0},
+ {"whc_mixedbh_bh_type", IEEE80211_PARAM_WHC_BACKHAUL_TYPE, SET_PARAM, 1},
+ {"he_bsr_supp", IEEE80211_PARAM_HE_BSR_SUPPORT, SET_PARAM, 1},
+ {"get_he_bsr_supp", IEEE80211_PARAM_HE_BSR_SUPPORT, GET_PARAM, 0},
+ {"display_me_info", IEEE80211_PARAM_DUMP_RA_TABLE, SET_PARAM, 1},
+ {"set_obss_ru_tolerance_time", IEEE80211_PARAM_OBSS_NB_RU_TOLERANCE_TIME,
+ SET_PARAM, 1},
+ {"get_obss_ru_tolerance_time", IEEE80211_PARAM_OBSS_NB_RU_TOLERANCE_TIME,
+ GET_PARAM, 0},
+ {"suniformrssi", IEEE80211_PARAM_UNIFORM_RSSI, SET_PARAM, 1},
+ {"guniformrssi", IEEE80211_PARAM_UNIFORM_RSSI, GET_PARAM, 0},
+ {"scsainteropphy", IEEE80211_PARAM_CSA_INTEROP_PHY, SET_PARAM, 1},
+ {"gcsainteropphy", IEEE80211_PARAM_CSA_INTEROP_PHY, GET_PARAM, 0},
+ {"scsainteropbss", IEEE80211_PARAM_CSA_INTEROP_BSS, SET_PARAM, 1},
+ {"gscsainteropbss", IEEE80211_PARAM_CSA_INTEROP_BSS, GET_PARAM, 0},
+ {"scsainteropauth", IEEE80211_PARAM_CSA_INTEROP_AUTH, SET_PARAM, 1},
+ {"gscsainteropauth", IEEE80211_PARAM_CSA_INTEROP_AUTH, GET_PARAM, 0},
+ {"he_amsdu_in_ampdu_supp", IEEE80211_PARAM_HE_AMSDU_IN_AMPDU_SUPRT,
+ SET_PARAM, 1},
+ {"get_he_amsdu_in_ampdu_supp", IEEE80211_PARAM_HE_AMSDU_IN_AMPDU_SUPRT,
+ GET_PARAM, 0},
+ {"he_bfee_sts_supp", IEEE80211_PARAM_HE_SUBFEE_STS_SUPRT, SET_PARAM, 2},
+ {"get_he_bfee_sts_supp", IEEE80211_PARAM_HE_SUBFEE_STS_SUPRT, GET_PARAM, 0},
+ {"he_4xltf_800nsgi_rx", IEEE80211_PARAM_HE_4XLTF_800NS_GI_RX_SUPRT,
+ SET_PARAM, 1},
+ {"get_he_4xltf_800nsgi_rx", IEEE80211_PARAM_HE_4XLTF_800NS_GI_RX_SUPRT,
+ GET_PARAM, 0},
+ {"he_1xltf_800nsgi_rx", IEEE80211_PARAM_HE_1XLTF_800NS_GI_RX_SUPRT,
+ SET_PARAM, 1},
+ {"get_he_1xltf_800nsgi_rx", IEEE80211_PARAM_HE_1XLTF_800NS_GI_RX_SUPRT,
+ GET_PARAM, 0},
+ {"he_max_nc", IEEE80211_PARAM_HE_MAX_NC_SUPRT, SET_PARAM, 1},
+ {"get_he_max_nc", IEEE80211_PARAM_HE_MAX_NC_SUPRT, GET_PARAM, 0},
+ {"twt_responder", IEEE80211_PARAM_TWT_RESPONDER_SUPRT, SET_PARAM, 1},
+ {"get_twt_responder", IEEE80211_PARAM_TWT_RESPONDER_SUPRT, GET_PARAM, 0},
+ {"tx_lat_capture", IEEE80211_PARAM_CONFIG_CAPTURE_LATENCY_ENABLE,
+ SET_PARAM, 1},
+ {"g_tx_lat_cptr", IEEE80211_PARAM_CONFIG_CAPTURE_LATENCY_ENABLE,
+ SET_PARAM, 1},
+ {"get_ru26_tolerance", IEEE80211_PARAM_GET_RU26_TOLERANCE, GET_PARAM, 0},
+ {"get_whc_ul_snr", IEEE80211_PARAM_WHC_APINFO_UPLINK_SNR, GET_PARAM, 0},
+ {"set_dpp_mode", IEEE80211_PARAM_DPP_VAP_MODE, SET_PARAM, 1},
+ {"get_dpp_mode", IEEE80211_PARAM_DPP_VAP_MODE, GET_PARAM, 0},
+#if SM_ENG_HIST_ENABLE
+ {"sm_history", IEEE80211_PARAM_SM_HISTORY, GET_PARAM, 0},
+#endif
+ {"s_scan_flush", 646, SET_PARAM, 1},
+ {"rx_amsdu_ptid", IEEE80211_PARAM_RX_AMSDU, SET_PARAM, 2},
+ {"get_rx_amsdu", IEEE80211_PARAM_RX_AMSDU, GET_PARAM, 0},
+ {"set_mtu_size", IEEE80211_PARAM_MAX_MTU_SIZE, SET_PARAM, 1},
+ {"get_mtu_size", IEEE80211_PARAM_MAX_MTU_SIZE, GET_PARAM, 0},
+ {"bcast_prbrsp_en", IEEE80211_PARAM_HE_6GHZ_BCAST_PROB_RSP, SET_PARAM, 2},
+ {"get_bcast_prbrsp_en", IEEE80211_PARAM_HE_6GHZ_BCAST_PROB_RSP, GET_PARAM, 0},
+ {"vht_mcs_10_11_supp", IEEE80211_PARAM_VHT_MCS_10_11_SUPP, SET_PARAM, 1},
+ {"get_vht_mcs_10_11_supp", IEEE80211_PARAM_VHT_MCS_10_11_SUPP, GET_PARAM, 0},
+ {"vht_mcs_10_11_nq2q_peer_supp",
+ IEEE80211_PARAM_VHT_MCS_10_11_NQ2Q_PEER_SUPP, SET_PARAM, 1},
+ {"get_vht_mcs_10_11_nq2q_peer_supp",
+ IEEE80211_PARAM_VHT_MCS_10_11_NQ2Q_PEER_SUPP, GET_PARAM, 0},
+ {"en_sae_pwid", IEEE80211_PARAM_SAE_PWID, SET_PARAM, 1},
+ {"g_en_sae_pwid", IEEE80211_PARAM_SAE_PWID, GET_PARAM, 0},
+ {"mcast_rc_stale_period", IEEE80211_PARAM_MCAST_RC_STALE_PERIOD, SET_PARAM, 1},
+ {"g_mcast_rc_stale_period", IEEE80211_PARAM_MCAST_RC_STALE_PERIOD, GET_PARAM, 0},
+ {"he_multi_tid_aggr_rx", IEEE80211_PARAM_HE_MULTI_TID_AGGR, SET_PARAM, 1},
+ {"get_he_multi_tid_aggr_rx", IEEE80211_PARAM_HE_MULTI_TID_AGGR, GET_PARAM, 0},
+ {"he_multi_tid_aggr_tx", IEEE80211_PARAM_HE_MULTI_TID_AGGR_TX,
+ SET_PARAM, 1},
+ {"get_he_multi_tid_aggr_tx", IEEE80211_PARAM_HE_MULTI_TID_AGGR_TX,
+ GET_PARAM, 0},
+ {"he_max_ampdu_len_exp", IEEE80211_PARAM_HE_MAX_AMPDU_LEN_EXP,
+ SET_PARAM, 1},
+ {"get_he_max_ampdu_len_exp", IEEE80211_PARAM_HE_MAX_AMPDU_LEN_EXP,
+ GET_PARAM, 0},
+ {"he_su_ppdu_1x_ltf_800ns_gi",
+ IEEE80211_PARAM_HE_SU_PPDU_1X_LTF_800NS_GI, SET_PARAM, 1},
+ {"get_he_su_ppdu_1x_ltf_800ns_gi",
+ IEEE80211_PARAM_HE_SU_PPDU_1X_LTF_800NS_GI, GET_PARAM, 0},
+ {"he_su_mu_ppdu_4x_ltf_800ns_gi",
+ IEEE80211_PARAM_HE_SU_MU_PPDU_4X_LTF_800NS_GI, SET_PARAM, 1},
+ {"get_he_su_mu_ppdu_4x_ltf_800ns_gi",
+ IEEE80211_PARAM_HE_SU_MU_PPDU_4X_LTF_800NS_GI, SET_PARAM, 1},
+ {"he_max_frag_msdu", IEEE80211_PARAM_HE_MAX_FRAG_MSDU, SET_PARAM, 1},
+ {"get_he_max_frag_msdu", IEEE80211_PARAM_HE_MAX_FRAG_MSDU, GET_PARAM, 0},
+ {"he_min_frag_size", IEEE80211_PARAM_HE_MIN_FRAG_SIZE, SET_PARAM, 1},
+ {"get_he_min_frag_size", IEEE80211_PARAM_HE_MIN_FRAG_SIZE, GET_PARAM, 0},
+ {"he_omi", IEEE80211_PARAM_HE_OMI, SET_PARAM, 1},
+ {"get_he_omi", IEEE80211_PARAM_HE_OMI, GET_PARAM, 0},
+ {"he_ndp_4x_ltf_3200ns_gi",
+ IEEE80211_PARAM_HE_NDP_4X_LTF_3200NS_GI, SET_PARAM, 1},
+ {"get_he_ndp_4x_ltf_3200ns_gi",
+ IEEE80211_PARAM_HE_NDP_4X_LTF_3200NS_GI, GET_PARAM, 0},
+ {"he_er_su_ppdu_1x_ltf_800ns_gi",
+ IEEE80211_PARAM_HE_ER_SU_PPDU_1X_LTF_800NS_GI, SET_PARAM, 1},
+ {"get_he_er_su_ppdu_1x_ltf_800ns_gi",
+ IEEE80211_PARAM_HE_ER_SU_PPDU_1X_LTF_800NS_GI, GET_PARAM, 0},
+ {"he_er_su_ppdu_4x_ltf_800ns_gi",
+ IEEE80211_PARAM_HE_ER_SU_PPDU_4X_LTF_800NS_GI, SET_PARAM, 1},
+ {"get_he_er_su_ppdu_4x_ltf_800ns_gi",
+ IEEE80211_PARAM_HE_ER_SU_PPDU_4X_LTF_800NS_GI, GET_PARAM, 0},
+ {"get_maxrate", IEEE80211_PARAM_GET_MAX_RATE, GET_PARAM, 0},
+ {"get_signal_level", IEEE80211_PARAM_GET_SIGNAL_LEVEL, GET_PARAM, 0},
+ {"dec_bcn_loss", IEEE80211_PARAM_DEC_BCN_LOSS, SET_PARAM, 1},
+ {"multi_group_key", IEEE80211_PARAM_ENABLE_MULTI_GROUP_KEY, SET_PARAM, 1},
+ {"g_multi_group_key", IEEE80211_PARAM_ENABLE_MULTI_GROUP_KEY, GET_PARAM, 0},
+ {"max_group_keys", IEEE80211_PARAM_MAX_GROUP_KEYS, SET_PARAM, 1},
+ {"g_max_group_keys", IEEE80211_PARAM_MAX_GROUP_KEYS, GET_PARAM, 0},
+ {"vendor_fwd_mask", IEEE80211_PARAM_VENDOR_FRAME_FWD_MASK, SET_PARAM, 1},
+ {"g_vendor_fwd_mask", IEEE80211_PARAM_VENDOR_FRAME_FWD_MASK, GET_PARAM, 0},
+ {"he_dynamic_muedca", IEEE80211_PARAM_HE_DYNAMIC_MU_EDCA, SET_PARAM, 1},
+ {"get_he_dynamic_muedca", IEEE80211_PARAM_HE_DYNAMIC_MU_EDCA, GET_PARAM, 0},
+ {"he_ar_ldpc", IEEE80211_PARAM_HE_AR_LDPC, SET_PARAM, 1},
+ {"get_he_ar_ldpc", IEEE80211_PARAM_HE_AR_LDPC, GET_PARAM, 0},
+ {"mcast_rate_control", IEEE80211_PARAM_ENABLE_MCAST_RC, SET_PARAM, 1},
+ {"g_mcast_rate_control", IEEE80211_PARAM_ENABLE_MCAST_RC, GET_PARAM, 0},
+ {"mcs12_13_supp", IEEE80211_PARAM_VHT_MCS_12_13_SUPP, SET_PARAM, 1},
+ {"g_mcs12_13_supp", IEEE80211_PARAM_VHT_MCS_12_13_SUPP, GET_PARAM, 0},
+ {"rrm_capie", IEEE80211_PARAM_RRM_CAP_IE, SET_PARAM, 1},
+ {"g_rrm_capie", IEEE80211_PARAM_RRM_CAP_IE, GET_PARAM, 0},
+ {"map_sta_vlan", IEEE80211_PARAM_MAP2_BSTA_VLAN_ID, SET_PARAM, 1},
+ {"get_map_sta_vlan", IEEE80211_PARAM_MAP2_BSTA_VLAN_ID, GET_PARAM, 0},
+ {"set_vdev_peer_prot_count", IEEE80211_PARAM_VDEV_PEER_PROTOCOL_COUNT,
+ SET_PARAM, 1},
+ {"get_vdev_peer_prot_count", IEEE80211_PARAM_VDEV_PEER_PROTOCOL_COUNT,
+ GET_PARAM, 0},
+ {"set_vdev_peer_prot_dropmask",
+ IEEE80211_PARAM_VDEV_PEER_PROTOCOL_DROP_MASK, SET_PARAM, 1},
+ {"get_vdev_peer_prot_dropmask",
+ IEEE80211_PARAM_VDEV_PEER_PROTOCOL_DROP_MASK, GET_PARAM, 0},
+#if WLAN_SCHED_HISTORY_SIZE
+ {"sched_history", IEEE80211_PARAM_WLAN_SCHED_HISTORY, SET_PARAM, 0},
+#endif
+ {"he_dlofdma_bf", IEEE80211_PARAM_HE_DL_MU_OFDMA_BFER, SET_PARAM, 1},
+ {"g_he_dlofdma_bf", IEEE80211_PARAM_HE_DL_MU_OFDMA_BFER, GET_PARAM, 0},
+ {"sendprobereq", IEEE80211_PARAM_SEND_PROBE_REQ, GET_PARAM, 0},
+ {"min_asoc_rssi", IEEE80211_PARAM_ASSOC_MIN_RSSI, SET_PARAM, 1},
+ {"g_min_asoc_rssi", IEEE80211_PARAM_ASSOC_MIN_RSSI, GET_PARAM, 0},
+ {"setiebuf", 35828, SET_PARAM, 1},
+ {"getiebuf", 35827, GET_PARAM, 0},
+ {"dbgreq", 35832, SET_PARAM, 1},
+ {"sendmgmt", 35834, SET_PARAM, 1},
+ {"me_adddeny", 35835, SET_PARAM, 1},
+ {"hbrparams", 35838, SET_PARAM, 1},
+ {"rxtimeout", 35839, SET_PARAM, 1},
+};
+
+struct vendor_commands radio_vendor_cmds[] = {
+ {"DMABcnRespT", 0, SET_PARAM, 1},
+ {"txchainmask",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXCHAINMASK, SET_PARAM, 1},
+ {"get_txchainmask",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXCHAINMASK, GET_PARAM, 0},
+ {"rxchainmask",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RXCHAINMASK, SET_PARAM, 1},
+ {"get_rxchainmask",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RXCHAINMASK, GET_PARAM, 0},
+ {"AMPDU",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_AMPDU, SET_PARAM, 1},
+ {"getAMPDU",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_AMPDU, GET_PARAM, 0},
+ {"AMPDULim",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_AMPDU_LIMIT, SET_PARAM, 1},
+ {"getAMPDULim",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_AMPDU_LIMIT, GET_PARAM, 0},
+ {"AMPDUFrames",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_AMPDU_SUBFRAMES, SET_PARAM, 1},
+ {"getAMPDUFrames",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_AMPDU_SUBFRAMES, GET_PARAM, 0},
+ {"TXPowLim2G",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXPOWER_LIMIT2G, SET_PARAM, 1},
+ {"getTxPowLim2G",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXPOWER_LIMIT2G, GET_PARAM, 0},
+ {"TXPowLim5G",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXPOWER_LIMIT5G, SET_PARAM, 1},
+ {"getTxPowLim5G",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXPOWER_LIMIT5G, GET_PARAM, 0},
+ {"LDPC",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LDPC, SET_PARAM, 1},
+ {"getLDPC",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LDPC, GET_PARAM, 0},
+ {"vow_extstats",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_VOW_EXT_STATS, SET_PARAM, 1},
+ {"g_vow_extstats",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_VOW_EXT_STATS, GET_PARAM, 0},
+ {"dyntxchain",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DYN_TX_CHAINMASK, SET_PARAM, 1},
+ {"get_dyntxchain",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DYN_TX_CHAINMASK, GET_PARAM, 0},
+ {"burst",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BURST_ENABLE, SET_PARAM, 1},
+ {"get_burst",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BURST_ENABLE, GET_PARAM, 0},
+ {"burst_dur",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BURST_DUR, SET_PARAM, 1},
+ {"get_burst_dur",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BURST_DUR, GET_PARAM, 0},
+ {"set_bcnburst",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BCN_BURST, SET_PARAM, 1},
+ {"get_bcnburst",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BCN_BURST, GET_PARAM, 0},
+#if UMAC_SUPPORT_PERIODIC_PERFSTATS
+ {"dcs_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRDPERFSTAT_THRPUT_ENAB, SET_PARAM, 1},
+ {"get_dcs_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRDPERFSTAT_THRPUT_ENAB, GET_PARAM, 0},
+#endif
+ {"get_total_PER",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TOTAL_PER, GET_PARAM, 0},
+ {"setctsrate",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RTS_CTS_RATE, SET_PARAM, 1},
+ {"get_ctsrate",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RTS_CTS_RATE, GET_PARAM, 0},
+ {"set_dcs_coch_th",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_COCH_THR, SET_PARAM, 1},
+ {"get_dcs_coch_th",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_COCH_THR, GET_PARAM, 0},
+ {"set_dcs_errth",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_TXERR_THR, SET_PARAM, 1},
+ {"get_dcs_errth",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_TXERR_THR, GET_PARAM, 0},
+ {"s_dcs_phyerrth",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_PHYERR_THR, SET_PARAM, 1},
+ {"g_dcs_phyerrth",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_PHYERR_THR, GET_PARAM, 0},
+ {"get_if_path",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_GET_IF_ID, GET_PARAM, 0},
+ {"acs_bkscanen",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_ENABLE_BK_SCANTIMEREN, SET_PARAM, 1},
+ {"g_acs_bkscanen",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_ENABLE_BK_SCANTIMEREN, GET_PARAM, 0},
+ {"acs_scanintvl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_SCANTIME, SET_PARAM, 1},
+ {"g_acsscanintvl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_SCANTIME, GET_PARAM, 0},
+ {"acs_rssivar",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_RSSIVAR, SET_PARAM, 1},
+ {"get_acs_rssivar",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_RSSIVAR, GET_PARAM, 0},
+ {"acs_chloadvar",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_CHLOADVAR, SET_PARAM, 1},
+ {"g_acschloadvar",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_CHLOADVAR, GET_PARAM, 0},
+ {"acs_lmtobss",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_LIMITEDOBSS, SET_PARAM, 1},
+ {"get_acslmtobss",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_LIMITEDOBSS, GET_PARAM, 0},
+ {"acs_ctrlflags",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_CTRLFLAG, SET_PARAM, 1},
+ {"getacsctrlflags",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_CTRLFLAG, GET_PARAM, 0},
+ {"acs_dbgtrace",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_DEBUGTRACE, SET_PARAM, 1},
+ {"g_acs_dbgtrace",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_DEBUGTRACE, GET_PARAM, 0},
+ {"set_fw_hang",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SET_FW_HANG_ID, SET_PARAM, 1},
+ {"get_radio_type",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RADIO_TYPE, GET_PARAM, 0},
+ {"sIgmpDscpOvrid",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_IGMPMLD_OVERRIDE, SET_PARAM, 1},
+ {"gIgmpDscpOvrid",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_IGMPMLD_OVERRIDE, GET_PARAM, 0},
+ {"sIgmpDscpTidMap",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_IGMPMLD_TID, SET_PARAM, 1},
+ {"gIgmpDscpTidMap",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_IGMPMLD_TID, GET_PARAM, 0},
+ {"arpdhcp_ac",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ARPDHCP_AC_OVERRIDE, SET_PARAM, 1},
+ {"g_arpdhcp_ac",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ARPDHCP_AC_OVERRIDE, GET_PARAM, 0},
+ {"nonaggr_swretry",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_NON_AGG_SW_RETRY_TH, SET_PARAM, 1},
+ {"aggr_swretry",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_AGG_SW_RETRY_TH, SET_PARAM, 1},
+ {"blockdfslist",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DISABLE_DFS, SET_PARAM, 1},
+ {"g_blockdfslist",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DISABLE_DFS, GET_PARAM, 0},
+ {"enable_amsdu",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ENABLE_AMSDU, SET_PARAM, 1},
+ {"get_amsdu",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ENABLE_AMSDU, GET_PARAM, 0},
+ {"enable_ampdu",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ENABLE_AMPDU, SET_PARAM, 1},
+ {"get_ampdu",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ENABLE_AMPDU, GET_PARAM, 0},
+ {"sta_kickout",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_STA_KICKOUT_TH, SET_PARAM, 1},
+ {"LTR",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_ENABLE, SET_PARAM, 1},
+ {"getLTR",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_ENABLE, GET_PARAM, 0},
+ {"LTRBE",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_AC_LATENCY_BE, SET_PARAM, 1},
+ {"getLTRBE",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_AC_LATENCY_BE, GET_PARAM, 0},
+ {"LTRBK",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_AC_LATENCY_BK, SET_PARAM, 1},
+ {"getLTRBK",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_AC_LATENCY_BK, GET_PARAM, 0},
+ {"LTRVI",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_AC_LATENCY_VI, SET_PARAM, 1},
+ {"getLTRVI",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_AC_LATENCY_VI, GET_PARAM, 0},
+ {"LTRVO",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_AC_LATENCY_VO, SET_PARAM, 1},
+ {"getLTRVO",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_AC_LATENCY_VO, GET_PARAM, 0},
+ {"LTRACTimeout",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_AC_LATENCY_TIMEOUT, SET_PARAM, 1},
+ {"getLTRACTimeout",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_AC_LATENCY_TIMEOUT, GET_PARAM, 0},
+ {"LTRTxTimeout",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_TX_ACTIVITY_TIMEOUT, SET_PARAM, 1},
+ {"getLTRTxTimeout",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_TX_ACTIVITY_TIMEOUT, GET_PARAM, 0},
+ {"LTRSLEEP",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_SLEEP_OVERRIDE, SET_PARAM, 1},
+ {"getLTRSLEEP",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_SLEEP_OVERRIDE, GET_PARAM, 0},
+ {"LTRRX",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_RX_OVERRIDE, SET_PARAM, 1},
+ {"getLTRRX",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LTR_RX_OVERRIDE, GET_PARAM, 0},
+ {"L1SS",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_L1SS_ENABLE, SET_PARAM, 1},
+ {"getL1SS",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_L1SS_ENABLE, GET_PARAM, 0},
+ {"DSLEEP",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DSLEEP_ENABLE, SET_PARAM, 1},
+ {"getDSLEEP",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DSLEEP_ENABLE, GET_PARAM, 0},
+ {"set_dcs_maxcu",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_USERMAX_CU_THR, SET_PARAM, 1},
+ {"get_dcs_maxcu",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_USERMAX_CU_THR, GET_PARAM, 0},
+ {"set_dcs_debug",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_DEBUG, SET_PARAM, 1},
+ {"get_dcs_debug",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_DEBUG, GET_PARAM, 0},
+ {"ani_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ANI_ENABLE, SET_PARAM, 1},
+ {"get_ani_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ANI_ENABLE, GET_PARAM, 0},
+ {"ani_poll_len",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ANI_POLL_PERIOD, SET_PARAM, 1},
+ {"ani_listen_len",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ANI_LISTEN_PERIOD, SET_PARAM, 1},
+ {"ani_ofdm_level",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ANI_OFDM_LEVEL, SET_PARAM, 1},
+ {"ani_cck_level",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ANI_CCK_LEVEL, SET_PARAM, 1},
+ {"dscp_tid_map",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DSCP_TID_MAP, SET_PARAM, 1},
+ {"tpscale",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXPOWER_SCALE, SET_PARAM, 1},
+ {"get_tpscale",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXPOWER_SCALE, GET_PARAM, 0},
+#if ATH_SUPPORT_DSCP_OVERRIDE
+ {"sHmmcDscpTidMap",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HMMC_DSCP_TID_MAP, SET_PARAM, 1},
+ {"gHmmcDscpTidMap",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HMMC_DSCP_TID_MAP, GET_PARAM, 0},
+ {"sHmmcDscpOvrid",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HMMC_DSCP_OVERRIDE, SET_PARAM, 1},
+ {"gHmmcDscpOvrid",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HMMC_DSCP_OVERRIDE, GET_PARAM, 0},
+#endif
+ {"antgain_2g",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ANTENNA_GAIN_2G, SET_PARAM, 1},
+ {"antgain_5g",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ANTENNA_GAIN_5G, SET_PARAM, 1},
+ {"set_rxfilter",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RX_FILTER, SET_PARAM, 1},
+#if ATH_SUPPORT_HYFI_ENHANCEMENTS
+ {"set_buff_thresh",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BUFF_THRESH, SET_PARAM, 1},
+ {"get_buff_thresh",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BUFF_THRESH, GET_PARAM, 0},
+ {"setBlkReportFld",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BLK_REPORT_FLOOD, SET_PARAM, 1},
+ {"getBlkReportFld",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BLK_REPORT_FLOOD, GET_PARAM, 0},
+ {"setDropSTAQuery",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DROP_STA_QUERY, SET_PARAM, 1},
+ {"getDropSTAQuery",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DROP_STA_QUERY, GET_PARAM, 0},
+#endif
+ {"qboost_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_QBOOST, SET_PARAM, 1},
+ {"sifs_frmtype",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SIFS_FRMTYPE, SET_PARAM, 1},
+ {"sifs_uapsd",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SIFS_UAPSD, SET_PARAM, 1},
+ {"set_fw_recovery",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_FW_RECOVERY_ID, SET_PARAM, 1},
+ {"get_fw_recovery",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_FW_RECOVERY_ID, GET_PARAM, 0},
+ {"reset_ol_stats",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RESET_OL_STATS, SET_PARAM, 1},
+ {"setdeauthcnt",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DEAUTH_COUNT, SET_PARAM, 1},
+ {"getdeauthcnt",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DEAUTH_COUNT, GET_PARAM, 0},
+ {"block_interbss",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BLOCK_INTERBSS, SET_PARAM, 1},
+ {"g_blk_interbss",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BLOCK_INTERBSS, GET_PARAM, 0},
+ {"disable_reset",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_FW_DISABLE_RESET, SET_PARAM, 1},
+ {"msdu_ttl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MSDU_TTL, SET_PARAM, 1},
+ {"ppdu_duration",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PPDU_DURATION, SET_PARAM, 1},
+ {"txbf_snd_int",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SET_TXBF_SND_PERIOD, SET_PARAM, 1},
+ {"get_txbf_snd",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SET_TXBF_SND_PERIOD, GET_PARAM, 0},
+ {"promisc",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ALLOW_PROMISC, SET_PARAM, 1},
+ {"get_promisc",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ALLOW_PROMISC, GET_PARAM, 0},
+ {"burst_mode",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BURST_MODE, SET_PARAM, 1},
+ {"dyn_grouping",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DYN_GROUPING, SET_PARAM, 1},
+ {"g_dyngroup",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DYN_GROUPING, GET_PARAM, 0},
+ {"dpd_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DPD_ENABLE, SET_PARAM, 1},
+ {"g_dpdenable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DPD_ENABLE, GET_PARAM, 0},
+ {"dbglog_ratelim",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DBGLOG_RATELIM, SET_PARAM, 1},
+ {"ps_report",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PS_STATE_CHANGE, SET_PARAM, 1},
+ {"get_ps_report",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PS_STATE_CHANGE, GET_PARAM, 0},
+ {"mcast_echo",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MCAST_BCAST_ECHO, SET_PARAM, 1},
+ {"g_mcast_echo",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MCAST_BCAST_ECHO, GET_PARAM, 0},
+ {"obss_rssi_th",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_OBSS_RSSI_THRESHOLD, SET_PARAM, 1},
+ {"gobss_rssi_th",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_OBSS_RSSI_THRESHOLD, GET_PARAM, 0},
+ {"obss_rxrssi_th",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_OBSS_RX_RSSI_THRESHOLD, SET_PARAM, 1},
+ {"gobss_rxrssi_th",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_OBSS_RX_RSSI_THRESHOLD, GET_PARAM, 0},
+#if ATH_CHANNEL_BLOCKING
+ {"acs_bmode",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_BLOCK_MODE, SET_PARAM, 1},
+ {"g_acs_bmode",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_BLOCK_MODE, GET_PARAM, 0},
+#endif
+ {"acs_txpwr_opt",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_TX_POWER_OPTION, SET_PARAM, 1},
+ {"g_acs_txpwr_opt",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_TX_POWER_OPTION, GET_PARAM, 0},
+ {"antenna_plzn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ANT_POLARIZATION, SET_PARAM, 1},
+ {"print_ratelim",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRINT_RATE_LIMIT, SET_PARAM, 1},
+ {"gprint_ratelim",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRINT_RATE_LIMIT, GET_PARAM, 0},
+ {"pdev_reset",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PDEV_RESET, SET_PARAM, 1},
+ {"set_nohostcrash",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_FW_DUMP_NO_HOST_CRASH, SET_PARAM, 1},
+ {"get_nohostcrash",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_FW_DUMP_NO_HOST_CRASH, GET_PARAM, 0},
+ {"obss_longslot",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CONSIDER_OBSS_NON_ERP_LONG_SLOT,
+ SET_PARAM, 1},
+ {"g_obss_longslot",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CONSIDER_OBSS_NON_ERP_LONG_SLOT,
+ GET_PARAM, 0},
+ {"fc_stats_global",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_STATS_FC, SET_PARAM, 1},
+ {"fc_flush_intv",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_QFLUSHINTERVAL, SET_PARAM, 1},
+ {"g_fc_flush_intv",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_QFLUSHINTERVAL, GET_PARAM, 0},
+ {"fc_buf_max",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TOTAL_Q_SIZE, SET_PARAM, 1},
+ {"g_fc_buf_max",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TOTAL_Q_SIZE, GET_PARAM, 0},
+ {"fc_buf0_max",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE0, SET_PARAM, 1},
+ {"fc_buf1_max",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE1, SET_PARAM, 1},
+ {"fc_buf2_max",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE2, SET_PARAM, 1},
+ {"fc_buf3_max",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TOTAL_Q_SIZE_RANGE3, SET_PARAM, 1},
+ {"fc_buf_min",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MIN_THRESHOLD, SET_PARAM, 1},
+ {"g_fc_buf_min",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MIN_THRESHOLD, GET_PARAM, 0},
+ {"fc_q_max",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MAX_Q_LIMIT, SET_PARAM, 1},
+ {"g_fc_q_max",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MAX_Q_LIMIT, GET_PARAM, 0},
+ {"fc_q_min",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MIN_Q_LIMIT, SET_PARAM, 1},
+ {"g_fc_q_min",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MIN_Q_LIMIT, GET_PARAM, 0},
+ {"fc_cong_timer",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CONG_CTRL_TIMER_INTV, SET_PARAM, 1},
+ {"g_fc_cong_timer",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CONG_CTRL_TIMER_INTV, GET_PARAM, 0},
+ {"fc_stats_tmr",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_STATS_TIMER_INTV, SET_PARAM, 1},
+ {"g_fc_stats_tmr",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_STATS_TIMER_INTV, GET_PARAM, 0},
+ {"fc_rot_timer",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ROTTING_TIMER_INTV, SET_PARAM, 1},
+ {"g_fc_rot_timer",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ROTTING_TIMER_INTV, GET_PARAM, 0},
+ {"fc_latency_on",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_LATENCY_PROFILE, SET_PARAM, 1},
+ {"fc_hostq_dump",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HOSTQ_DUMP, SET_PARAM, 1},
+ {"fc_tidq_map",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TIDQ_MAP, SET_PARAM, 1},
+ {"arp_dbg_srcaddr",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DBG_ARP_SRC_ADDR, SET_PARAM, 1},
+ {"g_arp_dbgstats",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DBG_ARP_SRC_ADDR, GET_PARAM, 0},
+ {"arp_dbg_dstaddr",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DBG_ARP_DST_ADDR, SET_PARAM, 1},
+ {"arp_dbg_conf",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DBG_ARP_DST_ADDR, SET_PARAM, 1},
+ {"g_arp_dbg_conf",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ARP_DBG_CONF, GET_PARAM, 0},
+ {"st_ht_noamsdu",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DISABLE_STA_VAP_AMSDU, SET_PARAM, 1},
+ {"g_st_ht_noamsdu",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DISABLE_STA_VAP_AMSDU, GET_PARAM, 0},
+#if ATH_SUPPORT_DFS && ATH_SUPPORT_STA_DFS
+ {"staDFSEn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_STADFS_ENABLE, SET_PARAM, 1},
+ {"get_staDFSEn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_STADFS_ENABLE, GET_PARAM, 0},
+#endif
+#if QCA_AIRTIME_FAIRNESS
+ {"atfstrictsched",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ATF_STRICT_SCHED, SET_PARAM, 1},
+ {"gatfstrictsched",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ATF_STRICT_SCHED, GET_PARAM, 0},
+ {"atfgrouppolicy",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ATF_GROUP_POLICY, SET_PARAM, 1},
+ {"gatfgrouppolicy",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ATF_GROUP_POLICY, GET_PARAM, 0},
+#endif
+#if DBDC_REPEATER_SUPPORT
+ {"primaryradio",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRIMARY_RADIO, SET_PARAM, 1},
+ {"getprimaryradio",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRIMARY_RADIO, GET_PARAM, 0},
+ {"dbdc_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DBDC_ENABLE, SET_PARAM, 1},
+ {"get_dbdc_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DBDC_ENABLE, GET_PARAM, 0},
+#endif
+ {"tpdbscale",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXPOWER_DBSCALE, SET_PARAM, 1},
+ {"ctlpwscale",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CTL_POWER_SCALE, SET_PARAM, 1},
+ {"get_ctlpwscale",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CTL_POWER_SCALE, GET_PARAM, 0},
+#if QCA_AIRTIME_FAIRNESS
+ {"atfobsssched",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ATF_OBSS_SCHED, SET_PARAM, 1},
+ {"g_atfobsssched",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ATF_OBSS_SCHED, GET_PARAM, 0},
+ {"atfobssscale",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ATF_OBSS_SCALE, SET_PARAM, 1},
+ {"g_phyofdmerr",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ATF_OBSS_SCALE, GET_PARAM, 0},
+#endif
+ {"g_phycckerr",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PHY_CCK_ERR, GET_PARAM, 0},
+ {"g_fcserr",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_FCS_ERR, GET_PARAM, 0},
+ {"g_chanutil",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHAN_UTIL, GET_PARAM, 0},
+#if DBDC_REPEATER_SUPPORT
+ {"client_mcast",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CLIENT_MCAST, SET_PARAM, 1},
+ {"getclient_mcast",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CLIENT_MCAST, GET_PARAM, 0},
+#endif
+ {"get_emiwar80p80",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_EMIWAR_80P80, SET_PARAM, 1},
+ {"batch_mode",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BATCHMODE, SET_PARAM, 1},
+ {"packaggrdelay",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PACK_AGGR_DELAY, SET_PARAM, 1},
+#if UMAC_SUPPORT_ACFG
+ {"set_diag_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DIAG_ENABLE, SET_PARAM, 1},
+ {"get_diag_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DIAG_ENABLE, GET_PARAM, 0},
+#endif
+ {"chanstats_th",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHAN_STATS_TH, SET_PARAM, 1},
+ {"g_chanstats_th",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHAN_STATS_TH, GET_PARAM, 0},
+ {"pas_scanen",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PASSIVE_SCAN_ENABLE, SET_PARAM, 1},
+ {"g_pas_scanen",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PASSIVE_SCAN_ENABLE, GET_PARAM, 0},
+ {"set_min_snr_en",
+ OL_ATH_PARAM_SHIFT | OL_ATH_MIN_RSSI_ENABLE, SET_PARAM, 1},
+ {"get_min_snr_en",
+ OL_ATH_PARAM_SHIFT | OL_ATH_MIN_RSSI_ENABLE, GET_PARAM, 0},
+ {"set_min_snr",
+ OL_ATH_PARAM_SHIFT | OL_ATH_MIN_RSSI, SET_PARAM, 1},
+ {"get_min_snr",
+ OL_ATH_PARAM_SHIFT | OL_ATH_MIN_RSSI, GET_PARAM, 0},
+ {"acs_2g_allch",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_2G_ALLCHAN, SET_PARAM, 1},
+ {"g_acs_2g_allch",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_2G_ALLCHAN, GET_PARAM, 0},
+#if DBDC_REPEATER_SUPPORT
+ {"delay_stavapup",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DELAY_STAVAP_UP, SET_PARAM, 1},
+ {"gdelay_stavapup",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DELAY_STAVAP_UP, GET_PARAM, 0},
+#endif
+ {"CSwOpts",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHANSWITCH_OPTIONS, SET_PARAM, 1},
+ {"get_CSwOpts",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHANSWITCH_OPTIONS, GET_PARAM, 0},
+ {"btcoex_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_BTCOEX_ENABLE, SET_PARAM, 1},
+ {"g_btcoex_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_BTCOEX_ENABLE, GET_PARAM, 0},
+ {"btcoex_wl_pri",
+ OL_ATH_PARAM_SHIFT | OL_ATH_BTCOEX_WL_PRIORITY, SET_PARAM, 1},
+ {"g_btcoex_wl_pri",
+ OL_ATH_PARAM_SHIFT | OL_ATH_BTCOEX_WL_PRIORITY, GET_PARAM, 0},
+ {"queue_map",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TID_OVERRIDE_QUEUE_MAPPING, SET_PARAM, 1},
+ {"get_queue_map",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TID_OVERRIDE_QUEUE_MAPPING, GET_PARAM, 0},
+ {"CalCheck",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CAL_VER_CHECK, SET_PARAM, 1},
+ {"get_CalCheck",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CAL_VER_CHECK, GET_PARAM, 0},
+ {"no_vlan",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_NO_VLAN, SET_PARAM, 1},
+ {"get_no_vlan",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_NO_VLAN, GET_PARAM, 0},
+ {"cca_threshold",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CCA_THRESHOLD, SET_PARAM, 1},
+ {"g_cca_threshold",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CCA_THRESHOLD, GET_PARAM, 0},
+ {"atf_log",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ATF_LOGGING, SET_PARAM, 1},
+ {"get_atf_log",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ATF_LOGGING, GET_PARAM, 0},
+ {"strict_doth",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_STRICT_DOTH, SET_PARAM, 1},
+ {"g_strict_doth",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_STRICT_DOTH, GET_PARAM, 0},
+ {"discon_time",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DISCONNECTION_TIMEOUT, SET_PARAM, 1},
+ {"gdiscon_time",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DISCONNECTION_TIMEOUT, GET_PARAM, 0},
+ {"reconfig_time",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RECONFIGURATION_TIMEOUT, SET_PARAM, 1},
+ {"greconfig_time",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RECONFIGURATION_TIMEOUT, GET_PARAM, 0},
+ {"chswitchcnt",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHANNEL_SWITCH_COUNT, SET_PARAM, 1},
+ {"g_chswitchcnt",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHANNEL_SWITCH_COUNT, GET_PARAM, 0},
+ {"alwaysprimary",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ALWAYS_PRIMARY, SET_PARAM, 1},
+ {"galwaysprimary",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ALWAYS_PRIMARY, GET_PARAM, 0},
+ {"fast_lane",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_FAST_LANE, SET_PARAM, 1},
+ {"get_fast_lane",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_FAST_LANE, GET_PARAM, 0},
+ {"g_btcoex_dc",
+ OL_ATH_PARAM_SHIFT | OL_ATH_GET_BTCOEX_DUTY_CYCLE, GET_PARAM, 0},
+ {"sec_offsetie",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SECONDARY_OFFSET_IE, SET_PARAM, 1},
+ {"g_sec_offsetie",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SECONDARY_OFFSET_IE, GET_PARAM, 0},
+ {"wb_subelem",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_WIDE_BAND_SUB_ELEMENT, SET_PARAM, 1},
+ {"g_wb_subelem",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_WIDE_BAND_SUB_ELEMENT, GET_PARAM, 0},
+ {"pref_uplink",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PREFERRED_UPLINK, SET_PARAM, 1},
+ {"get_pref_uplink",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PREFERRED_UPLINK, GET_PARAM, 0},
+ {"preCACEn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRECAC_ENABLE, SET_PARAM, 1},
+ {"get_preCACEn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRECAC_ENABLE, GET_PARAM, 0},
+ {"pCACTimeout",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRECAC_TIMEOUT, SET_PARAM, 1},
+ {"get_pCACTimeout",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRECAC_TIMEOUT, GET_PARAM, 0},
+ {"dump_target",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DUMP_TARGET, SET_PARAM, 1},
+ {"set_reo_dest",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PDEV_TO_REO_DEST, SET_PARAM, 1},
+ {"get_reo_dest",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PDEV_TO_REO_DEST, GET_PARAM, 0},
+ {"dump_chmsk_tbl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DUMP_CHAINMASK_TABLES, SET_PARAM, 1},
+ {"print_obj_refs",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DUMP_OBJECTS, SET_PARAM, 1},
+ {"acs_srloadvar",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_SRLOADVAR, SET_PARAM, 1},
+ {"g_acssrloadvar",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_SRLOADVAR, GET_PARAM, 0},
+ {"ext_nss",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_EXT_NSS_CAPABLE, SET_PARAM, 1},
+ {"g_ext_nss",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_EXT_NSS_CAPABLE, GET_PARAM, 0},
+ {"acktimeout",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXACKTIMEOUT, SET_PARAM, 1},
+ {"get_acktimeout",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXACKTIMEOUT, GET_PARAM, 0},
+ {"set_icm_active",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ICM_ACTIVE, SET_PARAM, 1},
+ {"get_icm_active",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ICM_ACTIVE, GET_PARAM, 0},
+ {"get_nominal_noisefloor",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_NOMINAL_NOISEFLOOR, GET_PARAM, 0},
+ {"acs_rank_en",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_RANK, SET_PARAM, 1},
+ {"g_acs_rank_en",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_RANK, GET_PARAM, 0},
+ {"txchainsoft",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXCHAINSOFT, SET_PARAM, 1},
+ {"get_txchainsoft",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TXCHAINSOFT, GET_PARAM, 0},
+ {"widebw_scan",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_WIDE_BAND_SCAN, SET_PARAM, 1},
+ {"g_widebw_scan",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_WIDE_BAND_SCAN, GET_PARAM, 0},
+ {"cck_tx_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CCK_TX_ENABLE, SET_PARAM, 1},
+ {"g_cck_tx_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CCK_TX_ENABLE, GET_PARAM, 0},
+ {"set_papi",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PAPI_ENABLE, SET_PARAM, 1},
+ {"get_papi",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PAPI_ENABLE, GET_PARAM, 0},
+ {"isolation",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ISOLATION, SET_PARAM, 1},
+ {"get_isolation",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ISOLATION, GET_PARAM, 0},
+ {"max_radio_sta",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MAX_CLIENTS_PER_RADIO, SET_PARAM, 1},
+ {"g_max_radio_sta",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MAX_CLIENTS_PER_RADIO, GET_PARAM, 0},
+#ifdef OL_ATH_SMART_LOGGING
+ {"smartLogEn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SMARTLOG_ENABLE, SET_PARAM, 1},
+ {"get_smartLogEn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SMARTLOG_ENABLE, GET_PARAM, 0},
+ {"smartLogEvent",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SMARTLOG_FATAL_EVENT, SET_PARAM, 1},
+ {"smartLogSkbsz",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SMARTLOG_SKB_SZ, SET_PARAM, 1},
+ {"g_smartLogSkbsz",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SMARTLOG_SKB_SZ, GET_PARAM, 0},
+ {"slPingFailLog",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SMARTLOG_P1PINGFAIL, SET_PARAM, 1},
+ {"g_slPingFailLog",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SMARTLOG_P1PINGFAIL, GET_PARAM, 0},
+#endif
+#ifdef WLAN_DFS_PRECAC_AUTO_CHAN_SUPPORT
+ {"interCACChan",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRECAC_INTER_CHANNEL, SET_PARAM, 1},
+ {"getInterCACChan",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PRECAC_INTER_CHANNEL, GET_PARAM, 0},
+#endif
+ {"g_dbr_ring_status",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DBR_RING_STATUS, GET_PARAM, 0},
+#ifdef QCN_ESP_IE
+ {"esp_period",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ESP_PERIODICITY, SET_PARAM, 1},
+ {"g_esp_period",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ESP_PERIODICITY, GET_PARAM, 0},
+ {"esp_airtime",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ESP_AIRTIME, SET_PARAM, 1},
+ {"g_esp_airtime",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ESP_AIRTIME, GET_PARAM, 0},
+ {"esp_ppdu_dur",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ESP_PPDU_DURATION, SET_PARAM, 1},
+ {"g_esp_ppdu_dur",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ESP_PPDU_DURATION, GET_PARAM, 0},
+ {"esp_ba_window",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ESP_BA_WINDOW, SET_PARAM, 1},
+ {"g_esp_ba_window",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ESP_BA_WINDOW, GET_PARAM, 0},
+#endif
+ {"cbs_bkscanen",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS, SET_PARAM, 1},
+ {"g_cbs_bkscanen",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS, GET_PARAM, 0},
+ {"dcs_sim",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_SIM, SET_PARAM, 1},
+ {"cbs_dwellspt",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS_DWELL_SPLIT_TIME, SET_PARAM, 1},
+ {"g_cbs_dwellspt",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS_DWELL_SPLIT_TIME, GET_PARAM, 0},
+ {"cbs_dwellrest",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS_DWELL_REST_TIME, SET_PARAM, 1},
+ {"g_cbs_dwellrest",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS_DWELL_REST_TIME, GET_PARAM, 0},
+ {"cbs_waittime",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS_WAIT_TIME, SET_PARAM, 1},
+ {"g_cbs_waittime",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS_WAIT_TIME, GET_PARAM, 0},
+ {"cbs_resttime",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS_REST_TIME, SET_PARAM, 1},
+ {"g_cbs_resttime",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS_REST_TIME, GET_PARAM, 0},
+ {"cbs_csa",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS_CSA, SET_PARAM, 1},
+ {"g_cbs_csa",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CBS_CSA, GET_PARAM, 0},
+ {"twice_antgain",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TWICE_ANTENNA_GAIN, SET_PARAM, 1},
+ {"g_activity_f",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACTIVITY_FACTOR, GET_PARAM, 0},
+ {"g_ch_util_ap_rx",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHAN_AP_RX_UTIL, GET_PARAM, 0},
+ {"g_ch_util_free",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHAN_FREE, GET_PARAM, 0},
+ {"g_ch_util_ap_tx",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHAN_AP_TX_UTIL, GET_PARAM, 0},
+ {"g_ch_util_obss",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHAN_OBSS_RX_UTIL, GET_PARAM, 0},
+ {"g_ch_util_nwifi",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHAN_NON_WIFI, GET_PARAM, 0},
+#if PEER_FLOW_CONTROL
+ {"fc_video_stats",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_VIDEO_STATS_FC, GET_PARAM, 0},
+#endif
+ {"set_retry_stats",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ENABLE_PEER_RETRY_STATS, SET_PARAM, 1},
+ {"get_retry_stats",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ENABLE_PEER_RETRY_STATS, GET_PARAM, 0},
+ {"he_ul_trig_int",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HE_UL_TRIG_INT, SET_PARAM, 1},
+ {"get_he_ul_trig_int",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HE_UL_TRIG_INT, GET_PARAM, 0},
+ {"mark_subchan",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DFS_NOL_SUBCHANNEL_MARKING, SET_PARAM, 1},
+ {"g_mark_subchan",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DFS_NOL_SUBCHANNEL_MARKING, GET_PARAM, 0},
+ {"get_bandinfo",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BAND_INFO, GET_PARAM, 0},
+ {"bw_reduceEn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BW_REDUCE, SET_PARAM, 1},
+ {"get_bw_reduceEn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_BW_REDUCE, GET_PARAM, 0},
+ {"get_he_ul_ppdu_dur",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HE_UL_PPDU_DURATION, GET_PARAM, 0},
+ {"he_ru_alloc",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HE_UL_RU_ALLOCATION, SET_PARAM, 1},
+ {"get_he_ru_alloc",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HE_UL_RU_ALLOCATION, GET_PARAM, 0},
+ {"cfr_timer",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PERIODIC_CFR_CAPTURE, SET_PARAM, 1},
+ {"get_cfr_timer",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PERIODIC_CFR_CAPTURE, GET_PARAM, 0},
+ {"flush_rate_stats",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_FLUSH_PEER_RATE_STATS, SET_PARAM, 1},
+ {"set_dcs_enable_timer",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_RE_ENABLE_TIMER, SET_PARAM, 1},
+ {"get_dcs_enable_timer",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_DCS_RE_ENABLE_TIMER, GET_PARAM, 0},
+ {"rx_lite_monitor",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RX_MON_LITE, SET_PARAM, 1},
+ {"get_rx_lite_monitor",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RX_MON_LITE, GET_PARAM, 0},
+ {"wifi_down_ind",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_WIFI_DOWN_IND, SET_PARAM, 1},
+ {"tx_monitor",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TX_CAPTURE, SET_PARAM, 1},
+ {"get_tx_monitor",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TX_CAPTURE, GET_PARAM, 0},
+ {"set_wmi_dis_dump",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_WMI_DIS_DUMP, SET_PARAM, 1},
+ {"acs_chan_grade_algo",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_CHAN_GRADE_ALGO, SET_PARAM, 1},
+ {"get_acs_chan_grade_algo",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_CHAN_GRADE_ALGO, GET_PARAM, 0},
+ {"set_acs_chan_eff_var",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_CHAN_EFFICIENCY_VAR, SET_PARAM, 1},
+ {"get_acs_chan_eff_var",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_CHAN_EFFICIENCY_VAR, GET_PARAM, 0},
+ {"set_acs_near_range_weightage",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_NEAR_RANGE_WEIGHTAGE, SET_PARAM, 1},
+ {"get_acs_near_range_weightage",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_NEAR_RANGE_WEIGHTAGE, GET_PARAM, 0},
+ {"set_acs_mid_range_weightage",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_MID_RANGE_WEIGHTAGE, SET_PARAM, 1},
+ {"get_acs_mid_range_weightage",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_MID_RANGE_WEIGHTAGE, GET_PARAM, 0},
+ {"set_acs_far_range_weightage",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_FAR_RANGE_WEIGHTAGE, SET_PARAM, 1},
+ {"get_acs_far_range_weightage",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ACS_FAR_RANGE_WEIGHTAGE, GET_PARAM, 0},
+ {"set_self_obss_pd_tx_threshold",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SET_CMD_OBSS_PD_THRESHOLD, SET_PARAM, 1},
+ {"get_self_obss_pd_tx_threshold",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SET_CMD_OBSS_PD_THRESHOLD, GET_PARAM, 0},
+ {"set_mgmt_ttl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MGMT_TTL, SET_PARAM, 1},
+ {"get_mgmt_ttl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MGMT_TTL, GET_PARAM, 0},
+ {"set_prb_rsp_ttl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PROBE_RESP_TTL, SET_PARAM, 1},
+ {"get_prb_rsp_ttl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_PROBE_RESP_TTL, GET_PARAM, 0},
+ {"set_mu_ppdu_dur",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MU_PPDU_DURATION, SET_PARAM, 1},
+ {"get_mu_ppdu_dur",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MU_PPDU_DURATION, GET_PARAM, 0},
+ {"set_tbtt_ctrl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TBTT_CTRL, SET_PARAM, 1},
+ {"get_tbtt_ctrl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_TBTT_CTRL, GET_PARAM, 0},
+ {"self_obss_pd_tx_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SET_CMD_OBSS_PD_THRESHOLD_ENABLE,
+ SET_PARAM, 1},
+ {"get_self_obss_pd_tx_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SET_CMD_OBSS_PD_THRESHOLD_ENABLE,
+ GET_PARAM, 0},
+ {"get_rchwidth",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_RCHWIDTH, GET_PARAM, 0},
+ {"hw_mode",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HW_MODE, SET_PARAM, 1},
+ {"get_hw_mode",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HW_MODE, GET_PARAM, 0},
+#if DBDC_REPEATER_SUPPORT
+ {"samessid_disable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_SAME_SSID_DISABLE, SET_PARAM, 1},
+#endif
+ {"get_mbss_en",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_MBSS_EN, GET_PARAM, 0},
+ {"chan_coex_disable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHAN_COEX, SET_PARAM, 1},
+ {"g_chan_coex_disable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CHAN_COEX, GET_PARAM, 0},
+ {"oob_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_OOB_ENABLE, SET_PARAM, 1},
+ {"g_oob_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_OOB_ENABLE, GET_PARAM, 0},
+ {"hw_mode_omn_timer",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HW_MODE_SWITCH_OMN_TIMER, SET_PARAM, 1},
+ {"get_hw_mode_omn_timer",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HW_MODE_SWITCH_OMN_TIMER, GET_PARAM, 0},
+ {"hw_mode_omn_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HW_MODE_SWITCH_OMN_ENABLE, SET_PARAM, 1},
+ {"get_hw_mode_omn_enable",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HW_MODE_SWITCH_OMN_ENABLE, GET_PARAM, 0},
+ {"hw_mode_primary",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_HW_MODE_SWITCH_PRIMARY_IF, SET_PARAM, 1},
+ {"g_psoc_num_vdevs",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_GET_PSOC_NUM_VDEVS, GET_PARAM, 0},
+ {"g_psoc_num_peers",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_GET_PSOC_NUM_PEERS, GET_PARAM, 0},
+ {"g_pdev_num_vdevs",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_GET_PDEV_NUM_VDEVS, GET_PARAM, 0},
+ {"g_pdev_num_peers",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_GET_PDEV_NUM_PEERS, GET_PARAM, 0},
+ {"g_pdev_num_monitor_vdevs",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_GET_PDEV_NUM_MONITOR_VDEVS, GET_PARAM, 0},
+ {"set_opclass_tbl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_OPCLASS_TBL, SET_PARAM, 1},
+#ifdef CE_TASKLET_DEBUG_ENABLE
+ {"ce_debug_stats",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ENABLE_CE_LATENCY_STATS, SET_PARAM, 1},
+#endif
+ {"get_opclass_tbl",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_OPCLASS_TBL, GET_PARAM, 0},
+#ifdef QCA_SUPPORT_ADFS_RCAC
+ {"rCACEn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ROLLING_CAC_ENABLE, SET_PARAM, 1},
+ {"get_rCACEn",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_ROLLING_CAC_ENABLE, GET_PARAM, 0},
+ {"rCAC_freq",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CONFIGURE_RCAC_FREQ, SET_PARAM, 1},
+ {"get_rCACfreq",
+ OL_ATH_PARAM_SHIFT | OL_ATH_PARAM_CONFIGURE_RCAC_FREQ, GET_PARAM, 0},
+#endif
+#if ATH_SUPPORT_DFS
+ {"scan_over_cac_en",
+ OL_ATH_PARAM_SHIFT | OL_ATH_SCAN_OVER_CAC, SET_PARAM, 1},
+#endif
+ {"setCountryID",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_COUNTRY_ID, SET_PARAM, 1},
+ {"getCountryID",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_COUNTRY_ID, GET_PARAM, 0},
+ {"dl_reportsize",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_DBGLOG_REPORT_SIZE, SET_PARAM, 1},
+ {"dl_tstamprez",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_DBGLOG_TSTAMP_RESOLUTION, SET_PARAM, 1},
+ {"dl_reporten",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_DBGLOG_REPORTING_ENABLED, SET_PARAM, 1},
+ {"dl_loglevel",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_DBGLOG_LOG_LEVEL, SET_PARAM, 1},
+ {"dl_vapon",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_DBGLOG_VAP_ENABLE, SET_PARAM, 1},
+ {"dl_vapoff",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_DBGLOG_VAP_DISABLE, SET_PARAM, 1},
+ {"dl_modon",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_DBGLOG_MODULE_ENABLE, SET_PARAM, 1},
+ {"dl_modoff",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_DBGLOG_MODULE_DISABLE, SET_PARAM, 1},
+ {"disp_tpc",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_DISP_TPC, SET_PARAM, 1},
+ {"setCH144",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_ENABLE_CH_144, SET_PARAM, 1},
+ {"getCH144",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_ENABLE_CH_144, GET_PARAM, 0},
+ {"setRegdomain",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_REGDOMAIN, SET_PARAM, 1},
+ {"getRegdomain",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_REGDOMAIN, GET_PARAM, 0},
+ {"enable_ol_stats",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_ENABLE_OL_STATS, SET_PARAM, 1},
+ {"ol_stats_status",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_ENABLE_OL_STATS, GET_PARAM, 0},
+ {"enable_macreq",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_ENABLE_MAC_REQ, SET_PARAM, 1},
+ {"prof_id_enable",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_WLAN_PROFILE_ID_ENABLE, SET_PARAM, 1},
+ {"prof_trigger",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_WLAN_PROFILE_TRIGGER, SET_PARAM, 1},
+ {"setCH144EppOvrd",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_ENABLE_CH144_EPPR_OVRD, SET_PARAM, 1},
+ {"getCH144EppOvrd",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_ENABLE_CH144_EPPR_OVRD, GET_PARAM, 0},
+ {"data_txstats",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_ENABLE_PERPKT_TXSTATS, SET_PARAM, 1},
+ {"g_data_txstats",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_ENABLE_PERPKT_TXSTATS, GET_PARAM, 0},
+ {"enable_statsv2",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_ENABLE_OL_STATSv2, SET_PARAM, 1},
+ {"bsta_fixed_idmask",
+ OL_SPECIAL_PARAM_SHIFT | OL_SPECIAL_PARAM_BSTA_FIXED_IDMASK, SET_PARAM, 1},
+ {"setHALparam", 35808, SET_PARAM, 1},
+ {"getHALparam", 35809, GET_PARAM, 0},
+ {"get_aggr_burst", 35821, GET_PARAM, 0},
+};
+#endif
+#endif
diff --git a/umac/cfr/core/inc/cfr_defs_i.h b/umac/cfr/core/inc/cfr_defs_i.h
deleted file mode 100644
index 9abee4a..0000000
--- a/umac/cfr/core/inc/cfr_defs_i.h
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
- * Copyright (c) 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.
- */
-
-#ifndef _CFR_DEFS_I_H_
-#define _CFR_DEFS_I_H_
-
-#include <wlan_objmgr_cmn.h>
-#include <wlan_objmgr_global_obj.h>
-#include <wlan_objmgr_psoc_obj.h>
-#include <wlan_objmgr_pdev_obj.h>
-#include <wlan_objmgr_vdev_obj.h>
-#include <wlan_objmgr_peer_obj.h>
-#include <qdf_list.h>
-#include <qdf_timer.h>
-#include <qdf_util.h>
-#include <qdf_types.h>
-#include <wlan_cfr_utils_api.h>
-
-/**
- * wlan_cfr_psoc_obj_create_handler() - psoc object create handler for cfr
- * @psoc - pointer to psoc object
- * @args - void pointer in case it needs arguments
- *
- * Return: status of object creation
- */
-QDF_STATUS
-wlan_cfr_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg);
-
-/**
- * wlan_cfr_psoc_obj_destroy_handler() - psoc object destroy handler for cfr
- * @psoc - pointer to psoc object
- * @args - void pointer in case it needs arguments
- *
- * Return: status of destroy object
- */
-QDF_STATUS
-wlan_cfr_psoc_obj_destroy_handler(struct wlan_objmgr_psoc *psoc, void *arg);
-
-/**
- * wlan_cfr_pdev_obj_create_handler() - pdev object create handler for cfr
- * @pdev - pointer to pdev object
- * @args - void pointer in case it needs arguments
- *
- * Return: status of object creation
- */
-QDF_STATUS
-wlan_cfr_pdev_obj_create_handler(struct wlan_objmgr_pdev *pdev, void *arg);
-
-/**
- * wlan_cfr_pdev_obj_destroy_handler() - pdev object destroy handler for cfr
- * @pdev - pointer to pdev object
- * @args - void pointer in case it needs arguments
- *
- * Return: status of destroy object
- */
-QDF_STATUS
-wlan_cfr_pdev_obj_destroy_handler(struct wlan_objmgr_pdev *pdev, void *arg);
-
-/**
- * wlan_cfr_peer_obj_create_handler() - peer object create handler for cfr
- * @peer - pointer to peer object
- * @args - void pointer in case it needs arguments
- *
- * Return: status of object creation
- */
-QDF_STATUS
-wlan_cfr_peer_obj_create_handler(struct wlan_objmgr_peer *peer, void *arg);
-
-/**
- * wlan_cfr_peer_obj_destroy_handler() - peer object destroy handler for cfr
- * @peer - pointer to peer object
- * @args - void pointer in case it needs arguments
- *
- * Return: status ofi destry object
- */
-QDF_STATUS
-wlan_cfr_peer_obj_destroy_handler(struct wlan_objmgr_peer *peer, void *arg);
-
-/**
- * cfr_streamfs_init() - stream filesystem init
- * @pdev - pointer to pdev object
- *
- * Return: status of fs init
- */
-QDF_STATUS
-cfr_streamfs_init(struct wlan_objmgr_pdev *pdev);
-
-/**
- * cfr_streamfs_remove() - stream filesystem remove
- * @pdev - pointer to pdev object
- *
- * Return: status of fs remove
- */
-QDF_STATUS
-cfr_streamfs_remove(struct wlan_objmgr_pdev *pdev);
-
-/**
- * cfr_streamfs_write() - write to stream filesystem
- * @pa - pointer to pdev_cfr object
- * @write_data - Pointer to data
- * @write_len - data len
- *
- * Return: status of fs write
- */
-QDF_STATUS
-cfr_streamfs_write(struct pdev_cfr *pa, const void *write_data,
- size_t write_len);
-
-/**
- * cfr_streamfs_flush() - flush the write to streamfs
- * @pa - pointer to pdev_cfr object
- *
- * Return: status of fs flush
- */
-QDF_STATUS
-cfr_streamfs_flush(struct pdev_cfr *pa);
-
-#endif
diff --git a/umac/cfr/core/src/cfr_common.c b/umac/cfr/core/src/cfr_common.c
deleted file mode 100644
index a963b43..0000000
--- a/umac/cfr/core/src/cfr_common.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/*
- * Copyright (c) 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.
- */
-
-#include <cfr_defs_i.h>
-#include <qdf_types.h>
-#include <osif_private.h>
-#include <ol_if_athvar.h>
-#include <wlan_objmgr_pdev_obj.h>
-#include <wlan_objmgr_vdev_obj.h>
-#include <wlan_objmgr_peer_obj.h>
-#include <wlan_cfr_tgt_api.h>
-#include <qal_streamfs.h>
-#include <relay.h>
-#include <debugfs.h>
-#include <target_if.h>
-
-QDF_STATUS
-wlan_cfr_psoc_obj_create_handler(struct wlan_objmgr_psoc *psoc, void *arg)
-{
- struct psoc_cfr *cfr_sc = NULL;
-
- cfr_sc = (struct psoc_cfr *)qdf_mem_malloc(sizeof(struct psoc_cfr));
- if (NULL == cfr_sc) {
- cfr_err("Failed to allocate cfr_ctx object\n");
- return QDF_STATUS_E_NOMEM;
- }
-
- qdf_mem_zero(cfr_sc, sizeof(struct psoc_cfr));
- cfr_sc->psoc_obj = psoc;
-
- wlan_objmgr_psoc_component_obj_attach(psoc, WLAN_UMAC_COMP_CFR,
- (void *)cfr_sc,
- QDF_STATUS_SUCCESS);
-
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS
-wlan_cfr_psoc_obj_destroy_handler(struct wlan_objmgr_psoc *psoc, void *arg)
-{
- struct psoc_cfr *cfr_sc = NULL;
-
- cfr_sc = wlan_objmgr_psoc_get_comp_private_obj(psoc,
- WLAN_UMAC_COMP_CFR);
- if (NULL != cfr_sc) {
- wlan_objmgr_psoc_component_obj_detach(psoc, WLAN_UMAC_COMP_CFR,
- (void *)cfr_sc);
- qdf_mem_free(cfr_sc);
- }
-
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS
-wlan_cfr_pdev_obj_create_handler(struct wlan_objmgr_pdev *pdev, void *arg)
-{
- struct pdev_cfr *pa = NULL;
-
- if (NULL == pdev) {
- cfr_err("PDEV is NULL\n");
- return QDF_STATUS_E_FAILURE;
- }
-
- pa = (struct pdev_cfr *)qdf_mem_malloc(sizeof(struct pdev_cfr));
- if (NULL == pa) {
- cfr_err("Failed to allocate pdev_cfr object\n");
- return QDF_STATUS_E_NOMEM;
- }
- qdf_mem_zero(pa, sizeof(struct pdev_cfr));
- pa->pdev_obj = pdev;
-
- wlan_objmgr_pdev_component_obj_attach(pdev, WLAN_UMAC_COMP_CFR,
- (void *)pa, QDF_STATUS_SUCCESS);
-
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS
-wlan_cfr_pdev_obj_destroy_handler(struct wlan_objmgr_pdev *pdev, void *arg)
-{
- struct pdev_cfr *pa = NULL;
-
- if (NULL == pdev) {
- cfr_err("PDEV is NULL\n");
- return QDF_STATUS_E_FAILURE;
- }
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
- if (NULL != pa) {
- wlan_objmgr_pdev_component_obj_detach(pdev, WLAN_UMAC_COMP_CFR,
- (void *)pa);
- qdf_mem_free(pa);
- }
-
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS
-wlan_cfr_peer_obj_create_handler(struct wlan_objmgr_peer *peer, void *arg)
-{
- struct peer_cfr *pe = NULL;
-
- if (NULL == peer) {
- cfr_err("PEER is NULL\n");
- return QDF_STATUS_E_FAILURE;
- }
-
- pe = (struct peer_cfr *)qdf_mem_malloc(sizeof(struct peer_cfr));
- if (NULL == pe) {
- cfr_err("Failed to allocate peer_cfr object\n");
- return QDF_STATUS_E_FAILURE;
- }
-
- pe->peer_obj = peer;
-
- /* Remaining will be populated when we give CFR capture command */
- wlan_objmgr_peer_component_obj_attach(peer, WLAN_UMAC_COMP_CFR,
- (void *)pe, QDF_STATUS_SUCCESS);
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS
-wlan_cfr_peer_obj_destroy_handler(struct wlan_objmgr_peer *peer, void *arg)
-{
- struct peer_cfr *pe = NULL;
- struct wlan_objmgr_vdev *vdev;
- struct wlan_objmgr_pdev *pdev = NULL;
- struct pdev_cfr *pa = NULL;
-
- if (NULL == peer) {
- cfr_err("PEER is NULL\n");
- return QDF_STATUS_E_FAILURE;
- }
-
- vdev = wlan_peer_get_vdev(peer);
- if (vdev)
- pdev = wlan_vdev_get_pdev(vdev);
-
- if (pdev)
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev,
- WLAN_UMAC_COMP_CFR);
-
- pe = wlan_objmgr_peer_get_comp_private_obj(peer, WLAN_UMAC_COMP_CFR);
-
- if (pa && pe) {
- if (pe->period && pe->request)
- pa->cfr_current_sta_count--;
- }
-
- if (NULL != pe) {
- wlan_objmgr_peer_component_obj_detach(peer, WLAN_UMAC_COMP_CFR,
- (void *)pe);
- qdf_mem_free(pe);
- }
-
- return QDF_STATUS_SUCCESS;
-}
-
-/**
- * create_buf_file_handler() - Create streamfs buffer file
- * @filename: base name of files to create, NULL for buffering only
- * @parent: dentry of parent directory, NULL for root directory
- * @mode: filemode
- * @rchan_buf: streamfs channel buf
- *
- * Returns dentry if successful, NULL otherwise.
- */
-static struct dentry *create_buf_file_handler(const char *filename,
- struct dentry *parent,
- umode_t mode,
- struct rchan_buf *buf,
- int *is_global)
-{
- struct qal_dentry_t *buf_file;
- *is_global = 1;
- buf_file = qal_streamfs_create_file(filename, mode,
- (struct qal_dentry_t *)parent,
- (struct qal_streamfs_chan_buf *)buf);
-
- if (!buf_file) {
- cfr_err("Chan buffer creation failed\n");
- return NULL;
- }
-
- return (struct dentry *)buf_file;
-}
-
-/**
- * remove_buf_file_handler() - Remove streamfs buffer file
- * @dentry:dentry
- */
-static int remove_buf_file_handler(struct dentry *dentry)
-{
- qal_streamfs_remove_file((struct qal_dentry_t *)dentry);
-
- return 0;
-}
-
-static struct rchan_callbacks cfr_streamfs_cb = {
- .create_buf_file = create_buf_file_handler,
- .remove_buf_file = remove_buf_file_handler,
-};
-
-QDF_STATUS cfr_streamfs_init(struct wlan_objmgr_pdev *pdev)
-{
- struct pdev_cfr *pa = NULL;
- char folder[32];
- struct net_device *pdev_netdev;
- struct ol_ath_softc_net80211 *scn;
- struct target_pdev_info *tgt_hdl;
-
- if (pdev == NULL) {
- cfr_err("PDEV is NULL\n");
- return QDF_STATUS_E_FAILURE;
- }
-
- tgt_hdl = wlan_pdev_get_tgt_if_handle(pdev);
-
- if (!tgt_hdl) {
- cfr_err("target_pdev_info is NULL\n");
- return QDF_STATUS_E_FAILURE;
- }
-
- scn = target_pdev_get_feature_ptr(tgt_hdl);
- pdev_netdev = scn->netdev;
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
-
- if (pa == NULL) {
- cfr_err("pdev_cfr is NULL\n");
- return QDF_STATUS_E_FAILURE;
- }
-
- if (!pa->is_cfr_capable) {
- cfr_err("CFR IS NOT SUPPORTED\n");
- return QDF_STATUS_E_FAILURE;
- }
-
- snprintf(folder, sizeof(folder), "cfr%s", pdev_netdev->name);
-
- pa->dir_ptr = qal_streamfs_create_dir((const char *)folder, NULL);
-
- if (!pa->dir_ptr) {
- cfr_err("Directory create failed");
- return QDF_STATUS_E_FAILURE;
- }
-
- pa->chan_ptr = qal_streamfs_open("cfr_dump", pa->dir_ptr,
- pa->subbuf_size, pa->num_subbufs,
- (struct qal_streamfs_chan_callbacks *)&cfr_streamfs_cb,
- NULL);
-
- if (!pa->chan_ptr) {
- cfr_err("Chan create failed");
- qal_streamfs_remove_dir_recursive(pa->dir_ptr);
- pa->dir_ptr = NULL;
- return QDF_STATUS_E_FAILURE;
- }
-
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS cfr_streamfs_remove(struct wlan_objmgr_pdev *pdev)
-{
- struct pdev_cfr *pa = NULL;
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
- if (pa) {
- if (pa->chan_ptr) {
- qal_streamfs_close(pa->chan_ptr);
- pa->chan_ptr = NULL;
- }
-
- if (pa->dir_ptr) {
- qal_streamfs_remove_dir_recursive(pa->dir_ptr);
- pa->dir_ptr = NULL;
- }
-
- } else
- return QDF_STATUS_E_FAILURE;
-
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS cfr_streamfs_write(struct pdev_cfr *pa, const void *write_data,
- size_t write_len)
-{
- if (pa->chan_ptr) {
-
- /* write to channel buffer */
- qal_streamfs_write(pa->chan_ptr, (const void *)write_data,
- write_len);
- } else
- return QDF_STATUS_E_FAILURE;
-
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS cfr_streamfs_flush(struct pdev_cfr *pa)
-{
- if (pa->chan_ptr) {
-
- /* Flush the data write to channel buffer */
- qal_streamfs_flush(pa->chan_ptr);
- } else
- return QDF_STATUS_E_FAILURE;
-
- return QDF_STATUS_SUCCESS;
-}
diff --git a/umac/cfr/dispatcher/inc/wlan_cfr_tgt_api.h b/umac/cfr/dispatcher/inc/wlan_cfr_tgt_api.h
deleted file mode 100644
index b9d3b28..0000000
--- a/umac/cfr/dispatcher/inc/wlan_cfr_tgt_api.h
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 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.
- */
-
-#ifndef _WLAN_CFR_TGT_API_H_
-#define _WLAN_CFR_TGT_API_H_
-
-#include <wlan_objmgr_peer_obj.h>
-#include <wlan_objmgr_pdev_obj.h>
-#include <wlan_objmgr_cmn.h>
-#include <qdf_types.h>
-
-/* tgt layer has APIs in application, to access functions in target
- * through tx_ops.
- */
-
-/**
- * tgt_cfr_init_pdev() - API that registers CFR to handlers.
- * @pdev: pointer to pdev_object
- *
- * Return: success/failure of init
- */
-int tgt_cfr_init_pdev(struct wlan_objmgr_pdev *pdev);
-
-/**
- * tgt_cfr_deinit_pdev() - API that de-registers CFR to handlers.
- * @pdev: pointer to pdev_object
- *
- * Return: success/failure of de-init
- */
-int tgt_cfr_deinit_pdev(struct wlan_objmgr_pdev *pdev);
-
-/**
- * tgt_cfr_get_target_type() - API to determine target type.
- * @psoc: pointer to psoc_object
- *
- * Return: enum value of target type
- */
-int tgt_cfr_get_target_type(struct wlan_objmgr_psoc *psoc);
-
-/**
- * tgt_cfr_start_capture() - API to start cfr capture on a peer.
- * @pdev: pointer to pdev_object
- * @peer: pointer to peer_object
- * @cfr_params: pointer to config cfr_params
- *
- * Return: success/failure of start capture
- */
-int tgt_cfr_start_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer,
- struct cfr_capture_params *cfr_params);
-
-/**
- * tgt_cfr_stop_capture() - API to stop cfr capture on a peer.
- * @pdev: pointer to pdev_object
- * @peer: pointer to peer_object
- *
- * Return: success/failure of stop capture
- */
-int tgt_cfr_stop_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer);
-
-/**
- * tgt_cfr_enable_cfr_timer() - API to enable cfr timer
- * @pdev: pointer to pdev_object
- * @cfr_timer: Amount of time this timer has to run. If 0, it disables timer.
- *
- * Return: success/failure of timer enable
- */
-int
-tgt_cfr_enable_cfr_timer(struct wlan_objmgr_pdev *pdev, uint32_t cfr_timer);
-
-/**
- * tgt_cfr_support_set() - API to set cfr support
- * @psoc: pointer to psoc_object
- * @value: value to be set
- */
-void tgt_cfr_support_set(struct wlan_objmgr_psoc *psoc, uint32_t value);
-
-/**
- * tgt_cfr_info_send() - API to send cfr info
- * @pdev: pointer to pdev_object
- * @head: pointer to cfr info head
- * @hlen: head len
- * @data: pointer to cfr info data
- * @dlen: data len
- * @tail: pointer to cfr info tail
- * @tlen: tail len
- *
- * Return: success/failure of cfr info send
- */
-uint32_t tgt_cfr_info_send(struct wlan_objmgr_pdev *pdev, void *head,
- size_t hlen, void *data, size_t dlen, void *tail,
- size_t tlen);
-
-#ifdef WLAN_ENH_CFR_ENABLE
-/**
- * tgt_cfr_config_rcc() - API to set RCC
- * @pdev: pointer to pdev_object
- * @rcc_param: rcc configurations
- *
- * Return: succcess / failure
- */
-QDF_STATUS tgt_cfr_config_rcc(struct wlan_objmgr_pdev *pdev,
- struct cfr_rcc_param *rcc_param);
-
-/**
- * tgt_cfr_start_lut_age_timer() - API to start timer to flush aged out LUT
- * entries
- * @pdev: pointer to pdev_object
- *
- * Return: None
- */
-void tgt_cfr_start_lut_age_timer(struct wlan_objmgr_pdev *pdev);
-
-/**
- * tgt_cfr_stop_lut_age_timer() - API to stop timer to flush aged out LUT
- * entries
- * @pdev: pointer to pdev_object
- *
- * Return: None
- */
-void tgt_cfr_stop_lut_age_timer(struct wlan_objmgr_pdev *pdev);
-
-/**
- * tgt_cfr_default_ta_ra_cfg() - API to configure default values in TA_RA mode
- * entries
- * @pdev: pointer to pdev_object
- *
- * Return: none
- */
-void tgt_cfr_default_ta_ra_cfg(struct wlan_objmgr_pdev *pdev,
- struct cfr_rcc_param *rcc_param,
- bool allvalid, uint16_t reset_cfg);
-
-/**
- * tgt_cfr_dump_lut_enh() - Print all LUT entries
- * @pdev: pointer to pdev_object
- */
-void tgt_cfr_dump_lut_enh(struct wlan_objmgr_pdev *pdev);
-
-/**
- * tgt_cfr_rx_tlv_process() - Process PPDU status TLVs
- * @pdev_obj: pointer to pdev_object
- * @nbuf: pointer to cdp_rx_indication_ppdu
- */
-void tgt_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf);
-
-/**
- * tgt_cfr_update_global_cfg() - Update global config after successful commit
- * @pdev: pointer to pdev_object
- */
-void tgt_cfr_update_global_cfg(struct wlan_objmgr_pdev *pdev);
-#endif
-#endif
diff --git a/umac/cfr/dispatcher/inc/wlan_cfr_ucfg_api.h b/umac/cfr/dispatcher/inc/wlan_cfr_ucfg_api.h
deleted file mode 100644
index b117727..0000000
--- a/umac/cfr/dispatcher/inc/wlan_cfr_ucfg_api.h
+++ /dev/null
@@ -1,267 +0,0 @@
-/*
- * Copyright (c) 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.
- */
-
-#ifndef _WLAN_CFR_UCFG_API_H_
-#define _WLAN_CFR_UCFG_API_H_
-
-#include <wlan_objmgr_peer_obj.h>
-#include <wlan_objmgr_pdev_obj.h>
-#include <ieee80211_ioctl.h>
-
-#define MAX_CFR_PRD (10*60*1000) /* 10 minutes */
-
-/**
- * ucfg_cfr_start_capture() - function to start cfr capture for connected client
- * @pdev: pointer to pdev object
- * @peer: pointer to peer object
- * @cfr_params: config params to cfr capture
- *
- * Return: status of start capture.
- */
-int ucfg_cfr_start_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer,
- struct cfr_capture_params *cfr_params);
-
-/**
- * ucfg_cfr_stop_capture() - function to stop cfr capture for connected client
- * @pdev: pointer to pdev object
- * @peer: pointer to peer object
- *
- * Return: status of stop capture.
- */
-int ucfg_cfr_stop_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer);
-
-/**
- * ucfg_cfr_start_capture_probe_req() - function to start cfr capture for
- * unassociated clients
- * @pdev: pointer to pdev object
- * @unassoc_mac: mac address of un-associated client
- * @cfr_params: config params to cfr capture
- *
- * Return: status of start capture.
- */
-int ucfg_cfr_start_capture_probe_req(struct wlan_objmgr_pdev *pdev,
- struct qdf_mac_addr *unassoc_mac,
- struct cfr_capture_params *params);
-
-/**
- * ucfg_cfr_stop_capture_probe_req() - function to stop cfr capture for
- * unassociated cleints
- * @pdev: pointer to pdev object
- * @unassoc_mac: mac address of un-associated client
- *
- * Return: status of stop capture.
- */
-int ucfg_cfr_stop_capture_probe_req(struct wlan_objmgr_pdev *pdev,
- struct qdf_mac_addr *unassoc_mac);
-
-/**
- * ucfg_cfr_list_peers() - Lists total number of peers with cfr capture enabled
- * @pdev: pointer to pdev object
- *
- * Return: number of peers with cfr capture enabled
- */
-int ucfg_cfr_list_peers(struct wlan_objmgr_pdev *pdev);
-
-/**
- * ucfg_cfr_set_timer() - function to enable cfr timer
- * @pdev: pointer to pdev object
- * @value: value to be set
- *
- * Return: status of timer enable
- */
-int ucfg_cfr_set_timer(struct wlan_objmgr_pdev *pdev, uint32_t value);
-
-/**
- * ucfg_cfr_get_timer() - function to get cfr_timer_enable
- * @pdev: pointer to pdev object
- *
- * Return: value of cfr_timer_enable
- */
-int ucfg_cfr_get_timer(struct wlan_objmgr_pdev *pdev);
-
-#ifdef WLAN_ENH_CFR_ENABLE
-/* Channel capture recipe filters */
-enum capture_type {
- RCC_DIRECTED_FTM_FILTER,
- RCC_ALL_FTM_ACK_FILTER,
- RCC_DIRECTED_NDPA_NDP_FILTER,
- RCC_NDPA_NDP_ALL_FILTER,
- RCC_TA_RA_FILTER,
- RCC_ALL_PACKET_FILTER,
- RCC_DIS_ALL_MODE,
-};
-
-/**
- * ucfg_cfr_set_rcc_mode() - function to set RCC mode
- * @vdev: pointer to vdev object
- * @mode: capture type passed by user
- * @value: Enable/Disable capture mode
- *
- * Return: status if the mode is set or not
- */
-QDF_STATUS ucfg_cfr_set_rcc_mode(struct wlan_objmgr_vdev *vdev,
- enum capture_type mode, uint8_t value);
-
-/**
- * ucfg_cfr_get_rcc_enabled() - function to get RCC mode
- * @vdev: pointer to vdev object
- *
- * Return: if the rcc is enabled or not
- */
-bool ucfg_cfr_get_rcc_enabled(struct wlan_objmgr_vdev *vdev);
-
-/**
- * ucfg_cfr_set_tara_config() - function to configure TA/RA address and mask
- * @vdev: pointer to vdev object
- * @params: user config
- *
- * Return: status
- */
-QDF_STATUS ucfg_cfr_set_tara_config(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params);
-
-/**
- * ucfg_cfr_set_bw_nss() - function to configure nss and bandwidth
- * @vdev: pointer to vdev object
- * @params: user config
- *
- * Return: status
- */
-QDF_STATUS ucfg_cfr_set_bw_nss(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params);
-
-/**
- * ucfg_cfr_set_frame_type_subtype() - function to configure frame type/subtype
- * @vdev: pointer to vdev object
- * @params: user config
- *
- * Return: status
- */
-QDF_STATUS
-ucfg_cfr_set_frame_type_subtype(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params);
-
-/**
- * ucfg_cfr_set_capture_duration() - function to configure capture duration
- * @vdev: pointer to vdev object
- * @params: user config
- *
- * Return: status
- */
-QDF_STATUS
-ucfg_cfr_set_capture_duration(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params);
-
-/**
- * ucfg_cfr_set_capture_interval() - function to configure capture interval
- * @vdev: pointer to vdev object
- * @params: user config
- *
- * Return: status
- */
-QDF_STATUS
-ucfg_cfr_set_capture_interval(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params);
-
-/**
- * ucfg_cfr_set_en_bitmap() - function to configure 16-bit bitmap in TA_RA mode
- * @vdev: pointer to vdev object
- * @params: user config
- *
- * Return: status
- */
-QDF_STATUS ucfg_cfr_set_en_bitmap(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params);
-
-/**
- * ucfg_cfr_set_reset_bitmap() - function to clear all 9 params for all 16
- * groups in TA_RA mode
- * @vdev: pointer to vdev object
- * @params: user config
- *
- * Return: status
- */
-QDF_STATUS ucfg_cfr_set_reset_bitmap(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params);
-
-/**
- * ucfg_cfr_set_ul_mu_user_mask() - function to configure UL MU user mask
- * @vdev: pointer to vdev object
- * @params: user config
- *
- * Return: status
- */
-QDF_STATUS
-ucfg_cfr_set_ul_mu_user_mask(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params);
-
-/**
- * ucfg_cfr_set_freeze_tlv_delay_cnt() - function to configure freeze TLV delay
- * count threshold
- * @vdev: pointer to vdev object
- * @params: user config
- *
- * Return: status
- */
-QDF_STATUS
-ucfg_cfr_set_freeze_tlv_delay_cnt(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params);
-
-/**
- * ucfg_cfr_committed_rcc_config() - function to commit user config
- * @vdev: pointer to vdev object
- *
- * Return: status
- */
-QDF_STATUS ucfg_cfr_committed_rcc_config(struct wlan_objmgr_vdev *vdev);
-
-/**
- * ucfg_cfr_get_cfg() - function to display user config
- * @vdev: pointer to vdev object
- *
- * Return: status
- */
-QDF_STATUS ucfg_cfr_get_cfg(struct wlan_objmgr_vdev *vdev);
-
-/**
- * ucfg_cfr_rcc_dump_dbg_counters() - function to display PPDU counters
- * @vdev: pointer to vdev object
- *
- * Return: status
- */
-QDF_STATUS ucfg_cfr_rcc_dump_dbg_counters(struct wlan_objmgr_vdev *vdev);
-
-/**
- * ucfg_cfr_rcc_clr_dbg_counters() - function to clear CFR PPDU counters
- * @vdev: pointer to vdev object
- *
- * Return: status
- */
-QDF_STATUS ucfg_cfr_rcc_clr_dbg_counters(struct wlan_objmgr_vdev *vdev);
-
-/**
- * ucfg_cfr_rcc_dump_lut() - function to display lookup table
- * @vdev: pointer to vdev object
- *
- * Return: status
- */
-QDF_STATUS ucfg_cfr_rcc_dump_lut(struct wlan_objmgr_vdev *vdev);
-#endif
-#endif
diff --git a/umac/cfr/dispatcher/inc/wlan_cfr_utils_api.h b/umac/cfr/dispatcher/inc/wlan_cfr_utils_api.h
deleted file mode 100644
index 144af33..0000000
--- a/umac/cfr/dispatcher/inc/wlan_cfr_utils_api.h
+++ /dev/null
@@ -1,584 +0,0 @@
-/*
- * Copyright (c) 2019-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.
- */
-
-#ifndef _WLAN_CFR_UTILS_API_H_
-#define _WLAN_CFR_UTILS_API_H_
-
-#include <wlan_objmgr_cmn.h>
-#include <qal_streamfs.h>
-#ifdef WLAN_ENH_CFR_ENABLE
-#include <qdf_timer.h>
-#endif
-
-#define cfr_alert(format, args...) \
- QDF_TRACE_FATAL(QDF_MODULE_ID_CFR, format, ## args)
-
-#define cfr_err(format, args...) \
- QDF_TRACE_ERROR(QDF_MODULE_ID_CFR, format, ## args)
-
-#define cfr_warn(format, args...) \
- QDF_TRACE_WARN(QDF_MODULE_ID_CFR, format, ## args)
-
-#define cfr_info(format, args...) \
- QDF_TRACE_INFO(QDF_MODULE_ID_CFR, format, ## args)
-
-#define cfr_debug(format, args...) \
- QDF_TRACE_DEBUG(QDF_MODULE_ID_CFR, format, ## args)
-
-#define DBR_EVENT_TIMEOUT_IN_MS_CFR 1
-#define DBR_NUM_RESP_PER_EVENT_CFR 1
-#define MAX_CFR_ENABLED_CLIENTS 10
-#ifdef WLAN_ENH_CFR_ENABLE
-#define MAX_CFR_MU_USERS 4
-#define NUM_CHAN_CAPTURE_STATUS 4
-#define NUM_CHAN_CAPTURE_REASON 6
-#define MAX_TA_RA_ENTRIES 16
-#define MAX_RESET_CFG_ENTRY 0xFFFF
-#endif
-
-enum cfrmetaversion {
- CFR_META_VERSION_NONE,
- CFR_META_VERSION_1,
- CFR_META_VERSION_2,
- CFR_META_VERSION_3,
- CFR_META_VERSION_MAX = 0xFF,
-};
-
-enum cfrdataversion {
- CFR_DATA_VERSION_NONE,
- CFR_DATA_VERSION_1,
- CFR_DATA_VERSION_MAX = 0xFF,
-};
-
-enum cfrplatformtype {
- CFR_PLATFORM_TYPE_NONE,
- CFR_PLATFORM_TYPE_MIPS,
- CFR_PLATFORM_TYPE_ARM,
- CFR_PLATFFORM_TYPE_MAX = 0xFF,
-};
-
-enum cfrradiotype {
- CFR_CAPTURE_RADIO_NONE,
- CFR_CAPTURE_RADIO_OSPREY,
- CFR_CAPTURE_RADIO_PEAKCOCK,
- CFR_CAPTURE_RADIO_SCORPION,
- CFR_CAPTURE_RADIO_HONEYBEE,
- CFR_CAPTURE_RADIO_DRAGONFLY,
- CFR_CAPTURE_RADIO_JET,
- CFR_CAPTURE_RADIO_PEREGRINE = 17,
- CFR_CAPTURE_RADIO_SWIFT,
- CFR_CAPTURE_RADIO_BEELINER,
- CFR_CAPTURE_RADIO_CASCADE,
- CFR_CAPTURE_RADIO_DAKOTA,
- CFR_CAPTURE_RADIO_BESRA,
- CFR_CAPTURE_RADIO_HKV2,
- CFR_CAPTURE_RADIO_CYP,
- CFR_CAPTURE_RADIO_MAX = 0xFF,
-};
-
-enum ack_capture_mode {
- CFR_LEGACY_ACK = 0,
- CFR_DUP_LEGACY_ACK = 1,
- CFR_HT_ACK = 2,
- CFR_VHT_ACK = 3,
- CFR_INVALID_ACK, /*Always keep this at last*/
-};
-
-/* Similar to WMI_PEER_CFR_CAPTURE_METHOD used in one-shot capture */
-enum cfr_capture_type {
- CFR_TYPE_METHOD_NULL_FRAME = 0,
- CFR_TYPE_METHOD_NULL_FRAME_WITH_PHASE = 1,
- CFR_TYPE_METHOD_PROBE_RESP = 2,
- CFR_TYPE_METHOD_TM = 3,
- CFR_TYPE_METHOD_FTM = 4,
- CFR_TYPE_METHOD_ACK_RESP_TO_TM_FTM = 5,
- CFR_TYPE_METHOD_TA_RA_TYPE_FILTER = 6,
- CFR_TYPE_METHOD_NDPA_NDP = 7,
- CFR_TYPE_METHOD_ALL_PACKET = 8,
- /* Add new capture methods before this line */
- CFR_TYPE_METHOD_LAST_VALID,
- CFR_TYPE_METHOD_AUTO = 0xff,
- CFR_TYPE_METHOD_MAX,
-};
-
-struct cfr_metadata_version_1 {
- u_int8_t peer_addr[QDF_MAC_ADDR_SIZE];
- u_int8_t status;
- u_int8_t capture_bw;
- u_int8_t channel_bw;
- u_int8_t phy_mode;
- u_int16_t prim20_chan;
- u_int16_t center_freq1;
- u_int16_t center_freq2;
- u_int8_t capture_mode;
- u_int8_t capture_type;
- u_int8_t sts_count;
- u_int8_t num_rx_chain;
- u_int32_t timestamp;
- u_int32_t length;
-} __attribute__ ((__packed__));
-
-#define HOST_MAX_CHAINS 8
-
-struct cfr_metadata_version_2 {
- u_int8_t peer_addr[QDF_MAC_ADDR_SIZE];
- u_int8_t status;
- u_int8_t capture_bw;
- u_int8_t channel_bw;
- u_int8_t phy_mode;
- u_int16_t prim20_chan;
- u_int16_t center_freq1;
- u_int16_t center_freq2;
- u_int8_t capture_mode;
- u_int8_t capture_type;
- u_int8_t sts_count;
- u_int8_t num_rx_chain;
- u_int32_t timestamp;
- u_int32_t length;
- u_int32_t chain_rssi[HOST_MAX_CHAINS];
- u_int16_t chain_phase[HOST_MAX_CHAINS];
-} __attribute__ ((__packed__));
-
-#ifdef WLAN_ENH_CFR_ENABLE
-struct cfr_metadata_version_3 {
- u_int8_t status;
- u_int8_t capture_bw;
- u_int8_t channel_bw;
- u_int8_t phy_mode;
- u_int16_t prim20_chan;
- u_int16_t center_freq1;
- u_int16_t center_freq2;
- u_int8_t capture_mode; /* ack_capture_mode */
- u_int8_t capture_type; /* cfr_capture_type */
- u_int8_t sts_count;
- u_int8_t num_rx_chain;
- u_int32_t timestamp;
- u_int32_t length;
- u_int8_t is_mu_ppdu;
- u_int8_t num_mu_users;
- union {
- u_int8_t su_peer_addr[QDF_MAC_ADDR_SIZE];
- u_int8_t mu_peer_addr[MAX_CFR_MU_USERS][QDF_MAC_ADDR_SIZE];
- } peer_addr;
- u_int32_t chain_rssi[HOST_MAX_CHAINS];
- u_int16_t chain_phase[HOST_MAX_CHAINS];
-} __attribute__ ((__packed__));
-#endif
-
-struct csi_cfr_header {
- u_int32_t start_magic_num;
- u_int32_t vendorid;
- u_int8_t cfr_metadata_version;
- u_int8_t cfr_data_version;
- u_int8_t chip_type;
- u_int8_t pltform_type;
- u_int32_t Reserved;
-
- union {
- struct cfr_metadata_version_1 meta_v1;
- struct cfr_metadata_version_2 meta_v2;
-#ifdef WLAN_ENH_CFR_ENABLE
- struct cfr_metadata_version_3 meta_v3;
-#endif
- } u;
-} __attribute__ ((__packed__));
-
-/**
- * struct cfr_capture_params - structure to store cfr config param
- * bandwidth: bandwitdh of capture
- * period: period of capture
- * method: enum of method being followed to capture cfr data. 0-QoS null data
- */
-struct cfr_capture_params {
- u_int8_t bandwidth;
- u_int32_t period;
- u_int8_t method;
-};
-
-/**
- * struct psoc_cfr - private psoc object for cfr
- * psoc_obj: pointer to psoc object
- * is_cfr_capable: flag to determine if cfr is enabled or not
- */
-struct psoc_cfr {
- struct wlan_objmgr_psoc *psoc_obj;
- uint8_t is_cfr_capable;
-};
-
-/**
- * struct cfr_wmi_host_mem_chunk - wmi mem chunk related
- * vaddr: pointer to virtual address
- * paddr: physical address
- * len: len of the mem chunk allocated
- * req_id: reqid related to the mem chunk
- */
-struct cfr_wmi_host_mem_chunk {
- uint32_t *vaddr;
- uint32_t paddr;
- uint32_t len;
- uint32_t req_id;
-};
-
-struct whal_cfir_dma_hdr {
- uint16_t
- // 'BA'
- tag : 8,
- // '02', length of header in 4 octet units
- length : 6,
- // 00
- reserved : 2;
- uint16_t
- // [16]
- upload_done : 1,
- // [17:18], 0: invalid, 1: CFR, 2: CIR, 3: DebugH
- capture_type : 3,
- // [19:20], 0: Legacy, 1: HT, 2: VHT, 3: HE
- preamble_type : 2,
- // [21:23], 0: 1-stream, 1: 2-stream, ..., 7: 8-stream
- nss : 3,
- // [24:27], 0: invalid, 1: 1-chain, 2: 2-chain, etc.
- num_chains : 3,
- // [28:30], 0: 20 MHz, 1: 40 MHz, 2: 80 MHz, 3: 160 MHz
- upload_pkt_bw : 3, // [31]
- sw_peer_id_valid : 1;
- uint16_t
- sw_peer_id : 16; // [15:0]
- uint16_t
- phy_ppdu_id : 16; // [15:0]
-};
-
-#define MAX_LUT_ENTRIES 140 /* For HKv2 136 is max */
-
-/**
- * struct look_up_table - Placeholder for 2 asynchronous events (DBR and
- * TXRX event)
- * dbr_recv: Indicates whether WMI for DBR completion is received or not
- * tx_recv: Indicates whether WMI for TX completion (or) WDI event for RX
- * status is received or not
- * data: pointer to CFR data that ucode DMAs to host memory
- * data_len: length of CFR data DMAed by ucode
- * dbr_ppdu_id: PPDU id retrieved from DBR completion WMI event
- * tx_ppdu_id: PPDU id retrieved from WMI TX completion event (or) PPDU status
- * TLV
- * dbr_address: Physical address of the CFR data dump retrieved from DBR
- * completion WMI event
- * tx_address1: Physical address of the CFR data from TX/RX event
- * tx_address2: Physical address of the CFR data from TX/RX event
- * csi_cfr_header: CFR header constructed by host
- * whal_cfir_enhanced_hdr: CFR header constructed by ucode
- * tx_tstamp: Timestamp when TX/RX event was received
- * dbr_tstamp: Timestamp when DBR completion event was received
- * header_length: Length of header DMAed by ucode in words
- * payload_length: Length of CFR payload
- */
-struct look_up_table {
- bool dbr_recv;
- bool tx_recv;
- uint8_t *data; /* capture payload */
- uint32_t data_len; /* capture len */
- uint16_t dbr_ppdu_id; /* ppdu id from dbr */
- uint16_t tx_ppdu_id; /* ppdu id from TX event */
- qdf_dma_addr_t dbr_address; /* capture len */
- uint32_t tx_address1; /* capture len */
- uint32_t tx_address2; /* capture len */
- struct csi_cfr_header header;
- struct whal_cfir_dma_hdr dma_hdr;
- uint64_t txrx_tstamp;
- uint64_t dbr_tstamp;
- uint32_t header_length;
- uint32_t payload_length;
-};
-
-struct unassoc_pool_entry {
- struct qdf_mac_addr mac;
- struct cfr_capture_params cfr_params;
- bool is_valid;
-};
-
-#ifdef WLAN_ENH_CFR_ENABLE
-/**
- * struct ta_ra_cfr_cfg - structure to store configuration of 16 groups in
- * M_TA_RA mode
- * filter_group_id: Filter group number for which the below filters needs to be
- * applied
- * bw: CFR capture will be done for packets matching the bandwidths specified
- * within this bitmask
- * nss: CFR capture will be done for packets matching the Nss specified within
- * this bitmask
- * valid_ta: Ta_addr is valid if set
- * valid_ta_mask: Ta_addr_mask is valid if set
- * valid_ra: Ra_addr is valid if set
- * valid_ra_mask: Ra_addr_mask is valid if set
- * valid_bw_mask: Bandwidth is valid if set
- * valid_nss_mask: NSS is valid if set
- * valid_mgmt_subtype: Mgmt_subtype is valid if set
- * valid_ctrl_subtype: Ctrl_subtype is valid if set
- * valid_data_subtype: Data_subtype is valid if set
- * mgmt_subtype_filter: Managments Packets matching the subtype filter
- * categories will be filtered in by MAC for CFR capture.
- * ctrl_subtype_filter: Control Packets matching the subtype filter
- * categories will be filtered in by MAC for CFR capture.
- * data_subtype_filter: Data Packets matching the subtype filter
- * categories will be filtered in by MAC for CFR capture.
- * tx_addr: Packets whose transmitter address matches (tx_addr & tx_addr_mask)
- * will be filtered in by MAC
- * tx_addr_mask: Packets whose transmitter address matches (tx_addr &
- * tx_addr_mask) will be filtered in by MAC
- * rx_addr: Packets whose receiver address matches (rx_addr & rx_addr_mask)
- * will be filtered in by MAC
- * rx_addr_mask: Packets whose receiver address matches (rx_addr &
- * rx_addr_mask) will be filtered in by MAC
- */
-struct ta_ra_cfr_cfg {
- uint8_t filter_group_id;
- uint16_t bw :5,
- nss :8,
- rsvd0 :3;
- uint16_t valid_ta :1,
- valid_ta_mask :1,
- valid_ra :1,
- valid_ra_mask :1,
- valid_bw_mask :1,
- valid_nss_mask :1,
- valid_mgmt_subtype :1,
- valid_ctrl_subtype :1,
- valid_data_subtype :1,
- rsvd1 :7;
- uint16_t mgmt_subtype_filter;
- uint16_t ctrl_subtype_filter;
- uint16_t data_subtype_filter;
- uint8_t tx_addr[QDF_MAC_ADDR_SIZE];
- uint8_t rx_addr[QDF_MAC_ADDR_SIZE];
- uint8_t tx_addr_mask[QDF_MAC_ADDR_SIZE];
- uint8_t rx_addr_mask[QDF_MAC_ADDR_SIZE];
-
-} qdf_packed;
-
-/**
- * struct cfr_rcc_param - structure to store cfr config param
- * pdev_id: pdev_id for identifying the MAC
- * capture_duration: Capture Duration field for which CFR capture has to happen,
- * in microsecond units
- * capture_interval: Capture interval field which is time in between
- * consecutive CFR capture, in microsecond units
- * ul_mu_user_mask_lower: Bitfields indicates which of the users in the current
- * UL MU tranmission are enabled for CFR capture.
- * ul_mu_user_mask_upper: This is contiuation of the above lower mask.
- * freeze_tlv_delay_cnt_en: Enable Freeze TLV delay counter in MAC
- * freeze_tlv_delay_cnt_thr: Indicates the number of consecutive Rx packets to
- * be skipped before CFR capture is enabled again.
- * filter_group_bitmap: Bitfields set indicates which of the CFR group config is
- * enabled
- * m_directed_ftm: Filter Directed FTM ACK frames for CFR capture
- * m_all_ftm_ack: Filter All FTM ACK frames for CFR capture
- * m_ndpa_ndp_directed: Filter NDPA NDP Directed Frames for CFR capture
- * m_ndpa_ndp_all: Filter all NDPA NDP for CFR capture
- * m_ta_ra_filter: Filter Frames based on TA/RA/Subtype as provided in CFR Group
- * config
- * m_all_packet: Filter in All packets for CFR Capture
- * num_grp_tlvs: Indicates the number of groups in M_TA_RA mode, that have
- * changes in the current commit session, use to construct WMI group TLV(s)
- * curr: Placeholder for M_TA_RA group config in current commit session
- * modified_in_curr_session: Bitmap indicating number of groups in M_TA_RA mode
- * that have changed in current commit session.
- */
-struct cfr_rcc_param {
- uint8_t pdev_id;
- uint32_t capture_duration;
- uint32_t capture_interval;
- uint32_t ul_mu_user_mask_lower;
- uint32_t ul_mu_user_mask_upper;
- uint16_t freeze_tlv_delay_cnt_en :1,
- freeze_tlv_delay_cnt_thr :8,
- rsvd0 :7;
- uint16_t filter_group_bitmap;
- uint8_t m_directed_ftm : 1,
- m_all_ftm_ack : 1,
- m_ndpa_ndp_directed : 1,
- m_ndpa_ndp_all : 1,
- m_ta_ra_filter : 1,
- m_all_packet : 1,
- rsvd1 : 2;
- uint8_t num_grp_tlvs;
-
- struct ta_ra_cfr_cfg curr[MAX_TA_RA_ENTRIES];
- uint16_t modified_in_curr_session;
-};
-#endif /* WLAN_ENH_CFR_ENABLE */
-
-/**
- * struct pdev_cfr - private pdev object for cfr
- * pdev_obj: pointer to pdev object
- * is_cfr_capable: flag to determine if cfr is enabled or not
- * cfr_timer_enable: flag to enable/disable timer
- * cfr_mem_chunk: Region of memory used for storing cfr data
- * cfr_max_sta_count: Maximum stations supported in one-shot capture mode
- * num_subbufs: No. of sub-buffers used in relayfs
- * subbuf_size: Size of sub-buffer used in relayfs
- * chan_ptr: Channel in relayfs
- * dir_ptr: Parent directory of relayfs file
- * lut: lookup table used to store asynchronous DBR and TX/RX events for
- * correlation
- * dbr_buf_size: Size of DBR completion buffer
- * dbr_num_bufs: No. of DBR completions
- * tx_evt_cnt: No. of TX completion events till CFR stop was issued
- * total_tx_evt_cnt: No. of Tx completion events since wifi was up
- * dbr_evt_cnt: No. of WMI DBR completion events
- * release_cnt: No. of CFR data buffers relayed to userspace
- * rcc_param: Structure to store CFR config for the current commit session
- * global: Structure to store accumulated CFR config
- * rx_tlv_evt_cnt: Number of CFR WDI events from datapath
- * lut_age_timer: Timer to flush pending TXRX/DBR events in lookup table
- * lut_timer_init: flag to determine if lut_age_timer is initialized or not
- * is_cfr_rcc_capable: Flag to determine if RCC is enabled or not.
- * flush_dbr_cnt: No. of un-correlated DBR completions flushed when a newer PPDU
- * is correlated successfully with newer DBR completion
- * invalid_dma_length_cnt: No. of buffers for which CFR DMA header length (or)
- * data length was invalid
- * flush_timeout_dbr_cnt: No. of DBR completion flushed out in ageout logic
- * clear_txrx_event: No. of PPDU status TLVs over-written in LUT
- * unassoc_pool: Pool of un-associated clients used when capture method is
- * CFR_CAPTURE_METHOD_PROBE_RESPONSE
- * last_success_tstamp: DBR timestamp which indicates that both DBR and TX/RX
- * events have been received successfully.
- * cfr_dma_aborts: No. of CFR DMA aborts in ucode
- */
-/*
- * To be extended if we get more capbality info
- * from FW's extended service ready event.
- */
-struct pdev_cfr {
- struct wlan_objmgr_pdev *pdev_obj;
- uint8_t is_cfr_capable;
- uint8_t cfr_timer_enable;
- struct cfr_wmi_host_mem_chunk cfr_mem_chunk;
- uint16_t cfr_max_sta_count;
- uint16_t cfr_current_sta_count;
- uint32_t num_subbufs;
- uint32_t subbuf_size;
- struct qal_streamfs_chan *chan_ptr;
- struct qal_dentry_t *dir_ptr;
- struct look_up_table lut[MAX_LUT_ENTRIES];
- uint32_t dbr_buf_size;
- uint32_t dbr_num_bufs;
- uint64_t tx_evt_cnt;
- uint64_t total_tx_evt_cnt;
- uint64_t dbr_evt_cnt;
- uint64_t release_cnt;
-#ifdef WLAN_ENH_CFR_ENABLE
- struct cfr_rcc_param rcc_param;
- struct ta_ra_cfr_cfg global[MAX_TA_RA_ENTRIES];
- uint64_t rx_tlv_evt_cnt;
- qdf_timer_t lut_age_timer;
- uint8_t lut_timer_init;
- uint8_t is_cfr_rcc_capable;
- uint64_t flush_dbr_cnt;
- uint64_t invalid_dma_length_cnt;
- uint64_t flush_timeout_dbr_cnt;
- uint64_t clear_txrx_event;
- uint64_t last_success_tstamp;
- uint64_t cfr_dma_aborts;
-#endif
- struct unassoc_pool_entry unassoc_pool[MAX_CFR_ENABLED_CLIENTS];
- qdf_spinlock_t lut_lock;
-};
-
-#define PEER_CFR_CAPTURE_ENABLE 1
-#define PEER_CFR_CAPTURE_DISABLE 0
-/**
- * struct peer_cfr - private peer object for cfr
- * peer_obj: pointer to peer_obj
- * request: Type of request (start/stop)
- * bandwidth: bandwitdth of capture for this peer
- * capture_method: enum determining type of cfr data capture.
- * 0-Qos null data
- */
-struct peer_cfr {
- struct wlan_objmgr_peer *peer_obj;
- u_int8_t request; /* start/stop */
- u_int8_t bandwidth;
- u_int32_t period;
- u_int8_t capture_method;
-};
-
-/**
- * cfr_initialize_pdev() - cfr initialize pdev
- * @pdev: Pointer to pdev_obj
- *
- * Return: status of cfr pdev init
- */
-QDF_STATUS cfr_initialize_pdev(struct wlan_objmgr_pdev *pdev);
-
-/**
- * cfr_deinitialize_pdev() - cfr deinitialize pdev
- * @pdev: Pointer to pdev_obj
- *
- * Return: status of cfr pdev deinit
- */
-QDF_STATUS cfr_deinitialize_pdev(struct wlan_objmgr_pdev *pdev);
-
-/**
- * wlan_cfr_init() - Global init for cfr.
- *
- * Return: status of global init pass/fail
- */
-QDF_STATUS wlan_cfr_init(void);
-
-/**
- * wlan_cfr_deinit() - Global de-init for cfr.
- *
- * Return: status of global de-init pass/fail
- */
-QDF_STATUS wlan_cfr_deinit(void);
-
-/**
- * wlan_cfr_pdev_open() - pdev_open function for cfr.
- * @pdev: pointer to pdev object
- *
- * Return: status of pdev_open pass/fail
- */
-QDF_STATUS wlan_cfr_pdev_open(struct wlan_objmgr_pdev *pdev);
-
-/**
- * wlan_cfr_pdev_close() - pdev_close function for cfr.
- * @pdev: pointer to pdev object
- *
- * Return: status of pdev_close pass/fail
- */
-QDF_STATUS wlan_cfr_pdev_close(struct wlan_objmgr_pdev *pdev);
-
-/**
- * count_set_bits() - function to count set bits in a bitmap
- * @value: input bitmap
- *
- * Return: No. of set bits
- */
-uint8_t count_set_bits(uint32_t value);
-
-#ifdef WLAN_ENH_CFR_ENABLE
-/**
- * wlan_cfr_rx_tlv_process() - Process PPDU status TLVs and store info in
- * lookup table
- * @pdev_obj: PDEV object
- * @nbuf: ppdu info
- *
- * Return: none
- */
-void wlan_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf);
-#endif
-#endif
diff --git a/umac/cfr/dispatcher/src/wlan_cfr_tgt_api.c b/umac/cfr/dispatcher/src/wlan_cfr_tgt_api.c
deleted file mode 100644
index 93b6075..0000000
--- a/umac/cfr/dispatcher/src/wlan_cfr_tgt_api.c
+++ /dev/null
@@ -1,287 +0,0 @@
-/*
- * Copyright (c) 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.
- */
-
-/*
- * Layer b/w umac and target_if (ol) txops
- * It contains wrapers for txops
- */
-
-#include <wlan_cfr_tgt_api.h>
-#include <wlan_cfr_utils_api.h>
-#include <target_type.h>
-#include <cfr_defs_i.h>
-
-uint32_t tgt_cfr_info_send(struct wlan_objmgr_pdev *pdev, void *head,
- size_t hlen, void *data, size_t dlen, void *tail,
- size_t tlen)
-{
- struct pdev_cfr *pa;
- uint32_t status;
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
-
- if (pa == NULL) {
- cfr_err("pdev_cfr is NULL\n");
- return -1;
- }
-
- if (head)
- status = cfr_streamfs_write(pa, (const void *)head, hlen);
-
- if (data)
- status = cfr_streamfs_write(pa, (const void *)data, dlen);
-
- if (tail)
- status = cfr_streamfs_write(pa, (const void *)tail, tlen);
-
-
- /* finalise the write */
- status = cfr_streamfs_flush(pa);
-
- return status;
-}
-
-void tgt_cfr_support_set(struct wlan_objmgr_psoc *psoc, uint32_t value)
-{
- struct psoc_cfr *cfr_sc;
-
- if (psoc == NULL)
- return;
-
- cfr_sc = wlan_objmgr_psoc_get_comp_private_obj(psoc,
- WLAN_UMAC_COMP_CFR);
- if (cfr_sc == NULL)
- return;
-
- cfr_sc->is_cfr_capable = !!value;
- cfr_debug("CFR:%s FW support advert=%d\n", __func__,
- cfr_sc->is_cfr_capable);
-}
-
-static inline struct wlan_lmac_if_cfr_tx_ops *
- wlan_psoc_get_cfr_txops(struct wlan_objmgr_psoc *psoc)
-{
- return &((psoc->soc_cb.tx_ops.cfr_tx_ops));
-}
-
-int tgt_cfr_get_target_type(struct wlan_objmgr_psoc *psoc)
-{
- uint32_t target_type = 0;
- struct wlan_lmac_if_target_tx_ops *target_type_tx_ops;
-
- target_type_tx_ops = &psoc->soc_cb.tx_ops.target_tx_ops;
-
- if (target_type_tx_ops->tgt_get_tgt_type)
- target_type = target_type_tx_ops->tgt_get_tgt_type(psoc);
-
- return target_type;
-}
-
-int tgt_cfr_init_pdev(struct wlan_objmgr_pdev *pdev)
-{
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- int status = 0;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_init_pdev)
- status = cfr_tx_ops->cfr_init_pdev(psoc, pdev);
-
- if (status != 0)
- cfr_err("Error occurred with exit code %d\n", status);
-
- return status;
-}
-
-int tgt_cfr_deinit_pdev(struct wlan_objmgr_pdev *pdev)
-{
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- int status = 0;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_deinit_pdev)
- status = cfr_tx_ops->cfr_deinit_pdev(psoc, pdev);
-
- if (status != 0)
- cfr_err("Error occurred with exit code %d\n", status);
-
- return status;
-}
-
-int tgt_cfr_start_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer,
- struct cfr_capture_params *cfr_params)
-{
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- int status = 0;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_start_capture)
- status = cfr_tx_ops->cfr_start_capture(pdev, peer, cfr_params);
-
- if (status != 0)
- cfr_err("Error occurred with exit code %d\n", status);
-
- return status;
-}
-
-int tgt_cfr_stop_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer)
-{
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- int status = 0;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_stop_capture)
- status = cfr_tx_ops->cfr_stop_capture(pdev, peer);
-
- if (status != 0)
- cfr_err("Error occurred with exit code %d\n", status);
-
- return status;
-}
-
-int
-tgt_cfr_enable_cfr_timer(struct wlan_objmgr_pdev *pdev, uint32_t cfr_timer)
-{
- int status = 0;
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_enable_cfr_timer)
- status = cfr_tx_ops->cfr_enable_cfr_timer(pdev, cfr_timer);
-
- if (status != 0)
- cfr_err("Error occurred with exit code %d\n", status);
-
- return status;
-}
-
-#ifdef WLAN_ENH_CFR_ENABLE
-QDF_STATUS
-tgt_cfr_config_rcc(struct wlan_objmgr_pdev *pdev,
- struct cfr_rcc_param *rcc_param)
-{
- QDF_STATUS status = QDF_STATUS_SUCCESS;
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_config_rcc)
- status = cfr_tx_ops->cfr_config_rcc(pdev, rcc_param);
-
- if (status != QDF_STATUS_SUCCESS)
- cfr_err("Error occurred with exit code %d\n", status);
-
- return status;
-}
-
-void tgt_cfr_start_lut_age_timer(struct wlan_objmgr_pdev *pdev)
-{
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- if (!psoc) {
- cfr_err("Invalid PSOC: Flush LUT Timer cannot be started\n");
- return;
- }
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_start_lut_timer)
- cfr_tx_ops->cfr_start_lut_timer(pdev);
-}
-
-void tgt_cfr_stop_lut_age_timer(struct wlan_objmgr_pdev *pdev)
-{
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- if (!psoc) {
- cfr_err("Invalid PSOC: Flush LUT Timer cannot be stopped\n");
- return;
- }
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_stop_lut_timer)
- cfr_tx_ops->cfr_stop_lut_timer(pdev);
-}
-
-void tgt_cfr_default_ta_ra_cfg(struct wlan_objmgr_pdev *pdev,
- struct cfr_rcc_param *rcc_param,
- bool allvalid, uint16_t reset_cfg)
-{
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_default_ta_ra_cfg)
- cfr_tx_ops->cfr_default_ta_ra_cfg(rcc_param,
- allvalid, reset_cfg);
-}
-
-void tgt_cfr_dump_lut_enh(struct wlan_objmgr_pdev *pdev)
-{
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_dump_lut_enh)
- cfr_tx_ops->cfr_dump_lut_enh(pdev);
-}
-
-void tgt_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf)
-{
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_rx_tlv_process)
- cfr_tx_ops->cfr_rx_tlv_process(pdev, nbuf);
-}
-
-void tgt_cfr_update_global_cfg(struct wlan_objmgr_pdev *pdev)
-{
- struct wlan_lmac_if_cfr_tx_ops *cfr_tx_ops = NULL;
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- if (!psoc) {
- cfr_err("Invalid PSOC:Cannot update global config.\n");
- return;
- }
-
- cfr_tx_ops = wlan_psoc_get_cfr_txops(psoc);
-
- if (cfr_tx_ops->cfr_update_global_cfg)
- cfr_tx_ops->cfr_update_global_cfg(pdev);
-}
-#endif
diff --git a/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c b/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c
deleted file mode 100644
index f7638a9..0000000
--- a/umac/cfr/dispatcher/src/wlan_cfr_ucfg_api.c
+++ /dev/null
@@ -1,1130 +0,0 @@
-/*
- * Copyright (c) 2019-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 <wlan_cfr_ucfg_api.h>
-#include "../../core/inc/cfr_defs_i.h"
-#include <wlan_cfr_utils_api.h>
-#include <wlan_cfr_tgt_api.h>
-#include <wlan_objmgr_peer_obj.h>
-#include <wlan_objmgr_pdev_obj.h>
-#ifdef WLAN_ENH_CFR_ENABLE
-#include "cdp_txrx_ctrl.h"
-#endif
-
-#ifdef WLAN_ENH_CFR_ENABLE
-static bool cfr_is_filter_enabled(struct cfr_rcc_param *rcc_param)
-{
- if (rcc_param->m_directed_ftm ||
- rcc_param->m_all_ftm_ack ||
- rcc_param->m_ndpa_ndp_directed ||
- rcc_param->m_ndpa_ndp_all ||
- rcc_param->m_ta_ra_filter ||
- rcc_param->m_all_packet)
- return true;
- else
- return false;
-}
-#endif
-
-int ucfg_cfr_start_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer,
- struct cfr_capture_params *params)
-{
- int status;
- struct pdev_cfr *pa;
- struct peer_cfr *pe;
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
- if (NULL == pa) {
- cfr_err("PDEV cfr object is NULL!\n");
- return -EINVAL;
- }
-
- if (!(pa->is_cfr_capable)) {
- qdf_info("cfr is not supported on this chip\n");
- return -EINVAL;
- }
-
- /* Get peer private object */
- pe = wlan_objmgr_peer_get_comp_private_obj(peer, WLAN_UMAC_COMP_CFR);
- if (NULL == pe) {
- cfr_err("PEER cfr object is NULL!\n");
- return -EINVAL;
- }
-
- if ((params->period < 0) || (params->period > MAX_CFR_PRD) ||
- (params->period % 10)) {
- cfr_err("Invalid period value: %d\n", params->period);
- return -EINVAL;
- }
-
- if (!(params->period) && (pa->cfr_timer_enable)) {
- cfr_err("Single shot capture is not allowed during periodic capture\n");
- return -EINVAL;
- }
-
- if ((params->period) && !(pa->cfr_timer_enable)) {
- cfr_err("Global periodic timer is not enabled, configure global cfr timer\n");
- }
-
- if (params->period) {
- if (pa->cfr_current_sta_count == pa->cfr_max_sta_count) {
- cfr_err("max periodic cfr clients reached");
- return -EINVAL;
- }
- if (!(pe->request))
- pa->cfr_current_sta_count++;
- }
-
-#ifdef WLAN_ENH_CFR_ENABLE
- if (pa->is_cfr_rcc_capable && cfr_is_filter_enabled(&pa->rcc_param)) {
- cfr_err("This is not allowed since RCC is enabled");
- pa->cfr_timer_enable = 0;
- return -EINVAL;
- }
-#endif
-
- status = tgt_cfr_start_capture(pdev, peer, params);
-
- if (status == 0) {
- pe->bandwidth = params->bandwidth;
- pe->period = params->period;
- pe->capture_method = params->method;
- pe->request = PEER_CFR_CAPTURE_ENABLE;
- } else
- pa->cfr_current_sta_count--;
-
- return status;
-}
-
-int ucfg_cfr_start_capture_probe_req(struct wlan_objmgr_pdev *pdev,
- struct qdf_mac_addr *unassoc_mac,
- struct cfr_capture_params *params)
-{
- int idx, idx_to_insert = -1;
- struct pdev_cfr *pa;
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
- if (!pa) {
- cfr_err("Pdev cfr object is null!");
- return -EINVAL;
- }
-
- if (!(pa->is_cfr_capable)) {
- cfr_err("CFR is not supported on this chip");
- return -EINVAL;
- }
-
- if (pa->cfr_current_sta_count == pa->cfr_max_sta_count) {
- cfr_err("max cfr cleint reached");
- return -EINVAL;
- }
-
- for (idx = 0; idx < MAX_CFR_ENABLED_CLIENTS; idx++) {
- /* Store first invalid entry's index, to add mac entry if not
- * already present.
- */
- if (idx_to_insert < 0) {
- if (pa->unassoc_pool[idx].is_valid != true)
- idx_to_insert = idx;
- }
-
- /* Add new mac entry only if it is not present. If already
- * present, update the capture parameters
- */
- if (qdf_mem_cmp(&pa->unassoc_pool[idx].mac, unassoc_mac,
- sizeof(struct qdf_mac_addr)) == 0) {
- cfr_info("Node already present. Updating params");
- qdf_mem_copy(&pa->unassoc_pool[idx].cfr_params,
- params,
- sizeof(struct cfr_capture_params));
- pa->unassoc_pool[idx].is_valid = true;
- return 0;
- }
- }
-
- if (idx_to_insert < 0) {
- /* All the entries in the table are valid. So we have reached
- * max client capacity. To add a new client, capture on one of
- * the clients in table has to be stopped.
- */
- cfr_err("Maximum client capacity reached");
- return -EINVAL;
- }
-
- /* If control reaches here, we did not find mac in the table
- * and we have atleast one free entry in table.
- * Add the entry at index = idx_to_insert
- */
- qdf_mem_copy(&pa->unassoc_pool[idx_to_insert].mac,
- unassoc_mac, sizeof(struct qdf_mac_addr));
- qdf_mem_copy(&pa->unassoc_pool[idx_to_insert].cfr_params,
- params, sizeof(struct cfr_capture_params));
- pa->unassoc_pool[idx_to_insert].is_valid = true;
- pa->cfr_current_sta_count++;
-
- return 0;
-}
-
-int ucfg_cfr_stop_capture_probe_req(struct wlan_objmgr_pdev *pdev,
- struct qdf_mac_addr *unassoc_mac)
-{
- struct pdev_cfr *pa;
- int idx;
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
- if (!pa) {
- cfr_err("Pdev cfr object is NULL!\n");
- return -EINVAL;
- }
-
- if (!(pa->is_cfr_capable)) {
- cfr_err("CFR is not supported on this chip\n");
- return -EINVAL;
- }
-
- for (idx = 0; idx < MAX_CFR_ENABLED_CLIENTS; idx++) {
- /* Remove mac only if it is present */
- if (qdf_mem_cmp(&pa->unassoc_pool[idx].mac, unassoc_mac,
- sizeof(struct qdf_mac_addr)) == 0) {
- qdf_mem_zero(&pa->unassoc_pool[idx],
- sizeof(struct unassoc_pool_entry));
- pa->cfr_current_sta_count--;
- return 0;
- }
- }
-
- /* If mac was present in pool it would have been deleted in the
- * above loop and returned from there.
- * If control reached here, mac was not found. So, ignore the request.
- */
- cfr_err("Trying to delete mac not present in pool. Ignoring request.");
- return 0;
-}
-
-int ucfg_cfr_set_timer(struct wlan_objmgr_pdev *pdev, uint32_t value)
-{
- struct pdev_cfr *pa;
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
- if (pa == NULL) {
- cfr_err("PDEV cfr object is NULL!\n");
- return -EINVAL;
- }
-
- if (!(pa->is_cfr_capable)) {
- qdf_info("cfr is not supported on this chip\n");
- return -EINVAL;
- }
-
- return tgt_cfr_enable_cfr_timer(pdev, value);
-}
-qdf_export_symbol(ucfg_cfr_set_timer);
-
-int ucfg_cfr_get_timer(struct wlan_objmgr_pdev *pdev)
-{
- struct pdev_cfr *pa;
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
- if (pa == NULL) {
- cfr_err("PDEV cfr object is NULL!\n");
- return -EINVAL;
- }
-
- if (!(pa->is_cfr_capable)) {
- qdf_info("cfr is not supported on this chip\n");
- return -EINVAL;
- }
-
- return pa->cfr_timer_enable;
-}
-qdf_export_symbol(ucfg_cfr_get_timer);
-
-int ucfg_cfr_stop_capture(struct wlan_objmgr_pdev *pdev,
- struct wlan_objmgr_peer *peer)
-{
- int status;
- struct peer_cfr *pe;
- struct pdev_cfr *pa;
-
- pa = wlan_objmgr_pdev_get_comp_private_obj(pdev, WLAN_UMAC_COMP_CFR);
- if (pa == NULL) {
- cfr_err("PDEV cfr object is NULL!\n");
- return -EINVAL;
- }
-
- if (!(pa->is_cfr_capable)) {
- qdf_info("cfr is not supported on this chip\n");
- return -EINVAL;
- }
-
- pe = wlan_objmgr_peer_get_comp_private_obj(peer, WLAN_UMAC_COMP_CFR);
- if (pe == NULL) {
- cfr_err("PEER cfr object is NULL!\n");
- return -EINVAL;
- }
-
- if ((pe->period) && (pe->request))
- status = tgt_cfr_stop_capture(pdev, peer);
- else {
- qdf_info("periodic cfr not started for the client\n");
- return -EINVAL;
- }
-
- if (status == 0) {
- pe->request = PEER_CFR_CAPTURE_DISABLE;
- pa->cfr_current_sta_count--;
- }
-
- return status;
-}
-
-int ucfg_cfr_list_peers(struct wlan_objmgr_pdev *pdev)
-{
- return 0;
-}
-
-#ifdef WLAN_ENH_CFR_ENABLE
-
-static inline
-QDF_STATUS dev_sanity_check(struct wlan_objmgr_vdev *vdev,
- struct wlan_objmgr_pdev **ppdev,
- struct pdev_cfr **ppcfr)
-{
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- if (!vdev) {
- cfr_err("vdev is NULL\n");
- return QDF_STATUS_E_NULL_VALUE;
- }
-
- *ppdev = wlan_vdev_get_pdev(vdev);
-
- if (!*ppdev) {
- cfr_err("pdev is NULL\n");
- return QDF_STATUS_E_NULL_VALUE;
- }
-
- status = wlan_objmgr_pdev_try_get_ref(*ppdev, WLAN_CFR_ID);
- if (status != QDF_STATUS_SUCCESS) {
- cfr_err("Failed to get pdev reference\n");
- return status;
- }
-
- *ppcfr = wlan_objmgr_pdev_get_comp_private_obj(*ppdev,
- WLAN_UMAC_COMP_CFR);
-
- if (!(*ppcfr)) {
- cfr_err("pdev object for CFR is null");
- wlan_objmgr_pdev_release_ref(*ppdev, WLAN_CFR_ID);
- return QDF_STATUS_E_NULL_VALUE;
- }
-
- if (!(*ppcfr)->is_cfr_rcc_capable) {
- cfr_err("cfr is not supported on this chip\n");
- wlan_objmgr_pdev_release_ref(*ppdev, WLAN_CFR_ID);
- return QDF_STATUS_E_NOSUPPORT;
- }
-
- return status;
-}
-
-/*
- * This is needed only in case of m_ta_ra_filter mode.
- * If user wants to reset the group configurations to default values,
- * then this handler will come into action.
- *
- * If user wants to reset the configurations of 0th, 1st and 3rd group,
- * then the input should be :
- *
- * wlanconfig ath0 cfr reset_cfg 0xb
- *
- */
-
-QDF_STATUS ucfg_cfr_set_reset_bitmap(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- pcfr->rcc_param.modified_in_curr_session |= params->reset_cfg;
- tgt_cfr_default_ta_ra_cfg(pdev, &pcfr->rcc_param,
- true, params->reset_cfg);
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-/*
- * This is needed only in case of m_ta_ra_filter mode.
- * After providing all the group configurations, user should provide
- * the information about which groups need to be enabled.
- * Based on that FW will enable the configurations for CFR groups.
- * If user has to enable only 0th group, then input should be :
- *
- * wlanconfig ath0 cfr en_cfg 0x1
- *
- * Enable the bitmap from user provided configuration into cfr_rcc_param.
- */
-
-QDF_STATUS ucfg_cfr_set_en_bitmap(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- pcfr->rcc_param.filter_group_bitmap = params->en_cfg;
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-/*
- * Copy user provided input for ul_mu_user_mask into cfr_rcc_param.
- */
-
-QDF_STATUS
-ucfg_cfr_set_ul_mu_user_mask(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- pcfr->rcc_param.ul_mu_user_mask_lower = params->ul_mu_user_mask_lower;
- pcfr->rcc_param.ul_mu_user_mask_upper = params->ul_mu_user_mask_upper;
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-/*
- * FREEZE_TLV_DELAY_CNT_* registers are used for FREEZE TLV timeout mechanism
- * in MAC side. In case MAC send FREEZE TLV to PHY too late due to
- * long AST delay, PHY ucode may not handle it well or it will impact
- * next frame’s normal processing, then MAC needs to drop FREEZE TLV
- * sending process after reaching the threshold.
- *
- * This handler will copy user provided input for freeze_tlv_delay_cnt
- * into cfr_rcc_param.
- */
-
-QDF_STATUS
-ucfg_cfr_set_freeze_tlv_delay_cnt(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- pcfr->rcc_param.freeze_tlv_delay_cnt_en =
- params->freeze_tlv_delay_cnt_en;
-
- pcfr->rcc_param.freeze_tlv_delay_cnt_thr =
- params->freeze_tlv_delay_cnt_thr;
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-/*
- * Set capture interval from the provided configuration into cfr_rcc_param.
- * All fixed parameters are needed to be stored into cfr_rcc_param.
- */
-
-QDF_STATUS
-ucfg_cfr_set_capture_interval(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- if (pcfr->rcc_param.capture_duration > params->cap_intvl) {
- cfr_err("Capture intval should be more than capture duration");
- status = QDF_STATUS_E_INVAL;
- } else
- pcfr->rcc_param.capture_interval = params->cap_intvl;
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-/*
- * Set capture duration from the provided configuration into cfr_rcc_param.
- * All fixed parameters are needed to be stored into cfr_rcc_param.
- */
-
-QDF_STATUS
-ucfg_cfr_set_capture_duration(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- if (pcfr->rcc_param.capture_interval
- && (params->cap_dur > pcfr->rcc_param.capture_interval)) {
- cfr_err("Capture duration is exceeding capture interval");
- status = QDF_STATUS_E_INVAL;
- } else
- pcfr->rcc_param.capture_duration = params->cap_dur;
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-/*
- * Copy user provided group parameters( type/ subtype of mgmt, ctrl, data )
- * into curr_cfg instance of ta_ra_cfr_cfg.
- * Set valid mask for the provided configuration.
- * Set modified_in_this_session for the particular group.
- */
-
-QDF_STATUS
-ucfg_cfr_set_frame_type_subtype(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- struct ta_ra_cfr_cfg *curr_cfg = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- /* Populating current config based on user's input */
- curr_cfg = &pcfr->rcc_param.curr[params->grp_id];
- curr_cfg->mgmt_subtype_filter = params->expected_mgmt_subtype;
- curr_cfg->ctrl_subtype_filter = params->expected_ctrl_subtype;
- curr_cfg->data_subtype_filter = params->expected_data_subtype;
-
- curr_cfg->valid_mgmt_subtype = 1;
- curr_cfg->valid_ctrl_subtype = 1;
- curr_cfg->valid_data_subtype = 1;
-
- qdf_set_bit(params->grp_id,
- (unsigned long *)
- &pcfr->rcc_param.modified_in_curr_session);
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-/*
- * Copy user provided group parameters( BW and NSS )
- * into curr_cfg instance of ta_ra_cfr_cfg.
- * Set valid mask for the provided configuration.
- * Set modified_in_this_session for the particular group.
- */
-
-QDF_STATUS ucfg_cfr_set_bw_nss(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- struct ta_ra_cfr_cfg *curr_cfg = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- /* Populating current config based on user's input */
- curr_cfg = &pcfr->rcc_param.curr[params->grp_id];
- curr_cfg->bw = params->bw;
- curr_cfg->nss = params->nss;
-
- curr_cfg->valid_bw_mask = 1;
- curr_cfg->valid_nss_mask = 1;
-
- qdf_set_bit(params->grp_id,
- (unsigned long *)&pcfr->rcc_param.modified_in_curr_session);
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-/*
- * Copy user provided group parameters( TA, RA, TA_MASK, RA_MASK )
- * into curr_cfg instance of ta_ra_cfr_cfg.
- * Set valid mask for the provided configuration.
- * Set modified_in_this_session for the particular group.
- */
-
-QDF_STATUS ucfg_cfr_set_tara_config(struct wlan_objmgr_vdev *vdev,
- struct ieee80211_wlanconfig_cfr *params)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- struct ta_ra_cfr_cfg *curr_cfg = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- curr_cfg = &pcfr->rcc_param.curr[params->grp_id];
- qdf_mem_copy(curr_cfg->tx_addr, params->ta, QDF_MAC_ADDR_SIZE);
- qdf_mem_copy(curr_cfg->rx_addr, params->ra, QDF_MAC_ADDR_SIZE);
- qdf_mem_copy(curr_cfg->tx_addr_mask,
- params->ta_mask, QDF_MAC_ADDR_SIZE);
- qdf_mem_copy(curr_cfg->rx_addr_mask,
- params->ra_mask, QDF_MAC_ADDR_SIZE);
-
- curr_cfg->valid_ta = 1;
- curr_cfg->valid_ta_mask = 1;
- curr_cfg->valid_ra = 1;
- curr_cfg->valid_ra_mask = 1;
-
- qdf_set_bit(params->grp_id,
- (unsigned long *)
- &pcfr->rcc_param.modified_in_curr_session);
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-QDF_STATUS ucfg_cfr_get_cfg(struct wlan_objmgr_vdev *vdev)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- struct ta_ra_cfr_cfg *glbl_cfg = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
- uint8_t grp_id;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
- if (!cfr_is_filter_enabled(&pcfr->rcc_param)) {
- cfr_err(" All RCC modes are disabled");
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
- return status;
- }
-
- cfr_err("CAPTURE MODE:\n");
-
- cfr_err("m_directed_ftm is : %s\n",
- pcfr->rcc_param.m_directed_ftm ?
- "enabled" : "disabled");
- cfr_err("m_all_ftm_ack is : %s\n",
- pcfr->rcc_param.m_all_ftm_ack ?
- "enabled" : "disabled");
- cfr_err("m_ndpa_ndp_directed is: %s\n",
- pcfr->rcc_param.m_ndpa_ndp_directed ?
- "enabled" : "disabled");
- cfr_err("m_ndpa_ndp_all is : %s\n",
- pcfr->rcc_param.m_ndpa_ndp_all ?
- "enabled" : "disabled");
- cfr_err("m_ta_ra_filter is : %s\n",
- pcfr->rcc_param.m_ta_ra_filter ?
- "enabled" : "disabled");
- cfr_err("m_all_packet is : %s\n",
- pcfr->rcc_param.m_all_packet ?
- "enabled" : "disabled");
-
- cfr_err("capture duration : %u usec\n",
- pcfr->rcc_param.capture_duration);
- cfr_err("capture interval : %u usec\n",
- pcfr->rcc_param.capture_interval);
- cfr_err("UL MU User mask lower : %u\n",
- pcfr->rcc_param.ul_mu_user_mask_lower);
- cfr_err("UL MU User mask upper : %u\n",
- pcfr->rcc_param.ul_mu_user_mask_upper);
- cfr_err("Freeze TLV delay count is : %s\n",
- pcfr->rcc_param.freeze_tlv_delay_cnt_en ?
- "enabled" : "disabled");
- cfr_err("Freeze TLV delay count threshold : %u\n",
- pcfr->rcc_param.freeze_tlv_delay_cnt_thr);
- cfr_err("Enabled CFG id bitmap : 0x%x\n",
- pcfr->rcc_param.filter_group_bitmap);
- cfr_err(" Modified cfg id bitmap : 0x%x\n",
- pcfr->rcc_param.modified_in_curr_session);
-
- cfr_err("TARA_CONFIG details:\n");
-
- for (grp_id = 0; grp_id < MAX_TA_RA_ENTRIES; grp_id++) {
- glbl_cfg = &pcfr->global[grp_id];
-
- cfr_err("Config ID: %d\n", grp_id);
- cfr_err("Bandwidth :0x%x\n", glbl_cfg->bw);
- cfr_err("NSS : 0x%x\n", glbl_cfg->nss);
- cfr_err("valid_ta: %d\n", glbl_cfg->valid_ta);
- cfr_err("valid_ta_mask: %d\n", glbl_cfg->valid_ta_mask);
- cfr_err("valid_ra: %d\n", glbl_cfg->valid_ra);
- cfr_err("valid_ra_mask: %d\n", glbl_cfg->valid_ra_mask);
- cfr_err("valid_bw_mask: %d\n", glbl_cfg->valid_bw_mask);
- cfr_err("valid_nss_mask: %d\n", glbl_cfg->valid_nss_mask);
- cfr_err("valid_mgmt_subtype: %d\n",
- glbl_cfg->valid_mgmt_subtype);
- cfr_err("valid_ctrl_subtype: %d\n",
- glbl_cfg->valid_ctrl_subtype);
- cfr_err("valid_data_subtype: %d\n",
- glbl_cfg->valid_data_subtype);
- cfr_err("Mgmt subtype : 0x%x\n",
- glbl_cfg->mgmt_subtype_filter);
- cfr_err("CTRL subtype : 0x%x\n",
- glbl_cfg->ctrl_subtype_filter);
- cfr_err("Data subtype : 0x%x\n",
- glbl_cfg->data_subtype_filter);
- cfr_err("TX Addr : %s\n",
- ether_sprintf(glbl_cfg->tx_addr));
- cfr_err("TX Addr Mask : %s\n",
- ether_sprintf(glbl_cfg->tx_addr_mask));
- cfr_err("RX Addr : %s\n",
- ether_sprintf(glbl_cfg->rx_addr));
- cfr_err("RX Addr Mask: %s\n",
- ether_sprintf(glbl_cfg->rx_addr_mask));
- }
-
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-static const char *chan_capture_status_to_str(enum chan_capture_status type)
-{
- switch (type) {
- case CAPTURE_IDLE:
- return "CAPTURE_IDLE";
- case CAPTURE_BUSY:
- return "CAPTURE_BUSY";
- case CAPTURE_ACTIVE:
- return "CAPTURE_ACTIVE";
- case CAPTURE_NO_BUFFER:
- return "CAPTURE_NO_BUFFER";
- default:
- return "INVALID";
- }
-}
-
-static const
-char *mac_freeze_reason_to_str(enum mac_freeze_capture_reason type)
-{
- switch (type) {
- case FREEZE_REASON_TM:
- return "FREEZE_REASON_TM";
- case FREEZE_REASON_FTM:
- return "FREEZE_REASON_FTM";
- case FREEZE_REASON_ACK_RESP_TO_TM_FTM:
- return "FREEZE_REASON_ACK_RESP_TO_TM_FTM";
- case FREEZE_REASON_TA_RA_TYPE_FILTER:
- return "FREEZE_REASON_TA_RA_TYPE_FILTER";
- case FREEZE_REASON_NDPA_NDP:
- return "FREEZE_REASON_NDPA_NDP";
- case FREEZE_REASON_ALL_PACKET:
- return "FREEZE_REASON_ALL_PACKET";
- default:
- return "INVALID";
- }
-}
-
-QDF_STATUS ucfg_cfr_rcc_dump_dbg_counters(struct wlan_objmgr_vdev *vdev)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- struct wlan_objmgr_psoc *psoc = NULL;
- struct cdp_cfr_rcc_stats *cfr_rcc_stats = NULL;
- uint8_t stats_cnt;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- psoc = wlan_pdev_get_psoc(pdev);
- if (!psoc) {
- cfr_err("psoc is null!");
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
- return QDF_STATUS_E_NULL_VALUE;
- }
-
- cfr_err("total_tx_evt_cnt = %llu\n",
- pcfr->total_tx_evt_cnt);
- cfr_err("dbr_evt_cnt = %llu\n",
- pcfr->dbr_evt_cnt);
- cfr_err("rx_tlv_evt_cnt = %llu\n",
- pcfr->rx_tlv_evt_cnt);
- cfr_err("release_cnt = %llu\n",
- pcfr->release_cnt);
- cfr_err("Error cnt:\n");
- cfr_err("flush_dbr_cnt = %llu\n",
- pcfr->flush_dbr_cnt);
- cfr_err("invalid_dma_length_cnt = %llu\n",
- pcfr->invalid_dma_length_cnt);
- cfr_err("flush_timeout_dbr_cnt = %llu\n",
- pcfr->flush_timeout_dbr_cnt);
- cfr_err("PPDU id mismatch for same cookie:\n");
- cfr_err("clear_txrx_event = %llu\n",
- pcfr->clear_txrx_event);
- cfr_err("cfr_dma_aborts = %llu\n",
- pcfr->cfr_dma_aborts);
-
- cfr_rcc_stats = qdf_mem_malloc(sizeof(struct cdp_cfr_rcc_stats));
- if (!cfr_rcc_stats) {
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
- return QDF_STATUS_E_NOMEM;
- }
-
- cdp_get_cfr_dbg_stats(wlan_psoc_get_dp_handle(psoc),
- wlan_objmgr_pdev_get_pdev_id(pdev),
- cfr_rcc_stats);
-
- cfr_err("bb_captured_channel_cnt: %llu\n",
- cfr_rcc_stats->bb_captured_channel_cnt);
- cfr_err("bb_captured_timeout_cnt: %llu\n",
- cfr_rcc_stats->bb_captured_timeout_cnt);
- cfr_err("rx_loc_info_valid_cnt: %llu\n",
- cfr_rcc_stats->rx_loc_info_valid_cnt);
-
- cfr_err("Channel capture status:\n");
- for (stats_cnt = 0; stats_cnt < CAPTURE_MAX; stats_cnt++) {
- cfr_err("%s = %llu\n",
- chan_capture_status_to_str(stats_cnt),
- cfr_rcc_stats->chan_capture_status[stats_cnt]);
- }
-
- cfr_err("Freeze reason:\n");
- for (stats_cnt = 0; stats_cnt < FREEZE_REASON_MAX; stats_cnt++) {
- cfr_err("%s = %llu\n",
- mac_freeze_reason_to_str(stats_cnt),
- cfr_rcc_stats->reason_cnt[stats_cnt]);
- }
-
- qdf_mem_free(cfr_rcc_stats);
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-QDF_STATUS ucfg_cfr_rcc_clr_dbg_counters(struct wlan_objmgr_vdev *vdev)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- struct wlan_objmgr_psoc *psoc = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- psoc = wlan_pdev_get_psoc(pdev);
- if (!psoc) {
- cfr_err("psoc is null!");
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
- return QDF_STATUS_E_NULL_VALUE;
- }
- cdp_cfr_clr_dbg_stats(wlan_psoc_get_dp_handle(psoc),
- wlan_objmgr_pdev_get_pdev_id(pdev));
-
- pcfr->dbr_evt_cnt = 0;
- pcfr->release_cnt = 0;
- pcfr->total_tx_evt_cnt = 0;
- pcfr->rx_tlv_evt_cnt = 0;
- pcfr->flush_dbr_cnt = 0;
- pcfr->flush_timeout_dbr_cnt = 0;
- pcfr->invalid_dma_length_cnt = 0;
- pcfr->clear_txrx_event = 0;
- pcfr->cfr_dma_aborts = 0;
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-QDF_STATUS ucfg_cfr_rcc_dump_lut(struct wlan_objmgr_vdev *vdev)
-{
- struct wlan_objmgr_pdev *pdev = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- if (!vdev) {
- cfr_err("vdev is NULL\n");
- return QDF_STATUS_E_INVAL;
- }
-
- pdev = wlan_vdev_get_pdev(vdev);
- if (!pdev) {
- cfr_err("pdev is NULL\n");
- return QDF_STATUS_E_INVAL;
- }
-
- if (wlan_objmgr_pdev_try_get_ref(pdev, WLAN_CFR_ID) !=
- QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_INVAL;
- }
-
- cfr_err("LUT table:\n");
- tgt_cfr_dump_lut_enh(pdev);
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-void cfr_set_filter(struct wlan_objmgr_pdev *pdev,
- bool enable, struct cdp_monitor_filter *filter_val)
-{
- struct wlan_objmgr_psoc *psoc = wlan_pdev_get_psoc(pdev);
-
- cfr_info("pdev_id=%d\n", wlan_objmgr_pdev_get_pdev_id(pdev));
-
- cdp_cfr_filter(wlan_psoc_get_dp_handle(psoc),
- wlan_objmgr_pdev_get_pdev_id(pdev),
- enable,
- filter_val);
-}
-
-/*
- * With the initiation of commit command, this handler will be triggered.
- *
- * Starts the procedure of forming the TLVs.
- * If Host succeeds to send WMI command to FW, after TLV processing, then it
- * will save the previous CFR configurations into one instance ta_ra_cfr_cfg,
- * called glbl_cfg and update the current config to default state for the
- * next commit session.
- *
- * Finally, reset the counter (modified_in_this_session) to 0 before moving to
- * next commit session.
- *
- */
-
-QDF_STATUS ucfg_cfr_committed_rcc_config(struct wlan_objmgr_vdev *vdev)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- struct wlan_objmgr_psoc *psoc = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
- struct cdp_monitor_filter filter_val = {0};
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- psoc = wlan_pdev_get_psoc(pdev);
-
- if (!psoc) {
- cfr_err("psoc is null!");
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
- return QDF_STATUS_E_NULL_VALUE;
- }
- /*
- * If capture mode is valid, then Host:
- * Subscribes for PPDU status TLVs in monitor status ring.
- * Sets filter type to either FP or MO, based on the capture mode.
- * Starts the LUT_AGE_TIMER of 1sec.
- *
- * If capture mode is disabled, then Host:
- * unsubscribes for PPDU status TLVs in monitor status ring.
- * Sets filter type to 0.
- * Stops the LUT_AGE_TIMER.
- *
- */
-
- if (cfr_is_filter_enabled(&pcfr->rcc_param)) {
- if (pcfr->cfr_timer_enable) {
- cfr_err("Not allowed: Periodic capture is enabled.\n");
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
- return QDF_STATUS_E_NOSUPPORT;
- }
-
- if (pcfr->rcc_param.m_all_ftm_ack) {
- filter_val.mode |= MON_FILTER_PASS |
- MON_FILTER_OTHER;
- filter_val.fp_mgmt |= FILTER_MGMT_ACTION;
- filter_val.mo_mgmt |= FILTER_MGMT_ACTION;
- }
-
- if (pcfr->rcc_param.m_ndpa_ndp_all) {
- filter_val.mode |= MON_FILTER_PASS |
- MON_FILTER_OTHER;
- filter_val.fp_ctrl |= FILTER_CTRL_VHT_NDP;
- filter_val.mo_ctrl |= FILTER_CTRL_VHT_NDP;
- }
-
- if (pcfr->rcc_param.m_all_packet) {
- filter_val.mode |= MON_FILTER_PASS |
- MON_FILTER_OTHER;
- filter_val.fp_mgmt |= FILTER_MGMT_ALL;
- filter_val.mo_mgmt |= FILTER_MGMT_ALL;
- filter_val.fp_ctrl |= FILTER_CTRL_ALL;
- filter_val.mo_ctrl |= FILTER_CTRL_ALL;
- filter_val.fp_data |= FILTER_DATA_ALL;
- filter_val.mo_data |= FILTER_DATA_ALL;
- }
-
- /*
- * M_TA_RA in monitor other is as intensive as M_ALL pkt
- * Support only FP in M_TA_RA mode
- */
- if (pcfr->rcc_param.m_ta_ra_filter) {
- filter_val.mode |= MON_FILTER_PASS |
- MON_FILTER_OTHER;
- filter_val.fp_mgmt |= FILTER_MGMT_ALL;
- filter_val.mo_mgmt |= FILTER_MGMT_ALL;
- filter_val.fp_ctrl |= FILTER_CTRL_ALL;
- filter_val.mo_ctrl |= FILTER_CTRL_ALL;
- filter_val.fp_data |= FILTER_DATA_ALL;
- filter_val.mo_data |= FILTER_DATA_ALL;
- }
-
- if (pcfr->rcc_param.m_directed_ftm) {
- filter_val.mode |= MON_FILTER_PASS;
- filter_val.fp_mgmt |= FILTER_MGMT_ACTION;
- }
-
- if (pcfr->rcc_param.m_ndpa_ndp_directed) {
- filter_val.mode |= MON_FILTER_PASS;
- filter_val.fp_ctrl |= FILTER_CTRL_VHT_NDP;
- }
-
- if (!cdp_get_cfr_rcc(wlan_psoc_get_dp_handle(psoc),
- wlan_objmgr_pdev_get_pdev_id(pdev)))
- tgt_cfr_start_lut_age_timer(pdev);
- cfr_set_filter(pdev, 1, &filter_val);
- } else {
- if (cdp_get_cfr_rcc(wlan_psoc_get_dp_handle(psoc),
- wlan_objmgr_pdev_get_pdev_id(pdev)))
- tgt_cfr_stop_lut_age_timer(pdev);
- cfr_set_filter(pdev, 0, &filter_val);
- }
-
- /* Trigger wmi to start the TLV processing. */
- status = tgt_cfr_config_rcc(pdev, &pcfr->rcc_param);
- if (status == QDF_STATUS_SUCCESS) {
- cfr_info("CFR commit done\n");
- /* Update global config */
- tgt_cfr_update_global_cfg(pdev);
-
- /* Bring curr_cfg to default state for next commit session */
- tgt_cfr_default_ta_ra_cfg(pdev, &pcfr->rcc_param,
- false, MAX_RESET_CFG_ENTRY);
- } else {
- cfr_err("CFR commit failed\n");
- }
-
- pcfr->rcc_param.num_grp_tlvs = 0;
- pcfr->rcc_param.modified_in_curr_session = 0;
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-/*
- * This handler is used to enable / disable the capture mode.
- *
- */
-QDF_STATUS ucfg_cfr_set_rcc_mode(struct wlan_objmgr_vdev *vdev,
- enum capture_type mode, uint8_t value)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return status;
-
- switch (mode) {
- case RCC_DIRECTED_FTM_FILTER:
- pcfr->rcc_param.m_directed_ftm = value;
- break;
- case RCC_ALL_FTM_ACK_FILTER:
- pcfr->rcc_param.m_all_ftm_ack = value;
- break;
- case RCC_DIRECTED_NDPA_NDP_FILTER:
- pcfr->rcc_param.m_ndpa_ndp_directed = value;
- break;
- case RCC_NDPA_NDP_ALL_FILTER:
- pcfr->rcc_param.m_ndpa_ndp_all = value;
- break;
- case RCC_TA_RA_FILTER:
- pcfr->rcc_param.m_ta_ra_filter = value;
- break;
- case RCC_ALL_PACKET_FILTER:
- pcfr->rcc_param.m_all_packet = value;
- break;
- case RCC_DIS_ALL_MODE:
- pcfr->rcc_param.m_directed_ftm = value;
- pcfr->rcc_param.m_all_ftm_ack = value;
- pcfr->rcc_param.m_ndpa_ndp_directed = value;
- pcfr->rcc_param.m_ndpa_ndp_all = value;
- pcfr->rcc_param.m_ta_ra_filter = value;
- pcfr->rcc_param.m_all_packet = value;
- break;
-
- default:
- break;
- }
-
- cfr_debug("<CFR_UMAC> Capture mode set by user: 0x%x\n", value);
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return status;
-}
-
-bool ucfg_cfr_get_rcc_enabled(struct wlan_objmgr_vdev *vdev)
-{
- struct pdev_cfr *pcfr = NULL;
- struct wlan_objmgr_pdev *pdev = NULL;
- QDF_STATUS status = QDF_STATUS_SUCCESS;
- bool rcc_enabled = false;
-
- status = dev_sanity_check(vdev, &pdev, &pcfr);
- if (status != QDF_STATUS_SUCCESS)
- return false;
-
- rcc_enabled = cfr_is_filter_enabled(&pcfr->rcc_param);
- wlan_objmgr_pdev_release_ref(pdev, WLAN_CFR_ID);
-
- return rcc_enabled;
-}
-#endif
diff --git a/umac/cfr/dispatcher/src/wlan_cfr_utils_api.c b/umac/cfr/dispatcher/src/wlan_cfr_utils_api.c
deleted file mode 100644
index 4cb8ea2..0000000
--- a/umac/cfr/dispatcher/src/wlan_cfr_utils_api.c
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * Copyright (c) 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.
- */
-
-#include <wlan_cfr_utils_api.h>
-#include <wlan_cfr_tgt_api.h>
-#include <qdf_module.h>
-#include "../../core/inc/cfr_defs_i.h"
-#include <wlan_objmgr_global_obj.h>
-#include <wlan_objmgr_pdev_obj.h>
-
-QDF_STATUS wlan_cfr_init(void)
-{
- if (wlan_objmgr_register_psoc_create_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_psoc_obj_create_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- if (wlan_objmgr_register_psoc_destroy_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_psoc_obj_destroy_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- if (wlan_objmgr_register_pdev_create_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_pdev_obj_create_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- if (wlan_objmgr_register_pdev_destroy_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_pdev_obj_destroy_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- if (wlan_objmgr_register_peer_create_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_peer_obj_create_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- if (wlan_objmgr_register_peer_destroy_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_peer_obj_destroy_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
-
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS wlan_cfr_deinit(void)
-{
- if (wlan_objmgr_unregister_psoc_create_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_psoc_obj_create_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- if (wlan_objmgr_unregister_psoc_destroy_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_psoc_obj_destroy_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- if (wlan_objmgr_unregister_pdev_create_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_pdev_obj_create_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- if (wlan_objmgr_unregister_pdev_destroy_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_pdev_obj_destroy_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- if (wlan_objmgr_unregister_peer_create_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_peer_obj_create_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- if (wlan_objmgr_unregister_peer_destroy_handler(WLAN_UMAC_COMP_CFR,
- wlan_cfr_peer_obj_destroy_handler, NULL)
- != QDF_STATUS_SUCCESS) {
- return QDF_STATUS_E_FAILURE;
- }
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS wlan_cfr_pdev_open(struct wlan_objmgr_pdev *pdev)
-{
- int status;
-
- /* chip specific init */
- status = tgt_cfr_init_pdev(pdev);
-
- if (status != QDF_STATUS_SUCCESS) {
- cfr_err("tgt_cfr_init_pdev failed with %d\n", status);
- return QDF_STATUS_SUCCESS;
- }
-
- /* RealyFS init */
- status = cfr_streamfs_init(pdev);
-
- if (status != QDF_STATUS_SUCCESS) {
- cfr_err("cfr_streamfs_init failed with %d\n", status);
- return QDF_STATUS_SUCCESS;
- }
-
- return QDF_STATUS_SUCCESS;
-}
-
-QDF_STATUS wlan_cfr_pdev_close(struct wlan_objmgr_pdev *pdev)
-{
- int status = QDF_STATUS_SUCCESS;
- /*
- * DBR does not have close as of now;
- * but this is getting added as part for new gerrit
- * Once we have that support we will add it.
- */
- status = cfr_streamfs_remove(pdev);
-
- return status;
-}
-
-QDF_STATUS cfr_initialize_pdev(struct wlan_objmgr_pdev *pdev)
-{
- int status = QDF_STATUS_SUCCESS;
-
- /* chip specific init */
-
- status = tgt_cfr_init_pdev(pdev);
-
- if (status != QDF_STATUS_SUCCESS)
- cfr_err("cfr_initialize_pdev status=%d\n", status);
-
- return status;
-}
-qdf_export_symbol(cfr_initialize_pdev);
-
-QDF_STATUS cfr_deinitialize_pdev(struct wlan_objmgr_pdev *pdev)
-{
- int status = QDF_STATUS_SUCCESS;
-
- /* chip specific deinit */
-
- status = tgt_cfr_deinit_pdev(pdev);
-
- if (status != QDF_STATUS_SUCCESS)
- cfr_err("cfr_deinitialize_pdev status=%d\n", status);
-
- return status;
-}
-qdf_export_symbol(cfr_deinitialize_pdev);
-
-uint8_t count_set_bits(uint32_t value)
-{
- uint8_t count = 0;
-
- while (value) {
- value &= (value - 1);
- count++;
- }
-
- return count;
-}
-
-qdf_export_symbol(count_set_bits);
-
-#ifdef WLAN_ENH_CFR_ENABLE
-void wlan_cfr_rx_tlv_process(struct wlan_objmgr_pdev *pdev, void *nbuf)
-{
- tgt_cfr_rx_tlv_process(pdev, nbuf);
-}
-
-qdf_export_symbol(wlan_cfr_rx_tlv_process);
-#endif
diff --git a/umac/dfs/core/src/misc/dfs_zero_cac.c b/umac/dfs/core/src/misc/dfs_zero_cac.c
index b2a42ab..e7b316b 100644
--- a/umac/dfs/core/src/misc/dfs_zero_cac.c
+++ b/umac/dfs/core/src/misc/dfs_zero_cac.c
@@ -414,18 +414,19 @@
}
#endif
-/* dfs_find_chwidth_and_center_chan_for_freq() - Find channel width and center
- * channel frequency.
+/* dfs_find_curchwidth_and_center_chan_for_freq() - Find channel width and
+ * center channelfrequency.
* @dfs: Pointer to wlan_dfs.
* @chwidth: Pointer to phy_ch_width.
* @primary_chan_freq: Pointer to primary channel.
* @secondary_chan_freq: Pointer to secondary channel.
*/
#ifdef CONFIG_CHAN_FREQ_API
-void dfs_find_chwidth_and_center_chan_for_freq(struct wlan_dfs *dfs,
- enum phy_ch_width *chwidth,
- uint16_t *primary_chan_freq,
- uint16_t *secondary_chan_freq)
+void
+dfs_find_curchwidth_and_center_chan_for_freq(struct wlan_dfs *dfs,
+ enum phy_ch_width *chwidth,
+ qdf_freq_t *primary_chan_freq,
+ qdf_freq_t *secondary_chan_freq)
{
struct dfs_channel *curchan = dfs->dfs_curchan;
@@ -781,6 +782,27 @@
}
/*
+ * dfs_fill_adfs_chan_params() - Fill the ADFS FW params.
+ * @dfs: Pointer to wlan_dfs.
+ * @adfs_param: Pointer to struct dfs_agile_cac_params.
+ * @ch_freq: Frequency in MHZ to be programmed to the agile detector.
+ */
+static void dfs_fill_adfs_chan_params(struct wlan_dfs *dfs,
+ struct dfs_agile_cac_params *adfs_param)
+{
+ qdf_freq_t ch_freq = dfs->dfs_agile_precac_freq_mhz;
+
+ adfs_param->precac_center_freq_1 =
+ (ch_freq == RESTRICTED_80P80_CHAN_CENTER_FREQ) ?
+ (RESTRICTED_80P80_LEFT_80_CENTER_FREQ) : ch_freq;
+ adfs_param->precac_center_freq_2 =
+ (ch_freq == RESTRICTED_80P80_CHAN_CENTER_FREQ) ?
+ (RESTRICTED_80P80_RIGHT_80_CENTER_FREQ) : 0;
+ adfs_param->precac_chan = utils_dfs_freq_to_chan(ch_freq);
+ adfs_param->precac_chwidth = dfs->dfs_precac_chwidth;
+}
+
+/*
* dfs_prepare_agile_precac_chan() - Prepare an agile channel for preCAC.
* @dfs: Pointer to wlan_dfs.
*/
@@ -825,10 +847,10 @@
vhtop_ch_freq_seg2 +=
DFS_160MHZ_SECSEG_CHAN_OFFSET;
}
- dfs_get_ieeechan_for_agilecac_for_freq(temp_dfs,
- &ch_freq,
- vhtop_ch_freq_seg1,
- vhtop_ch_freq_seg2);
+ dfs_set_agilecac_chan_for_freq(temp_dfs,
+ &ch_freq,
+ vhtop_ch_freq_seg1,
+ vhtop_ch_freq_seg2);
if (!ch_freq) {
qdf_info(" %s : %d No preCAC required channels left in current pdev: %pK",
@@ -840,14 +862,7 @@
}
if (ch_freq) {
- adfs_param.precac_center_freq_1 =
- (ch_freq == RESTRICTED_80P80_CHAN_CENTER_FREQ) ?
- (RESTRICTED_80P80_LEFT_80_CENTER_FREQ) : ch_freq;
- adfs_param.precac_center_freq_2 =
- (ch_freq == RESTRICTED_80P80_CHAN_CENTER_FREQ) ?
- (RESTRICTED_80P80_RIGHT_80_CENTER_FREQ) : 0;
- adfs_param.precac_chan = utils_dfs_freq_to_chan(ch_freq);
- adfs_param.precac_chwidth = temp_dfs->dfs_precac_chwidth;
+ dfs_fill_adfs_chan_params(temp_dfs, &adfs_param);
dfs_start_agile_precac_timer(temp_dfs,
dfs->dfs_soc_obj->ocac_status,
&adfs_param);
@@ -1216,6 +1231,129 @@
}
#endif
+/**
+ * dfs_find_subchannels_for_center_freq() - API to find the subchannels given
+ * the center frequencies and ch_width.
+ * @pri_center_freq: It is the center of 20/40/80/160Mhz band and for 80+80Mhz
+ * it is the center of the first 80Mhz band.
+ * @sec_center_freq: It is used only for 80+80Mhz and denotes the center
+ * of the second 80Mhz band.
+ * @ch_width: Channel width.
+ * @channels: List of subchannels.
+ *
+ * Return: Number of subchannels.
+ */
+static uint8_t
+dfs_find_subchannels_for_center_freq(qdf_freq_t pri_center_freq,
+ qdf_freq_t sec_center_freq,
+ enum phy_ch_width ch_width,
+ qdf_freq_t *channels)
+{
+ uint8_t nchannels = 0;
+
+ switch (ch_width) {
+ case CH_WIDTH_20MHZ:
+ nchannels = 1;
+ channels[0] = pri_center_freq;
+ break;
+ case CH_WIDTH_40MHZ:
+ nchannels = 2;
+ channels[0] = pri_center_freq - DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
+ channels[1] = pri_center_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
+ break;
+ case CH_WIDTH_80MHZ:
+ nchannels = 4;
+ channels[0] = pri_center_freq - DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
+ channels[1] = pri_center_freq - DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
+ channels[2] = pri_center_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
+ channels[3] = pri_center_freq + DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
+ break;
+ case CH_WIDTH_80P80MHZ:
+ nchannels = 8;
+ channels[0] = pri_center_freq - DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
+ channels[1] = pri_center_freq - DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
+ channels[2] = pri_center_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
+ channels[3] = pri_center_freq + DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
+ /* secondary channels */
+ channels[4] = sec_center_freq - DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
+ channels[5] = sec_center_freq - DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
+ channels[6] = sec_center_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
+ channels[7] = sec_center_freq + DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
+ break;
+ case CH_WIDTH_160MHZ:
+ nchannels = 8;
+ channels[0] = pri_center_freq - DFS_5GHZ_4TH_CHAN_FREQ_OFFSET;
+ channels[1] = pri_center_freq - DFS_5GHZ_3RD_CHAN_FREQ_OFFSET;
+ channels[2] = pri_center_freq - DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
+ channels[3] = pri_center_freq - DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
+ channels[4] = pri_center_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
+ channels[5] = pri_center_freq + DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
+ channels[6] = pri_center_freq + DFS_5GHZ_3RD_CHAN_FREQ_OFFSET;
+ channels[7] = pri_center_freq + DFS_5GHZ_4TH_CHAN_FREQ_OFFSET;
+ break;
+ default:
+ dfs_err(NULL, WLAN_DEBUG_DFS_ALWAYS, "invalid channel width");
+ break;
+ }
+
+ return nchannels;
+}
+
+#ifdef QCA_SUPPORT_ADFS_RCAC
+/**
+ * dfs_unmark_rcac_done() - Unmark the CAC done channels from the RCAC list.
+ * @dfs: Pointer to wlan_dfs object.
+ */
+static void dfs_unmark_rcac_done(struct wlan_dfs *dfs)
+{
+ struct dfs_precac_entry *precac_entry = NULL, *tmp_precac_entry = NULL;
+ qdf_freq_t channels[NUM_CHANNELS_160MHZ];
+ uint8_t i, nchannels = 0;
+ qdf_freq_t pri_ch_freq =
+ dfs->dfs_rcac_param.rcac_ch_params.mhz_freq_seg0;
+ qdf_freq_t sec_ch_freq =
+ dfs->dfs_rcac_param.rcac_ch_params.mhz_freq_seg1;
+ enum phy_ch_width ch_width =
+ dfs->dfs_rcac_param.rcac_ch_params.ch_width;
+
+ if (ch_width == CH_WIDTH_160MHZ) {
+ pri_ch_freq = sec_ch_freq;
+ sec_ch_freq = 0;
+ }
+
+ if (!pri_ch_freq)
+ return;
+
+ nchannels = dfs_find_subchannels_for_center_freq(pri_ch_freq,
+ sec_ch_freq,
+ ch_width,
+ channels);
+ if (!nchannels)
+ return;
+
+ PRECAC_LIST_LOCK(dfs);
+ if (TAILQ_EMPTY(&dfs->dfs_precac_list)) {
+ PRECAC_LIST_UNLOCK(dfs);
+ return;
+ }
+ for (i = 0; i < nchannels; i++) {
+ TAILQ_FOREACH_SAFE(precac_entry,
+ &dfs->dfs_precac_list,
+ pe_list,
+ tmp_precac_entry) {
+ if (IS_WITHIN_RANGE(channels[i],
+ precac_entry->center_ch_freq,
+ VHT160_FREQ_OFFSET)) {
+ dfs_unmark_tree_node_as_cac_done_for_freq
+ (precac_entry, channels[i]);
+ break;
+ }
+ }
+ }
+ PRECAC_LIST_UNLOCK(dfs);
+}
+#endif
+
/*
* dfs_mark_precac_done_for_freq() - Mark a frequency as preCAC done.
* @dfs: Pointer to wlan_dfs.
@@ -1235,50 +1373,13 @@
if (!pri_ch_freq)
return;
- switch (ch_width) {
- case CH_WIDTH_20MHZ:
- nchannels = 1;
- channels[0] = pri_ch_freq;
- break;
- case CH_WIDTH_40MHZ:
- nchannels = 2;
- channels[0] = pri_ch_freq - DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
- channels[1] = pri_ch_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
- break;
- case CH_WIDTH_80MHZ:
- nchannels = 4;
- channels[0] = pri_ch_freq - DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
- channels[1] = pri_ch_freq - DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
- channels[2] = pri_ch_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
- channels[3] = pri_ch_freq + DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
- break;
- case CH_WIDTH_80P80MHZ:
- nchannels = 8;
- channels[0] = pri_ch_freq - DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
- channels[1] = pri_ch_freq - DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
- channels[2] = pri_ch_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
- channels[3] = pri_ch_freq + DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
- /* secondary channels */
- channels[4] = sec_ch_freq - DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
- channels[5] = sec_ch_freq - DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
- channels[6] = sec_ch_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
- channels[7] = sec_ch_freq + DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
- break;
- case CH_WIDTH_160MHZ:
- nchannels = 8;
- channels[0] = pri_ch_freq - DFS_5GHZ_4TH_CHAN_FREQ_OFFSET;
- channels[1] = pri_ch_freq - DFS_5GHZ_3RD_CHAN_FREQ_OFFSET;
- channels[2] = pri_ch_freq - DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
- channels[3] = pri_ch_freq - DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
- channels[4] = pri_ch_freq + DFS_5GHZ_NEXT_CHAN_FREQ_OFFSET;
- channels[5] = pri_ch_freq + DFS_5GHZ_2ND_CHAN_FREQ_OFFSET;
- channels[6] = pri_ch_freq + DFS_5GHZ_3RD_CHAN_FREQ_OFFSET;
- channels[7] = pri_ch_freq + DFS_5GHZ_4TH_CHAN_FREQ_OFFSET;
- break;
- default:
- dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "invalid channel width");
+
+ nchannels = dfs_find_subchannels_for_center_freq(pri_ch_freq,
+ sec_ch_freq,
+ ch_width,
+ channels);
+ if (!nchannels)
return;
- }
PRECAC_LIST_LOCK(dfs);
if (TAILQ_EMPTY(&dfs->dfs_precac_list)) {
@@ -2128,6 +2229,29 @@
}
#endif
+/* dfs_mark_adfs_chan_as_cac_done()- Mark the ADFS CAC completed channel as
+ * CAC done in the precac tree.
+ * @dfs: Pointer to struct wlan_dfs.
+ */
+static void dfs_mark_adfs_chan_as_cac_done(struct wlan_dfs *dfs)
+{
+ qdf_freq_t pri_chan_freq, sec_chan_freq;
+ enum phy_ch_width chan_width;
+
+ if (dfs->dfs_agile_precac_freq_mhz ==
+ RESTRICTED_80P80_CHAN_CENTER_FREQ) {
+ pri_chan_freq = RESTRICTED_80P80_LEFT_80_CENTER_FREQ;
+ sec_chan_freq = RESTRICTED_80P80_RIGHT_80_CENTER_FREQ;
+ chan_width = CH_WIDTH_80P80MHZ;
+ } else {
+ pri_chan_freq = dfs->dfs_agile_precac_freq_mhz;
+ sec_chan_freq = 0;
+ chan_width = dfs->dfs_precac_chwidth;
+ }
+ dfs_mark_precac_done_for_freq(dfs, pri_chan_freq, sec_chan_freq,
+ chan_width);
+}
+
/**
* dfs_precac_timeout() - Precac timeout.
*
@@ -2188,20 +2312,7 @@
current_time / 1000);
if (dfs_soc_obj->ocac_status == OCAC_SUCCESS) {
dfs_soc_obj->ocac_status = OCAC_RESET;
- if (dfs->dfs_agile_precac_freq_mhz ==
- RESTRICTED_80P80_CHAN_CENTER_FREQ) {
- dfs_mark_precac_done_for_freq(
- dfs,
- RESTRICTED_80P80_LEFT_80_CENTER_FREQ,
- RESTRICTED_80P80_RIGHT_80_CENTER_FREQ,
- CH_WIDTH_80P80MHZ);
- } else {
- dfs_mark_precac_done_for_freq(
- dfs,
- dfs->dfs_agile_precac_freq_mhz,
- 0,
- dfs->dfs_precac_chwidth);
- }
+ dfs_mark_adfs_chan_as_cac_done(dfs);
}
/* check if CAC done on home channel */
is_cac_done_on_des_chan = dfs_precac_check_home_chan_change(dfs);
@@ -2875,12 +2986,6 @@
struct dfs_channel_bw *dfs_max_bw_info;
int num_precac_roots;
- /* Right now, only ETSI domain supports preCAC. Check if current
- * DFS domain is ETSI and only then build the preCAC list.
- */
- if (utils_get_dfsdomain(dfs->dfs_pdev_obj) != DFS_ETSI_DOMAIN)
- return;
-
/*
* We need to prepare list of uniquee center frequencies of maximum
* possible bandwidths. But at the beginning we do not know how many
@@ -3790,6 +3895,10 @@
/* Add the preCAC timeout in the params to be sent to FW. */
adfs_param->min_precac_timeout = min_precac_timeout;
adfs_param->max_precac_timeout = max_precac_timeout;
+ /* For preCAC, in which the FW has to run a timer of a finite amount of
+ * time, set the mode to QUICK_OCAC_MODE.
+ */
+ adfs_param->ocac_mode = QUICK_OCAC_MODE;
/* Increase the preCAC timeout in HOST by 2 seconds to avoid
* FW OCAC completion event and HOST timer firing at same time. */
if (min_precac_timeout)
@@ -4598,17 +4707,17 @@
}
}
-/* dfs_find_agile_width() - Given a channel width enum, find the corresponding
- * translation for Agile channel width.
- * Translation schema of different operating modes:
- * 20 -> 20, 40 -> 40, (80 & 160 & 80_80) -> 80.
+/* dfs_map_to_agile_width() - Given a channel width enum, find the corresponding
+ * translation for Agile channel width.
+ * Translation schema of different operating modes:
+ * 20 -> 20, 40 -> 40, (80 & 160 & 80_80) -> 80.
* @dfs: Pointer to WLAN DFS structure.
* @chwidth: Channel width enum.
*
* Return: The translated channel width enum.
*/
static enum phy_ch_width
-dfs_find_agile_width(struct wlan_dfs *dfs, enum phy_ch_width chwidth)
+dfs_map_to_agile_width(struct wlan_dfs *dfs, enum phy_ch_width chwidth)
{
switch (chwidth) {
case CH_WIDTH_20MHZ:
@@ -4658,7 +4767,7 @@
"aDFS during 160MHz operation not supported by target");
return;
}
- dfs->dfs_precac_chwidth = dfs_find_agile_width(dfs, chwidth);
+ dfs->dfs_precac_chwidth = dfs_map_to_agile_width(dfs, chwidth);
if (dfs->dfs_precac_chwidth == CH_WIDTH_INVALID) {
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "cannot start agile CAC!");
return;
@@ -4681,23 +4790,130 @@
}
#endif
-/*
- * dfs_get_ieeechan_for_agilecac_for_freq() - Get agile CAC frequency.
- * @dfs: Pointer to wlan_dfs.
- * @ch_freq: Channel frequency in MHZ.
- * @pri_ch_freq: Primary channel frequency.
- * @sec_ch_freq: Secondary channel frequency.
- */
-#ifdef CONFIG_CHAN_FREQ_API
-void dfs_get_ieeechan_for_agilecac_for_freq(struct wlan_dfs *dfs,
- uint16_t *ch_freq,
- uint16_t pri_ch_freq,
- uint16_t sec_ch_freq)
-{
- uint8_t chwidth_val;
- uint16_t ieee_chan_freq;
- enum phy_ch_width chwidth = CH_WIDTH_INVALID;
+#ifdef QCA_SUPPORT_ADFS_RCAC
+/* dfs_fill_des_rcac_chan_params() - Fill ch_params from dfs current channel.
+ * This ch_params is used to determine a
+ * Rolling CAC frequency invoking DFS Random
+ * selection algorithm.
+ * @dfs: Pointer to wlan_dfs structure.
+ * @ch_params: Pointer to ch_params structure.
+ * @des_chwidth: Desired channel width.
+ */
+static void dfs_fill_des_rcac_chan_params(struct wlan_dfs *dfs,
+ struct ch_params *ch_params,
+ enum phy_ch_width des_chwidth)
+{
+ struct dfs_channel *chan = dfs->dfs_curchan;
+
+ ch_params->ch_width = des_chwidth;
+ ch_params->center_freq_seg0 = chan->dfs_ch_vhtop_ch_freq_seg1;
+ ch_params->center_freq_seg1 = chan->dfs_ch_vhtop_ch_freq_seg2;
+ ch_params->mhz_freq_seg0 = chan->dfs_ch_mhz_freq_seg1;
+ ch_params->mhz_freq_seg1 = chan->dfs_ch_mhz_freq_seg2;
+}
+#endif
+
+#ifdef QCA_SUPPORT_ADFS_RCAC
+bool dfs_is_agile_rcac_enabled(struct wlan_dfs *dfs)
+{
+ enum dfs_reg dfsdomain;
+ bool rcac_enabled = false;
+
+ dfsdomain = utils_get_dfsdomain(dfs->dfs_pdev_obj);
+ if ((dfsdomain == DFS_FCC_REGION || dfsdomain == DFS_MKK_REGION) &&
+ dfs->dfs_agile_rcac_ucfg && dfs->dfs_fw_adfs_support_non_160)
+ rcac_enabled = true;
+
+ return rcac_enabled;
+}
+#endif
+
+/* dfs_convert_chwidth_to_wlan_phymode() - Given a channel width, find out the
+ * 11AXA channel mode.
+ * @chwidth: Channel width of type enum phy_ch_width.
+ *
+ * Return: Converted phymode of type wlan_phymode.
+ */
+static enum wlan_phymode
+dfs_convert_chwidth_to_wlan_phymode(enum phy_ch_width chwidth)
+{
+ switch (chwidth) {
+ case CH_WIDTH_20MHZ:
+ return WLAN_PHYMODE_11AXA_HE20;
+ case CH_WIDTH_40MHZ:
+ return WLAN_PHYMODE_11AXA_HE40;
+ case CH_WIDTH_80MHZ:
+ return WLAN_PHYMODE_11AXA_HE80;
+ case CH_WIDTH_160MHZ:
+ return WLAN_PHYMODE_11AXA_HE160;
+ case CH_WIDTH_80P80MHZ:
+ return WLAN_PHYMODE_11AXA_HE80_80;
+ default:
+ return WLAN_PHYMODE_MAX;
+ }
+}
+
+/* dfs_find_dfschan_for_freq() - Given frequency and channel width, find
+ * compute a dfs channel structure.
+ * @dfs: Pointer to struct wlan_dfs.
+ * @freq: Frequency in MHZ.
+ * @center_freq_seg2: Secondary center frequency in MHZ.
+ * @chwidth: Channel width.
+ * @chan: Pointer to struct dfs_channel to be filled.
+ *
+ * Return: QDF_STATUS_SUCCESS if a valid channel pointer exists, else
+ * return status as QDF_STATUS_E_FAILURE.
+ */
+static QDF_STATUS
+dfs_find_dfschan_for_freq(struct wlan_dfs *dfs,
+ qdf_freq_t freq,
+ qdf_freq_t center_freq_seg2,
+ enum phy_ch_width chwidth,
+ struct dfs_channel *chan)
+{
+ enum wlan_phymode mode;
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
+
+ if (!freq) {
+ dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "Input freq is 0!!");
+ return QDF_STATUS_E_FAILURE;
+ }
+
+ mode = dfs_convert_chwidth_to_wlan_phymode(chwidth);
+
+ if (mode == WLAN_PHYMODE_MAX) {
+ dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "Invalid RCAC mode, user "
+ "rcac channel invalid!");
+ return QDF_STATUS_E_FAILURE;
+ }
+ status =
+ dfs_mlme_find_dot11_chan_for_freq(dfs->dfs_pdev_obj,
+ freq, center_freq_seg2, mode,
+ &chan->dfs_ch_freq,
+ &chan->dfs_ch_flags,
+ &chan->dfs_ch_flagext,
+ &chan->dfs_ch_ieee,
+ &chan->dfs_ch_vhtop_ch_freq_seg1,
+ &chan->dfs_ch_vhtop_ch_freq_seg2,
+ &chan->dfs_ch_mhz_freq_seg1,
+ &chan->dfs_ch_mhz_freq_seg2);
+
+ return status;
+}
+
+/* dfs_compute_agile_chan_width() - Compute agile detector's channel width
+ * and current channel's width.
+ *
+ * @dfs: Pointer to wlan_dfs structure.
+ * @agile_ch_width: Agile channel width to be filled.
+ * @cur_ch_width: Current channel width to be filled.
+ */
+static void
+dfs_compute_agile_and_curchan_width(struct wlan_dfs *dfs,
+ enum phy_ch_width *agile_ch_width,
+ enum phy_ch_width *cur_ch_width)
+{
/*
* Agile detector's band of operation depends on current pdev.
* Find the current channel's width and apply the translate rules
@@ -4706,36 +4922,312 @@
* to Agile detector's width:
* 20 - 20, 40 - 40, 80 - 80, 160 - 80, 160 (non contiguous) - 80.
*/
- dfs_find_chwidth_and_center_chan_for_freq(dfs, &chwidth, NULL, NULL);
+ dfs_find_curchwidth_and_center_chan_for_freq(dfs, cur_ch_width,
+ NULL, NULL);
/* Check if the FW supports agile DFS when the pdev is operating on
* 160 or 80P80MHz bandwidth. This information is stored in the flag
* "dfs_fw_adfs_support_160" when the current chainmask is configured.
*/
- if ((chwidth == CH_WIDTH_80P80MHZ || chwidth == CH_WIDTH_160MHZ) &&
+ if ((*cur_ch_width == CH_WIDTH_80P80MHZ ||
+ *cur_ch_width == CH_WIDTH_160MHZ) &&
(!dfs->dfs_fw_adfs_support_160)) {
+ dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,
+ "aDFS during 160MHz operation not supported by target");
+ return;
+ }
+ *agile_ch_width = dfs_map_to_agile_width(dfs, *cur_ch_width);
+}
+
+#ifdef QCA_SUPPORT_ADFS_RCAC
+
+/* dfs_is_subchans_of_rcac_chan_in_nol() - Find out the HT20 subchannels of the
+ * given dfs_channel and determine if
+ * sub channels are in NOL.
+ * @dfs: Pointer to struct wlan_dfs.
+ * @rcac_chan: Pointer to struct dfs_channel.
+ *
+ * Return: true if the channel is in NOL else return false.
+ */
+static bool
+dfs_is_subchans_of_rcac_chan_in_nol(struct wlan_dfs *dfs,
+ struct dfs_channel *rcac_chan)
+{
+ qdf_freq_t rcac_subchans[NUM_CHANNELS_160MHZ];
+ uint8_t n_rcac_sub_chans = 0;
+ int i;
+ bool is_nol = false;
+
+ n_rcac_sub_chans = dfs_find_dfs_sub_channels_for_freq(dfs, rcac_chan,
+ rcac_subchans);
+
+ for (i = 0; i < n_rcac_sub_chans; i++) {
+ if (dfs_is_freq_in_nol(dfs, rcac_subchans[i])) {
+ is_nol = true;
+ break;
+ }
+ }
+ return is_nol;
+}
+
+/* dfs_is_rcac_chan_valid() - Find out if the band identified by the given
+ * primary channel frequency and the width is
+ * supported by the agile engine.
+ * @dfs: Pointer to struct wlan_dfs.
+ * @chwidth: Agile channel width
+ * @rcac_freq: Rolling CAC frequency.
+ *
+ * Return: true if the channel is valid else return false.
+ */
+static bool
+dfs_is_rcac_chan_valid(struct wlan_dfs *dfs, enum phy_ch_width chwidth,
+ qdf_freq_t rcac_freq)
+{
+ struct dfs_channel rcac_chan;
+ QDF_STATUS status = QDF_STATUS_SUCCESS;
+
+ if (chwidth == CH_WIDTH_80P80MHZ) {
dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,
- "aDFS during 160MHz operation not supported by target");
- return;
+ "RCAC cannot be started for 80P80MHz with single chan");
+ return false;
}
- dfs->dfs_precac_chwidth = dfs_find_agile_width(dfs, chwidth);
- if (dfs->dfs_precac_chwidth == CH_WIDTH_INVALID) {
- dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS, "cannot start agile CAC!");
- return;
+
+ qdf_mem_zero(&rcac_chan, sizeof(struct dfs_channel));
+
+ /* 1. Find a valid channel pointer with rcac freq and
+ * agile channel width. If a valid channel pointer does not exists,
+ * return failure.
+ */
+ status = dfs_find_dfschan_for_freq(dfs, rcac_freq, 0, chwidth,
+ &rcac_chan);
+ if (status != QDF_STATUS_SUCCESS) {
+ dfs_err(dfs, WLAN_DEBUG_DFS_ALWAYS,
+ "RCAC Channel %d not found for agile width %d",
+ dfs->dfs_agile_rcac_freq_ucfg,
+ chwidth);
+ return false;
}
+
+ /* 2. Reject the RCAC channel if it is a subset of the current operating
+ * channel or if the RCAC channel is non-DFS.
+ */
+ if (dfs_is_new_chan_subset_of_old_chan(dfs, &rcac_chan,
+ dfs->dfs_curchan))
+ return false;
+
+ /* 3. Reject the RCAC channel if it has NOL channel as its subset. */
+ if (dfs_is_subchans_of_rcac_chan_in_nol(dfs, &rcac_chan))
+ return false;
+
+ return true;
+}
+
+/* dfs_save_rcac_ch_params() - Save the RCAC channel's params in DFS.
+ * It is stored in dfs->dfs_rcac_ch_params.
+ * This ch_params is used in 80211_dfs_action
+ * as the next channel after radar detect.
+ * @dfs: Pointer to struct wlan_dfs.
+ * @rcac_ch_params: Rolling CAC channel parameters.
+ * @rcac_freq: Rolling CAC frequency.
+ */
+static void
+dfs_save_rcac_ch_params(struct wlan_dfs *dfs, struct ch_params rcac_ch_params,
+ qdf_freq_t rcac_freq)
+{
+ struct dfs_rcac_params *rcac_param = &dfs->dfs_rcac_param;
+
+ rcac_param->rcac_pri_freq = rcac_freq;
+ rcac_param->rcac_ch_params.ch_width = rcac_ch_params.ch_width;
+ rcac_param->rcac_ch_params.sec_ch_offset = rcac_ch_params.sec_ch_offset;
+ rcac_param->rcac_ch_params.center_freq_seg0 =
+ rcac_ch_params.center_freq_seg0;
+ rcac_param->rcac_ch_params.center_freq_seg1 =
+ rcac_ch_params.center_freq_seg1;
+ rcac_param->rcac_ch_params.mhz_freq_seg0 =
+ rcac_ch_params.mhz_freq_seg0;
+ rcac_param->rcac_ch_params.mhz_freq_seg1 =
+ rcac_ch_params.mhz_freq_seg1;
+}
+
+/* dfs_find_rcac_chan() - Find out a rolling CAC channel.
+ *
+ * @dfs: Pointer to struct wlan_dfs.
+ * @curchan_chwidth: Current channel width.
+ *
+ * Return: Rolling CAC frequency in MHZ.
+ */
+static qdf_freq_t dfs_find_rcac_chan(struct wlan_dfs *dfs,
+ enum phy_ch_width curchan_chwidth)
+{
+ bool is_user_rcac_chan_valid = false;
+ qdf_freq_t rcac_freq, rcac_center_freq = 0;
+ struct dfs_channel dfs_chan;
+ struct ch_params nxt_chan_params;
+
+ qdf_mem_zero(&dfs_chan, sizeof(struct dfs_channel));
+ qdf_mem_zero(&nxt_chan_params, sizeof(struct ch_params));
+
+ /* If Rolling CAC is configured, RCAC frequency is the user configured
+ * RCAC frequency or it is found using DFS Random Channel Algorithm.
+ */
+
+ /* Check if user configured RCAC frequency is valid */
+ if (dfs->dfs_agile_rcac_freq_ucfg)
+ is_user_rcac_chan_valid =
+ dfs_is_rcac_chan_valid(dfs, curchan_chwidth,
+ dfs->dfs_agile_rcac_freq_ucfg);
+
+ if (is_user_rcac_chan_valid) {
+ rcac_freq = dfs->dfs_agile_rcac_freq_ucfg;
+ if (dfs_find_dfschan_for_freq(dfs, rcac_freq, 0,
+ curchan_chwidth,
+ &dfs_chan) != QDF_STATUS_SUCCESS)
+ goto exit;
+
+ nxt_chan_params.ch_width = curchan_chwidth;
+ /* Get the ch_params from regulatory. ch_width and rcac_freq
+ * are the input given to fetch other params of struct
+ * ch_params.
+ */
+ wlan_reg_set_channel_params_for_freq(dfs->dfs_pdev_obj,
+ rcac_freq, 0, &nxt_chan_params);
+ } else {
+ /* Invoke Random channel selection and select only
+ * DFS channels.
+ */
+ uint16_t flags = DFS_RANDOM_CH_FLAG_NO_CURR_OPE_CH;
+
+ dfs_fill_des_rcac_chan_params(dfs,
+ &nxt_chan_params,
+ curchan_chwidth);
+
+ /* The current dfs channel width may not be supported by the
+ * agile engine. For example, some chips may support
+ * 160/80+80Mhz mode for its operating channel (Tx/Rx),
+ * however, the agile engine may support up to a maximum of
+ * 80Mhz bandwidth.
+ * Therefore, we need to compute the agile channel width.
+ * The function dfs_compute_agile_chan_width calculated the
+ * agile channel width elsewhere and the agile channel width is
+ * passed to the utils_dfs_get_random_channel_for_freq through
+ * ch_params->ch_width.
+ */
+ utils_dfs_get_random_channel_for_freq(dfs->dfs_pdev_obj, flags,
+ &nxt_chan_params, NULL,
+ &rcac_freq, NULL);
+
+ if (dfs_find_dfschan_for_freq(dfs, rcac_freq,
+ nxt_chan_params.mhz_freq_seg1,
+ nxt_chan_params.ch_width,
+ &dfs_chan) != QDF_STATUS_SUCCESS)
+ goto exit;
+ }
+
+ /* Store the random channel ch params for future use on
+ * radar detection.
+ */
+ dfs_save_rcac_ch_params(dfs, nxt_chan_params, rcac_freq);
+
+ if (!WLAN_IS_PRIMARY_OR_SECONDARY_CHAN_DFS(&dfs_chan))
+ return 0;
+
+ if (nxt_chan_params.ch_width != dfs->dfs_precac_chwidth) {
+ return 0;
+ }
+ /* Store the rcac chan params in dfs */
+ rcac_center_freq = nxt_chan_params.mhz_freq_seg0;
+ switch (nxt_chan_params.ch_width) {
+ case CH_WIDTH_160MHZ:
+ rcac_center_freq = nxt_chan_params.mhz_freq_seg1;
+ break;
+ case CH_WIDTH_80P80MHZ:
+ if ((rcac_center_freq ==
+ RESTRICTED_80P80_LEFT_80_CENTER_FREQ) ||
+ (rcac_center_freq ==
+ RESTRICTED_80P80_RIGHT_80_CENTER_FREQ))
+ rcac_center_freq = RESTRICTED_80P80_CHAN_CENTER_FREQ;
+ break;
+ default:
+ break;
+ }
+
+ return rcac_center_freq;
+exit:
+ qdf_mem_zero(&dfs->dfs_rcac_param, sizeof(struct dfs_rcac_params));
+ return 0;
+}
+
+#else
+static inline qdf_freq_t dfs_find_rcac_chan(struct wlan_dfs *dfs,
+ enum phy_ch_width curchan_chwidth)
+{
+ return 0;
+}
+#endif
+
+#endif
+
+/* dfs_find_precac_chan() - Find out a channel to perform preCAC.
+ *
+ * @dfs: Pointer to struct wlan_dfs.
+ * @pri_ch_freq: Primary channel frequency in MHZ.
+ * @sec_ch_freq: Secondary channel frequency in MHZ.
+ *
+ * Return: PreCAC frequency in MHZ.
+ */
+static qdf_freq_t dfs_find_precac_chan(struct wlan_dfs *dfs,
+ qdf_freq_t pri_ch_freq,
+ qdf_freq_t sec_ch_freq)
+{
+ /* Convert precac_chwidth to DFS width and find a valid Agile
+ * PreCAC frequency from the preCAC tree.
+ */
+ uint8_t chwidth_val;
+
/* Find chwidth value for the given enum */
chwidth_val = dfs_translate_chwidth_enum2val(dfs,
dfs->dfs_precac_chwidth);
dfs->dfs_soc_obj->ocac_status = OCAC_RESET;
- ieee_chan_freq = dfs_get_ieeechan_for_precac_for_freq(dfs,
- pri_ch_freq,
- sec_ch_freq,
- chwidth_val);
- if (ieee_chan_freq)
- dfs->dfs_agile_precac_freq_mhz = ieee_chan_freq;
+ return dfs_get_ieeechan_for_precac_for_freq(dfs,
+ pri_ch_freq,
+ sec_ch_freq,
+ chwidth_val);
+}
+
+/*
+ * dfs_set_agilecac_chan_for_freq() - Set agile CAC frequency.
+ * @dfs: Pointer to wlan_dfs.
+ * @ch_freq: Channel frequency in MHZ.
+ * @pri_ch_freq: Primary channel frequency.
+ * @sec_ch_freq: Secondary channel frequency.
+ */
+#ifdef CONFIG_CHAN_FREQ_API
+void dfs_set_agilecac_chan_for_freq(struct wlan_dfs *dfs,
+ qdf_freq_t *ch_freq,
+ qdf_freq_t pri_ch_freq,
+ qdf_freq_t sec_ch_freq)
+{
+ qdf_freq_t ieee_chan_freq;
+ enum phy_ch_width agile_chwidth = CH_WIDTH_INVALID;
+ enum phy_ch_width curchan_chwidth = CH_WIDTH_INVALID;
+
+ dfs_compute_agile_and_curchan_width(dfs, &agile_chwidth,
+ &curchan_chwidth);
+ if (agile_chwidth == CH_WIDTH_INVALID) {
+ qdf_info("Cannot start Agile CAC as a valid agile channel width "
+ "could not be found\n");
+ return;
+ }
+ dfs->dfs_precac_chwidth = agile_chwidth;
+
+ if (dfs_is_agile_rcac_enabled(dfs))
+ ieee_chan_freq = dfs_find_rcac_chan(dfs, curchan_chwidth);
else
- dfs->dfs_agile_precac_freq_mhz = 0;
+ ieee_chan_freq = dfs_find_precac_chan(dfs, pri_ch_freq,
+ sec_ch_freq);
+
+ dfs->dfs_agile_precac_freq_mhz = ieee_chan_freq;
/* It was assumed that the bandwidth of the restricted 80p80 channel is
* 160MHz to build the precac tree. But when configuring Agile the
@@ -4745,9 +5237,11 @@
dfs->dfs_precac_chwidth = CH_WIDTH_80P80MHZ;
*ch_freq = dfs->dfs_agile_precac_freq_mhz;
+
+ if (!*ch_freq)
+ qdf_info("%s: No valid Agile channels available in the current pdev", __func__);
}
#endif
-#endif
#ifdef CONFIG_CHAN_NUM_API
void dfs_find_vht80_chan_for_precac(struct wlan_dfs *dfs,
@@ -5266,3 +5760,815 @@
PRECAC_LIST_UNLOCK(src_dfs);
PRECAC_LIST_UNLOCK(dest_dfs);
}
+
+/* dfs_start_agile_engine() - Prepare ADFS params and program the agile
+ * engine sending agile config cmd to FW.
+ * @dfs: Pointer to struct wlan_dfs.
+ */
+void dfs_start_agile_engine(struct wlan_dfs *dfs)
+{
+ struct dfs_agile_cac_params adfs_param;
+ struct wlan_lmac_if_dfs_tx_ops *dfs_tx_ops;
+ struct dfs_soc_priv_obj *dfs_soc_obj = dfs->dfs_soc_obj;
+
+ /* Fill the RCAC ADFS params and send it to FW.
+ * FW does not use RCAC timeout values for RCAC feature.
+ * FW runs an infinite timer.
+ */
+ dfs_fill_adfs_chan_params(dfs, &adfs_param);
+ adfs_param.min_precac_timeout = MIN_RCAC_DURATION;
+ adfs_param.max_precac_timeout = MAX_RCAC_DURATION;
+ adfs_param.ocac_mode = QUICK_RCAC_MODE;
+
+ qdf_info("%s : %d RCAC channel request sent for pdev: %pK "
+ "ch_freq: %d", __func__, __LINE__, dfs->dfs_pdev_obj,
+ dfs->dfs_agile_precac_freq_mhz);
+
+ dfs_tx_ops = wlan_psoc_get_dfs_txops(dfs_soc_obj->psoc);
+
+ if (dfs_tx_ops && dfs_tx_ops->dfs_agile_ch_cfg_cmd)
+ dfs_tx_ops->dfs_agile_ch_cfg_cmd(dfs->dfs_pdev_obj,
+ &adfs_param);
+ else
+ dfs_err(NULL, WLAN_DEBUG_DFS_ALWAYS,
+ "dfs_tx_ops=%pK", dfs_tx_ops);
+}
+
+
+#ifdef QCA_SUPPORT_ADFS_RCAC
+/**
+ * --------------------- ROLLING CAC STATE MACHINE ----------------------
+ *
+ * Rolling CAC is a feature where in, a separate hardware (Agile detector)
+ * will be brought up in a channel that is not the current operating channel
+ * and will continue to monitor the channel non-stop, until the next
+ * channel change or radar in this RCAC channel.
+ *
+ * Now if the Rolling CAC channel was radar free for a minimum duration
+ * (1 min.) and the device is now switching to this channel, no CAC is required.
+ *
+ * I.e. let's say the current operating channel is 64 HT80 and we are starting
+ * the agile detector in 100 HT80. After a minute of being up in 100 HT80, we
+ * switch the radio to 100 HT80. This operating channel change will not
+ * require CAC now since the channel was radar free for the last 1 minute,
+ * as determined by the agile detector.
+ *
+ * Introduction of a rolling CAC state machine:
+ *
+ * To acheive the rolling CAC feature using the agile detector, a trivial
+ * state machine is implemented, as represented below:
+ *
+ * _________________
+ * | |
+ * |------------>| INIT |<-----------|
+ * | |_________________| |
+ * | | |
+ * | | |
+ * | [EV_RCAC_STOP] | [EV_RCAC_START] | [EV_RCAC_STOP]
+ * | [EV_ADFS_RADAR] | | [EV_ADFS_RADAR]
+ * | | |
+ * | | |
+ * ________|________ | ________|________
+ * | | |----------->| |
+ * | COMPLETE | | RUNNING |
+ * |_________________|<-------------------------|_________________|
+ * [EV_RCAC_DONE]
+ *
+ *
+ *
+ * Legend:
+ * _________________
+ * | |
+ * 1. | RCAC STATES |
+ * |_________________|
+ *
+ * 2. [RCAC_EVENTS]
+ *
+ *
+ * Event triggers and handlers description:
+ *
+ * EV_RCAC_START:
+ * Posted from vdev response and is handled by all three states.
+ * 1. INIT handler:
+ * a. Check if RCAC is already running,
+ * - If yes, do not transition.
+ * - If no, go to step b.
+ * b. Check if a new RCAC channel can be found,
+ * - If no, do not transition.
+ * - If yes, transition to RUNNING.
+ *
+ * EV_RCAC_STOP:
+ * Posted from last vap down or config disable, handled by RUNNING
+ * and COMPLETE.
+ * 1. RUNNING handler:
+ * a. Stop the HOST RCAC timer.
+ * b. Send wmi_adfs_abort_cmd to FW and transition to INIT.
+ * 2. COMPLETE handler:
+ * a. Send wmi_adfs_abort_cmd to FW and transition to INIT.
+ *
+ * EV_ADFS_RADAR:
+ * Posted from radar detection and is handled in RUNNING and COMPLETE.
+ * 1. RUNNING handler (same as EV_RCAC_START):
+ * a. Check if RCAC was running for this pdev,
+ * - If yes, transition to INIT and post EV_RCAC_START event.
+ * - If no, ignore.
+ * 2. COMPLETE handler (same as EV_RCAC_START):
+ * a. Check if RCAC was running for this pdev,
+ * - If yes, transition to INIT and post EV_RCAC_START event.
+ * - If no, ignore.
+ *
+ * Note: EV_ADFS_RADAR works same as EV_RCAC_START event right now, but
+ * will change in future, where, based on user preference, either
+ * a new RCAC channel will be picked (requiring the transition to
+ * INIT like present), or RCAC will be restarted on the same channel.
+ *
+ * EV_RCAC_DONE:
+ * Posted from host RCAC timer completion and is handled in RUNNING.
+ * 1. RUNNING handler:
+ * a. mark RCAC done and transition to COMPLETE.
+ *
+ * Epilogue:
+ * Rolling CAC state machine is for the entire psoc and since the
+ * agile detector can run for one pdev at a time, sharing of resource is
+ * required.
+ * In case of ETSI preCAC, sharing was done in a round robin fashion where
+ * each pdev runs ADFS for it's channels alternatively. However, in RCAC, the
+ * CAC period is not defined is continuous till the next channel change.
+ *
+ * Hence ADFS detector is shared as follows:
+ * 1. First come first serve: the pdev that is brought up first, i.e, for
+ * the first vdev response, an RCAC_START is posted and this pdev will
+ * hold the agile detector and run RCAC till it is stopped.
+ * 2. Stopping the RCAC can be either by disabling user config "rcac_en 0"
+ * or by bringing down all vaps, or if no channel is available.
+ * 3. Once RCAC is stopped for a pdev, it can be started in the other pdev
+ * by restarting it's vap (i.e. a vdev response).
+ *
+ * A working sequence of RCAC is as follows:
+ * - Consider that the channel configured during bring up is 52HT80.
+ * 1. The First VAP's vdev_start_resp posts an event EV_RCAC_START to the
+ * RCAC state machine.
+ * 2. The RCAC state machine which is in INIT state (default) receives the
+ * event, picks a channel to do rolling CAC on, e.g. channel 100HT80.
+ * The SM is then transitioned to RUNNING state.
+ * 3. In the entry of RUNNING state, a host timer is started and agile
+ * cfg cmd to FW is sent.
+ * 4. When the HOST timer expires, it posts the EV_RCAC_DONE event to
+ * the state machine.
+ * 5. EV_RCAC_DONE event received in RUNNING state, transitions the SM
+ * to COMPLETE.
+ * 6. In the entry of COMPLETE, the RCAC channel is marked as CAC done
+ * in the precac tree.
+ * 7. If radar is detected on primary channel, the new channel is the
+ * RCAC channel (100HT80) which does not require CAC if the preCAC
+ * tree is marked as CAC done.
+ * Before sending vdev_start, an EV_RCAC_STOP is posted
+ * which moves the SM to INIT state clearing all the params and
+ * bringing down the agile detector.
+ * (CAC decisions are taken before).
+ * 8. After vdev_resp, another EV_RCAC_START is sent to restart the
+ * RCAC SM with a new RCAC channel if available.
+ *
+ * A future enhancement will be triggering RCAC_START at user level.
+ */
+
+/**
+ * dfs_rcac_set_curr_state() - API to set the current state of RCAC SM.
+ * @dfs_soc_obj: Pointer to DFS soc private object.
+ * @state: value of current state.
+ *
+ * Return: void.
+ */
+static void dfs_rcac_set_curr_state(struct dfs_soc_priv_obj *dfs_soc_obj,
+ enum dfs_rcac_sm_state state)
+{
+ if (state < DFS_RCAC_S_MAX) {
+ dfs_soc_obj->dfs_rcac_curr_state = state;
+ } else {
+ dfs_err(NULL, WLAN_DEBUG_DFS_ALWAYS,
+ "DFS RCAC state (%d) is invalid", state);
+ QDF_BUG(0);
+ }
+}
+
+/**
+ * dfs_rcac_get_curr_state() - API to get current state of RCAC SM.
+ * @dfs_soc_obj: Pointer to DFS soc private object.
+ *
+ * Return: current state enum of type, dfs_rcac_sm_state.
+ */
+static enum dfs_rcac_sm_state
+dfs_rcac_get_curr_state(struct dfs_soc_priv_obj *dfs_soc_obj)
+{
+ return dfs_soc_obj->dfs_rcac_curr_state;
+}
+
+/**
+ * dfs_rcac_sm_transition_to() - Wrapper API to transition the RCAC SM state.
+ * @dfs_soc_obj: Pointer to dfs soc private object that hold the SM handle.
+ * @state: State to which the SM is transitioning to.
+ *
+ * Return: void.
+ */
+static void dfs_rcac_sm_transition_to(struct dfs_soc_priv_obj *dfs_soc_obj,
+ enum dfs_rcac_sm_state state)
+{
+ wlan_sm_transition_to(dfs_soc_obj->dfs_rcac_sm_hdl, state);
+}
+
+/**
+ * dfs_rcac_sm_deliver_event() - API to post events to RCAC SM.
+ * @dfs_soc_obj: Pointer to dfs soc private object.
+ * @event: Event to be posted to the RCAC SM.
+ * @event_data_len: Length of event data.
+ * @event_data: Pointer to event data.
+ *
+ * Return: QDF_STATUS_SUCCESS on handling the event, else failure.
+ *
+ * Note: This version of event posting API is not under lock and hence
+ * should only be called for posting events within the SM and not be
+ * under a dispatcher API without a lock.
+ */
+static
+QDF_STATUS dfs_rcac_sm_deliver_event(struct dfs_soc_priv_obj *dfs_soc_obj,
+ enum dfs_rcac_sm_evt event,
+ uint16_t event_data_len, void *event_data)
+{
+ return wlan_sm_dispatch(dfs_soc_obj->dfs_rcac_sm_hdl,
+ event,
+ event_data_len,
+ event_data);
+}
+
+/* dfs_start_agile_rcac_timer() - Start host agile RCAC timer.
+ *
+ * @dfs: Pointer to struct wlan_dfs.
+ */
+void dfs_start_agile_rcac_timer(struct wlan_dfs *dfs)
+{
+ struct dfs_soc_priv_obj *dfs_soc_obj = dfs->dfs_soc_obj;
+ uint32_t rcac_timeout = MIN_RCAC_DURATION;
+
+ dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
+ "Host RCAC timeout = %d ms", rcac_timeout);
+
+ qdf_timer_mod(&dfs_soc_obj->dfs_rcac_timer,
+ rcac_timeout);
+}
+
+
+/* dfs_stop_agile_rcac_timer() - Cancel the RCAC timer.
+ *
+ * @dfs: Pointer to struct wlan_dfs.
+ */
+void dfs_stop_agile_rcac_timer(struct wlan_dfs *dfs)
+{
+ struct dfs_soc_priv_obj *dfs_soc_obj;
+
+ dfs_soc_obj = dfs->dfs_soc_obj;
+ qdf_timer_sync_cancel(&dfs_soc_obj->dfs_rcac_timer);
+}
+
+static void dfs_abort_agile_rcac(struct wlan_dfs *dfs)
+{
+
+ struct wlan_objmgr_psoc *psoc;
+ struct wlan_lmac_if_dfs_tx_ops *dfs_tx_ops;
+
+ dfs_stop_agile_rcac_timer(dfs);
+ psoc = wlan_pdev_get_psoc(dfs->dfs_pdev_obj);
+ dfs_tx_ops = wlan_psoc_get_dfs_txops(psoc);
+ if (dfs_tx_ops && dfs_tx_ops->dfs_ocac_abort_cmd)
+ dfs_tx_ops->dfs_ocac_abort_cmd(dfs->dfs_pdev_obj);
+
+ qdf_mem_zero(&dfs->dfs_rcac_param, sizeof(struct dfs_rcac_params));
+ dfs->dfs_agile_precac_freq_mhz = 0;
+ dfs->dfs_precac_chwidth = CH_WIDTH_INVALID;
+ dfs->dfs_soc_obj->cur_precac_dfs_index = DFS_PSOC_NO_IDX;
+}
+
+/**
+ * dfs_rcac_state_init_entry() - Entry API for INIT state
+ * @ctx: DFS SoC private object
+ *
+ * API to perform operations on moving to INIT state
+ *
+ * Return: void
+ */
+static void dfs_rcac_state_init_entry(void *ctx)
+{
+ struct dfs_soc_priv_obj *dfs_soc = (struct dfs_soc_priv_obj *)ctx;
+
+ dfs_rcac_set_curr_state(dfs_soc, DFS_RCAC_S_INIT);
+}
+
+/**
+ * dfs_rcac_state_init_exit() - Exit API for INIT state
+ * @ctx: DFS SoC private object
+ *
+ * API to perform operations on moving out of INIT state
+ *
+ * Return: void
+ */
+static void dfs_rcac_state_init_exit(void *ctx)
+{
+ /* NO OPS */
+}
+
+/**
+ * dfs_rcac_state_init_event() - INIT State event handler
+ * @ctx: DFS SoC private object
+ * @event: Event posted to the SM.
+ * @event_data_len: Length of event data.
+ * @event_data: Pointer to event data.
+ *
+ * API to handle events in INIT state
+ *
+ * Return: TRUE: on handling event
+ * FALSE: on ignoring the event
+ */
+static bool dfs_rcac_state_init_event(void *ctx,
+ uint16_t event,
+ uint16_t event_data_len,
+ void *event_data)
+{
+ struct dfs_soc_priv_obj *dfs_soc = (struct dfs_soc_priv_obj *)ctx;
+ bool status;
+ struct wlan_dfs *dfs;
+ bool is_rcac_chan_available = false;
+
+ if (!event_data)
+ return false;
+
+ dfs = (struct wlan_dfs *)event_data;
+
+ switch (event) {
+ case DFS_RCAC_SM_EV_RCAC_START:
+ /* Check if feature is enabled for this DFS and if RCAC channel
+ * is valid, if those are true, send appropriate WMIs to FW
+ * and only then transition to the state as follows.
+ */
+
+ if (dfs_soc->cur_precac_dfs_index != DFS_PSOC_NO_IDX)
+ return true;
+ dfs_prepare_agile_rcac_channel(dfs, &is_rcac_chan_available);
+ if (is_rcac_chan_available) {
+ dfs_soc->cur_precac_dfs_index = dfs->dfs_psoc_idx;
+ dfs_rcac_sm_transition_to(dfs_soc, DFS_RCAC_S_RUNNING);
+ }
+ status = true;
+ break;
+ default:
+ status = false;
+ break;
+ }
+
+ return status;
+}
+
+/**
+ * dfs_rcac_state_running_entry() - Entry API for running state
+ * @ctx: DFS SoC private object
+ *
+ * API to perform operations on moving to running state
+ *
+ * Return: void
+ */
+static void dfs_rcac_state_running_entry(void *ctx)
+{
+ struct dfs_soc_priv_obj *dfs_soc = (struct dfs_soc_priv_obj *)ctx;
+ struct wlan_dfs *dfs =
+ dfs_soc->dfs_priv[dfs_soc->cur_precac_dfs_index].dfs;
+
+ dfs_rcac_set_curr_state(dfs_soc, DFS_RCAC_S_RUNNING);
+ dfs_start_agile_rcac_timer(dfs);
+ dfs_start_agile_engine(dfs);
+}
+
+/**
+ * dfs_rcac_state_running_exit() - Exit API for RUNNING state
+ * @ctx: DFS SoC private object
+ *
+ * API to perform operations on moving out of RUNNING state
+ *
+ * Return: void
+ */
+static void dfs_rcac_state_running_exit(void *ctx)
+{
+ /* NO OPS */
+}
+
+/**
+ * dfs_rcac_state_running_event() - RUNNING State event handler
+ * @ctx: DFS SoC private object
+ * @event: Event posted to the SM.
+ * @event_data_len: Length of event data.
+ * @event_data: Pointer to event data.
+ *
+ * API to handle events in RUNNING state
+ *
+ * Return: TRUE: on handling event
+ * FALSE: on ignoring the event
+ */
+static bool dfs_rcac_state_running_event(void *ctx,
+ uint16_t event,
+ uint16_t event_data_len,
+ void *event_data)
+{
+ struct dfs_soc_priv_obj *dfs_soc = (struct dfs_soc_priv_obj *)ctx;
+ bool status;
+ struct wlan_dfs *dfs;
+
+ if (!event_data)
+ return false;
+
+ dfs = (struct wlan_dfs *)event_data;
+
+ if (dfs->dfs_psoc_idx != dfs_soc->cur_precac_dfs_index)
+ return false;
+
+ switch (event) {
+ case DFS_RCAC_SM_EV_ADFS_RADAR_FOUND:
+ /* After radar is found on the Agile channel we need to find
+ * a new channel and then start Agile CAC on that.
+ * On receiving the "DFS_RCAC_SM_EV_ADFS_RADAR_FOUND" if
+ * we change the state from [RUNNING] -> [RUNNING] then
+ * [RUNNING] should handle case in which a channel is not found
+ * and bring the state machine back to INIT.
+ * Instead we move the state to INIT and post the event
+ * "DFS_RCAC_SM_EV_RCAC_START" so INIT handles the case of
+ * channel not found and stay in that state.
+ * Abort the existing RCAC and restart from INIT state.
+ */
+ dfs_abort_agile_rcac(dfs);
+ dfs_rcac_sm_transition_to(dfs_soc, DFS_RCAC_S_INIT);
+ dfs_rcac_sm_deliver_event(dfs_soc,
+ DFS_RCAC_SM_EV_RCAC_START,
+ event_data_len,
+ event_data);
+ status = true;
+ break;
+ case DFS_RCAC_SM_EV_RCAC_STOP:
+ dfs_abort_agile_rcac(dfs);
+ dfs_rcac_sm_transition_to(dfs_soc, DFS_RCAC_S_INIT);
+ status = true;
+ break;
+ case DFS_RCAC_SM_EV_RCAC_DONE:
+ dfs_rcac_sm_transition_to(dfs_soc, DFS_RCAC_S_COMPLETE);
+ status = true;
+ default:
+ status = false;
+ break;
+ }
+
+ return status;
+}
+
+/**
+ * dfs_rcac_state_complete_entry() - Entry API for complete state
+ * @ctx: DFS SoC private object
+ *
+ * API to perform operations on moving to complete state
+ *
+ * Return: void
+ */
+static void dfs_rcac_state_complete_entry(void *ctx)
+{
+ struct dfs_soc_priv_obj *dfs_soc_obj = (struct dfs_soc_priv_obj *)ctx;
+ struct wlan_dfs *dfs;
+
+ dfs_rcac_set_curr_state(dfs_soc_obj, DFS_RCAC_S_COMPLETE);
+
+ if (!(dfs_soc_obj->cur_precac_dfs_index < WLAN_UMAC_MAX_PDEVS))
+ return;
+
+ dfs = dfs_soc_obj->dfs_priv[dfs_soc_obj->cur_precac_dfs_index].dfs;
+
+ /* Mark the RCAC channel as CAC done. */
+ dfs_mark_adfs_chan_as_cac_done(dfs);
+}
+
+/**
+ * dfs_rcac_state_complete_exit() - Exit API for complete state
+ * @ctx: DFS SoC private object
+ *
+ * API to perform operations on moving out of complete state
+ *
+ * Return: void
+ */
+static void dfs_rcac_state_complete_exit(void *ctx)
+{
+ /* NO OPs. */
+}
+
+/**
+ * dfs_rcac_state_complete_event() - COMPLETE State event handler
+ * @ctx: DFS SoC private object
+ * @event: Event posted to the SM.
+ * @event_data_len: Length of event data.
+ * @event_data: Pointer to event data.
+ *
+ * API to handle events in COMPLETE state
+ *
+ * Return: TRUE: on handling event
+ * FALSE: on ignoring the event
+ */
+static bool dfs_rcac_state_complete_event(void *ctx,
+ uint16_t event,
+ uint16_t event_data_len,
+ void *event_data)
+{
+ struct dfs_soc_priv_obj *dfs_soc = (struct dfs_soc_priv_obj *)ctx;
+ bool status;
+ struct wlan_dfs *dfs;
+
+ if (!event_data)
+ return false;
+
+ dfs = (struct wlan_dfs *)event_data;
+
+ if (dfs->dfs_psoc_idx != dfs_soc->cur_precac_dfs_index)
+ return false;
+
+ switch (event) {
+ case DFS_RCAC_SM_EV_ADFS_RADAR_FOUND:
+ /* Reset the RCAC done state for this RCAC chan of this dfs.
+ * Unmark the channels for RCAC done before calling abort API as
+ * the abort API invalidates the cur_precac_dfs_index.
+ */
+ dfs_unmark_rcac_done(dfs);
+ /* Abort the existing RCAC and restart from INIT state. */
+ dfs_abort_agile_rcac(dfs);
+ dfs_rcac_sm_transition_to(dfs_soc, DFS_RCAC_S_INIT);
+ dfs_rcac_sm_deliver_event(dfs_soc,
+ DFS_RCAC_SM_EV_RCAC_START,
+ event_data_len,
+ event_data);
+ status = true;
+ break;
+ case DFS_RCAC_SM_EV_RCAC_STOP:
+ /* Reset the RCAC done state for this RCAC chan of this dfs.
+ * Unmark the channels for RCAC done before calling abort API as
+ * the abort API invalidates the cur_precac_dfs_index.
+ */
+ dfs_unmark_rcac_done(dfs);
+ dfs_abort_agile_rcac(dfs);
+ dfs_rcac_sm_transition_to(dfs_soc, DFS_RCAC_S_INIT);
+ status = true;
+ break;
+ default:
+ status = false;
+ break;
+ }
+
+ return status;
+}
+
+static struct wlan_sm_state_info dfs_rcac_sm_info[] = {
+ {
+ (uint8_t)DFS_RCAC_S_INIT,
+ (uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+ (uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+ false,
+ "INIT",
+ dfs_rcac_state_init_entry,
+ dfs_rcac_state_init_exit,
+ dfs_rcac_state_init_event
+ },
+ {
+ (uint8_t)DFS_RCAC_S_RUNNING,
+ (uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+ (uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+ false,
+ "RUNNING",
+ dfs_rcac_state_running_entry,
+ dfs_rcac_state_running_exit,
+ dfs_rcac_state_running_event
+ },
+ {
+ (uint8_t)DFS_RCAC_S_COMPLETE,
+ (uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+ (uint8_t)WLAN_SM_ENGINE_STATE_NONE,
+ false,
+ "COMPLETE",
+ dfs_rcac_state_complete_entry,
+ dfs_rcac_state_complete_exit,
+ dfs_rcac_state_complete_event
+ },
+};
+
+static const char *dfs_rcac_sm_event_names[] = {
+ "EV_RCAC_START",
+ "EV_RCAC_STOP",
+ "EV_RCAC_DONE",
+ "EV_ADFS_RADAR_FOUND",
+};
+
+/**
+ * dfs_rcac_sm_print_state() - API to log the current state.
+ * @dfs_soc_obj: Pointer to dfs soc private object.
+ *
+ * Return: void.
+ */
+static void dfs_rcac_sm_print_state(struct dfs_soc_priv_obj *dfs_soc_obj)
+{
+ enum dfs_rcac_sm_state state;
+
+ state = dfs_rcac_get_curr_state(dfs_soc_obj);
+ if (!(state < DFS_RCAC_S_MAX))
+ return;
+
+ dfs_debug(NULL, WLAN_DEBUG_DFS_RCAC, "->[%s] %s",
+ dfs_soc_obj->dfs_rcac_sm_hdl->name,
+ dfs_rcac_sm_info[state].name);
+}
+
+/**
+ * dfs_rcac_sm_print_state_event() - API to log the current state and event
+ * received.
+ * @dfs_soc_obj: Pointer to dfs soc private object.
+ * @event: Event posted to RCAC SM.
+ *
+ * Return: void.
+ */
+static void dfs_rcac_sm_print_state_event(struct dfs_soc_priv_obj *dfs_soc_obj,
+ enum dfs_rcac_sm_evt event)
+{
+ enum dfs_rcac_sm_state state;
+
+ state = dfs_rcac_get_curr_state(dfs_soc_obj);
+ if (!(state < DFS_RCAC_S_MAX))
+ return;
+
+ dfs_debug(NULL, WLAN_DEBUG_DFS_RCAC, "[%s]%s, %s",
+ dfs_soc_obj->dfs_rcac_sm_hdl->name,
+ dfs_rcac_sm_info[state].name,
+ dfs_rcac_sm_event_names[event]);
+}
+
+QDF_STATUS dfs_rcac_sm_deliver_evt(struct dfs_soc_priv_obj *dfs_soc_obj,
+ enum dfs_rcac_sm_evt event,
+ uint16_t event_data_len,
+ void *event_data)
+{
+ enum dfs_rcac_sm_state old_state, new_state;
+ QDF_STATUS status;
+
+ DFS_RCAC_SM_SPIN_LOCK(dfs_soc_obj);
+ old_state = dfs_rcac_get_curr_state(dfs_soc_obj);
+
+ /* Print current state and event received */
+ dfs_rcac_sm_print_state_event(dfs_soc_obj, event);
+
+ status = dfs_rcac_sm_deliver_event(dfs_soc_obj, event,
+ event_data_len, event_data);
+
+ new_state = dfs_rcac_get_curr_state(dfs_soc_obj);
+
+ /* Print new state after event if transition happens */
+ if (old_state != new_state)
+ dfs_rcac_sm_print_state(dfs_soc_obj);
+ DFS_RCAC_SM_SPIN_UNLOCK(dfs_soc_obj);
+
+ return status;
+}
+
+QDF_STATUS dfs_rcac_sm_create(struct dfs_soc_priv_obj *dfs_soc_obj)
+{
+ struct wlan_sm *sm;
+
+ sm = wlan_sm_create("DFS_RCAC", dfs_soc_obj,
+ DFS_RCAC_S_INIT,
+ dfs_rcac_sm_info,
+ QDF_ARRAY_SIZE(dfs_rcac_sm_info),
+ dfs_rcac_sm_event_names,
+ QDF_ARRAY_SIZE(dfs_rcac_sm_event_names));
+ if (!sm) {
+ qdf_err("DFS RCAC SM allocation failed");
+ return QDF_STATUS_E_FAILURE;
+ }
+ dfs_soc_obj->dfs_rcac_sm_hdl = sm;
+
+ qdf_spinlock_create(&dfs_soc_obj->dfs_rcac_sm_lock);
+
+ /* Initialize the RCAC DFS index to default (no index). */
+ dfs_soc_obj->cur_precac_dfs_index = DFS_PSOC_NO_IDX;
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS dfs_rcac_sm_destroy(struct dfs_soc_priv_obj *dfs_soc_obj)
+{
+ wlan_sm_delete(dfs_soc_obj->dfs_rcac_sm_hdl);
+ qdf_spinlock_destroy(&dfs_soc_obj->dfs_rcac_sm_lock);
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS dfs_set_rcac_enable(struct wlan_dfs *dfs, bool rcac_en)
+{
+ if (rcac_en == dfs->dfs_agile_rcac_ucfg) {
+ dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS,
+ "Rolling CAC: %d is already configured", rcac_en);
+ return QDF_STATUS_SUCCESS;
+ }
+ dfs->dfs_agile_rcac_ucfg = rcac_en;
+
+ /* RCAC config is changed. Reset the preCAC tree. */
+ dfs_reset_precac_lists(dfs);
+
+ if (!rcac_en) {
+ dfs_rcac_sm_deliver_evt(dfs->dfs_soc_obj,
+ DFS_RCAC_SM_EV_RCAC_STOP,
+ 0,
+ (void *)dfs);
+ }
+ dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "rolling cac is %d", rcac_en);
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS dfs_get_rcac_enable(struct wlan_dfs *dfs, uint8_t *rcacen)
+{
+ *rcacen = dfs->dfs_agile_rcac_ucfg;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS dfs_set_rcac_freq(struct wlan_dfs *dfs, qdf_freq_t rcac_freq)
+{
+ if (wlan_reg_is_5ghz_ch_freq(rcac_freq))
+ dfs->dfs_agile_rcac_freq_ucfg = rcac_freq;
+ else
+ dfs->dfs_agile_rcac_freq_ucfg = 0;
+
+ dfs_info(dfs, WLAN_DEBUG_DFS_ALWAYS, "rolling cac freq %d",
+ dfs->dfs_agile_rcac_freq_ucfg);
+
+ return QDF_STATUS_SUCCESS;
+}
+
+QDF_STATUS dfs_get_rcac_freq(struct wlan_dfs *dfs, qdf_freq_t *rcac_freq)
+{
+ *rcac_freq = dfs->dfs_agile_rcac_freq_ucfg;
+
+ return QDF_STATUS_SUCCESS;
+}
+
+/*
+ * Rolling CAC Timer timeout function. Following actions are done
+ * on timer expiry:
+ * Timer running flag is cleared.
+ * If the rolling CAC state is completed, the RCAC freq and its sub-channels
+ * are marked as 'CAC Done' in the preCAC tree.
+ */
+static os_timer_func(dfs_rcac_timeout)
+{
+ struct wlan_dfs *dfs;
+ struct dfs_soc_priv_obj *dfs_soc_obj;
+
+ OS_GET_TIMER_ARG(dfs_soc_obj, struct dfs_soc_priv_obj *);
+
+ dfs = dfs_soc_obj->dfs_priv[dfs_soc_obj->cur_precac_dfs_index].dfs;
+
+ dfs_rcac_sm_deliver_evt(dfs_soc_obj,
+ DFS_RCAC_SM_EV_RCAC_DONE,
+ 0,
+ (void *)dfs);
+}
+
+void dfs_rcac_timer_init(struct dfs_soc_priv_obj *dfs_soc_obj)
+{
+ qdf_timer_init(NULL, &dfs_soc_obj->dfs_rcac_timer,
+ dfs_rcac_timeout,
+ (void *)dfs_soc_obj,
+ QDF_TIMER_TYPE_WAKE_APPS);
+}
+
+void dfs_rcac_timer_deinit(struct dfs_soc_priv_obj *dfs_soc_obj)
+{
+ qdf_timer_free(&dfs_soc_obj->dfs_rcac_timer);
+}
+
+/* dfs_prepare_agile_rcac_channel() - Find a valid Rolling CAC channel if
+ * available.
+ *
+ * @dfs: Pointer to struct wlan_dfs.
+ * @is_rcac_chan_available: Flag to indicate if a valid RCAC channel is
+ * available.
+ */
+void dfs_prepare_agile_rcac_channel(struct wlan_dfs *dfs,
+ bool *is_rcac_chan_available)
+{
+ qdf_freq_t rcac_ch_freq = 0;
+
+ /* Find out a valid rcac_ch_freq */
+ dfs_set_agilecac_chan_for_freq(dfs, &rcac_ch_freq, 0, 0);
+
+ /* If RCAC channel is available, the caller will start the timer and
+ * send RCAC config to FW. If channel not available, the caller takes
+ * care of sending RCAC abort and moving SM to INIT, resetting the RCAC
+ * variables.
+ */
+ *is_rcac_chan_available = rcac_ch_freq ? true : false;
+}
+#endif
diff --git a/wmi/src/wmi_unified_ap_tlv.c b/wmi/src/wmi_unified_ap_tlv.c
index 66cc624..683408c 100644
--- a/wmi/src/wmi_unified_ap_tlv.c
+++ b/wmi/src/wmi_unified_ap_tlv.c
@@ -2559,6 +2559,88 @@
return QDF_STATUS_SUCCESS;
}
+static QDF_STATUS send_multisoc_tbtt_sync_cmd_tlv(wmi_unified_t wmi,
+ struct rnr_tbtt_multisoc_sync_param *param)
+{
+ wmi_pdev_tbtt_offset_sync_cmd_fixed_param *tbtt_sync_cmd;
+ wmi_buf_t buf;
+ wmi_pdev_rnr_bss_tbtt_info *bss_tbtt_info;
+ int32_t len = 0;
+ int idx;
+ uint8_t *buf_ptr = NULL;
+
+ switch (param->cmd_type) {
+ case WMI_PDEV_GET_TBTT_OFFSET:
+ len = sizeof(wmi_pdev_tbtt_offset_sync_cmd_fixed_param);
+ break;
+ case WMI_PDEV_SET_TBTT_OFFSET:
+ len = sizeof(wmi_pdev_tbtt_offset_sync_cmd_fixed_param) +
+ WMI_TLV_HDR_SIZE +
+ (param->rnr_vap_count *
+ sizeof(wmi_pdev_rnr_bss_tbtt_info));
+ break;
+ default:
+ WMI_LOGP("%s: cmd_type: %d invalid", __func__, param->cmd_type);
+ return QDF_STATUS_E_FAILURE;
+ }
+ buf = wmi_buf_alloc(wmi, len);
+ if (!buf) {
+ WMI_LOGP("%s: wmi_buf_alloc failed", __func__);
+ return QDF_STATUS_E_NOMEM;
+ }
+ buf_ptr = wmi_buf_data(buf);
+ tbtt_sync_cmd = (wmi_pdev_tbtt_offset_sync_cmd_fixed_param *)wmi_buf_data(buf);
+ WMITLV_SET_HDR(&tbtt_sync_cmd->tlv_header,
+ WMITLV_TAG_STRUC_wmi_pdev_tbtt_offset_sync_cmd_fixed_param,
+ WMITLV_GET_STRUCT_TLVLEN(wmi_pdev_tbtt_offset_sync_cmd_fixed_param));
+
+ tbtt_sync_cmd->cmd_type = param->cmd_type;
+ tbtt_sync_cmd->pdev_id = wmi->ops->convert_host_pdev_id_to_target(
+ wmi,
+ param->pdev_id);
+ if (tbtt_sync_cmd->cmd_type == WMI_PDEV_SET_TBTT_OFFSET &&
+ param->rnr_vap_count) {
+ buf_ptr += sizeof(wmi_pdev_tbtt_offset_sync_cmd_fixed_param);
+ WMITLV_SET_HDR(buf_ptr, WMITLV_TAG_ARRAY_STRUC,
+ (param->rnr_vap_count *
+ sizeof(wmi_pdev_rnr_bss_tbtt_info)));
+ bss_tbtt_info = (wmi_pdev_rnr_bss_tbtt_info *)(buf_ptr +
+ WMI_TLV_HDR_SIZE);
+ for (idx = 0; idx < param->rnr_vap_count; idx++) {
+ WMITLV_SET_HDR(&bss_tbtt_info->tlv_header,
+ WMITLV_TAG_STRUC_wmi_pdev_rnr_bss_tbtt_info,
+ WMITLV_GET_STRUCT_TLVLEN(wmi_pdev_rnr_bss_tbtt_info));
+ WMI_CHAR_ARRAY_TO_MAC_ADDR(param->rnr_bss_tbtt->bss_mac,
+ &bss_tbtt_info->bss_mac);
+ bss_tbtt_info->beacon_intval =
+ param->rnr_bss_tbtt->beacon_intval;
+ bss_tbtt_info->opclass = param->rnr_bss_tbtt->opclass;
+ bss_tbtt_info->chan_idx =
+ param->rnr_bss_tbtt->chan_idx;
+ bss_tbtt_info->next_qtime_tbtt_high =
+ param->rnr_bss_tbtt->next_qtime_tbtt_high;
+ bss_tbtt_info->next_qtime_tbtt_low =
+ param->rnr_bss_tbtt->next_qtime_tbtt_low;
+ QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_DEBUG,
+ "Beacon Intval: %d, Chan: %d, opclass: %d",
+ bss_tbtt_info->beacon_intval,
+ bss_tbtt_info->chan_idx,
+ bss_tbtt_info->opclass);
+ bss_tbtt_info++;
+ param->rnr_bss_tbtt++;
+ }
+ }
+ QDF_TRACE(QDF_MODULE_ID_WMI, QDF_TRACE_LEVEL_DEBUG,
+ "Cmd Type: %d, Pdev id: %d Vap count: %d", tbtt_sync_cmd->cmd_type,
+ tbtt_sync_cmd->pdev_id, param->rnr_vap_count);
+ if (wmi_unified_cmd_send(wmi, buf, len, WMI_PDEV_TBTT_OFFSET_SYNC_CMDID)) {
+ WMI_LOGP("%s: Failed to send multisoc tbtt sync command", __func__);
+ wmi_buf_free(buf);
+ return QDF_STATUS_E_FAILURE;
+ }
+ return QDF_STATUS_SUCCESS;
+}
+
void wmi_ap_attach_tlv(wmi_unified_t wmi_handle)
{
struct wmi_ops *ops = wmi_handle->ops;
@@ -2630,4 +2712,5 @@
ops->send_peer_vlan_config_cmd = send_peer_vlan_config_cmd_tlv;
ops->extract_multi_vdev_restart_resp_event =
extract_multi_vdev_restart_resp_event_tlv;
+ ops->multisoc_tbtt_sync_cmd = send_multisoc_tbtt_sync_cmd_tlv;
}