From patchwork Fri Jan 23 07:16:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Cameron X-Patchwork-Id: 5691221 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C31689F2ED for ; Fri, 23 Jan 2015 07:16:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2C75620260 for ; Fri, 23 Jan 2015 07:16:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7AB6A200F2 for ; Fri, 23 Jan 2015 07:16:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751753AbbAWHQq (ORCPT ); Fri, 23 Jan 2015 02:16:46 -0500 Received: from zimbra.real-time.com ([63.170.91.9]:45169 "EHLO zimbra.real-time.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751116AbbAWHQq (ORCPT ); Fri, 23 Jan 2015 02:16:46 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.real-time.com (Postfix) with ESMTP id 73724460DB8; Fri, 23 Jan 2015 01:16:45 -0600 (CST) X-Virus-Scanned: amavisd-new at mn.real-time.com Received: from zimbra.real-time.com ([127.0.0.1]) by localhost (zimbra.real-time.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AU6smnOhmzPA; Fri, 23 Jan 2015 01:16:44 -0600 (CST) Received: from esk.lan (quozl2.real-time.com [65.165.43.5]) by zimbra.real-time.com (Postfix) with ESMTPSA id 27D354603D6; Fri, 23 Jan 2015 01:16:44 -0600 (CST) Received: from james by esk.lan with local (Exim 4.80) (envelope-from ) id 1YEYTb-0008Hk-Ns; Fri, 23 Jan 2015 18:16:19 +1100 Date: Fri, 23 Jan 2015 18:16:19 +1100 From: James Cameron To: Amitkumar Karwar , Avinash Patil Cc: linux-wireless@vger.kernel.org Subject: [RFC PATCH] mwifiex: handle command response in aggregation Message-ID: <20150123071619.GA31644@us.netrek.org> MIME-Version: 1.0 Content-Disposition: inline Organization: Netrek Vanilla Server Dictator User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Firmware does occasionally pass a command response to the host on the data port. Ensure it is processed. http://dev.laptop.org/ticket/12749 --- Seen on device firmwares: 14.66.9.p96 14.66.35.p52 Others not tested. drivers/net/wireless/mwifiex/sdio.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index 933dae1..8fe6147 100644 --- a/drivers/net/wireless/mwifiex/sdio.c +++ b/drivers/net/wireless/mwifiex/sdio.c @@ -1240,8 +1240,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter, /* copy pkt to deaggr buf */ skb_deaggr = card->mpa_rx.skb_arr[pind]; - if ((pkt_type == MWIFIEX_TYPE_DATA) && (pkt_len <= - card->mpa_rx.len_arr[pind])) { + if (pkt_len <= card->mpa_rx.len_arr[pind]) { memcpy(skb_deaggr->data, curr_ptr, pkt_len); @@ -1251,7 +1250,7 @@ static int mwifiex_sdio_card_to_host_mp_aggr(struct mwifiex_adapter *adapter, mwifiex_decode_rx_packet(adapter, skb_deaggr, pkt_type); } else { - dev_err(adapter->dev, "wrong aggr pkt:" + dev_err(adapter->dev, "bad aggr pkt:" " type=%d len=%d max_len=%d\n", pkt_type, pkt_len, card->mpa_rx.len_arr[pind]);