From patchwork Fri Sep 2 12:48:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 602646 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 127C7C38145 for ; Fri, 2 Sep 2022 14:04:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238857AbiIBOEl (ORCPT ); Fri, 2 Sep 2022 10:04:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239105AbiIBOEC (ORCPT ); Fri, 2 Sep 2022 10:04:02 -0400 Received: from sipsolutions.net (s3.sipsolutions.net [IPv6:2a01:4f8:191:4433::2]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 72995148D11 for ; Fri, 2 Sep 2022 06:33:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sipsolutions.net; s=mail; h=Content-Transfer-Encoding:MIME-Version: Message-Id:Date:Subject:Cc:To:From:Content-Type:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-To:Resent-Cc: Resent-Message-ID:In-Reply-To:References; bh=w2HUe7Es17kP59gNgIPZBWy7C9aq9/2YnNXR3m3gUmo=; t=1662125584; x=1663335184; b=g1LVZHWFvTaIPWeSXEXhadlsp/6keOLFWWRQWnYRasjxmsSXZgQ6w+retX8gOobfx82VyJ+A2JI 8uPgt1CAb4aUNFMTGLR4Tggs4huEaio+/m9F9npcQ4n/7F55ysSpzmLibcIGyVgROjNJWH6mJvISV 9YZHDnHNsR6LsFZO4IbZb7vqrxnoaamrt8UaVBnkEDP+3fjAtBZbHgGvHunDlTwoZpxzouRqq/q9N hzlFbFtsKlNaFxXiIu72ruranX9Hvz+UNyMSHGKm15akDs5m7bu+SzfeJUegykUpaSGAM+pspFslQ jIzrceTPX1QaAN3uy7mjXm08wRn1GVILQiPw==; Received: by sipsolutions.net with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96) (envelope-from ) id 1oU662-0069og-19; Fri, 02 Sep 2022 14:48:30 +0200 From: Johannes Berg To: linux-wireless@vger.kernel.org Cc: Mukesh Sisodiya Subject: [PATCH] wifi: mac80211: fix link warning in RX agg timer expiry Date: Fri, 2 Sep 2022 14:48:27 +0200 Message-Id: <20220902144826.8ef6beda92f6.I3d9a23c49e1df3bd0c91ef0e1c1805dd09937db8@changeid> X-Mailer: git-send-email 2.37.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org From: Mukesh Sisodiya The rx data link pointer isn't set from the RX aggregation timer, resulting in a later warning. Fix that by setting it to the first valid link for now, with a FIXME to worry about statistics later, it's not very important since it's just the timeout case. Fixes: 56057da4569b ("wifi: mac80211: rx: track link in RX data") Signed-off-by: Mukesh Sisodiya Signed-off-by: Johannes Berg --- net/mac80211/rx.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index cc139fe5fb78..511c809e2c6b 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c @@ -4084,6 +4084,7 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid) .link_id = -1, }; struct tid_ampdu_rx *tid_agg_rx; + u8 link_id; tid_agg_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[tid]); if (!tid_agg_rx) @@ -4103,6 +4104,9 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid) }; drv_event_callback(rx.local, rx.sdata, &event); } + /* FIXME: statistics won't be right with this */ + link_id = sta->sta.valid_links ? ffs(sta->sta.valid_links) - 1 : 0; + rx.link = rcu_dereference(sta->sdata->link[link_id]); ieee80211_rx_handlers(&rx, &frames); }