Without this fix, some non-self packets are used to count CFO (center
frequency offset), and average CFO has unstable variation. Then, it causes
unexpected performance.
Signed-off-by: Eric Huang <echuang@realtek.com>
Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20221005083212.45683-3-pkshih@realtek.com
        if (phy_ppdu->ie < RTW89_CCK_PKT)
                return -EINVAL;
 
+       if (!phy_ppdu->to_self)
+               return 0;
+
        pos = (u8 *)phy_ppdu->buf + PHY_STS_HDR_LEN;
        end = (u8 *)phy_ppdu->buf + phy_ppdu->len;
        while (pos < end) {