From patchwork Wed Feb 19 08:58:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 3679441 Return-Path: X-Original-To: patchwork-linux-wireless@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C87329F35F for ; Wed, 19 Feb 2014 08:59:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E04F8201BA for ; Wed, 19 Feb 2014 08:59:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id F05C3200B4 for ; Wed, 19 Feb 2014 08:59:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786AbaBSI7h (ORCPT ); Wed, 19 Feb 2014 03:59:37 -0500 Received: from mail-pd0-f178.google.com ([209.85.192.178]:42306 "EHLO mail-pd0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752631AbaBSI7e (ORCPT ); Wed, 19 Feb 2014 03:59:34 -0500 Received: by mail-pd0-f178.google.com with SMTP id fp1so107321pdb.23 for ; Wed, 19 Feb 2014 00:59:33 -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; bh=H8KVRreW2IlIKFXGRIQ1wLcuyRXDJCyikmyHxW55/v4=; b=sSGQDr06Mu5jXZWeXFaT713Qi6IQqmuhYyfXJVaIBqhLemLSkFDzywjP8HVbWi6jZG qfgmkK8pbUd09eaHC3H9Bkn5Gml2DbNLYZSoZb3nbUb0FdkcpbeQWWhfzQJEb/x42ppY oCyZP9EAdRMeO0Wi294NWqb+LKjd4BSbHULmzJhwJPaHZ+nBj2T3Ob00jY9DQj5FL+D3 Qj88xumIysUBnKWVW8AYqrVjgdyIzAH9c2a6YLjnaIEyDdiRI9NVu4k17RcYLwcKlK7a e6oUfxEBwTwDNd/E1e1H5u4TUubLKjF88Eu3e9SvThQPp9mU1Ic5uGB4fm4SCY3rF/yJ jidw== X-Received: by 10.68.194.97 with SMTP id hv1mr845993pbc.162.1392800373524; Wed, 19 Feb 2014 00:59:33 -0800 (PST) Received: from will.lan ([175.153.40.117]) by mx.google.com with ESMTPSA id ss2sm161502650pab.8.2014.02.19.00.59.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 19 Feb 2014 00:59:32 -0800 (PST) From: "Zhao, Gang" To: Dave Kilroy Cc: "John W. Linville" , Subject: [PATCH 6/7 v2] orinoco: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} Date: Wed, 19 Feb 2014 16:58:43 +0800 Message-Id: <8a2947c23c40106d87fe32b555099ae4118021cc.1392799862.git.gamerh2o@gmail.com> X-Mailer: git-send-email 1.8.5.3 In-Reply-To: <53046C5E.5070208@gmail.com> References: <53046C5E.5070208@gmail.com> 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 --- v2: indention change suggested by Dave Kilroy drivers/net/wireless/orinoco/cfg.c | 5 +++-- drivers/net/wireless/orinoco/hw.c | 2 +- drivers/net/wireless/orinoco/scan.c | 5 +++-- drivers/net/wireless/orinoco/wext.c | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/wireless/orinoco/cfg.c b/drivers/net/wireless/orinoco/cfg.c index d01edd2..a9e94b6 100644 --- a/drivers/net/wireless/orinoco/cfg.c +++ b/drivers/net/wireless/orinoco/cfg.c @@ -59,7 +59,8 @@ 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 +178,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) ||