Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp7368732yba; Thu, 2 May 2019 08:42:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxGVDQkwzneqsZ7r6dT0m71VO753ckfh43xrN1C4rzCHOnY2s+f5/NpydN0WiLA5isiAuuC X-Received: by 2002:a63:9a52:: with SMTP id e18mr4596675pgo.335.1556811763989; Thu, 02 May 2019 08:42:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556811763; cv=none; d=google.com; s=arc-20160816; b=XVbij4O8g4o/QtFWXUdveo5Jcsh+hgqjg/RY/aLd3gbRJyJtZBEemYW8G0hZ5o6eMs ezbTuzuxita2nyvjyazZ5fCX3CD6I/85s+BnK85XADlqvnPCFc8Bj75MQ89pC11eKeSs mm2vdc0jsSmw0+u32SK9sRhi+klMpn9XTw5Qg201NxCeqqcz+FD3Ig9hvUXkwVjYhN8s FkyUK644+kPyojJTenrnOTVWMYGb/AcUo4V6zHwp7OTw9rgJ38/KCwFaYo3P9fNq9qb8 E0YUCGLLWDLnYdCR+zc6+fgaluS9pJKUy0IHiitwSMkTnNbrq+5zH0rdlhgebwTRnda/ II5Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=NLKIR/v4Z+BkNjkjE60ZvX8138hyx5hWrH36822co+4=; b=PtvDMcql+gZ+qUhEl7iIFeaqmOY1SW9CqNOfcBYNS9k6yCilBzXMwR0IiWAJ5DJ4Ob ye1hugs/YZv9V1EOQgHaTsreBCgTkHET5Ky1lBdV0Cf6zqjgbNz/xDI+td2WxHfMqmFf cxFjAV6CRdvhSlH88KTQgQbCowhz7p9wjIiGUrMwEdApmkKzYVXC4/xm3ELbQOBGtRsj z2BrmOOTKMKXCv5lUcyyR+80DctcgnMVIzIg3BCuBruiMw/A5CsR++ukr1xl09JoEMO6 8jpYlQZy76au01RfL7FwQrTkj+u7hk8dscRcfYX9PrprvrOPwFW/LuBEgbsXLawPYuDa yHYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=ninHftC0; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d129si22864732pfd.267.2019.05.02.08.42.28; Thu, 02 May 2019 08:42:43 -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=ninHftC0; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728375AbfEBPlQ (ORCPT + 99 others); Thu, 2 May 2019 11:41:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:46222 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727581AbfEBP2u (ORCPT ); Thu, 2 May 2019 11:28:50 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 45DAA2081C; Thu, 2 May 2019 15:28:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1556810929; bh=V1HWFjRUq82B7czqaNCXtkC+enHSA7l4SPNztlvxQ20=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ninHftC0WeHfQYnjwcOlhp7KCWhAzMSxZLQiNcehq8A1vrSZctIAIMyl4qu+iCwOZ zKNsJ5nHbtxFT/tAVi2+ldPPA2GGIfnrGjnAVvESh6x9IDH4zZDVG7toc8khLz8mZ3 DGU0OkeVN1DLIUaUSgy5D5RZ0zY9lR+1ckNkU7Tc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lorenzo Bianconi , Stanislaw Gruszka , Felix Fietkau , "Sasha Levin (Microsoft)" Subject: [PATCH 5.0 011/101] mt76x02: fix hdr pointer in write txwi for USB Date: Thu, 2 May 2019 17:20:13 +0200 Message-Id: <20190502143340.859568458@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190502143339.434882399@linuxfoundation.org> References: <20190502143339.434882399@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ 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