RTW89_TAS_TXPWR_WINDOW
u64 txpwr_history[RTW89_TAS_TXPWR_WINDOW];
WARN_ON_ONCE(tas->window_size > RTW89_TAS_TXPWR_WINDOW);
head_idx = (tas->txpwr_tail_idx - window_size + 1 + RTW89_TAS_TXPWR_WINDOW) %
RTW89_TAS_TXPWR_WINDOW;
j = (head_idx + i) % RTW89_TAS_TXPWR_WINDOW;
tas->txpwr_head_idx = (tas->txpwr_head_idx + 1) % RTW89_TAS_TXPWR_WINDOW;
tas->txpwr_tail_idx = (tas->txpwr_tail_idx + 1) % RTW89_TAS_TXPWR_WINDOW;
for (i = 0; i < RTW89_TAS_TXPWR_WINDOW; i++)
tas->total_txpwr = linear * RTW89_TAS_TXPWR_WINDOW;
tas->window_size = RTW89_TAS_TXPWR_WINDOW;
tas->txpwr_tail_idx = RTW89_TAS_TXPWR_WINDOW - 1;