Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp2968867lqo; Tue, 21 May 2024 02:51:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmbrEUHC9cYvuLzU8ZpOMOpID+E1GYBTG8ebXrAyDEJPtDAq5db6ZwC7BmNIaPkAzkxgKl3v0kLgOZEs/Y0VNbS/f3H4eEuRvWuk6y+g== X-Google-Smtp-Source: AGHT+IEF5DT05rXPFY0cJG/HAMK9pa7DsaY86CfNi9PVRtwMG37Dlkx49xWSey3aCVkZPkGVssCf X-Received: by 2002:a50:c049:0:b0:574:ebdd:9ab3 with SMTP id 4fb4d7f45d1cf-574ebdd9ba0mr22012991a12.2.1716285067702; Tue, 21 May 2024 02:51:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716285067; cv=pass; d=google.com; s=arc-20160816; b=OZE1c8lZ5qaTxPDVvZjv0CN5EnIuvt28FTkKmGUidO2e+Pkdtj0i3xImjBUIhhR9U1 HecDpcgbCD3OHl9h1x+0EXf9Nv8VGxg9L/cFza6Ie+yde4ckE5pLRMvLgf/S8NKO11Q0 8D5UEPI0j4k9+JjvyOoJiCF7+rWQ+UdryfSczsJwvPLNDvM8EonktG70b9BB5PlyKPXf vBpRKpszhCi2vk8UGDhyFbW1ChL34HU5sF/nsz+QqGOsFaKPOGIC2x9/iNtsGrm+/fEj f8tgdo58PRjiRSgXeiCrRHQhRflIUrn7rguwz9B6nhyg3hYwshZyahp/MqVkzQZxWkom R5aQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:message-id:in-reply-to:date:references:subject:cc:to :from:dkim-signature; bh=P9Ho+PMx0tJLkbn2rOXSI7KX+RNY0wPZ6GcZ+cXvtF8=; fh=2UGyKc87B52f7sIwEYl9g+SBtVnXUiLMuSlEko54uMQ=; b=Vkm6suFKri6XBdbwqCitlFsc8LRlivbkvA2aNjakkvDcrZ4VgB57K8iFwAItNtZV8K 5v8kScmR5jE7gT/9CLNTd0KcdyZQGzN8D0AWFzs5/koeV3D0+pIcwKSE7iT6ZFIoPyPd 3GhohH5aZi2Q2dyFDOMXwitdk1SAuFoT8ZSCrc0o4MlczTQdZCjesBh8zTy/V3patC9C ZMuVAyvD0+qH2Ii0MF1GJeY/SeYCbqVN/c3YQTrK3O997/zRkVCXPNDEIqsziMM4Js8B 9xJsNxuESBvIUTH3ogR+wK92kysX91O//o1ukMiP8IJSAWIhBfx3KKZFTrujBV1chK+j sIXg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZE3GwsX2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-7893-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7893-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c36d7aesi13507087a12.548.2024.05.21.02.51.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 May 2024 02:51:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless+bounces-7893-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZE3GwsX2; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-wireless+bounces-7893-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-wireless+bounces-7893-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4A1EC1F21C78 for ; Tue, 21 May 2024 09:51:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6A7A173183; Tue, 21 May 2024 09:49:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ZE3GwsX2" X-Original-To: linux-wireless@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4696B73535 for ; Tue, 21 May 2024 09:49:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284997; cv=none; b=TLG9oJ4vTdSCp3QT6gnehALJO0tJeWDCksPLQReNOjXczt2TdW5PDhWQEUuXOEmug1POcS2hkNRYfDf0qm4OrSjrWeuDYBQx4wrw23o5JqzNnRBhwio5Qx7RhC5f6WmM6+JxKlYKi0SiZ/AZUGu0OOqugxHEL8FYHs1/iqjjlO4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716284997; c=relaxed/simple; bh=sm97IK3nGkZ2pmbSic3bAR+DZZxDcLN9M74pZztgUHM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:Message-ID: MIME-Version:Content-Type; b=JPYYKLKw58WXKtihyUO3CzVLZGwltFH8iolHnbyrhL5g92jPagxfozqsgNrURcGUS5W8XrbV1HV0FQ0djjO7fmFom8jmvhGadoj2Ga7oaaFj/xgW10s+7ra2CwZZbzCTZozNmG2xHcYIJ14tIRuKY23ixGAYnzY4Q/3fBahDAPM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ZE3GwsX2; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F0E50C32782; Tue, 21 May 2024 09:49:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716284996; bh=sm97IK3nGkZ2pmbSic3bAR+DZZxDcLN9M74pZztgUHM=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=ZE3GwsX2bVYNwmghBtmo2/mDt796/agmEKRC26JBt/UCb1OfdrrcJ4QBJa1xXG37s gxssy+xJQoB0xhoC9RruPrNqzB4JCkosQsBGSqKQ/7K/xsAhbXDb7RGlv2E6W8XtTv zZchHMg5g+U9sRX8w3992qt8k3adq4PVoHGguajqk28PIca0QkAAB6+XKLq7zKlQOI 2R//XLbyIZDJw2Dg9eA4sq8ITFiYp0UNF8FZ3uou2lEhxYqt8rrW9R+y9wWkZu9Gl0 WG9xgDAjPfMUaRpwtNwQTifc7RQmhFSF6EgZG4OAC+t+aZfBRZwgM4OFNd6ku/ph6S uTrSjFuCel5DQ== From: Kalle Valo To: Baochen Qiang Cc: , Subject: Re: [PATCH 0/7] wifi: ath12k: add support for WoW References: <20240510064748.369452-1-quic_bqiang@quicinc.com> Date: Tue, 21 May 2024 12:49:54 +0300 In-Reply-To: <20240510064748.369452-1-quic_bqiang@quicinc.com> (Baochen Qiang's message of "Fri, 10 May 2024 14:47:41 +0800") Message-ID: <87h6ercx4t.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain Baochen Qiang writes: > Add support for WoW (Wakeup on Wireless) funtionalities, this including > magic-pattern, net-detect, disconnect and patterns, HW data filter, ARP > and NS offload, GTK rekey offload. > > Also enable keepalive before suspend to avoid unexpected kick out by AP. There was a simple conflict in ath12k_core_suspend() but I fixed that (tag ath-pending-202405210818). But I see new warnings: ./include/linux/fortify-string.h:97:33: warning: '__builtin_memcpy' accessing 18446744073709551605 or more bytes at offsets 0 and 0 overlaps 9223372036854775787 bytes at offset -9223372036854775798 [-Wrestrict] ./include/linux/fortify-string.h:97:33: warning: '__builtin_memcpy' accessing 18446744073709551605 or more bytes at offsets 0 and 0 overlaps 9223372036854775787 bytes at offset -9223372036854775798 [-Wrestrict] drivers/net/wireless/ath/ath12k/core.c:69:5: warning: context imbalance in 'ath12k_core_suspend' - different lock contexts for basic block And in my suspend tests with WCN7850 the kernel crashes (tried two times and crashed in both): [ 854.087911] wlan0: associated [ 854.139498] wlan0: Limiting TX power to 23 (23 - 0) dBm as advertised by [ 854.481975] BUG: sleeping function called from invalid context at include/linux/sched/mm.h:315 [ 854.483069] in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 1694, name: wpa_supplicant [ 854.483524] preempt_count: 0, expected: 0 [ 854.484010] RCU nest depth: 1, expected: 0 [ 854.484416] 2 locks held by wpa_supplicant/1694: [ 854.484914] #0: ffffffff9c9e2650 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x2c8/0xbf0 [ 854.485512] #1: ffffffff9c0cd960 (rcu_read_lock){....}-{1:2}, at: atomic_notifier_call_chain+0x28/0x140 [ 854.486290] CPU: 1 PID: 1694 Comm: wpa_supplicant Not tainted 6.9.0-wt-ath+ #1525 [ 854.486707] Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0067.2021.0528.1339 05/28/2021 [ 854.487195] Call Trace: [ 854.487467] [ 854.487734] dump_stack_lvl+0xa4/0xe0 [ 854.488049] dump_stack+0x10/0x20 [ 854.488335] __might_resched+0x363/0x5a0 [ 854.488628] ? kmalloc_trace+0x4b/0x2d0 [ 854.488978] __might_sleep+0xad/0x160 [ 854.489282] kmalloc_trace+0x264/0x2d0 [ 854.489574] ? ath12k_mac_arvif_get_arp_ns_offload+0x72/0xd0 [ath12k] [ 854.490071] ath12k_mac_arvif_get_arp_ns_offload+0x72/0xd0 [ath12k] [ 854.490543] ath12k_mac_op_ipv6_changed+0xc7/0x1470 [ath12k] [ 854.491117] ? ieee80211_emulate_change_chanctx+0xe0/0xe0 [mac80211] [ 854.491909] ieee80211_ifa6_changed+0x1c7/0x3a0 [mac80211] [ 854.492663] notifier_call_chain+0x97/0x310 [ 854.492997] atomic_notifier_call_chain+0x5d/0x140 [ 854.493322] inet6addr_notifier_call_chain+0x16/0x20 [ 854.493650] ipv6_add_addr+0x10ec/0x2160 [ 854.493946] ? reacquire_held_locks+0x4d0/0x4d0 [ 854.494294] ? inet6_dump_ifaddr+0x10/0x10 [ 854.494599] ? ip6_route_add+0x75/0x130 [ 854.494910] ? __kasan_check_write+0x14/0x20 [ 854.495214] ? ip6_route_add+0x8b/0x130 [ 854.495525] addrconf_add_linklocal+0xd6/0x300 [ 854.495965] ? addrconf_add_linklocal+0xd6/0x300 [ 854.496297] ? addrconf_dad_start+0x110/0x110 [ 854.499635] ? addrconf_addr_eui48_base+0x80/0xa0 [ 854.503094] addrconf_addr_gen.constprop.0+0x155/0x260 [ 854.506223] ? mutex_unlock+0xd/0x10 [ 854.508461] ? addrconf_add_linklocal+0x300/0x300 [ 854.510681] addrconf_init_auto_addrs+0x194/0x4e0 [ 854.512414] addrconf_notify+0xabe/0xdd0 [ 854.514073] notifier_call_chain+0x97/0x310 [ 854.515733] ? __unwind_start+0x1f3/0x3d0 [ 854.517070] raw_notifier_call_chain+0x11/0x20 [ 854.518407] call_netdevice_notifiers_info+0x8b/0xf0 [ 854.521761] netdev_state_change+0xe8/0x120 [ 854.522882] ? call_netdevice_notifiers_info+0xf0/0xf0 [ 854.524019] netdev_set_operstate+0xdf/0x130 [ 854.525139] ? rtnl_put_cacheinfo+0x260/0x260 [ 854.526216] set_operstate+0x8a/0x150 [ 854.527175] do_setlink+0xf0e/0x2550 [ 854.528130] ? rtnl_bridge_getlink+0x870/0x870 [ 854.529078] ? check_prev_add+0x2330/0x2330 [ 854.530011] ? mark_lock+0xe6/0x1470 [ 854.530919] ? check_prev_add+0x2330/0x2330 [ 854.531710] ? __lock_acquire+0xd43/0x1dd0 [ 854.532491] ? kasan_print_address_stack_frame+0x1d2/0x230 [ 854.533277] ? nla_get_range_signed+0x340/0x340 [ 854.534046] ? __kasan_check_read+0x11/0x20 [ 854.534808] ? mark_lock+0xe6/0x1470 [ 854.535573] ? __kasan_check_read+0x11/0x20 [ 854.536292] ? __nla_validate_parse+0x1d0/0x400 [ 854.536980] rtnl_setlink+0x217/0x330 [ 854.537650] ? do_setlink+0x2550/0x2550 [ 854.538355] ? rtnetlink_rcv_msg+0x2c8/0xbf0 [ 854.539010] ? mutex_lock_io_nested+0x1270/0x1270 [ 854.539657] ? reacquire_held_locks+0x4d0/0x4d0 [ 854.540290] ? lock_sync+0x1a0/0x1a0 [ 854.540981] ? __this_cpu_preempt_check+0x13/0x20 [ 854.541598] rtnetlink_rcv_msg+0x315/0xbf0 [ 854.542278] ? check_prev_add+0x2330/0x2330 [ 854.542894] ? rtnl_link_fill+0x900/0x900 [ 854.543446] ? __lock_acquire+0xd43/0x1dd0 [ 854.544037] netlink_rcv_skb+0x14c/0x400 [ 854.544581] ? rtnl_link_fill+0x900/0x900 [ 854.545132] ? netlink_ack+0xd70/0xd70 [ 854.545851] ? debug_smp_processor_id+0x17/0x20 [ 854.546369] ? __lock_release.isra.0+0x49c/0xae0 [ 854.546939] ? netlink_deliver_tap+0x143/0x350 [ 854.547478] ? netlink_deliver_tap+0x143/0x350 [ 854.548062] ? __this_cpu_preempt_check+0x13/0x20 [ 854.548620] ? netlink_deliver_tap+0xc8/0x350 [ 854.549149] rtnetlink_rcv+0x10/0x20 [ 854.549708] netlink_unicast+0x45c/0x790 [ 854.550211] ? netlink_attachskb+0x7f0/0x7f0 [ 854.550802] netlink_sendmsg+0x7eb/0xdb0 [ 854.551302] ? netlink_unicast+0x790/0x790 [ 854.551847] ? unix_ioctl+0x358/0x400 [ 854.552338] ? selinux_socket_sendmsg+0x31/0x40 [ 854.552873] ? netlink_unicast+0x790/0x790 [ 854.553360] __sock_sendmsg+0xc9/0x160 [ 854.553901] ? sock_do_ioctl+0xcf/0x1e0 [ 854.554387] __sys_sendto+0x1ca/0x290 [ 854.554925] ? __ia32_sys_getpeername+0xa0/0xa0 [ 854.555413] ? ioctl_has_perm.constprop.0.isra.0+0x276/0x430 [ 854.556005] ? sock_ioctl+0x24d/0x540 [ 854.556497] ? br_ioctl_call+0x90/0x90 [ 854.557047] ? selinux_file_ioctl+0x108/0x250 [ 854.557538] ? debug_smp_processor_id+0x17/0x20 [ 854.558076] __x64_sys_sendto+0xdb/0x1a0 [ 854.558588] ? __this_cpu_preempt_check+0x13/0x20 [ 854.559170] ? lockdep_hardirqs_on+0x7d/0x100 [ 854.559716] x64_sys_call+0x8a2/0x9e0 [ 854.560209] do_syscall_64+0x65/0x130 [ 854.560807] entry_SYSCALL_64_after_hwframe+0x4b/0x53 [ 854.561300] RIP: 0033:0x7f0ef17cb750 [ 854.561848] Code: ff eb bc 0f 1f 80 00 00 00 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 1d 45 31 c9 45 31 c0 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 68 c3 0f 1f 80 00 00 00 00 55 48 83 ec 20 48 [ 854.562946] RSP: 002b:00007ffc4306af98 EFLAGS: 00000246 ORIG_RAX: 000000000000002c [ 854.563506] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00007f0ef17cb750 [ 854.564122] RDX: 0000000000000028 RSI: 00007ffc4306afb0 RDI: 0000000000000005 [ 854.564738] RBP: 0000556901de3960 R08: 0000000000000000 R09: 0000000000000000 [ 854.565298] R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff [ 854.565945] R13: 00007ffc4306afb0 R14: 0000000000000005 R15: 0000556901e2b1f1 [ 854.566522] -- https://patchwork.kernel.org/project/linux-wireless/list/ https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches