From patchwork Tue Feb 18 13:35:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gang ZHAO X-Patchwork-Id: 3670391 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 C2404BF13A for ; Tue, 18 Feb 2014 13:36:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E8C0120163 for ; Tue, 18 Feb 2014 13:36:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 183F920160 for ; Tue, 18 Feb 2014 13:36:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755424AbaBRNgg (ORCPT ); Tue, 18 Feb 2014 08:36:36 -0500 Received: from mail-pd0-f171.google.com ([209.85.192.171]:47309 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755406AbaBRNgf (ORCPT ); Tue, 18 Feb 2014 08:36:35 -0500 Received: by mail-pd0-f171.google.com with SMTP id g10so16175012pdj.16 for ; Tue, 18 Feb 2014 05:36:34 -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=xGZ+770Z7v5mwFDUFNsrQZubXNvS1P9QssAkx+5S1JI=; b=IrWfc/HBLzXaNG3V1qSuETEgEF2+2aEQOltmsZ7fmM1Fb5B95AsJDtiVqYENrRG+pT IN2rLoG6MX6T1sa/Nahf4PWNzX6VAmigDERAY59bcKvTcX7FmAweiawh2btRRSdzWnji EnFlO+sAOhPaGyfAPXW6y250f6D9U79kq98q+VnGJ5D/qoMYHCbVVN4gcq3MpJkpQJ3X hkEGGtTB8wIcVHQh3yhz67vAjqfCu8JOu1EDAY+Xdv7G/FQE/eZy33KIKY0Cf6sV1YKe 9zB9kRVvMen57EiTWWqJSexWNmCM05boCjQjM868wvPbDRCPaO+3nJPkQXxpULa7sYSV Z5wA== X-Received: by 10.66.197.164 with SMTP id iv4mr33146350pac.18.1392730594861; Tue, 18 Feb 2014 05:36:34 -0800 (PST) Received: from will.lan ([175.153.40.117]) by mx.google.com with ESMTPSA id vx10sm142544850pac.17.2014.02.18.05.36.30 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Feb 2014 05:36:34 -0800 (PST) From: "Zhao, Gang" To: "John W. Linville" Cc: Subject: [PATCH 1/7] airo: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} Date: Tue, 18 Feb 2014 21:35:57 +0800 Message-Id: <742c546a3d3e149d833b4202c91965b4eb621bd6.1392728354.git.gamerh2o@gmail.com> 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}. Include for the defination of IEEE80211_BAND_2GHZ. Because includes , so we can replace with . 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/airo.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/net/wireless/airo.c b/drivers/net/wireless/airo.c index edf4b57..2e6cb64 100644 --- a/drivers/net/wireless/airo.c +++ b/drivers/net/wireless/airo.c @@ -49,7 +49,7 @@ #include #include -#include +#include #include #include "airo.h" @@ -5797,7 +5797,7 @@ static int airo_set_freq(struct net_device *dev, /* Hack to fall through... */ fwrq->e = 0; - fwrq->m = ieee80211_freq_to_dsss_chan(f); + fwrq->m = ieee80211_frequency_to_channel(f); } /* Setting by channel number */ if((fwrq->m > 1000) || (fwrq->e > 0)) @@ -5841,7 +5841,8 @@ static int airo_get_freq(struct net_device *dev, ch = le16_to_cpu(status_rid.channel); if((ch > 0) && (ch < 15)) { - fwrq->m = ieee80211_dsss_chan_to_freq(ch) * 100000; + fwrq->m = 100000 * + ieee80211_channel_to_frequency(ch, IEEE80211_BAND_2GHZ); fwrq->e = 1; } else { fwrq->m = ch; @@ -6898,7 +6899,8 @@ static int airo_get_range(struct net_device *dev, k = 0; for(i = 0; i < 14; i++) { range->freq[k].i = i + 1; /* List index */ - range->freq[k].m = ieee80211_dsss_chan_to_freq(i + 1) * 100000; + range->freq[k].m = 100000 * + ieee80211_channel_to_frequency(i + 1, IEEE80211_BAND_2GHZ); range->freq[k++].e = 1; /* Values in MHz -> * 10^5 * 10 */ } range->num_frequency = k; @@ -7297,7 +7299,8 @@ static inline char *airo_translate_scan(struct net_device *dev, /* Add frequency */ iwe.cmd = SIOCGIWFREQ; iwe.u.freq.m = le16_to_cpu(bss->dsChannel); - iwe.u.freq.m = ieee80211_dsss_chan_to_freq(iwe.u.freq.m) * 100000; + iwe.u.freq.m = 100000 * + ieee80211_channel_to_frequency(iwe.u.freq.m, IEEE80211_BAND_2GHZ); iwe.u.freq.e = 1; current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_FREQ_LEN);