Commit 29e2adf
wifi: ath11k: consistently use ath11k_mac_get_fw_stats()
Currently to get firmware stats, ath11k_mac_op_get_txpower() calls
ath11k_fw_stats_request() and ath11k_mac_op_sta_statistics() calls
ath11k_mac_get_fw_stats(). Those two helpers are basically doing
the same, except for:
1. ath11k_mac_get_fw_stats() verifies ar->state inside itself.
2. ath11k_mac_get_fw_stats() calls ath11k_mac_fw_stats_request()
which then calls ath11k_mac_fw_stats_reset() to free pdev/vdev
stats whereas only pdev stats are freed by ath11k_fw_stats_request().
3. ath11k_mac_get_fw_stats() waits for ar->fw_stats_complete and
ar->fw_stats_done, whereas ath11k_fw_stats_request() only waits for
ar->fw_stats_complete.
Change to call ath11k_mac_get_fw_stats() in ath11k_mac_op_get_txpower().
This is valid because:
1. ath11k_mac_op_get_txpower() also has the same request on ar->state.
2. it is harmless to call ath11k_fw_stats_vdevs_free() since
ar->fw_stats.vdevs should be empty and there should be no one
expecting it at that time.
3. ath11k_mac_op_get_txpower() only needs pdev stats. For pdev stats,
ar->fw_stats_done is set to true whenever ar->fw_stats_complete is
set to true in ath11k_update_stats_event(). So additional wait on
ar->fw_stats_done does not wast any time.
Tested-on: WCN6855 hw2.0 PCI WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
Signed-off-by: Baochen Qiang <[email protected]>
Reviewed-by: Vasanthakumar Thiagarajan <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jeff Johnson <[email protected]>1 parent c5b92a2 commit 29e2adf
1 file changed
+2
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9457 | 9457 | | |
9458 | 9458 | | |
9459 | 9459 | | |
9460 | | - | |
9461 | | - | |
9462 | | - | |
9463 | | - | |
9464 | | - | |
9465 | | - | |
9466 | | - | |
9467 | | - | |
9468 | | - | |
9469 | | - | |
9470 | | - | |
9471 | | - | |
9472 | | - | |
9473 | | - | |
9474 | | - | |
9475 | | - | |
9476 | | - | |
9477 | | - | |
9478 | | - | |
9479 | | - | |
9480 | | - | |
9481 | | - | |
9482 | | - | |
9483 | | - | |
9484 | | - | |
9485 | | - | |
9486 | | - | |
9487 | | - | |
9488 | | - | |
9489 | | - | |
9490 | | - | |
9491 | | - | |
9492 | | - | |
9493 | | - | |
9494 | 9460 | | |
9495 | 9461 | | |
9496 | 9462 | | |
9497 | 9463 | | |
9498 | 9464 | | |
9499 | 9465 | | |
9500 | 9466 | | |
9501 | | - | |
9502 | 9467 | | |
9503 | 9468 | | |
9504 | 9469 | | |
| |||
9510 | 9475 | | |
9511 | 9476 | | |
9512 | 9477 | | |
9513 | | - | |
9514 | | - | |
9515 | | - | |
9516 | 9478 | | |
9517 | 9479 | | |
9518 | 9480 | | |
| |||
9521 | 9483 | | |
9522 | 9484 | | |
9523 | 9485 | | |
9524 | | - | |
9525 | | - | |
9526 | | - | |
9527 | | - | |
| 9486 | + | |
| 9487 | + | |
9528 | 9488 | | |
9529 | 9489 | | |
9530 | 9490 | | |
| |||
0 commit comments