From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 83104340A57 for ; Wed, 29 Jul 2026 17:36:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785346580; cv=none; b=DWPIiKHLwEb/dN3LtWIVy/BgILIt6kBsfqGz9waPY9X4EThcKzJyDRBAYXTCJi7fJtWbFszSeHoodj53M5yxgCuJcBVjFdQa8LoVU6SRkfy/NW+ApiGKTLGDMjzG9XVKWVbz7UaoIE2Iu7B4mRjWZS/wF7DV7+Ab8HbozKkDjrA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785346580; c=relaxed/simple; bh=V+iuPuLHAKheUEPYobZhw6wwlEloMhRxcZxA6HJh9OU=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=A4lD+yxLtfdTovlU8EwmHFcWVFNtOT9Rxa4p3stVob9i10AhD3wPJhFlF7am4wj92sjIUZDlzmpq3fG72z+52ETeBw1f7Z52lmnd3p+Aaxfy7xUI3xoEqYBnZAuCO9HVBVqOu+gghjDr3OfyOuiXps0LsyraextVjE3xwQ0z5v8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=rrfikCn7; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="rrfikCn7" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2cacb8416a1so13201315ad.1 for ; Wed, 29 Jul 2026 10:36:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785346579; x=1785951379; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=uhRNnUu6v3iXVOcCWlWtprydRHy1s6GXmSq+3+8Dmcw=; b=rrfikCn7qCxutd36XAPUqKbenIIe/7PaTgMSAW0a49yvHXylEDAYWdx4KnzZpn6Yw7 XXmOP4Oofd6cPia7bLmrjkxHCPR4HtIxuXdlH4fWHD10g2P2BIFxQo7/NeTviWi34JCp 0O6KwncFdjfx9aSKPlDtsfDHkUKh3KU3qtHtCUbFNqE+Ty7RsAdI3pT+YsV6G/CKqZPL Y1BWNOtLNA1zHylQznE7c8qNsrEeF0rIy7nfFZ15zYv0wroeaV3el8rQI1q0SDq2/Sdx ziFTe5L8cdVuV278SSS7cL9EIoHvxRHiUofiLyfsaoiJHkxPkQNqQeSC03lQIiU05047 16eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785346579; x=1785951379; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=uhRNnUu6v3iXVOcCWlWtprydRHy1s6GXmSq+3+8Dmcw=; b=jp+JHZxRu788et2WSp2sdDYeIMs4dQzt45eW65fDUNhkgbgnlyZIla2Yi/FoOpI/IK EaE17e5SMYUDPJ43LEu3klzEs9PvzQag5ZiWcZqBnrBrOTP/ukxgIO0uXvKV9gBKIqE5 M9YHBwazlywFVn27GJpSmSFqaxTlTt6fg8Qjq3dR+7mJGN/LdBmZhoEB5BGYS9RvVzUw 4IAhCjypkFEE0ArkEFnrqMHtwN0PzhPwPcNba7eZPURc5xDiHr+itJd5699IeL0Ra46I TxR5dY4gYVCku11YHVTiZQ768WA3v2SX1guSR8TGCSquwYJbkPLhiEBVNhT84zD/ltsj FkIQ== X-Forwarded-Encrypted: i=1; AHgh+Rrj4Sfm70DSQHwGfcOPjzhw72FPDs9i+Kjh3cLqKWplijG+LHK9MFEp+77lr5BAsmxQL8UbjXjwSgjiIEk=@vger.kernel.org X-Gm-Message-State: AOJu0Yz7q1m2ygdS0Ztf8WWcNCKLfXLrNmF+2WTBDPl0ex84Op20qL+f rWfkWl3yUf4wHBob2nkx2pnuJC/QDIJUUQg0ehUCfL5UwUSUQc1vARZQ X-Gm-Gg: AR+sD10Dxxz/f0HeSSd/6oUJ3GHEdgZji4je9hSELO3/yGK9Iw+AZf5a2wQVAzh4qIh d0mAEGJRSY2DYn5vxE2e8sDUqVkUo+ZAJA+X+vbk3/NKa/GSsvf5IlOQ1SQte/EP3Yrv6GA+wmO K9otxtW4iBq+Ti3eQA6SM+UjZQGPJz7X3lDBGNwt4m+1NdNfPbgS3t2iDnDOi1B7QeOzpj8QZjX Pajp2cwbHcfXDmy90zgOu8IqSdGugJzLwKhq9GYbnwTIOAz0ycNfeCzhhvwmN8JjzCnpdy6rzEm 9GRc/x+dIkoXZ2jpsqNM704ysQCjll5hkIiD0V4IPWodNX2mM6njgH38R2+az9tpjQ7j5JAs6xz aLLhcYGLHi/+9Nhtg4B7bXtK4VEivvCd+XaivSg7NMMW7xWY8QzF/mTp07/SBW23L+7O7vclbm/ gU1uGbJXVRkhbkBXzXnnI90wD4aLo9ZtP5LYUnxAa72mh9PT8pBLMRDJmsykAL1LlR+OWXnIAE7 jTfKp1TwLzNhHhs//rLBEV62Kw= X-Received: by 2002:a17:903:2391:b0:2ca:ce92:6e44 with SMTP id d9443c01a7336-2d015ac47a4mr90613645ad.8.1785346578717; Wed, 29 Jul 2026 10:36:18 -0700 (PDT) Received: from KRHW1CJW23.bytedance.net ([58.250.106.107]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2d022bf8880sm14628745ad.66.2026.07.29.10.36.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 29 Jul 2026 10:36:18 -0700 (PDT) From: Zhao Li To: Johannes Berg Cc: Lorenzo Bianconi , linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] wifi: mac80211: send TWT teardown to peer after setup TX failure Date: Thu, 30 Jul 2026 01:36:07 +0800 Message-ID: <20260729173607.13340-1-enderaoelyther@gmail.com> X-Mailer: git-send-email 2.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit When an AP's TWT Setup response is not acknowledged, ieee80211_s1g_tx_twt_setup_fail() asks the driver to tear down the local agreement and sends a TWT teardown action as the peer notification. It uses the response SA as the destination, but ieee80211_s1g_send_twt_setup() built that response with SA set to the AP's address. The teardown is therefore queued with DA, SA and BSSID all set to the AP address and never reaches the station. The in-tree driver callbacks update local hardware state and emit no action frame. The station receives no notification that mac80211 asked the driver to remove the agreement and can keep following the TWT schedule, leaving the peers' power-save state desynchronized. Address the teardown to the response DA, the station to which the failed response was sent. This also matches the station lookup the transmit status path already performs on the same frame. Fixes: f5a4c24e689f ("mac80211: introduce individual TWT support in AP mode") Assisted-by: Codex:gpt-5.6-sol Assisted-by: Kimi:K3 Signed-off-by: Zhao Li --- net/mac80211/s1g.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/mac80211/s1g.c b/net/mac80211/s1g.c index abc338e22e59..bd7baf481836 100644 --- a/net/mac80211/s1g.c +++ b/net/mac80211/s1g.c @@ -147,7 +147,7 @@ ieee80211_s1g_tx_twt_setup_fail(struct ieee80211_sub_if_data *sdata, drv_twt_teardown_request(sdata->local, sdata, &sta->sta, flowid); - ieee80211_s1g_send_twt_teardown(sdata, mgmt->sa, sdata->vif.addr, + ieee80211_s1g_send_twt_teardown(sdata, mgmt->da, sdata->vif.addr, flowid); } base-commit: 57aa1718d5953dd532137d43b696c68545c2e0b3 -- 2.50.1 (Apple Git-155)