1 /* 2 * Copyright (c) 2021, The Linux Foundation. All rights reserved. 3 * Copyright (c) 2021-2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18 #include <hal_api.h> 19 #include <wlan_cfg.h> 20 #include "dp_types.h" 21 #include "dp_internal.h" 22 #include "dp_htt.h" 23 #include "dp_mon.h" 24 #include "dp_mon_filter.h" 25 26 #include <dp_mon_1.0.h> 27 #include <dp_rx_mon_1.0.h> 28 #include <dp_mon_filter_1.0.h> 29 30 #if defined(QCA_MCOPY_SUPPORT) || defined(ATH_SUPPORT_NAC_RSSI) \ 31 || defined(ATH_SUPPORT_NAC) || defined(WLAN_RX_PKT_CAPTURE_ENH) 32 /** 33 * dp_mon_filter_check_co_exist() - Check the co-existing of the 34 * enabled modes. 35 * @pdev: DP pdev handle 36 * 37 * Return: QDF_STATUS 38 */ 39 static QDF_STATUS dp_mon_filter_check_co_exist(struct dp_pdev *pdev) 40 { 41 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; 42 /* 43 * Check if the Rx Enhanced capture mode, monitor mode, 44 * smart_monitor_mode and mcopy mode can co-exist together. 45 */ 46 if ((mon_pdev->rx_enh_capture_mode != CDP_RX_ENH_CAPTURE_DISABLED) && 47 ((mon_pdev->neighbour_peers_added && mon_pdev->mvdev) || 48 mon_pdev->mcopy_mode)) { 49 dp_mon_filter_err("%pK:Rx Capture mode can't exist with modes:\n" 50 "Smart Monitor Mode:%d\n" 51 "M_Copy Mode:%d", pdev->soc, 52 mon_pdev->neighbour_peers_added, 53 mon_pdev->mcopy_mode); 54 return QDF_STATUS_E_FAILURE; 55 } 56 57 /* 58 * Check if the monitor mode cannot co-exist with any other mode. 59 */ 60 if ((mon_pdev->mvdev && mon_pdev->monitor_configured) && 61 (mon_pdev->mcopy_mode || mon_pdev->neighbour_peers_added)) { 62 dp_mon_filter_err("%pK: Monitor mode can't exist with modes\n" 63 "M_Copy Mode:%d\n" 64 "Smart Monitor Mode:%d", 65 pdev->soc, mon_pdev->mcopy_mode, 66 mon_pdev->neighbour_peers_added); 67 return QDF_STATUS_E_FAILURE; 68 } 69 70 /* 71 * Check if the smart monitor mode can co-exist with any other mode 72 */ 73 if (mon_pdev->neighbour_peers_added && 74 ((mon_pdev->mcopy_mode) || mon_pdev->monitor_configured)) { 75 dp_mon_filter_err("%pk: Smart Monitor mode can't exist with modes\n" 76 "M_Copy Mode:%d\n" 77 "Monitor Mode:%d", 78 pdev->soc, mon_pdev->mcopy_mode, 79 mon_pdev->monitor_configured); 80 return QDF_STATUS_E_FAILURE; 81 } 82 83 /* 84 * Check if the m_copy, monitor mode and the smart_monitor_mode 85 * can co-exist together. 86 */ 87 if (mon_pdev->mcopy_mode && 88 (mon_pdev->mvdev || mon_pdev->neighbour_peers_added)) { 89 dp_mon_filter_err("%pK: mcopy mode can't exist with modes\n" 90 "Monitor Mode:%pK\n" 91 "Smart Monitor Mode:%d", 92 pdev->soc, mon_pdev->mvdev, 93 mon_pdev->neighbour_peers_added); 94 return QDF_STATUS_E_FAILURE; 95 } 96 97 /* 98 * Check if the Rx packet log lite or full can co-exist with 99 * the enable modes. 100 */ 101 if ((mon_pdev->rx_pktlog_mode != DP_RX_PKTLOG_DISABLED) && 102 !mon_pdev->rx_pktlog_cbf && 103 (mon_pdev->mvdev || mon_pdev->monitor_configured)) { 104 dp_mon_filter_err("%pK: Rx pktlog full/lite can't exist with modes\n" 105 "Monitor Mode:%d", pdev->soc, 106 mon_pdev->monitor_configured); 107 return QDF_STATUS_E_FAILURE; 108 } 109 return QDF_STATUS_SUCCESS; 110 } 111 #else 112 static QDF_STATUS dp_mon_filter_check_co_exist(struct dp_pdev *pdev) 113 { 114 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; 115 /* 116 * Check if the Rx packet log lite or full can co-exist with 117 * the enable modes. 118 */ 119 if ((mon_pdev->rx_pktlog_mode != DP_RX_PKTLOG_DISABLED) && 120 (mon_pdev->mvdev || mon_pdev->monitor_configured)) { 121 dp_mon_filter_err("%pK: Rx pktlog full/lite can't exist with modes\n" 122 "Monitor Mode:%d", pdev->soc, 123 mon_pdev->monitor_configured); 124 return QDF_STATUS_E_FAILURE; 125 } 126 127 return QDF_STATUS_SUCCESS; 128 } 129 #endif 130 131 #ifdef QCA_ENHANCED_STATS_SUPPORT 132 void dp_mon_filter_setup_enhanced_stats_1_0(struct dp_pdev *pdev) 133 { 134 struct dp_mon_filter filter = {0}; 135 enum dp_mon_filter_mode mode = DP_MON_FILTER_ENHACHED_STATS_MODE; 136 enum dp_mon_filter_srng_type srng_type = 137 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 138 struct dp_mon_pdev *mon_pdev; 139 140 if (!pdev) { 141 dp_mon_filter_err("pdev Context is null"); 142 return; 143 } 144 145 /* Enabled the filter */ 146 filter.valid = true; 147 148 mon_pdev = pdev->monitor_pdev; 149 dp_mon_filter_set_status_cmn(mon_pdev, &filter); 150 151 filter.tlv_filter.enable_mo = 0; 152 filter.tlv_filter.mo_mgmt_filter = 0; 153 filter.tlv_filter.mo_ctrl_filter = 0; 154 filter.tlv_filter.mo_data_filter = 0; 155 156 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 157 mon_pdev->filter[mode][srng_type] = filter; 158 } 159 160 void dp_mon_filter_reset_enhanced_stats_1_0(struct dp_pdev *pdev) 161 { 162 struct dp_mon_filter filter = {0}; 163 enum dp_mon_filter_mode mode = DP_MON_FILTER_ENHACHED_STATS_MODE; 164 enum dp_mon_filter_srng_type srng_type = 165 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 166 struct dp_mon_pdev *mon_pdev; 167 168 if (!pdev) { 169 dp_mon_filter_err("pdev Context is null"); 170 return; 171 } 172 173 mon_pdev = pdev->monitor_pdev; 174 mon_pdev->filter[mode][srng_type] = filter; 175 } 176 #endif /* QCA_ENHANCED_STATS_SUPPORT */ 177 178 #ifdef QCA_UNDECODED_METADATA_SUPPORT 179 void dp_mon_filter_setup_undecoded_metadata_capture_1_0(struct dp_pdev *pdev) 180 { 181 struct dp_mon_filter filter = {0}; 182 enum dp_mon_filter_mode mode = 183 DP_MON_FILTER_UNDECODED_METADATA_CAPTURE_MODE; 184 enum dp_mon_filter_srng_type srng_type = 185 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 186 struct dp_mon_pdev *mon_pdev; 187 188 if (!pdev) { 189 dp_mon_filter_err("pdev Context is null"); 190 return; 191 } 192 193 /* Enabled the filter */ 194 mon_pdev = pdev->monitor_pdev; 195 if (mon_pdev->monitor_configured || 196 mon_pdev->scan_spcl_vap_configured) { 197 filter = mon_pdev->filter[DP_MON_FILTER_MONITOR_MODE][srng_type]; 198 } else if (mon_pdev->neighbour_peers_added) { 199 filter = mon_pdev->filter[DP_MON_FILTER_SMART_MONITOR_MODE][srng_type]; 200 } else { 201 dp_mon_filter_set_status_cmn(mon_pdev, &filter); 202 filter.valid = true; 203 } 204 205 /* Setup the filter to subscribe to FP PHY status tlv */ 206 filter.tlv_filter.fp_phy_err = 1; 207 filter.tlv_filter.fp_phy_err_buf_src = SW2RXDMA_BUF_SOURCE_RING; 208 filter.tlv_filter.fp_phy_err_buf_dest = RXDMA2SW_RING; 209 filter.tlv_filter.phy_err_mask = mon_pdev->phyrx_error_mask; 210 filter.tlv_filter.phy_err_mask_cont = mon_pdev->phyrx_error_mask_cont; 211 212 filter.tlv_filter.phy_err_filter_valid = 1; 213 214 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 215 mon_pdev->filter[mode][srng_type] = filter; 216 } 217 218 void dp_mon_filter_reset_undecoded_metadata_capture_1_0(struct dp_pdev *pdev) 219 { 220 struct dp_mon_filter filter = {0}; 221 enum dp_mon_filter_mode mode = 222 DP_MON_FILTER_UNDECODED_METADATA_CAPTURE_MODE; 223 enum dp_mon_filter_srng_type srng_type = 224 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 225 struct dp_mon_pdev *mon_pdev; 226 227 if (!pdev) { 228 dp_mon_filter_err("pdev Context is null"); 229 return; 230 } 231 mon_pdev = pdev->monitor_pdev; 232 233 filter = mon_pdev->filter[mode][srng_type]; 234 235 /* Reset the phy error and phy error mask */ 236 filter.tlv_filter.fp_phy_err = 0; 237 filter.tlv_filter.fp_phy_err_buf_src = NO_BUFFER_RING; 238 filter.tlv_filter.fp_phy_err_buf_dest = RXDMA_RELEASING_RING; 239 240 filter.tlv_filter.phy_err_mask = 0; 241 filter.tlv_filter.phy_err_mask_cont = 0; 242 mon_pdev->phyrx_error_mask = 0; 243 mon_pdev->phyrx_error_mask_cont = 0; 244 245 filter.tlv_filter.phy_err_filter_valid = 1; 246 247 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 248 mon_pdev->filter[mode][srng_type] = filter; 249 } 250 #endif /* QCA_UNDECODED_METADATA_SUPPORT */ 251 252 #ifdef QCA_MCOPY_SUPPORT 253 #ifdef QCA_MONITOR_PKT_SUPPORT 254 static void dp_mon_filter_set_reset_mcopy_dest(struct dp_pdev *pdev, 255 struct dp_mon_filter *pfilter) 256 { 257 struct dp_soc *soc = pdev->soc; 258 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; 259 enum dp_mon_filter_mode mode = DP_MON_FILTER_MCOPY_MODE; 260 enum dp_mon_filter_srng_type srng_type; 261 262 srng_type = ((soc->wlan_cfg_ctx->rxdma1_enable) ? 263 DP_MON_FILTER_SRNG_TYPE_RXDMA_MON_BUF : 264 DP_MON_FILTER_SRNG_TYPE_RXDMA_BUF); 265 266 /* Set the filter */ 267 if (pfilter->valid) { 268 dp_mon_filter_set_mon_cmn(pdev, pfilter); 269 270 pfilter->tlv_filter.fp_data_filter = 0; 271 pfilter->tlv_filter.mo_data_filter = 0; 272 273 dp_mon_filter_show_filter(mon_pdev, mode, pfilter); 274 mon_pdev->filter[mode][srng_type] = *pfilter; 275 } else /* Reset the filter */ 276 mon_pdev->filter[mode][srng_type] = *pfilter; 277 } 278 #else 279 static void dp_mon_filter_set_reset_mcopy_dest(struct dp_pdev *pdev, 280 struct dp_mon_filter *pfilter) 281 { 282 } 283 #endif 284 285 void dp_mon_filter_setup_mcopy_mode_1_0(struct dp_pdev *pdev) 286 { 287 struct dp_mon_filter filter = {0}; 288 struct dp_soc *soc = NULL; 289 enum dp_mon_filter_mode mode = DP_MON_FILTER_MCOPY_MODE; 290 enum dp_mon_filter_srng_type srng_type = 291 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 292 struct dp_mon_pdev *mon_pdev; 293 294 if (!pdev) { 295 dp_mon_filter_err("pdev Context is null"); 296 return; 297 } 298 299 soc = pdev->soc; 300 if (!soc) { 301 dp_mon_filter_err("Soc Context is null"); 302 return; 303 } 304 305 mon_pdev = pdev->monitor_pdev; 306 if (!mon_pdev) { 307 dp_mon_filter_err("monitor pdev Context is null"); 308 return; 309 } 310 /* Enabled the filter */ 311 filter.valid = true; 312 dp_mon_filter_set_reset_mcopy_dest(pdev, &filter); 313 314 /* Clear the filter as the same filter will be used to set the 315 * monitor status ring 316 */ 317 qdf_mem_zero(&(filter), sizeof(struct dp_mon_filter)); 318 319 /* Enabled the filter */ 320 filter.valid = true; 321 dp_mon_filter_set_status_cmn(mon_pdev, &filter); 322 323 /* Setup the filter */ 324 filter.tlv_filter.enable_mo = 1; 325 filter.tlv_filter.packet_header = 1; 326 filter.tlv_filter.mpdu_end = 1; 327 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 328 329 srng_type = DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 330 mon_pdev->filter[mode][srng_type] = filter; 331 } 332 333 void dp_mon_filter_reset_mcopy_mode_1_0(struct dp_pdev *pdev) 334 { 335 struct dp_mon_filter filter = {0}; 336 struct dp_soc *soc = NULL; 337 enum dp_mon_filter_mode mode = DP_MON_FILTER_MCOPY_MODE; 338 enum dp_mon_filter_srng_type srng_type = 339 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 340 struct dp_mon_pdev *mon_pdev; 341 342 if (!pdev) { 343 dp_mon_filter_err("pdev Context is null"); 344 return; 345 } 346 347 soc = pdev->soc; 348 if (!soc) { 349 dp_mon_filter_err("Soc Context is null"); 350 return; 351 } 352 353 mon_pdev = pdev->monitor_pdev; 354 dp_mon_filter_set_reset_mcopy_dest(pdev, &filter); 355 356 srng_type = DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 357 mon_pdev->filter[mode][srng_type] = filter; 358 } 359 #endif 360 361 #if defined(ATH_SUPPORT_NAC_RSSI) || defined(ATH_SUPPORT_NAC) 362 void dp_mon_filter_setup_smart_monitor_1_0(struct dp_pdev *pdev) 363 { 364 struct dp_mon_filter filter = {0}; 365 struct dp_soc *soc = NULL; 366 struct dp_mon_soc *mon_soc; 367 368 enum dp_mon_filter_mode mode = DP_MON_FILTER_SMART_MONITOR_MODE; 369 enum dp_mon_filter_srng_type srng_type = 370 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 371 struct dp_mon_pdev *mon_pdev; 372 373 if (!pdev) { 374 dp_mon_filter_err("pdev Context is null"); 375 return; 376 } 377 378 soc = pdev->soc; 379 if (!soc) { 380 dp_mon_filter_err("Soc Context is null"); 381 return; 382 } 383 384 mon_soc = soc->monitor_soc; 385 mon_pdev = pdev->monitor_pdev; 386 387 /* Enabled the filter */ 388 filter.valid = true; 389 dp_mon_filter_set_status_cmn(mon_pdev, &filter); 390 391 filter.tlv_filter.enable_mo = 0; 392 filter.tlv_filter.mo_mgmt_filter = 0; 393 filter.tlv_filter.mo_ctrl_filter = 0; 394 filter.tlv_filter.mo_data_filter = 0; 395 396 if (mon_soc->hw_nac_monitor_support) { 397 filter.tlv_filter.enable_md = 1; 398 filter.tlv_filter.packet_header = 1; 399 filter.tlv_filter.md_data_filter = FILTER_DATA_ALL; 400 } 401 402 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 403 mon_pdev->filter[mode][srng_type] = filter; 404 } 405 406 void dp_mon_filter_reset_smart_monitor_1_0(struct dp_pdev *pdev) 407 { 408 struct dp_mon_filter filter = {0}; 409 enum dp_mon_filter_mode mode = DP_MON_FILTER_SMART_MONITOR_MODE; 410 enum dp_mon_filter_srng_type srng_type = 411 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 412 struct dp_mon_pdev *mon_pdev; 413 414 if (!pdev) { 415 dp_mon_filter_err("pdev Context is null"); 416 return; 417 } 418 419 mon_pdev = pdev->monitor_pdev; 420 mon_pdev->filter[mode][srng_type] = filter; 421 } 422 #endif /* ATH_SUPPORT_NAC_RSSI || ATH_SUPPORT_NAC */ 423 424 #ifdef WLAN_RX_PKT_CAPTURE_ENH 425 #ifdef QCA_MONITOR_PKT_SUPPORT 426 static 427 void dp_mon_filter_set_reset_rx_enh_capture_dest(struct dp_pdev *pdev, 428 struct dp_mon_filter *pfilter) 429 { 430 struct dp_soc *soc = pdev->soc; 431 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; 432 enum dp_mon_filter_mode mode = DP_MON_FILTER_RX_CAPTURE_MODE; 433 enum dp_mon_filter_srng_type srng_type; 434 435 srng_type = ((soc->wlan_cfg_ctx->rxdma1_enable) ? 436 DP_MON_FILTER_SRNG_TYPE_RXDMA_MON_BUF : 437 DP_MON_FILTER_SRNG_TYPE_RXDMA_BUF); 438 439 /* Set the filter */ 440 if (pfilter->valid) { 441 dp_mon_filter_set_mon_cmn(pdev, pfilter); 442 443 pfilter->tlv_filter.fp_mgmt_filter = 0; 444 pfilter->tlv_filter.fp_ctrl_filter = 0; 445 pfilter->tlv_filter.fp_data_filter = 0; 446 pfilter->tlv_filter.mo_mgmt_filter = 0; 447 pfilter->tlv_filter.mo_ctrl_filter = 0; 448 pfilter->tlv_filter.mo_data_filter = 0; 449 450 dp_mon_filter_show_filter(mon_pdev, mode, pfilter); 451 pdev->monitor_pdev->filter[mode][srng_type] = *pfilter; 452 } else /* Reset the filter */ 453 pdev->monitor_pdev->filter[mode][srng_type] = *pfilter; 454 } 455 #else 456 static 457 void dp_mon_filter_set_reset_rx_enh_capture_dest(struct dp_pdev *pdev, 458 struct dp_mon_filter *pfilter) 459 { 460 } 461 #endif 462 463 void dp_mon_filter_setup_rx_enh_capture_1_0(struct dp_pdev *pdev) 464 { 465 struct dp_mon_filter filter = {0}; 466 struct dp_soc *soc = NULL; 467 enum dp_mon_filter_mode mode = DP_MON_FILTER_RX_CAPTURE_MODE; 468 enum dp_mon_filter_srng_type srng_type = 469 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 470 struct dp_mon_pdev *mon_pdev; 471 472 if (!pdev) { 473 dp_mon_filter_err("pdev Context is null"); 474 return; 475 } 476 477 soc = pdev->soc; 478 if (!soc) { 479 dp_mon_filter_err("Soc Context is null"); 480 return; 481 } 482 483 mon_pdev = pdev->monitor_pdev; 484 485 /* Enabled the filter */ 486 filter.valid = true; 487 dp_mon_filter_set_reset_rx_enh_capture_dest(pdev, &filter); 488 489 /* Clear the filter as the same filter will be used to set the 490 * monitor status ring 491 */ 492 qdf_mem_zero(&(filter), sizeof(struct dp_mon_filter)); 493 494 /* Enabled the filter */ 495 filter.valid = true; 496 dp_mon_filter_set_status_cmn(mon_pdev, &filter); 497 498 /* Setup the filter */ 499 filter.tlv_filter.mpdu_end = 1; 500 filter.tlv_filter.enable_mo = 1; 501 filter.tlv_filter.packet_header = 1; 502 503 if (mon_pdev->rx_enh_capture_mode == CDP_RX_ENH_CAPTURE_MPDU) { 504 filter.tlv_filter.header_per_msdu = 0; 505 filter.tlv_filter.enable_mo = 0; 506 } else if (mon_pdev->rx_enh_capture_mode == 507 CDP_RX_ENH_CAPTURE_MPDU_MSDU) { 508 bool is_rx_mon_proto_flow_tag_enabled = 509 wlan_cfg_is_rx_mon_protocol_flow_tag_enabled(soc->wlan_cfg_ctx); 510 filter.tlv_filter.header_per_msdu = 1; 511 filter.tlv_filter.enable_mo = 0; 512 if (mon_pdev->is_rx_enh_capture_trailer_enabled || 513 is_rx_mon_proto_flow_tag_enabled) 514 filter.tlv_filter.msdu_end = 1; 515 } 516 517 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 518 519 srng_type = DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 520 mon_pdev->filter[mode][srng_type] = filter; 521 } 522 523 void dp_mon_filter_reset_rx_enh_capture_1_0(struct dp_pdev *pdev) 524 { 525 struct dp_mon_filter filter = {0}; 526 struct dp_soc *soc = NULL; 527 enum dp_mon_filter_mode mode = DP_MON_FILTER_RX_CAPTURE_MODE; 528 enum dp_mon_filter_srng_type srng_type = 529 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 530 struct dp_mon_pdev *mon_pdev; 531 532 if (!pdev) { 533 dp_mon_filter_err("pdev Context is null"); 534 return; 535 } 536 537 soc = pdev->soc; 538 if (!soc) { 539 dp_mon_filter_err("Soc Context is null"); 540 return; 541 } 542 543 mon_pdev = pdev->monitor_pdev; 544 dp_mon_filter_set_reset_rx_enh_capture_dest(pdev, &filter); 545 546 srng_type = DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 547 mon_pdev->filter[mode][srng_type] = filter; 548 } 549 #endif /* WLAN_RX_PKT_CAPTURE_ENH */ 550 551 #ifdef QCA_MONITOR_PKT_SUPPORT 552 static void dp_mon_filter_set_reset_mon_dest(struct dp_pdev *pdev, 553 struct dp_mon_filter *pfilter) 554 { 555 struct dp_soc *soc = pdev->soc; 556 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; 557 enum dp_mon_filter_mode mode = DP_MON_FILTER_MONITOR_MODE; 558 enum dp_mon_filter_srng_type srng_type; 559 560 srng_type = ((soc->wlan_cfg_ctx->rxdma1_enable) ? 561 DP_MON_FILTER_SRNG_TYPE_RXDMA_MON_BUF : 562 DP_MON_FILTER_SRNG_TYPE_RXDMA_BUF); 563 564 /* set the filter */ 565 if (pfilter->valid) { 566 dp_mon_filter_set_mon_cmn(pdev, pfilter); 567 568 dp_mon_filter_show_filter(mon_pdev, mode, pfilter); 569 mon_pdev->filter[mode][srng_type] = *pfilter; 570 } else /* reset the filter */ 571 mon_pdev->filter[mode][srng_type] = *pfilter; 572 } 573 #else 574 static void dp_mon_filter_set_reset_mon_dest(struct dp_pdev *pdev, 575 struct dp_mon_filter *pfilter) 576 { 577 } 578 #endif 579 580 void dp_mon_filter_setup_mon_mode_1_0(struct dp_pdev *pdev) 581 { 582 struct dp_mon_filter filter = {0}; 583 struct dp_soc *soc = NULL; 584 enum dp_mon_filter_mode mode = DP_MON_FILTER_MONITOR_MODE; 585 enum dp_mon_filter_srng_type srng_type = 586 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 587 struct dp_mon_pdev *mon_pdev; 588 589 if (!pdev) { 590 dp_mon_filter_err("pdev Context is null"); 591 return; 592 } 593 594 soc = pdev->soc; 595 if (!soc) { 596 dp_mon_filter_err("Soc Context is null"); 597 return; 598 } 599 600 mon_pdev = pdev->monitor_pdev; 601 filter.valid = true; 602 dp_mon_filter_set_reset_mon_dest(pdev, &filter); 603 604 /* Clear the filter as the same filter will be used to set the 605 * monitor status ring 606 */ 607 qdf_mem_zero(&(filter), sizeof(struct dp_mon_filter)); 608 609 /* Enabled the filter */ 610 filter.valid = true; 611 dp_mon_filter_set_status_cmn(mon_pdev, &filter); 612 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 613 614 /* Store the above filter */ 615 srng_type = DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 616 mon_pdev->filter[mode][srng_type] = filter; 617 } 618 619 void dp_mon_filter_reset_mon_mode_1_0(struct dp_pdev *pdev) 620 { 621 struct dp_mon_filter filter = {0}; 622 struct dp_soc *soc = NULL; 623 enum dp_mon_filter_mode mode = DP_MON_FILTER_MONITOR_MODE; 624 enum dp_mon_filter_srng_type srng_type = 625 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 626 struct dp_mon_pdev *mon_pdev; 627 628 if (!pdev) { 629 dp_mon_filter_err("pdev Context is null"); 630 return; 631 } 632 633 soc = pdev->soc; 634 if (!soc) { 635 dp_mon_filter_err("Soc Context is null"); 636 return; 637 } 638 639 mon_pdev = pdev->monitor_pdev; 640 dp_mon_filter_set_reset_mon_dest(pdev, &filter); 641 642 srng_type = DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 643 mon_pdev->filter[mode][srng_type] = filter; 644 } 645 646 static void dp_mon_set_reset_mon_filter(struct dp_mon_filter *filter, bool val) 647 { 648 if (val) { 649 dp_mon_filter_debug("Set monitor filter settings"); 650 filter->tlv_filter.enable_mon_mac_filter = 1; 651 filter->tlv_filter.enable_md = 1; 652 filter->tlv_filter.md_mgmt_filter = FILTER_MGMT_ALL; 653 filter->tlv_filter.md_ctrl_filter = FILTER_CTRL_ALL; 654 filter->tlv_filter.md_data_filter = 0; 655 } else { 656 dp_mon_filter_debug("Reset monitor filter settings"); 657 filter->tlv_filter.enable_mon_mac_filter = 0; 658 filter->tlv_filter.enable_md = 0; 659 filter->tlv_filter.md_mgmt_filter = 0; 660 filter->tlv_filter.md_ctrl_filter = 0; 661 filter->tlv_filter.md_data_filter = 0; 662 } 663 } 664 665 void dp_mon_set_reset_mon_mac_filter_1_0(struct dp_pdev *pdev, bool val) 666 { 667 struct dp_mon_filter filter = {0}; 668 enum dp_mon_filter_mode mode = DP_MON_FILTER_MONITOR_MODE; 669 enum dp_mon_filter_srng_type srng_type = 670 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 671 struct dp_mon_pdev *mon_pdev; 672 673 if (!pdev) { 674 dp_mon_filter_err("pdev Context is null"); 675 return; 676 } 677 678 mon_pdev = pdev->monitor_pdev; 679 680 /* Set monitor buffer filter */ 681 dp_mon_filter_debug("Updating monitor buffer filter"); 682 filter.valid = true; 683 dp_mon_set_reset_mon_filter(&filter, val); 684 dp_mon_filter_set_reset_mon_dest(pdev, &filter); 685 686 /* Set status cmn filter */ 687 dp_mon_filter_debug("Updating monitor status cmn filter"); 688 qdf_mem_zero(&(filter), sizeof(struct dp_mon_filter)); 689 filter.valid = true; 690 dp_mon_filter_set_status_cmn(mon_pdev, &filter); 691 dp_mon_set_reset_mon_filter(&filter, val); 692 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 693 694 /* Store the above filter */ 695 srng_type = DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 696 mon_pdev->filter[mode][srng_type] = filter; 697 } 698 699 #ifdef WDI_EVENT_ENABLE 700 void dp_mon_filter_setup_rx_pkt_log_full_1_0(struct dp_pdev *pdev) 701 { 702 struct dp_mon_filter filter = {0}; 703 enum dp_mon_filter_mode mode = DP_MON_FILTER_PKT_LOG_FULL_MODE; 704 enum dp_mon_filter_srng_type srng_type = 705 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 706 struct dp_mon_pdev *mon_pdev; 707 708 if (!pdev) { 709 dp_mon_filter_err("pdev Context is null"); 710 return; 711 } 712 713 mon_pdev = pdev->monitor_pdev; 714 /* Enabled the filter */ 715 filter.valid = true; 716 dp_mon_filter_set_status_cmn(mon_pdev, &filter); 717 718 /* Setup the filter */ 719 filter.tlv_filter.packet_header = 1; 720 filter.tlv_filter.msdu_start = 1; 721 filter.tlv_filter.msdu_end = 1; 722 filter.tlv_filter.mpdu_end = 1; 723 filter.tlv_filter.attention = 1; 724 725 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 726 mon_pdev->filter[mode][srng_type] = filter; 727 } 728 729 void dp_mon_filter_reset_rx_pkt_log_full_1_0(struct dp_pdev *pdev) 730 { 731 struct dp_mon_filter filter = {0}; 732 enum dp_mon_filter_mode mode = DP_MON_FILTER_PKT_LOG_FULL_MODE; 733 enum dp_mon_filter_srng_type srng_type = 734 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 735 struct dp_mon_pdev *mon_pdev; 736 737 if (!pdev) { 738 dp_mon_filter_err("pdev Context is null"); 739 return; 740 } 741 742 mon_pdev = pdev->monitor_pdev; 743 mon_pdev->filter[mode][srng_type] = filter; 744 } 745 746 void dp_mon_filter_setup_rx_pkt_log_lite_1_0(struct dp_pdev *pdev) 747 { 748 struct dp_mon_filter filter = {0}; 749 enum dp_mon_filter_mode mode = DP_MON_FILTER_PKT_LOG_LITE_MODE; 750 enum dp_mon_filter_srng_type srng_type = 751 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 752 struct dp_mon_pdev *mon_pdev; 753 754 if (!pdev) { 755 dp_mon_filter_err("pdev Context is null"); 756 return; 757 } 758 759 mon_pdev = pdev->monitor_pdev; 760 /* Enabled the filter */ 761 filter.valid = true; 762 dp_mon_filter_set_status_cmn(mon_pdev, &filter); 763 764 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 765 mon_pdev->filter[mode][srng_type] = filter; 766 } 767 768 void dp_mon_filter_reset_rx_pkt_log_lite_1_0(struct dp_pdev *pdev) 769 { 770 struct dp_mon_filter filter = {0}; 771 enum dp_mon_filter_mode mode = DP_MON_FILTER_PKT_LOG_LITE_MODE; 772 enum dp_mon_filter_srng_type srng_type = 773 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 774 struct dp_mon_pdev *mon_pdev; 775 776 if (!pdev) { 777 dp_mon_filter_err("pdev Context is null"); 778 return; 779 } 780 781 mon_pdev = pdev->monitor_pdev; 782 783 mon_pdev->filter[mode][srng_type] = filter; 784 } 785 786 #ifdef QCA_MONITOR_PKT_SUPPORT 787 static 788 void dp_mon_filter_set_reset_rx_pkt_log_cbf_dest(struct dp_pdev *pdev, 789 struct dp_mon_filter *pfilter) 790 { 791 struct dp_soc *soc = pdev->soc; 792 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; 793 enum dp_mon_filter_mode mode = DP_MON_FILTER_PKT_LOG_CBF_MODE; 794 enum dp_mon_filter_srng_type srng_type; 795 796 srng_type = ((soc->wlan_cfg_ctx->rxdma1_enable) ? 797 DP_MON_FILTER_SRNG_TYPE_RXDMA_MON_BUF : 798 DP_MON_FILTER_SRNG_TYPE_RXDMA_BUF); 799 800 /*set the filter */ 801 if (pfilter->valid) { 802 dp_mon_filter_set_cbf_cmn(pdev, pfilter); 803 804 dp_mon_filter_show_filter(mon_pdev, mode, pfilter); 805 mon_pdev->filter[mode][srng_type] = *pfilter; 806 } else /* reset the filter */ 807 mon_pdev->filter[mode][srng_type] = *pfilter; 808 } 809 #else 810 static 811 void dp_mon_filter_set_reset_rx_pkt_log_cbf_dest(struct dp_pdev *pdev, 812 struct dp_mon_filter *pfilter) 813 { 814 } 815 #endif 816 817 void dp_mon_filter_setup_rx_pkt_log_cbf_1_0(struct dp_pdev *pdev) 818 { 819 struct dp_mon_filter filter = {0}; 820 struct dp_soc *soc = NULL; 821 enum dp_mon_filter_mode mode = DP_MON_FILTER_PKT_LOG_CBF_MODE; 822 enum dp_mon_filter_srng_type srng_type = 823 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 824 struct dp_mon_pdev *mon_pdev = NULL; 825 826 if (!pdev) { 827 dp_mon_filter_err("pdev Context is null"); 828 return; 829 } 830 831 mon_pdev = pdev->monitor_pdev; 832 soc = pdev->soc; 833 if (!soc) { 834 dp_mon_filter_err("Soc Context is null"); 835 return; 836 } 837 838 /* Enabled the filter */ 839 filter.valid = true; 840 dp_mon_filter_set_status_cbf(pdev, &filter); 841 dp_mon_filter_show_filter(mon_pdev, mode, &filter); 842 mon_pdev->filter[mode][srng_type] = filter; 843 844 /* Clear the filter as the same filter will be used to set the 845 * monitor status ring 846 */ 847 qdf_mem_zero(&(filter), sizeof(struct dp_mon_filter)); 848 849 filter.valid = true; 850 dp_mon_filter_set_reset_rx_pkt_log_cbf_dest(pdev, &filter); 851 } 852 853 void dp_mon_filter_reset_rx_pktlog_cbf_1_0(struct dp_pdev *pdev) 854 { 855 struct dp_mon_filter filter = {0}; 856 struct dp_soc *soc = NULL; 857 enum dp_mon_filter_mode mode = DP_MON_FILTER_PKT_LOG_CBF_MODE; 858 enum dp_mon_filter_srng_type srng_type = 859 DP_MON_FILTER_SRNG_TYPE_RXDMA_BUF; 860 struct dp_mon_pdev *mon_pdev = NULL; 861 862 if (!pdev) { 863 QDF_TRACE(QDF_MODULE_ID_MON_FILTER, QDF_TRACE_LEVEL_ERROR, 864 FL("pdev Context is null")); 865 return; 866 } 867 868 mon_pdev = pdev->monitor_pdev; 869 soc = pdev->soc; 870 if (!soc) { 871 QDF_TRACE(QDF_MODULE_ID_MON_FILTER, QDF_TRACE_LEVEL_ERROR, 872 FL("Soc Context is null")); 873 return; 874 } 875 876 dp_mon_filter_set_reset_rx_pkt_log_cbf_dest(pdev, &filter); 877 878 srng_type = DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS; 879 mon_pdev->filter[mode][srng_type] = filter; 880 } 881 #endif /* WDI_EVENT_ENABLE */ 882 883 #ifdef WLAN_DP_RESET_MON_BUF_RING_FILTER 884 /** 885 * dp_mon_should_reset_buf_ring_filter() - Reset the monitor buf ring filter 886 * @pdev: DP PDEV handle 887 * 888 * WIN has targets which does not support monitor mode, but still do the 889 * monitor mode init/deinit, only the rxdma1_enable flag will be set to 0. 890 * MCL need to do the monitor buffer ring filter reset always, but this is 891 * not needed for WIN targets where rxdma1 is not enabled (the indicator 892 * that monitor mode is not enabled. 893 * This function is used as WAR till WIN cleans up the monitor mode 894 * function for targets where monitor mode is not enabled. 895 * 896 * Return: true 897 */ 898 static inline bool dp_mon_should_reset_buf_ring_filter(struct dp_pdev *pdev) 899 { 900 return (pdev->monitor_pdev->mvdev) ? true : false; 901 } 902 #else 903 static inline bool dp_mon_should_reset_buf_ring_filter(struct dp_pdev *pdev) 904 { 905 return false; 906 } 907 #endif 908 909 #ifdef QCA_MONITOR_PKT_SUPPORT 910 static QDF_STATUS dp_mon_filter_dest_update(struct dp_pdev *pdev, 911 struct dp_mon_filter *pfilter, 912 bool *pmon_mode_set) 913 { 914 struct dp_soc *soc = pdev->soc; 915 struct dp_mon_pdev *mon_pdev = pdev->monitor_pdev; 916 enum dp_mon_filter_srng_type srng_type; 917 QDF_STATUS status = QDF_STATUS_SUCCESS; 918 uint32_t target_type = hal_get_target_type(soc->hal_soc); 919 920 srng_type = ((soc->wlan_cfg_ctx->rxdma1_enable) ? 921 DP_MON_FILTER_SRNG_TYPE_RXDMA_MON_BUF : 922 DP_MON_FILTER_SRNG_TYPE_RXDMA_BUF); 923 924 dp_mon_filter_h2t_setup(soc, pdev, srng_type, pfilter); 925 926 *pmon_mode_set = pfilter->valid; 927 if (dp_mon_should_reset_buf_ring_filter(pdev) || *pmon_mode_set) { 928 status = dp_mon_ht2_rx_ring_cfg(soc, pdev, 929 srng_type, 930 &pfilter->tlv_filter); 931 } else { 932 /* 933 * For WIN case the monitor buffer ring is used and it does need 934 * reset when monitor mode gets enabled/disabled. 935 */ 936 if (soc->wlan_cfg_ctx->rxdma1_enable || 937 target_type == TARGET_TYPE_QCN9160) { 938 if (mon_pdev->monitor_configured || *pmon_mode_set) { 939 status = dp_mon_ht2_rx_ring_cfg(soc, pdev, 940 srng_type, 941 &pfilter->tlv_filter); 942 } 943 } 944 } 945 946 return status; 947 } 948 949 static void dp_mon_filter_dest_reset(struct dp_pdev *pdev) 950 { 951 struct dp_soc *soc = pdev->soc; 952 enum dp_mon_filter_srng_type srng_type; 953 954 srng_type = ((soc->wlan_cfg_ctx->rxdma1_enable) ? 955 DP_MON_FILTER_SRNG_TYPE_RXDMA_MON_BUF : 956 DP_MON_FILTER_SRNG_TYPE_RXDMA_BUF); 957 958 dp_mon_filter_reset_mon_srng(soc, pdev, srng_type); 959 } 960 #else 961 static QDF_STATUS dp_mon_filter_dest_update(struct dp_pdev *pdev, 962 struct dp_mon_filter *pfilter, 963 bool *pmon_mode_set) 964 { 965 return QDF_STATUS_SUCCESS; 966 } 967 968 static void dp_mon_filter_dest_reset(struct dp_pdev *pdev) 969 { 970 } 971 #endif 972 973 QDF_STATUS dp_mon_filter_update_1_0(struct dp_pdev *pdev) 974 { 975 struct dp_soc *soc; 976 bool mon_mode_set = false; 977 struct dp_mon_filter filter = {0}; 978 QDF_STATUS status = QDF_STATUS_SUCCESS; 979 980 if (!pdev) { 981 dp_mon_filter_err("pdev Context is null"); 982 return QDF_STATUS_E_FAILURE; 983 } 984 985 soc = pdev->soc; 986 if (!soc) { 987 dp_mon_filter_err("Soc Context is null"); 988 return QDF_STATUS_E_FAILURE; 989 } 990 991 status = dp_mon_filter_check_co_exist(pdev); 992 if (status != QDF_STATUS_SUCCESS) 993 return status; 994 995 /* 996 * Setup the filters for the monitor destination ring. 997 */ 998 status = dp_mon_filter_dest_update(pdev, &filter, 999 &mon_mode_set); 1000 1001 if (status != QDF_STATUS_SUCCESS) { 1002 dp_mon_filter_err("%pK: Monitor destination ring filter setting failed", 1003 soc); 1004 return QDF_STATUS_E_FAILURE; 1005 } 1006 1007 /* 1008 * Setup the filters for the status ring. 1009 */ 1010 qdf_mem_zero(&(filter), sizeof(filter)); 1011 dp_mon_filter_h2t_setup(soc, pdev, 1012 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS, 1013 &filter); 1014 1015 /* 1016 * Reset the monitor filters if the all the modes for the status rings 1017 * are disabled. This is done to prevent the HW backpressure from the 1018 * monitor destination ring in case the status ring filters 1019 * are not enabled. 1020 */ 1021 if (!filter.valid && mon_mode_set) 1022 dp_mon_filter_dest_reset(pdev); 1023 1024 if (dp_mon_ht2_rx_ring_cfg(soc, pdev, 1025 DP_MON_FILTER_SRNG_TYPE_RXDMA_MONITOR_STATUS, 1026 &filter.tlv_filter) != QDF_STATUS_SUCCESS) { 1027 dp_mon_filter_err("%pK: Monitor status ring filter setting failed", 1028 soc); 1029 dp_mon_filter_dest_reset(pdev); 1030 return QDF_STATUS_E_FAILURE; 1031 } 1032 1033 return status; 1034 } 1035 1036 #ifdef QCA_MAC_FILTER_FW_SUPPORT 1037 void dp_mon_mac_filter_set(uint32_t *msg_word, 1038 struct htt_rx_ring_tlv_filter *tlv_filter) 1039 { 1040 if (!msg_word || !tlv_filter) 1041 return; 1042 1043 if (tlv_filter->enable_mon_mac_filter > 0) 1044 HTT_RX_RING_SELECTION_CFG_RXPCU_FILTER_SET(*msg_word, 1); 1045 else 1046 HTT_RX_RING_SELECTION_CFG_RXPCU_FILTER_SET(*msg_word, 0); 1047 } 1048 #endif 1049 1050 #if defined(WLAN_CFR_ENABLE) && defined(WLAN_ENH_CFR_ENABLE) 1051 /* 1052 * dp_cfr_filter_1_0() - Configure HOST RX monitor status ring for CFR 1053 * 1054 * @soc_hdl: Datapath soc handle 1055 * @pdev_id: id of data path pdev handle 1056 * @enable: Enable/Disable CFR 1057 * @filter_val: Flag to select Filter for monitor mode 1058 * @cfr_enable_monitor_mode: Flag to be enabled when scan radio is brought up 1059 * in special vap mode 1060 * 1061 * Return: void 1062 */ 1063 static void dp_cfr_filter_1_0(struct cdp_soc_t *soc_hdl, 1064 uint8_t pdev_id, 1065 bool enable, 1066 struct cdp_monitor_filter *filter_val, 1067 bool cfr_enable_monitor_mode) 1068 { 1069 struct dp_soc *soc = cdp_soc_t_to_dp_soc(soc_hdl); 1070 struct dp_pdev *pdev = NULL; 1071 struct htt_rx_ring_tlv_filter htt_tlv_filter = {0}; 1072 int max_mac_rings; 1073 uint8_t mac_id = 0; 1074 struct dp_mon_pdev *mon_pdev; 1075 1076 pdev = dp_get_pdev_from_soc_pdev_id_wifi3(soc, pdev_id); 1077 if (!pdev) { 1078 dp_mon_err("pdev is NULL"); 1079 return; 1080 } 1081 1082 mon_pdev = pdev->monitor_pdev; 1083 1084 if (mon_pdev->mvdev) { 1085 if (enable && cfr_enable_monitor_mode) 1086 pdev->cfr_rcc_mode = true; 1087 else 1088 pdev->cfr_rcc_mode = false; 1089 return; 1090 } 1091 1092 soc = pdev->soc; 1093 pdev->cfr_rcc_mode = false; 1094 max_mac_rings = wlan_cfg_get_num_mac_rings(pdev->wlan_cfg_ctx); 1095 dp_update_num_mac_rings_for_dbs(soc, &max_mac_rings); 1096 1097 dp_mon_debug("Max_mac_rings %d", max_mac_rings); 1098 dp_mon_info("enable : %d, mode: 0x%x", enable, filter_val->mode); 1099 1100 if (enable) { 1101 pdev->cfr_rcc_mode = true; 1102 1103 htt_tlv_filter.ppdu_start = 1; 1104 htt_tlv_filter.ppdu_end = 1; 1105 htt_tlv_filter.ppdu_end_user_stats = 1; 1106 htt_tlv_filter.ppdu_end_user_stats_ext = 1; 1107 htt_tlv_filter.ppdu_end_status_done = 1; 1108 htt_tlv_filter.mpdu_start = 1; 1109 htt_tlv_filter.offset_valid = false; 1110 1111 htt_tlv_filter.enable_fp = 1112 (filter_val->mode & MON_FILTER_PASS) ? 1 : 0; 1113 htt_tlv_filter.enable_md = 0; 1114 htt_tlv_filter.enable_mo = 1115 (filter_val->mode & MON_FILTER_OTHER) ? 1 : 0; 1116 htt_tlv_filter.fp_mgmt_filter = filter_val->fp_mgmt; 1117 htt_tlv_filter.fp_ctrl_filter = filter_val->fp_ctrl; 1118 htt_tlv_filter.fp_data_filter = filter_val->fp_data; 1119 htt_tlv_filter.mo_mgmt_filter = filter_val->mo_mgmt; 1120 htt_tlv_filter.mo_ctrl_filter = filter_val->mo_ctrl; 1121 htt_tlv_filter.mo_data_filter = filter_val->mo_data; 1122 } 1123 1124 for (mac_id = 0; 1125 mac_id < soc->wlan_cfg_ctx->num_rxdma_status_rings_per_pdev; 1126 mac_id++) { 1127 int mac_for_pdev = 1128 dp_get_mac_id_for_pdev(mac_id, pdev->pdev_id); 1129 1130 htt_h2t_rx_ring_cfg(soc->htt_handle, 1131 mac_for_pdev, 1132 soc->rxdma_mon_status_ring[mac_id].hal_srng, 1133 RXDMA_MONITOR_STATUS, 1134 RX_MON_STATUS_BUF_SIZE, 1135 &htt_tlv_filter); 1136 } 1137 } 1138 1139 void dp_cfr_filter_register_1_0(struct cdp_ops *ops) 1140 { 1141 ops->mon_ops->txrx_cfr_filter = dp_cfr_filter_1_0; 1142 } 1143 #endif 1144