From patchwork Sat Dec 2 09:54:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kenneth Lu X-Patchwork-Id: 10088565 X-Patchwork-Delegate: kvalo@adurom.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8D84960380 for ; Sat, 2 Dec 2017 09:54:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E0DB29814 for ; Sat, 2 Dec 2017 09:54:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72E0729866; Sat, 2 Dec 2017 09:54:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 100F529814 for ; Sat, 2 Dec 2017 09:54:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751673AbdLBJyU (ORCPT ); Sat, 2 Dec 2017 04:54:20 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:41874 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751586AbdLBJyT (ORCPT ); Sat, 2 Dec 2017 04:54:19 -0500 Received: by mail-pf0-f194.google.com with SMTP id j28so5731792pfk.8 for ; Sat, 02 Dec 2017 01:54:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=pp+YAxN9dZcXDvqZskOPZd41Ifc8AlTAYyf//HKvaCg=; b=klAJD6MtzZ+9O01dI9z7IR282SgpVJdpgpj5aS0QIEcb0sV0glejB8p1/qDjZffvR6 M3Vzf8ckfjC1uJ62nv7V7OZlami58ufQq9HMWQm8qas+Zfd55cbm3Ehfked2jKegKt7O Bda8h8896puw1V0uA7AkxzefM9DtTbWlAcq3m8yg1hg6O3dvY8IyC/rdxmeMuGFwLd7w yiLfrv4MaphUwuOkam2JtjygVvgiz8dnhvib/fdaJelV7kgGIePbKzZwnAYhB3/yJAD/ Zc3DNFnNS1ZqG/XcF2q/1CAEkn0wpSpwfGR+zlcOkt6zsNJXoFTxJa9D7eui1kAyV3Ea uIjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=pp+YAxN9dZcXDvqZskOPZd41Ifc8AlTAYyf//HKvaCg=; b=f+1X3Q9sIIpiwjtORJcBK1ZWju1B6+syf8C188Q6aZw6otfuo0hFCObAahc895qqtt Qp5IwYAH3xpTyqvr9crlgRQYSILPA/LQwZGdGnUUZhozG/00VXtmF3tSDcXTfHTCZKwG jhCT9Y8Nz8liXHTGbmT6iG9jQLkznzpzS4ZUjAmkDVqtI+oTM+HsoiW3UEf+jvpNJilb SLhRXJNWrmSHyqQb9ZBuIJr/t0+SZyER9URFHRQWz2otiY2lpE6J282zVLJGpQGBS3WK fvz+nxOb2WmrryBPVPeed34YgwO4gzXyDc7Of8nSmqPfIIm3Cm1KZRx1YfHadXhdzLSJ CwfQ== X-Gm-Message-State: AJaThX7VPciovCULLtdtNwhVNkyGZJ7m3J8922QDzSpefp47RWhpbaub D+CoEF0eyd6U9Ndz0YDvd1Q= X-Google-Smtp-Source: AGs4zMYkKYS8X4dbjjzBJ6piokBUkiovqt/Qq490AckG6emYPSBzODONQ8FHgqlkiDt8sXYLMZvamQ== X-Received: by 10.98.4.199 with SMTP id 190mr13236789pfe.208.1512208458510; Sat, 02 Dec 2017 01:54:18 -0800 (PST) Received: from blackstone (220-133-32-83.HINET-IP.hinet.net. [220.133.32.83]) by smtp.gmail.com with ESMTPSA id f3sm13945869pgt.15.2017.12.02.01.54.17 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 02 Dec 2017 01:54:17 -0800 (PST) Date: Sat, 2 Dec 2017 17:54:13 +0800 From: Kenneth Lu To: kvalo@qca.qualcomm.com Cc: linux-wireless@vger.kernel.org, ath6kl@lists.infradead.org Subject: [PATCH] ath6kl: improve endianness handling Message-ID: <20171202095413.GA12091@blackstone> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Replace ntohs with be16_to_cpu to do endian conversions for ethhdr h_proto assignment. Signed-off-by: Kenneth Lu --- drivers/net/wireless/ath/ath6kl/txrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath6kl/txrx.c b/drivers/net/wireless/ath/ath6kl/txrx.c index 1379906..8da9506 100644 --- a/drivers/net/wireless/ath/ath6kl/txrx.c +++ b/drivers/net/wireless/ath/ath6kl/txrx.c @@ -1001,7 +1001,7 @@ static void aggr_slice_amsdu(struct aggr_info *p_aggr, while (amsdu_len > mac_hdr_len) { hdr = (struct ethhdr *) framep; - payload_8023_len = ntohs(hdr->h_proto); + payload_8023_len = be16_to_cpu(hdr->h_proto); if (payload_8023_len < MIN_MSDU_SUBFRAME_PAYLOAD_LEN || payload_8023_len > MAX_MSDU_SUBFRAME_PAYLOAD_LEN) {