Message ID | TYAP286MB0315DBC21F89552F7D235E56BCA3A@TYAP286MB0315.JPNP286.PROD.OUTLOOK.COM (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Kalle Valo |
Headers | show |
Series | [1/3] wifi: rt2x00: introduce DMA busy check watchdog for rt2800 | expand |
Shiji Yang <yangshiji66@outlook.com> writes: > Disable the RTS threshold for OFDM and CCK rates by default as the > initial RTS threshold is 'IEEE80211_MAX_RTS_THRESHOLD'. And RTS > thresholds for all other rates have already been disabled when init. > > Signed-off-by: Shiji Yang <yangshiji66@outlook.com> The commit log should always answer to the question "Why?". What problem does this patch fix?
On Sat, 28 Oct 2023 17:54:27 +0300, Kalle Valo wrote: >Shiji Yang <yangshiji66@outlook.com> writes: > >> Disable the RTS threshold for OFDM and CCK rates by default as the >> initial RTS threshold is 'IEEE80211_MAX_RTS_THRESHOLD'. And RTS >> thresholds for all other rates have already been disabled when init. >> >> Signed-off-by: Shiji Yang <yangshiji66@outlook.com> > >The commit log should always answer to the question "Why?". What problem >does this patch fix? Hi! Thanks for your review. rt2800 has a lot of registers to control the RTS enable/disable status for different rates. And the driver control them via rt2800_set_rts_threshold(). I found that when RTS was disabled in user interface, this function won't be called at all. This means that the RTS is still 'on' for CCK and OFDM rates. So we'd better to disable them by default in case they did some bad things. The RTS for HT20 and HT40 is already default off so we don't need to touch them. If we toggle the RTS status, these register bits will be enabled/disabled again by rt2800_set_rts_threshold(). If this patch is acceptable, I will add more explanations in the v2 patch. Anyway, I don't know if it really solves some existing problems, but I think it should be like this. Regards, Shiji Yang
On Sat, Oct 28, 2023 at 08:15:31PM +0800, Shiji Yang wrote: > Disable the RTS threshold for OFDM and CCK rates by default as the > initial RTS threshold is 'IEEE80211_MAX_RTS_THRESHOLD'. And RTS > thresholds for all other rates have already been disabled when init. > Signed-off-by: Shiji Yang <yangshiji66@outlook.com> Acked-by: Stanislaw Gruszka <stf_xl@wp.pl>
diff --git a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c index 6ca2f2c23..bcc63f1cb 100644 --- a/drivers/net/wireless/ralink/rt2x00/rt2800lib.c +++ b/drivers/net/wireless/ralink/rt2x00/rt2800lib.c @@ -6104,7 +6104,7 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) rt2x00_set_field32(®, CCK_PROT_CFG_TX_OP_ALLOW_MM40, 0); rt2x00_set_field32(®, CCK_PROT_CFG_TX_OP_ALLOW_GF20, 1); rt2x00_set_field32(®, CCK_PROT_CFG_TX_OP_ALLOW_GF40, 0); - rt2x00_set_field32(®, CCK_PROT_CFG_RTS_TH_EN, 1); + rt2x00_set_field32(®, CCK_PROT_CFG_RTS_TH_EN, 0); rt2800_register_write(rt2x00dev, CCK_PROT_CFG, reg); reg = rt2800_register_read(rt2x00dev, OFDM_PROT_CFG); @@ -6117,7 +6117,7 @@ static int rt2800_init_registers(struct rt2x00_dev *rt2x00dev) rt2x00_set_field32(®, OFDM_PROT_CFG_TX_OP_ALLOW_MM40, 0); rt2x00_set_field32(®, OFDM_PROT_CFG_TX_OP_ALLOW_GF20, 1); rt2x00_set_field32(®, OFDM_PROT_CFG_TX_OP_ALLOW_GF40, 0); - rt2x00_set_field32(®, OFDM_PROT_CFG_RTS_TH_EN, 1); + rt2x00_set_field32(®, OFDM_PROT_CFG_RTS_TH_EN, 0); rt2800_register_write(rt2x00dev, OFDM_PROT_CFG, reg); reg = rt2800_register_read(rt2x00dev, MM20_PROT_CFG);
Disable the RTS threshold for OFDM and CCK rates by default as the initial RTS threshold is 'IEEE80211_MAX_RTS_THRESHOLD'. And RTS thresholds for all other rates have already been disabled when init. Signed-off-by: Shiji Yang <yangshiji66@outlook.com> --- drivers/net/wireless/ralink/rt2x00/rt2800lib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)