Merge commit 'v3.17' into next
[cascardo/linux.git] / drivers / net / wireless / atmel.c
index bf93ea8..9183f1c 100644 (file)
@@ -67,7 +67,7 @@
 #include <linux/moduleparam.h>
 #include <linux/firmware.h>
 #include <linux/jiffies.h>
-#include <linux/ieee80211.h>
+#include <net/cfg80211.h>
 #include "atmel.h"
 
 #define DRIVER_MAJOR 0
@@ -2273,7 +2273,7 @@ static int atmel_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))
@@ -2434,8 +2434,8 @@ static int atmel_get_range(struct net_device *dev,
                        range->freq[k].i = i; /* List index */
 
                        /* Values in MHz -> * 10^5 * 10 */
-                       range->freq[k].m = (ieee80211_dsss_chan_to_freq(i) *
-                                           100000);
+                       range->freq[k].m = 100000 *
+                        ieee80211_channel_to_frequency(i, IEEE80211_BAND_2GHZ);
                        range->freq[k++].e = 1;
                }
                range->num_frequency = k;
@@ -2598,11 +2598,11 @@ static const iw_handler atmel_private_handler[] =
        NULL,                           /* SIOCIWFIRSTPRIV */
 };
 
-typedef struct atmel_priv_ioctl {
+struct atmel_priv_ioctl {
        char id[32];
        unsigned char __user *data;
        unsigned short len;
-} atmel_priv_ioctl;
+};
 
 #define ATMELFWL       SIOCIWFIRSTPRIV
 #define ATMELIDIFC     ATMELFWL + 1
@@ -2615,7 +2615,7 @@ static const struct iw_priv_args atmel_private_args[] = {
                .cmd = ATMELFWL,
                .set_args = IW_PRIV_TYPE_BYTE
                                | IW_PRIV_SIZE_FIXED
-                               | sizeof (atmel_priv_ioctl),
+                               | sizeof(struct atmel_priv_ioctl),
                .get_args = IW_PRIV_TYPE_NONE,
                .name = "atmelfwl"
        }, {
@@ -2645,7 +2645,7 @@ static int atmel_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
 {
        int i, rc = 0;
        struct atmel_private *priv = netdev_priv(dev);
-       atmel_priv_ioctl com;
+       struct atmel_priv_ioctl com;
        struct iwreq *wrq = (struct iwreq *) rq;
        unsigned char *new_firmware;
        char domain[REGDOMAINSZ + 1];