From patchwork Wed Jun 20 08:42:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 139297 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp523592lji; Wed, 20 Jun 2018 02:02:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLhopyGg/q/Kb3SlvpDcu5BqHieauyoR3MlsvlLXAGTyoWqgRQDscmS+wQHoA/KyXCk9VEV X-Received: by 2002:a17:902:d716:: with SMTP id w22-v6mr22605557ply.98.1529485346191; Wed, 20 Jun 2018 02:02:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529485346; cv=none; d=google.com; s=arc-20160816; b=Biw1mcDCT8Y1C41Ij1Fx2JeaM33ldusFN4aSmJn2sb27Ja7vMdfBgzza4HTfxAIwWM C5Ay0wiqo6N/Vu4GjYfHU4OGwjn0Ma1FokZVyT8gW+FqoemFDznHWTeaRQ37F7gq5bv4 oFlMZRfm5PTgToAhC/Q7NTLs1QxnhHsBMpMTwyn6niRVJRX3Xosb9b0/GD0bimt8ZAis T03zSY2Dnqh6OlqcsqUegZEMM3EBrHoxIPoUOpOBJIz/EZUejFG1xauwidXDHUWiS6Em EbszRvZTP0w1hJX6mjwSYut7h5p45UugGtFf8CdOkO8yQq0520TAd2HHgxyFVNDEoF95 w8+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=JKpvz3vtYdohxjtXmtyo5SjzMcz9c7S9E23fQ5xXab4=; b=mJi3wqU0Q4z+rzg5COEu3o/3NW3kjXZNSB9rN/AFJPskadlpjBmI+6vihEuOZF2Oot AYgm3Xbb2mT3XF1IHoJ5NG+GslUzes8hGBHSEUjAKWeBXtq4J5AUE9xdcNVKHgu8yVrL wsvF3MAqaiX7bVJvuwXWVK4NVuhecWxOjI6y0aTeSv011Lu0wBhh2LdQw/oixIRX66Wk I55DJ3f11O/GnJI5REIFj2koBBe63NLr/xpYSj/b6MrHBeAM1YjrJjCKs/LLoASS25ku 37WSo8w5J2y5OvN9t9JwJySiqSAlrOYFHlOExqGDnDmfIBy4hjiU0SUv/qa9jpy0NdzG dq9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QAinP0cU; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a14-v6si1555101pgn.631.2018.06.20.02.02.25; Wed, 20 Jun 2018 02:02:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=@linaro.org header.s=google header.b=QAinP0cU; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932845AbeFTImh (ORCPT + 9 others); Wed, 20 Jun 2018 04:42:37 -0400 Received: from mail-lf0-f65.google.com ([209.85.215.65]:39364 "EHLO mail-lf0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753906AbeFTImd (ORCPT ); Wed, 20 Jun 2018 04:42:33 -0400 Received: by mail-lf0-f65.google.com with SMTP id t2-v6so3679020lfd.6 for ; Wed, 20 Jun 2018 01:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JKpvz3vtYdohxjtXmtyo5SjzMcz9c7S9E23fQ5xXab4=; b=QAinP0cUkQ5zt0rvGHnPqm8C19pbEnTgsOdE7o40ZdxvOw2oQcLgAOSxwX6DLHAuuY QykZ2tKUcx1FH0YkKELwREaH3E4p62NCXRQCX84610BJLQSwnfqxHsrpK1pioz3YvOm7 oV89YuUoBTNtuVg0sY8Ow276CNIH9u0+NeMZY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JKpvz3vtYdohxjtXmtyo5SjzMcz9c7S9E23fQ5xXab4=; b=QicYYfM8d4uqiEOBFMwE9Kb7uGz1dSezAQqZID9Oc3iTWvmZG6V2km24dSMVdH1+bI T8l7cmAnMw+nq5ID/XTRwAF8w/9tL9MFHP1rGCQwNjVJINiCrBYqSJGb7EKby7KUGCSR mSjvJ9XNeXR42TooMGwxrO0a6WJ9se9FAx+1KmE0r/wnXh7fOBOsceHe/isuo+/9ZxVZ E+NjCOrKTA7Rq4dsh44iwveP5tCJF6sLb2IunvHEYyo/cyycnj/lB6bGk0QXZqlHtDGx GF/EqDBD47gqqsrleYCvqpG2u++7gP4RyJ048D4t3BKwUtDGZsqrFuk18fNc0XVRWHBR iKdw== X-Gm-Message-State: APt69E05b3vI1MY921wtvNtfOZ3aIYbUm4o7JjjdCdMIRmUscKbX7Lod JyWG8N3QEfWVrOfPv7+IObGdAA== X-Received: by 2002:a2e:7a0f:: with SMTP id v15-v6mr14038227ljc.68.1529484151743; Wed, 20 Jun 2018 01:42:31 -0700 (PDT) Received: from centauri.lan (h-229-118.A785.priv.bahnhof.se. [5.150.229.118]) by smtp.gmail.com with ESMTPSA id l25-v6sm301267ljj.30.2018.06.20.01.42.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 01:42:31 -0700 (PDT) From: Niklas Cassel To: Kalle Valo , "David S. Miller" Cc: alagusankar@silex-india.com, Niklas Cassel , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ath10k: sdio: use same endpoint id for all packets in a bundle Date: Wed, 20 Jun 2018 10:42:20 +0200 Message-Id: <20180620084222.3521-2-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620084222.3521-1-niklas.cassel@linaro.org> References: <20180620084222.3521-1-niklas.cassel@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org All packets in a bundle should use the same endpoint id as the first lookahead. This matches how things are done is ath6kl, however, this patch can theoretically handle several bundles in ath10k_sdio_mbox_rx_process_packets(). Without this patch we get lots of errors about invalid endpoint id: ath10k_sdio mmc2:0001:1: invalid endpoint in look-ahead: 224 ath10k_sdio mmc2:0001:1: failed to get pending recv messages: -12 ath10k_sdio mmc2:0001:1: failed to process pending SDIO interrupts: -12 Signed-off-by: Alagu Sankar Signed-off-by: Niklas Cassel --- drivers/net/wireless/ath/ath10k/sdio.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index d612ce8c9cff..d46523b0472c 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -434,12 +434,14 @@ static int ath10k_sdio_mbox_rx_process_packets(struct ath10k *ar, enum ath10k_htc_ep_id id; int ret, i, *n_lookahead_local; u32 *lookaheads_local; + int lookahead_idx = 0; for (i = 0; i < ar_sdio->n_rx_pkts; i++) { lookaheads_local = lookaheads; n_lookahead_local = n_lookahead; - id = ((struct ath10k_htc_hdr *)&lookaheads[i])->eid; + id = ((struct ath10k_htc_hdr *) + &lookaheads[lookahead_idx++])->eid; if (id >= ATH10K_HTC_EP_COUNT) { ath10k_warn(ar, "invalid endpoint in look-ahead: %d\n", @@ -462,6 +464,7 @@ static int ath10k_sdio_mbox_rx_process_packets(struct ath10k *ar, /* Only read lookahead's from RX trailers * for the last packet in a bundle. */ + lookahead_idx--; lookaheads_local = NULL; n_lookahead_local = NULL; } From patchwork Wed Jun 20 08:42:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Niklas Cassel X-Patchwork-Id: 139295 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp509181lji; Wed, 20 Jun 2018 01:44:28 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK0uaKJLqFJgMBKzbeyM5SeaX+nIICudEDL65hqmVPd10C27GDGJ7vp8A9Stx1mK9RDWYob X-Received: by 2002:a17:902:7d89:: with SMTP id a9-v6mr22539795plm.238.1529484268647; Wed, 20 Jun 2018 01:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529484268; cv=none; d=google.com; s=arc-20160816; b=P9XtEav5tUGjzsiQ4oOvp7jVwCERZ0/ftn2U5KwcOEL533hn4S0fSHievm2E22AuIy R4oqe9/g902j8pYwqlXu4tN7JA83PK9s7FWBfv0+fhaO4Ew0YxarnkUr+DYB8KOx89z7 D+nJzRbQo3NCeHr4F65DB7y70Fjv9CvAZATwxcQ9zgSw36FAlHdyYAMCkxOYD2iRjstQ O6Hxb7V09KQhaP2a/XBi6atHnW60sRr+/J4nsX5zKWUIgjruiMqFYp/cHmo75NC7tqsx 5O8OIRSw//BFy4bEk0jCoJ4ZMipaU9tRlFQLupmd6k6ayp/tClYUzZMrvhe6W+tdXYVz oItA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=+R4eGX5eAJCC9sbXyeuYvo0XKQNvBJaTjc88N6RgIzo=; b=qxrT2i3wdIdvGa92sZm2jf33yCGHuBCmUdMW+h2UtVqUkFPSdLbdsFSP/+1FKneU8c b+/RoaU04aenkNBxkv+rVIg3wB9HcxZeKC6LOFNS1PV6XS6uj3CcGqtYLZASbci5nLbs Nx8dcoTowu68h4W+gncZFFuwjzSn859CGaADBafhzqmIFNlecnUc2XmCD0coA44rCxi7 +eYZt1II7CwLOzGAO/9n3doGpELXOtJQdVTQUuKmds1f01imBZWzvTIDGQMfcWxzaRO7 OufAlqtsDdRYDxqgJbpufP/q+tkLU7a0ncrLmT1u2OQDfbejeyrNDMOgtrcYGb7Kh+On E4HA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OQJZdZFT; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x14-v6si1943784pll.37.2018.06.20.01.44.28; Wed, 20 Jun 2018 01:44:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of netdev-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=@linaro.org header.s=google header.b=OQJZdZFT; spf=pass (google.com: best guess record for domain of netdev-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=netdev-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932666AbeFTIo0 (ORCPT + 9 others); Wed, 20 Jun 2018 04:44:26 -0400 Received: from mail-lf0-f68.google.com ([209.85.215.68]:37990 "EHLO mail-lf0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932677AbeFTImu (ORCPT ); Wed, 20 Jun 2018 04:42:50 -0400 Received: by mail-lf0-f68.google.com with SMTP id i83-v6so3684730lfh.5 for ; Wed, 20 Jun 2018 01:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+R4eGX5eAJCC9sbXyeuYvo0XKQNvBJaTjc88N6RgIzo=; b=OQJZdZFTa3D64IzYYsSW4wLNuSHE+ja5yxDvahiFzZx+tt4QNzHhK5sVt2WALyrZNz Kq1zc6IJyJAyReZU4ek3iM9iWq60++VFr9sJeki0KmdFmdZaFlRB7Z3HYqlHRSp1d6RR Gt2tUjxFI2xfPX/O/VihEFZHNDskTxMk1DfXc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=+R4eGX5eAJCC9sbXyeuYvo0XKQNvBJaTjc88N6RgIzo=; b=ddOqv2jKrDmvCwJbyMcyYSrb18VO13seFCIsINNOP6B9LSZ45/42PM87hyxtN+J/R0 rTc+CoX21ErgGKD5X2WVwpTSnkA9a49d4HLJ6qxZ8F8m6VGU3jZTFLAodT3MrIxMnwuU 0qheWz55ceUegVXB43/3hoe4OkLZCSDwt8ZjQmkxXzrwazLCjNjDIubbztVFySelJbkT BG1uxtJ2CZc0uVQ1VlgLcR2X/0o+FU8Gk/OJ+Y/5p4VPT9Kmuear0+c8KNRl3LBaCH9O lf5CDbA9VNhQDvgNFj7civeoOqfOdeIlHqPIo+Pl3lyPUsZLiL2ep7KeEacXlOzZ7ILY /VXw== X-Gm-Message-State: APt69E1R6D2stSYn1lnUzbl32vMzVhuYD7mR9NZuhuK750+30op4vuNp 0lQuH2253GWpRoKp/Rr2mgcx0g== X-Received: by 2002:a2e:5111:: with SMTP id f17-v6mr11538634ljb.16.1529484169027; Wed, 20 Jun 2018 01:42:49 -0700 (PDT) Received: from centauri.lan (h-229-118.A785.priv.bahnhof.se. [5.150.229.118]) by smtp.gmail.com with ESMTPSA id h90-v6sm296656ljf.65.2018.06.20.01.42.48 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 20 Jun 2018 01:42:48 -0700 (PDT) From: Niklas Cassel To: Kalle Valo , "David S. Miller" Cc: alagusankar@silex-india.com, Niklas Cassel , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] ath10k: sdio: set skb len for all rx packets Date: Wed, 20 Jun 2018 10:42:22 +0200 Message-Id: <20180620084222.3521-4-niklas.cassel@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180620084222.3521-1-niklas.cassel@linaro.org> References: <20180620084222.3521-1-niklas.cassel@linaro.org> Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Without this, packets larger than 1500 will silently be dropped. Easily reproduced by sending a ping packet with a size larger than 1500. Signed-off-by: Alagu Sankar Signed-off-by: Niklas Cassel --- drivers/net/wireless/ath/ath10k/sdio.c | 1 + 1 file changed, 1 insertion(+) -- 2.17.1 diff --git a/drivers/net/wireless/ath/ath10k/sdio.c b/drivers/net/wireless/ath/ath10k/sdio.c index 0c57d6aaa437..8ac47b04a17e 100644 --- a/drivers/net/wireless/ath/ath10k/sdio.c +++ b/drivers/net/wireless/ath/ath10k/sdio.c @@ -396,6 +396,7 @@ static int ath10k_sdio_mbox_rx_process_packet(struct ath10k *ar, int ret; payload_len = le16_to_cpu(htc_hdr->len); + skb->len = payload_len + sizeof(struct ath10k_htc_hdr); if (trailer_present) { trailer = skb->data + sizeof(*htc_hdr) +