From patchwork Tue Feb 18 13:36:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 3670441 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 0FE72BF13A for ; Tue, 18 Feb 2014 13:37:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26B8E20160 for ; Tue, 18 Feb 2014 13:37:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2F29120103 for ; Tue, 18 Feb 2014 13:37:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755090AbaBRNhN (ORCPT ); Tue, 18 Feb 2014 08:37:13 -0500 Received: from mail-pa0-f48.google.com ([209.85.220.48]:49599 "EHLO mail-pa0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755295AbaBRNhL (ORCPT ); Tue, 18 Feb 2014 08:37:11 -0500 Received: by mail-pa0-f48.google.com with SMTP id kx10so16737238pab.35 for ; Tue, 18 Feb 2014 05:37:10 -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:in-reply-to:references :in-reply-to:references; bh=nhr5FMsqhUp07P9EkHcu9lRo4n0jHhDtJXcIgKsY5e8=; b=YrvsM/TxYDLDRD2ygNDc/JSD9bnwqyJ+XJJ65NuXKPVjuJ5LWklOBOTS6/szJySZvj Rq71aMcODOozGeJrgIb2YYcP3WlFg6uhN5d5nevLNI73XWOdUl/9UpC61IEdznAnf6Fx uY+7hkp6DqhVyj4DAGnrI0I6aRKsSuqgsfW3Z1XBreK3xP011WBuMKELQVf8OBQPiB8L IuReUPOkE1DYTU5i4pwop71CIdNmZyqJ1ZtUjTI8CEj32SSPP8Tp02pgRJ4m1BZTG+dD xHOG5nYzbdaoBpJpkaB/hx3vKRIzm12msUSmDwfE1CE2+QOE+ufIxr9hK+k9u9Vq4YKO RAVA== X-Received: by 10.68.129.5 with SMTP id ns5mr10050459pbb.147.1392730630556; Tue, 18 Feb 2014 05:37:10 -0800 (PST) Received: from will.lan ([175.153.40.117]) by mx.google.com with ESMTPSA id vx10sm142544850pac.17.2014.02.18.05.37.08 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Feb 2014 05:37:10 -0800 (PST) From: "Zhao, Gang" To: "John W. Linville" Cc: Subject: [PATCH 6/7] orinoco: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} Date: Tue, 18 Feb 2014 21:36:02 +0800 Message-Id: X-Mailer: git-send-email 1.8.5.3 In-Reply-To: References: In-Reply-To: References: 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.3 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 Replace ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} with more generic ieee80211_{channel_to_frequency, frequency_to_channel}. File has already been included. It's safe to use IEEE80211_BAND_2GHZ here. This change is a preparation for the removal of function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}. Signed-off-by: Zhao, Gang --- drivers/net/wireless/orinoco/cfg.c | 4 ++-- drivers/net/wireless/orinoco/hw.c | 2 +- drivers/net/wireless/orinoco/scan.c | 5 +++-- drivers/net/wireless/orinoco/wext.c | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c index d01edd2..c5ef3ab 100644 --- a/drivers/net/wireless/orinoco/cfg.c +++ b/drivers/net/wireless/orinoco/cfg.c @@ -59,7 +59,7 @@ int orinoco_wiphy_register(struct wiphy *wiphy) for (i = 0; i < NUM_CHANNELS; i++) { if (priv->channel_mask & (1 << i)) { priv->channels[i].center_freq = - ieee80211_dsss_chan_to_freq(i + 1); + ieee80211_channel_to_frequency(i + 1, IEEE80211_BAND_2GHZ); channels++; } } @@ -177,7 +177,7 @@ static int orinoco_set_monitor_channel(struct wiphy *wiphy, if (chandef->chan->band != IEEE80211_BAND_2GHZ) return -EINVAL; - channel = ieee80211_freq_to_dsss_chan(chandef->chan->center_freq); + channel = ieee80211_frequency_to_channel(chandef->chan->center_freq); if ((channel < 1) || (channel > NUM_CHANNELS) || !(priv->channel_mask & (1 << (channel - 1)))) diff --git a/drivers/net/wireless/orinoco/hw.c b/drivers/net/wireless/orinoco/hw.c index c09c843..49300d0 100644 --- a/drivers/net/wireless/orinoco/hw.c +++ b/drivers/net/wireless/orinoco/hw.c @@ -1193,7 +1193,7 @@ int orinoco_hw_get_freq(struct orinoco_private *priv) goto out; } - freq = ieee80211_dsss_chan_to_freq(channel); + freq = ieee80211_channel_to_frequency(channel, IEEE80211_BAND_2GHZ); out: orinoco_unlock(priv, &flags); diff --git a/drivers/net/wireless/orinoco/scan.c b/drivers/net/wireless/orinoco/scan.c index e8c5714..e175b9b 100644 --- a/drivers/net/wireless/orinoco/scan.c +++ b/drivers/net/wireless/orinoco/scan.c @@ -110,7 +110,8 @@ static void orinoco_add_hostscan_result(struct orinoco_private *priv, break; } - freq = ieee80211_dsss_chan_to_freq(le16_to_cpu(bss->a.channel)); + freq = ieee80211_channel_to_frequency( + le16_to_cpu(bss->a.channel), IEEE80211_BAND_2GHZ); channel = ieee80211_get_channel(wiphy, freq); if (!channel) { printk(KERN_DEBUG "Invalid channel designation %04X(%04X)", @@ -146,7 +147,7 @@ void orinoco_add_extscan_result(struct orinoco_private *priv, ie_len = len - sizeof(*bss); ie = cfg80211_find_ie(WLAN_EID_DS_PARAMS, bss->data, ie_len); chan = ie ? ie[2] : 0; - freq = ieee80211_dsss_chan_to_freq(chan); + freq = ieee80211_channel_to_frequency(chan, IEEE80211_BAND_2GHZ); channel = ieee80211_get_channel(wiphy, freq); timestamp = le64_to_cpu(bss->timestamp); diff --git a/drivers/net/wireless/orinoco/wext.c b/drivers/net/wireless/orinoco/wext.c index 3b5508f..b7a867b 100644 --- a/drivers/net/wireless/orinoco/wext.c +++ b/drivers/net/wireless/orinoco/wext.c @@ -444,7 +444,7 @@ static int orinoco_ioctl_setfreq(struct net_device *dev, for (i = 0; i < (6 - frq->e); i++) denom *= 10; - chan = ieee80211_freq_to_dsss_chan(frq->m / denom); + chan = ieee80211_frequency_to_channel(frq->m / denom); } if ((chan < 1) || (chan > NUM_CHANNELS) ||