RTW89_NUM_OF_SER_FLAGS
};
+struct rtw89_ser_count {
+ unsigned int l1;
+ unsigned int l2;
+};
+
struct rtw89_ser {
u8 state;
u8 alarm_event;
bool prehandle_l1;
+ struct rtw89_ser_count sw_cnt;
+
struct work_struct ser_hdl_work;
struct delayed_work ser_alarm_work;
const struct state_ent *st_tbl;
struct rtw89_debugfs_priv *debugfs_priv,
char *buf, size_t bufsz)
{
+ const struct rtw89_ser_count *sw_cnt = &rtwdev->ser.sw_cnt;
const struct rtw89_chip_info *chip = rtwdev->chip;
struct rtw89_dbg_ser_counters cnt = {};
char *p = buf, *end = buf + bufsz;
return -EOPNOTSUPP;
}
+ p += scnprintf(p, end - p, "SER L1 SW Count: %u\n", sw_cnt->l1);
+ p += scnprintf(p, end - p, "SER L2 SW Count: %u\n", sw_cnt->l2);
+
+ /* Some chipsets won't record SER simulation in HW cnt. */
+ p += scnprintf(p, end - p, "---\n");
p += scnprintf(p, end - p, "SER L0 Count: %d\n", cnt.l0);
p += scnprintf(p, end - p, "SER L1 Count: %d\n", cnt.l1);
p += scnprintf(p, end - p, "SER L0 promote event: %d\n", cnt.l0_to_l1);
switch (evt) {
case SER_EV_STATE_IN:
wiphy_lock(wiphy);
+ ser->sw_cnt.l1++;
wiphy_delayed_work_cancel(wiphy, &rtwdev->track_work);
wiphy_delayed_work_cancel(wiphy, &rtwdev->track_ps_work);
wiphy_unlock(wiphy);
switch (evt) {
case SER_EV_STATE_IN:
wiphy_lock(rtwdev->hw->wiphy);
+ ser->sw_cnt.l2++;
ser_l2_reset_st_pre_hdl(ser);
wiphy_unlock(rtwdev->hw->wiphy);