From patchwork Sat Dec 20 18:25:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 5523101 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F26CFBEEA8 for ; Sat, 20 Dec 2014 18:25:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E957220160 for ; Sat, 20 Dec 2014 18:25:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E83120158 for ; Sat, 20 Dec 2014 18:25:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751000AbaLTSZW (ORCPT ); Sat, 20 Dec 2014 13:25:22 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:33943 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750785AbaLTSZV (ORCPT ); Sat, 20 Dec 2014 13:25:21 -0500 Received: by mail-wi0-f179.google.com with SMTP id ex7so4650292wid.12 for ; Sat, 20 Dec 2014 10:25:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=YuY8KtRb2fFNlxSTlFmxregLYrC5kiCKHTr4YeolVWI=; b=j6S0yg7cTOBeph9ikNuOAcHTrMQPNUc/cJv8SOQkT42KlfpmP3Wvs7BT0gV49T3P+H NdTA4HZpAiyh/i+dw/CLlEsvmk5Fsld8sBh7aUj7zelFnj7wYskL3U0rhDBkBkJuCT+x Ow1ChH2FXe93X7vB75DiPypfoReDqvXROQCc4a4ySNJ5xS1F+dXm5ymTpas9sfJd47Sw Djksl6+16V18AU03EjfHoJXXSgixX2XyCopOqXa3O80x/nq2NmFNKRCfnrbQJNNuisgL S+m8aMB64gL+pqrfhhZiWTgOqdqBepKzlxEcHNCAWizLF0jQTI5QDGnbS6dsE7kl9aK2 nPxg== X-Received: by 10.194.19.38 with SMTP id b6mr26280788wje.44.1419099919823; Sat, 20 Dec 2014 10:25:19 -0800 (PST) Received: from linux-tdhb.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by mx.google.com with ESMTPSA id q10sm7298512wjx.34.2014.12.20.10.25.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Dec 2014 10:25:18 -0800 (PST) From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= To: Brett Rudley , Arend van Spriel , "Franky (Zhenhui) Lin" , Hante Meuleman , brcm80211-dev-list@broadcom.com Cc: linux-wireless@vger.kernel.org, =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Subject: [BUG REPORT] brcmfmac: wrong logic in finding control/primary channel relative location Date: Sat, 20 Dec 2014 19:25:04 +0100 Message-Id: <1419099904-13303-1-git-send-email-zajec5@gmail.com> X-Mailer: git-send-email 1.8.4.5 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.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, 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 --- Hi guys, Let me report something I think is a bug in this unusual-patch way ;) --- drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c index 39b45c0..2c9e88b 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c @@ -313,11 +313,13 @@ static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf, case NL80211_CHAN_WIDTH_80: ch_inf.bw = BRCMU_CHAN_BW_80; if (primary_offset < 0) { + /* FIXME: We compare frequencies offset with a value -2. Looks like a wrong logic. */ if (primary_offset < -CH_10MHZ_APART) ch_inf.sb = BRCMU_CHAN_SB_UU; else ch_inf.sb = BRCMU_CHAN_SB_UL; } else { + /* FIXME: We compare frequencies offset with a value 2. Looks like a wrong logic. */ if (primary_offset > CH_10MHZ_APART) ch_inf.sb = BRCMU_CHAN_SB_LL; else