wifi: rtw89: send OFDM rate only in P2P mode
authorDian-Syuan Yang <dian_syuan0116@realtek.com>
Thu, 22 Sep 2022 01:04:32 +0000 (09:04 +0800)
committerKalle Valo <kvalo@kernel.org>
Sat, 24 Sep 2022 12:36:27 +0000 (15:36 +0300)
commit3788c599da62917bbdf79abf829276eb8e0b087c
treea48da684670ba9c03c65081e2dc788a25480503a
parente8ecfdd656ab6d744f79d16821ad7911ff35649e
wifi: rtw89: send OFDM rate only in P2P mode

Check IEEE80211_TX_CTL_NO_CCK_RATE flag to avoid sending frames with
CCK rates in 2GHz band.

In TX flow, add IEEE80211_TX_CTL_NO_CCK_RATE flag to check and get its
lowest rate without CCK rates if the TX type is mgmt frames or data frames.
Besides, the decision of phy rate and retry rate in P2P mode are also
be handled.

In P2P GO mode, it should send beacon of no CCK rates in its frame rate.
Therefore, We add a condition to decide which rate is added to beacon
content.

Moreover, we avoid setting a mask of rates to be used for rate control
selection before and after connection in P2P mode.

Signed-off-by: Dian-Syuan Yang <dian_syuan0116@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/20220922010435.12167-3-pkshih@realtek.com
drivers/net/wireless/realtek/rtw89/core.c
drivers/net/wireless/realtek/rtw89/fw.c
drivers/net/wireless/realtek/rtw89/mac80211.c
drivers/net/wireless/realtek/rtw89/phy.c