Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3526565pxx; Mon, 2 Nov 2020 11:12:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJw+bptpoH85PFl12dM1rn6hrzXuqMd/TcGcetEL3jiqoeiRpGp2JLBlsOgBqAcHoMjigtTe X-Received: by 2002:aa7:c792:: with SMTP id n18mr17953569eds.209.1604344363732; Mon, 02 Nov 2020 11:12:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604344363; cv=none; d=google.com; s=arc-20160816; b=GvxEH98S7T/uCRFQOwHoY4xgO6kvHlzRnLwM/YveUUliGBLwRDNLmQgvGwJchQMFah B72JO1m1vB55LXDRJyWDpFzqg1u8SbmnVvfdol9v2zvktyDZhCdGFUAAxEEvfXSP3hd7 jYqKd6WYxb//TBtMpWMrFOBUNcKYegZI7qkWmpAENaP4fhZ7IiTnYxgTX0pUXjLwo3zY Q636cHN/Bkfjr/bGml2ZXnzgp7pbelUiCqc+RzLs5BMQRgvkTJpgj1bPqHKaN3KR+mMZ 4xj/v6iVSIxaZXm3/WHr6Xm7rm5FEGmzdyr85V/8itf/nnK3KLucFKBfwscpgMy6PuNC 3m0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vyQx56zpnmxx8qbe0FMjn+/wJF9Lk5u+0ocSXSWohiw=; b=AeeqUMsLOYnPDk9IypJI5y+Yx2AAB1Br+4D4PDG84za+lhjcfszFywDZP2PmVcAxX0 crvqEhC8bWZfnCumAuJnBWDLlJs/Wfzb90KSVm3mI5tu+tiwh1rQ679DA674TogkwERX /6ldZ74yCoWBl34+berBVEoeUFh02Q+27ygzyD668eZjbrZE5doX5bPi8Q1GBnXZhW9x Kb6Cgab4FIBj+VSKqB0V1fLJFtiwhbz0Quk+e0MAMszzDpGwoIYn2Cu4msAjDWC8pqAg n9K6WKYd5Zhr3JSP+nJ75zrj0l3gWb/HwBvB1acpHB9qWyndWgilmXpocchVICisN2Js 6maQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vYcB1TXN; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u19si3109001ejx.98.2020.11.02.11.12.12; Mon, 02 Nov 2020 11:12:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vYcB1TXN; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725926AbgKBTJx (ORCPT + 99 others); Mon, 2 Nov 2020 14:09:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725789AbgKBTJx (ORCPT ); Mon, 2 Nov 2020 14:09:53 -0500 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1E57C0617A6 for ; Mon, 2 Nov 2020 11:09:51 -0800 (PST) Received: by mail-ed1-x543.google.com with SMTP id b9so5260229edu.10 for ; Mon, 02 Nov 2020 11:09:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vyQx56zpnmxx8qbe0FMjn+/wJF9Lk5u+0ocSXSWohiw=; b=vYcB1TXNWeXSU3MmMr0xTQgtLtZ3WXo4DNh7jP6Bjyp9/8tRTnUEJb1Rp+CGHCRqBi 2BjJWvSIaw4nVPoxR2WgWXxl1ibyqa3PHlfLG1k6z1qg6XRzjNmY3VNyzbcj/RUQ8rWk Y9m76+EwH5s4GuhK0W0g40xup5FwRShTOJO0VlyxQRGVxI5LvLFyD3Pwus4X8MK2DNkk i3ydRSm4TLyMfcWwFJHxxzMNg4Qhb8t7b3QB3Si709qznLC6rdK7PJPl6Lubf73QxzPz C51Ff16n8f/MN5LuDxs/imTP5UnQkx6H995nWfm/2iu4QGcm+TtOh3szp9emasIwyPJg VMcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vyQx56zpnmxx8qbe0FMjn+/wJF9Lk5u+0ocSXSWohiw=; b=aurcUUOBg5GHvR9YGe39+WzLEQlAUlN9+UsGhjryv0ZZky1PDJn0T4rkb9PPPVuP9f raJh34Qp2/Tx4Va3ByPBGy4dxbhB0ZeULph17YM21TtR7n3PsNiNOShDb8Sky8SHsw9e j41C41f9QQ+Ki641EGK+qzp6TYgknkG6P1bN0PArZWaDIRzG+Frvzbt8/NBlSzaizqyh JjbG9Q8Pt9hCoq8Xs+3fmjhmvsW04Z5xO/D8DlkDIwCFisMBPVo2rjcjgb/Uf4Ja8oXK jW/Hi+/Lm7Yy1JuogBJ+6K/U9Ak8UyIfXknGKPHVHpSsE1D7ge1BAAq0882l3boerRi5 C+ZQ== X-Gm-Message-State: AOAM531o6bqtOCkPvLh8GFpN5pP7jCzsSaVadeD/RT15HsKMA/arNnRP 4WTWbxUUteNaSdg7nxIgmrdkKTXCza4z35anqwWPiQ== X-Received: by 2002:a05:6402:22d8:: with SMTP id dm24mr9986102edb.69.1604344190357; Mon, 02 Nov 2020 11:09:50 -0800 (PST) MIME-Version: 1.0 References: <20201031022311.1677337-1-bryan.odonoghue@linaro.org> <20201031022311.1677337-3-bryan.odonoghue@linaro.org> <53a8a962-386e-3af4-2caf-6ac74fc48a25@linaro.org> In-Reply-To: <53a8a962-386e-3af4-2caf-6ac74fc48a25@linaro.org> From: Loic Poulain Date: Mon, 2 Nov 2020 20:15:46 +0100 Message-ID: Subject: Re: [PATCH 2/3] wcn36xx: Enable firmware link monitoring To: "Bryan O'Donoghue" Cc: Kalle Valo , wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, Shawn Guo Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Sat, 31 Oct 2020 at 14:01, Bryan O'Donoghue wrote: > > On 31/10/2020 09:57, Loic Poulain wrote: > > On Sat, 31 Oct 2020 at 03:22, Bryan O'Donoghue > > wrote: > >> > >> This patch switches on CONNECTION_MONITOR. Once done it is up to the > >> firmware to send keep alive and to monitor the link state. > >> > >> Signed-off-by: Bryan O'Donoghue > >> --- > >> drivers/net/wireless/ath/wcn36xx/main.c | 1 + > >> 1 file changed, 1 insertion(+) > >> > >> diff --git a/drivers/net/wireless/ath/wcn36xx/main.c b/drivers/net/wireless/ath/wcn36xx/main.c > >> index 706728fba72d..e924cc4acde0 100644 > >> --- a/drivers/net/wireless/ath/wcn36xx/main.c > >> +++ b/drivers/net/wireless/ath/wcn36xx/main.c > >> @@ -1246,6 +1246,7 @@ static int wcn36xx_init_ieee80211(struct wcn36xx *wcn) > >> ieee80211_hw_set(wcn->hw, HAS_RATE_CONTROL); > >> ieee80211_hw_set(wcn->hw, SINGLE_SCAN_ON_ALL_BANDS); > >> ieee80211_hw_set(wcn->hw, REPORTS_TX_ACK_STATUS); > >> + ieee80211_hw_set(wcn->hw, CONNECTION_MONITOR); > > > > The problem could be that when connection monitor is enabled, mac80211 > > stop sending regular null/probe packet to the AP (as expected), but > > also stop monitoring beacon miss: > > https://elixir.bootlin.com/linux/v5.10-rc1/source/net/mac80211/mlme.c#L115 > > > > That's not a big problem, but that would mean that in active mode > > (power_save disabled, non PS), the mac80211 will not detect if the AP > > has left immediately, and in worst case, only after 30 seconds. Note > > that in PS mode, beacon monitoring is well done by the firmware. > > > > If you pull the plug out of the AP it can take up to 30 seconds to see > it agreed. > > On the flip side, the amount of NULL data packets produced drops off > significantly once we delegate this completely to the firmware. > > IMO you gain more by reducing the regular runtime noise than you loose > with the timing out of an gone away AP. OK, fair enough! Loic