From patchwork Fri Jan 17 16:17:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 3506141 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 F0C50C02DC for ; Fri, 17 Jan 2014 16:18:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 670B220142 for ; Fri, 17 Jan 2014 16:18:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E86BA2011B for ; Fri, 17 Jan 2014 16:18:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752032AbaAQQSN (ORCPT ); Fri, 17 Jan 2014 11:18:13 -0500 Received: from mail-pb0-f51.google.com ([209.85.160.51]:64018 "EHLO mail-pb0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751354AbaAQQSM (ORCPT ); Fri, 17 Jan 2014 11:18:12 -0500 Received: by mail-pb0-f51.google.com with SMTP id un15so604474pbc.24 for ; Fri, 17 Jan 2014 08:18:11 -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=PECYuXBEDPrm6DreE6EGc2fgd3+UTTE+DX5Ka2z0u5M=; b=IPT3F+6x1cwMt3ALdcwpQ9/rGQv5ODvLhoKcZvAvCzYkH82ep34k4sVKfMhfDyCeyq 6m8pmKWn9W8IY6czxXrnLgtcLbnIbZ2FPn29rIE4yf8nyuLl3UrQ2OSwIcYWAMDsyXPw 68XuOBSigzHkBXcU4GdC7UC7ENBJZinaAyeAgUe3C1Prd6RBlwAZo7npO8xQ3k2Np3bq xpLytRMks849vISf7yFAowM9rsZciyA5UDdFBqJ3Ml1xO98OvOcrIl10gyj0Qh3Kb4FD 32nbhckEk0GkoneBfuAnsnVPnGj9z5UUXh+jCbWXiqswpWMb0w0qOhPY0CeETunA/G3b B7pA== X-Received: by 10.68.247.6 with SMTP id ya6mr2971158pbc.45.1389975491144; Fri, 17 Jan 2014 08:18:11 -0800 (PST) Received: from localhost.localdomain ([175.153.40.41]) by mx.google.com with ESMTPSA id qw8sm23907919pbb.27.2014.01.17.08.18.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jan 2014 08:18:10 -0800 (PST) From: ZHAO Gang To: Stefano Brivio Cc: Johannes Berg , Jonas Gorski , Luca Coelho , =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , "John W. Linville" , , , Subject: [PATCH v4 1/2] b43: fix the wrong assignment of status.freq in b43_rx() Date: Sat, 18 Jan 2014 00:17:38 +0800 Message-Id: X-Mailer: git-send-email 1.8.4.2 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 frequency value. If rx skb is probe response or beacon, the wrong frequency value can cause problem that bss info can't be updated when it should be. Cc: Fixes: 8318d78a44d4 ("cfg80211 API for channels/bitrates, mac80211 and driver conversion") Signed-off-by: ZHAO Gang Acked-by: Larry Finger --- v4: change commit message suggested by Johannes Berg 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: