Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2774480yba; Mon, 22 Apr 2019 12:43:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyD9YtFESwEBLbw+1UlOvt3WZ6FZyQIoUTAz6MtKEWwdoyNNUbgOS8IxU16eD+oa0Z5UXH X-Received: by 2002:a65:484a:: with SMTP id i10mr20662094pgs.408.1555962200272; Mon, 22 Apr 2019 12:43:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555962200; cv=none; d=google.com; s=arc-20160816; b=vbWtiPlDtlVcXtWDj/Hs96NfrRJ8ML+vr9hmy2gbuK6KQ0DmkOjpYm23e2D4D9GDWG F8pepwnZ9uJDXPR+ifGpcoVuf5VCfHmlFnBOOUvElbGaUeJu3lye7c2aeEyz9hgANCLw 4rvsaUHxjtj7ROjCrlzjleAlDxMw4iEnBxQghB0HWwEVyq5rqsHj22r1vnpWf5DePrre 1zJyLzeKGffKmVccGFRPLKGQ76pw2R6NbbSrYJiERm6eKnlG1bopTDYQrnUgRq6fMqfQ ezMZCe9l/9aDFT5+AA4BGOcQXGBe0BznrMIUzkE1De0GwBdSsgW4YOPP6M8zoQu8E8Zs mkUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+yWlePhXaUGQS2WG+Zehx0u15LiLqSf6IOUlNoBJn2M=; b=HGehJA+VErufjU5xM8Ysu1I7fQTkwNhXxzcIg3NXX2cnQvLOGgIo1ArJDKuxmDm6z3 shDpXFZ0BlWdKETnNbtOeD20soI/XzLhSsCI0QZofAwJC7EjBDUL184HUwsdGNEYPQG9 Gn1XCjoQl9ga7PwcVv1/CLTohnUloiZleoGzt4AyPhRUliZj2YH5YmeQ6ALilVR4Ic3Z GRBs9Qx9WkUGCAV6QBXYSrbo19jeB3s7qJFMm0rmhMMC61KQtGUULDM4eO0DQXpDnmyx 6guKXGldexWi1ZPNdT6IbvS7UeD8vH2Ugsry6qRbDTtuYOBvgQ2/VEgmV7IcjiPZLkqs uMkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AE0C6Kew; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h31si12845272pgb.318.2019.04.22.12.43.04; Mon, 22 Apr 2019 12:43:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=AE0C6Kew; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728568AbfDVTmM (ORCPT + 99 others); Mon, 22 Apr 2019 15:42:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:42454 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728292AbfDVTmK (ORCPT ); Mon, 22 Apr 2019 15:42:10 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3475621738; Mon, 22 Apr 2019 19:42:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555962129; bh=xWgWZ3Lmtlok9IAC7abCqCuxyR2pJ+8a5auV0DHO3zo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AE0C6KewJy5bRSQgMDawalVCG77T0QonlU0QOCD3tBbxf0q/tZBx2xZgO40thlxXA AtQCG0NONqhL+ywHF+WP9/EJQXzE4VfjVYN/GvigQ4yc3O1GfbqBo/reE0SvDQRRnP xZGvE1iWQ4vhg2wY4Gw0Z29q9kZMgyyXS0SacJK0= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Stanislaw Gruszka , Felix Fietkau , Sasha Levin Subject: [PATCH AUTOSEL 5.0 04/98] mt76x02: fix hdr pointer in write txwi for USB Date: Mon, 22 Apr 2019 15:40:31 -0400 Message-Id: <20190422194205.10404-4-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190422194205.10404-1-sashal@kernel.org> References: <20190422194205.10404-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Stanislaw Gruszka [ Upstream commit 7b25d3b8e485c7721cba9c71b44d1c286e61c8e7 ] Since we add txwi at the begining of skb->data, it no longer point to ieee80211_hdr. This breaks settings TS bit for probe response and beacons. Acked-by: Lorenzo Bianconi Signed-off-by: Stanislaw Gruszka Signed-off-by: Felix Fietkau Signed-off-by: Sasha Levin (Microsoft) --- drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c index 81970cf777c0..8cafa5a749ca 100644 --- a/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c +++ b/drivers/net/wireless/mediatek/mt76/mt76x02_usb_core.c @@ -81,8 +81,9 @@ int mt76x02u_tx_prepare_skb(struct mt76_dev *mdev, void *data, mt76x02_insert_hdr_pad(skb); - txwi = skb_push(skb, sizeof(struct mt76x02_txwi)); + txwi = (struct mt76x02_txwi *)(skb->data - sizeof(struct mt76x02_txwi)); mt76x02_mac_write_txwi(dev, txwi, skb, wcid, sta, len); + skb_push(skb, sizeof(struct mt76x02_txwi)); pid = mt76_tx_status_skb_add(mdev, wcid, skb); txwi->pktid = pid; -- 2.19.1