From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.7 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12D97C4320E for ; Wed, 1 Sep 2021 18:02:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EC29461059 for ; Wed, 1 Sep 2021 18:02:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344813AbhIASDf (ORCPT ); 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-Google-Smtp-Source: ABdhPJzsAsOgDwSLPteGex0dqQAwNeVXY4yZb23xomFOALrmZvS9rc7jQepSJ7jUP15ZkXZ0ai76og== 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 >