Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp498921rwe; Thu, 25 Aug 2022 04:25:48 -0700 (PDT) X-Google-Smtp-Source: AA6agR7zlJ+DHY5K7FpkLwMpYe18QuUvEllj2DAWCZYQdYFmXBNgz18btCy1J6VXpN7oPq1wq4Jy X-Received: by 2002:a17:907:2cd8:b0:73d:8af4:e0ba with SMTP id hg24-20020a1709072cd800b0073d8af4e0bamr2250098ejc.586.1661426748490; Thu, 25 Aug 2022 04:25:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661426748; cv=none; d=google.com; s=arc-20160816; b=Kn2ykI+7AUiHPsb4kFYSaM7b0kVECjCTHj/3GFye0x0VZWBKsNCsU6cxjEIxCJCUmU qVvSwml+RVzARTRy/rEUYuNLrPk+OhA5xkvawhwqw/h6XVth9on+7qb7x5m2Q/Ej+ioo 4qpM27JxDrelJ0nIEybnZY5C0IKPkxEXSlCnsJgMjLrfTOMJJwYEMtgBcilMwN/m30VN uBNk/fdm3p5Oy9dPXnL5sD7pf1Pj6hbkJHDBs+hp6BQd0cOanxbkSFb3g4DAWYTGJ057 WBxYn7WTejMwZTq7qPscTajm2QI6Gl/ZxDhCd4zRKUM9yoTAgJ3omg0qvdvJCwYIHHlY 02Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=6YZx9N0JVg7h8kheDQPnMX3LghnDBErISDw/AneuDAU=; b=EIQTtTWvQVXhtoV1w6dl+yWcs6TSkM0BDbECRc/KH7rny68D+mzgy2r0RskfyClnLs LIIvuIA3UtZQktS3pbKxzoMGY6GscyDA+PWpFuPSYqJUpYR1Wyn9RvUkBz8tCZDZ5SiM 2fNt9IJE0APITAbUXVLmSoX0q708wGr3bRLZBNcDA6m3637hFx34Bk2AuvbGEvJ3ND1b Gm/jSuMWyqww5MJlOMz14B8UekgMFkOvWCQJlPbVbqZCDm7GuVYRdlfL2iP3KGw5UcAH oBcDErj9prhyEWymrXou2WskTDXCASSfnEfmK4DZpeMxQV0RWz77RMmkU84EeLq5/d0c V1CQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Ew73FAih; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sd42-20020a1709076e2a00b0073c12a7e89csi4650335ejc.563.2022.08.25.04.25.31; Thu, 25 Aug 2022 04:25:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Ew73FAih; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231438AbiHYLSy (ORCPT + 64 others); Thu, 25 Aug 2022 07:18:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241426AbiHYLSv (ORCPT ); Thu, 25 Aug 2022 07:18:51 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7AC77AEDAF for ; Thu, 25 Aug 2022 04:18:50 -0700 (PDT) Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 27P4SnDR001246; Thu, 25 Aug 2022 11:18:37 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=qcppdkim1; bh=6YZx9N0JVg7h8kheDQPnMX3LghnDBErISDw/AneuDAU=; b=Ew73FAihWlSPtICJ0DWaxUA3JwHKh+C12v2sDDoseePiA0oRYz+AEIh7G9Pva4typ7zd i4pNciNFWY2RECR8bol+rJ4Lr+JaiW+/omcWxfYDzYrHJXnwVWV9R/srPRSJfN7llQ69 yYpuusLBe4OVtF4AHXeDZaHmQ0fWmJhCh1IEvBxPEUdlHi4f0mXRdvIvCEz5Z0kY/9zo okrbia8e3nF7bGsyNo8yHgxR5Y4isbGDw46jv2698NWc9f+mquYNiVemefGElb2g1XK9 Uv14zCr0vXIywu2TO+YK7j6a0PFQ0AnGv2bqrtCgqURg2NfHOYC4IIyccfphF7pUeNQS Ww== Received: from nalasppmta05.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3j5xcuhjfq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Aug 2022 11:18:37 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 27PBIaIk004019 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 25 Aug 2022 11:18:36 GMT Received: from mpubbise-linux.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.29; Thu, 25 Aug 2022 04:18:35 -0700 From: Manikanta Pubbisetty To: CC: , Manikanta Pubbisetty Subject: [PATCH v2 0/4] ath11k: Enable low power mode when WLAN is not active Date: Thu, 25 Aug 2022 16:48:14 +0530 Message-ID: <20220825111818.30869-1-quic_mpubbise@quicinc.com> X-Mailer: git-send-email 2.37.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: yDUUgbMNlgHqzQmKxS0uw_N7wji7Gmip X-Proofpoint-ORIG-GUID: yDUUgbMNlgHqzQmKxS0uw_N7wji7Gmip X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.517,FMLib:17.11.122.1 definitions=2022-08-25_05,2022-08-25_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 phishscore=0 adultscore=0 malwarescore=0 suspectscore=0 mlxlogscore=999 impostorscore=0 spamscore=0 priorityscore=1501 lowpriorityscore=0 clxscore=1011 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2207270000 definitions=main-2208250044 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org Currently, WLAN chip is powered once during driver probe and is kept ON (powered) always even when WLAN is not active; keeping the chip powered ON all the time will consume extra power which is not desirable for battery operated devices. Same is the case with non-WoW suspend, chip will not be put into low power mode when the system is suspended resulting in higher battery drain. Send QMI MODE OFF command to firmware during WiFi OFF to put device into low power mode. Tested-on: WCN6750 hw1.0 AHB WLAN.MSL.1.0.1-00887-QCAMSLSWPLZ-1 Manikanta Pubbisetty (4): ath11k: Fix double free issue during SRNG deinit ath11k: Move hardware initialization logic to start() ath11k: Enable low power mode when WLAN is not active ath11k: Fix failed to parse regulatory event print --- V2: - "Enable low power mode when WLAN is not active" has been enabled only for WCN6750 as the device shutdown and turn-on changes are not same for all chipsets in ath11k. A future patch will be sent to enable the logic for other devices. - Rebased on ToT drivers/net/wireless/ath/ath11k/ahb.c | 45 +++++ drivers/net/wireless/ath/ath11k/core.c | 229 ++++++++++++++++++------- drivers/net/wireless/ath/ath11k/core.h | 8 +- drivers/net/wireless/ath/ath11k/hal.c | 1 + drivers/net/wireless/ath/ath11k/hif.h | 12 ++ drivers/net/wireless/ath/ath11k/mac.c | 33 ++-- drivers/net/wireless/ath/ath11k/pci.c | 26 +++ drivers/net/wireless/ath/ath11k/reg.c | 2 + 8 files changed, 264 insertions(+), 92 deletions(-) -- 2.37.1