]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
orinoco: replace function ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}
authorZhao, Gang <gamerh2o@gmail.com>
Wed, 19 Feb 2014 08:58:43 +0000 (16:58 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 28 Feb 2014 19:12:36 +0000 (14:12 -0500)
Replace ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan} with more
generic ieee80211_{channel_to_frequency, frequency_to_channel}.

File <net/cfg80211.h> 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 <gamerh2o@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/orinoco/cfg.c
drivers/net/wireless/orinoco/hw.c
drivers/net/wireless/orinoco/scan.c
drivers/net/wireless/orinoco/wext.c

index d01edd2c50c505866cb554826659e24b4489c68f..a9e94b6db5b7e961d25ec2c58a2eb50d46bc621d 100644 (file)
@@ -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))))
index c09c8437c0b821072633c1022b348722d3913170..49300d04efdf0e7221a2b0f64f0475ad6f73ee59 100644 (file)
@@ -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);
index e8c5714bfd11c24642933b824d299c165a768b27..e175b9b8561b594299d69d237624e3604932d22f 100644 (file)
@@ -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);
index 3b5508f982e80b8376d6bcb20c63dae6fd5586e0..b7a867b50b9476fb2c54ad9ccbb28815e6fa70e6 100644 (file)
@@ -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) ||