From patchwork Fri Jan 17 15:19:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 3505441 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 A0550C02DC for ; Fri, 17 Jan 2014 15:19:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 90EED20179 for ; Fri, 17 Jan 2014 15:19:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 799D720122 for ; Fri, 17 Jan 2014 15:19:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752725AbaAQPTv (ORCPT ); Fri, 17 Jan 2014 10:19:51 -0500 Received: from mail-pa0-f50.google.com ([209.85.220.50]:59523 "EHLO mail-pa0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752208AbaAQPTt (ORCPT ); Fri, 17 Jan 2014 10:19:49 -0500 Received: by mail-pa0-f50.google.com with SMTP id kp14so4235411pab.37 for ; Fri, 17 Jan 2014 07:19:49 -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:mime-version:content-type :content-transfer-encoding; bh=ed6G9zJBatpyGjzUumYADaT+e4I5+V0tdwuvnHKovos=; b=whwL++r56l/kP2fywYy4uq1UY2a6RNVAcU0NTxmh2KhTRcIxcp5ZmB4dT5jSSMHhh2 tVZGqnMXpfb8IsAO8+WUbGKg93yKyQJDiJsIneBWNRj/Rjo63MYEkHTYarLMH4wE+mGR OfTEkIuRDuWJcgp1urcwcLTP3ewSJhZAJe27gy5IDUjEHwGcKlFTjkU5L+QlX5w3TYyK HM9xdpcPSXIHsHXuEECjrYwwz3Qx97jMDAjMU1Ve44dFRXobN9rrnhbi4ITf2AL4mLhA EgHqcMmVMu5HR2Aj3ef/lFXpVjVpzg37EzX8CxoTr8hZdtz7fhUc/NLmAhQAzlKEPqRe GrQQ== X-Received: by 10.66.137.109 with SMTP id qh13mr2744723pab.140.1389971989125; Fri, 17 Jan 2014 07:19:49 -0800 (PST) Received: from localhost.localdomain ([175.153.40.41]) by mx.google.com with ESMTPSA id sx8sm31710141pab.5.2014.01.17.07.19.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jan 2014 07:19:48 -0800 (PST) From: ZHAO Gang To: Stefano Brivio Cc: Jonas Gorski , Luca Coelho , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , "John W. Linville" , , , Stable Subject: [PATCH v3 1/2] b43: fix the wrong assignment of status.freq in b43_rx() Date: Fri, 17 Jan 2014 23:19:13 +0800 Message-Id: X-Mailer: git-send-email 1.8.4.2 MIME-Version: 1.0 Sender: linux-wireless-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 Use the right function to update status.freq. The wrong frequency value can cause problem that bss info can't be updated when it should be. This bug is introduced by commit 8318d78a44d49ac1edf2bdec7299de3617c4232e "cfg80211 API for channels/bitrates, mac80211 and driver conversion". Cc: Stable Signed-off-by: ZHAO Gang Signed-off-by: ... --- v3: change commit log suggested by Luca Coelho, Rafa? Mi?ecki and Jonas Gorski I'm not very familiar with wireless subsystem yet. If commit message needs more changes, feel free to point it out. drivers/net/wireless/b43/xmit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c index 4ae63f4..50e5ddb 100644 --- a/drivers/net/wireless/b43/xmit.c +++ b/drivers/net/wireless/b43/xmit.c @@ -821,10 +821,10 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr) * channel number in b43. */ if (chanstat & B43_RX_CHAN_5GHZ) { status.band = IEEE80211_BAND_5GHZ; - status.freq = b43_freq_to_channel_5ghz(chanid); + status.freq = b43_channel_to_freq_5ghz(chanid); } else { status.band = IEEE80211_BAND_2GHZ; - status.freq = b43_freq_to_channel_2ghz(chanid); + status.freq = b43_channel_to_freq_2ghz(chanid); } break; default: