Skip to content

Commit

Permalink
ath10k: fix fw stats processing
Browse files Browse the repository at this point in the history
If stat data exceeds wmi-htc buffer limits
firmware splits it into many wmi stats update
events which are delivered in a ping-pong fashion
triggered by wmi stats request command.

Since there's only an implicit start-of-data and
no end-of-data indications the driver has to
perform some trickery to get complete stat data.

kvalo: use %zu to fix a compiler warning and fix a typo in a comment

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
  • Loading branch information
Michal Kazior authored and Kalle Valo committed Sep 29, 2014
1 parent fb2e9c0 commit 5326849
Show file tree
Hide file tree
Showing 3 changed files with 252 additions and 95 deletions.
19 changes: 10 additions & 9 deletions drivers/net/wireless/ath/ath10k/core.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,17 @@ struct ath10k_wmi {
};

struct ath10k_fw_stats_peer {
struct list_head list;

u8 peer_macaddr[ETH_ALEN];
u32 peer_rssi;
u32 peer_tx_rate;
u32 peer_rx_rate; /* 10x only */
};

struct ath10k_fw_stats {
struct ath10k_fw_stats_pdev {
struct list_head list;

/* PDEV stats */
s32 ch_noise_floor;
u32 tx_frame_count;
Expand Down Expand Up @@ -178,15 +182,11 @@ struct ath10k_fw_stats {
s32 phy_errs;
s32 phy_err_drop;
s32 mpdu_errs;
};

/* VDEV STATS */

/* PEER STATS */
u8 peers;
struct ath10k_fw_stats_peer peer_stat[TARGET_NUM_PEERS];

/* TODO: Beacon filter stats */

struct ath10k_fw_stats {
struct list_head pdevs;
struct list_head peers;
};

struct ath10k_dfs_stats {
Expand Down Expand Up @@ -294,6 +294,7 @@ struct ath10k_debug {

struct ath10k_fw_stats fw_stats;
struct completion fw_stats_complete;
bool fw_stats_done;
DECLARE_BITMAP(wmi_service_bitmap, WMI_SERVICE_MAX);

unsigned long htt_stats_mask;
Expand Down
Loading

0 comments on commit 5326849

Please sign in to comment.