Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp846310pxb; Wed, 1 Sep 2021 11:09:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw/Gz8BNFOgZoB5JXvJFj5jLrjEgN0Yvg7uPhTOjZvEAEKKzNml78Tbh9Z79Xecg9Mru7wK X-Received: by 2002:a05:6402:148:: with SMTP id s8mr911061edu.298.1630519768759; Wed, 01 Sep 2021 11:09:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630519768; cv=none; d=google.com; s=arc-20160816; b=cjh+JTCQkIWTJlh3ygdVSlBYNeUfiXTwmXUCfRJq1rC0zH2DW++IiOxDr9BTKnO8o1 0Lb9jLa54oMSd/YN2hZxq+xQrHOJ8ycqWVLD0lEgoeOSSAmvOIyUzxzyKBYDfbvdu8z1 9l0EC8AEHsccVdlA/U3AGenKFTK/fzihGYQFg9tH8pG9/yxk0HB674j1Jf3dNAuv3VGI c/yrkFYT6TgDFuj+hUNpPACa1EIHHwmAnkarbyrnP+DwXr2OfOmRNCW5/0JQHYWQR5ve pDCXbK4rOw80759HStGg0MFIgYSG3w13Zo/gk9p6w9CN8cnRVVl20lb844QfwCUx6K4N x2Vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=y30if3F3NS1+QkGYwwybS7kbIaoempyrzf9jSIfoY3A=; b=gffbuxRvp9U80R7aqwfW7ukio+q7T/1saVp/EWg8WvxcvC2QQJHcLRdWJy5oc0R0+e hEpHrGK2Fq7D5F92yiy3u5ZR7vv4UCxsPzPztPe60DjlxIvBa17yOmXbSgVwLtaSN3v6 +AC1kdeynYoklHva14X5CjDMaT1+hziVYJ9wqPhbYU5lLZqM2nPJAH+c8REVcNigsHDp 5QDobDtVe/qsZNiUNXZJFwBIQ5IIMtO7MsrvQLZ0EvCjd2SXpmzqD6PUA+P/qkFCXIZy rbB/uUELLU+ySkI9F3HzWpr/2tMJ6OGNbJZZVJYHV6pu9I808YkTaYaeFIKhwhLpFBvt VUXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@squareup.com header.s=google header.b=ESredNTJ; 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=REJECT sp=REJECT dis=NONE) header.from=squareup.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f7si184436edw.309.2021.09.01.11.08.37; Wed, 01 Sep 2021 11:09:28 -0700 (PDT) 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=@squareup.com header.s=google header.b=ESredNTJ; 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=REJECT sp=REJECT dis=NONE) header.from=squareup.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344813AbhIASDf (ORCPT + 99 others); Wed, 1 Sep 2021 14:03:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51342 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344238AbhIASDe (ORCPT ); Wed, 1 Sep 2021 14:03:34 -0400 Received: from mail-pg1-x52e.google.com (mail-pg1-x52e.google.com [IPv6:2607:f8b0:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB78DC061764 for ; Wed, 1 Sep 2021 11:02:35 -0700 (PDT) Received: by mail-pg1-x52e.google.com with SMTP id k24so247832pgh.8 for ; Wed, 01 Sep 2021 11:02:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squareup.com; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=y30if3F3NS1+QkGYwwybS7kbIaoempyrzf9jSIfoY3A=; b=ESredNTJViz+fzZkQ9m1MSPT3f0f154gcIeOGNFX7Q4gaI0pDTE1Gg9QpIhLX/bsIN sqJZ5ZbH7QAo4eMn/tf4BQ0lWmYVvghCuMBoolH58nH9Vx5aewNop+MmfSIff6JTs+Z5 jmze25Fq8cVXjxxwX+KqnBae1gP4cflG5UP/w= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=y30if3F3NS1+QkGYwwybS7kbIaoempyrzf9jSIfoY3A=; b=HxeJet68nbMueJIjE8q05B9JFFc8A994yNJdfJWMvDhAsYhpvcRTBfqn1UyzOoini/ PiUx2+4/3iewtunnp1z/ct+DsrccXeLSffRo18/aNVVtZNlNt6Gvc/dhr3DxxeJDlKKI TD1UpJKtFg2ociumQSkd6yhaRXIYJU6Ql8t0odWteT7qvR81N5aOS1FBAGiRH7ET5zdJ +yJeQ2A/jCYE5YKzlo8c8qfH/fmyMAJ4l99B+IPUoNBmVt7bqTgO7Wn1H96Dlu01Ew6r lJnnpDey4v5n6QShF/72tyAUxT/EiCJyB7wakBEN1Prd6RAHiN055CCUspKvEvhY/G8i 1X6w== X-Gm-Message-State: AOAM532i0EcSe5jsRzaafBxazJGfYeggJ+UIzHnqEFCP78jXyT4cWFpe Yq9Vi7ND6kSJ+9sBcjUFHzEPXQ== X-Received: by 2002:aa7:9ae9:0:b0:3f5:e1a7:db23 with SMTP id y9-20020aa79ae9000000b003f5e1a7db23mr718513pfp.42.1630519355340; Wed, 01 Sep 2021 11:02:35 -0700 (PDT) Received: from benl-m5lvdt.local ([2600:6c50:4d00:2376:c5f1:a747:4b09:56ac]) by smtp.gmail.com with ESMTPSA id v190sm147942pfv.166.2021.09.01.11.02.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 01 Sep 2021 11:02:34 -0700 (PDT) Subject: Re: [PATCH] wcn36xx: handle connection loss indication To: Bryan O'Donoghue , Loic Poulain Cc: Kalle Valo , stable@vger.kernel.org, "David S. Miller" , Jakub Kicinski , wcn36xx@lists.infradead.org, linux-wireless@vger.kernel.org, Network Development , open list References: <20210901030542.17257-1-benl@squareup.com> From: Benjamin Li Message-ID: <168f96a5-58ec-fea9-c0d3-61f925bd1129@squareup.com> Date: Wed, 1 Sep 2021 11:02:32 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Thanks for the investigation! As discussed offline, I will send v2 with Fixes: removed, and Bryan will test and submit a separate patch to add the additional feat_caps for the power_save off case. Depending on DB410c testing, these feat_caps may need to be gated for WCN3680 only, in which case Loic's patch to re-enable CONNECTION_MONITOR (but gated for WCN3660/3620) would still be needed. Ben On 9/1/21 4:56 AM, Bryan O'Donoghue wrote: > On 01/09/2021 07:40, Loic Poulain wrote: >> iw wlan0 set power_save off > > I do this on wcn3680b and get no loss of signal > > If I do this though > > diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c > index 03966072f34c..ba613fbb728d 100644 > --- a/drivers/net/wireless/ath/wcn36xx/smd.c > +++ b/drivers/net/wireless/ath/wcn36xx/smd.c > @@ -2345,6 +2345,8 @@ int wcn36xx_smd_feature_caps_exchange(struct wcn36xx *wcn) >                 set_feat_caps(msg_body.feat_caps, DOT11AC); >                 set_feat_caps(msg_body.feat_caps, ANTENNA_DIVERSITY_SELECTION); >         } > +       set_feat_caps(msg_body.feat_caps, IBSS_HEARTBEAT_OFFLOAD); > +       set_feat_caps(msg_body.feat_caps, WLANACTIVE_OFFLOAD); > >         PREPARE_HAL_BUF(wcn->hal_buf, msg_body); > > @@ -2589,7 +2591,7 @@ static int wcn36xx_smd_missed_beacon_ind(struct wcn36xx *wcn, >         struct wcn36xx_hal_missed_beacon_ind_msg *rsp = buf; >         struct ieee80211_vif *vif = NULL; >         struct wcn36xx_vif *tmp; > - > +wcn36xx_info("%s/%d\n", __func__, __LINE__); >         /* Old FW does not have bss index */ >         if (wcn36xx_is_fw_version(wcn, 1, 2, 2, 24)) { >                 list_for_each_entry(tmp, &wcn->vif_list, list) { > @@ -2608,7 +2610,7 @@ static int wcn36xx_smd_missed_beacon_ind(struct wcn36xx *wcn, > >         list_for_each_entry(tmp, &wcn->vif_list, list) { >                 if (tmp->bss_index == rsp->bss_index) { > -                       wcn36xx_dbg(WCN36XX_DBG_HAL, "beacon missed bss_index %d\n", > +                       wcn36xx_info("beacon missed bss_index %d\n", >                                     rsp->bss_index); >                         vif = wcn36xx_priv_to_vif(tmp); >                         ieee80211_connection_loss(vif); > > > bingo > > root@linaro-developer:~# iw wlan0 set power_save off > > > # pulls plug on AP > > root@linaro-developer:~# [   83.290987] wcn36xx: wcn36xx_smd_missed_beacon_ind/2594 > [   83.291070] wcn36xx: beacon missed bss_index 0 > [   83.295403] wlan0: Connection to AP e2:63:da:9c:a4:bd lost > > I'm not sure if both flags are required but, this is the behavior we want >