Commit 40711486 authored by Chih-Kang Chang's avatar Chih-Kang Chang Committed by Kalle Valo

wifi: rtw89: fix incorrect channel info during scan due to ppdu_sts filtering

We use ppdu_sts to obtain channel information from hardware, to ensure
that the scan results have correct channel information. However, some of
ppdu_sts that is filtered by the to_self check is also needed for the scan
results. Therefore, we modify the filter part in front of CFO count.
Signed-off-by: default avatarChih-Kang Chang <gary.chang@realtek.com>
Signed-off-by: default avatarPing-Ke Shih <pkshih@realtek.com>
Signed-off-by: default avatarKalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/20230320093112.30466-3-pkshih@realtek.com
parent 41209362
...@@ -1220,6 +1220,10 @@ static void rtw89_core_parse_phy_status_ie01(struct rtw89_dev *rtwdev, u8 *addr, ...@@ -1220,6 +1220,10 @@ static void rtw89_core_parse_phy_status_ie01(struct rtw89_dev *rtwdev, u8 *addr,
phy_ppdu->chan_idx = RTW89_GET_PHY_STS_IE01_CH_IDX(addr); phy_ppdu->chan_idx = RTW89_GET_PHY_STS_IE01_CH_IDX(addr);
if (phy_ppdu->rate < RTW89_HW_RATE_OFDM6) if (phy_ppdu->rate < RTW89_HW_RATE_OFDM6)
return; return;
if (!phy_ppdu->to_self)
return;
/* sign conversion for S(12,2) */ /* sign conversion for S(12,2) */
if (rtwdev->chip->cfo_src_fd) if (rtwdev->chip->cfo_src_fd)
cfo = sign_extend32(RTW89_GET_PHY_STS_IE01_FD_CFO(addr), 11); cfo = sign_extend32(RTW89_GET_PHY_STS_IE01_FD_CFO(addr), 11);
...@@ -1284,9 +1288,6 @@ static int rtw89_core_rx_parse_phy_sts(struct rtw89_dev *rtwdev, ...@@ -1284,9 +1288,6 @@ static int rtw89_core_rx_parse_phy_sts(struct rtw89_dev *rtwdev,
if (phy_ppdu->ie < RTW89_CCK_PKT) if (phy_ppdu->ie < RTW89_CCK_PKT)
return -EINVAL; return -EINVAL;
if (!phy_ppdu->to_self)
return 0;
pos = (u8 *)phy_ppdu->buf + PHY_STS_HDR_LEN; pos = (u8 *)phy_ppdu->buf + PHY_STS_HDR_LEN;
end = (u8 *)phy_ppdu->buf + phy_ppdu->len; end = (u8 *)phy_ppdu->buf + phy_ppdu->len;
while (pos < end) { while (pos < end) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment