From patchwork Tue Sep 6 13:09:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 9316735 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 570F3601C0 for ; Tue, 6 Sep 2016 13:09:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46F0E289B3 for ; Tue, 6 Sep 2016 13:09:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B93428D1B; Tue, 6 Sep 2016 13:09:50 +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=-5.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,URIBL_BLACK 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 C2586289B3 for ; Tue, 6 Sep 2016 13:09:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935179AbcIFNJh (ORCPT ); Tue, 6 Sep 2016 09:09:37 -0400 Received: from narfation.org ([79.140.41.39]:38625 "EHLO v3-1039.vlinux.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756036AbcIFNJe (ORCPT ); Tue, 6 Sep 2016 09:09:34 -0400 Received: from bentobox.localnet (p2003007C6F7830FE0FB61401D08AEE6B.dip0.t-ipconnect.de [IPv6:2003:7c:6f78:30fe:fb6:1401:d08a:ee6b]) by v3-1039.vlinux.de (Postfix) with ESMTPSA id A6B971100B0; Tue, 6 Sep 2016 15:09:27 +0200 (CEST) Authentication-Results: v3-1039.vlinux.de; dmarc=none header.from=narfation.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=narfation.org; s=20121; t=1473167368; bh=NUwTt4SCP5WZOKusKcd7d/yHYQl3h4wJO5m1ymElhm8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VpSh6YDa9sf7snekQaoEWAcMX+TtaQIQRnrr6R3+90AzkxSqq8MQSpj50uYJmPqE7 NKoNRSjpAiLurFblidmcbE+6uvE+YJzzbUoFOlD0yiPNWgQkwzI3c56UwCFh53uxCV m/sWbylxnsftRRknWPeXU7A+RUVwX2MoXNuVTuP4= From: Sven Eckelmann To: Larry Finger Cc: Simon Wunderlich , linux-wireless@vger.kernel.org, Pannirselvam Kanagaratnam Subject: Re: Debugging RTL8192CU firmware loading on 3.12 powerpc Date: Tue, 06 Sep 2016 15:09:21 +0200 Message-ID: <2186338.AojtHidiB8@bentobox> User-Agent: KMail/5.2.3 (Linux/4.6.0-1-amd64; KDE/5.25.0; x86_64; ; ) In-Reply-To: <2747159.ja51ucCDFk@bentobox> References: <1586991.4QUcrJhXOm@prime> <2747159.ja51ucCDFk@bentobox> MIME-Version: 1.0 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 On Dienstag, 6. September 2016 09:40:41 CEST Sven Eckelmann wrote: > On Freitag, 2. September 2016 12:53:28 CEST Larry Finger wrote: > [...] > > > The patch I included in my previous E-mail, and attached here, does get > > the firmware loaded correctly. There is still a problem that prevents > > authentication. I'm still looking for that issue. > > Thanks for the fast update. I am currently testing your patch. It looks like > the initial error is now gone. The hostapd also starts but beaconing > doesn't seem to work at all (no error from the kernel/hostapd but the > device is not sending anything). I am currently checking how beaconing is > supposed to work in your driver. Maybe I will spot something useful. Yes, found something similar in the checksumming algorithm. See the attached patch for details. Kind regards, Sven From: Sven Eckelmann Date: Tue, 6 Sep 2016 15:00:27 +0200 Subject: [PATCH] Fix TX checksum on big endian systems --- drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c index 95880fe..6cb46ba 100644 --- a/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8192cu/trx.c @@ -481,14 +481,14 @@ static void _rtl_fill_usb_tx_desc(u8 *txdesc) */ static void _rtl_tx_desc_checksum(u8 *txdesc) { - u16 *ptr = (u16 *)txdesc; + __le16 *ptr = (__le16 *)txdesc; u16 checksum = 0; u32 index; /* Clear first */ SET_TX_DESC_TX_DESC_CHECKSUM(txdesc, 0); for (index = 0; index < 16; index++) - checksum = checksum ^ (*(ptr + index)); + checksum = checksum ^ le16_to_cpu(*(ptr + index)); SET_TX_DESC_TX_DESC_CHECKSUM(txdesc, checksum); }