Message ID | 20201031022311.1677337-2-bryan.odonoghue@linaro.org |
---|---|
State | New |
Headers | show |
Series | wcn36xx: Firmware link monitor/keepalive offload | expand |
HI Bryan, On Sat, 31 Oct 2020 at 03:22, Bryan O'Donoghue <bryan.odonoghue@linaro.org> wrote: > > The firmware parameter LINK_FAIL_TX_CNT maps to the prima configuration > file parameter gLinkFailTxCnt and is described as: > > quote: " If within gLinkFailTimeout period(values is mentioned in msec) if > FW doesn't receive acks for gLinkFailTxCnt number of packets, then > link will be disconnected." > > The downstream description sets a minimum value of 1000 a maximum value of > 60000 and a default value of 6000, however it appears that unless we > actually set this value deliberately firmware defaults it to 0. > > Setting this value to non-zero results in the firmware doing link > monitoring. > > In conjunction with ieee80211_hw_set(wcn->hw, CONNECTION_MONITOR); this > change effects offload of link monitoring to the firmware. > > Tested with: > 'CNSS-PR-2-0-1-2-c1-74-130449-3' wcn3620 > 'CNSS-PR-2-0-1-2-c1-00083' wcn3680 > > Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> > --- > drivers/net/wireless/ath/wcn36xx/smd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c > index 766400f7b61c..262978371c1f 100644 > --- a/drivers/net/wireless/ath/wcn36xx/smd.c > +++ b/drivers/net/wireless/ath/wcn36xx/smd.c > @@ -78,6 +78,7 @@ static struct wcn36xx_cfg_val wcn36xx_cfg_vals[] = { > WCN36XX_CFG_VAL(MAX_ASSOC_LIMIT, 10), > WCN36XX_CFG_VAL(ENABLE_MCC_ADAPTIVE_SCHEDULER, 0), > WCN36XX_CFG_VAL(ENABLE_DYNAMIC_RA_START_RATE, 133), /* MCS 5 */ > + WCN36XX_CFG_VAL(LINK_FAIL_TX_CNT, 200), Could you set the value to the minimum value described in the downstream driver (i.e 1000)? Not sure a lower value is supported on all wcn36xx firmware versions. So better to align with the recommendations. > }; > > static struct wcn36xx_cfg_val wcn3680_cfg_vals[] = { > -- > 2.28.0 >
On 31/10/2020 09:33, Loic Poulain wrote: > Could you set the value to the minimum value described in the > downstream driver (i.e 1000)? Agreed. Seems reasonable
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index 766400f7b61c..262978371c1f 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c @@ -78,6 +78,7 @@ static struct wcn36xx_cfg_val wcn36xx_cfg_vals[] = { WCN36XX_CFG_VAL(MAX_ASSOC_LIMIT, 10), WCN36XX_CFG_VAL(ENABLE_MCC_ADAPTIVE_SCHEDULER, 0), WCN36XX_CFG_VAL(ENABLE_DYNAMIC_RA_START_RATE, 133), /* MCS 5 */ + WCN36XX_CFG_VAL(LINK_FAIL_TX_CNT, 200), }; static struct wcn36xx_cfg_val wcn3680_cfg_vals[] = {
The firmware parameter LINK_FAIL_TX_CNT maps to the prima configuration file parameter gLinkFailTxCnt and is described as: quote: " If within gLinkFailTimeout period(values is mentioned in msec) if FW doesn't receive acks for gLinkFailTxCnt number of packets, then link will be disconnected." The downstream description sets a minimum value of 1000 a maximum value of 60000 and a default value of 6000, however it appears that unless we actually set this value deliberately firmware defaults it to 0. Setting this value to non-zero results in the firmware doing link monitoring. In conjunction with ieee80211_hw_set(wcn->hw, CONNECTION_MONITOR); this change effects offload of link monitoring to the firmware. Tested with: 'CNSS-PR-2-0-1-2-c1-74-130449-3' wcn3620 'CNSS-PR-2-0-1-2-c1-00083' wcn3680 Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> --- drivers/net/wireless/ath/wcn36xx/smd.c | 1 + 1 file changed, 1 insertion(+)